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

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

Issue 2220873002: Add a fast-path for independent inherited properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added 2 more tests Created 4 years, 4 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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 bool isDocumentNode() const = delete; // This will catch anyone doing an unn ecessary check. 659 bool isDocumentNode() const = delete; // This will catch anyone doing an unn ecessary check.
660 660
661 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi ficationReason); 661 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi ficationReason);
662 662
663 void updatePresentationAttributeStyle(); 663 void updatePresentationAttributeStyle();
664 664
665 void inlineStyleChanged(); 665 void inlineStyleChanged();
666 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); 666 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper();
667 void setInlineStyleFromString(const AtomicString&); 667 void setInlineStyleFromString(const AtomicString&);
668 668
669 // If the only inherited changes in the parent element are independent,
670 // these changes can be directly propagated to this element (the child).
671 // If these conditions are met, propagates the changes to the current style
672 // and returns the new style. Otherwise, returns null.
673 PassRefPtr<ComputedStyle> propagateInheritedProperties(StyleRecalcChange);
674
669 StyleRecalcChange recalcOwnStyle(StyleRecalcChange); 675 StyleRecalcChange recalcOwnStyle(StyleRecalcChange);
670 // TODO(nainar): Make this const ComputedStyle&. 676 // TODO(nainar): Make this const ComputedStyle&.
671 StyleRecalcChange buildLayoutTree(ComputedStyle&); 677 StyleRecalcChange buildLayoutTree(ComputedStyle&);
672 678
673 inline void checkForEmptyStyleChange(); 679 inline void checkForEmptyStyleChange();
674 680
675 void updatePseudoElement(PseudoId, StyleRecalcChange); 681 void updatePseudoElement(PseudoId, StyleRecalcChange);
676 bool updateFirstLetter(Element*); 682 bool updateFirstLetter(Element*);
677 683
678 inline void createPseudoElementIfNeeded(PseudoId); 684 inline void createPseudoElementIfNeeded(PseudoId);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 static T* create(const QualifiedName&, Document&) 990 static T* create(const QualifiedName&, Document&)
985 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 991 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
986 T* T::create(const QualifiedName& tagName, Document& document) \ 992 T* T::create(const QualifiedName& tagName, Document& document) \
987 { \ 993 { \
988 return new T(tagName, document); \ 994 return new T(tagName, document); \
989 } 995 }
990 996
991 } // namespace blink 997 } // namespace blink
992 998
993 #endif // Element_h 999 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolverStats.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