Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| index 5d2afa4cd8bcd85f794ebb3280fb12afa130e3a9..b5b60227969bf7f3a12d69c42fee241b7c3a368b 100644 |
| --- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| +++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| @@ -38,7 +38,7 @@ public: |
| // +---[ transform ] The space created by CSS transform. |
| // | This is the local border box space, see: LocalBorderBoxProperties below. |
| // +---[ perspective ] The space created by CSS perspective. |
| - // | +---[ svgLocalTransform ] The transform for an SVG element. |
| + // | +---[ svgLocalToBorderBoxTransform ] Additional transform for children of the root SVG. |
|
fs
2016/06/10 08:21:16
(Maybe mention that this would only ever apply for
pdr.
2016/06/10 17:50:43
SGTM, done.
|
| // | OR (SVG does not support scrolling.) |
| // | +---[ scrollTranslation ] The space created by overflow clip. |
| // +---[ scrollbarPaintOffset ] TODO(trchen): Remove this once we bake the paint offset into frameRect. |
| @@ -48,7 +48,7 @@ public: |
| TransformPaintPropertyNode* paintOffsetTranslation() const { return m_paintOffsetTranslation.get(); } |
| TransformPaintPropertyNode* transform() const { return m_transform.get(); } |
| TransformPaintPropertyNode* perspective() const { return m_perspective.get(); } |
| - TransformPaintPropertyNode* svgLocalTransform() const { return m_svgLocalTransform.get(); } |
| + TransformPaintPropertyNode* svgLocalToBorderBoxTransform() const { return m_svgLocalToBorderBoxTransform.get(); } |
| TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTranslation.get(); } |
| TransformPaintPropertyNode* scrollbarPaintOffset() const { return m_scrollbarPaintOffset.get(); } |
| @@ -85,14 +85,14 @@ private: |
| void setCssClipFixedPosition(PassRefPtr<ClipPaintPropertyNode> clip) { m_cssClipFixedPosition = clip; } |
| void setOverflowClip(PassRefPtr<ClipPaintPropertyNode> clip) { m_overflowClip = clip; } |
| void setPerspective(PassRefPtr<TransformPaintPropertyNode> perspective) { m_perspective = perspective; } |
| - void setSvgLocalTransform(PassRefPtr<TransformPaintPropertyNode> transform) |
| + void setSvgLocalToBorderBoxTransform(PassRefPtr<TransformPaintPropertyNode> transform) |
| { |
| - DCHECK(!scrollTranslation()) << "SVG elements cannot scroll so there should never be both a scroll translation and an SVG local transform."; |
| - m_svgLocalTransform = transform; |
| + DCHECK(!scrollTranslation()) << "SVG elements cannot scroll so there should never be both a scroll translation and an SVG local to border box transform."; |
| + m_svgLocalToBorderBoxTransform = transform; |
| } |
| void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> translation) |
| { |
| - DCHECK(!svgLocalTransform()) << "SVG elements cannot scroll so there should never be both a scroll translation and an SVG local transform."; |
| + DCHECK(!svgLocalToBorderBoxTransform()) << "SVG elements cannot scroll so there should never be both a scroll translation and an SVG local to border box transform."; |
| m_scrollTranslation = translation; |
| } |
| void setScrollbarPaintOffset(PassRefPtr<TransformPaintPropertyNode> paintOffset) { m_scrollbarPaintOffset = paintOffset; } |
| @@ -105,7 +105,8 @@ private: |
| RefPtr<ClipPaintPropertyNode> m_cssClipFixedPosition; |
| RefPtr<ClipPaintPropertyNode> m_overflowClip; |
| RefPtr<TransformPaintPropertyNode> m_perspective; |
| - RefPtr<TransformPaintPropertyNode> m_svgLocalTransform; |
| + // TODO(pdr): Only LayoutSVGRoot needs this and it should be moved there. |
| + RefPtr<TransformPaintPropertyNode> m_svgLocalToBorderBoxTransform; |
| RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; |