| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2002, 2005, 2006, 2007, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // doesn't derive ScriptWrappable or ScriptWrappableBase. Then, we can safely | 42 // doesn't derive ScriptWrappable or ScriptWrappableBase. Then, we can safely |
| 43 // remove ScriptWrappableBase from the base class list. | 43 // remove ScriptWrappableBase from the base class list. |
| 44 struct SameSizeAsCSSRule : public RefCountedWillBeGarbageCollectedFinalized<Same
SizeAsCSSRule>, public ScriptWrappableBase { | 44 struct SameSizeAsCSSRule : public RefCountedWillBeGarbageCollectedFinalized<Same
SizeAsCSSRule>, public ScriptWrappableBase { |
| 45 virtual ~SameSizeAsCSSRule(); | 45 virtual ~SameSizeAsCSSRule(); |
| 46 unsigned char bitfields; | 46 unsigned char bitfields; |
| 47 void* pointerUnion; | 47 void* pointerUnion; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 COMPILE_ASSERT(sizeof(CSSRule) == sizeof(SameSizeAsCSSRule), CSSRule_should_stay
_small); | 50 COMPILE_ASSERT(sizeof(CSSRule) == sizeof(SameSizeAsCSSRule), CSSRule_should_stay
_small); |
| 51 | 51 |
| 52 COMPILE_ASSERT(StyleRuleBase::Viewport == static_cast<StyleRuleBase::Type>(CSSRu
le::VIEWPORT_RULE), enums_should_match); | |
| 53 | |
| 54 void CSSRule::setCSSText(const String&) | 52 void CSSRule::setCSSText(const String&) |
| 55 { | 53 { |
| 56 notImplemented(); | 54 notImplemented(); |
| 57 } | 55 } |
| 58 | 56 |
| 59 const CSSParserContext& CSSRule::parserContext() const | 57 const CSSParserContext& CSSRule::parserContext() const |
| 60 { | 58 { |
| 61 CSSStyleSheet* styleSheet = parentStyleSheet(); | 59 CSSStyleSheet* styleSheet = parentStyleSheet(); |
| 62 return styleSheet ? styleSheet->contents()->parserContext() : strictCSSParse
rContext(); | 60 return styleSheet ? styleSheet->contents()->parserContext() : strictCSSParse
rContext(); |
| 63 } | 61 } |
| 64 | 62 |
| 65 void CSSRule::trace(Visitor* visitor) | 63 void CSSRule::trace(Visitor* visitor) |
| 66 { | 64 { |
| 67 #if ENABLE(OILPAN) | 65 #if ENABLE(OILPAN) |
| 68 // This makes the parent link strong, which is different from the | 66 // This makes the parent link strong, which is different from the |
| 69 // pre-oilpan world, where the parent link is mysteriously zeroed under | 67 // pre-oilpan world, where the parent link is mysteriously zeroed under |
| 70 // some circumstances. | 68 // some circumstances. |
| 71 if (m_parentIsRule) | 69 if (m_parentIsRule) |
| 72 visitor->trace(m_parentRule); | 70 visitor->trace(m_parentRule); |
| 73 else | 71 else |
| 74 visitor->trace(m_parentStyleSheet); | 72 visitor->trace(m_parentStyleSheet); |
| 75 #endif | 73 #endif |
| 76 } | 74 } |
| 77 | 75 |
| 78 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |