OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. 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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
685 return; | 685 return; |
686 rareInheritedData.access()->quotes = q; | 686 rareInheritedData.access()->quotes = q; |
687 } | 687 } |
688 | 688 |
689 void RenderStyle::clearCursorList() | 689 void RenderStyle::clearCursorList() |
690 { | 690 { |
691 if (rareInheritedData->cursorData) | 691 if (rareInheritedData->cursorData) |
692 rareInheritedData.access()->cursorData = 0; | 692 rareInheritedData.access()->cursorData = 0; |
693 } | 693 } |
694 | 694 |
695 #if ENABLE(CSS_CALLBACKS) | |
696 void RenderStyle::addCallbackSelector(const String& selector, Document* document ) | |
697 { | |
698 ASSERT(!rareNonInheritedData->m_document.get() | |
699 || rareNonInheritedData->m_document.get() == document); | |
700 if (!rareNonInheritedData->m_callbackSelectors.contains(selector)) { | |
701 StyleRareNonInheritedData* data = rareNonInheritedData.access(); | |
702 data->m_callbackSelectors.append(selector); | |
703 // Assigns a WeakPtr to |document| to data->m_document. | |
704 document->addSelectorMatch(selector, data); | |
esprehn
2013/07/13 01:43:01
Please do this call outside this function. Return
Jeffrey Yasskin
2013/08/13 00:29:29
This went away with the move to Element.
| |
705 } | |
706 } | |
707 | |
708 void RenderStyle::removeCallbackSelector(const String& selector) | |
709 { | |
710 size_t index = rareNonInheritedData->m_callbackSelectors.find(selector); | |
711 if (index != notFound) { | |
712 rareNonInheritedData.access()->m_callbackSelectors.remove(index); | |
713 if (Document* document = rareNonInheritedData->m_document.get()) | |
714 document->removeSelectorMatch(selector); | |
esprehn
2013/07/13 01:43:01
Ditto, mutating the RenderStyle should have no sid
| |
715 } | |
716 } | |
717 #endif | |
718 | |
695 void RenderStyle::clearContent() | 719 void RenderStyle::clearContent() |
696 { | 720 { |
697 if (rareNonInheritedData->m_content) | 721 if (rareNonInheritedData->m_content) |
698 rareNonInheritedData.access()->m_content = nullptr; | 722 rareNonInheritedData.access()->m_content = nullptr; |
699 } | 723 } |
700 | 724 |
701 void RenderStyle::appendContent(PassOwnPtr<ContentData> contentData) | 725 void RenderStyle::appendContent(PassOwnPtr<ContentData> contentData) |
702 { | 726 { |
703 OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content; | 727 OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content; |
704 ContentData* lastContent = content.get(); | 728 ContentData* lastContent = content.get(); |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1573 info.addMember(rareInheritedData, "rareInheritedData"); | 1597 info.addMember(rareInheritedData, "rareInheritedData"); |
1574 // FIXME: inherited contains StyleImage and Font fields that might need to b e instrumented. | 1598 // FIXME: inherited contains StyleImage and Font fields that might need to b e instrumented. |
1575 info.addMember(inherited, "inherited"); | 1599 info.addMember(inherited, "inherited"); |
1576 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); | 1600 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); |
1577 info.addMember(m_svgStyle, "svgStyle"); | 1601 info.addMember(m_svgStyle, "svgStyle"); |
1578 info.addMember(inherited_flags, "inherited_flags"); | 1602 info.addMember(inherited_flags, "inherited_flags"); |
1579 info.addMember(noninherited_flags, "noninherited_flags"); | 1603 info.addMember(noninherited_flags, "noninherited_flags"); |
1580 } | 1604 } |
1581 | 1605 |
1582 } // namespace WebCore | 1606 } // namespace WebCore |
OLD | NEW |