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

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

Issue 1449623002: IntersectionObserver: second cut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix rootMargin parsing Created 5 years 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 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class ClientRect; 49 class ClientRect;
50 class ClientRectList; 50 class ClientRectList;
51 class CustomElementDefinition; 51 class CustomElementDefinition;
52 class DOMStringMap; 52 class DOMStringMap;
53 class DOMTokenList; 53 class DOMTokenList;
54 class Dictionary; 54 class Dictionary;
55 class ElementRareData; 55 class ElementRareData;
56 class ElementShadow; 56 class ElementShadow;
57 class ExceptionState; 57 class ExceptionState;
58 class Image; 58 class Image;
59 class IntersectionObservation;
60 class IntersectionObserver;
59 class IntSize; 61 class IntSize;
60 class Locale; 62 class Locale;
61 class MutableStylePropertySet; 63 class MutableStylePropertySet;
62 class PropertySetCSSStyleDeclaration; 64 class PropertySetCSSStyleDeclaration;
63 class PseudoElement; 65 class PseudoElement;
64 class ScrollState; 66 class ScrollState;
65 class ScrollStateCallback; 67 class ScrollStateCallback;
66 class ScrollToOptions; 68 class ScrollToOptions;
67 class ShadowRoot; 69 class ShadowRoot;
68 class ShadowRootInit; 70 class ShadowRootInit;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if 538 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if
537 // the element is inDocument() and the context is an isolated world. 539 // the element is inDocument() and the context is an isolated world.
538 void logEventIfIsolatedWorldAndInDocument(const String& eventName, const Str ing& arg1, const String& arg2); 540 void logEventIfIsolatedWorldAndInDocument(const String& eventName, const Str ing& arg1, const String& arg2);
539 void logEventIfIsolatedWorldAndInDocument(const String& eventName, const Str ing& arg1, const String& arg2, const String& arg3); 541 void logEventIfIsolatedWorldAndInDocument(const String& eventName, const Str ing& arg1, const String& arg2, const String& arg3);
540 void logEventIfIsolatedWorldAndInDocument(const String& eventName, const Str ing& arg1, const String& arg2, const String& arg3, const String& arg4); 542 void logEventIfIsolatedWorldAndInDocument(const String& eventName, const Str ing& arg1, const String& arg2, const String& arg3, const String& arg4);
541 543
542 DECLARE_VIRTUAL_TRACE(); 544 DECLARE_VIRTUAL_TRACE();
543 545
544 SpellcheckAttributeState spellcheckAttributeState() const; 546 SpellcheckAttributeState spellcheckAttributeState() const;
545 547
548 WeakPtrWillBeRawPtr<Element> createWeakPtr();
549
550 void addIntersectionObservation(IntersectionObservation&);
551 void removeIntersectionObservation(IntersectionObservation&);
552
553 bool computeIntersection(Element*, LayoutRect&, LayoutRect&, LayoutRect&);
554
546 protected: 555 protected:
547 Element(const QualifiedName& tagName, Document*, ConstructionType); 556 Element(const QualifiedName& tagName, Document*, ConstructionType);
548 557
549 const ElementData* elementData() const { return m_elementData.get(); } 558 const ElementData* elementData() const { return m_elementData.get(); }
550 UniqueElementData& ensureUniqueElementData(); 559 UniqueElementData& ensureUniqueElementData();
551 560
552 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); 561 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier);
553 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType); 562 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType);
554 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); 563 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value);
555 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, PassRefPtrWillBeRawPtr<CSSValue>); 564 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, PassRefPtrWillBeRawPtr<CSSValue>);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 934 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
926 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 935 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
927 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 936 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
928 { \ 937 { \
929 return adoptRefWillBeNoop(new T(tagName, document)); \ 938 return adoptRefWillBeNoop(new T(tagName, document)); \
930 } 939 }
931 940
932 } // namespace 941 } // namespace
933 942
934 #endif // Element_h 943 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698