[Webkit-unassigned] [Bug 91058] New: Modifying an attribute for which there is a selector in html.css does not cause a style recalc
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 12 01:33:32 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=91058
Summary: Modifying an attribute for which there is a selector
in html.css does not cause a style recalc
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: falken at chromium.org
CC: ojan at chromium.org
Blocks: 90931
Modifying an attribute for which there is a selector in html.css does not initially cause a style recalc. But once a recalc is forced (e.g., by zooming in/out or opening debug console), modifying the attribute thereafter will cause the style recalc to happen.
In practice, the bug does not occur in Safari, but it does occur when the layout tests are run. The bug occurs on Chromium in the browser itself and layout tests.
I believe the problem is the Document's StyleResolver does not yet have m_features.attrsInRules populated, so the code in Element::attributeChanged doesn't cause a style recalc. Once the recalc is forced (as mentioned above), the attributeChanged will trigger the recalc.
I discovered this in the patch for bug 90931 (https://bug-90931-attachments.webkit.org/attachment.cgi?id=151653). I tried to come up with a simpler test case, but it seems the relevant attributes in html.css already have special code to trigger a recalc. For example, iframe seamless has code in HTMLIFrameElement::parseAttribute:
// If we're adding or removing the seamless attribute, we need to force the content document to recalculate its StyleResolver.
if (contentDocument())
contentDocument()->styleResolverChanged(DeferRecalcStyle);
I'll see if I can create a simpler test case apart from bug 90931 later.
--
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