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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.h

Issue 1996543002: Avoid using forced layout to trigger paint invalidation for SVG containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2009 Google, Inc. All rights reserved. 4 * Copyright (C) 2009 Google, Inc. All rights reserved.
5 * Copyright (C) 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2009 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void layout() override; 63 void layout() override;
64 64
65 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) fina l; 65 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) fina l;
66 void removeChild(LayoutObject*) final; 66 void removeChild(LayoutObject*) final;
67 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse t, IncludeBlockVisualOverflowOrNot) const final; 67 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse t, IncludeBlockVisualOverflowOrNot) const final;
68 68
69 FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; } 69 FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; }
70 70
71 bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTe stAction) override; 71 bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTe stAction) override;
72 72
73 enum TransformChangeFlags {
pdr. 2016/06/15 12:15:17 Returning just ScaleChange from LayoutSVGResourceM
fs 2016/06/15 22:10:33 Yes, not too happy about this bit (no pun intended
fs 2016/06/20 11:48:49 Rewrote it to use an (ordered) enumeration instead
74 NoTransformChange = 0,
75 TransformChange = 1u << 0,
76 ScaleChange = 1u << 1,
77 };
73 // Allow LayoutSVGTransformableContainer to hook in at the right time in lay out(). 78 // Allow LayoutSVGTransformableContainer to hook in at the right time in lay out().
74 virtual bool calculateLocalTransform() { return false; } 79 virtual unsigned calculateLocalTransform() { return NoTransformChange; }
75 80
76 // Allow LayoutSVGViewportContainer to hook in at the right times in layout( ) and nodeAtFloatPoint(). 81 // Allow LayoutSVGViewportContainer to hook in at the right times in layout( ) and nodeAtFloatPoint().
77 virtual void calcViewport() { } 82 virtual void calcViewport() { }
78 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; } 83 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; }
79 84
80 virtual void determineIfLayoutSizeChanged() { } 85 virtual void determineIfLayoutSizeChanged() { }
81 86
82 void updateCachedBoundaries(); 87 void updateCachedBoundaries();
83 88
84 void descendantIsolationRequirementsChanged(DescendantIsolationState) final; 89 void descendantIsolationRequirementsChanged(DescendantIsolationState) final;
(...skipping 10 matching lines...) Expand all
95 bool m_didScreenScaleFactorChange : 1; 100 bool m_didScreenScaleFactorChange : 1;
96 mutable bool m_hasNonIsolatedBlendingDescendants : 1; 101 mutable bool m_hasNonIsolatedBlendingDescendants : 1;
97 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; 102 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1;
98 }; 103 };
99 104
100 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGContainer, isSVGContainer()); 105 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGContainer, isSVGContainer());
101 106
102 } // namespace blink 107 } // namespace blink
103 108
104 #endif // LayoutSVGContainer_h 109 #endif // LayoutSVGContainer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698