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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2803013005: Deduplicating compositing scrollingCoordinator helper (Closed)
Patch Set: Rebased post blink rename Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 928cee186db1a94e3ed147303b1a3329c249bab8..a6e5064a172b36c5cab3cbdbc1570505246314a0 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -185,9 +185,8 @@ PaintLayer::~PaintLayer() {
}
rare_data_->resource_info->ClearLayer();
}
- if (GetLayoutObject().GetFrame() && GetLayoutObject().GetFrame()->GetPage()) {
- if (ScrollingCoordinator* scrolling_coordinator =
- GetLayoutObject().GetFrame()->GetPage()->GetScrollingCoordinator())
+ if (GetLayoutObject().GetFrame()) {
+ if (ScrollingCoordinator* scrolling_coordinator = GetScrollingCoordinator())
scrolling_coordinator->WillDestroyLayer(this);
}
@@ -2749,6 +2748,11 @@ bool PaintLayer::PaintsWithTransform(
GetCompositingState() != kPaintsIntoOwnBacking);
}
+ScrollingCoordinator* PaintLayer::GetScrollingCoordinator() {
+ Page* page = GetLayoutObject().GetFrame()->GetPage();
+ return (!page) ? nullptr : page->GetScrollingCoordinator();
+}
+
bool PaintLayer::CompositesWithTransform() const {
return TransformAncestor() || Transform();
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698