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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp

Issue 2546393002: Make setNeedsActiveStyleUpdate mark treescope dirty only. (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 7 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com)
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return; 211 return;
212 212
213 m_linkLoader->released(); 213 m_linkLoader->released();
214 214
215 if (!wasConnected) { 215 if (!wasConnected) {
216 DCHECK(!linkStyle() || !linkStyle()->hasSheet()); 216 DCHECK(!linkStyle() || !linkStyle()->hasSheet());
217 return; 217 return;
218 } 218 }
219 document().styleEngine().removeStyleSheetCandidateNode(*this); 219 document().styleEngine().removeStyleSheetCandidateNode(*this);
220 220
221 StyleSheet* removedSheet = sheet();
222
223 if (m_link) 221 if (m_link)
224 m_link->ownerRemoved(); 222 m_link->ownerRemoved();
225 223
226 document().styleEngine().setNeedsActiveStyleUpdate(removedSheet, 224 document().styleEngine().setNeedsActiveStyleUpdate(treeScope());
meade_UTC10 2016/12/05 23:57:22 It looks like the treeScope is not yet registered
rune 2016/12/06 14:53:22 It's the wrong treeScope(), we should have found t
227 FullStyleUpdate); 225 // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet
226 // updates are async. https://crbug.com/567021
227 document().styleEngine().resolverChanged(FullStyleUpdate);
228 } 228 }
229 229
230 void HTMLLinkElement::finishParsingChildren() { 230 void HTMLLinkElement::finishParsingChildren() {
231 m_createdByParser = false; 231 m_createdByParser = false;
232 HTMLElement::finishParsingChildren(); 232 HTMLElement::finishParsingChildren();
233 } 233 }
234 234
235 bool HTMLLinkElement::styleSheetIsLoading() const { 235 bool HTMLLinkElement::styleSheetIsLoading() const {
236 return linkStyle() && linkStyle()->styleSheetIsLoading(); 236 return linkStyle() && linkStyle()->styleSheetIsLoading();
237 } 237 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 LinkLoaderClient::trace(visitor); 360 LinkLoaderClient::trace(visitor);
361 DOMTokenListObserver::trace(visitor); 361 DOMTokenListObserver::trace(visitor);
362 } 362 }
363 363
364 DEFINE_TRACE_WRAPPERS(HTMLLinkElement) { 364 DEFINE_TRACE_WRAPPERS(HTMLLinkElement) {
365 visitor->traceWrappers(m_relList); 365 visitor->traceWrappers(m_relList);
366 HTMLElement::traceWrappers(visitor); 366 HTMLElement::traceWrappers(visitor);
367 } 367 }
368 368
369 } // namespace blink 369 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698