Index: Source/core/rendering/RenderNamedFlowThread.cpp |
diff --git a/Source/core/rendering/RenderNamedFlowThread.cpp b/Source/core/rendering/RenderNamedFlowThread.cpp |
index bc72e9a873810db2140a9c0df4d299a173f6beb9..549fef4bb07f91c515b3233454c2da1a5d8a01ce 100644 |
--- a/Source/core/rendering/RenderNamedFlowThread.cpp |
+++ b/Source/core/rendering/RenderNamedFlowThread.cpp |
@@ -92,14 +92,16 @@ void RenderNamedFlowThread::clearContentNodes() |
void RenderNamedFlowThread::updateWritingMode() |
{ |
- if (RenderRegion* firstRegion = m_regionList.first()) { |
- if (style()->writingMode() != firstRegion->style()->writingMode()) { |
- // The first region defines the principal writing mode for the entire flow. |
- RefPtr<RenderStyle> newStyle = RenderStyle::clone(style()); |
- newStyle->setWritingMode(firstRegion->style()->writingMode()); |
- setStyle(newStyle); |
- } |
- } |
+ RenderRegion* firstRegion = m_regionList.first(); |
+ if (!firstRegion) |
+ return; |
+ if (style()->writingMode() == firstRegion->style()->writingMode()) |
+ return; |
+ |
+ // The first region defines the principal writing mode for the entire flow. |
+ RefPtr<RenderStyle> newStyle = RenderStyle::clone(style()); |
+ newStyle->setWritingMode(firstRegion->style()->writingMode()); |
+ setStyle(newStyle.release()); |
} |
RenderObject* RenderNamedFlowThread::nextRendererForNode(Node* node) const |