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

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

Issue 1652313003: [SPv2] Hookup overflow clip/scroll property nodes for normal flow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chunk_property_hookup_4
Patch Set: rebase Created 4 years, 9 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/BoxClipper.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/BoxClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxClipper.cpp b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
index 6edead0543fa4263f628977fb828d2feadbb6137..ec86a5afd8ca6a5156ffbf3ea669aacaa45ea4fd 100644
--- a/third_party/WebKit/Source/core/paint/BoxClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
@@ -5,6 +5,7 @@
#include "core/paint/BoxClipper.h"
#include "core/layout/LayoutBox.h"
+#include "core/paint/ObjectPaintProperties.h"
#include "core/paint/PaintInfo.h"
#include "core/paint/PaintLayer.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -24,6 +25,16 @@ BoxClipper::BoxClipper(const LayoutBox& box, const PaintInfo& paintInfo, const L
if (m_paintInfo.phase == PaintPhaseMask)
return;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ const auto* objectProperties = m_box.objectPaintProperties();
+ if (objectProperties && objectProperties->overflowClip()) {
+ PaintChunkProperties properties(paintInfo.context.paintController().currentPaintChunkProperties());
+ properties.clip = objectProperties->overflowClip();
+ m_scopedClipProperty.emplace(paintInfo.context.paintController(), properties);
+ }
+ return;
+ }
+
bool isControlClip = m_box.hasControlClip();
bool isOverflowOrContainmentClip = (m_box.hasOverflowClip() && !m_box.layer()->isSelfPaintingLayer())
|| m_box.style()->containsPaint();
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxClipper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698