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

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

Issue 1386343002: Revert of input[type=text]: Add a workaround to fix vertical position of Noto Sans CJK 1.004. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-font-height-mismatch-expected.txt ('k') | no next file » | 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) 2006, 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 adjustInnerEditorStyle(*textBlockStyle); 358 adjustInnerEditorStyle(*textBlockStyle);
359 359
360 textBlockStyle->setWhiteSpace(PRE); 360 textBlockStyle->setWhiteSpace(PRE);
361 textBlockStyle->setOverflowWrap(NormalOverflowWrap); 361 textBlockStyle->setOverflowWrap(NormalOverflowWrap);
362 textBlockStyle->setOverflowX(OHIDDEN); 362 textBlockStyle->setOverflowX(OHIDDEN);
363 textBlockStyle->setOverflowY(OHIDDEN); 363 textBlockStyle->setOverflowY(OHIDDEN);
364 textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllips is : TextOverflowClip); 364 textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllips is : TextOverflowClip);
365 365
366 if (m_desiredInnerEditorLogicalHeight >= 0) 366 if (m_desiredInnerEditorLogicalHeight >= 0)
367 textBlockStyle->setLogicalHeight(Length(m_desiredInnerEditorLogicalHeigh t, Fixed)); 367 textBlockStyle->setLogicalHeight(Length(m_desiredInnerEditorLogicalHeigh t, Fixed));
368
369 // Do not allow line-height to be smaller than our default. 368 // Do not allow line-height to be smaller than our default.
370 if (textBlockStyle->fontMetrics().lineSpacing() > lineHeight(true, Horizonta lLine, PositionOfInteriorLineBoxes) && startStyle.height().isIntrinsicOrAuto()) 369 if (textBlockStyle->fontMetrics().lineSpacing() > lineHeight(true, Horizonta lLine, PositionOfInteriorLineBoxes))
371 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); 370 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight());
372 371
373 textBlockStyle->setDisplay(BLOCK); 372 textBlockStyle->setDisplay(BLOCK);
374 textBlockStyle->setUnique(); 373 textBlockStyle->setUnique();
375 374
376 if (inputElement()->shouldRevealPassword()) 375 if (inputElement()->shouldRevealPassword())
377 textBlockStyle->setTextSecurity(TSNONE); 376 textBlockStyle->setTextSecurity(TSNONE);
378 377
379 return textBlockStyle.release(); 378 return textBlockStyle.release();
380 } 379 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (innerEditorElement()) 439 if (innerEditorElement())
441 innerEditorElement()->setScrollTop(newTop); 440 innerEditorElement()->setScrollTop(newTop);
442 } 441 }
443 442
444 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const 443 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const
445 { 444 {
446 return toHTMLInputElement(node()); 445 return toHTMLInputElement(node());
447 } 446 }
448 447
449 } 448 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-font-height-mismatch-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698