Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h |
| diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h |
| index 598a56f62704a3c2c694038bf6ff8bedec9b18e4..b682f6fce06d5c2adb9b4529b047d48b64d4fdeb 100644 |
| --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h |
| +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h |
| @@ -26,10 +26,19 @@ namespace blink { |
| class SVGElement; |
| +// A common class of SVG objects that delegate layout, paint, etc. tasks to |
| +// LayoutBlockFlow. It has two coordinate spaces: |
| +// - local SVG coordinate space: the space that localSVGTransform() applies, |
| +// which is the same as other normal SVG objects; |
|
pdr.
2016/11/29 22:33:00
WDYT of mentioning LayoutSVGModelObject?
Maybe so
Xianzhu
2016/11/30 00:02:34
Done.
|
| +// - local HTML coordinate space: defined by frameRect() as if the local SVG |
| +// coordinate space created a containing block. Like other LayoutBlockFlow |
| +// objects, LayoutSVGBlock's frameRect() is also in physical coordinates with |
| +// flipped blocks direction in the "containing block". |
| class LayoutSVGBlock : public LayoutBlockFlow { |
| public: |
| explicit LayoutSVGBlock(SVGElement*); |
| + // These mapping functions map coordinates in HTML spaces. |
| void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, |
| TransformState&, |
| MapCoordinatesFlags = ApplyContainerFlip) const final; |
| @@ -39,6 +48,10 @@ class LayoutSVGBlock : public LayoutBlockFlow { |
| const LayoutObject* pushMappingToContainer( |
| const LayoutBoxModelObject* ancestorToStopAt, |
| LayoutGeometryMap&) const final; |
| + bool mapToVisualRectInAncestorSpace( |
| + const LayoutBoxModelObject* ancestor, |
| + LayoutRect&, |
| + VisualRectFlags = DefaultVisualRectFlags) const final; |
| AffineTransform localSVGTransform() const final { return m_localTransform; } |
| @@ -46,10 +59,6 @@ class LayoutSVGBlock : public LayoutBlockFlow { |
| protected: |
| void willBeDestroyed() override; |
| - bool mapToVisualRectInAncestorSpace( |
| - const LayoutBoxModelObject* ancestor, |
| - LayoutRect&, |
| - VisualRectFlags = DefaultVisualRectFlags) const final; |
| AffineTransform m_localTransform; |