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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextControl.cpp

Issue 2569013006: Changed EOverflow to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 4 years 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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. 3 * (C) 2008 Torch Mobile Inc. All rights reserved.
4 * (http://www.torchmobile.com/) 4 * (http://www.torchmobile.com/)
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (LayoutBox* innerEditorBox = innerEditor->layoutBox()) { 120 if (LayoutBox* innerEditorBox = innerEditor->layoutBox()) {
121 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() + 121 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() +
122 innerEditorBox->marginHeight(); 122 innerEditorBox->marginHeight();
123 logicalHeight = computeControlLogicalHeight( 123 logicalHeight = computeControlLogicalHeight(
124 innerEditorBox->lineHeight(true, HorizontalLine, 124 innerEditorBox->lineHeight(true, HorizontalLine,
125 PositionOfInteriorLineBoxes), 125 PositionOfInteriorLineBoxes),
126 nonContentHeight); 126 nonContentHeight);
127 127
128 // We are able to have a horizontal scrollbar if the overflow style is 128 // We are able to have a horizontal scrollbar if the overflow style is
129 // scroll, or if its auto and there's no word wrap. 129 // scroll, or if its auto and there's no word wrap.
130 if (style()->overflowInlineDirection() == OverflowScroll || 130 if (style()->overflowInlineDirection() == EOverflow::Scroll ||
131 (style()->overflowInlineDirection() == OverflowAuto && 131 (style()->overflowInlineDirection() == EOverflow::Auto &&
132 innerEditor->layoutObject()->style()->overflowWrap() == 132 innerEditor->layoutObject()->style()->overflowWrap() ==
133 NormalOverflowWrap)) 133 NormalOverflowWrap))
134 logicalHeight += scrollbarThickness(); 134 logicalHeight += scrollbarThickness();
135 135
136 // FIXME: The logical height of the inner text box should have been added 136 // FIXME: The logical height of the inner text box should have been added
137 // before calling computeLogicalHeight to avoid this hack. 137 // before calling computeLogicalHeight to avoid this hack.
138 setIntrinsicContentLogicalHeight(logicalHeight); 138 setIntrinsicContentLogicalHeight(logicalHeight);
139 139
140 logicalHeight += borderAndPaddingHeight(); 140 logicalHeight += borderAndPaddingHeight();
141 } 141 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline)); 353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline));
354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this; 354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this;
355 box = box->parent()) { 355 box = box->parent()) {
356 if (box->isBox()) 356 if (box->isBox())
357 baseline += toLayoutBox(box)->logicalTop(); 357 baseline += toLayoutBox(box)->logicalTop();
358 } 358 }
359 return baseline.toInt(); 359 return baseline.toInt();
360 } 360 }
361 361
362 } // namespace blink 362 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698