Changeset 90987 in webkit
- Timestamp:
- Jul 14, 2011 2:00:26 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r90985 r90987 1 2011-07-14 MORITA Hajime <morrita@google.com> 2 3 Unreviewed, rolling out r90976, r90981, and r90985. 4 http://trac.webkit.org/changeset/90976 5 http://trac.webkit.org/changeset/90981 6 http://trac.webkit.org/changeset/90985 7 https://bugs.webkit.org/show_bug.cgi?id=64251 8 9 build break 10 11 * Source/autotools/symbols.filter: 12 1 13 2011-07-14 MORITA Hajime <morrita@google.com> 2 14 -
trunk/LayoutTests/ChangeLog
r90986 r90987 1 2011-07-14 MORITA Hajime <morrita@google.com> 2 3 Unreviewed, rolling out r90976, r90981, and r90985. 4 http://trac.webkit.org/changeset/90976 5 http://trac.webkit.org/changeset/90981 6 http://trac.webkit.org/changeset/90985 7 https://bugs.webkit.org/show_bug.cgi?id=64251 8 9 build break 10 11 * fast/dom/shadow/content-element-includer-expected.txt: Removed. 12 * fast/dom/shadow/content-element-includer.html: Removed. 13 * platform/chromium-win/fast/html/details-nested-2-expected.txt: 14 * platform/gtk/fast/html/details-nested-2-expected.txt: 15 * platform/mac/fast/html/details-nested-2-expected.txt: 16 * platform/qt/fast/html/details-nested-2-expected.txt: 17 1 18 2011-07-14 Csaba Osztrogonác <ossy@webkit.org> 2 19 -
trunk/LayoutTests/platform/chromium-win/fast/html/details-nested-2-expected.txt
r90976 r90987 10 10 text run at (24,8) width 4: " " 11 11 text run at (28,8) width 54: "summary" 12 RenderBlock (anonymous) at (8,44) size 768x0 12 13 RenderDetails {DETAILS} at (8,44) size 768x72 [border: (8px solid #995555)] 13 14 RenderSummary {SUMMARY} at (8,8) size 752x36 [border: (8px solid #CC9999)] -
trunk/LayoutTests/platform/gtk/fast/html/details-nested-2-expected.txt
r90976 r90987 10 10 text run at (24,8) width 4: " " 11 11 text run at (28,8) width 58: "summary" 12 RenderBlock (anonymous) at (8,43) size 768x0 12 13 RenderDetails {DETAILS} at (8,43) size 768x70 [border: (8px solid #995555)] 13 14 RenderSummary {SUMMARY} at (8,8) size 752x35 [border: (8px solid #CC9999)] -
trunk/LayoutTests/platform/mac/fast/html/details-nested-2-expected.txt
r90976 r90987 10 10 text run at (24,8) width 4: " " 11 11 text run at (28,8) width 58: "summary" 12 RenderBlock (anonymous) at (8,42) size 768x0 12 13 RenderDetails {DETAILS} at (8,42) size 768x68 [border: (8px solid #995555)] 13 14 RenderSummary {SUMMARY} at (8,8) size 752x34 [border: (8px solid #CC9999)] -
trunk/LayoutTests/platform/qt/fast/html/details-nested-2-expected.txt
r90976 r90987 10 10 text run at (24,8) width 4: " " 11 11 text run at (28,8) width 64: "summary" 12 RenderBlock (anonymous) at (8,46) size 768x0 12 13 RenderDetails {DETAILS} at (8,46) size 768x76 [border: (8px solid #995555)] 13 14 RenderSummary {SUMMARY} at (8,8) size 752x38 [border: (8px solid #CC9999)] -
trunk/Source/WebCore/ChangeLog
r90983 r90987 1 2011-07-14 MORITA Hajime <morrita@google.com> 2 3 Unreviewed, rolling out r90976, r90981, and r90985. 4 http://trac.webkit.org/changeset/90976 5 http://trac.webkit.org/changeset/90981 6 http://trac.webkit.org/changeset/90985 7 https://bugs.webkit.org/show_bug.cgi?id=64251 8 9 build break 10 11 * WebCore.exp.in: 12 * dom/NodeRenderingContext.cpp: 13 (WebCore::NodeRenderingContext::NodeRenderingContext): 14 (WebCore::NodeRenderingContext::nextRenderer): 15 (WebCore::NodeRenderingContext::previousRenderer): 16 * dom/NodeRenderingContext.h: 17 * dom/ShadowContentElement.cpp: 18 (WebCore::ShadowContentElement::attach): 19 (WebCore::ShadowContentElement::detach): 20 * dom/ShadowContentElement.h: 21 * dom/ShadowContentSelector.cpp: 22 (WebCore::ShadowContentSelector::ShadowContentSelector): 23 (WebCore::ShadowContentSelector::selectInclusion): 24 (WebCore::ShadowContentSelector::willAttachContentFor): 25 (WebCore::ShadowContentSelector::didAttachContent): 26 (WebCore::ShadowContentSelector::activeElement): 27 * dom/ShadowContentSelector.h: 28 * dom/ShadowRoot.cpp: 29 (WebCore::ShadowRoot::~ShadowRoot): 30 (WebCore::ShadowRoot::activeContentElement): 31 * dom/ShadowRoot.h: 32 * testing/Internals.cpp: 33 * testing/Internals.h: 34 * testing/Internals.idl: 35 1 36 2011-07-13 Ryosuke Niwa <rniwa@webkit.org> 2 37 -
trunk/Source/WebCore/WebCore.exp.in
r90976 r90987 543 543 __ZN7WebCore19TextResourceDecoderD1Ev 544 544 __ZN7WebCore19applicationIsSafariEv 545 __ZN7WebCore20NodeRenderingContextC1EPNS_4NodeE546 __ZN7WebCore20NodeRenderingContextD1Ev547 545 __ZN7WebCore20RenderEmbeddedObject30setShowsCrashedPluginIndicatorEv 548 546 __ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r90976 r90987 42 42 , m_parentNodeForRenderingAndStyle(0) 43 43 , m_visualParentShadowRoot(0) 44 , m_ includer(0)44 , m_contentElement(0) 45 45 , m_style(0) 46 46 { … … 61 61 62 62 if (m_visualParentShadowRoot) { 63 if ((m_ includer = m_visualParentShadowRoot->includerFor(m_node))) {63 if ((m_contentElement = m_visualParentShadowRoot->activeContentElement())) { 64 64 m_phase = AttachContentForwarded; 65 m_parentNodeForRenderingAndStyle = NodeRenderingContext(m_ includer).parentNodeForRenderingAndStyle();65 m_parentNodeForRenderingAndStyle = NodeRenderingContext(m_contentElement).parentNodeForRenderingAndStyle(); 66 66 return; 67 67 } … … 82 82 , m_parentNodeForRenderingAndStyle(0) 83 83 , m_visualParentShadowRoot(0) 84 , m_ includer(0)84 , m_contentElement(0) 85 85 , m_style(style) 86 86 { … … 156 156 157 157 if (m_phase == AttachContentForwarded) { 158 if (RenderObject* found = nextRendererOf(m_ includer, m_node))158 if (RenderObject* found = nextRendererOf(m_contentElement, m_node)) 159 159 return found; 160 return NodeRenderingContext(m_ includer).nextRenderer();160 return NodeRenderingContext(m_contentElement).nextRenderer(); 161 161 } 162 162 … … 185 185 186 186 if (m_phase == AttachContentForwarded) { 187 if (RenderObject* found = previousRendererOf(m_ includer, m_node))187 if (RenderObject* found = previousRendererOf(m_contentElement, m_node)) 188 188 return found; 189 return NodeRenderingContext(m_ includer).previousRenderer();189 return NodeRenderingContext(m_contentElement).previousRenderer(); 190 190 } 191 191 -
trunk/Source/WebCore/dom/NodeRenderingContext.h
r90976 r90987 51 51 RenderObject* nextRenderer() const; 52 52 RenderObject* previousRenderer() const; 53 ShadowContentElement* includer() const;54 53 55 54 RenderStyle* style() const; … … 81 80 ContainerNode* m_parentNodeForRenderingAndStyle; 82 81 ShadowRoot* m_visualParentShadowRoot; 83 ShadowContentElement* m_ includer;82 ShadowContentElement* m_contentElement; 84 83 RefPtr<RenderStyle> m_style; 85 84 }; … … 99 98 { 100 99 return m_style.get(); 101 }102 103 inline ShadowContentElement* NodeRenderingContext::includer() const104 {105 return m_includer;106 100 } 107 101 -
trunk/Source/WebCore/dom/ShadowContentElement.cpp
r90976 r90987 30 30 #include "HTMLNames.h" 31 31 #include "ShadowContentSelector.h" 32 #include "ShadowRoot.h"33 32 34 33 namespace WebCore { … … 99 98 } 100 99 100 101 101 PassRefPtr<ShadowContentElement> ShadowContentElement::create(Document* document) 102 102 { … … 114 114 } 115 115 116 static void removeFromSet(ShadowInclusionList* list, ShadowInclusionSet* set)117 {118 for (ShadowInclusion* inclusion = list->first(); inclusion; inclusion = inclusion->next())119 set->remove(inclusion);120 }121 122 static void addToSet(ShadowInclusionList* list, ShadowInclusionSet* set)123 {124 for (ShadowInclusion* inclusion = list->first(); inclusion; inclusion = inclusion->next())125 set->add(inclusion);126 }127 128 116 void ShadowContentElement::attach() 129 117 { … … 131 119 StyledElement::attach(); 132 120 if (ShadowContentSelector* selector = ShadowContentSelector::currentInstance()) { 133 134 removeFromSet(&m_inclusions, selector->shadowRoot()->ensureInclusions()); 135 m_inclusions.clear(); 136 selector->selectInclusion(this, &m_inclusions); 137 addToSet(&m_inclusions, selector->shadowRoot()->ensureInclusions()); 138 121 selector->willAttachContentFor(this); 122 selector->selectInclusion(&m_inclusions); 139 123 for (ShadowInclusion* inclusion = m_inclusions.first(); inclusion; inclusion = inclusion->next()) 140 124 inclusion->content()->detach(); 141 125 for (ShadowInclusion* inclusion = m_inclusions.first(); inclusion; inclusion = inclusion->next()) 142 126 inclusion->content()->attach(); 127 selector->didAttachContent(); 143 128 } 144 129 } … … 146 131 void ShadowContentElement::detach() 147 132 { 148 if (ShadowRoot* root = toShadowRoot(shadowTreeRootNode())) { 149 removeFromSet(&m_inclusions, root->ensureInclusions()); 150 m_inclusions.clear(); 151 } 152 153 ASSERT(m_inclusions.isEmpty()); 133 m_inclusions.clear(); 154 134 StyledElement::detach(); 155 135 } -
trunk/Source/WebCore/dom/ShadowContentElement.h
r90976 r90987 34 34 #include "StyledElement.h" 35 35 #include <wtf/Forward.h> 36 #include <wtf/HashSet.h>37 36 38 37 namespace WebCore { … … 68 67 } 69 68 69 70 70 class ShadowInclusionList { 71 71 public: … … 92 92 } 93 93 94 class ShadowInclusionSet {95 public:96 void add(ShadowInclusion* value) { m_set.add(value); }97 void remove(ShadowInclusion* value) { m_set.remove(value); }98 bool isEmpty() const { return m_set.isEmpty(); }99 ShadowInclusion* find(Node* key) const;100 101 private:102 struct Translator {103 public:104 static unsigned hash(const Node* key) { return PtrHash<const Node*>::hash(key); }105 static bool equal(const ShadowInclusion* inclusion, const Node* content) { return inclusion->content() == content; }106 };107 108 struct Hash {109 static unsigned hash(ShadowInclusion* key) { return PtrHash<const Node*>::hash(key->content()); }110 static bool equal(ShadowInclusion* a, ShadowInclusion* b) { return a->content() == b->content(); }111 static const bool safeToCompareToEmptyOrDeleted = false;112 };113 114 typedef HashSet<ShadowInclusion*, Hash> PointerSet;115 116 PointerSet m_set;117 };118 119 inline ShadowInclusion* ShadowInclusionSet::find(Node* key) const120 {121 PointerSet::iterator found = m_set.find<Node*, ShadowInclusionSet::Translator>(key);122 return found != m_set.end() ? *found : 0;123 }124 94 125 95 // NOTE: Current implementation doesn't support dynamic insertion/deletion of ShadowContentElement. -
trunk/Source/WebCore/dom/ShadowContentSelector.cpp
r90976 r90987 39 39 : m_parent(s_currentInstance) 40 40 , m_shadowRoot(shadowRoot) 41 , m_activeElement(0) 41 42 { 42 43 s_currentInstance = this; … … 51 52 } 52 53 53 void ShadowContentSelector::selectInclusion(Shadow ContentElement* contentElement, ShadowInclusionList* inclusions)54 void ShadowContentSelector::selectInclusion(ShadowInclusionList* inclusions) 54 55 { 55 ASSERT(inclusions->isEmpty());56 inclusions->clear(); 56 57 57 58 for (size_t i = 0; i < m_children.size(); ++i) { … … 59 60 if (!child) 60 61 continue; 61 if (! contentElement->shouldInclude(child))62 if (!m_activeElement->shouldInclude(child)) 62 63 continue; 63 64 64 inclusions->append( contentElement, child);65 inclusions->append(m_activeElement, child); 65 66 m_children[i] = 0; 66 67 } 68 69 } 70 71 void ShadowContentSelector::willAttachContentFor(ShadowContentElement* element) 72 { 73 ASSERT(!m_activeElement); 74 m_activeElement = element; 75 } 76 77 void ShadowContentSelector::didAttachContent() 78 { 79 ASSERT(m_activeElement); 80 m_activeElement = 0; 81 } 82 83 ShadowContentElement* ShadowContentSelector::activeElement() const 84 { 85 return m_activeElement; 67 86 } 68 87 -
trunk/Source/WebCore/dom/ShadowContentSelector.h
r90976 r90987 50 50 ~ShadowContentSelector(); 51 51 52 void selectInclusion(ShadowContentElement*, ShadowInclusionList*); 52 void willAttachContentFor(ShadowContentElement*); 53 void didAttachContent(); 54 void selectInclusion(ShadowInclusionList*); 53 55 54 56 ShadowRoot* shadowRoot() const { return m_shadowRoot; } 57 ShadowContentElement* activeElement() const; 55 58 static ShadowContentSelector* currentInstance() { return s_currentInstance; } 56 59 … … 58 61 ShadowContentSelector* m_parent; 59 62 ShadowRoot* m_shadowRoot; 63 ShadowContentElement* m_activeElement; 60 64 Vector<RefPtr<Node> > m_children; 61 65 -
trunk/Source/WebCore/dom/ShadowRoot.cpp
r90976 r90987 31 31 #include "Document.h" 32 32 #include "NodeRareData.h" 33 #include "ShadowContentElement.h"34 33 #include "ShadowContentSelector.h" 35 34 … … 51 50 ShadowRoot::~ShadowRoot() 52 51 { 53 ASSERT(!m_inclusions || m_inclusions->isEmpty());54 52 } 55 53 … … 98 96 } 99 97 100 ShadowContentElement* ShadowRoot:: includerFor(Node* node) const98 ShadowContentElement* ShadowRoot::activeContentElement() 101 99 { 102 if (!m_inclusions) 100 ShadowContentSelector* selector = ShadowContentSelector::currentInstance(); 101 if (!selector || selector->shadowRoot() != this) 103 102 return 0; 104 ShadowInclusion* found = m_inclusions->find(node); 105 if (!found) 106 return 0; 107 return found->includer(); 103 return selector->activeElement(); 108 104 } 109 105 … … 142 138 } 143 139 144 ShadowInclusionSet* ShadowRoot::inclusions() const145 {146 return m_inclusions.get();147 140 } 148 149 ShadowInclusionSet* ShadowRoot::ensureInclusions()150 {151 if (!m_inclusions)152 m_inclusions = adoptPtr(new ShadowInclusionSet());153 return m_inclusions.get();154 }155 156 157 } -
trunk/Source/WebCore/dom/ShadowRoot.h
r90976 r90987 34 34 class Document; 35 35 class ShadowContentElement; 36 class ShadowInclusionSet;37 36 38 37 class ShadowRoot : public TreeScope { … … 42 41 virtual void recalcStyle(StyleChange = NoChange); 43 42 44 ShadowContentElement* includerFor(Node*) const;43 ShadowContentElement* activeContentElement(); 45 44 void hostChildrenChanged(); 46 45 … … 49 48 virtual bool applyAuthorSheets() const; 50 49 void setApplyAuthorSheets(bool); 51 52 ShadowInclusionSet* inclusions() const;53 ShadowInclusionSet* ensureInclusions();54 50 55 51 private: … … 65 61 66 62 bool m_applyAuthorSheets; 67 OwnPtr<ShadowInclusionSet> m_inclusions;68 63 }; 69 64 … … 73 68 } 74 69 75 inline ShadowRoot* toShadowRoot(Node* node)76 {77 ASSERT(!node || node->nodeType() == Node::SHADOW_ROOT_NODE);78 return static_cast<ShadowRoot*>(node);79 }80 81 70 } // namespace 82 71 -
trunk/Source/WebCore/testing/Internals.cpp
r90976 r90987 32 32 #include "ExceptionCode.h" 33 33 #include "InspectorController.h" 34 #include "NodeRenderingContext.h"35 34 #include "Page.h" 36 35 #include "RenderTreeAsText.h" … … 117 116 } 118 117 119 Element* Internals::includerFor(Node* node, ExceptionCode& ec)120 {121 if (!node) {122 ec = INVALID_ACCESS_ERR;123 return 0;124 }125 126 return NodeRenderingContext(node).includer();127 }128 129 118 String Internals::shadowPseudoId(Element* element, ExceptionCode& ec) 130 119 { -
trunk/Source/WebCore/testing/Internals.h
r90976 r90987 51 51 Node* shadowRoot(Element* host, ExceptionCode&); 52 52 void removeShadowRoot(Element* host, ExceptionCode&); 53 Element* includerFor(Node*, ExceptionCode&);54 53 String shadowPseudoId(Element*, ExceptionCode&); 55 54 PassRefPtr<Element> createShadowContentElement(Document*, ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r90976 r90987 33 33 Node ensureShadowRoot(in Element host) raises (DOMException); 34 34 Node shadowRoot(in Element host) raises (DOMException); 35 Element includerFor(in Node node) raises (DOMException);36 35 void removeShadowRoot(in Element host) raises (DOMException); 37 36 DOMString shadowPseudoId(in Element element) raises (DOMException); -
trunk/Source/WebKit2/ChangeLog
r90981 r90987 1 2011-07-14 MORITA Hajime <morrita@google.com> 2 3 Unreviewed, rolling out r90976, r90981, and r90985. 4 http://trac.webkit.org/changeset/90976 5 http://trac.webkit.org/changeset/90981 6 http://trac.webkit.org/changeset/90985 7 https://bugs.webkit.org/show_bug.cgi?id=64251 8 9 build break 10 11 * win/WebKit2.def: 12 * win/WebKit2CFLite.def: 13 1 14 2011-07-13 MORITA Hajime <morrita@google.com> 2 15 -
trunk/Source/WebKit2/win/WebKit2.def
r90976 r90987 136 136 137 137 ; Re-exports from WebCore for test harnesses 138 ??0NodeRenderingContext@WebCore@@QAE@PAVNode@1@@Z139 ??1NodeRenderingContext@WebCore@@QAE@XZ140 ?toNode@WebCore@@YAPAVNode@1@VJSValue@JSC@@@Z141 138 ??0String@WTF@@QAE@PBD@Z 142 139 ??0String@WTF@@QAE@PB_W@Z -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r90981 r90987 129 129 130 130 ; Re-exports from WebCore for test harnesses 131 ??0NodeRenderingContext@WebCore@@QAE@PAVNode@1@@Z132 131 ??0String@WTF@@QAE@PBD@Z 133 132 ??0String@WTF@@QAE@PB_W@Z 134 ??1NodeRenderingContext@WebCore@@QAE@XZ135 133 ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z 136 134 ?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z … … 151 149 ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z 152 150 ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z 153 ?toNode@WebCore@@YAPAVNode@1@VJSValue@JSC@@@Z154 151 ?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ -
trunk/Source/autotools/symbols.filter
r90985 r90987 38 38 _ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE; 39 39 _ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii; 40 _ZN7WebCore20NodeRenderingContextC1EPNS_4NodeE;41 _ZN7WebCore20NodeRenderingContextD1Ev;42 40 _ZN7WebCore20ShadowContentElement6createEPNS_8DocumentE; 43 41 _ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE; … … 46 44 _ZN7WebCore6JSNode3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE; 47 45 _ZN7WebCore6JSNode6s_infoE; 48 _ZN7WebCore6toNodeEN3JSC7JSValueE;49 46 _ZN7WebCore7Element16ensureShadowRootEv; 50 47 _ZN7WebCore7Element16removeShadowRootEv;
Note: See TracChangeset
for help on using the changeset viewer.