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

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

Issue 153233002: *** DO NOT LAND *** Remove regions support, keeping a bare minimum to support "region-based"... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 { 202 {
203 if (box->renderer() == m_lineBreakObj) 203 if (box->renderer() == m_lineBreakObj)
204 setLineBreakInfo(0, 0, BidiStatus()); 204 setLineBreakInfo(0, 0, BidiStatus());
205 205
206 for (RootInlineBox* prev = prevRootBox(); prev && prev->lineBreakObj() == bo x->renderer(); prev = prev->prevRootBox()) { 206 for (RootInlineBox* prev = prevRootBox(); prev && prev->lineBreakObj() == bo x->renderer(); prev = prev->prevRootBox()) {
207 prev->setLineBreakInfo(0, 0, BidiStatus()); 207 prev->setLineBreakInfo(0, 0, BidiStatus());
208 prev->markDirty(); 208 prev->markDirty();
209 } 209 }
210 } 210 }
211 211
212 RenderRegion* RootInlineBox::containingRegion() const
213 {
214 RenderRegion* region = m_fragmentationData ? m_fragmentationData->m_containi ngRegion : 0;
215
216 #ifndef NDEBUG
217 if (region) {
218 RenderFlowThread* flowThread = block()->flowThreadContainingBlock();
219 const RenderRegionList& regionList = flowThread->renderRegionList();
220 ASSERT(regionList.contains(region));
221 }
222 #endif
223
224 return region;
225 }
226
227 void RootInlineBox::setContainingRegion(RenderRegion* region)
228 {
229 ASSERT(!isDirty());
230 ASSERT(block()->flowThreadContainingBlock());
231 LineFragmentationData* fragmentationData = ensureLineFragmentationData();
232 fragmentationData->m_containingRegion = region;
233 }
234
235 LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G lyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& vertical PositionCache) 212 LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G lyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& vertical PositionCache)
236 { 213 {
237 // SVG will handle vertical alignment on its own. 214 // SVG will handle vertical alignment on its own.
238 if (isSVGRootInlineBox()) 215 if (isSVGRootInlineBox())
239 return 0; 216 return 0;
240 217
241 LayoutUnit maxPositionTop = 0; 218 LayoutUnit maxPositionTop = 0;
242 LayoutUnit maxPositionBottom = 0; 219 LayoutUnit maxPositionBottom = 0;
243 int maxAscent = 0; 220 int maxAscent = 0;
244 int maxDescent = 0; 221 int maxDescent = 0;
(...skipping 20 matching lines...) Expand all
265 bool hasAnnotationsBefore = false; 242 bool hasAnnotationsBefore = false;
266 bool hasAnnotationsAfter = false; 243 bool hasAnnotationsAfter = false;
267 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode , lineTop, lineBottom, setLineTop, 244 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode , lineTop, lineBottom, setLineTop,
268 lineTopIncludingMargins, lineBottomIncludingMargi ns, hasAnnotationsBefore, hasAnnotationsAfter, baselineType()); 245 lineTopIncludingMargins, lineBottomIncludingMargi ns, hasAnnotationsBefore, hasAnnotationsAfter, baselineType());
269 m_hasAnnotationsBefore = hasAnnotationsBefore; 246 m_hasAnnotationsBefore = hasAnnotationsBefore;
270 m_hasAnnotationsAfter = hasAnnotationsAfter; 247 m_hasAnnotationsAfter = hasAnnotationsAfter;
271 248
272 maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessar y? 249 maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessar y?
273 250
274 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight); 251 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight);
275 setPaginatedLineWidth(block()->availableLogicalWidthForContent(heightOfBlock )); 252 setPaginatedLineWidth(block()->availableLogicalWidthForContent());
276 253
277 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); 254 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment();
278 if (annotationsAdjustment) { 255 if (annotationsAdjustment) {
279 // FIXME: Need to handle pagination here. We might have to move to the n ext page/column as a result of the 256 // FIXME: Need to handle pagination here. We might have to move to the n ext page/column as a result of the
280 // ruby expansion. 257 // ruby expansion.
281 adjustBlockDirectionPosition(annotationsAdjustment); 258 adjustBlockDirectionPosition(annotationsAdjustment);
282 heightOfBlock += annotationsAdjustment; 259 heightOfBlock += annotationsAdjustment;
283 } 260 }
284 261
285 LayoutUnit gridSnapAdjustment = lineSnapAdjustment(); 262 LayoutUnit gridSnapAdjustment = lineSnapAdjustment();
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 } 966 }
990 967
991 #ifndef NDEBUG 968 #ifndef NDEBUG
992 const char* RootInlineBox::boxName() const 969 const char* RootInlineBox::boxName() const
993 { 970 {
994 return "RootInlineBox"; 971 return "RootInlineBox";
995 } 972 }
996 #endif 973 #endif
997 974
998 } // namespace WebCore 975 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RootInlineBox.h ('k') | Source/core/rendering/line/BreakingContextInlineHeaders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698