Title: [256883] trunk/Source/WebCore
- Revision
- 256883
- Author
- za...@apple.com
- Date
- 2020-02-18 16:31:46 -0800 (Tue, 18 Feb 2020)
Log Message
[First paint] Remove elementOverflowRectIsLargerThanThreshold check in qualifiesAsVisuallyNonEmpty
https://bugs.webkit.org/show_bug.cgi?id=207907
<rdar://problem/59562169>
Reviewed by Geoffrey Garen.
This is in preparation for being able to qualify for visually non-empty content without looking at geometry.
This check was added long ago, initially with a 200px value which got reduced to 48px to reduce painting latency on google search result page.
At this point a 48px threshold does not make too much sense.
* page/FrameView.cpp:
(WebCore::FrameView::qualifiesAsSignificantRenderedText const):
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
(WebCore::elementOverflowRectIsLargerThanThreshold): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (256882 => 256883)
--- trunk/Source/WebCore/ChangeLog 2020-02-19 00:21:49 UTC (rev 256882)
+++ trunk/Source/WebCore/ChangeLog 2020-02-19 00:31:46 UTC (rev 256883)
@@ -1,3 +1,20 @@
+2020-02-18 Zalan Bujtas <za...@apple.com>
+
+ [First paint] Remove elementOverflowRectIsLargerThanThreshold check in qualifiesAsVisuallyNonEmpty
+ https://bugs.webkit.org/show_bug.cgi?id=207907
+ <rdar://problem/59562169>
+
+ Reviewed by Geoffrey Garen.
+
+ This is in preparation for being able to qualify for visually non-empty content without looking at geometry.
+ This check was added long ago, initially with a 200px value which got reduced to 48px to reduce painting latency on google search result page.
+ At this point a 48px threshold does not make too much sense.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::qualifiesAsSignificantRenderedText const):
+ (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
+ (WebCore::elementOverflowRectIsLargerThanThreshold): Deleted.
+
2020-02-18 Daniel Bates <daba...@apple.com>
Ask the EditorClient whether to reveal the current selection after insertion
Modified: trunk/Source/WebCore/page/FrameView.cpp (256882 => 256883)
--- trunk/Source/WebCore/page/FrameView.cpp 2020-02-19 00:21:49 UTC (rev 256882)
+++ trunk/Source/WebCore/page/FrameView.cpp 2020-02-19 00:31:46 UTC (rev 256883)
@@ -4387,17 +4387,6 @@
++m_textRendererCountForVisuallyNonEmptyCharacters;
}
-static bool elementOverflowRectIsLargerThanThreshold(const Element& element)
-{
- // Require the document to grow a bit.
- // Using a value of 48 allows the header on Google's search page to render immediately before search results populate later.
- static const int documentHeightThreshold = 48;
- if (auto* elementRenderBox = element.renderBox())
- return snappedIntRect(elementRenderBox->layoutOverflowRect()).height() >= documentHeightThreshold;
-
- return false;
-}
-
void FrameView::updateHasReachedSignificantRenderedTextThreshold()
{
if (m_hasReachedSignificantRenderedTextThreshold)
@@ -4430,11 +4419,6 @@
auto* document = frame().document();
if (!document || document->styleScope().hasPendingSheetsBeforeBody())
return false;
-
- auto* documentElement = document->documentElement();
- if (!documentElement || !elementOverflowRectIsLargerThanThreshold(*documentElement))
- return false;
-
return m_hasReachedSignificantRenderedTextThreshold;
}
@@ -4468,9 +4452,6 @@
if (!isVisible(frame().document()->body()))
return false;
- if (!elementOverflowRectIsLargerThanThreshold(*documentElement))
- return false;
-
// The first few hundred characters rarely contain the interesting content of the page.
if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold)
return true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes