Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Unified Diff: Source/core/frame/FrameView.cpp

Issue 1329553004: Add a FOUC painting test. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Clean up. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index cdfa3a72851e8005b125f67f28d907238286c97d..3c4bbc39cf2ec2546c435aeaa4cc6a0f10dd76c8 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -108,6 +108,8 @@ using namespace HTMLNames;
static const unsigned maxUpdateWidgetsIterations = 2;
static const double resourcePriorityUpdateDelayAfterScroll = 0.250;
+static bool s_initialTrackAllPaintInvalidations = false;
+
FrameView::FrameView(LocalFrame* frame)
: m_frame(frame)
, m_displayMode(WebDisplayModeBrowser)
@@ -206,7 +208,7 @@ void FrameView::reset()
m_safeToPropagateScrollToParent = true;
m_lastViewportSize = IntSize();
m_lastZoomFactor = 1.0f;
- m_isTrackingPaintInvalidations = false;
+ m_isTrackingPaintInvalidations = s_initialTrackAllPaintInvalidations;
m_trackedPaintInvalidationRects.clear();
m_lastPaintTime = 0;
m_isPainting = false;
@@ -1654,14 +1656,6 @@ void FrameView::contentRectangleForPaintInvalidation(const IntRect& rectInConten
{
ASSERT(!m_frame->ownerLayoutObject());
- if (m_isTrackingPaintInvalidations) {
- m_trackedPaintInvalidationRects.append(contentsToFrame(rectInContent));
- // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangleForPaint
- // is going away entirely once all layout tests are FCM. In the short
- // term, no code should be tracking non-composited FrameView paint invalidations.
- RELEASE_ASSERT_NOT_REACHED();
- }
-
IntRect paintRect = rectInContent;
if (clipsPaintInvalidations())
paintRect.intersect(visibleContentRect());
@@ -2823,6 +2817,11 @@ IntPoint FrameView::convertFromContainingView(const IntPoint& parentPoint) const
return parentPoint;
}
+void FrameView::setInitialTracksPaintInvalidationsForUnitTestsOnly(bool trackPaintInvalidations)
+{
+ s_initialTrackAllPaintInvalidations = trackPaintInvalidations;
+}
+
void FrameView::setTracksPaintInvalidations(bool trackPaintInvalidations)
{
if (trackPaintInvalidations == m_isTrackingPaintInvalidations)

Powered by Google App Engine
This is Rietveld 408576698