|
|
Created:
3 years, 8 months ago by Changwan Ryu Modified:
3 years, 8 months ago Reviewers:
Ted C CC:
chromium-reviews, jdonnelly+watch_chromium.org, agrieve+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionPolish up UrlBar's accessibility code
- Remove mDisableTextAccessibilityEvents and replace it by
mIgnoreTextChangeFromAutocomplete which is renamed from
mIgnoreAutocomplete
- Change the scope of setIgnoreTextChangesForAutocomplete() to be
exactly the code that should be affected.
- Remove unused methods and fields
BUG=539536
Review-Url: https://codereview.chromium.org/2802803002
Cr-Commit-Position: refs/heads/master@{#462919}
Committed: https://chromium.googlesource.com/chromium/src/+/f1310f9a92489ad7c6481f1b82af8017dd6b6b2c
Patch Set 1 #
Total comments: 4
Patch Set 2 : add back null check, fix setIgnoreTextChangesForAutocomplete() scope #Messages
Total messages: 24 (18 generated)
The CQ bit was checked by changwan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by changwan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Remove dead code and unnecessary code in UrlBar - Remove unused methods and fields - Remove unnecessary null check - Remove mDisableTextAccessibilityEvents and replace it by mIgnoreTextChangeFromAutocomplete which is renamed from mIgnoreAutocomplete BUG= ========== to ========== Remove dead code and unnecessary code in UrlBar - Remove unused methods and fields - Remove unnecessary null check - Remove mDisableTextAccessibilityEvents and replace it by mIgnoreTextChangeFromAutocomplete which is renamed from mIgnoreAutocomplete BUG=539536 ==========
changwan@chromium.org changed reviewers: + tedchoc@chromium.org
PTAL
https://codereview.chromium.org/2802803002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java (left): https://codereview.chromium.org/2802803002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java:814: mDisableTextAccessibilityEvents = true; this has a different timeline than mIgnoreTextChangeFromAutocomplete, did you go back into downstream code to see the bug that caused this to be introduced to make sure this isn't regressing/changing behavior? https://codereview.chromium.org/2802803002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java:930: if (mAutocompleteSpan != null are you sure setText isn't ever called in the constructor of TextView? mAutocompleteSpan is only constructed after that and I have some recollection that could be called in some circumstances.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by changwan@chromium.org to run a CQ dry run
Description was changed from ========== Remove dead code and unnecessary code in UrlBar - Remove unused methods and fields - Remove unnecessary null check - Remove mDisableTextAccessibilityEvents and replace it by mIgnoreTextChangeFromAutocomplete which is renamed from mIgnoreAutocomplete BUG=539536 ========== to ========== Polish up UrlBar's accessibility code - Remove mDisableTextAccessibilityEvents and replace it by mIgnoreTextChangeFromAutocomplete which is renamed from mIgnoreAutocomplete - Change the scope of setIgnoreTextChangesForAutocomplete() to be exactly the code that should be affected. - Remove unused methods and fields BUG=539536 ==========
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL https://codereview.chromium.org/2802803002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java (left): https://codereview.chromium.org/2802803002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java:814: mDisableTextAccessibilityEvents = true; On 2017/04/05 23:59:02, Ted C wrote: > this has a different timeline than mIgnoreTextChangeFromAutocomplete, did you go > back into downstream code to see the bug that caused this to be introduced to > make sure this isn't regressing/changing behavior? This is introduced to fix https://crbug.com/416595. setIgnoreTextChangesForAutocomplete() is used in three places: 1) setAutocompleteText(): has the same timeline as mDisableTextAccessibilityEvents. 2) setUseDarkTextColors(): we definitely want to have the same timeline as mDisableTextAccessibilityEvents. 3) onTextContextMenuItem(): I made sure to apply the ignoring logic only to where we remove spans and add them back. I also tested on TalkBack around copy/cut scenarios and they both worked exactly same as stable Chrome. https://codereview.chromium.org/2802803002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java:930: if (mAutocompleteSpan != null On 2017/04/05 23:59:02, Ted C wrote: > are you sure setText isn't ever called in the constructor of TextView? > mAutocompleteSpan is only constructed after that and I have some recollection > that could be called in some circumstances. Wow, such good memory! You're right. Added back the null check.
lgtm!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by changwan@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1491587441829100, "parent_rev": "d50c8a52e838178b0ceedca4e35ed67c3ffa8e57", "commit_rev": "f1310f9a92489ad7c6481f1b82af8017dd6b6b2c"}
Message was sent while issue was closed.
Description was changed from ========== Polish up UrlBar's accessibility code - Remove mDisableTextAccessibilityEvents and replace it by mIgnoreTextChangeFromAutocomplete which is renamed from mIgnoreAutocomplete - Change the scope of setIgnoreTextChangesForAutocomplete() to be exactly the code that should be affected. - Remove unused methods and fields BUG=539536 ========== to ========== Polish up UrlBar's accessibility code - Remove mDisableTextAccessibilityEvents and replace it by mIgnoreTextChangeFromAutocomplete which is renamed from mIgnoreAutocomplete - Change the scope of setIgnoreTextChangesForAutocomplete() to be exactly the code that should be affected. - Remove unused methods and fields BUG=539536 Review-Url: https://codereview.chromium.org/2802803002 Cr-Commit-Position: refs/heads/master@{#462919} Committed: https://chromium.googlesource.com/chromium/src/+/f1310f9a92489ad7c6481f1b82af... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/f1310f9a92489ad7c6481f1b82af... |