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

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

Issue 1104243003: Oilpan: put ClientRect(List) on the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove transition types uses also Created 5 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
« no previous file with comments | « no previous file | Source/core/dom/ClientRect.idl » ('j') | Source/web/tests/TouchActionTest.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 * 24 *
25 */ 25 */
26 26
27 #ifndef ClientRect_h 27 #ifndef ClientRect_h
28 #define ClientRect_h 28 #define ClientRect_h
29 29
30 #include "bindings/core/v8/ScriptWrappable.h" 30 #include "bindings/core/v8/ScriptWrappable.h"
31 #include "core/CoreExport.h" 31 #include "core/CoreExport.h"
32 #include "platform/geometry/FloatRect.h" 32 #include "platform/geometry/FloatRect.h"
33 #include "platform/heap/Handle.h" 33 #include "platform/heap/Handle.h"
34 #include "wtf/PassRefPtr.h"
35 #include "wtf/RefCounted.h"
36 34
37 namespace blink { 35 namespace blink {
38 36
39 class IntRect; 37 class IntRect;
40 38
41 class CORE_EXPORT ClientRect final : public RefCountedWillBeGarbageCollected<Cli entRect>, public ScriptWrappable { 39 class CORE_EXPORT ClientRect final : public GarbageCollected<ClientRect>, public ScriptWrappable {
42 DEFINE_WRAPPERTYPEINFO(); 40 DEFINE_WRAPPERTYPEINFO();
43 public: 41 public:
44 static PassRefPtrWillBeRawPtr<ClientRect> create() 42 static ClientRect* create()
45 { 43 {
46 return adoptRefWillBeNoop(new ClientRect); 44 return new ClientRect;
47 } 45 }
48 static PassRefPtrWillBeRawPtr<ClientRect> create(const IntRect& rect) 46 static ClientRect* create(const IntRect& rect)
49 { 47 {
50 return adoptRefWillBeNoop(new ClientRect(rect)); 48 return new ClientRect(rect);
51 } 49 }
52 static PassRefPtrWillBeRawPtr<ClientRect> create(const FloatRect& rect) 50 static ClientRect* create(const FloatRect& rect)
53 { 51 {
54 return adoptRefWillBeNoop(new ClientRect(rect)); 52 return new ClientRect(rect);
55 } 53 }
56 54
57 float top() const { return m_rect.y(); } 55 float top() const { return m_rect.y(); }
58 float right() const { return m_rect.maxX(); } 56 float right() const { return m_rect.maxX(); }
59 float bottom() const { return m_rect.maxY(); } 57 float bottom() const { return m_rect.maxY(); }
60 float left() const { return m_rect.x(); } 58 float left() const { return m_rect.x(); }
61 float width() const { return m_rect.width(); } 59 float width() const { return m_rect.width(); }
62 float height() const { return m_rect.height(); } 60 float height() const { return m_rect.height(); }
63 61
64 DEFINE_INLINE_TRACE() { } 62 DEFINE_INLINE_TRACE() { }
65 63
66 private: 64 private:
67 ClientRect(); 65 ClientRect();
68 explicit ClientRect(const IntRect&); 66 explicit ClientRect(const IntRect&);
69 explicit ClientRect(const FloatRect&); 67 explicit ClientRect(const FloatRect&);
70 68
71 FloatRect m_rect; 69 FloatRect m_rect;
72 }; 70 };
73 71
74 } // namespace blink 72 } // namespace blink
75 73
76 #endif // ClientRect_h 74 #endif // ClientRect_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ClientRect.idl » ('j') | Source/web/tests/TouchActionTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698