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

Issue 27323002: make input type="search" RTL direction aware (Closed)

Created:
7 years, 2 months ago by pals
Modified:
7 years, 1 month ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

make input type="search" RTL direction aware. Swap the positions of cancel button and search icon if dir="rtl". BUG=232333 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160706

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Fixed the Test #

Total comments: 1

Patch Set 3 : Rebased #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -27 lines) Patch
M LayoutTests/TestExpectations View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/resources/common.js View 1 1 chunk +7 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/search-rtl.html View 1 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/linux/fast/forms/search-rtl-expected.png View 1 2 Binary file 0 comments Download
M LayoutTests/platform/linux/fast/forms/search-rtl-expected.txt View 1 2 3 chunks +12 lines, -12 lines 0 comments Download
M LayoutTests/platform/win/fast/forms/search-rtl-expected.txt View 1 3 chunks +12 lines, -12 lines 0 comments Download
M Source/core/html/forms/SearchInputType.cpp View 1 2 1 chunk +8 lines, -2 lines 1 comment Download

Messages

Total messages: 12 (0 generated)
pals
Please review.
7 years, 2 months ago (2013-10-22 09:13:33 UTC) #1
ojan
Levi, mind reviewing this? You know more about RTL than I.
7 years, 2 months ago (2013-10-24 22:10:46 UTC) #2
leviw_travelin_and_unemployed
The code change is fine with one nit. You need to update the test, though, ...
7 years, 2 months ago (2013-10-24 23:21:48 UTC) #3
pals
Fixed the test. PTAL. https://codereview.chromium.org/27323002/diff/103001/Source/core/html/forms/SearchInputType.cpp File Source/core/html/forms/SearchInputType.cpp (right): https://codereview.chromium.org/27323002/diff/103001/Source/core/html/forms/SearchInputType.cpp#newcode99 Source/core/html/forms/SearchInputType.cpp:99: if (equalIgnoringCase(dirAttributeValue, "rtl")) { On ...
7 years, 2 months ago (2013-10-25 06:10:15 UTC) #4
leviw_travelin_and_unemployed
Perfect, thanks! https://codereview.chromium.org/27323002/diff/203001/LayoutTests/fast/forms/resources/common.js File LayoutTests/fast/forms/resources/common.js (right): https://codereview.chromium.org/27323002/diff/203001/LayoutTests/fast/forms/resources/common.js#newcode107 LayoutTests/fast/forms/resources/common.js:107: pos.x = element.offsetLeft + 9; Oh magic ...
7 years, 1 month ago (2013-10-25 18:22:47 UTC) #5
leviw_travelin_and_unemployed
lgtm
7 years, 1 month ago (2013-10-25 18:22:57 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sanjoy.pal@samsung.com/27323002/203001
7 years, 1 month ago (2013-10-25 18:23:05 UTC) #7
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 1 month ago (2013-10-25 18:23:07 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sanjoy.pal@samsung.com/27323002/303001
7 years, 1 month ago (2013-10-28 08:03:24 UTC) #9
commit-bot: I haz the power
Change committed as 160706
7 years, 1 month ago (2013-10-28 09:02:02 UTC) #10
tkent
This CL ignores the discussion in the bug, and the implementation is incorrect. I'll revert ...
7 years, 1 month ago (2013-10-28 09:32:31 UTC) #11
tkent
7 years, 1 month ago (2013-10-28 10:17:08 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/27323002/diff/303001/Source/core/html/forms/S...
File Source/core/html/forms/SearchInputType.cpp (right):

https://codereview.chromium.org/27323002/diff/303001/Source/core/html/forms/S...
Source/core/html/forms/SearchInputType.cpp:98: AtomicString dirAttributeValue =
element().fastGetAttribute(dirAttr);
This works only for <input type=search dir=rtl>, and doesn't work for <span
dir=rtl><input type=search></span>.

You should have removed the following ruleset in Source/css/html.css, and didn't
need to update any C++ code.

> input[type="search"]::-webkit-textfield-decoration-container {
>     direction: ltr;
> }

Anyway, such change doesn't work well on OSX.  We need a decision.

Powered by Google App Engine
This is Rietveld 408576698