Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 69ad410b845dbacf75de6f30e7f823ac720a2961..af9e5794c6a16bbad7a3b998bdbbfbaea49a69b9 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -1433,19 +1433,6 @@ Element* Document::ScrollingElementNoLayout() { |
return body(); |
} |
-// We use HashMap::set over HashMap::add here as we want to |
-// replace the ComputedStyle but not the Node if the Node is |
-// already present. |
-void Document::AddNonAttachedStyle(const Node& node, |
- RefPtr<ComputedStyle> computed_style) { |
- DCHECK(node.IsElementNode() || node.IsTextNode()); |
- non_attached_style_.Set(&node, computed_style); |
-} |
- |
-ComputedStyle* Document::GetNonAttachedStyle(const Node& node) const { |
- return non_attached_style_.at(&node); |
-} |
- |
/* |
* Performs three operations: |
* 1. Convert control characters to spaces |
@@ -2127,9 +2114,6 @@ void Document::UpdateStyle() { |
View()->RecalcOverflowAfterStyleChange(); |
- // Only retain the HashMap for the duration of StyleRecalc and |
- // LayoutTreeConstruction. |
- non_attached_style_.clear(); |
ClearChildNeedsStyleRecalc(); |
ClearChildNeedsReattachLayoutTree(); |
@@ -2141,7 +2125,6 @@ void Document::UpdateStyle() { |
DCHECK(!ChildNeedsReattachLayoutTree()); |
DCHECK(InStyleRecalc()); |
DCHECK_EQ(GetStyleResolver(), &resolver); |
- DCHECK(non_attached_style_.IsEmpty()); |
lifecycle_.AdvanceTo(DocumentLifecycle::kStyleClean); |
if (should_record_stats) { |
TRACE_EVENT_END2( |
@@ -6649,7 +6632,6 @@ DEFINE_TRACE(Document) { |
visitor->Trace(snap_coordinator_); |
visitor->Trace(resize_observer_controller_); |
visitor->Trace(property_registry_); |
- visitor->Trace(non_attached_style_); |
visitor->Trace(network_state_observer_); |
Supplementable<Document>::Trace(visitor); |
TreeScope::Trace(visitor); |