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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp b/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
index b6ce8e2460743a1b824206b091d30e72d05b81ad..775a5a3739ec3aebe985ea296eb264ff35610f7b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -359,8 +359,6 @@ PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle(co
textBlockStyle->setWhiteSpace(PRE);
textBlockStyle->setOverflowWrap(NormalOverflowWrap);
- textBlockStyle->setOverflowX(OHIDDEN);
- textBlockStyle->setOverflowY(OHIDDEN);
textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllipsis : TextOverflowClip);
if (m_desiredInnerEditorLogicalHeight >= 0)
@@ -375,6 +373,14 @@ PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle(co
if (inputElement()->shouldRevealPassword())
textBlockStyle->setTextSecurity(TSNONE);
+ textBlockStyle->setOverflowX(OSCROLL);
+ textBlockStyle->setOverflowY(OSCROLL);
+ RefPtr<ComputedStyle> noScrollbarStyle = ComputedStyle::create();
+ noScrollbarStyle->setStyleType(SCROLLBAR);
+ noScrollbarStyle->setDisplay(NONE);
+ textBlockStyle->addCachedPseudoStyle(noScrollbarStyle);
+ textBlockStyle->setHasPseudoStyle(SCROLLBAR);
+
return textBlockStyle.release();
}

Powered by Google App Engine
This is Rietveld 408576698