| 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 void didAddChildShadowRoot() { ++m_childShadowRootCount; } | 54 void didAddChildShadowRoot() { ++m_childShadowRootCount; } |
| 55 void didRemoveChildShadowRoot() { ASSERT(m_childShadowRootCount > 0); --m_ch
ildShadowRootCount; } | 55 void didRemoveChildShadowRoot() { ASSERT(m_childShadowRootCount > 0); --m_ch
ildShadowRootCount; } |
| 56 | 56 |
| 57 unsigned childShadowRootCount() const { return m_childShadowRootCount; } | 57 unsigned childShadowRootCount() const { return m_childShadowRootCount; } |
| 58 | 58 |
| 59 const Vector<RefPtr<InsertionPoint> >& descendantInsertionPoints() { return
m_descendantInsertionPoints; } | 59 const Vector<RefPtr<InsertionPoint> >& descendantInsertionPoints() { return
m_descendantInsertionPoints; } |
| 60 void setDescendantInsertionPoints(Vector<RefPtr<InsertionPoint> >& list) { m
_descendantInsertionPoints.swap(list); } | 60 void setDescendantInsertionPoints(Vector<RefPtr<InsertionPoint> >& list) { m
_descendantInsertionPoints.swap(list); } |
| 61 void clearDescendantInsertionPoints() { m_descendantInsertionPoints.clear();
} | 61 void clearDescendantInsertionPoints() { m_descendantInsertionPoints.clear();
} |
| 62 | 62 |
| 63 StyleSheetList* styleSheets() { return m_styleSheetList.get(); } | |
| 64 void setStyleSheets(PassRefPtr<StyleSheetList> styleSheetList) { m_styleShee
tList = styleSheetList; } | |
| 65 | |
| 66 | |
| 67 private: | 63 private: |
| 68 unsigned m_descendantContentElementCount; | 64 unsigned m_descendantContentElementCount; |
| 69 unsigned m_childShadowRootCount; | 65 unsigned m_childShadowRootCount; |
| 70 Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints; | 66 Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints; |
| 71 RefPtr<StyleSheetList> m_styleSheetList; | |
| 72 }; | 67 }; |
| 73 | 68 |
| 74 inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point) | 69 inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point) |
| 75 { | 70 { |
| 76 ASSERT(point); | 71 ASSERT(point); |
| 77 if (isHTMLContentElement(*point)) | 72 if (isHTMLContentElement(*point)) |
| 78 ++m_descendantContentElementCount; | 73 ++m_descendantContentElementCount; |
| 79 else | 74 else |
| 80 ASSERT_NOT_REACHED(); | 75 ASSERT_NOT_REACHED(); |
| 81 } | 76 } |
| 82 | 77 |
| 83 inline void ShadowRootRareData::didRemoveInsertionPoint(InsertionPoint* point) | 78 inline void ShadowRootRareData::didRemoveInsertionPoint(InsertionPoint* point) |
| 84 { | 79 { |
| 85 ASSERT(point); | 80 ASSERT(point); |
| 86 if (isHTMLContentElement(*point)) | 81 if (isHTMLContentElement(*point)) |
| 87 --m_descendantContentElementCount; | 82 --m_descendantContentElementCount; |
| 88 else | 83 else |
| 89 ASSERT_NOT_REACHED(); | 84 ASSERT_NOT_REACHED(); |
| 90 | 85 |
| 91 ASSERT(m_descendantContentElementCount >= 0); | 86 ASSERT(m_descendantContentElementCount >= 0); |
| 92 } | 87 } |
| 93 | 88 |
| 94 } // namespace blink | 89 } // namespace blink |
| 95 | 90 |
| 96 #endif // SKY_ENGINE_CORE_DOM_SHADOW_SHADOWROOTRAREDATA_H_ | 91 #endif // SKY_ENGINE_CORE_DOM_SHADOW_SHADOWROOTRAREDATA_H_ |
| OLD | NEW |