Commit 985429d1 authored by dubroy@chromium.org's avatar dubroy@chromium.org

History: Workaround bug with clear button in search field.

Due to a Blink bug (http://crbug.com/231830), the clear button in the
search field is not properly rendered if the <header> element has
its transform style property set to anything other than 'none'.

A simple workaround to make it render properly in 99% of cases is to
set the value of -webkit-transform to 'none' instead of 0px.

BUG=231291
TEST=Open chrome://history, type something in the search field, and
ensure that the clear button (a circle with a "X") is visible.

Review URL: https://codereview.chromium.org/14053006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194586 0039d316-1c4b-4281-b951-d872f2087c98
parent 6ab02ad6
...@@ -36,8 +36,12 @@ cr.define('uber', function() { ...@@ -36,8 +36,12 @@ cr.define('uber', function() {
*/ */
function handleScroll() { function handleScroll() {
var offset = document.body.scrollLeft * -1; var offset = document.body.scrollLeft * -1;
for (var i = 0; i < headerElements.length; i++) for (var i = 0; i < headerElements.length; i++) {
headerElements[i].style.webkitTransform = 'translateX(' + offset + 'px)'; // As a workaround for http://crbug.com/231830, set the transform to
// 'none' rather than 0px.
headerElements[i].style.webkitTransform = offset ?
'translateX(' + offset + 'px)' : 'none';
}
invokeMethodOnParent('adjustToScroll', document.body.scrollLeft); invokeMethodOnParent('adjustToScroll', document.body.scrollLeft);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment