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

Unified Diff: third_party/WebKit/Source/core/dom/DOMQuad.h

Issue 2680023003: [GeometryInterface] add getBounds function in DOMQaud. (Closed)
Patch Set: caching Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/DOMQuad.h
diff --git a/third_party/WebKit/Source/core/dom/DOMQuad.h b/third_party/WebKit/Source/core/dom/DOMQuad.h
index b2219d10af83c234387489b683dd9f8fe396b69d..dc3e9ba50d2e3b3c1ffc8155d0891a58654d0705 100644
--- a/third_party/WebKit/Source/core/dom/DOMQuad.h
+++ b/third_party/WebKit/Source/core/dom/DOMQuad.h
@@ -14,6 +14,7 @@ namespace blink {
class DOMPoint;
class DOMPointInit;
class DOMQuadInit;
+class DOMRect;
class DOMRectInit;
class CORE_EXPORT DOMQuad : public GarbageCollected<DOMQuad>,
@@ -33,6 +34,8 @@ class CORE_EXPORT DOMQuad : public GarbageCollected<DOMQuad>,
DOMPoint* p3() const { return m_p3; }
DOMPoint* p4() const { return m_p4; }
+ DOMRect* getBounds();
+
ScriptValue toJSONForBinding(ScriptState*) const;
DEFINE_INLINE_TRACE() {
@@ -49,10 +52,17 @@ class CORE_EXPORT DOMQuad : public GarbageCollected<DOMQuad>,
const DOMPointInit& p4);
DOMQuad(double x, double y, double width, double height);
+ void calculateBounds();
+
Member<DOMPoint> m_p1;
Member<DOMPoint> m_p2;
Member<DOMPoint> m_p3;
Member<DOMPoint> m_p4;
+
+ double m_left;
+ double m_right;
+ double m_top;
+ double m_bottom;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698