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

Side by Side Diff: Source/core/css/invalidation/StyleInvalidator.cpp

Issue 201443011: Fix markAncestorsWithChildNeedsStyleInvalidation to actually mark only ancestors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "core/css/invalidation/StyleInvalidator.h" 8 #include "core/css/invalidation/StyleInvalidator.h"
9 9
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
11 #include "core/dom/Element.h" 11 #include "core/dom/Element.h"
12 #include "core/dom/ElementTraversal.h" 12 #include "core/dom/ElementTraversal.h"
13 #include "core/dom/shadow/ElementShadow.h" 13 #include "core/dom/shadow/ElementShadow.h"
14 #include "core/dom/shadow/ShadowRoot.h" 14 #include "core/dom/shadow/ShadowRoot.h"
15 #include "core/rendering/RenderObject.h" 15 #include "core/rendering/RenderObject.h"
16 16
17 namespace WebCore { 17 namespace WebCore {
18 18
19 void StyleInvalidator::invalidate() 19 void StyleInvalidator::invalidate()
20 { 20 {
21 if (Element* documentElement = m_document.documentElement()) { 21 if (Element* documentElement = m_document.documentElement()) {
22 if (documentElement->childNeedsStyleInvalidation()) 22 invalidate(*documentElement);
23 invalidate(*documentElement);
24 } 23 }
ojan 2014/03/22 01:14:41 Nit: no curlies.
chrishtr 2014/03/22 01:16:13 Done.
25 m_document.clearChildNeedsStyleInvalidation(); 24 m_document.clearChildNeedsStyleInvalidation();
26 m_document.clearNeedsStyleInvalidation(); 25 m_document.clearNeedsStyleInvalidation();
27 m_pendingInvalidationMap.clear(); 26 m_pendingInvalidationMap.clear();
28 } 27 }
29 28
30 StyleInvalidator::StyleInvalidator(Document& document) 29 StyleInvalidator::StyleInvalidator(Document& document)
31 : m_document(document) 30 : m_document(document)
32 , m_pendingInvalidationMap(document.styleResolver()->ruleFeatureSet().pendin gInvalidationMap()) 31 , m_pendingInvalidationMap(document.styleResolver()->ruleFeatureSet().pendin gInvalidationMap())
33 { } 32 { }
34 33
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 118 }
120 } 119 }
121 120
122 element.clearChildNeedsStyleInvalidation(); 121 element.clearChildNeedsStyleInvalidation();
123 element.clearNeedsStyleInvalidation(); 122 element.clearNeedsStyleInvalidation();
124 123
125 return thisElementNeedsStyleRecalc; 124 return thisElementNeedsStyleRecalc;
126 } 125 }
127 126
128 } // namespace WebCore 127 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698