Project

General

Profile

Bug #3287

WebKit WPaintedWidget WAbstractArea problem...

Added by Stefan Ruppert almost 8 years ago. Updated over 7 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
Start date:
06/10/2014
Due date:
% Done:

0%

Estimated time:

Description

Hi,

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

  1. 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!


Files

WebKit-WAbstractArea-WebKit.png (27.1 KB) WebKit-WAbstractArea-WebKit.png Standard WebKit User-Agent String Stefan Ruppert, 06/10/2014 12:10 PM
WebKit-WAbstractArea-Firefox.png (37 KB) WebKit-WAbstractArea-Firefox.png "Firefox" User-Agent String Stefan Ruppert, 06/10/2014 12:10 PM
WebView-map.html (10.7 KB) WebView-map.html WebKit HTML map of diagram Stefan Ruppert, 10/22/2014 08:23 PM
Firefox-map.html (10.7 KB) Firefox-map.html "FireFox" HTML map of diagram Stefan Ruppert, 10/22/2014 08:23 PM
#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche
  • Target version set to 3.3.4

Hey,

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?

Koen

#2

Updated by Stefan Ruppert over 7 years ago

Hi Koen,

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?

Regards,

Stefan

#3

Updated by Koen Deforche over 7 years ago

Hey,

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?

Regards,

koen

#4

Updated by Stefan Ruppert over 7 years ago

Here is the WebKit userAgent string. Note its not Qt5 its Qt 4.8!

"Mozilla/5.0 (X11; N; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) Manager Safari/534.34"

Regards,

Stefan

#5

Updated by Koen Deforche over 7 years ago

Hey Stefan,

That would indicate the WCanvasPaintDevice hypothesis. Could you confirm that?

Koen

#6

Updated by Stefan Ruppert over 7 years ago

Hi Koen,

yes, changing the default textMethod_ to Html5Text helps!

I'm patching 3.3.2 to use Html5Text as default!

Thanks,

Stefan

Also available in: Atom PDF