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

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

Issue 2773963003: Revert "Let SVGForeignObject's local SVG coordinates mean what it should" (Closed)
Patch Set: Created 3 years, 8 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/layout/svg/LayoutSVGForeignObject.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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilder.h" 5 #include "core/paint/PaintPropertyTreeBuilder.h"
6 6
7 #include "core/dom/DOMNodeIds.h" 7 #include "core/dom/DOMNodeIds.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 void PaintPropertyTreeBuilder::updateTransformForNonRootSVG( 283 void PaintPropertyTreeBuilder::updateTransformForNonRootSVG(
284 const LayoutObject& object, 284 const LayoutObject& object,
285 PaintPropertyTreeBuilderContext& context) { 285 PaintPropertyTreeBuilderContext& context) {
286 DCHECK(object.isSVGChild()); 286 DCHECK(object.isSVGChild());
287 // SVG does not use paint offset internally, except for SVGForeignObject which 287 // SVG does not use paint offset internally, except for SVGForeignObject which
288 // has different SVG and HTML coordinate spaces. 288 // has different SVG and HTML coordinate spaces.
289 DCHECK(object.isSVGForeignObject() || 289 DCHECK(object.isSVGForeignObject() ||
290 context.current.paintOffset == LayoutPoint()); 290 context.current.paintOffset == LayoutPoint());
291 291
292 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 292 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
293 AffineTransform transform = object.localToSVGParentTransform(); 293 // TODO(pdr): Refactor this so all non-root SVG objects use the same
294 // transform function.
295 const AffineTransform& transform = object.isSVGForeignObject()
296 ? object.localSVGTransform()
297 : object.localToSVGParentTransform();
294 // TODO(pdr): Check for the presence of a transform instead of the value. 298 // TODO(pdr): Check for the presence of a transform instead of the value.
295 // Checking for an identity matrix will cause the property tree structure 299 // Checking for an identity matrix will cause the property tree structure
296 // to change during animations if the animation passes through the 300 // to change during animations if the animation passes through the
297 // identity matrix. 301 // identity matrix.
298 if (!transform.isIdentity()) { 302 if (!transform.isIdentity()) {
299 // The origin is included in the local transform, so leave origin empty. 303 // The origin is included in the local transform, so leave origin empty.
300 auto& properties = object.getMutableForPainting().ensurePaintProperties(); 304 auto& properties = object.getMutableForPainting().ensurePaintProperties();
301 context.forceSubtreeUpdate |= properties.updateTransform( 305 context.forceSubtreeUpdate |= properties.updateTransform(
302 context.current.transform, TransformationMatrix(transform), 306 context.current.transform, TransformationMatrix(transform),
303 FloatPoint3D()); 307 FloatPoint3D());
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 updateOverflowClip(object, context); 995 updateOverflowClip(object, context);
992 updatePerspective(object, context); 996 updatePerspective(object, context);
993 updateSvgLocalToBorderBoxTransform(object, context); 997 updateSvgLocalToBorderBoxTransform(object, context);
994 updateScrollAndScrollTranslation(object, context); 998 updateScrollAndScrollTranslation(object, context);
995 updateOutOfFlowContext(object, context); 999 updateOutOfFlowContext(object, context);
996 1000
997 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 1001 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
998 } 1002 }
999 1003
1000 } // namespace blink 1004 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698