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

Issue 2776073002: Workaround for Samsung email issues (Closed)

Created:
3 years, 9 months ago by Changwan Ryu
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Workaround for Samsung email issues Samsung's email works around Range.getClientRects()'s behavior to return an empty sequence for a collapsed range, and the workaround is to insert a non-zero space, and call Range.getClientRects(), and then remove the non-zero space. With the changes introduced in https://codereview.chromium.org/2687273002, now inserting a non-zero space triggers a selectionchanged event and it causes an infinite loop, leading to issues with scroll, caret blink, and paste. Because it is difficult for Samsung to update their email any time soon, we undo the above changes only for WebView by adding a runtime flag and set it. The rationale for generalizing this to WebView is: 1) Package name checks generally don't work very well - there may be variants for different devices or beta channels. 2) JS library developers should still be concerned about out-of-date WebView libraries anyways. This should be fixed for version N and above, so we limit the workaround to Android M and below. BUG=698752, 699943 Review-Url: https://codereview.chromium.org/2776073002 Cr-Commit-Position: refs/heads/master@{#462173} Committed: https://chromium.googlesource.com/chromium/src/+/e54ccdb9fbd84362cba3c5858deaad215e572f5c

Patch Set 1 #

Patch Set 2 : remove unnecessary logging #

Patch Set 3 : fix layout tests #

Patch Set 4 : s/empty/collapsed #

Patch Set 5 : switched to disabling tkent@'s CL #

Total comments: 5

Patch Set 6 : remove package name check #

Patch Set 7 : fixed build #

Total comments: 2

Patch Set 8 : add comment in Settings, reformatted AwSettings #

Patch Set 9 : add a test #

Total comments: 2

