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

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: Address minor issues raised together with the LGTM. 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
« no previous file with comments | « Source/core/rendering/RenderNamedFlowThread.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // If the region is not attached to any thread, there is no need to check 263 // If the region is not attached to any thread, there is no need to check
264 // whether the region has region styling since no content will be displayed 264 // whether the region has region styling since no content will be displayed
265 // into the region. 265 // into the region.
266 if (!m_flowThread) { 266 if (!m_flowThread) {
267 setHasCustomRegionStyle(false); 267 setHasCustomRegionStyle(false);
268 return; 268 return;
269 } 269 }
270 270
271 checkRegionStyle(); 271 checkRegionStyle();
272 updateRegionHasAutoLogicalHeightFlag(); 272 updateRegionHasAutoLogicalHeightFlag();
273
274 if (oldStyle && oldStyle->writingMode() != style()->writingMode())
275 m_flowThread->regionChangedWritingMode(this);
273 } 276 }
274 277
275 void RenderRegion::layoutBlock(bool relayoutChildren, LayoutUnit) 278 void RenderRegion::layoutBlock(bool relayoutChildren, LayoutUnit)
276 { 279 {
277 StackStats::LayoutCheckPoint layoutCheckPoint; 280 StackStats::LayoutCheckPoint layoutCheckPoint;
278 RenderBlock::layoutBlock(relayoutChildren); 281 RenderBlock::layoutBlock(relayoutChildren);
279 282
280 if (isValid()) { 283 if (isValid()) {
281 LayoutRect oldRegionRect(flowThreadPortionRect()); 284 LayoutRect oldRegionRect(flowThreadPortionRect());
282 if (!isHorizontalWritingMode()) 285 if (!isHorizontalWritingMode())
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 645
643 LayoutUnit autoHeight = hasOverrideHeight() ? overrideLogicalContentHeight() : computedAutoHeight(); 646 LayoutUnit autoHeight = hasOverrideHeight() ? overrideLogicalContentHeight() : computedAutoHeight();
644 647
645 LayoutUnit newLogicalHeight = autoHeight + borderAndPaddingLogicalHeight(); 648 LayoutUnit newLogicalHeight = autoHeight + borderAndPaddingLogicalHeight();
646 ASSERT(newLogicalHeight < LayoutUnit::max() / 2); 649 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
647 if (newLogicalHeight > logicalHeight()) 650 if (newLogicalHeight > logicalHeight())
648 setLogicalHeight(newLogicalHeight); 651 setLogicalHeight(newLogicalHeight);
649 } 652 }
650 653
651 } // namespace WebCore 654 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderNamedFlowThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698