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

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

Issue 16690004: [CSS Regions] Rename region-overflow to region-fragment (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch Created 7 years, 6 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/RenderBlock.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect& flow ThreadPortionRect, bool isFirstPortion, bool isLastPortion) const 95 LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect& flow ThreadPortionRect, bool isFirstPortion, bool isLastPortion) const
96 { 96 {
97 ASSERT(isValid()); 97 ASSERT(isValid());
98 98
99 // FIXME: Would like to just use hasOverflowClip() but we aren't a block yet . When RenderRegion is eliminated and 99 // FIXME: Would like to just use hasOverflowClip() but we aren't a block yet . When RenderRegion is eliminated and
100 // folded into RenderBlock, switch to hasOverflowClip(). 100 // folded into RenderBlock, switch to hasOverflowClip().
101 bool clipX = style()->overflowX() != OVISIBLE; 101 bool clipX = style()->overflowX() != OVISIBLE;
102 bool clipY = style()->overflowY() != OVISIBLE; 102 bool clipY = style()->overflowY() != OVISIBLE;
103 bool isLastRegionWithRegionOverflowBreak = (isLastPortion && (style()->regio nOverflow() == BreakRegionOverflow)); 103 bool isLastRegionWithRegionFragmentBreak = (isLastPortion && (style()->regio nFragment() == BreakRegionFragment));
104 if ((clipX && clipY) || isLastRegionWithRegionOverflowBreak) 104 if ((clipX && clipY) || isLastRegionWithRegionFragmentBreak)
105 return flowThreadPortionRect; 105 return flowThreadPortionRect;
106 106
107 LayoutRect flowThreadOverflow = m_flowThread->visualOverflowRect(); 107 LayoutRect flowThreadOverflow = m_flowThread->visualOverflowRect();
108 108
109 // Only clip along the flow thread axis. 109 // Only clip along the flow thread axis.
110 LayoutUnit outlineSize = maximalOutlineSize(PaintPhaseOutline); 110 LayoutUnit outlineSize = maximalOutlineSize(PaintPhaseOutline);
111 LayoutRect clipRect; 111 LayoutRect clipRect;
112 if (m_flowThread->isHorizontalWritingMode()) { 112 if (m_flowThread->isHorizontalWritingMode()) {
113 LayoutUnit minY = isFirstPortion ? (flowThreadOverflow.y() - outlineSize ) : flowThreadPortionRect.y(); 113 LayoutUnit minY = isFirstPortion ? (flowThreadOverflow.y() - outlineSize ) : flowThreadPortionRect.y();
114 LayoutUnit maxY = isLastPortion ? max(flowThreadPortionRect.maxY(), flow ThreadOverflow.maxY()) + outlineSize : flowThreadPortionRect.maxY(); 114 LayoutUnit maxY = isLastPortion ? max(flowThreadPortionRect.maxY(), flow ThreadOverflow.maxY()) + outlineSize : flowThreadPortionRect.maxY();
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 if (!hasOverrideHeight()) 620 if (!hasOverrideHeight())
621 return; 621 return;
622 622
623 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight(); 623 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight();
624 ASSERT(newLogicalHeight < LayoutUnit::max() / 2); 624 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
625 if (newLogicalHeight > logicalHeight()) 625 if (newLogicalHeight > logicalHeight())
626 setLogicalHeight(newLogicalHeight); 626 setLogicalHeight(newLogicalHeight);
627 } 627 }
628 628
629 } // namespace WebCore 629 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698