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

Unified Diff: third_party/WebKit/Source/core/geometry/DOMRect.h

Issue 2869803003: Change from ClientRect to DOMRect.
Patch Set: Change from ClientRect to DOMRect. Created 3 years, 6 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/geometry/DOMRect.h
diff --git a/third_party/WebKit/Source/core/geometry/DOMRect.h b/third_party/WebKit/Source/core/geometry/DOMRect.h
index 19bd8eba23583dea1ebc91425a3737c0b9ecd571..8bffda33b56af0baab43ca5839c3f497385925d7 100644
--- a/third_party/WebKit/Source/core/geometry/DOMRect.h
+++ b/third_party/WebKit/Source/core/geometry/DOMRect.h
@@ -13,6 +13,8 @@ namespace blink {
class DOMRect;
class DOMRectInit;
+class FloatRect;
+class IntRect;
class CORE_EXPORT DOMRect final : public DOMRectReadOnly {
DEFINE_WRAPPERTYPEINFO();
@@ -22,6 +24,8 @@ class CORE_EXPORT DOMRect final : public DOMRectReadOnly {
double y = 0,
double width = 0,
double height = 0);
+ static DOMRect* Create(const IntRect& rect) { return new DOMRect(rect); }
+ static DOMRect* Create(const FloatRect& rect) { return new DOMRect(rect); }
static DOMRect* fromRect(const DOMRectInit&);
void setX(double x) { x_ = x; }
@@ -31,6 +35,8 @@ class CORE_EXPORT DOMRect final : public DOMRectReadOnly {
protected:
DOMRect(double x, double y, double z, double w);
+ explicit DOMRect(const IntRect&);
+ explicit DOMRect(const FloatRect&);
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/ResizeObserverEntry.idl ('k') | third_party/WebKit/Source/core/geometry/DOMRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698