WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-178546-20171019152652.patch (text/plain), 3.44 KB, created by
alan
on 2017-10-19 15:26:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2017-10-19 15:26:52 PDT
Size:
3.44 KB
patch
obsolete
>Subversion Revision: 223712 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e247201cc23b6780ba312f9e0d73e28ceb7bc7e0..d0bcd2c049a3d96ecf4072277a7ebde9b8c6f6af 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,21 @@ > 2017-10-19 Zalan Bujtas <zalan@apple.com> > >+ [FrameView::layout cleanup] Move can-enter-layout logic to a separate function >+ https://bugs.webkit.org/show_bug.cgi?id=178546 >+ <rdar://problem/35083894> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No change in functionality. >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::canPerformLayout const): >+ (WebCore::FrameView::layout): We already assert on certain reentrancy conditions, loggig the reason >+ does not seem to have high value. >+ * page/FrameView.h: >+ >+2017-10-19 Zalan Bujtas <zalan@apple.com> >+ > [FrameView::layout cleanup] Move scrollbars setup logic to a separate function > https://bugs.webkit.org/show_bug.cgi?id=178394 > <rdar://problem/35031066> >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index e4e300ec773d273166d8f17b95c4181ac7432c9d..d60f73918fdf41d12ae99df288adb8e3583f7cd7 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -1362,28 +1362,35 @@ void FrameView::adjustScrollbarsForLayout(bool isFirstLayout) > setScrollbarModes(hMode, vMode); > } > >-void FrameView::layout(bool allowSubtreeLayout) >+bool FrameView::canPerformLayout() const > { >- ASSERT_WITH_SECURITY_IMPLICATION(!frame().document()->inRenderTreeUpdate()); >+ if (isInRenderTreeLayout()) >+ return false; > >- LOG(Layout, "FrameView %p (%dx%d) layout, main frameview %d, allowSubtreeLayout=%d", this, size().width(), size().height(), frame().isMainFrame(), allowSubtreeLayout); >- if (isInRenderTreeLayout()) { >- LOG(Layout, " in render tree layout, bailing"); >- return; >- } >+ if (layoutDisallowed()) >+ return false; > >- if (layoutDisallowed()) { >- LOG(Layout, " is disallowed, bailing"); >- return; >- } >+ if (isPainting()) >+ return false; >+ >+ if (!m_subtreeLayoutRoot && !frame().document()->renderView()) >+ return false; >+ >+ return true; >+} >+ >+void FrameView::layout(bool allowSubtreeLayout) >+{ >+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!frame().document()->inRenderTreeUpdate()); > ASSERT(!isPainting()); >- if (isPainting()) { >- LOG(Layout, " in painting, bailing"); >- return; >- } > ASSERT(frame().view() == this); > ASSERT(frame().document()); > ASSERT(frame().document()->pageCacheState() == Document::NotInPageCache); >+ >+ if (!canPerformLayout()) { >+ LOG(Layout, " is not allowed, bailing"); >+ return; >+ } > // Protect the view from being deleted during layout (in recalcStyle). > Ref<FrameView> protectedThis(*this); > TraceScope tracingScope(LayoutStart, LayoutEnd); >diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h >index a2711b0d31c8d5933c388022fd4446dd87d38d3f..9738a89a6338e4c106021dd2cc9cb7e0239e4ed4 100644 >--- a/Source/WebCore/page/FrameView.h >+++ b/Source/WebCore/page/FrameView.h >@@ -767,6 +767,7 @@ private: > bool isFrameFlatteningValidForThisFrame() const; > > void markRootOrBodyRendererDirty() const; >+ bool canPerformLayout() const; > > bool qualifiesAsVisuallyNonEmpty() const; > bool isViewForDocumentInFrame() const;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 178546
: 324300