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

Unified Diff: public/web/WebRange.h

Issue 224113002: Oilpan: move Range object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use STACK_ALLOCATED() + incorporate ager's overview of macros in this area. Created 6 years, 9 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
« Source/core/editing/EditorCommand.cpp ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebRange.h
diff --git a/public/web/WebRange.h b/public/web/WebRange.h
index 5d463f8a99b44cafb85dfbc83db393d56ec44831..cd318a1cf1f110eaae6731975d20ec4be621dead 100644
--- a/public/web/WebRange.h
+++ b/public/web/WebRange.h
@@ -31,20 +31,17 @@
#ifndef WebRange_h
#define WebRange_h
-#include "../platform/WebCommon.h"
-#include "../platform/WebVector.h"
#include "WebFrame.h"
+#include "public/platform/WebCommon.h"
+#include "public/platform/WebPrivatePtr.h"
+#include "public/platform/WebVector.h"
-#if BLINK_IMPLEMENTATION
namespace WebCore { class Range; }
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
namespace blink {
struct WebFloatQuad;
class WebNode;
-class WebRangePrivate;
class WebString;
// Provides readonly access to some properties of a DOM range.
@@ -52,8 +49,8 @@ class WebRange {
public:
~WebRange() { reset(); }
- WebRange() : m_private(0) { }
- WebRange(const WebRange& r) : m_private(0) { assign(r); }
+ WebRange() { }
+ WebRange(const WebRange& r) { assign(r); }
WebRange& operator=(const WebRange& r)
{
assign(r);
@@ -63,7 +60,7 @@ public:
BLINK_EXPORT void reset();
BLINK_EXPORT void assign(const WebRange&);
- bool isNull() const { return !m_private; }
+ bool isNull() const { return m_private.isNull(); }
BLINK_EXPORT int startOffset() const;
BLINK_EXPORT int endOffset() const;
@@ -80,14 +77,12 @@ public:
BLINK_EXPORT WebVector<WebFloatQuad> textQuads() const;
#if BLINK_IMPLEMENTATION
- WebRange(const WTF::PassRefPtr<WebCore::Range>&);
- WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&);
- operator WTF::PassRefPtr<WebCore::Range>() const;
+ WebRange(const PassRefPtrWillBeRawPtr<WebCore::Range>&);
+ operator PassRefPtrWillBeRawPtr<WebCore::Range>() const;
#endif
private:
- void assign(WebRangePrivate*);
- WebRangePrivate* m_private;
+ WebPrivatePtr<WebCore::Range> m_private;
};
} // namespace blink
« Source/core/editing/EditorCommand.cpp ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698