WebKit WPaintedWidget WAbstractArea problem...
I'm implementing a WebKit-based client with Qt 4.8.6 using QWebKit. Wt detects it as a WebKit client and the WAbstractArea are handled differently than for example in Firefox-Mode using wt-3.3.2:
1. Clicking an WAbstractArea does not work
- Rendered texts overlap if some boxes with texts are rendered over each other.
Changing the "User-Agent" to Firefox everything works perfectly!
Attached you will find 2 screenshots. First the standard WebKit User-Agent string which has the above problems and second the Firefox User-Agent string which works perfectly!
Updated by Koen Deforche over 8 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
- Target version set to 3.3.4
Can you see a difference in generated markup? The only reliance on user-agent that I can spot has to do with the href attribute, which I cannot imagine to have such a signficant effect?
Updated by Stefan Ruppert over 8 years ago
no I can't see any difference in the markup. However is the image is rendered on the server side and referenced with the tag? Maybe there is something wrong?
Also the event code seems to me to be equal. Maybe the event gets filtered out in a WebKit environment?
Updated by Koen Deforche about 8 years ago
I've got two hypotheses on where it goes wrong:
- (less likely) in WPaintedWidget::getMethod() there are heuristics to choose a method for rendering the graphics taking into account browser limitations. The default drawing method is 'HTML5Canvas'; is this being returned also for the native QT5 agent?
- (more likely) in WCanvasPaintDevice, we support different ways to render text based on browser support. Initially the HTML5 Canvas spec did not include text rendering and then we worked around this. I suspect that this is the problem: QT5 is detected as an agent without HTML5 rendering support. You can check this by changing the default textMethod_ = DomText to textMethod_ = HTML5Text inside the WCanvasPaintDevice constructor.
What's the exact default user agent string for Qt5?