horizontal scrollbar appears on input textfield when browser default stylesheet contain ::-webkit-scrollbar
Reported by
santosh....@canonical.com,
Nov 23 2016
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 Example URL: www.google.com Steps to reproduce the problem: 1. Add following style in third_party/WebKit/Source/core/css/themeChromiumLinux.css ::-webkit-scrollbar { width: 15px; height: 15px; border-color: transparent; background-color : red } 2. Build chromium/chrome 3. Launch chromium and load www.google.com 4 keep typing characters in input field 5 once text overflows input field, horizontal scrollbar appears. What is the expected behavior? input field should not show scrollbar What went wrong? Rendering of pseudo element ::-webkit-scrollbar specified in browser default stylesheet is wrong with input text field. In attachment red color shows is scrollbar(styled red) Does it occur on multiple sites: N/A Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? N/A Chrome version: 52.0.2743.82 Channel: stable OS Version: Flash Version: Shockwave Flash 23.0 r0 Its not specific to google but applies to input text field.
,
Nov 24 2016
Targetting this for M-57.
,
Nov 28 2016
Could you please provide the sample html file to reproduce the issue , and also please upgradee the chrome browser to the latest stable and check if you are still able to reproduce the issue . Thanks!
,
Nov 28 2016
Re #3: This is a developer building chromium themselves, so no sample/upgrade possible. I tested something similar at http://jsbin.com/xaqizi/edit and don't see the issue, so this is probably specific to modifying the user-agent stylesheet (perhaps it pierces shadowDom). Note that <input> is a ScrollableArea so it makes sense that it could be coaxed into displaying scrollbars due to custom theming. This is probably pretty low priority for scrollbar folks since this doesn't pertain to code actually landed in the trunk of chromium. But maybe someone will have a tip for what else you'd need to modify to do what you want, or how there might actually be a bug lurking here that does impact official chromium somehow.
,
Nov 28 2016
rbyers@'s probably right, I think the UA style sheet pierces through shadow DOM so your custom scrollbar style is being applied to the input box. That said, I don't see any -webkit-scrollbar selectors applied to input boxes so I'm not sure how the scrollbars are prevented in the first place. You could try adding a scrollbar selector to html.css (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/html.css?q=webkit-appearance+file:third_party/WebKit/.*.css&sq=package:chromium&dr=C&l=417) for input fields that |display: none|'s the scrollbars and see if that works. Alternatively, if you want to figure out where they're coming from, breaking/logging from PaintLayerScrollableArea::computeScrollarExistence if the layoutBox()->element() is the <input> to determine why they get created with your CSS selector vs without would be where to look.
,
Nov 29 2016
I did some initial inverstigation and feels might help you guys in fixing that. So computeScrollarExistence tells it should have horizontal scrollbar and it does so because https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.h?rcl=0&l=107 return true. It feels that above check is not complete for overflow and https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutBox.h?rcl=1480378899&l=1027 looks better check. if I implement LayoutTextControlSingleLine is same way as https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutBox.h?rcl=1480378899&l=1027 , Bug is not happening. But I am not sure of other side effect but using a complete check from LayoutBox fixes the issue
,
Nov 29 2016
and yes this bug happens only in case when default browser stylesheet is changed(html.css ot themeChxxx.css).
,
Nov 29 2016
Hmm, I'm not sure what's happening in that case, the textBlock always has `overflow: scroll` set on its style so it shouldn't make a difference. These methods were different on purpose because scrollsOverflowX|Y used to depend on having a scrollbar. I think this code has changed since those days so we're probably fine to remove the override in LayoutTextControlSingleLine (at least for the X direction). I did find https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp?rcl=1480407415&l=339 which is how scrollbars are usually hidden here. This is applying a `::-webkit-scrollbar { display: none; }` style to the textBlock so that scrollbars are invisible, I believe the style you added to the UA style sheet overrides this. There is probably a way to modify your UA style selector to not match elements in a shadow tree but I don't know enough about CSS and ShadowDOM to know off-hand how to do this. If you don't know about shadow DOM, this link is probably useful: https://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/ but I haven't read it in detail myself so I don't know if the answer is in there.
,
Dec 2 2016
,
Dec 11 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 13 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by santosh....@canonical.com
, Nov 23 2016