OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 2 * Copyright (C) 2012 Intel Corporation. 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewpo
rtRule->mutableProperties(), const_cast<CSSViewportRule*>(this)); | 56 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewpo
rtRule->mutableProperties(), const_cast<CSSViewportRule*>(this)); |
57 | 57 |
58 return m_propertiesCSSOMWrapper.get(); | 58 return m_propertiesCSSOMWrapper.get(); |
59 } | 59 } |
60 | 60 |
61 String CSSViewportRule::cssText() const | 61 String CSSViewportRule::cssText() const |
62 { | 62 { |
63 StringBuilder result; | 63 StringBuilder result; |
64 result.appendLiteral("@viewport { "); | 64 result.appendLiteral("@viewport { "); |
65 | 65 |
66 String decls = m_viewportRule->properties()->asText(); | 66 String decls = m_viewportRule->properties().asText(); |
67 result.append(decls); | 67 result.append(decls); |
68 if (!decls.isEmpty()) | 68 if (!decls.isEmpty()) |
69 result.append(' '); | 69 result.append(' '); |
70 | 70 |
71 result.append('}'); | 71 result.append('}'); |
72 | 72 |
73 return result.toString(); | 73 return result.toString(); |
74 } | 74 } |
75 | 75 |
76 void CSSViewportRule::reattach(StyleRuleBase* rule) | 76 void CSSViewportRule::reattach(StyleRuleBase* rule) |
77 { | 77 { |
78 ASSERT(rule); | 78 ASSERT(rule); |
79 m_viewportRule = toStyleRuleViewport(rule); | 79 m_viewportRule = toStyleRuleViewport(rule); |
80 if (m_propertiesCSSOMWrapper) | 80 if (m_propertiesCSSOMWrapper) |
81 m_propertiesCSSOMWrapper->reattach(m_viewportRule->mutableProperties()); | 81 m_propertiesCSSOMWrapper->reattach(m_viewportRule->mutableProperties()); |
82 } | 82 } |
83 | 83 |
84 void CSSViewportRule::trace(Visitor* visitor) | 84 void CSSViewportRule::trace(Visitor* visitor) |
85 { | 85 { |
86 visitor->trace(m_viewportRule); | 86 visitor->trace(m_viewportRule); |
87 CSSRule::trace(visitor); | 87 CSSRule::trace(visitor); |
88 } | 88 } |
89 | 89 |
90 } // namespace WebCore | 90 } // namespace WebCore |
OLD | NEW |