Bug 40073

Summary: [Qt] rendering error in mediawiki
Product: WebKit Reporter: Adrian von Bidder <avbidder>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: CLOSED FIXED    
Severity: Normal CC: abecsi, adawit, ap, commit-queue, hausmann, kenneth, luiz, ossy, tonikitoo
Priority: P3 Keywords: Qt, QtTriaged
Version: 420+   
Hardware: Other   
OS: Linux   
URL: http://www.debianclusters.org/index.php/Main_Page
Attachments:
Description Flags
Patch
kenneth: review-, kenneth: commit-queue-
Patch - rev. #2
kenneth: review-, kenneth: commit-queue-
Patch - rev. #3
none
Same patch vs trunk... none

Adrian von Bidder
Reported 2010-06-02 11:07:07 PDT
See KDE: https://bugs.kde.org/show_bug.cgi?id=240465 and the attached screenshot. happens with many mediawiki sites, not only debianclusters. khtml and other browsers work fine; webkit doesn't have this problem with wikipedia or some other mediawiki sites, so it seems to be a particular version of their template that causes the bug. Browser: kpart-webkit 0.9svn1129464-1 (Debian version, it's the current unstable package update to a newer svn snapshot) and libqt4-webkit 4:4.6.2-5. cheers -- vbi
Attachments
Patch (2.91 KB, patch)
2010-06-08 11:24 PDT, Dawit A.
kenneth: review-
kenneth: commit-queue-
Patch - rev. #2 (2.73 KB, patch)
2010-06-08 11:54 PDT, Dawit A.
kenneth: review-
kenneth: commit-queue-
Patch - rev. #3 (2.70 KB, patch)
2010-06-11 22:33 PDT, Dawit A.
no flags
Same patch vs trunk... (2.64 KB, patch)
2010-06-12 09:13 PDT, Dawit A.
no flags
Dawit A.
Comment 1 2010-06-02 16:35:08 PDT
FYI. This reproducible using QtTestBrowser in QtWebKit 2.0 as well...
Alexey Proskuryakov
Comment 2 2010-06-03 00:51:01 PDT
I cannot reproduce this with ToT WebKit, so I suspect that Qt has an old version of WebKit. Issues like this have been addressed in bug 28350, bug 29792, and bug 35507.
Csaba Osztrogonác
Comment 3 2010-06-03 12:41:26 PDT
I can reproduce it with QtTestBrowser (WebKit trunk r60630)
Csaba Osztrogonác
Comment 4 2010-06-03 12:46:51 PDT
(In reply to comment #3) > I can reproduce it with QtTestBrowser (WebKit trunk r60630) It is the ToT of WebKit and I tried with Qt-4.6.0 and Qt-4.7 trunk.
Kenneth Rohde Christiansen
Comment 5 2010-06-03 12:53:31 PDT
Luiz, can you check this with pure Mac and Qt Mac build? Would be nice to know if this is a Qt only issue or not
Csaba Osztrogonác
Comment 6 2010-06-03 12:56:09 PDT
(In reply to comment #5) > Luiz, can you check this with pure Mac and Qt Mac build? Would be nice to know if this is a Qt only issue or not I tried with an old Safari on Windows and works as we expect.
Kenneth Rohde Christiansen
Comment 7 2010-06-03 12:57:51 PDT
as far as I remember, the mediawiki pages import illegal css when the user agent contain "KHTML" and we (WebKit community) had to make a quirk. Could it be that this quirk is not enabled for Qt?
Kenneth Rohde Christiansen
Comment 8 2010-06-03 12:59:27 PDT
Is this setting set for Qt? document()->settings()->needsSiteSpecificQuirks()
Csaba Osztrogonác
Comment 9 2010-06-03 13:05:40 PDT
I cc-ed Andras, he is our CSS parser guru. Have you got any idea?
Dawit A.
Comment 10 2010-06-03 13:16:30 PDT
(In reply to comment #2) > I cannot reproduce this with ToT WebKit, so I suspect that Qt has an old version of WebKit. Issues like this have been addressed in bug 28350, bug 29792, and bug 35507. I checked and the fixes from all of those reports are there in QtWebKit 2.0 ; so something else is causing or preventing those fixes from having any effect in QtWebKit... Perhaps the suggestion in comment #8 ?? Dunno.
Alexey Proskuryakov
Comment 11 2010-06-03 13:18:34 PDT
Yes, comment 8 sounds like the best explanation.
Dawit A.
Comment 12 2010-06-08 11:24:44 PDT
Created attachment 58162 [details] Patch Here is a patch that fixes the problem.
Dawit A.
Comment 13 2010-06-08 11:26:13 PDT
(In reply to comment #8) > Is this setting set for Qt? > > document()->settings()->needsSiteSpecificQuirks() Nope, it is not... See patch.
Kenneth Rohde Christiansen
Comment 14 2010-06-08 11:29:03 PDT
Comment on attachment 58162 [details] Patch WebKit/qt/Api/qwebsettings.cpp:434 + sites that use certain frameworks, such as the older versions of MediaWiki, may not render properly. I'm not sure if we really want references to MediaWiki here. Also, I do not like "not render or display properly in it", as the case is actually that is is a workaround for broken sites, not just sites that do not look good. WebKit/qt/Api/qwebsettings.h:77 + SiteSpecificQuirksModeEnabled We might want a more understanding setting, Let's see what Simon says. Apart from that, the idea is fine. R- due to semi-optimal documentation.
Dawit A.
Comment 15 2010-06-08 11:54:21 PDT
Created attachment 58165 [details] Patch - rev. #2 Fixed the attribute documentation based on review in comment #14...
Kenneth Rohde Christiansen
Comment 16 2010-06-08 12:13:15 PDT
Comment on attachment 58165 [details] Patch - rev. #2 r=me, as we can still change the name etc before cherry-picking this change.
Antonio Gomes
Comment 17 2010-06-08 12:18:09 PDT
no commit message? should be the same as in ChangeLog. > diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp > index a5fc794..9631f05 100644 > --- a/WebKit/qt/Api/qwebsettings.cpp > +++ b/WebKit/qt/Api/qwebsettings.cpp > + \value SiteSpecificQuirksModeEnabled This setting enables WebKit's workaround for broken sites. It is > + enabled by default. I do not think it is about WebKit workarounds. CSS Quirk Mode is a way that browsers (not only WebKit) support the old and broken CSS use that works for IE6 and family. http://www.quirksmode.org/css/quirksmode.html You are not mentioning about CSS in the setting name. Should you? or at least in the documentation. It is a CSS Mode and has Quirk and Strict modes. I would not commit it as is :-( due to the documentation and the setting name.
Kenneth Rohde Christiansen
Comment 18 2010-06-08 12:47:10 PDT
Safari has it enabled by default and there is a menu for disabling it Safari->Develop->Disable Site-Specific Hacks Antonio, this has nothing to do with CSS Quirks and Strict mode, but are work around for broken sites.
Kenneth Rohde Christiansen
Comment 19 2010-06-08 12:49:43 PDT
(In reply to comment #18) > Safari has it enabled by default and there is a menu for disabling it > > Safari->Develop->Disable Site-Specific Hacks > > Antonio, this has nothing to do with CSS Quirks and Strict mode, but are work around for broken sites. I guess the QuicksMode in the name is confusing and maybe we should go for SiteSpecificHacksEnabled instead ? Let me cq-
Alexey Proskuryakov
Comment 20 2010-06-08 12:50:19 PDT
The reason to have a way to disable these workarounds is to give developers of those specific sites a way to test how their sites would work without the workarounds. Users never need to disable these workarounds.
Kenneth Rohde Christiansen
Comment 21 2010-06-11 18:44:18 PDT
Comment on attachment 58165 [details] Patch - rev. #2 Can you supply a new patch where this is renamed QWebSettings:SiteSpecificQuirksEnabled due remove the Mode; then I will re-review.
Dawit A.
Comment 22 2010-06-11 22:33:25 PDT
Created attachment 58541 [details] Patch - rev. #3 Renamed attribute to 'SiteSpecificQuirksEnabled' as requested...
Dawit A.
Comment 23 2010-06-11 22:49:14 PDT
(In reply to comment #21) > (From update of attachment 58165 [details]) > Can you supply a new patch where this is renamed QWebSettings:SiteSpecificQuirksEnabled due remove the Mode; then I will re-review. Done... Note that this version will not cleanly apply to the trunk version of qtwebkit since a new WebGLEnabled option is present there.
Kenneth Rohde Christiansen
Comment 24 2010-06-12 04:30:24 PDT
Can you supply a version that will?
Dawit A.
Comment 25 2010-06-12 09:13:23 PDT
Created attachment 58553 [details] Same patch vs trunk... Patch against the current trunk version of webkit...
WebKit Commit Bot
Comment 26 2010-06-12 11:05:21 PDT
Comment on attachment 58553 [details] Same patch vs trunk... Clearing flags on attachment: 58553 Committed r61064: <http://trac.webkit.org/changeset/61064>
Simon Hausmann
Comment 27 2010-06-13 14:15:51 PDT
Dawit, are you saying that in the KDE webkit integration you need to disable these site specific quirks, because of the user agent that you're sending?
Dawit A.
Comment 28 2010-06-13 15:02:48 PDT
(In reply to comment #27) > Dawit, are you saying that in the KDE webkit integration you need to disable these site specific quirks, because of the user agent that you're sending? Nope. This is not a KDE webkit specific issue. It is a QtWebKit bug that affects all QtWebKit based browser. See comments #1-3 above...
Simon Hausmann
Comment 29 2010-06-15 01:22:23 PDT
(In reply to comment #28) > (In reply to comment #27) > > Dawit, are you saying that in the KDE webkit integration you need to disable these site specific quirks, because of the user agent that you're sending? > > Nope. This is not a KDE webkit specific issue. It is a QtWebKit bug that affects all QtWebKit based browser. See comments #1-3 above... Right, but what I'd like to find out _who_ is going to use this web setting and disable the site specific quirks?
Antonio Gomes
Comment 30 2010-06-15 06:11:24 PDT
(In reply to comment #29) > (In reply to comment #28) > > (In reply to comment #27) > > > Dawit, are you saying that in the KDE webkit integration you need to disable these site specific quirks, because of the user agent that you're sending? > > > > Nope. This is not a KDE webkit specific issue. It is a QtWebKit bug that affects all QtWebKit based browser. See comments #1-3 above... > > Right, but what I'd like to find out _who_ is going to use this web setting and disable the site specific quirks? that is a good question. why to disable it at all or why its value in Settings.cpp|h is not true by default already? fwiw, mac, win, gtk and chromium ports also have this setting as a public api.
Dawit A.
Comment 31 2010-06-15 06:30:49 PDT
(In reply to comment #29) > (In reply to comment #28) > > (In reply to comment #27) > > > Dawit, are you saying that in the KDE webkit integration you need to disable these site specific quirks, because of the user agent that you're sending? > > > > Nope. This is not a KDE webkit specific issue. It is a QtWebKit bug that affects all QtWebKit based browser. See comments #1-3 above... > > Right, but what I'd like to find out _who_ is going to use this web setting and disable the site specific quirks? Developers. The patch is implemented that way because other browsers provide a means of enabling/disabling this feature. See comment #18 and comment #20. It is only applicable to developers...
Kenneth Rohde Christiansen
Comment 32 2010-06-15 06:36:29 PDT
Site authors of sites currently affected by quirks who want to make their site standard compliant.
Simon Hausmann
Comment 33 2010-06-16 04:36:42 PDT
Makes sense, thanks :) I'll swap the last two enums in qwebsettings.h to ensure binary compatibility when including it in the release branch.
Simon Hausmann
Comment 34 2010-06-16 04:54:00 PDT
Revision r61064 cherry-picked into qtwebkit-2.0 with commit 815815940c24badaefd9b4deeb1851534bd677e0
Simon Hausmann
Comment 35 2010-06-16 04:54:21 PDT
Note You need to log in before you can comment on or make changes to this bug.