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 3475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3486 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 3486 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
3487 // See comments in LayoutObject::setStyle(). | 3487 // See comments in LayoutObject::setStyle(). |
3488 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 3488 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
3489 if (isHTMLFrameElementBase(*this) || isHTMLPlugInElement(*this) || isHTMLCan
vasElement(*this)) | 3489 if (isHTMLFrameElementBase(*this) || isHTMLPlugInElement(*this) || isHTMLCan
vasElement(*this)) |
3490 return false; | 3490 return false; |
3491 if (Fullscreen::isActiveFullScreenElement(*this)) | 3491 if (Fullscreen::isActiveFullScreenElement(*this)) |
3492 return false; | 3492 return false; |
3493 return true; | 3493 return true; |
3494 } | 3494 } |
3495 | 3495 |
| 3496 void Element::registerIntersectionObserver(IntersectionObserver* observer) |
| 3497 { |
| 3498 size_t index = m_intersectionObservers.find(observer); |
| 3499 if (index != WTF::kNotFound) |
| 3500 return; |
| 3501 |
| 3502 m_intersectionObservers.append(observer); |
| 3503 if (document().layoutView() && layoutObject()) |
| 3504 document().layoutView()->addIntersectionObserverTarget(layoutObject()); |
| 3505 } |
| 3506 |
| 3507 void Element::unregisterIntersectionObserver(IntersectionObserver* observer) |
| 3508 { |
| 3509 size_t index = m_intersectionObservers.find(observer); |
| 3510 if (index == WTF::kNotFound) |
| 3511 return; |
| 3512 |
| 3513 m_intersectionObservers.remove(index); |
| 3514 if (document().layoutView() && layoutObject()) |
| 3515 document().layoutView()->removeIntersectionObserverTarget(layoutObject()
); |
| 3516 } |
| 3517 |
3496 DEFINE_TRACE(Element) | 3518 DEFINE_TRACE(Element) |
3497 { | 3519 { |
3498 #if ENABLE(OILPAN) | 3520 #if ENABLE(OILPAN) |
3499 if (hasRareData()) | 3521 if (hasRareData()) |
3500 visitor->trace(elementRareData()); | 3522 visitor->trace(elementRareData()); |
3501 visitor->trace(m_elementData); | 3523 visitor->trace(m_elementData); |
3502 #endif | 3524 #endif |
3503 ContainerNode::trace(visitor); | 3525 ContainerNode::trace(visitor); |
3504 } | 3526 } |
3505 | 3527 |
3506 } // namespace blink | 3528 } // namespace blink |
OLD | NEW |