OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3553 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 3553 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
3554 // See comments in LayoutObject::setStyle(). | 3554 // See comments in LayoutObject::setStyle(). |
3555 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 3555 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
3556 if (isHTMLFrameElementBase(*this) || isHTMLPlugInElement(*this) || isHTMLCan
vasElement(*this)) | 3556 if (isHTMLFrameElementBase(*this) || isHTMLPlugInElement(*this) || isHTMLCan
vasElement(*this)) |
3557 return false; | 3557 return false; |
3558 if (Fullscreen::isActiveFullScreenElement(*this)) | 3558 if (Fullscreen::isActiveFullScreenElement(*this)) |
3559 return false; | 3559 return false; |
3560 return true; | 3560 return true; |
3561 } | 3561 } |
3562 | 3562 |
| 3563 void Element::registerIntersectionObserver(IntersectionObserver* observer) |
| 3564 { |
| 3565 size_t index = m_intersectionObservers.find(observer); |
| 3566 if (index != WTF::kNotFound) |
| 3567 return; |
| 3568 |
| 3569 m_intersectionObservers.append(observer); |
| 3570 if (document().layoutView() && layoutObject()) |
| 3571 document().layoutView()->addIntersectionObserverTarget(layoutObject()); |
| 3572 } |
| 3573 |
| 3574 void Element::unregisterIntersectionObserver(IntersectionObserver* observer) |
| 3575 { |
| 3576 size_t index = m_intersectionObservers.find(observer); |
| 3577 if (index == WTF::kNotFound) |
| 3578 return; |
| 3579 |
| 3580 m_intersectionObservers.remove(index); |
| 3581 if (document().layoutView() && layoutObject()) |
| 3582 document().layoutView()->removeIntersectionObserverTarget(layoutObject()
); |
| 3583 } |
| 3584 |
| 3585 |
3563 DEFINE_TRACE(Element) | 3586 DEFINE_TRACE(Element) |
3564 { | 3587 { |
3565 #if ENABLE(OILPAN) | 3588 #if ENABLE(OILPAN) |
3566 if (hasRareData()) | 3589 if (hasRareData()) |
3567 visitor->trace(elementRareData()); | 3590 visitor->trace(elementRareData()); |
3568 visitor->trace(m_elementData); | 3591 visitor->trace(m_elementData); |
3569 #endif | 3592 #endif |
3570 ContainerNode::trace(visitor); | 3593 ContainerNode::trace(visitor); |
3571 } | 3594 } |
3572 | 3595 |
3573 } // namespace blink | 3596 } // namespace blink |
OLD | NEW |