Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index f33de88828625bc869a80e4e0fb9c2575863396d..e1cbf151fe88f7bbdf108b79356b814a4212a9a5 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1808,47 +1808,6 @@ void Element::detachLayoutTree(const AttachContext& context) { |
DCHECK(needsAttach()); |
} |
-void Element::pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, |
- ComputedStyle* newStyle) { |
- // TODO(rune@opera.com): This method does not take into account pseudo style |
- // which is only present for the newStyle. Also the first-line part should |
- // probably be moved to where we handle visual invalidation diff for setStyle. |
- // setHasPseudoStyle() calls are probably unnecessary. |
- DCHECK_EQ(currentStyle, computedStyle()); |
- DCHECK(layoutObject()); |
- |
- if (!currentStyle) |
- return; |
- |
- const PseudoStyleCache* pseudoStyleCache = currentStyle->cachedPseudoStyles(); |
- if (!pseudoStyleCache) |
- return; |
- |
- size_t cacheSize = pseudoStyleCache->size(); |
- for (size_t i = 0; i < cacheSize; ++i) { |
- RefPtr<ComputedStyle> newPseudoStyle; |
- RefPtr<ComputedStyle> oldPseudoStyle = pseudoStyleCache->at(i); |
- PseudoId pseudoId = oldPseudoStyle->styleType(); |
- if (pseudoId != PseudoIdFirstLine && pseudoId != PseudoIdFirstLineInherited) |
- continue; |
- newPseudoStyle = layoutObject()->uncachedFirstLineStyle(newStyle); |
- if (!newPseudoStyle) |
- continue; |
- if (*oldPseudoStyle != *newPseudoStyle || |
- oldPseudoStyle->font().loadingCustomFonts() != |
- newPseudoStyle->font().loadingCustomFonts()) { |
- if (pseudoId < FirstInternalPseudoId) |
- newStyle->setHasPseudoStyle(pseudoId); |
- newStyle->addCachedPseudoStyle(newPseudoStyle); |
- if (pseudoId == PseudoIdFirstLine || |
- pseudoId == PseudoIdFirstLineInherited) { |
- layoutObject()->firstLineStyleDidChange(*oldPseudoStyle, |
- *newPseudoStyle); |
- } |
- } |
- } |
-} |
- |
PassRefPtr<ComputedStyle> Element::styleForLayoutObject() { |
DCHECK(document().inStyleRecalc()); |
@@ -2036,7 +1995,6 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change, |
if (LayoutObject* layoutObject = this->layoutObject()) { |
if (localChange != NoChange) { |
- pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get()); |
layoutObject->setStyle(newStyle.get()); |
} else { |
// Although no change occurred, we use the new style so that the cousin |