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

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

Issue 2398293003: Move Layout Tree Construction code into Element::rebuildLayoutTree() (Closed)
Patch Set: Final patch to land Created 4 years, 2 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 * 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 bool hasEquivalentAttributes(const Element* other) const; 394 bool hasEquivalentAttributes(const Element* other) const;
395 395
396 virtual void copyNonAttributePropertiesFromElement(const Element&) {} 396 virtual void copyNonAttributePropertiesFromElement(const Element&) {}
397 397
398 void attachLayoutTree(const AttachContext& = AttachContext()) override; 398 void attachLayoutTree(const AttachContext& = AttachContext()) override;
399 void detachLayoutTree(const AttachContext& = AttachContext()) override; 399 void detachLayoutTree(const AttachContext& = AttachContext()) override;
400 400
401 virtual LayoutObject* createLayoutObject(const ComputedStyle&); 401 virtual LayoutObject* createLayoutObject(const ComputedStyle&);
402 virtual bool layoutObjectIsNeeded(const ComputedStyle&); 402 virtual bool layoutObjectIsNeeded(const ComputedStyle&);
403 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr); 403 void recalcStyle(StyleRecalcChange);
404 StyleRecalcChange rebuildLayoutTree();
404 void pseudoStateChanged(CSSSelector::PseudoType); 405 void pseudoStateChanged(CSSSelector::PseudoType);
405 void setAnimationStyleChange(bool); 406 void setAnimationStyleChange(bool);
406 void clearAnimationStyleChange(); 407 void clearAnimationStyleChange();
407 void setNeedsAnimationStyleRecalc(); 408 void setNeedsAnimationStyleRecalc();
408 409
409 void setNeedsCompositingUpdate(); 410 void setNeedsCompositingUpdate();
410 411
411 bool supportsStyleSharing() const; 412 bool supportsStyleSharing() const;
412 413
413 ElementShadow* shadow() const; 414 ElementShadow* shadow() const;
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 void inlineStyleChanged(); 817 void inlineStyleChanged();
817 void setInlineStyleFromString(const AtomicString&); 818 void setInlineStyleFromString(const AtomicString&);
818 819
819 // If the only inherited changes in the parent element are independent, 820 // If the only inherited changes in the parent element are independent,
820 // these changes can be directly propagated to this element (the child). 821 // these changes can be directly propagated to this element (the child).
821 // If these conditions are met, propagates the changes to the current style 822 // If these conditions are met, propagates the changes to the current style
822 // and returns the new style. Otherwise, returns null. 823 // and returns the new style. Otherwise, returns null.
823 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange); 824 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange);
824 825
825 StyleRecalcChange recalcOwnStyle(StyleRecalcChange); 826 StyleRecalcChange recalcOwnStyle(StyleRecalcChange);
826 StyleRecalcChange rebuildLayoutTree();
827
828 inline void checkForEmptyStyleChange(); 827 inline void checkForEmptyStyleChange();
829 828
830 void updatePseudoElement(PseudoId, StyleRecalcChange); 829 void updatePseudoElement(PseudoId, StyleRecalcChange);
831 bool updateFirstLetter(Element*); 830 bool updateFirstLetter(Element*);
832 831
833 inline void createPseudoElementIfNeeded(PseudoId); 832 inline void createPseudoElementIfNeeded(PseudoId);
834 833
835 ShadowRoot* shadowRoot() const; 834 ShadowRoot* shadowRoot() const;
836 835
837 // FIXME: Everyone should allow author shadows. 836 // FIXME: Everyone should allow author shadows.
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1159 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1161 static T* create(const QualifiedName&, Document&) 1160 static T* create(const QualifiedName&, Document&)
1162 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1161 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1163 T* T::create(const QualifiedName& tagName, Document& document) { \ 1162 T* T::create(const QualifiedName& tagName, Document& document) { \
1164 return new T(tagName, document); \ 1163 return new T(tagName, document); \
1165 } 1164 }
1166 1165
1167 } // namespace blink 1166 } // namespace blink
1168 1167
1169 #endif // Element_h 1168 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698