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

Side by Side Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 178473024: Convert some Shape code to use references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased patch Created 6 years, 9 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/RenderView.h ('k') | Source/core/rendering/line/LineWidth.cpp » ('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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 509
510 inline void updateSegmentsForShapes(RenderBlockFlow* block, const FloatingObject * lastFloatFromPreviousLine, const WordMeasurements& wordMeasurements, LineWidth & width, bool isFirstLine) 510 inline void updateSegmentsForShapes(RenderBlockFlow* block, const FloatingObject * lastFloatFromPreviousLine, const WordMeasurements& wordMeasurements, LineWidth & width, bool isFirstLine)
511 { 511 {
512 ASSERT(lastFloatFromPreviousLine); 512 ASSERT(lastFloatFromPreviousLine);
513 513
514 ShapeInsideInfo* shapeInsideInfo = block->layoutShapeInsideInfo(); 514 ShapeInsideInfo* shapeInsideInfo = block->layoutShapeInsideInfo();
515 if (!lastFloatFromPreviousLine->isPlaced() || !shapeInsideInfo) 515 if (!lastFloatFromPreviousLine->isPlaced() || !shapeInsideInfo)
516 return; 516 return;
517 517
518 bool isHorizontalWritingMode = block->isHorizontalWritingMode(); 518 bool isHorizontalWritingMode = block->isHorizontalWritingMode();
519 LayoutUnit logicalOffsetFromShapeContainer = block->logicalOffsetFromShapeAn cestorContainer(shapeInsideInfo->owner()).height(); 519 LayoutUnit logicalOffsetFromShapeContainer = block->logicalOffsetFromShapeAn cestorContainer(&shapeInsideInfo->owner()).height();
520 520
521 LayoutUnit lineLogicalTop = block->logicalHeight() + logicalOffsetFromShapeC ontainer; 521 LayoutUnit lineLogicalTop = block->logicalHeight() + logicalOffsetFromShapeC ontainer;
522 LayoutUnit lineLogicalHeight = block->lineHeight(isFirstLine, isHorizontalWr itingMode ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); 522 LayoutUnit lineLogicalHeight = block->lineHeight(isFirstLine, isHorizontalWr itingMode ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
523 LayoutUnit lineLogicalBottom = lineLogicalTop + lineLogicalHeight; 523 LayoutUnit lineLogicalBottom = lineLogicalTop + lineLogicalHeight;
524 524
525 LayoutUnit floatLogicalTop = block->logicalTopForFloat(lastFloatFromPrevious Line); 525 LayoutUnit floatLogicalTop = block->logicalTopForFloat(lastFloatFromPrevious Line);
526 LayoutUnit floatLogicalBottom = block->logicalBottomForFloat(lastFloatFromPr eviousLine); 526 LayoutUnit floatLogicalBottom = block->logicalBottomForFloat(lastFloatFromPr eviousLine);
527 527
528 bool lineOverlapsWithFloat = (floatLogicalTop < lineLogicalBottom) && (lineL ogicalTop < floatLogicalBottom); 528 bool lineOverlapsWithFloat = (floatLogicalTop < lineLogicalBottom) && (lineL ogicalTop < floatLogicalBottom);
529 if (!lineOverlapsWithFloat) 529 if (!lineOverlapsWithFloat)
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 return IndentText; 955 return IndentText;
956 if (isAfterHardLineBreak && style->textIndentLine() == TextIndentEachLine) 956 if (isAfterHardLineBreak && style->textIndentLine() == TextIndentEachLine)
957 return IndentText; 957 return IndentText;
958 958
959 return DoNotIndentText; 959 return DoNotIndentText;
960 } 960 }
961 961
962 } 962 }
963 963
964 #endif // BreakingContextInlineHeaders_h 964 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/line/LineWidth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698