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

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

Issue 2778873002: Reland "Let SVGForeignObject's local SVG coordinates mean what it should" (Closed)
Patch Set: Fix 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2009 Google, Inc. 3 * Copyright (C) 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 const char* name() const override { return "LayoutSVGForeignObject"; } 47 const char* name() const override { return "LayoutSVGForeignObject"; }
48 48
49 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; 49 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
50 50
51 void paint(const PaintInfo&, const LayoutPoint&) const override; 51 void paint(const PaintInfo&, const LayoutPoint&) const override;
52 52
53 void layout() override; 53 void layout() override;
54 54
55 FloatRect objectBoundingBox() const override { 55 FloatRect objectBoundingBox() const override {
56 return FloatRect(FloatPoint(), FloatSize(size())); 56 return FloatRect(frameRect());
57 } 57 }
58 FloatRect strokeBoundingBox() const override { return objectBoundingBox(); } 58 FloatRect strokeBoundingBox() const override { return objectBoundingBox(); }
59 FloatRect visualRectInLocalSVGCoordinates() const override { 59 FloatRect visualRectInLocalSVGCoordinates() const override {
60 return objectBoundingBox(); 60 return objectBoundingBox();
61 } 61 }
62 62
63 bool nodeAtFloatPoint(HitTestResult&, 63 bool nodeAtFloatPoint(HitTestResult&,
64 const FloatPoint& pointInParent, 64 const FloatPoint& pointInParent,
65 HitTestAction) override; 65 HitTestAction) override;
66 bool isOfType(LayoutObjectType type) const override { 66 bool isOfType(LayoutObjectType type) const override {
67 return type == LayoutObjectSVGForeignObject || 67 return type == LayoutObjectSVGForeignObject ||
68 LayoutSVGBlock::isOfType(type); 68 LayoutSVGBlock::isOfType(type);
69 } 69 }
70 70
71 void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; } 71 void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; }
72 72
73 AffineTransform localToSVGParentTransform() const override;
74
75 private: 73 private:
76 LayoutUnit elementX() const; 74 LayoutUnit elementX() const;
77 LayoutUnit elementY() const; 75 LayoutUnit elementY() const;
78 LayoutUnit elementWidth() const; 76 LayoutUnit elementWidth() const;
79 LayoutUnit elementHeight() const; 77 LayoutUnit elementHeight() const;
80 void updateLogicalWidth() override; 78 void updateLogicalWidth() override;
81 void computeLogicalHeight(LayoutUnit logicalHeight, 79 void computeLogicalHeight(LayoutUnit logicalHeight,
82 LayoutUnit logicalTop, 80 LayoutUnit logicalTop,
83 LogicalExtentComputedValues&) const override; 81 LogicalExtentComputedValues&) const override;
84 82
85 bool m_needsTransformUpdate; 83 bool m_needsTransformUpdate;
86 }; 84 };
87 85
88 } // namespace blink 86 } // namespace blink
89 87
90 #endif 88 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698