OLD | NEW |
1 /* Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. | 1 /* Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. |
2 * | 2 * |
3 * Redistribution and use in source and binary forms, with or without | 3 * Redistribution and use in source and binary forms, with or without |
4 * modification, are permitted provided that the following conditions are | 4 * modification, are permitted provided that the following conditions are |
5 * met: | 5 * met: |
6 * | 6 * |
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 | 9 * 2. Redistributions in binary form must reproduce the above |
10 * copyright notice, this list of conditions and the following disclaimer in | 10 * copyright notice, this list of conditions and the following disclaimer in |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "CSSParser.h" | 32 #include "CSSParser.h" |
33 #include "CSSRule.h" | 33 #include "CSSRule.h" |
34 #include "CSSRuleList.h" | 34 #include "CSSRuleList.h" |
35 #include "CSSStyleSheet.h" | 35 #include "CSSStyleSheet.h" |
36 #include "ExceptionCode.h" | 36 #include "ExceptionCode.h" |
37 #include "StyleRule.h" | 37 #include "StyleRule.h" |
38 #include "WebCoreMemoryInstrumentation.h" | 38 #include "WebCoreMemoryInstrumentation.h" |
39 #include <wtf/MemoryInstrumentationVector.h> | 39 #include <wtf/MemoryInstrumentationVector.h> |
40 #include <wtf/text/StringBuilder.h> | 40 #include <wtf/text/StringBuilder.h> |
41 | 41 |
42 #if ENABLE(CSS3_CONDITIONAL_RULES) | |
43 | |
44 namespace WebCore { | 42 namespace WebCore { |
45 | 43 |
46 CSSSupportsRule::CSSSupportsRule(StyleRuleSupports* supportsRule, CSSStyleSheet*
parent) | 44 CSSSupportsRule::CSSSupportsRule(StyleRuleSupports* supportsRule, CSSStyleSheet*
parent) |
47 : CSSGroupingRule(supportsRule, parent) | 45 : CSSGroupingRule(supportsRule, parent) |
48 { | 46 { |
49 } | 47 } |
50 | 48 |
51 String CSSSupportsRule::cssText() const | 49 String CSSSupportsRule::cssText() const |
52 { | 50 { |
53 StringBuilder result; | 51 StringBuilder result; |
54 | 52 |
55 result.append("@supports "); | 53 result.append("@supports "); |
56 result.append(conditionText()); | 54 result.append(conditionText()); |
57 result.append(" {\n"); | 55 result.append(" {\n"); |
58 appendCssTextForItems(result); | 56 appendCssTextForItems(result); |
59 result.append('}'); | 57 result.append('}'); |
60 | 58 |
61 return result.toString(); | 59 return result.toString(); |
62 } | 60 } |
63 | 61 |
64 String CSSSupportsRule::conditionText() const | 62 String CSSSupportsRule::conditionText() const |
65 { | 63 { |
66 return toStyleRuleSupports(m_groupRule.get())->conditionText(); | 64 return toStyleRuleSupports(m_groupRule.get())->conditionText(); |
67 } | 65 } |
68 | 66 |
69 } // namespace WebCore | 67 } // namespace WebCore |
70 | |
71 #endif | |
OLD | NEW |