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 28 matching lines...) Expand all Loading... |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 CSSViewportRule::CSSViewportRule(StyleRuleViewport* viewportRule, CSSStyleSheet*
sheet) | 41 CSSViewportRule::CSSViewportRule(StyleRuleViewport* viewportRule, CSSStyleSheet*
sheet) |
42 : CSSRule(sheet) | 42 : CSSRule(sheet) |
43 , m_viewportRule(viewportRule) | 43 , m_viewportRule(viewportRule) |
44 { | 44 { |
45 } | 45 } |
46 | 46 |
47 CSSViewportRule::~CSSViewportRule() | 47 CSSViewportRule::~CSSViewportRule() |
48 { | 48 { |
| 49 #if !ENABLE(OILPAN) |
49 if (m_propertiesCSSOMWrapper) | 50 if (m_propertiesCSSOMWrapper) |
50 m_propertiesCSSOMWrapper->clearParentRule(); | 51 m_propertiesCSSOMWrapper->clearParentRule(); |
| 52 #endif |
51 } | 53 } |
52 | 54 |
53 CSSStyleDeclaration* CSSViewportRule::style() const | 55 CSSStyleDeclaration* CSSViewportRule::style() const |
54 { | 56 { |
55 if (!m_propertiesCSSOMWrapper) | 57 if (!m_propertiesCSSOMWrapper) |
56 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewpo
rtRule->mutableProperties(), const_cast<CSSViewportRule*>(this)); | 58 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewpo
rtRule->mutableProperties(), const_cast<CSSViewportRule*>(this)); |
57 | 59 |
58 return m_propertiesCSSOMWrapper.get(); | 60 return m_propertiesCSSOMWrapper.get(); |
59 } | 61 } |
60 | 62 |
(...skipping 16 matching lines...) Expand all Loading... |
77 { | 79 { |
78 ASSERT(rule); | 80 ASSERT(rule); |
79 m_viewportRule = toStyleRuleViewport(rule); | 81 m_viewportRule = toStyleRuleViewport(rule); |
80 if (m_propertiesCSSOMWrapper) | 82 if (m_propertiesCSSOMWrapper) |
81 m_propertiesCSSOMWrapper->reattach(m_viewportRule->mutableProperties()); | 83 m_propertiesCSSOMWrapper->reattach(m_viewportRule->mutableProperties()); |
82 } | 84 } |
83 | 85 |
84 void CSSViewportRule::trace(Visitor* visitor) | 86 void CSSViewportRule::trace(Visitor* visitor) |
85 { | 87 { |
86 visitor->trace(m_viewportRule); | 88 visitor->trace(m_viewportRule); |
| 89 visitor->trace(m_propertiesCSSOMWrapper); |
87 CSSRule::trace(visitor); | 90 CSSRule::trace(visitor); |
88 } | 91 } |
89 | 92 |
90 } // namespace WebCore | 93 } // namespace WebCore |
OLD | NEW |