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

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

Issue 2350743002: Remove unused StyleElement::clearDocumentData(). (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.h ('k') | no next file » | 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 (C) 2006, 2007 Rob Buis 2 * Copyright (C) 2006, 2007 Rob Buis
3 * Copyright (C) 2008 Apple, Inc. All rights reserved. 3 * Copyright (C) 2008 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 StyleSheet* removedSheet = m_sheet.get(); 100 StyleSheet* removedSheet = m_sheet.get();
101 101
102 if (m_sheet) 102 if (m_sheet)
103 clearSheet(element); 103 clearSheet(element);
104 if (removedSheet) 104 if (removedSheet)
105 document.styleEngine().setNeedsActiveStyleUpdate(removedSheet, AnalyzedS tyleUpdate); 105 document.styleEngine().setNeedsActiveStyleUpdate(removedSheet, AnalyzedS tyleUpdate);
106 } 106 }
107 107
108 void StyleElement::clearDocumentData(Document& document, Element* element)
109 {
110 if (m_sheet)
111 m_sheet->clearOwnerNode();
112
113 if (m_registeredAsCandidate) {
114 DCHECK(element->isConnected());
115 document.styleEngine().removeStyleSheetCandidateNode(element, element->t reeScope());
116 m_registeredAsCandidate = false;
117 }
118 }
119
120 StyleElement::ProcessingResult StyleElement::childrenChanged(Element* element) 108 StyleElement::ProcessingResult StyleElement::childrenChanged(Element* element)
121 { 109 {
122 DCHECK(element); 110 DCHECK(element);
123 if (m_createdByParser) 111 if (m_createdByParser)
124 return ProcessingSuccessful; 112 return ProcessingSuccessful;
125 113
126 return process(element); 114 return process(element);
127 } 115 }
128 116
129 StyleElement::ProcessingResult StyleElement::finishParsingChildren(Element* elem ent) 117 StyleElement::ProcessingResult StyleElement::finishParsingChildren(Element* elem ent)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 { 214 {
227 document.styleEngine().addPendingSheet(m_styleEngineContext); 215 document.styleEngine().addPendingSheet(m_styleEngineContext);
228 } 216 }
229 217
230 DEFINE_TRACE(StyleElement) 218 DEFINE_TRACE(StyleElement)
231 { 219 {
232 visitor->trace(m_sheet); 220 visitor->trace(m_sheet);
233 } 221 }
234 222
235 } // namespace blink 223 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698