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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 FrontendOperationScope() { ++s_frontendOperationCounter; } | 95 FrontendOperationScope() { ++s_frontendOperationCounter; } |
96 ~FrontendOperationScope() { --s_frontendOperationCounter; } | 96 ~FrontendOperationScope() { --s_frontendOperationCounter; } |
97 }; | 97 }; |
98 | 98 |
99 using namespace blink; | 99 using namespace blink; |
100 | 100 |
101 String createShorthandValue(Document* document, const String& shorthand, const S
tring& oldText, const String& longhand, const String& newValue) | 101 String createShorthandValue(Document* document, const String& shorthand, const S
tring& oldText, const String& longhand, const String& newValue) |
102 { | 102 { |
103 StyleSheetContents* styleSheetContents = StyleSheetContents::create(strictCS
SParserContext()); | 103 StyleSheetContents* styleSheetContents = StyleSheetContents::create(strictCS
SParserContext()); |
104 String text = " div { " + shorthand + ": " + oldText + "; }"; | 104 String text = " div { " + shorthand + ": " + oldText + "; }"; |
105 CSSParser::parseSheet(CSSParserContext(*document, 0), styleSheetContents, te
xt); | 105 CSSParser::parseSheet(CSSParserContext(*document, nullptr), styleSheetConten
ts, text); |
106 | 106 |
107 CSSStyleSheet* styleSheet = CSSStyleSheet::create(styleSheetContents); | 107 CSSStyleSheet* styleSheet = CSSStyleSheet::create(styleSheetContents); |
108 CSSStyleRule* rule = toCSSStyleRule(styleSheet->item(0)); | 108 CSSStyleRule* rule = toCSSStyleRule(styleSheet->item(0)); |
109 CSSStyleDeclaration* style = rule->style(); | 109 CSSStyleDeclaration* style = rule->style(); |
110 TrackExceptionState exceptionState; | 110 TrackExceptionState exceptionState; |
111 style->setProperty(longhand, newValue, style->getPropertyPriority(longhand),
exceptionState); | 111 style->setProperty(longhand, newValue, style->getPropertyPriority(longhand),
exceptionState); |
112 return style->getPropertyValue(shorthand); | 112 return style->getPropertyValue(shorthand); |
113 } | 113 } |
114 | 114 |
115 HeapVector<Member<CSSStyleRule>> filterDuplicateRules(CSSRuleList* ruleList) | 115 HeapVector<Member<CSSStyleRule>> filterDuplicateRules(CSSRuleList* ruleList) |
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); | 2072 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); |
2073 visitor->trace(m_documentToCSSStyleSheets); | 2073 visitor->trace(m_documentToCSSStyleSheets); |
2074 visitor->trace(m_invalidatedDocuments); | 2074 visitor->trace(m_invalidatedDocuments); |
2075 visitor->trace(m_nodeToInspectorStyleSheet); | 2075 visitor->trace(m_nodeToInspectorStyleSheet); |
2076 visitor->trace(m_documentToViaInspectorStyleSheet); | 2076 visitor->trace(m_documentToViaInspectorStyleSheet); |
2077 visitor->trace(m_inspectorUserAgentStyleSheet); | 2077 visitor->trace(m_inspectorUserAgentStyleSheet); |
2078 InspectorBaseAgent::trace(visitor); | 2078 InspectorBaseAgent::trace(visitor); |
2079 } | 2079 } |
2080 | 2080 |
2081 } // namespace blink | 2081 } // namespace blink |
OLD | NEW |