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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h

Issue 2510313004: Use LayoutBox::frameRect() as the viewport of LayoutSVGForeignObject (Closed)
Patch Set: crbug.com/667071 Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
index d0ba200aff4ff27932278ca69817e6d79f5da308..61bf92e1d26ab1518bade0148fe9793df375e9cb 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
@@ -53,13 +53,11 @@ class LayoutSVGForeignObject final : public LayoutSVGBlock {
void layout() override;
FloatRect objectBoundingBox() const override {
- return FloatRect(FloatPoint(), m_viewport.size());
- }
- FloatRect strokeBoundingBox() const override {
- return FloatRect(FloatPoint(), m_viewport.size());
+ return FloatRect(FloatPoint(), FloatSize(size()));
}
+ FloatRect strokeBoundingBox() const override { return objectBoundingBox(); }
FloatRect visualRectInLocalSVGCoordinates() const override {
- return FloatRect(FloatPoint(), m_viewport.size());
+ return objectBoundingBox();
}
bool nodeAtFloatPoint(HitTestResult&,
@@ -72,18 +70,19 @@ class LayoutSVGForeignObject final : public LayoutSVGBlock {
void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; }
- FloatRect viewportRect() const { return m_viewport; }
-
AffineTransform localToSVGParentTransform() const override;
private:
+ LayoutUnit elementX() const;
+ LayoutUnit elementY() const;
+ LayoutUnit elementWidth() const;
+ LayoutUnit elementHeight() const;
void updateLogicalWidth() override;
void computeLogicalHeight(LayoutUnit logicalHeight,
LayoutUnit logicalTop,
LogicalExtentComputedValues&) const override;
- bool m_needsTransformUpdate : 1;
- FloatRect m_viewport;
+ bool m_needsTransformUpdate;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698