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 |