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

Side by Side Diff: Source/core/dom/DOMQuad.h

Issue 412373003: Implement DOMQuad of geometry interfaces. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: expected.txt Created 6 years, 4 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
« no previous file with comments | « Source/core/dom/DOMPointReadOnly.h ('k') | Source/core/dom/DOMQuad.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DOMQuad_h
6 #define DOMQuad_h
7
8 #include "core/dom/DOMPoint.h"
9 #include "core/dom/DOMRect.h"
10
11 namespace blink {
12
13 typedef const Dictionary DOMPointInit;
14 typedef const Dictionary DOMRectInit;
15
16 class DOMQuad;
17
18 class DOMQuadPoint : public DOMPoint {
19 public:
20 static DOMQuadPoint* create(DOMPointInit&, Member<DOMQuad>);
21 static DOMQuadPoint* create(double x, double y, Member<DOMQuad>);
22
23 virtual void setX(double) OVERRIDE;
24 virtual void setY(double) OVERRIDE;
25
26 virtual void trace(Visitor*) OVERRIDE;
27
28 private:
29 DOMQuadPoint(double x, double y, Member<DOMQuad>);
30
31 Member<DOMQuad> m_quad;
32 };
33
34 class DOMQuad : public GarbageCollected<DOMQuad> {
35 public:
36 static DOMQuad* create(DOMRectInit& = DOMRectInit());
37 static DOMQuad* create(DOMPointInit&, DOMPointInit&,
38 DOMPointInit& = DOMPointInit(), DOMPointInit& = DOMPointInit());
39
40 DOMPoint* p1() const { return m_p1.get(); }
41 DOMPoint* p2() const { return m_p2.get(); }
42 DOMPoint* p3() const { return m_p3.get(); }
43 DOMPoint* p4() const { return m_p4.get(); }
44 DOMRectReadOnly* bounds();
45
46 void updateHorizontalBounds();
47 void updateVerticalBounds();
48
49 void trace(Visitor*);
50
51 protected:
52 DOMQuad(double x, double y, double width, double height);
53 DOMQuad(DOMPointInit&, DOMPointInit&, DOMPointInit&, DOMPointInit&);
54
55 Member<DOMPoint> m_p1;
56 Member<DOMPoint> m_p2;
57 Member<DOMPoint> m_p3;
58 Member<DOMPoint> m_p4;
59 Member<DOMRect> m_bounds;
60 };
61
62 } // namespace blink
63
64 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/DOMPointReadOnly.h ('k') | Source/core/dom/DOMQuad.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698