Bug 102626
Summary: | Calling calculateCompositedBounds() inside recalcStyle() is bogus | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> |
Status: | ASSIGNED | ||
Severity: | Normal | CC: | bdakin, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 93542, 138179 | ||
Bug Blocks: |
Simon Fraser (smfr)
RenderLayerCompositor::requiresCompositingForPosition() calls calculateCompositedBounds() to determine if the layer is inside the viewport.
However, we haven't done layout yet, so it's crazy to ask for layer dimensions at this point.
We need to do this by setting the m_reevaluateCompositingAfterLayout flag and only doing it once layout is complete.
Here's the bad stack:
frame #6: 0x00000001045f7b0c WebCore`WebCore::RenderLayer::calculateLayerBounds(WebCore::RenderLayer const*, WebCore::LayoutPoint const*, unsigned int) const + 2172 at RenderLayer.cpp:4595
frame #7: 0x000000010462b8eb WebCore`WebCore::RenderLayerCompositor::calculateCompositedBounds(WebCore::RenderLayer const*, WebCore::RenderLayer const*) const + 75 at RenderLayerCompositor.cpp:681
frame #8: 0x000000010462f6ca WebCore`WebCore::RenderLayerCompositor::requiresCompositingForPosition(WebCore::RenderObject*, WebCore::RenderLayer const*) const + 426 at RenderLayerCompositor.cpp:1965
frame #9: 0x000000010462aac5 WebCore`WebCore::RenderLayerCompositor::requiresCompositingLayer(WebCore::RenderLayer const*) const + 373 at RenderLayerCompositor.cpp:1560
frame #10: 0x000000010462b3ed WebCore`WebCore::RenderLayerCompositor::needsToBeComposited(WebCore::RenderLayer const*) const + 77 at RenderLayerCompositor.cpp:1536
frame #11: 0x000000010462af99 WebCore`WebCore::RenderLayerCompositor::updateBacking(WebCore::RenderLayer*, WebCore::RenderLayerCompositor::CompositingChangeRepaint) + 57 at RenderLayerCompositor.cpp:538
frame #12: 0x000000010462b733 WebCore`WebCore::RenderLayerCompositor::updateLayerCompositingState(WebCore::RenderLayer*, WebCore::RenderLayerCompositor::CompositingChangeRepaint) + 35 at RenderLayerCompositor.cpp:624
frame #13: 0x000000010460c822 WebCore`WebCore::RenderLayer::styleChanged(WebCore::StyleDifference, WebCore::RenderStyle const*) + 802 at RenderLayer.cpp:5114
frame #14: 0x000000010463d54e WebCore`WebCore::RenderLayerModelObject::styleDidChange(WebCore::StyleDifference, WebCore::RenderStyle const*) + 558 at RenderLayerModelObject.cpp:160
frame #15: 0x000000010455e586 WebCore`WebCore::RenderBox::styleDidChange(WebCore::StyleDifference, WebCore::RenderStyle const*) + 70 at RenderBox.cpp:209
frame #16: 0x00000001044e4563 WebCore`WebCore::RenderBlock::styleDidChange(WebCore::StyleDifference, WebCore::RenderStyle const*) + 51 at RenderBlock.cpp:327
frame #17: 0x000000010467a8c2 WebCore`WebCore::RenderObject::setStyle(WTF::PassRefPtr<WebCore::RenderStyle>) + 1522 at RenderObject.cpp:1792
frame #18: 0x0000000104679faa WebCore`WebCore::RenderObject::setAnimatableStyle(WTF::PassRefPtr<WebCore::RenderStyle>) + 138 at RenderObject.cpp:1693
frame #19: 0x000000010388c42e WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1374 at Element.cpp:1262
frame #20: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #21: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #22: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #23: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #24: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #25: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #26: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #27: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #28: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #29: 0x000000010388c78f WebCore`WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 2239 at Element.cpp:1313
frame #30: 0x0000000103680c24 WebCore`WebCore::Document::recalcStyle(WebCore::Node::StyleChange) + 1156 at Document.cpp:1859
frame #31: 0x000000010367cd0c WebCore`WebCore::Document::updateStyleIfNeeded() + 396 at Document.cpp:1903
frame #32: 0x0000000103681379 WebCore`WebCore::Document::updateLayout() + 153 at Document.cpp:1926
frame #33: 0x00000001036814c5 WebCore`WebCore::Document::updateLayoutIgnorePendingStylesheets() + 197 at Document.cpp:1964
frame #34: 0x0000000103a950c2 WebCore`WebCore::HTMLBodyElement::scrollLeft() + 34 at HTMLBodyElement.cpp:262
frame #35: 0x0000000103eb883e WebCore`WebCore::jsElementScrollLeft(JSC::ExecState*, JSC::JSValue, JSC::PropertyName) + 78 at JSElement.cpp:387
frame #36: 0x00000001023193e9 JavaScriptCore`JSC::PropertySlot::getValue(JSC::ExecState*, JSC::PropertyName) const + 249 at PropertySlot.h:76
frame #37: 0x000000010232d0d2 JavaScriptCore`JSC::JSValue::get(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) const + 242 at JSObject.h:1465
frame #38: 0x00000001026f3451 JavaScriptCore`llint_slow_path_get_by_id + 241 at LLIntSlowPaths.cpp:917
frame #39: 0x00000001026fc874 JavaScriptCore`llint_op_get_by_id + 122
(lldb)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
See also bug 93542.