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

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGPaintContext.cpp

Issue 2078343005: Fix positioning of CSS reference clips in composited layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add virtual expectation Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGClipPainter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), opa city, &compositingBounds)); 119 WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), opa city, &compositingBounds));
120 } 120 }
121 } 121 }
122 122
123 bool SVGPaintContext::applyClipIfNecessary(SVGResources* resources) 123 bool SVGPaintContext::applyClipIfNecessary(SVGResources* resources)
124 { 124 {
125 // resources->clipper() corresponds to the non-prefixed 'clip-path' whereas 125 // resources->clipper() corresponds to the non-prefixed 'clip-path' whereas
126 // m_object.style()->clipPath() corresponds to '-webkit-clip-path'. 126 // m_object.style()->clipPath() corresponds to '-webkit-clip-path'.
127 // FIXME: We should unify the clip-path and -webkit-clip-path codepaths. 127 // FIXME: We should unify the clip-path and -webkit-clip-path codepaths.
128 if (LayoutSVGResourceClipper* clipper = resources ? resources->clipper() : n ullptr) { 128 if (LayoutSVGResourceClipper* clipper = resources ? resources->clipper() : n ullptr) {
129 if (!SVGClipPainter(*clipper).prepareEffect(m_object, m_object.objectBou ndingBox(), m_object.paintInvalidationRectInLocalSVGCoordinates(), paintInfo().c ontext, m_clipperState)) 129 if (!SVGClipPainter(*clipper).prepareEffect(m_object, m_object.objectBou ndingBox(),
130 m_object.paintInvalidationRectInLocalSVGCoordinates(), FloatPoint(), paintInfo().context, m_clipperState))
130 return false; 131 return false;
131 m_clipper = clipper; 132 m_clipper = clipper;
132 } else { 133 } else {
133 ClipPathOperation* clipPathOperation = m_object.style()->clipPath(); 134 ClipPathOperation* clipPathOperation = m_object.style()->clipPath();
134 if (clipPathOperation && clipPathOperation->type() == ClipPathOperation: :SHAPE) { 135 if (clipPathOperation && clipPathOperation->type() == ClipPathOperation: :SHAPE) {
135 ShapeClipPathOperation* clipPath = toShapeClipPathOperation(clipPath Operation); 136 ShapeClipPathOperation* clipPath = toShapeClipPathOperation(clipPath Operation);
136 if (!clipPath->isValid()) 137 if (!clipPath->isValid())
137 return false; 138 return false;
138 m_clipPathRecorder = wrapUnique(new ClipPathRecorder(paintInfo().con text, m_object, clipPath->path(m_object.objectBoundingBox()))); 139 m_clipPathRecorder = wrapUnique(new ClipPathRecorder(paintInfo().con text, m_object, clipPath->path(m_object.objectBoundingBox())));
139 } 140 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // though. 230 // though.
230 // Additionally, it's not really safe/guaranteed to be correct, as 231 // Additionally, it's not really safe/guaranteed to be correct, as
231 // something down the paint pipe may want to farther tweak the color 232 // something down the paint pipe may want to farther tweak the color
232 // filter, which could yield incorrect results. (Consider just using 233 // filter, which could yield incorrect results. (Consider just using
233 // saveLayer() w/ this color filter explicitly instead.) 234 // saveLayer() w/ this color filter explicitly instead.)
234 paint.setColorFilter(sk_ref_sp(paintInfo.context.colorFilter())); 235 paint.setColorFilter(sk_ref_sp(paintInfo.context.colorFilter()));
235 return true; 236 return true;
236 } 237 }
237 238
238 } // namespace blink 239 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGClipPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698