| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index ad346da065928dcb4393a5afbb7c84d41e3705a3..4c874b134896c4dfe83fa68e9e5d52cc394faa22 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -87,7 +87,6 @@
|
| #include "core/svg/SVGSVGElement.h"
|
| #include "platform/Histogram.h"
|
| #include "platform/HostWindow.h"
|
| -#include "platform/JSONValues.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/ScriptForbiddenScope.h"
|
| #include "platform/TraceEvent.h"
|
| @@ -134,6 +133,7 @@
|
| , m_baseBackgroundColor(Color::white)
|
| , m_mediaType(MediaTypeNames::screen)
|
| , m_safeToPropagateScrollToParent(true)
|
| + , m_isTrackingPaintInvalidations(false)
|
| , m_scrollCorner(nullptr)
|
| , m_stickyPositionObjectCount(0)
|
| , m_inputEventsScaleFactorForEmulation(1)
|
| @@ -220,7 +220,7 @@
|
| m_safeToPropagateScrollToParent = true;
|
| m_lastViewportSize = IntSize();
|
| m_lastZoomFactor = 1.0f;
|
| - m_trackedObjectPaintInvalidations = adoptPtr(s_initialTrackAllPaintInvalidations ? new Vector<ObjectPaintInvalidation> : nullptr);
|
| + m_isTrackingPaintInvalidations = s_initialTrackAllPaintInvalidations;
|
| m_visuallyNonEmptyCharacterCount = 0;
|
| m_visuallyNonEmptyPixelCount = 0;
|
| m_isVisuallyNonEmpty = false;
|
| @@ -383,7 +383,7 @@
|
| layoutObject->borderTop() + layoutObject->paddingTop());
|
| // FIXME: We should not allow paint invalidation out of paint invalidation state. crbug.com/457415
|
| DisablePaintInvalidationStateAsserts paintInvalidationAssertDisabler;
|
| - layoutObject->invalidatePaintRectangle(LayoutRect(paintInvalidationRect));
|
| + layoutObject->invalidatePaintRectangleNotInvalidatingDisplayItemClients(LayoutRect(paintInvalidationRect));
|
| }
|
|
|
| void FrameView::setFrameRect(const IntRect& newRect)
|
| @@ -2936,44 +2936,22 @@
|
|
|
| void FrameView::setTracksPaintInvalidations(bool trackPaintInvalidations)
|
| {
|
| - if (trackPaintInvalidations == isTrackingPaintInvalidations())
|
| + if (trackPaintInvalidations == m_isTrackingPaintInvalidations)
|
| return;
|
|
|
| for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().traverseNext()) {
|
| if (!frame->isLocalFrame())
|
| continue;
|
| if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()) {
|
| - layoutView.frameView()->m_trackedObjectPaintInvalidations = adoptPtr(trackPaintInvalidations ? new Vector<ObjectPaintInvalidation> : nullptr);
|
| + layoutView.frameView()->m_isTrackingPaintInvalidations = trackPaintInvalidations;
|
| layoutView.compositor()->setTracksPaintInvalidations(trackPaintInvalidations);
|
| }
|
| }
|
|
|
| TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"),
|
| "FrameView::setTracksPaintInvalidations", TRACE_EVENT_SCOPE_GLOBAL, "enabled", trackPaintInvalidations);
|
| -}
|
| -
|
| -void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, PaintInvalidationReason reason)
|
| -{
|
| - if (!m_trackedObjectPaintInvalidations)
|
| - return;
|
| -
|
| - ObjectPaintInvalidation invalidation = { client.debugName(), reason };
|
| - m_trackedObjectPaintInvalidations->append(invalidation);
|
| -}
|
| -
|
| -PassRefPtr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const
|
| -{
|
| - if (!m_trackedObjectPaintInvalidations || m_trackedObjectPaintInvalidations->isEmpty())
|
| - return nullptr;
|
| -
|
| - RefPtr<JSONArray> result = JSONArray::create();
|
| - for (const auto& item : *m_trackedObjectPaintInvalidations) {
|
| - RefPtr<JSONObject> itemJSON = JSONObject::create();
|
| - itemJSON->setString("object", item.name);
|
| - itemJSON->setString("reason", paintInvalidationReasonToString(item.reason));
|
| - result->pushObject(itemJSON);
|
| - }
|
| - return result;
|
| +
|
| + m_isTrackingPaintInvalidations = trackPaintInvalidations;
|
| }
|
|
|
| void FrameView::addResizerArea(LayoutBox& resizerBox)
|
|
|