Chromium Code Reviews| 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 9e6b7c37f71635fba78318c06a7f27d988e7ba0e..86ea126642208c22b37eac3877686b5ac9ba5188 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(); |
|
rune
2017/04/19 20:34:52
Do we retain the ComputedStyle on each node now, e
nainar
2017/04/19 23:43:41
For the needs of this patch I should delete the co
rune
2017/04/20 08:56:39
So, if we have a subtree of N elements which is in
nainar
2017/04/21 00:51:30
We shouldn't be retaining the nonAttachedStyle for
rune
2017/04/21 07:41:46
No, this was more of a future concern.
nainar
2017/04/26 02:55:16
Done.
Had to change Node::setNonAttachedStyle()
rune
2017/04/26 08:47:28
Sorry for being unclear, but I think the patch set
|
| 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( |
| @@ -6593,7 +6576,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); |