WebKit Bugzilla
Attachment 360139 Details for
Bug 193835
: Remove FrameView::m_firstVisuallyNonEmptyLayoutCallbackPending
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193835-20190125115440.patch (text/plain), 6.28 KB, created by
zalan
on 2019-01-25 11:54:46 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-25 11:54:46 PST
Size:
6.28 KB
patch
obsolete
>Subversion Revision: 240473 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 39302725576fd0599d8e932428e80834b562c5e3..e7534368602522b660edb200373fee7f772ed676 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2019-01-25 Zalan Bujtas <zalan@apple.com> >+ >+ Remove FrameView::m_firstVisuallyNonEmptyLayoutCallbackPending >+ https://bugs.webkit.org/show_bug.cgi?id=193835 >+ >+ Reviewed by Simon Fraser. >+ >+ Currently updateIsVisuallyNonEmpty() is called from fireLayoutRelatedMilestonesIfNeeded() and from the incrementVisually*() functions. >+ By calling it from incrementVisually*() and setting the m_isVisuallyNonEmpty flag to true early does not have any impact on when the milestone is fired. >+ The milestone firing, as part of the post-layout tasks is triggered by a subsequent layout. >+ However having multiple callers of updateIsVisuallyNonEmpty() requires an extra boolen (m_firstVisuallyNonEmptyLayoutCallbackPending) to maintain. >+ Also calling updateIsVisuallyNonEmpty() repeatedly could be costly (with the current threshold of 200 characters, I don't think it is though). >+ >+ This patch removes m_firstVisuallyNonEmptyLayoutCallbackPending and moves the logic from updateIsVisuallyNonEmpty() to fireLayoutRelatedMilestonesIfNeeded(). >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::resetLayoutMilestones): >+ (WebCore::FrameView::loadProgressingStatusChanged): >+ (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount): >+ (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded): >+ (WebCore::FrameView::updateIsVisuallyNonEmpty): Deleted. >+ * page/FrameView.h: >+ (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount): >+ > 2019-01-25 Antoine Quint <graouts@apple.com> > > Use ENABLE_POINTER_EVENTS for the touch-action property >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index 7ca56c19a217262ea4dca167608d61fc534087eb..4e37baa5c9ed4311f42ff40ac43cb2bb4991f026 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -293,7 +293,6 @@ void FrameView::resetLayoutMilestones() > { > m_firstLayoutCallbackPending = false; > m_isVisuallyNonEmpty = false; >- m_firstVisuallyNonEmptyLayoutCallbackPending = true; > m_significantRenderedTextMilestonePending = true; > m_renderedSignificantAmountOfText = false; > m_visuallyNonEmptyCharacterCount = 0; >@@ -2851,8 +2850,7 @@ void FrameView::disableLayerFlushThrottlingTemporarilyForInteraction() > > void FrameView::loadProgressingStatusChanged() > { >- auto hasPendingVisuallyNonEmptyCallback = m_firstVisuallyNonEmptyLayoutCallbackPending && !m_isVisuallyNonEmpty; >- if (hasPendingVisuallyNonEmptyCallback && frame().loader().isComplete()) >+ if (!m_isVisuallyNonEmpty && frame().loader().isComplete()) > fireLayoutRelatedMilestonesIfNeeded(); > updateLayerFlushThrottling(); > adjustTiledBackingCoverage(); >@@ -4389,7 +4387,7 @@ void FrameView::updateLayoutAndStyleIfNeededRecursive() > > void FrameView::incrementVisuallyNonEmptyCharacterCount(const String& inlineText) > { >- if (m_isVisuallyNonEmpty && m_renderedSignificantAmountOfText) >+ if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold && m_renderedSignificantAmountOfText) > return; > > ++m_textRendererCountForVisuallyNonEmptyCharacters; >@@ -4405,9 +4403,6 @@ void FrameView::incrementVisuallyNonEmptyCharacterCount(const String& inlineText > }; > m_visuallyNonEmptyCharacterCount += nonWhitespaceLength(inlineText); > >- if (!m_isVisuallyNonEmpty && m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) >- updateIsVisuallyNonEmpty(); >- > if (!m_renderedSignificantAmountOfText) > updateSignificantRenderedTextMilestoneIfNeeded(); > } >@@ -4520,16 +4515,6 @@ void FrameView::updateSignificantRenderedTextMilestoneIfNeeded() > m_renderedSignificantAmountOfText = true; > } > >-void FrameView::updateIsVisuallyNonEmpty() >-{ >- if (m_isVisuallyNonEmpty) >- return; >- if (!qualifiesAsVisuallyNonEmpty()) >- return; >- m_isVisuallyNonEmpty = true; >- adjustTiledBackingCoverage(); >-} >- > bool FrameView::isViewForDocumentInFrame() const > { > RenderView* renderView = this->renderView(); >@@ -5151,14 +5136,11 @@ void FrameView::fireLayoutRelatedMilestonesIfNeeded() > if (frame().isMainFrame()) > page->startCountingRelevantRepaintedObjects(); > } >- updateIsVisuallyNonEmpty(); > updateSignificantRenderedTextMilestoneIfNeeded(); > >- // If the layout was done with pending sheets, we are not in fact visually non-empty yet. >- if (m_isVisuallyNonEmpty && m_firstVisuallyNonEmptyLayoutCallbackPending) { >- m_firstVisuallyNonEmptyLayoutCallbackPending = false; >+ if (!m_isVisuallyNonEmpty && qualifiesAsVisuallyNonEmpty()) { >+ m_isVisuallyNonEmpty = true; > addPaintPendingMilestones(DidFirstMeaningfulPaint); >- > if (requestedMilestones & DidFirstVisuallyNonEmptyLayout) > milestonesAchieved.add(DidFirstVisuallyNonEmptyLayout); > } >diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h >index fd6995deebf55f13354c9c3194c19a61d413c6b1..e89bd8e97b2b786c558852583e684944ed64a4c4 100644 >--- a/Source/WebCore/page/FrameView.h >+++ b/Source/WebCore/page/FrameView.h >@@ -878,10 +878,9 @@ private: > OptionSet<PaintBehavior> m_paintBehavior; > bool m_isPainting; > >- unsigned m_visuallyNonEmptyCharacterCount; >- unsigned m_visuallyNonEmptyPixelCount; >- bool m_isVisuallyNonEmpty; >- bool m_firstVisuallyNonEmptyLayoutCallbackPending; >+ bool m_isVisuallyNonEmpty { false }; >+ unsigned m_visuallyNonEmptyCharacterCount { 0 }; >+ unsigned m_visuallyNonEmptyPixelCount { 0 }; > > unsigned m_textRendererCountForVisuallyNonEmptyCharacters { 0 }; > bool m_renderedSignificantAmountOfText; >@@ -952,12 +951,9 @@ private: > > inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) > { >- if (m_isVisuallyNonEmpty) >+ if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) > return; > m_visuallyNonEmptyPixelCount += size.width() * size.height(); >- if (m_visuallyNonEmptyPixelCount <= visualPixelThreshold) >- return; >- updateIsVisuallyNonEmpty(); > } > > } // namespace WebCore
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 193835
:
360135
| 360139