Title: [135432] trunk/Source/WebCore
- Revision
- 135432
- Author
- [email protected]
- Date
- 2012-11-21 14:21:40 -0800 (Wed, 21 Nov 2012)
Log Message
Remove unnecessary ternaries in createRendererIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=102974
Patch by Elliott Sprehn <[email protected]> on 2012-11-21
Reviewed by Ojan Vafai.
parentRenderer, nextRenderer and previousRenderer all handle flow
threads automatically so there's no reason to duplicate the check in
createRendererIfNeeded.
Note that while these methods first check the node for a renderer and
then delegate to the flow thread the node never has a renderer when
calling createRendererIfNeeded per the assertion at the top so this
change is equivalent.
No new tests, just refactoring.
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::createRendererIfNeeded):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135431 => 135432)
--- trunk/Source/WebCore/ChangeLog 2012-11-21 22:02:56 UTC (rev 135431)
+++ trunk/Source/WebCore/ChangeLog 2012-11-21 22:21:40 UTC (rev 135432)
@@ -1,3 +1,24 @@
+2012-11-21 Elliott Sprehn <[email protected]>
+
+ Remove unnecessary ternaries in createRendererIfNeeded
+ https://bugs.webkit.org/show_bug.cgi?id=102974
+
+ Reviewed by Ojan Vafai.
+
+ parentRenderer, nextRenderer and previousRenderer all handle flow
+ threads automatically so there's no reason to duplicate the check in
+ createRendererIfNeeded.
+
+ Note that while these methods first check the node for a renderer and
+ then delegate to the flow thread the node never has a renderer when
+ calling createRendererIfNeeded per the assertion at the top so this
+ change is equivalent.
+
+ No new tests, just refactoring.
+
+ * dom/NodeRenderingContext.cpp:
+ (WebCore::NodeRenderingContext::createRendererIfNeeded):
+
2012-11-21 Ryosuke Niwa <[email protected]>
EFL and GTK+ build fix after r135429.
Modified: trunk/Source/WebCore/dom/NodeRenderingContext.cpp (135431 => 135432)
--- trunk/Source/WebCore/dom/NodeRenderingContext.cpp 2012-11-21 22:02:56 UTC (rev 135431)
+++ trunk/Source/WebCore/dom/NodeRenderingContext.cpp 2012-11-21 22:21:40 UTC (rev 135432)
@@ -219,10 +219,8 @@
element->setStyleAffectedByEmpty();
return;
}
- RenderObject* parentRenderer = m_parentFlowRenderer ? m_parentFlowRenderer : this->parentRenderer();
- // Do not call m_context.nextRenderer() here in the first clause, because it expects to have
- // the renderer added to its parent already.
- RenderObject* nextRenderer = m_parentFlowRenderer ? m_parentFlowRenderer->nextRendererForNode(m_node) : this->nextRenderer();
+ RenderObject* parentRenderer = this->parentRenderer();
+ RenderObject* nextRenderer = this->nextRenderer();
#if ENABLE(DIALOG_ELEMENT)
if (element && element->isInTopLayer())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes