Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1684)

Side by Side Diff: Source/core/css/CSSSupportsRule.cpp

Issue 13646013: Enable support for CSS Conditional Rules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSSupportsRule.h ('k') | Source/core/css/CSSSupportsRule.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/css/CSSSupportsRule.h ('k') | Source/core/css/CSSSupportsRule.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698