Skip to content

Commit

Permalink
Merge r185858 - ASSERT(!m_zOrderListsDirty) when mousing over web vie…
Browse files Browse the repository at this point in the history
…w with incremental rendering suppressed

https://bugs.webkit.org/show_bug.cgi?id=146225

Reviewed by Zalan Bujtas.

Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
been updated; this happens to work most of the time because painting updates them,
but if incremental rendering is suppressed, we may not have painted yet.

Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
dirty bits is cheaper than calling isStackingContext().
  • Loading branch information
smfr authored and carlosgcampos committed Jul 7, 2015
1 parent dab754b commit 80abc31
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
2015-06-22 Simon Fraser <simon.fraser@apple.com>

ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
https://bugs.webkit.org/show_bug.cgi?id=146225

Reviewed by Zalan Bujtas.

Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
been updated; this happens to work most of the time because painting updates them,
but if incremental rendering is suppressed, we may not have painted yet.

Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
dirty bits is cheaper than calling isStackingContext().

2015-06-22 Zalan Bujtas <zalan@apple.com>

REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
Expand Down
4 changes: 3 additions & 1 deletion Source/WebCore/rendering/RenderLayer.cpp
Expand Up @@ -4777,6 +4777,8 @@ bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
{
ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
ASSERT(!renderer().view().needsLayout());

updateLayerListsIfNeeded();

LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? downcast<RenderFlowThread>(renderer()).visualOverflowRect() : renderer().view().documentRect();
if (!request.ignoreClipping())
Expand Down Expand Up @@ -6239,7 +6241,7 @@ void RenderLayer::collectLayers(bool includeHiddenLayers, CollectLayersBehavior

void RenderLayer::updateLayerListsIfNeeded()
{
bool shouldUpdateDescendantsAreContiguousInStackingOrder = isStackingContext() && (m_zOrderListsDirty || m_normalFlowListDirty);
bool shouldUpdateDescendantsAreContiguousInStackingOrder = (m_zOrderListsDirty || m_normalFlowListDirty) && isStackingContext();
updateZOrderLists();
updateNormalFlowList();

Expand Down

0 comments on commit 80abc31

Please sign in to comment.