| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index 9034a842ff08eed765667e4d3dfa4a467b18e33b..21d4af537093e7d207524448712c162371ba2de5 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -3560,6 +3560,29 @@ bool Element::supportsStyleSharing() const
|
| return true;
|
| }
|
|
|
| +void Element::registerIntersectionObserver(IntersectionObserver* observer)
|
| +{
|
| + size_t index = m_intersectionObservers.find(observer);
|
| + if (index != WTF::kNotFound)
|
| + return;
|
| +
|
| + m_intersectionObservers.append(observer);
|
| + if (document().layoutView() && layoutObject())
|
| + document().layoutView()->addIntersectionObserverTarget(layoutObject());
|
| +}
|
| +
|
| +void Element::unregisterIntersectionObserver(IntersectionObserver* observer)
|
| +{
|
| + size_t index = m_intersectionObservers.find(observer);
|
| + if (index == WTF::kNotFound)
|
| + return;
|
| +
|
| + m_intersectionObservers.remove(index);
|
| + if (document().layoutView() && layoutObject())
|
| + document().layoutView()->removeIntersectionObserverTarget(layoutObject());
|
| +}
|
| +
|
| +
|
| DEFINE_TRACE(Element)
|
| {
|
| #if ENABLE(OILPAN)
|
|
|