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

Side by Side Diff: Source/core/rendering/RenderRegion.cpp

Issue 18374008: Propagate writing-mode from the first region to the flow thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // If the region is not attached to any thread, there is no need to check 262 // If the region is not attached to any thread, there is no need to check
263 // whether the region has region styling since no content will be displayed 263 // whether the region has region styling since no content will be displayed
264 // into the region. 264 // into the region.
265 if (!m_flowThread) { 265 if (!m_flowThread) {
266 setHasCustomRegionStyle(false); 266 setHasCustomRegionStyle(false);
267 return; 267 return;
268 } 268 }
269 269
270 checkRegionStyle(); 270 checkRegionStyle();
271 updateRegionHasAutoLogicalHeightFlag(); 271 updateRegionHasAutoLogicalHeightFlag();
272
273 if (oldStyle && oldStyle->writingMode() != style()->writingMode())
274 m_flowThread->regionChangedWritingMode(this);
272 } 275 }
273 276
274 void RenderRegion::layoutBlock(bool relayoutChildren, LayoutUnit) 277 void RenderRegion::layoutBlock(bool relayoutChildren, LayoutUnit)
275 { 278 {
276 StackStats::LayoutCheckPoint layoutCheckPoint; 279 StackStats::LayoutCheckPoint layoutCheckPoint;
277 RenderBlock::layoutBlock(relayoutChildren); 280 RenderBlock::layoutBlock(relayoutChildren);
278 281
279 if (isValid()) { 282 if (isValid()) {
280 LayoutRect oldRegionRect(flowThreadPortionRect()); 283 LayoutRect oldRegionRect(flowThreadPortionRect());
281 if (!isHorizontalWritingMode()) 284 if (!isHorizontalWritingMode())
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 if (!hasOverrideHeight()) 642 if (!hasOverrideHeight())
640 return; 643 return;
641 644
642 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight(); 645 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight();
643 ASSERT(newLogicalHeight < LayoutUnit::max() / 2); 646 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
644 if (newLogicalHeight > logicalHeight()) 647 if (newLogicalHeight > logicalHeight())
645 setLogicalHeight(newLogicalHeight); 648 setLogicalHeight(newLogicalHeight);
646 } 649 }
647 650
648 } // namespace WebCore 651 } // namespace WebCore
OLDNEW
« Source/core/rendering/RenderFlowThread.h ('K') | « Source/core/rendering/RenderNamedFlowThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698