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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 1829493002: [SPv2] Implement CSS clip property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change argument order & add unit tests 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/PaintPropertyTreeBuilderTest.cpp ('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/platform/graphics/compositing/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index a1a5329f86e0109dc7c1a6c068acbc3a51c097ab..60e7a0c5ad17ffe6bfd459ff0551735dfdf93a8a 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -173,7 +173,7 @@ scoped_refptr<cc::Layer> createClipLayer(const ClipPaintPropertyNode* node)
// other kinds of intermediate layers, such as those that apply effects.
// TODO(jbroman): This assumes that the transform space of this node's
// parent is an ancestor of this node's transform space. That's not
- // necessarily true, and this should be fixed.
+ // necessarily true, and this should be fixed. crbug.com/597156
gfx::Transform transform = transformToTransformSpace(localTransformSpace(node), localTransformSpace(node->parent()));
gfx::Vector2dF offset = clipRect.OffsetFromOrigin();
transform.Translate(offset.x(), offset.y());
@@ -271,6 +271,8 @@ void PaintArtifactCompositor::update(const PaintArtifact& paintArtifact)
ClipLayerManager clipLayerManager(m_rootLayer.get());
for (const PaintChunk& paintChunk : paintArtifact.paintChunks()) {
cc::Layer* parent = clipLayerManager.switchToNewClipLayer(paintChunk.properties.clip.get());
+ // TODO(jbroman): Same as above. This assumes the transform space of the current clip is
+ // an ancestor of the chunk. It is not necessarily true. crbug.com/597156
gfx::Transform transform = transformToTransformSpace(paintChunk.properties.transform.get(), localTransformSpace(paintChunk.properties.clip.get()));
scoped_refptr<cc::Layer> layer = layerForPaintChunk(paintArtifact, paintChunk, transform);
layer->SetNeedsDisplay();
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698