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

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

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Make needsAttach() only check if getStyleChangeType flag is NeedsReattachStyleChange and add a Layo… Created 3 years, 9 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 bool hasEquivalentAttributes(const Element* other) const; 410 bool hasEquivalentAttributes(const Element* other) const;
411 411
412 virtual void copyNonAttributePropertiesFromElement(const Element&) {} 412 virtual void copyNonAttributePropertiesFromElement(const Element&) {}
413 413
414 void attachLayoutTree(const AttachContext& = AttachContext()) override; 414 void attachLayoutTree(const AttachContext& = AttachContext()) override;
415 void detachLayoutTree(const AttachContext& = AttachContext()) override; 415 void detachLayoutTree(const AttachContext& = AttachContext()) override;
416 416
417 virtual LayoutObject* createLayoutObject(const ComputedStyle&); 417 virtual LayoutObject* createLayoutObject(const ComputedStyle&);
418 virtual bool layoutObjectIsNeeded(const ComputedStyle&); 418 virtual bool layoutObjectIsNeeded(const ComputedStyle&);
419 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr); 419 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr);
420 StyleRecalcChange rebuildLayoutTree(); 420 void rebuildLayoutTree();
421 void pseudoStateChanged(CSSSelector::PseudoType); 421 void pseudoStateChanged(CSSSelector::PseudoType);
422 void setAnimationStyleChange(bool); 422 void setAnimationStyleChange(bool);
423 void clearAnimationStyleChange(); 423 void clearAnimationStyleChange();
424 void setNeedsAnimationStyleRecalc(); 424 void setNeedsAnimationStyleRecalc();
425 425
426 void setNeedsCompositingUpdate(); 426 void setNeedsCompositingUpdate();
427 427
428 bool supportsStyleSharing() const; 428 bool supportsStyleSharing() const;
429 429
430 ElementShadow* shadow() const; 430 ElementShadow* shadow() const;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 void inlineStyleChanged(); 840 void inlineStyleChanged();
841 void setInlineStyleFromString(const AtomicString&); 841 void setInlineStyleFromString(const AtomicString&);
842 842
843 // If the only inherited changes in the parent element are independent, 843 // If the only inherited changes in the parent element are independent,
844 // these changes can be directly propagated to this element (the child). 844 // these changes can be directly propagated to this element (the child).
845 // If these conditions are met, propagates the changes to the current style 845 // If these conditions are met, propagates the changes to the current style
846 // and returns the new style. Otherwise, returns null. 846 // and returns the new style. Otherwise, returns null.
847 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange); 847 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange);
848 848
849 StyleRecalcChange recalcOwnStyle(StyleRecalcChange, Text*); 849 StyleRecalcChange recalcOwnStyle(StyleRecalcChange, Text*);
850 void reattachPseudoElementLayoutTree(PseudoId);
851 void rebuildShadowRootLayoutTree();
850 inline void checkForEmptyStyleChange(); 852 inline void checkForEmptyStyleChange();
851 853
852 void updatePseudoElement(PseudoId, StyleRecalcChange); 854 void updatePseudoElement(PseudoId, StyleRecalcChange);
853 bool updateFirstLetter(Element*); 855 bool updateFirstLetter(Element*);
854 856
855 inline void createPseudoElementIfNeeded(PseudoId); 857 inline void createPseudoElementIfNeeded(PseudoId);
856 858
857 ShadowRoot* shadowRoot() const; 859 ShadowRoot* shadowRoot() const;
858 860
859 // FIXME: Everyone should allow author shadows. 861 // FIXME: Everyone should allow author shadows.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1204 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1203 static T* create(const QualifiedName&, Document&) 1205 static T* create(const QualifiedName&, Document&)
1204 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1206 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1205 T* T::create(const QualifiedName& tagName, Document& document) { \ 1207 T* T::create(const QualifiedName& tagName, Document& document) { \
1206 return new T(tagName, document); \ 1208 return new T(tagName, document); \
1207 } 1209 }
1208 1210
1209 } // namespace blink 1211 } // namespace blink
1210 1212
1211 #endif // Element_h 1213 #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