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

Unified Diff: third_party/WebKit/Source/core/paint/BlockPainter.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: two more sub-pixel failure expectation Created 4 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/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);

Powered by Google App Engine
This is Rietveld 408576698