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 21 matching lines...) Expand all Loading... |
32 #include "core/css/CSSKeyframesRule.h" | 32 #include "core/css/CSSKeyframesRule.h" |
33 #include "core/css/CSSMediaRule.h" | 33 #include "core/css/CSSMediaRule.h" |
34 #include "core/css/CSSRuleList.h" | 34 #include "core/css/CSSRuleList.h" |
35 #include "core/css/CSSStyleRule.h" | 35 #include "core/css/CSSStyleRule.h" |
36 #include "core/css/CSSStyleSheet.h" | 36 #include "core/css/CSSStyleSheet.h" |
37 #include "core/css/CSSSupportsRule.h" | 37 #include "core/css/CSSSupportsRule.h" |
38 #include "core/css/StylePropertySet.h" | 38 #include "core/css/StylePropertySet.h" |
39 #include "core/css/StyleRule.h" | 39 #include "core/css/StyleRule.h" |
40 #include "core/css/StyleSheetContents.h" | 40 #include "core/css/StyleSheetContents.h" |
41 #include "core/css/parser/CSSParser.h" | 41 #include "core/css/parser/CSSParser.h" |
| 42 #include "core/dom/DOMNodeIds.h" |
42 #include "core/dom/Document.h" | 43 #include "core/dom/Document.h" |
43 #include "core/dom/Element.h" | 44 #include "core/dom/Element.h" |
44 #include "core/html/HTMLStyleElement.h" | 45 #include "core/html/HTMLStyleElement.h" |
45 #include "core/html/parser/HTMLParserIdioms.h" | 46 #include "core/html/parser/HTMLParserIdioms.h" |
46 #include "core/inspector/ContentSearchUtils.h" | 47 #include "core/inspector/ContentSearchUtils.h" |
47 #include "core/inspector/InspectorCSSAgent.h" | 48 #include "core/inspector/InspectorCSSAgent.h" |
48 #include "core/inspector/InspectorNodeIds.h" | |
49 #include "core/inspector/InspectorPageAgent.h" | 49 #include "core/inspector/InspectorPageAgent.h" |
50 #include "core/inspector/InspectorResourceAgent.h" | 50 #include "core/inspector/InspectorResourceAgent.h" |
51 #include "core/svg/SVGStyleElement.h" | 51 #include "core/svg/SVGStyleElement.h" |
52 #include "wtf/OwnPtr.h" | 52 #include "wtf/OwnPtr.h" |
53 #include "wtf/PassOwnPtr.h" | 53 #include "wtf/PassOwnPtr.h" |
54 #include "wtf/text/StringBuilder.h" | 54 #include "wtf/text/StringBuilder.h" |
55 #include "wtf/text/TextPosition.h" | 55 #include "wtf/text/TextPosition.h" |
56 | 56 |
57 using blink::TypeBuilder::Array; | 57 using blink::TypeBuilder::Array; |
58 using blink::RuleSourceDataList; | 58 using blink::RuleSourceDataList; |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 .setTitle(styleSheet->title()) | 1413 .setTitle(styleSheet->title()) |
1414 .setFrameId(m_pageAgent->frameId(frame)) | 1414 .setFrameId(m_pageAgent->frameId(frame)) |
1415 .setIsInline(styleSheet->isInline() && !startsAtZero()) | 1415 .setIsInline(styleSheet->isInline() && !startsAtZero()) |
1416 .setStartLine(styleSheet->startPositionInSource().m_line.zeroBasedInt()) | 1416 .setStartLine(styleSheet->startPositionInSource().m_line.zeroBasedInt()) |
1417 .setStartColumn(styleSheet->startPositionInSource().m_column.zeroBasedIn
t()); | 1417 .setStartColumn(styleSheet->startPositionInSource().m_column.zeroBasedIn
t()); |
1418 | 1418 |
1419 if (hasSourceURL()) | 1419 if (hasSourceURL()) |
1420 result->setHasSourceURL(true); | 1420 result->setHasSourceURL(true); |
1421 | 1421 |
1422 if (styleSheet->ownerNode()) | 1422 if (styleSheet->ownerNode()) |
1423 result->setOwnerNode(InspectorNodeIds::idForNode(styleSheet->ownerNode()
)); | 1423 result->setOwnerNode(DOMNodeIds::idForNode(styleSheet->ownerNode())); |
1424 | 1424 |
1425 String sourceMapURLValue = sourceMapURL(); | 1425 String sourceMapURLValue = sourceMapURL(); |
1426 if (!sourceMapURLValue.isEmpty()) | 1426 if (!sourceMapURLValue.isEmpty()) |
1427 result->setSourceMapURL(sourceMapURLValue); | 1427 result->setSourceMapURL(sourceMapURLValue); |
1428 return result.release(); | 1428 return result.release(); |
1429 } | 1429 } |
1430 | 1430 |
1431 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector> > InspectorStyleSheet:
:selectorsFromSource(const CSSRuleSourceData* sourceData, const String& sheetTex
t) | 1431 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector> > InspectorStyleSheet:
:selectorsFromSource(const CSSRuleSourceData* sourceData, const String& sheetTex
t) |
1432 { | 1432 { |
1433 ScriptRegexp comment("/\\*[^]*?\\*/", TextCaseSensitive, MultilineEnabled); | 1433 ScriptRegexp comment("/\\*[^]*?\\*/", TextCaseSensitive, MultilineEnabled); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 | 1991 |
1992 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) | 1992 DEFINE_TRACE(InspectorStyleSheetForInlineStyle) |
1993 { | 1993 { |
1994 visitor->trace(m_element); | 1994 visitor->trace(m_element); |
1995 visitor->trace(m_ruleSourceData); | 1995 visitor->trace(m_ruleSourceData); |
1996 visitor->trace(m_inspectorStyle); | 1996 visitor->trace(m_inspectorStyle); |
1997 InspectorStyleSheetBase::trace(visitor); | 1997 InspectorStyleSheetBase::trace(visitor); |
1998 } | 1998 } |
1999 | 1999 |
2000 } // namespace blink | 2000 } // namespace blink |
OLD | NEW |