Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(622)

Unified Diff: Source/WebCore/page/IntersectionObserverEntry.cpp

Issue 359780043: WIP for IO
Patch Set: 22 tests pass Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/page/IntersectionObserverEntry.h ('k') | Source/WebCore/page/IntersectionObserverEntry.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/IntersectionObserverEntry.cpp
diff --git a/Source/WebCore/page/IntersectionObserverEntry.cpp b/Source/WebCore/page/IntersectionObserverEntry.cpp
index e3f9c3c9fc40908b6371bcaa909f0c759159c52e..4155b67dc808fa52e1ea0b578e326faf6fd08889 100644
--- a/Source/WebCore/page/IntersectionObserverEntry.cpp
+++ b/Source/WebCore/page/IntersectionObserverEntry.cpp
@@ -29,6 +29,7 @@
#include "IntersectionObserverEntry.h"
#include "Element.h"
+#include <wtf/text/TextStream.h>
namespace WebCore {
@@ -37,10 +38,41 @@ IntersectionObserverEntry::IntersectionObserverEntry(const Init& init)
, m_rootBounds(DOMRectReadOnly::fromRect(init.rootBounds))
, m_boundingClientRect(DOMRectReadOnly::fromRect(init.boundingClientRect))
, m_intersectionRect(DOMRectReadOnly::fromRect(init.intersectionRect))
+ , m_isIntersecting(init.isIntersecting)
+ , m_intersectionRatio(init.intersectionRatio)
, m_target(init.target)
{
}
+TextStream& operator<<(TextStream& ts, const DOMRectInit& rect)
+{
+ ts << "x: " << rect.x;
+ ts << "y: " << rect.y;
+ ts << "width: " << rect.width;
+ ts << "height: " << rect.height;
+ return ts;
+}
+
+TextStream& operator<<(TextStream& ts, const DOMRectReadOnly& rect)
+{
+ ts << "x: " << rect.x();
+ ts << "y: " << rect.y();
+ ts << "width: " << rect.width();
+ ts << "height: " << rect.height();
+
+ return ts;
+}
+
+TextStream& operator<<(TextStream& ts, const IntersectionObserverEntry& entry)
+{
+ ts << entry.time();
+ ts << entry.rootBounds().get();
+ ts << entry.boundingClientRect().get();
+ ts << entry.intersectionRect().get();
+ ts << entry.target().get();
+ ts << entry.intersectionRatio();
+ return ts;
+}
} // namespace WebCore
« no previous file with comments | « Source/WebCore/page/IntersectionObserverEntry.h ('k') | Source/WebCore/page/IntersectionObserverEntry.idl » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b