Changeset 107178 in webkit
- Timestamp:
- Feb 8, 2012 9:46:57 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r107177 r107178 1 2012-02-08 Shinya Kawanaka <shinyak@google.com> 2 3 Stop calling Element::ensureShadowRoot() if it is used in construction phase. 4 https://bugs.webkit.org/show_bug.cgi?id=77929 5 6 Reviewed by Hajime Morita. 7 8 ShadowRoot's life cycle can be consufing If Element::ensureShadowRoot() is used. 9 So we want to remove Element::ensureShadowRoot(). 10 This patch replaces Element::ensureShadowRoot() if it is used in object construction phase. 11 12 No new tests, no change in behavior. 13 14 * dom/ShadowRoot.cpp: 15 (WebCore::ShadowRoot::create): 16 Initialize exception code before calling appendChild. 17 * html/HTMLDetailsElement.cpp: 18 (WebCore::HTMLDetailsElement::createShadowSubtree): 19 * html/HTMLKeygenElement.cpp: 20 (WebCore::HTMLKeygenElement::HTMLKeygenElement): 21 * html/HTMLMeterElement.cpp: 22 (WebCore::HTMLMeterElement::createShadowSubtree): 23 * html/HTMLProgressElement.cpp: 24 (WebCore::HTMLProgressElement::createShadowSubtree): 25 * html/HTMLSummaryElement.cpp: 26 (WebCore::HTMLSummaryElement::createShadowSubtree): 27 * html/HTMLTextAreaElement.cpp: 28 (WebCore::HTMLTextAreaElement::createShadowSubtree): 29 1 30 2012-02-08 David Reveman <reveman@chromium.org> 2 31 -
trunk/Source/WebCore/dom/ShadowRoot.cpp
r106613 r107178 67 67 } 68 68 RefPtr<ShadowRoot> shadowRoot = create(element->document()); 69 70 ec = 0; 69 71 element->setShadowRoot(shadowRoot, ec); 70 72 if (ec) 71 73 return 0; 74 72 75 return shadowRoot.release(); 73 76 } -
trunk/Source/WebCore/html/HTMLDetailsElement.cpp
r107060 r107178 110 110 { 111 111 ASSERT(!shadowRoot()); 112 ensureShadowRoot()->appendChild(DetailsSummaryElement::create(document()), ASSERT_NO_EXCEPTION, true); 113 ensureShadowRoot()->appendChild(DetailsContentElement::create(document()), ASSERT_NO_EXCEPTION, true); 112 113 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION); 114 root->appendChild(DetailsSummaryElement::create(document()), ASSERT_NO_EXCEPTION, true); 115 root->appendChild(DetailsContentElement::create(document()), ASSERT_NO_EXCEPTION, true); 114 116 } 115 117 -
trunk/Source/WebCore/html/HTMLKeygenElement.cpp
r107060 r107178 86 86 } 87 87 88 ensureShadowRoot()->appendChild(select, ec); 88 ASSERT(!shadowRoot()); 89 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION); 90 root->appendChild(select, ec); 89 91 } 90 92 -
trunk/Source/WebCore/html/HTMLMeterElement.cpp
r107060 r107178 235 235 void HTMLMeterElement::createShadowSubtree() 236 236 { 237 ASSERT(!shadowRoot()); 238 237 239 RefPtr<MeterBarElement> bar = MeterBarElement::create(document()); 238 240 m_value = MeterValueElement::create(document()); 239 241 ExceptionCode ec = 0; 240 242 bar->appendChild(m_value, ec); 241 ensureShadowRoot()->appendChild(bar, ec); 243 244 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION); 245 root->appendChild(bar, ec); 242 246 } 243 247 -
trunk/Source/WebCore/html/HTMLProgressElement.cpp
r107060 r107178 154 154 void HTMLProgressElement::createShadowSubtree() 155 155 { 156 ASSERT(!shadowRoot()); 157 156 158 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document()); 157 159 m_value = ProgressValueElement::create(document()); 158 ExceptionCode ec = 0; 159 bar->appendChild(m_value, ec); 160 ensureShadowRoot()->appendChild(bar, ec); 160 bar->appendChild(m_value, ASSERT_NO_EXCEPTION); 161 162 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION); 163 root->appendChild(bar, ASSERT_NO_EXCEPTION); 161 164 } 162 165 -
trunk/Source/WebCore/html/HTMLSummaryElement.cpp
r107060 r107178 74 74 void HTMLSummaryElement::createShadowSubtree() 75 75 { 76 ExceptionCode ec = 0; 77 ensureShadowRoot()->appendChild(DetailsMarkerControl::create(document()), ec, true); 78 ensureShadowRoot()->appendChild(SummaryContentElement::create(document()), ec, true); 76 ASSERT(!shadowRoot()); 77 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION); 78 root->appendChild(DetailsMarkerControl::create(document()), ASSERT_NO_EXCEPTION, true); 79 root->appendChild(SummaryContentElement::create(document()), ASSERT_NO_EXCEPTION, true); 79 80 } 80 81 -
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
r107060 r107178 85 85 void HTMLTextAreaElement::createShadowSubtree() 86 86 { 87 ExceptionCode ec = 0; 88 ensureShadowRoot()->appendChild(TextControlInnerTextElement::create(document()), ec); 87 ASSERT(!shadowRoot()); 88 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ASSERT_NO_EXCEPTION); 89 root->appendChild(TextControlInnerTextElement::create(document()), ASSERT_NO_EXCEPTION); 89 90 } 90 91
Note: See TracChangeset
for help on using the changeset viewer.