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

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

Issue 2692993003: Invalidate throttling-related dirty bits when changing cross-origin status. (Closed)
Patch Set: none Created 3 years, 10 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: 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 641b2a0d86fb9a82a67cadc97abd57c5274632fe..12a869f3d0db11b7116547a95fa26004ae036169 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4753,8 +4753,16 @@ void FrameView::updateRenderThrottlingStatusForTesting() {
m_visibilityObserver->deliverObservationsForTesting();
}
+void FrameView::crossOriginStatusChanged() {
+ // Cross-domain status is not stored as a dirty bit within FrameView,
+ // so force-invalidate throttling status when it changes regardless of
+ // previous or new value.
+ updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled, true);
+}
+
void FrameView::updateRenderThrottlingStatus(bool hidden,
- bool subtreeThrottled) {
+ bool subtreeThrottled,
+ bool forceThrottlingInvalidation) {
TRACE_EVENT0("blink", "FrameView::updateRenderThrottlingStatus");
DCHECK(!isInPerformLayout());
DCHECK(!m_frame->document() || !m_frame->document()->inStyleRecalc());
@@ -4775,7 +4783,7 @@ void FrameView::updateRenderThrottlingStatus(bool hidden,
// paint one of the children with an out-of-date layout before
// |updateRenderThrottlingStatus| has made it throttled or 2) fail to
// unthrottle a child whose parent is unthrottled by a later notification.
- if (wasThrottled != isThrottled) {
+ if (wasThrottled != isThrottled || forceThrottlingInvalidation) {
for (const Member<Widget>& child : *children()) {
if (child->isFrameView()) {
FrameView* childView = toFrameView(child);
@@ -4786,7 +4794,7 @@ void FrameView::updateRenderThrottlingStatus(bool hidden,
}
ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
- if (becameUnthrottled) {
+ if (becameUnthrottled || forceThrottlingInvalidation) {
// ScrollingCoordinator needs to update according to the new throttling
// status.
if (scrollingCoordinator)
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698