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

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

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Commit the renames Created 4 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 bool hasEquivalentAttributes(const Element* other) const; 391 bool hasEquivalentAttributes(const Element* other) const;
392 392
393 virtual void copyNonAttributePropertiesFromElement(const Element&) {} 393 virtual void copyNonAttributePropertiesFromElement(const Element&) {}
394 394
395 void attachLayoutTree(const AttachContext& = AttachContext()) override; 395 void attachLayoutTree(const AttachContext& = AttachContext()) override;
396 void detachLayoutTree(const AttachContext& = AttachContext()) override; 396 void detachLayoutTree(const AttachContext& = AttachContext()) override;
397 397
398 virtual LayoutObject* createLayoutObject(const ComputedStyle&); 398 virtual LayoutObject* createLayoutObject(const ComputedStyle&);
399 virtual bool layoutObjectIsNeeded(const ComputedStyle&); 399 virtual bool layoutObjectIsNeeded(const ComputedStyle&);
400 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr); 400 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr);
401 StyleRecalcChange rebuildLayoutTree(); 401 void rebuildLayoutTree();
402 void pseudoStateChanged(CSSSelector::PseudoType); 402 void pseudoStateChanged(CSSSelector::PseudoType);
403 void setAnimationStyleChange(bool); 403 void setAnimationStyleChange(bool);
404 void clearAnimationStyleChange(); 404 void clearAnimationStyleChange();
405 void setNeedsAnimationStyleRecalc(); 405 void setNeedsAnimationStyleRecalc();
406 406
407 void setNeedsCompositingUpdate(); 407 void setNeedsCompositingUpdate();
408 408
409 bool supportsStyleSharing() const; 409 bool supportsStyleSharing() const;
410 410
411 ElementShadow* shadow() const; 411 ElementShadow* shadow() const;
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 void inlineStyleChanged(); 814 void inlineStyleChanged();
815 void setInlineStyleFromString(const AtomicString&); 815 void setInlineStyleFromString(const AtomicString&);
816 816
817 // If the only inherited changes in the parent element are independent, 817 // If the only inherited changes in the parent element are independent,
818 // these changes can be directly propagated to this element (the child). 818 // these changes can be directly propagated to this element (the child).
819 // If these conditions are met, propagates the changes to the current style 819 // If these conditions are met, propagates the changes to the current style
820 // and returns the new style. Otherwise, returns null. 820 // and returns the new style. Otherwise, returns null.
821 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange); 821 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange);
822 822
823 StyleRecalcChange recalcOwnStyle(StyleRecalcChange, Text*); 823 StyleRecalcChange recalcOwnStyle(StyleRecalcChange, Text*);
824 void reattachPseudoElementLayoutTree(PseudoId);
825 void rebuildShadowRootLayoutTree();
824 inline void checkForEmptyStyleChange(); 826 inline void checkForEmptyStyleChange();
825 827
826 void updatePseudoElement(PseudoId, StyleRecalcChange); 828 void updatePseudoElement(PseudoId, StyleRecalcChange);
827 bool updateFirstLetter(Element*); 829 bool updateFirstLetter(Element*);
828 830
829 inline void createPseudoElementIfNeeded(PseudoId); 831 inline void createPseudoElementIfNeeded(PseudoId);
830 832
831 ShadowRoot* shadowRoot() const; 833 ShadowRoot* shadowRoot() const;
832 834
833 // FIXME: Everyone should allow author shadows. 835 // FIXME: Everyone should allow author shadows.
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1157 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1156 static T* create(const QualifiedName&, Document&) 1158 static T* create(const QualifiedName&, Document&)
1157 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1159 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1158 T* T::create(const QualifiedName& tagName, Document& document) { \ 1160 T* T::create(const QualifiedName& tagName, Document& document) { \
1159 return new T(tagName, document); \ 1161 return new T(tagName, document); \
1160 } 1162 }
1161 1163
1162 } // namespace blink 1164 } // namespace blink
1163 1165
1164 #endif // Element_h 1166 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698