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

Unified Diff: third_party/WebKit/Source/core/layout/line/LineWidth.cpp

Issue 2393693002: Reformat comments in core/layout/line (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/line/LineWidth.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/LineWidth.cpp b/third_party/WebKit/Source/core/layout/line/LineWidth.cpp
index 5db39892319da7814a5620015840d3b408031112..762ffe78d1766478ed3fa23ad2e1a8be9f20fee3 100644
--- a/third_party/WebKit/Source/core/layout/line/LineWidth.cpp
+++ b/third_party/WebKit/Source/core/layout/line/LineWidth.cpp
@@ -80,10 +80,13 @@ void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(
if (newFloat.getType() == FloatingObject::FloatLeft) {
LayoutUnit newLeft = m_block.logicalRightForFloat(newFloat);
if (shapeDeltas.isValid()) {
- if (shapeDeltas.lineOverlapsShape())
+ if (shapeDeltas.lineOverlapsShape()) {
newLeft += shapeDeltas.rightMarginBoxDelta();
- else // Per the CSS Shapes spec, If the line doesn't overlap the shape, then ignore this shape for this line.
+ } else {
+ // Per the CSS Shapes spec, If the line doesn't overlap the shape, then
+ // ignore this shape for this line.
newLeft = m_left;
+ }
}
if (indentText() == IndentText && m_block.style()->isLeftToRightDirection())
newLeft += floorToInt(m_block.textIndentOffset());
@@ -91,10 +94,13 @@ void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(
} else {
LayoutUnit newRight = m_block.logicalLeftForFloat(newFloat);
if (shapeDeltas.isValid()) {
- if (shapeDeltas.lineOverlapsShape())
+ if (shapeDeltas.lineOverlapsShape()) {
newRight += shapeDeltas.leftMarginBoxDelta();
- else // Per the CSS Shapes spec, If the line doesn't overlap the shape, then ignore this shape for this line.
+ } else {
+ // Per the CSS Shapes spec, If the line doesn't overlap the shape, then
+ // ignore this shape for this line.
newRight = m_right;
+ }
}
if (indentText() == IndentText &&
!m_block.style()->isLeftToRightDirection())
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineWidth.h ('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