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

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

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: FirstLetterPseudoElements are not being created 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 void inlineStyleChanged(); 812 void inlineStyleChanged();
813 void setInlineStyleFromString(const AtomicString&); 813 void setInlineStyleFromString(const AtomicString&);
814 814
815 // If the only inherited changes in the parent element are independent, 815 // If the only inherited changes in the parent element are independent,
816 // these changes can be directly propagated to this element (the child). 816 // these changes can be directly propagated to this element (the child).
817 // If these conditions are met, propagates the changes to the current style 817 // If these conditions are met, propagates the changes to the current style
818 // and returns the new style. Otherwise, returns null. 818 // and returns the new style. Otherwise, returns null.
819 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange); 819 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange);
820 820
821 StyleRecalcChange recalcOwnStyle(StyleRecalcChange, Text*); 821 StyleRecalcChange recalcOwnStyle(StyleRecalcChange, Text*);
822 void reattachPseudoElementLayoutTree(PseudoId);
823 void rebuildShadowRootLayoutTree();
822 inline void checkForEmptyStyleChange(); 824 inline void checkForEmptyStyleChange();
823 825
824 void updatePseudoElement(PseudoId, StyleRecalcChange); 826 void updatePseudoElement(PseudoId, StyleRecalcChange);
825 bool updateFirstLetter(Element*); 827 bool updateFirstLetter(Element*);
826 828
827 inline void createPseudoElementIfNeeded(PseudoId); 829 inline void createPseudoElementIfNeeded(PseudoId);
828 830
829 ShadowRoot* shadowRoot() const; 831 ShadowRoot* shadowRoot() const;
830 832
831 // FIXME: Everyone should allow author shadows. 833 // FIXME: Everyone should allow author shadows.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1176 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1175 static T* create(const QualifiedName&, Document&) 1177 static T* create(const QualifiedName&, Document&)
1176 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1178 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1177 T* T::create(const QualifiedName& tagName, Document& document) { \ 1179 T* T::create(const QualifiedName& tagName, Document& document) { \
1178 return new T(tagName, document); \ 1180 return new T(tagName, document); \
1179 } 1181 }
1180 1182
1181 } // namespace blink 1183 } // namespace blink
1182 1184
1183 #endif // Element_h 1185 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698