Summary: | [Qt] tst_QWebElement::style() fails because QWebElement::InlineStyle now works as expected | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ademar Reis <ademar> | ||||||
Component: | WebKit Qt | Assignee: | Jocelyn Turcotte <jturcotte> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abecsi, cmarcelo, commit-queue, jturcotte, ossy, rafael.lobo, tonikitoo | ||||||
Priority: | P2 | Keywords: | Qt | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 38654 | ||||||||
Attachments: |
|
Description
Ademar Reis
2011-05-06 07:34:57 PDT
From WebCore::CSSMutableStyleDeclaration::setProperty(): """ // When replacing an existing property value, this moves the property to the end of the list. """ (it also says "Firefox preserves the position, and MSIE moves the property to the beginning", but that's not relevant for this bug) In the testing code, we set the property twice for the same element: p.setStyleProperty("color", "green !important"); ... p.setStyleProperty("color", "blue"); ... So when we call styleProperty(QWebElement::InlineStyle) after the second setStyleProperty(), there are two inline styles and we get the one with high priority. In summary, the implementation is right and the test is wrong, so it's just a matter or reverting the previous "fix". Reopening, please ignore my previous round of comments. :-P I'll make sure my patch includes better documentation to avoid more confusion. Created attachment 94212 [details]
mark failing test case as expected fail
Comment on attachment 94212 [details]
mark failing test case as expected fail
LGTM. Fixing this will take some more time (time that I don't have at the moment) :(
Comment on attachment 94212 [details] mark failing test case as expected fail Clearing flags on attachment: 94212 Committed r86953: <http://trac.webkit.org/changeset/86953> All reviewed patches have been landed. Closing bug. Reopen to fix it. Revision r86953 cherry-picked into qtwebkit-2.2 with commit b6ea329 <http://gitorious.org/webkit/qtwebkit/commit/b6ea329> Ademar was right in comment #1, a non-important inline style shouldn't be overwritten by a non-important one. So InlineStyle doesn't apply inheritance, but does consider the importance. Created attachment 173313 [details]
Patch
Unmark the failure and fix the expected value.
Committed r134233: <http://trac.webkit.org/changeset/134233> |