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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 } | 1126 } |
1127 return hasItems ? mediaArray : nullptr; | 1127 return hasItems ? mediaArray : nullptr; |
1128 } | 1128 } |
1129 | 1129 |
1130 InspectorStyleSheetForInlineStyle* InspectorCSSAgent::asInspectorStyleSheet(Elem
ent* element) | 1130 InspectorStyleSheetForInlineStyle* InspectorCSSAgent::asInspectorStyleSheet(Elem
ent* element) |
1131 { | 1131 { |
1132 NodeToInspectorStyleSheet::iterator it = m_nodeToInspectorStyleSheet.find(el
ement); | 1132 NodeToInspectorStyleSheet::iterator it = m_nodeToInspectorStyleSheet.find(el
ement); |
1133 if (it != m_nodeToInspectorStyleSheet.end()) | 1133 if (it != m_nodeToInspectorStyleSheet.end()) |
1134 return it->value.get(); | 1134 return it->value.get(); |
1135 | 1135 |
1136 CSSStyleDeclaration* style = element->isStyledElement() ? element->style() :
0; | 1136 CSSStyleDeclaration* style = element->style(); |
1137 if (!style) | 1137 if (!style) |
1138 return 0; | 1138 return 0; |
1139 | 1139 |
1140 String newStyleSheetId = String::number(m_lastStyleSheetId++); | 1140 String newStyleSheetId = String::number(m_lastStyleSheetId++); |
1141 RefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet =
InspectorStyleSheetForInlineStyle::create(newStyleSheetId, element, this); | 1141 RefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet =
InspectorStyleSheetForInlineStyle::create(newStyleSheetId, element, this); |
1142 m_idToInspectorStyleSheetForInlineStyle.set(newStyleSheetId, inspectorStyleS
heet); | 1142 m_idToInspectorStyleSheetForInlineStyle.set(newStyleSheetId, inspectorStyleS
heet); |
1143 m_nodeToInspectorStyleSheet.set(element, inspectorStyleSheet); | 1143 m_nodeToInspectorStyleSheet.set(element, inspectorStyleSheet); |
1144 return inspectorStyleSheet.get(); | 1144 return inspectorStyleSheet.get(); |
1145 } | 1145 } |
1146 | 1146 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 visitor->trace(m_invalidatedDocuments); | 1446 visitor->trace(m_invalidatedDocuments); |
1447 visitor->trace(m_nodeToInspectorStyleSheet); | 1447 visitor->trace(m_nodeToInspectorStyleSheet); |
1448 visitor->trace(m_documentToViaInspectorStyleSheet); | 1448 visitor->trace(m_documentToViaInspectorStyleSheet); |
1449 #endif | 1449 #endif |
1450 visitor->trace(m_inspectorUserAgentStyleSheet); | 1450 visitor->trace(m_inspectorUserAgentStyleSheet); |
1451 InspectorBaseAgent::trace(visitor); | 1451 InspectorBaseAgent::trace(visitor); |
1452 } | 1452 } |
1453 | 1453 |
1454 } // namespace blink | 1454 } // namespace blink |
1455 | 1455 |
OLD | NEW |