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: third_party/WebKit/Source/core/layout/line/LineWidth.cpp

Issue 1741073002: Rename enums/functions that collide in chromium style in core/layout/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-6
Patch Set: get-names-7: rebase Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 LayoutUnit height = m_block.logicalHeight(); 64 LayoutUnit height = m_block.logicalHeight();
65 if (height < m_block.logicalTopForFloat(newFloat) || height >= m_block.logic alBottomForFloat(newFloat)) 65 if (height < m_block.logicalTopForFloat(newFloat) || height >= m_block.logic alBottomForFloat(newFloat))
66 return; 66 return;
67 67
68 ShapeOutsideDeltas shapeDeltas; 68 ShapeOutsideDeltas shapeDeltas;
69 if (ShapeOutsideInfo* shapeOutsideInfo = newFloat.layoutObject()->shapeOutsi deInfo()) { 69 if (ShapeOutsideInfo* shapeOutsideInfo = newFloat.layoutObject()->shapeOutsi deInfo()) {
70 LayoutUnit lineHeight = m_block.lineHeight(m_isFirstLine, m_block.isHori zontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes ); 70 LayoutUnit lineHeight = m_block.lineHeight(m_isFirstLine, m_block.isHori zontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes );
71 shapeDeltas = shapeOutsideInfo->computeDeltasForContainingBlockLine(m_bl ock, newFloat, m_block.logicalHeight(), lineHeight); 71 shapeDeltas = shapeOutsideInfo->computeDeltasForContainingBlockLine(m_bl ock, newFloat, m_block.logicalHeight(), lineHeight);
72 } 72 }
73 73
74 if (newFloat.type() == FloatingObject::FloatLeft) { 74 if (newFloat.getType() == FloatingObject::FloatLeft) {
75 float newLeft = m_block.logicalRightForFloat(newFloat).toFloat(); 75 float newLeft = m_block.logicalRightForFloat(newFloat).toFloat();
76 if (shapeDeltas.isValid()) { 76 if (shapeDeltas.isValid()) {
77 if (shapeDeltas.lineOverlapsShape()) 77 if (shapeDeltas.lineOverlapsShape())
78 newLeft += shapeDeltas.rightMarginBoxDelta(); 78 newLeft += shapeDeltas.rightMarginBoxDelta();
79 else // Per the CSS Shapes spec, If the line doesn't overlap the sha pe, then ignore this shape for this line. 79 else // Per the CSS Shapes spec, If the line doesn't overlap the sha pe, then ignore this shape for this line.
80 newLeft = m_left; 80 newLeft = m_left;
81 } 81 }
82 if (indentText() == IndentText && m_block.style()->isLeftToRightDirectio n()) 82 if (indentText() == IndentText && m_block.style()->isLeftToRightDirectio n())
83 newLeft += floorToInt(m_block.textIndentOffset()); 83 newLeft += floorToInt(m_block.textIndentOffset());
84 m_left = std::max<float>(m_left, newLeft); 84 m_left = std::max<float>(m_left, newLeft);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 updateLineDimension(lastFloatLogicalBottom, LayoutUnit(newLineWidth), newLin eLeft, newLineRight); 190 updateLineDimension(lastFloatLogicalBottom, LayoutUnit(newLineWidth), newLin eLeft, newLineRight);
191 } 191 }
192 192
193 void LineWidth::computeAvailableWidthFromLeftAndRight() 193 void LineWidth::computeAvailableWidthFromLeftAndRight()
194 { 194 {
195 m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth; 195 m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth;
196 } 196 }
197 197
198 } // namespace blink 198 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineBreaker.cpp ('k') | third_party/WebKit/Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698