| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/dom/ExceptionCode.h" | 35 #include "core/dom/ExceptionCode.h" |
| 36 #include "core/dom/Node.h" | 36 #include "core/dom/Node.h" |
| 37 #include "core/frame/UseCounter.h" | 37 #include "core/frame/UseCounter.h" |
| 38 #include "core/inspector/InspectorInstrumentation.h" | 38 #include "core/inspector/InspectorInstrumentation.h" |
| 39 #include "platform/weborigin/SecurityOrigin.h" | 39 #include "platform/weborigin/SecurityOrigin.h" |
| 40 #include "wtf/text/StringBuilder.h" | 40 #include "wtf/text/StringBuilder.h" |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class StyleSheetCSSRuleList : public CSSRuleList { | 44 class StyleSheetCSSRuleList FINAL : public CSSRuleList { |
| 45 public: | 45 public: |
| 46 StyleSheetCSSRuleList(CSSStyleSheet* sheet) : m_styleSheet(sheet) { } | 46 StyleSheetCSSRuleList(CSSStyleSheet* sheet) : m_styleSheet(sheet) { } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 virtual void ref() { m_styleSheet->ref(); } | 49 virtual void ref() OVERRIDE { m_styleSheet->ref(); } |
| 50 virtual void deref() { m_styleSheet->deref(); } | 50 virtual void deref() OVERRIDE { m_styleSheet->deref(); } |
| 51 | 51 |
| 52 virtual unsigned length() const { return m_styleSheet->length(); } | 52 virtual unsigned length() const OVERRIDE { return m_styleSheet->length(); } |
| 53 virtual CSSRule* item(unsigned index) const { return m_styleSheet->item(inde
x); } | 53 virtual CSSRule* item(unsigned index) const OVERRIDE { return m_styleSheet->
item(index); } |
| 54 | 54 |
| 55 virtual CSSStyleSheet* styleSheet() const { return m_styleSheet; } | 55 virtual CSSStyleSheet* styleSheet() const OVERRIDE { return m_styleSheet; } |
| 56 | 56 |
| 57 CSSStyleSheet* m_styleSheet; | 57 CSSStyleSheet* m_styleSheet; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 #if !ASSERT_DISABLED | 60 #if !ASSERT_DISABLED |
| 61 static bool isAcceptableCSSStyleSheetParent(Node* parentNode) | 61 static bool isAcceptableCSSStyleSheetParent(Node* parentNode) |
| 62 { | 62 { |
| 63 // Only these nodes can be parents of StyleSheets, and they need to call cle
arOwnerNode() when moved out of document. | 63 // Only these nodes can be parents of StyleSheets, and they need to call cle
arOwnerNode() when moved out of document. |
| 64 return !parentNode | 64 return !parentNode |
| 65 || parentNode->isDocumentNode() | 65 || parentNode->isDocumentNode() |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 root = root->parentStyleSheet(); | 375 root = root->parentStyleSheet(); |
| 376 return root->ownerNode() ? &root->ownerNode()->document() : 0; | 376 return root->ownerNode() ? &root->ownerNode()->document() : 0; |
| 377 } | 377 } |
| 378 | 378 |
| 379 void CSSStyleSheet::clearChildRuleCSSOMWrappers() | 379 void CSSStyleSheet::clearChildRuleCSSOMWrappers() |
| 380 { | 380 { |
| 381 m_childRuleCSSOMWrappers.clear(); | 381 m_childRuleCSSOMWrappers.clear(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 } | 384 } |
| OLD | NEW |