| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #ifndef SKY_ENGINE_CORE_DOM_STYLESHEETCANDIDATE_H_ | 27 #ifndef SKY_ENGINE_CORE_DOM_STYLESHEETCANDIDATE_H_ |
| 28 #define SKY_ENGINE_CORE_DOM_STYLESHEETCANDIDATE_H_ | 28 #define SKY_ENGINE_CORE_DOM_STYLESHEETCANDIDATE_H_ |
| 29 | 29 |
| 30 #include "sky/engine/platform/heap/Handle.h" | 30 #include "sky/engine/platform/heap/Handle.h" |
| 31 #include "sky/engine/wtf/text/AtomicString.h" | 31 #include "sky/engine/wtf/text/AtomicString.h" |
| 32 #include "sky/engine/wtf/text/WTFString.h" | 32 #include "sky/engine/wtf/text/WTFString.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class CSSStyleSheet; |
| 36 class Document; | 37 class Document; |
| 37 class Node; | 38 class Node; |
| 38 class StyleSheet; | |
| 39 | 39 |
| 40 class StyleSheetCandidate { | 40 class StyleSheetCandidate { |
| 41 STACK_ALLOCATED(); | 41 STACK_ALLOCATED(); |
| 42 public: | 42 public: |
| 43 enum Type { | 43 enum Type { |
| 44 HTMLStyle, | 44 HTMLStyle, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 StyleSheetCandidate(Node& node) | 47 StyleSheetCandidate(Node& node) |
| 48 : m_node(node) | 48 : m_node(node) |
| 49 , m_type(typeOf(node)) | 49 , m_type(typeOf(node)) |
| 50 { } | 50 { } |
| 51 | 51 |
| 52 bool canBeActivated() const; | 52 bool canBeActivated() const; |
| 53 | 53 |
| 54 StyleSheet* sheet() const; | 54 CSSStyleSheet* sheet() const; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 Node& node() const { return *m_node; } | 57 Node& node() const { return *m_node; } |
| 58 | 58 |
| 59 static Type typeOf(Node&); | 59 static Type typeOf(Node&); |
| 60 | 60 |
| 61 RawPtr<Node> m_node; | 61 RawPtr<Node> m_node; |
| 62 Type m_type; | 62 Type m_type; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } | 65 } |
| 66 | 66 |
| 67 #endif // SKY_ENGINE_CORE_DOM_STYLESHEETCANDIDATE_H_ | 67 #endif // SKY_ENGINE_CORE_DOM_STYLESHEETCANDIDATE_H_ |
| 68 | 68 |
| OLD | NEW |