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

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

Issue 2677843002: Change ComputedStyle::setUnique to take bool parameter. (Closed)
Patch Set: Created 3 years, 10 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) 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. 3 * (C) 2008 Torch Mobile Inc. All rights reserved.
4 * (http://www.torchmobile.com/) 4 * (http://www.torchmobile.com/)
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // includes border and padding if box-sizing:border-box, and there are cases 320 // includes border and padding if box-sizing:border-box, and there are cases
321 // in which we don't want to remove line-height with percent or calculated 321 // in which we don't want to remove line-height with percent or calculated
322 // length. 322 // length.
323 // TODO(tkent): This should be done during layout. 323 // TODO(tkent): This should be done during layout.
324 if (logicalHeight.isPercentOrCalc() || 324 if (logicalHeight.isPercentOrCalc() ||
325 (logicalHeight.isFixed() && 325 (logicalHeight.isFixed() &&
326 logicalHeight.getFloatValue() > computedLineHeight)) 326 logicalHeight.getFloatValue() > computedLineHeight))
327 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); 327 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight());
328 328
329 textBlockStyle->setDisplay(EDisplay::Block); 329 textBlockStyle->setDisplay(EDisplay::Block);
330 textBlockStyle->setUnique(); 330 textBlockStyle->setUnique(true);
331 331
332 if (inputElement()->shouldRevealPassword()) 332 if (inputElement()->shouldRevealPassword())
333 textBlockStyle->setTextSecurity(TSNONE); 333 textBlockStyle->setTextSecurity(TSNONE);
334 334
335 textBlockStyle->setOverflowX(EOverflow::kScroll); 335 textBlockStyle->setOverflowX(EOverflow::kScroll);
336 // overflow-y:visible doesn't work because overflow-x:scroll makes a layer. 336 // overflow-y:visible doesn't work because overflow-x:scroll makes a layer.
337 textBlockStyle->setOverflowY(EOverflow::kScroll); 337 textBlockStyle->setOverflowY(EOverflow::kScroll);
338 RefPtr<ComputedStyle> noScrollbarStyle = ComputedStyle::create(); 338 RefPtr<ComputedStyle> noScrollbarStyle = ComputedStyle::create();
339 noScrollbarStyle->setStyleType(PseudoIdScrollbar); 339 noScrollbarStyle->setStyleType(PseudoIdScrollbar);
340 noScrollbarStyle->setDisplay(EDisplay::None); 340 noScrollbarStyle->setDisplay(EDisplay::None);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // If the INPUT content height is smaller than the font height, the 405 // If the INPUT content height is smaller than the font height, the
406 // inner-editor element overflows the INPUT box intentionally, however it 406 // inner-editor element overflows the INPUT box intentionally, however it
407 // shouldn't affect outside of the INPUT box. So we ignore child overflow. 407 // shouldn't affect outside of the INPUT box. So we ignore child overflow.
408 } 408 }
409 409
410 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const { 410 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const {
411 return toHTMLInputElement(node()); 411 return toHTMLInputElement(node());
412 } 412 }
413 413
414 } // namespace blink 414 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698