DescriptionFiles.app: Fit the size of search box as its contents size.
This CL updated CSS and javascript to make the size of search box fit to its
contents size. In the JavaScript funciton 'updateSearchBoxStyles_', we measure
the widht of search box text by using TextMeasure class and set the search box
size depending on the width.
TextMeasure class has a dummy span element. When measuring text size, it sets
the text to the dummy span element and obtains its size by using
getBoundingClientRect method.
This CL also added #search-icon and #search-clear-button elements. Originally
these UI parts are implemented as the background image and
-webkit-search-cancel-button of the serach box respectively. This way had a
trouble about rtl mode thus we need the specific selectors for the rtl mode. On
the other hands, current implementation can handle rtl mode without other
selectors.
BUG=241300, 239292
TEST=manually. rtl mode and legacy UI are also checked.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202375
Patch Set 1 : #
Total comments: 16
Patch Set 2 : Rebased #Patch Set 3 : Addressed comments #
Total comments: 6
Patch Set 4 : Rebased. #Patch Set 5 : Addressed comments #
Messages
Total messages: 10 (0 generated)
|