Index: third_party/WebKit/Source/core/paint/BlockPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp |
index 624d9f10fcf15f28cf637c4772e71eafbf30a16b..2af77d5b5d7e67f3ad967a21a80c0eaf5ba7243b 100644 |
--- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp |
@@ -18,6 +18,7 @@ |
#include "core/paint/InlinePainter.h" |
#include "core/paint/LayoutObjectDrawingRecorder.h" |
#include "core/paint/LineBoxListPainter.h" |
+#include "core/paint/ObjectPaintProperties.h" |
#include "core/paint/PaintInfo.h" |
#include "core/paint/PaintLayer.h" |
#include "core/paint/ScopeRecorder.h" |
@@ -166,9 +167,19 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa |
ObjectPainter(m_layoutBlock).addPDFURLRectIfNeeded(paintInfo, paintOffset); |
if (paintPhase != PaintPhaseSelfOutlineOnly) { |
+ Optional<ScopedPaintChunkProperties> m_scopedScrollProperty; |
Optional<ScrollRecorder> scrollRecorder; |
Optional<PaintInfo> scrolledPaintInfo; |
- if (m_layoutBlock.hasOverflowClip()) { |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
+ const auto* objectProperties = m_layoutBlock.objectPaintProperties(); |
+ if (auto* scrollTranslation = objectProperties ? objectProperties->scrollTranslation() : nullptr) { |
+ PaintChunkProperties properties(paintInfo.context.paintController().currentPaintChunkProperties()); |
+ properties.transform = scrollTranslation; |
+ m_scopedScrollProperty.emplace(paintInfo.context.paintController(), properties); |
+ scrolledPaintInfo.emplace(paintInfo); |
+ scrolledPaintInfo->updateCullRect(scrollTranslation->matrix().toAffineTransform()); |
jbroman
2016/02/25 15:49:09
It's a little unfortunate to be down matrix math h
|
+ } |
+ } else if (m_layoutBlock.hasOverflowClip()) { |
IntSize scrollOffset = m_layoutBlock.scrolledContentOffset(); |
if (m_layoutBlock.layer()->scrollsOverflow() || !scrollOffset.isZero()) { |
scrollRecorder.emplace(paintInfo.context, m_layoutBlock, paintPhase, scrollOffset); |