Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: Source/core/rendering/RenderNamedFlowThread.cpp

Issue 23064019: Follow-up changes for bug 257965 (writing-mode on first region). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/regions/invalid-first-region-with-writing-mode-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « LayoutTests/fast/regions/invalid-first-region-with-writing-mode-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698