Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Exploit shared attribute data to avoid parsing identical "style" attr…
…ibutes. <http://webkit.org/b/101163> Reviewed by Antti Koivisto. Track the "inline style dirty" state on ElementAttributeData instead of in a Node flag. This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements, since the state is no longer per-Element. * css/StyleResolver.cpp: (WebCore::isCacheableInMatchedPropertiesCache): Disable the matched properties cache for styles with non-standard writing-mode. This is necessary because some CSS properties have different meaning depending on context - properties handled by CSSProperty::resolveDirectionAwareProperty(). Now that multiple elements may have identical inlineStyle() pointers, this is necessary to avoid mapping StylePropertySets with direction-aware properties to RenderStyles with differing writing-modes in the matched properties cache. * dom/Node.h: * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ElementAttributeData): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::ElementAttributeData): (ElementAttributeData): * dom/Element.h: (WebCore::Element::updateInvalidAttributes): * dom/Element.cpp: (WebCore::Element::getAttribute): (WebCore::Element::removeAttribute): * dom/StyledElement.h: (WebCore::StyledElement::invalidateStyleAttribute): * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): Move "style attribute dirty" flag to ElementAttributeData. (WebCore::Element::cloneAttributesFromElement): Remove ugly optimization to avoid reparsing inline style when cloning elements. This now happens automagically since cloning nodes just refs the original attribute data. * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): (WebCore::StyledElement::setInlineStyleFromString): (WebCore::StyledElement::styleAttributeChanged): (WebCore::StyledElement::inlineStyleChanged): Avoid reparsing the inline style if the element's attribute data is immutable and already has a parsed inlineStyle(). Split the set-inline-style-from-string code out of styleAttributeChanged() to make the code more understandable. Canonical link: https://commits.webkit.org/120704@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Andreas Kling
committed
Nov 17, 2012
1 parent
e6c5703
commit 83ba6b1abf1ad8558698bd04d96232d9367a14f6
Showing
9 changed files
with
125 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters