Changeset 161195 in webkit
- Timestamp:
- Jan 1, 2014, 1:20:51 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r161193 r161195 1 2014-01-01 Antti Koivisto <antti@apple.com> 2 3 Do less synchronous render tree construction 4 https://bugs.webkit.org/show_bug.cgi?id=126359 5 6 * fast/html/object-image-nested-fallback.html: Update test to work with asynchronous load failures. 7 * fast/overflow/overflow-height-float-not-removed-crash3-expected.txt: Whitespace change. 8 1 9 2014-01-01 Zan Dobersek <zdobersek@igalia.com> 2 10 -
trunk/LayoutTests/fast/html/object-image-nested-fallback.html
r121012 r161195 1 1 <html> 2 2 <script> 3 if (window.testRunner) 3 if (window.testRunner) { 4 4 testRunner.dumpAsText(); 5 testRunner.waitUntilDone(); 6 } 7 function done() { 8 if (testRunner) 9 testRunner.notifyDone(); 10 } 5 11 </script> 6 <body> 12 <body> 7 13 <object type="image/png" data="this.object.does.not.exist.dtd"> 8 14 <object type="image/png" data="this.object.does.not.exist.dtd"> 9 <object type="image/png" data="this.object.does.not.exist.dtd" >PASS when no crash occurs.</object>15 <object type="image/png" data="this.object.does.not.exist.dtd" onerror="done()">PASS when no crash occurs.</object> 10 16 </object> 11 17 </object> -
trunk/LayoutTests/fast/overflow/overflow-height-float-not-removed-crash3-expected.txt
r79462 r161195 1 1 Test passes if it does not crash. 2 2 sometextsometextsometextsometextsometextsometext 3 3 -
trunk/Source/WebCore/ChangeLog
r161194 r161195 1 2014-01-01 Antti Koivisto <antti@apple.com> 2 3 Do less synchronous render tree construction 4 https://bugs.webkit.org/show_bug.cgi?id=126359 5 6 Reviewed by Anders Carlsson. 7 8 Remove some now-unnecessary attachRenderTree calls. 9 10 * html/HTMLDetailsElement.cpp: 11 (WebCore::HTMLDetailsElement::parseAttribute): 12 * html/HTMLInputElement.cpp: 13 (WebCore::HTMLInputElement::parseAttribute): 14 * html/HTMLObjectElement.cpp: 15 (WebCore::HTMLObjectElement::renderFallbackContent): 16 * html/HTMLPlugInElement.cpp: 17 (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): 18 * html/HTMLPlugInImageElement.cpp: 19 (WebCore::HTMLPlugInImageElement::willRecalcStyle): 20 (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): 21 (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn): 22 * html/HTMLViewSourceDocument.cpp: 23 (WebCore::HTMLViewSourceDocument::createContainingTable): 24 (WebCore::HTMLViewSourceDocument::addSpanWithClassName): 25 (WebCore::HTMLViewSourceDocument::addLine): 26 (WebCore::HTMLViewSourceDocument::finishLine): 27 (WebCore::HTMLViewSourceDocument::addBase): 28 (WebCore::HTMLViewSourceDocument::addLink): 29 * xml/XMLErrors.cpp: 30 (WebCore::XMLErrors::insertErrorMessageBlock): 31 1 32 2014-01-01 Simon Fraser <simon.fraser@apple.com> 2 33 -
trunk/Source/WebCore/html/HTMLDetailsElement.cpp
r161181 r161195 137 137 bool oldValue = m_isOpen; 138 138 m_isOpen = !value.isNull(); 139 if (oldValue != m_isOpen && renderer())140 Style::reattachRenderTree(*this);139 if (oldValue != m_isOpen) 140 setNeedsStyleRecalc(ReconstructRenderTree); 141 141 } else 142 142 HTMLElement::parseAttribute(name, value); -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r161181 r161195 683 683 int oldResults = m_maxResults; 684 684 m_maxResults = !value.isNull() ? std::min(value.toInt(), maxSavedResults) : -1; 685 // FIXME: Detaching just for maxResults change is not ideal. We should figure out the right 686 // time to relayout for this change.687 if (m_maxResults != oldResults && (m_maxResults <= 0 || oldResults <= 0) && renderer())688 Style::reattachRenderTree(*this);689 setNeedsStyleRecalc();685 686 if (m_maxResults != oldResults && (m_maxResults <= 0 || oldResults <= 0)) 687 setNeedsStyleRecalc(ReconstructRenderTree); 688 else 689 setNeedsStyleRecalc(); 690 690 FeatureObserver::observe(&document(), FeatureObserver::ResultsAttribute); 691 691 } else if (name == autosaveAttr) { … … 735 735 #if ENABLE(INPUT_SPEECH) 736 736 else if (name == webkitspeechAttr) { 737 if (renderer()) { 738 // This renderer and its children have quite different layouts and styles depending on 739 // whether the speech button is visible or not. So we reset the whole thing and recreate 740 // to get the right styles and layout. 741 Style::detachRenderTree(*this); 742 m_inputType->destroyShadowSubtree(); 743 m_inputType->createShadowSubtree(); 744 Style::attachRenderTree(*this); 745 } else { 746 m_inputType->destroyShadowSubtree(); 747 m_inputType->createShadowSubtree(); 748 } 737 m_inputType->destroyShadowSubtree(); 738 m_inputType->createShadowSubtree(); 739 740 // This renderer and its children have quite different layouts and styles depending on 741 // whether the speech button is visible or not. So we reset the whole thing and recreate 742 // to get the right styles and layout. 743 setNeedsStyleRecalc(ReconstructRenderTree); 744 749 745 setFormControlValueMatchesRenderer(false); 750 setNeedsStyleRecalc();751 746 FeatureObserver::observe(&document(), FeatureObserver::PrefixedSpeechAttribute); 752 747 } else if (name == onwebkitspeechchangeAttr) -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r160908 r161195 374 374 return; 375 375 376 setNeedsStyleRecalc(ReconstructRenderTree); 377 376 378 // Before we give up and use fallback content, check to see if this is a MIME type issue. 377 379 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->status() != CachedResource::LoadError) { … … 380 382 // If we don't think we have an image type anymore, then clear the image from the loader. 381 383 m_imageLoader->setImage(0); 382 Style::reattachRenderTree(*this);383 384 return; 384 385 } … … 386 387 387 388 m_useFallbackContent = true; 388 389 // FIXME: Style gets recalculated which is suboptimal.390 Style::reattachRenderTree(*this);391 389 } 392 390 -
trunk/Source/WebCore/html/HTMLPlugInElement.cpp
r161181 r161195 310 310 if (m_pluginReplacement->installReplacement(root)) { 311 311 setDisplayState(DisplayingPluginReplacement); 312 Style::reattachRenderTree(*this);312 setNeedsStyleRecalc(ReconstructRenderTree); 313 313 } 314 314 } -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r161181 r161195 239 239 bool HTMLPlugInImageElement::willRecalcStyle(Style::Change) 240 240 { 241 // FIXME: Why is this necessary? Manual re-attach is almost always wrong. 241 // FIXME: There shoudn't be need to force render tree reconstruction here. 242 // It is only done because loading and load event dispatching is tied to render tree construction. 242 243 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageType() && (displayState() != DisplayingSnapshot)) 243 Style::reattachRenderTree(*this);244 setNeedsStyleRecalc(ReconstructRenderTree); 244 245 return true; 245 246 } … … 464 465 iframeElement->setAttribute(HTMLNames::scrollingAttr, AtomicString("no", AtomicString::ConstructFromLiteral)); 465 466 shadowElement->appendChild(iframeElement, ASSERT_NO_EXCEPTION); 466 467 if (renderer())468 Style::reattachRenderTree(*this);469 467 } 470 468 #endif … … 573 571 574 572 setDisplayState(Restarting); 575 Style::reattachRenderTree(*this);573 setNeedsStyleRecalc(ReconstructRenderTree); 576 574 } 577 575 -
trunk/Source/WebCore/html/HTMLViewSourceDocument.cpp
r158650 r161195 81 81 table->parserAppendChild(m_tbody); 82 82 m_current = m_tbody; 83 84 Style::attachRenderTree(*html);85 83 } 86 84 … … 180 178 span->setAttribute(classAttr, className); 181 179 m_current->parserAppendChild(span); 182 Style::attachRenderTree(*span);183 180 return span.release(); 184 181 } … … 189 186 RefPtr<HTMLTableRowElement> trow = HTMLTableRowElement::create(*this); 190 187 m_tbody->parserAppendChild(trow); 191 Style::reattachRenderTree(*trow);192 188 193 189 // Create a cell that will hold the line number (it is generated in the stylesheet using counters). … … 195 191 td->setAttribute(classAttr, "webkit-line-number"); 196 192 trow->parserAppendChild(td); 197 Style::attachRenderTree(*td);198 193 199 194 // Create a second cell for the line contents … … 201 196 td->setAttribute(classAttr, "webkit-line-content"); 202 197 trow->parserAppendChild(td); 203 Style::attachRenderTree(*td);204 198 m_current = m_td = td; 205 199 … … 207 201 RefPtr<Text> lineNumberText = Text::create(*this, String::number(parser()->lineNumber() + 1) + " "); 208 202 td->addChild(lineNumberText); 209 Style::attachRenderTree(lineNumberText.get());210 203 #endif 211 204 … … 223 216 RefPtr<HTMLBRElement> br = HTMLBRElement::create(*this); 224 217 m_current->parserAppendChild(br); 225 Style::attachRenderTree(*br);226 218 } 227 219 m_current = m_tbody; … … 279 271 base->setAttribute(hrefAttr, href); 280 272 m_current->parserAppendChild(base); 281 Style::attachRenderTree(*base);282 273 return base.release(); 283 274 } … … 299 290 anchor->setAttribute(hrefAttr, url); 300 291 m_current->parserAppendChild(anchor); 301 Style::attachRenderTree(*anchor);302 292 return anchor.release(); 303 293 } -
trunk/Source/WebCore/xml/XMLErrors.cpp
r161127 r161195 141 141 m_document->parserAppendChild(rootElement.get()); 142 142 143 if (m_document->hasLivingRenderTree())144 // In general, rootElement shouldn't be attached right now, but it will be if there is a style element145 // in the SVG content.146 Style::reattachRenderTree(*rootElement);147 148 143 documentElement = body.get(); 149 144 }
Note:
See TracChangeset
for help on using the changeset viewer.