| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above | 9 * 1. Redistributions of source code must retain the above |
| 10 * copyright notice, this list of conditions and the following | 10 * copyright notice, this list of conditions and the following |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "core/css/WebKitCSSRegionRule.h" | 33 #include "core/css/WebKitCSSRegionRule.h" |
| 34 | 34 |
| 35 #include "core/css/CSSParser.h" | 35 #include "core/css/CSSParser.h" |
| 36 #include "core/css/CSSRuleList.h" | 36 #include "core/css/CSSRuleList.h" |
| 37 #include "core/css/StyleRule.h" | 37 #include "core/css/StyleRule.h" |
| 38 #include <wtf/MemoryInstrumentationVector.h> | 38 #include <wtf/MemoryInstrumentationVector.h> |
| 39 #include <wtf/text/StringBuilder.h> | 39 #include <wtf/text/StringBuilder.h> |
| 40 | 40 |
| 41 #if ENABLE(CSS_REGIONS) | |
| 42 | |
| 43 namespace WebCore { | 41 namespace WebCore { |
| 44 WebKitCSSRegionRule::WebKitCSSRegionRule(StyleRuleRegion* regionRule, CSSStyleSh
eet* parent) | 42 WebKitCSSRegionRule::WebKitCSSRegionRule(StyleRuleRegion* regionRule, CSSStyleSh
eet* parent) |
| 45 : CSSGroupingRule(regionRule, parent) | 43 : CSSGroupingRule(regionRule, parent) |
| 46 { | 44 { |
| 47 } | 45 } |
| 48 | 46 |
| 49 String WebKitCSSRegionRule::cssText() const | 47 String WebKitCSSRegionRule::cssText() const |
| 50 { | 48 { |
| 51 StringBuilder result; | 49 StringBuilder result; |
| 52 result.appendLiteral("@-webkit-region "); | 50 result.appendLiteral("@-webkit-region "); |
| 53 | 51 |
| 54 // First add the selectors. | 52 // First add the selectors. |
| 55 result.append(toStyleRuleRegion(m_groupRule.get())->selectorList().selectors
Text()); | 53 result.append(toStyleRuleRegion(m_groupRule.get())->selectorList().selectors
Text()); |
| 56 | 54 |
| 57 // Then add the rules. | 55 // Then add the rules. |
| 58 result.appendLiteral(" { \n"); | 56 result.appendLiteral(" { \n"); |
| 59 appendCssTextForItems(result); | 57 appendCssTextForItems(result); |
| 60 result.append('}'); | 58 result.append('}'); |
| 61 return result.toString(); | 59 return result.toString(); |
| 62 } | 60 } |
| 63 | 61 |
| 64 } // namespace WebCore | 62 } // namespace WebCore |
| 65 | |
| 66 #endif | |
| OLD | NEW |