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

Issue 247933002: Call SendScreenRects() when the content has been resized. (Closed)

Created:
6 years, 8 months ago by mlamouri (slow - plz ping)
Modified:
6 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, spartha
Base URL:
https://chromium.googlesource.com/chromium/src.git@rotation_screeninfo
Visibility:
Public.

Description

Call SendScreenRects() when the content has been resized. RenderWidgetHostView::WasResized() will only update the RenderWidget's size and propagate the update to its WebWidget. However, window.outer* will use window_screen_rect_, updated when receiving an UpdateScreenRects message. We need to make sure that value is updated before notifying about a resize. BUG=359975 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266631

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M content/browser/android/content_view_core_impl.cc View 1 chunk +5 lines, -1 line 1 comment Download

Messages

Total messages: 19 (0 generated)
mlamouri (slow - plz ping)
6 years, 8 months ago (2014-04-22 19:12:25 UTC) #1
jdduke (slow)
aelias@ or dtrainor@ are better reviewers for this kind of change. https://codereview.chromium.org/247933002/diff/1/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): ...
6 years, 8 months ago (2014-04-22 19:27:25 UTC) #2
aelias_OOO_until_Jul13
There is a call to UpdateScreenInfo in ContentViewCoreImpl::SendOrientationChangeEventInternal. I assume that happens too late? Can ...
6 years, 8 months ago (2014-04-22 21:24:39 UTC) #3
mlamouri (slow - plz ping)
(Argh, I was wondering why no one replied and I realised I forgot to actually ...
6 years, 8 months ago (2014-04-25 13:42:28 UTC) #4
aelias_OOO_until_Jul13
OK. lgtm modulo comment below. On 2014/04/25 13:42:28, Mounir Lamouri wrote: > (Argh, I was ...
6 years, 8 months ago (2014-04-25 20:01:40 UTC) #5
mlamouri (slow - plz ping)
On 2014/04/25 20:01:40, aelias wrote: > OK. lgtm modulo comment below. > > On 2014/04/25 ...
6 years, 7 months ago (2014-04-28 16:42:33 UTC) #6
mlamouri (slow - plz ping)
jdduke@ or bulach@, could one of you rubberstamp this so I can land?
6 years, 7 months ago (2014-04-28 16:43:26 UTC) #7
jdduke (slow)
lgtm
6 years, 7 months ago (2014-04-28 16:44:11 UTC) #8
mlamouri (slow - plz ping)
On 2014/04/28 16:44:11, jdduke wrote: > lgtm Amazing reactivity <3
6 years, 7 months ago (2014-04-28 16:45:38 UTC) #9
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 7 months ago (2014-04-28 16:45:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/247933002/1
6 years, 7 months ago (2014-04-28 16:46:02 UTC) #11
jdduke (slow)
The CQ bit was unchecked by jdduke@chromium.org
6 years, 7 months ago (2014-04-28 16:50:15 UTC) #12
jdduke (slow)
Oops, I didn't see your follow-up comment to the request from aelias@, please run it ...
6 years, 7 months ago (2014-04-28 16:51:09 UTC) #13
mlamouri (slow - plz ping)
On 2014/04/28 16:42:33, Mounir Lamouri wrote: > On 2014/04/25 20:01:40, aelias wrote: > > OK. ...
6 years, 7 months ago (2014-04-28 16:52:18 UTC) #14
aelias_OOO_until_Jul13
OK, lgtm even without removing the extra call.
6 years, 7 months ago (2014-04-28 17:35:52 UTC) #15
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 7 months ago (2014-04-28 17:41:49 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/247933002/1
6 years, 7 months ago (2014-04-28 17:42:01 UTC) #17
commit-bot: I haz the power
Change committed as 266631
6 years, 7 months ago (2014-04-28 19:37:53 UTC) #18
pals
6 years, 7 months ago (2014-04-29 17:04:58 UTC) #19
Message was sent while issue was closed.
On 2014/04/25 13:42:28, Mounir Lamouri wrote:
> (Argh, I was wondering why no one replied and I realised I forgot to actually
> click on "send"...)
> 
> On 2014/04/22 21:24:39, aelias wrote:
> > There is a call to UpdateScreenInfo in
> > ContentViewCoreImpl::SendOrientationChangeEventInternal.  I assume that
> happens
> > too late?  Can we remove that one if we're adding a new one?
> 
> If I remember correctly, the screen orientation happens _before_. We could
> probably remove the call in the screen orientation function though.
> 
> > Secondly, would it work to call RenderWidgetHostViewBase::UpdateScreenInfo()
> > instead?  It looks like that should call both SendScreenRects and
WasResized.
> 
> Not really. UpdateScreenInfo() is abused. I am looking into doing some cleanup
> around that in order to have a better way to propagate proper screen info
> changes. See https://code.google.com/p/chromium/issues/detail?id=366848
> 
> UpdateScreenInfo() was not meant to update the screen information as in when
> WebScreenInfo changes. It was meant to fix this bug:
> https://code.google.com/p/chromium/issues/detail?id=126586 Basically,
> UpdateScreenInfo() should be called when a window has moved and might have
> changed screen in a multi-screen configuration.
> 
> Calling WasResized() was the right thing to do here but UpdateScreenInfo()
> called by the screen orientation code used to call SendScreenRects with the
> right values. This is no longer the case because the view might not have been
> resized when we know about the screen orientation change. The right thing to
do
> is to make sure we call SendScreenRect() and it seems that there are other
> places where those two methods are called in this order.
> 
> Also, it's worth noting that this is fixing a regression and it would be great
> to keep the patch as the bare minimum to reduce the risk of cherry-picking it
to
> a branch. I would be in favour of keep UpdateScreenInfo() in the screen
> orientation update code for that. I am going to rewrite part of that anyway.
> 
> Finally, it is possible that the problem is bigger and we do not want to
expose
> a screen orientation change to the page before the window was properly
resized.
> Though, this is an orthogonal problem.

Powered by Google App Engine
This is Rietveld 408576698