OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1358 void InspectorStyleSheet::innerSetText(const String& text, bool markAsLocallyMod
ified) | 1358 void InspectorStyleSheet::innerSetText(const String& text, bool markAsLocallyMod
ified) |
1359 { | 1359 { |
1360 RuleSourceDataList ruleTree; | 1360 RuleSourceDataList ruleTree; |
1361 StyleSheetContents* styleSheet = StyleSheetContents::create(m_pageStyleSheet
->contents()->parserContext()); | 1361 StyleSheetContents* styleSheet = StyleSheetContents::create(m_pageStyleSheet
->contents()->parserContext()); |
1362 StyleSheetHandler handler(text, m_pageStyleSheet->ownerDocument(), &ruleTree
); | 1362 StyleSheetHandler handler(text, m_pageStyleSheet->ownerDocument(), &ruleTree
); |
1363 CSSParser::parseSheetForInspector(m_pageStyleSheet->contents()->parserContex
t(), styleSheet, text, handler); | 1363 CSSParser::parseSheetForInspector(m_pageStyleSheet->contents()->parserContex
t(), styleSheet, text, handler); |
1364 CSSStyleSheet* sourceDataSheet = nullptr; | 1364 CSSStyleSheet* sourceDataSheet = nullptr; |
1365 if (toCSSImportRule(m_pageStyleSheet->ownerRule())) | 1365 if (toCSSImportRule(m_pageStyleSheet->ownerRule())) |
1366 sourceDataSheet = CSSStyleSheet::create(styleSheet, toCSSImportRule(m_pa
geStyleSheet->ownerRule())); | 1366 sourceDataSheet = CSSStyleSheet::create(styleSheet, toCSSImportRule(m_pa
geStyleSheet->ownerRule())); |
1367 else | 1367 else |
1368 sourceDataSheet = CSSStyleSheet::create(styleSheet, m_pageStyleSheet->ow
nerNode()); | 1368 sourceDataSheet = CSSStyleSheet::create(styleSheet, *m_pageStyleSheet->o
wnerNode()); |
1369 | 1369 |
1370 m_parsedFlatRules.clear(); | 1370 m_parsedFlatRules.clear(); |
1371 collectFlatRules(sourceDataSheet, &m_parsedFlatRules); | 1371 collectFlatRules(sourceDataSheet, &m_parsedFlatRules); |
1372 | 1372 |
1373 m_sourceData = wrapUnique(new RuleSourceDataList()); | 1373 m_sourceData = wrapUnique(new RuleSourceDataList()); |
1374 flattenSourceData(ruleTree, m_sourceData.get()); | 1374 flattenSourceData(ruleTree, m_sourceData.get()); |
1375 m_text = text; | 1375 m_text = text; |
1376 | 1376 |
1377 if (markAsLocallyModified) { | 1377 if (markAsLocallyModified) { |
1378 Element* element = ownerStyleElement(); | 1378 Element* element = ownerStyleElement(); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 } | 1862 } |
1863 | 1863 |
1864 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) | 1864 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) |
1865 { | 1865 { |
1866 visitor->trace(m_element); | 1866 visitor->trace(m_element); |
1867 visitor->trace(m_inspectorStyle); | 1867 visitor->trace(m_inspectorStyle); |
1868 InspectorStyleSheetBase::trace(visitor); | 1868 InspectorStyleSheetBase::trace(visitor); |
1869 } | 1869 } |
1870 | 1870 |
1871 } // namespace blink | 1871 } // namespace blink |
OLD | NEW |