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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/CullRect.h

Issue 2430313004: Paint collapsed borders of a table as one display item (Closed)
Patch Set: - Created 4 years, 1 month 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/platform/graphics/paint/CullRect.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/CullRect.h b/third_party/WebKit/Source/platform/graphics/paint/CullRect.h
index b3a706c8e160929b93a7b6e58159a5fcc4c7c437..1de99f830770ec608048d7edc38c262b28c493a0 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/CullRect.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/CullRect.h
@@ -27,6 +27,7 @@ class PLATFORM_EXPORT CullRect {
DISALLOW_NEW();
public:
+ CullRect() {}
explicit CullRect(const IntRect& rect) : m_rect(rect) {}
CullRect(const CullRect&, const IntPoint& offset);
CullRect(const CullRect&, const IntSize& offset);
@@ -42,6 +43,8 @@ class PLATFORM_EXPORT CullRect {
private:
IntRect m_rect;
+ friend bool operator==(const CullRect&, const CullRect&);
+
// TODO(chrishtr): temporary while we implement CullRect everywhere.
friend class FramePainter;
friend class GridPainter;
@@ -54,6 +57,13 @@ class PLATFORM_EXPORT CullRect {
friend class WebPluginContainerImpl;
};
+inline bool operator==(const CullRect& a, const CullRect& b) {
+ return a.m_rect == b.m_rect;
+}
+inline bool operator!=(const CullRect& a, const CullRect& b) {
+ return !(a == b);
+}
+
} // namespace blink
#endif // CullRect_h

Powered by Google App Engine
This is Rietveld 408576698