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

Unified Diff: Source/core/dom/ClientRect.h

Issue 225843002: Oilpan: move ClientRect and its list to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + code style Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/ClientRect.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ClientRect.h
diff --git a/Source/core/dom/ClientRect.h b/Source/core/dom/ClientRect.h
index 3ef3b24f3b49ef4ea24e5543945a8d30d65c6de0..2fdaeab14ddefac30fad7bf8b1d6e172a0d376a4 100644
--- a/Source/core/dom/ClientRect.h
+++ b/Source/core/dom/ClientRect.h
@@ -29,33 +29,45 @@
#include "bindings/v8/ScriptWrappable.h"
#include "platform/geometry/FloatRect.h"
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace WebCore {
- class IntRect;
+class IntRect;
- class ClientRect : public ScriptWrappable, public RefCounted<ClientRect> {
- public:
- static PassRefPtr<ClientRect> create() { return adoptRef(new ClientRect); }
- static PassRefPtr<ClientRect> create(const IntRect& rect) { return adoptRef(new ClientRect(rect)); }
- static PassRefPtr<ClientRect> create(const FloatRect& rect) { return adoptRef(new ClientRect(rect)); }
+class ClientRect FINAL : public RefCountedWillBeGarbageCollectedFinalized<ClientRect>, public ScriptWrappable {
+public:
+ static PassRefPtrWillBeRawPtr<ClientRect> create()
+ {
+ return adoptRefWillBeNoop(new ClientRect);
+ }
+ static PassRefPtrWillBeRawPtr<ClientRect> create(const IntRect& rect)
+ {
+ return adoptRefWillBeNoop(new ClientRect(rect));
+ }
+ static PassRefPtrWillBeRawPtr<ClientRect> create(const FloatRect& rect)
+ {
+ return adoptRefWillBeNoop(new ClientRect(rect));
+ }
- float top() const { return m_rect.y(); }
- float right() const { return m_rect.maxX(); }
- float bottom() const { return m_rect.maxY(); }
- float left() const { return m_rect.x(); }
- float width() const { return m_rect.width(); }
- float height() const { return m_rect.height(); }
+ float top() const { return m_rect.y(); }
+ float right() const { return m_rect.maxX(); }
+ float bottom() const { return m_rect.maxY(); }
+ float left() const { return m_rect.x(); }
+ float width() const { return m_rect.width(); }
+ float height() const { return m_rect.height(); }
- private:
- ClientRect();
- explicit ClientRect(const IntRect&);
- explicit ClientRect(const FloatRect&);
+ void trace(Visitor*) { }
- FloatRect m_rect;
- };
+private:
+ ClientRect();
+ explicit ClientRect(const IntRect&);
+ explicit ClientRect(const FloatRect&);
+
+ FloatRect m_rect;
+};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/dom/ClientRect.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698