Changeset 117026 in webkit
- Timestamp:
- May 14, 2012, 9:36:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/frames/seamless/seamless-css-cascade-expected.txt (modified) (1 diff)
-
LayoutTests/fast/frames/seamless/seamless-css-cascade.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLIFrameElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117024 r117026 1 2012-05-14 Eric Seidel <eric@webkit.org> 2 3 Styles are not recalculated when the seamless attribute is dynamically added/removed 4 https://bugs.webkit.org/show_bug.cgi?id=86315 5 6 Reviewed by Andreas Kling. 7 8 Add a subtest to cover this case. 9 10 * fast/frames/seamless/seamless-css-cascade-expected.txt: 11 * fast/frames/seamless/seamless-css-cascade.html: 12 1 13 2012-05-14 Kent Tamura <tkent@chromium.org> 2 14 -
trunk/LayoutTests/fast/frames/seamless/seamless-css-cascade-expected.txt
r116694 r117026 6 6 PASS window.getComputedStyle(rootElement).color is "rgb(1, 2, 3)" 7 7 PASS window.getComputedStyle(one).color is "rgb(3, 2, 1)" 8 PASS window.getComputedStyle(one).color is "rgb(0, 0, 0)" 9 PASS window.getComputedStyle(two).color is "rgb(128, 0, 128)" 10 PASS window.getComputedStyle(three).color is "rgb(0, 0, 0)" 8 11 -
trunk/LayoutTests/fast/frames/seamless/seamless-css-cascade.html
r115742 r117026 43 43 // #one's style is only specified by this parent, so adding a later sheet should override the color and update the child frame. 44 44 shouldBeEqualToString("window.getComputedStyle(one).color", "rgb(3, 2, 1)"); 45 46 // Test that removing the seamless attribute recalculates the child's style. 47 window.iframe.removeAttribute("seamless"); 48 shouldBeEqualToString("window.getComputedStyle(one).color", "rgb(0, 0, 0)"); // black, default. 49 shouldBeEqualToString("window.getComputedStyle(two).color", "rgb(128, 0, 128)"); // purple, selector in child. 50 shouldBeEqualToString("window.getComputedStyle(three).color", "rgb(0, 0, 0)"); // black, default. 45 51 } 46 52 </script> -
trunk/Source/WebCore/ChangeLog
r117022 r117026 1 2012-05-14 Eric Seidel <eric@webkit.org> 2 3 Styles are not recalculated when the seamless attribute is dynamically added/removed 4 https://bugs.webkit.org/show_bug.cgi?id=86315 5 6 Reviewed by Andreas Kling. 7 8 Covered by fast/frames/seamless/seamless-css-cascade.html. 9 10 * html/HTMLIFrameElement.cpp: 11 (WebCore::HTMLIFrameElement::isPresentationAttribute): 12 - Make seamless a presentational attribute, which means style on the <iframe> will 13 be forced to recalculate when it changes. This is correct, but not observable 14 until the layout changes are landed (as then the iframe should correctly revert to not 15 being sized to fit its content if seamless is removed). 16 (WebCore::HTMLIFrameElement::parseAttribute): 17 - When the seamless attribute is added or remove, force the content document to recalc 18 its style resolver, which will refresh the list of inherited stylesheets from the 19 parent. This doesn't need to happen synchronously. When the layout changes land 20 the content document will actually cause that recalc to redirect to the parent document 21 in the seamless case anyway, but it's more correct to ask the content document directly. 22 1 23 2012-05-14 Alexandre Elias <aelias@google.com> 2 24 -
trunk/Source/WebCore/html/HTMLIFrameElement.cpp
r116694 r117026 52 52 bool HTMLIFrameElement::isPresentationAttribute(const QualifiedName& name) const 53 53 { 54 if (name == widthAttr || name == heightAttr || name == alignAttr || name == frameborderAttr )54 if (name == widthAttr || name == heightAttr || name == alignAttr || name == frameborderAttr || name == seamlessAttr) 55 55 return true; 56 56 return HTMLFrameElementBase::isPresentationAttribute(name); … … 88 88 } else if (attr->name() == sandboxAttr) 89 89 setSandboxFlags(attr->isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(attr->value())); 90 else 90 else if (attr->name() == seamlessAttr) { 91 // If we're adding or removing the seamless attribute, we need to force the content document to recalculate its StyleResolver. 92 if (contentDocument()) 93 contentDocument()->styleResolverChanged(DeferRecalcStyle); 94 } else 91 95 HTMLFrameElementBase::parseAttribute(attr); 92 96 }
Note:
See TracChangeset
for help on using the changeset viewer.