Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2005593002: Initial ResizeObserver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 if (elementRareData()) 2616 if (elementRareData())
2617 return elementRareData()->intersectionObserverData(); 2617 return elementRareData()->intersectionObserverData();
2618 return nullptr; 2618 return nullptr;
2619 } 2619 }
2620 2620
2621 NodeIntersectionObserverData& Element::ensureIntersectionObserverData() 2621 NodeIntersectionObserverData& Element::ensureIntersectionObserverData()
2622 { 2622 {
2623 return ensureElementRareData().ensureIntersectionObserverData(); 2623 return ensureElementRareData().ensureIntersectionObserverData();
2624 } 2624 }
2625 2625
2626 ResizeObservationSet& Element::ensureResizeObserverData()
2627 {
2628 return ensureElementRareData().ensureResizeObserverData();
2629 }
2630
2626 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() 2631 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml()
2627 static Element* contextElementForInsertion(const String& where, Element* element , ExceptionState& exceptionState) 2632 static Element* contextElementForInsertion(const String& where, Element* element , ExceptionState& exceptionState)
2628 { 2633 {
2629 if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "aft erEnd")) { 2634 if (equalIgnoringCase(where, "beforeBegin") || equalIgnoringCase(where, "aft erEnd")) {
2630 Element* parent = element->parentElement(); 2635 Element* parent = element->parentElement();
2631 if (!parent) { 2636 if (!parent) {
2632 exceptionState.throwDOMException(NoModificationAllowedError, "The el ement has no parent."); 2637 exceptionState.throwDOMException(NoModificationAllowedError, "The el ement has no parent.");
2633 return nullptr; 2638 return nullptr;
2634 } 2639 }
2635 return parent; 2640 return parent;
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
3707 3712
3708 DEFINE_TRACE_WRAPPERS(Element) 3713 DEFINE_TRACE_WRAPPERS(Element)
3709 { 3714 {
3710 if (hasRareData()) { 3715 if (hasRareData()) {
3711 visitor->traceWrappers(elementRareData()); 3716 visitor->traceWrappers(elementRareData());
3712 } 3717 }
3713 ContainerNode::traceWrappers(visitor); 3718 ContainerNode::traceWrappers(visitor);
3714 } 3719 }
3715 3720
3716 } // namespace blink 3721 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698