LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (C) 2016 Apple Inc. All rights reserved. | 2 * Copyright (C) 2016 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "Element.h" | 31 #include "Element.h" |
32 #include <wtf/text/TextStream.h> | 32 #include <wtf/text/TextStream.h> |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 IntersectionObserverEntry::IntersectionObserverEntry(const Init& init) | 36 IntersectionObserverEntry::IntersectionObserverEntry(const Init& init) |
37 : m_time(init.time) | 37 : m_time(init.time) |
38 , m_boundingClientRect(DOMRectReadOnly::fromRect(init.boundingClientRect)) | 38 , m_boundingClientRect(DOMRectReadOnly::fromRect(init.boundingClientRect)) |
39 , m_intersectionRect(DOMRectReadOnly::fromRect(init.intersectionRect)) | 39 , m_intersectionRect(DOMRectReadOnly::fromRect(init.intersectionRect)) |
40 , m_isIntersecting(init.isIntersecting) | |
41 , m_intersectionRatio(init.intersectionRatio) | 40 , m_intersectionRatio(init.intersectionRatio) |
42 , m_target(init.target) | 41 , m_target(init.target) |
| 42 , m_isIntersecting(init.isIntersecting) |
43 { | 43 { |
44 if (init.rootBounds) | 44 if (init.rootBounds) |
45 m_rootBounds = DOMRectReadOnly::fromRect(*init.rootBounds); | 45 m_rootBounds = DOMRectReadOnly::fromRect(*init.rootBounds); |
46 } | 46 } |
47 | 47 |
48 TextStream& operator<<(TextStream& ts, const DOMRectInit& rect) | 48 TextStream& operator<<(TextStream& ts, const DOMRectInit& rect) |
49 { | 49 { |
50 ts << "x: " << rect.x; | 50 ts << "x: " << rect.x; |
51 ts << "y: " << rect.y; | 51 ts << "y: " << rect.y; |
52 ts << "width: " << rect.width; | 52 ts << "width: " << rect.width; |
(...skipping 18 matching lines...) Expand all Loading... |
71 ts << entry.boundingClientRect().get(); | 71 ts << entry.boundingClientRect().get(); |
72 ts << entry.intersectionRect().get(); | 72 ts << entry.intersectionRect().get(); |
73 ts << entry.target().get(); | 73 ts << entry.target().get(); |
74 ts << entry.intersectionRatio(); | 74 ts << entry.intersectionRatio(); |
75 return ts; | 75 return ts; |
76 } | 76 } |
77 | 77 |
78 } // namespace WebCore | 78 } // namespace WebCore |
79 | 79 |
80 #endif // ENABLE(INTERSECTION_OBSERVER) | 80 #endif // ENABLE(INTERSECTION_OBSERVER) |
LEFT | RIGHT |