Patch Set 10 : add a comment to web_preferences.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -19 lines) Patch
M android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java View 1 2 3 4 5 1 chunk +8 lines, -4 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwSettings.java View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -5 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java View 1 2 3 4 5 6 7 8 3 chunks +101 lines, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/GeolocationTest.java View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/native/aw_settings.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java View 1 2 3 4 5 6 7 1 chunk +5 lines, -4 lines 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/web_preferences.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/common/web_preferences.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.cpp View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Settings.json5 View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebSettings.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 82 (52 generated)
yosin_UTC9
%s/empty range/collapsed range/g Could you check return value of Range#getClientRects() for collapsed Range of Firefox ...
3 years, 9 months ago (2017-03-27 04:51:25 UTC) #8
Changwan Ryu
PTAL
3 years, 8 months ago (2017-03-29 20:29:40 UTC) #16
yosin_UTC9
Code change it self is good shape. My question is about behavior change of public ...
3 years, 8 months ago (2017-03-30 01:51:50 UTC) #22
tkent
How Firefox and Edge work in this case?
3 years, 8 months ago (2017-03-30 02:01:36 UTC) #23
Changwan Ryu
On 2017/03/30 02:01:36, tkent wrote: > How Firefox and Edge work in this case? Firefox ...
3 years, 8 months ago (2017-03-30 02:11:27 UTC) #24
tkent
On 2017/03/30 at 02:11:27, changwan wrote: > On 2017/03/30 02:01:36, tkent wrote: > > How ...
3 years, 8 months ago (2017-03-30 02:37:39 UTC) #25
foolip
I wanted to test this a bit and wrote https://jsbin.com/seximeb/edit?html,output The test doesn't work in ...
3 years, 8 months ago (2017-03-30 05:28:03 UTC) #26
foolip
I've sent https://codereview.chromium.org/2782423002 but you can go ahead and just add a test at the ...
3 years, 8 months ago (2017-03-30 05:39:48 UTC) #27
Changwan Ryu
On 2017/03/30 02:37:39, tkent wrote: > On 2017/03/30 at 02:11:27, changwan wrote: > > On ...
3 years, 8 months ago (2017-03-30 15:19:53 UTC) #28
tkent
On 2017/03/30 at 15:19:53, changwan wrote: > Please note that I’m not trying to fix ...
3 years, 8 months ago (2017-03-31 00:16:22 UTC) #29
Changwan Ryu
On 2017/03/31 00:16:22, tkent wrote: > On 2017/03/30 at 15:19:53, changwan wrote: > > Please ...
3 years, 8 months ago (2017-03-31 00:46:04 UTC) #30
Changwan Ryu
tkent@ / sgurun@, could you take a look? Also adding aelias@ as he suggested https://bugs.chromium.org/p/chromium/issues/detail?id=698752#c18
3 years, 8 months ago (2017-03-31 23:06:15 UTC) #36
aelias_OOO_until_Jul13
https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java (right): https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java#newcode180 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java:180: && mAppTargetSdkVersion <= Build.VERSION_CODES.M; Why M and below? I ...
3 years, 8 months ago (2017-03-31 23:25:41 UTC) #37
Changwan Ryu
https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java (right): https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java#newcode180 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java:180: && mAppTargetSdkVersion <= Build.VERSION_CODES.M; On 2017/03/31 23:25:41, aelias wrote: ...
3 years, 8 months ago (2017-03-31 23:28:10 UTC) #38
aelias_OOO_until_Jul13
https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java (right): https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java#newcode177 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java:177: final String samsungEmailPackageId = "com.samsung.android.email.provider"; I don't think an ...
3 years, 8 months ago (2017-03-31 23:40:21 UTC) #39
Changwan Ryu
https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java (right): https://codereview.chromium.org/2776073002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java#newcode177 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java:177: final String samsungEmailPackageId = "com.samsung.android.email.provider"; On 2017/03/31 23:40:21, aelias ...
3 years, 8 months ago (2017-04-01 00:07:56 UTC) #45
tkent
third_party/WebKit lgtm. https://codereview.chromium.org/2776073002/diff/120001/third_party/WebKit/Source/core/frame/Settings.json5 File third_party/WebKit/Source/core/frame/Settings.json5 (right): https://codereview.chromium.org/2776073002/diff/120001/third_party/WebKit/Source/core/frame/Settings.json5#newcode929 third_party/WebKit/Source/core/frame/Settings.json5:929: // Whether we should not update selection ...
3 years, 8 months ago (2017-04-03 02:01:16 UTC) #52
Changwan Ryu
https://codereview.chromium.org/2776073002/diff/120001/third_party/WebKit/Source/core/frame/Settings.json5 File third_party/WebKit/Source/core/frame/Settings.json5 (right): https://codereview.chromium.org/2776073002/diff/120001/third_party/WebKit/Source/core/frame/Settings.json5#newcode929 third_party/WebKit/Source/core/frame/Settings.json5:929: // Whether we should not update selection attributes when ...
3 years, 8 months ago (2017-04-03 15:31:49 UTC) #55
aelias_OOO_until_Jul13
lgtm, adding avi@ for trivial settings change in content/common/public/
3 years, 8 months ago (2017-04-03 17:48:32 UTC) #60
sgurun-gerrit only
it is not super clear in the thread: Is it fixed on N because Samsung ...
3 years, 8 months ago (2017-04-04 15:07:22 UTC) #61
sgurun-gerrit only
it is not super clear in the thread: Is it fixed on N because Samsung ...
3 years, 8 months ago (2017-04-04 15:07:25 UTC) #62
Changwan Ryu
On 2017/04/04 15:07:25, sgurun wrote: > it is not super clear in the thread: Is ...
3 years, 8 months ago (2017-04-04 18:45:57 UTC) #65
sgurun-gerrit only
lgtm
3 years, 8 months ago (2017-04-04 20:32:35 UTC) #69
Changwan Ryu
avi@chromium.org: could you take a look at content/public?
3 years, 8 months ago (2017-04-05 14:18:16 UTC) #71
Changwan Ryu
dcheng@, could you take a look at content/public/common/common_param_traits_macros.h ?
3 years, 8 months ago (2017-04-05 14:20:04 UTC) #73
Avi (use Gerrit)
lgtm with issue addressed. https://codereview.chromium.org/2776073002/diff/160001/content/public/common/web_preferences.h File content/public/common/web_preferences.h (right): https://codereview.chromium.org/2776073002/diff/160001/content/public/common/web_preferences.h#newcode290 content/public/common/web_preferences.h:290: bool do_not_update_selection_on_mutating_selection_range; Needs a comment ...
3 years, 8 months ago (2017-04-05 14:30:01 UTC) #74
dcheng
ipc lgtm i'm sad to see we're adding another webview specific setting though--do we have ...
3 years, 8 months ago (2017-04-05 17:07:31 UTC) #75
Changwan Ryu
dcheng@: this type of webview-specific workarounds are clustered in WebViewChromium.java, and should be removed altogether ...
3 years, 8 months ago (2017-04-05 17:29:37 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2776073002/180001
3 years, 8 months ago (2017-04-05 17:31:35 UTC) #79
commit-bot: I haz the power
3 years, 8 months ago (2017-04-05 19:22:01 UTC) #82
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/e54ccdb9fbd84362cba3c5858dea...

Powered by Google App Engine
This is Rietveld 408576698