[Webkit-unassigned] [Bug 51247] css attribute + child selector not updated properly when attribute change
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Dec 25 14:27:12 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=51247
arno. <arno at renevier.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #77442| |review?
Flag| |
--- Comment #1 from arno. <arno at renevier.net> 2010-12-25 14:27:12 PST ---
Created an attachment (id=77442)
--> (https://bugs.webkit.org/attachment.cgi?id=77442&action=review)
patch v1
Actually, what happen is:
when document()->styleSelector()->hasSelectorForAttribute is called in Element::recalcStyleIfNeededAfterAttributeChanged, m_selectorAttrs does not contain the attribute if attribute selector is followed by a relation selector.
It probably has something to do with bug #7492
I don't understand why attribute name is added to m_selectorAttrs only if
(elementStyle && (!e->isStyledElement() || (!static_cast<StyledElement*>(e)->isMappedAttribute(attr) && attr != typeAttr && attr != readonlyAttr)))
In the case of an attribute selector followed by a relation selector, checkOneSelector is called whith a null elementStyle argument, so attribute name is not added to hashset.
If I, once an attribute selector is detected, I add attribute name to m_selectorAttrs unconditionally, the testcase works, and it looks like I don't break anything (but I did not manage to run the full layout tests properly).
Here is a patch proposal. Feel free to comment on it, so I can work more on it if needed.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list