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

Side by Side Diff: third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp

Issue 1843693002: Introduce setNeedsActiveStyleUpdate for adding/removing stylesheets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (m_sheet) { 286 if (m_sheet) {
287 ASSERT(m_sheet->ownerNode() == this); 287 ASSERT(m_sheet->ownerNode() == this);
288 clearSheet(); 288 clearSheet();
289 } 289 }
290 290
291 // No need to remove pending sheets. 291 // No need to remove pending sheets.
292 clearResource(); 292 clearResource();
293 293
294 // If we're in document teardown, then we don't need to do any notification of our sheet's removal. 294 // If we're in document teardown, then we don't need to do any notification of our sheet's removal.
295 if (document().isActive()) 295 if (document().isActive())
296 document().removedStyleSheet(removedSheet.get()); 296 document().styleEngine().setNeedsActiveStyleUpdate(removedSheet.get(), F ullStyleUpdate);
297 } 297 }
298 298
299 void ProcessingInstruction::clearSheet() 299 void ProcessingInstruction::clearSheet()
300 { 300 {
301 ASSERT(m_sheet); 301 ASSERT(m_sheet);
302 if (m_sheet->isLoading()) 302 if (m_sheet->isLoading())
303 document().styleEngine().removePendingSheet(this); 303 document().styleEngine().removePendingSheet(this);
304 m_sheet.release()->clearOwnerNode(); 304 m_sheet.release()->clearOwnerNode();
305 } 305 }
306 306
307 DEFINE_TRACE(ProcessingInstruction) 307 DEFINE_TRACE(ProcessingInstruction)
308 { 308 {
309 visitor->trace(m_sheet); 309 visitor->trace(m_sheet);
310 visitor->trace(m_listenerForXSLT); 310 visitor->trace(m_listenerForXSLT);
311 CharacterData::trace(visitor); 311 CharacterData::trace(visitor);
312 ResourceOwner<StyleSheetResource>::trace(visitor); 312 ResourceOwner<StyleSheetResource>::trace(visitor);
313 } 313 }
314 314
315 } // namespace blink 315 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/StyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698