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

Issue 1682873002: Set CRWWebViewContentView's size before resetting scroll proxy. (Closed)

Created:
4 years, 10 months ago by kkhorimoto
Modified:
4 years, 10 months ago
Reviewers:
shreyasv1, stuartmorgan
CC:
chromium-reviews, shreyasv1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set CRWWebViewContentView's size before resetting scroll proxy. Because CRWWebViewContentView's frame was CGRectZero when the scroll proxy's backing UIScrollView was reset, CRWWebViewScrollViewProxyObservers were mistakenly resetting the web view's frame to an invalid frame (negative values for size dimensions). This was causing various rendering issues, including an incorrect scroll offset for links opened in new tabs and broken tap handling for "Read More" links on cnn.com. BUG=577793, 574996 Committed: https://crrev.com/c47dcc4e47d42932d126d80d5aa740cf8470280a Cr-Commit-Position: refs/heads/master@{#374581}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added DCHECK, reset frame web view frame immediately from CRWWebViewContentView #

Total comments: 6

Patch Set 3 : nits #

Patch Set 4 : Fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -24 lines) Patch
M ios/web/web_state/ui/crw_web_controller_container_view.mm View 2 chunks +2 lines, -13 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller_unittest.mm View 1 2 3 3 chunks +10 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_view_content_view.mm View 1 2 2 chunks +14 lines, -11 lines 0 comments Download
M ios/web/web_state/ui/crw_wk_web_view_web_controller.mm View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (8 generated)
kkhorimoto
+ Stuart for OWNER cc Shreyas for "click more" bug
4 years, 10 months ago (2016-02-09 19:04:56 UTC) #2
stuartmorgan
Good find! LGTM with one suggestion. https://codereview.chromium.org/1682873002/diff/1/ios/web/web_state/ui/crw_web_view_content_view.mm File ios/web/web_state/ui/crw_web_view_content_view.mm (left): https://codereview.chromium.org/1682873002/diff/1/ios/web/web_state/ui/crw_web_view_content_view.mm#oldcode92 ios/web/web_state/ui/crw_web_view_content_view.mm:92: self.frame = kDummyRect; ...
4 years, 10 months ago (2016-02-09 21:27:50 UTC) #3
shreyasv1
https://codereview.chromium.org/1682873002/diff/1/ios/web/web_state/ui/crw_web_view_content_view.mm File ios/web/web_state/ui/crw_web_view_content_view.mm (left): https://codereview.chromium.org/1682873002/diff/1/ios/web/web_state/ui/crw_web_view_content_view.mm#oldcode92 ios/web/web_state/ui/crw_web_view_content_view.mm:92: self.frame = kDummyRect; On 2016/02/09 21:27:50, stuartmorgan wrote: > ...
4 years, 10 months ago (2016-02-09 21:58:29 UTC) #5
stuartmorgan
https://codereview.chromium.org/1682873002/diff/1/ios/web/web_state/ui/crw_web_view_content_view.mm File ios/web/web_state/ui/crw_web_view_content_view.mm (left): https://codereview.chromium.org/1682873002/diff/1/ios/web/web_state/ui/crw_web_view_content_view.mm#oldcode92 ios/web/web_state/ui/crw_web_view_content_view.mm:92: self.frame = kDummyRect; On 2016/02/09 21:58:29, shreyasv1 wrote: > ...
4 years, 10 months ago (2016-02-09 22:15:19 UTC) #6
kkhorimoto
Turns out that this fixed the scrolling on iPads, but broke it again on iPhones. ...
4 years, 10 months ago (2016-02-09 22:17:11 UTC) #7
kkhorimoto
Turns out the DCHECK was helpful; the web view was not getting properly resized on ...
4 years, 10 months ago (2016-02-09 22:54:39 UTC) #8
shreyasv1
lgtm https://codereview.chromium.org/1682873002/diff/20001/ios/web/web_state/ui/crw_web_view_content_view.mm File ios/web/web_state/ui/crw_web_view_content_view.mm (right): https://codereview.chromium.org/1682873002/diff/20001/ios/web/web_state/ui/crw_web_view_content_view.mm#newcode92 ios/web/web_state/ui/crw_web_view_content_view.mm:92: if (!CGSizeEqualToSize(oldSize, self.frame.size)) NIT: How about early returning ...
4 years, 10 months ago (2016-02-09 22:58:18 UTC) #9
stuartmorgan
lgtm https://codereview.chromium.org/1682873002/diff/20001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm File ios/web/web_state/ui/crw_wk_web_view_web_controller.mm (right): https://codereview.chromium.org/1682873002/diff/20001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm#newcode592 ios/web/web_state/ui/crw_wk_web_view_web_controller.mm:592: DCHECK(CGRectGetHeight(self.webView.frame) > 0.0); CGRectIsNull? Also, a brief comment ...
4 years, 10 months ago (2016-02-09 23:00:51 UTC) #10
kkhorimoto
https://codereview.chromium.org/1682873002/diff/20001/ios/web/web_state/ui/crw_web_view_content_view.mm File ios/web/web_state/ui/crw_web_view_content_view.mm (right): https://codereview.chromium.org/1682873002/diff/20001/ios/web/web_state/ui/crw_web_view_content_view.mm#newcode92 ios/web/web_state/ui/crw_web_view_content_view.mm:92: if (!CGSizeEqualToSize(oldSize, self.frame.size)) On 2016/02/09 22:58:18, shreyasv1 wrote: > ...
4 years, 10 months ago (2016-02-10 00:08:36 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1682873002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1682873002/40001
4 years, 10 months ago (2016-02-10 00:09:04 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/128786)
4 years, 10 months ago (2016-02-10 00:43:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1682873002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1682873002/60001
4 years, 10 months ago (2016-02-10 02:15:34 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-10 02:36:34 UTC) #20
commit-bot: I haz the power
4 years, 10 months ago (2016-02-10 02:38:39 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c47dcc4e47d42932d126d80d5aa740cf8470280a
Cr-Commit-Position: refs/heads/master@{#374581}

Powered by Google App Engine
This is Rietveld 408576698