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

Issue 2563783003: Avoid division-by-zero when visual viewport width is 0. (Closed)

Created:
4 years ago by rune
Modified:
4 years ago
Reviewers:
bokan
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid division-by-zero when visual viewport width is 0. The extension overlay/drop-down or what it's called seems to have styles calculated with visual viewport size set to (0, 0) which caused a division-by-zero error calculating the base value for vh units. R=bokan@chromium.org BUG=667712

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +2 lines, -1 line 2 comments Download

Messages

Total messages: 14 (6 generated)
rune
I don't know if this is the correct fix, or if the visual viewport width ...
4 years ago (2016-12-09 15:25:43 UTC) #3
rune
https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode1357 third_party/WebKit/Source/core/frame/FrameView.cpp:1357: m_frame->host()->visualViewport().size().width()) { I should probably check the pageScaleAtLayoutWidth for ...
4 years ago (2016-12-09 15:27:50 UTC) #4
bokan
https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode1357 third_party/WebKit/Source/core/frame/FrameView.cpp:1357: m_frame->host()->visualViewport().size().width()) { On 2016/12/09 15:27:50, rune wrote: > I ...
4 years ago (2016-12-09 16:48:56 UTC) #5
rune
On 2016/12/09 16:48:56, bokan wrote: > Visual Viewport size should never be 0, do you ...
4 years ago (2016-12-09 18:47:26 UTC) #8
bokan
On 2016/12/09 18:47:26, rune wrote: > On 2016/12/09 16:48:56, bokan wrote: > > > Visual ...
4 years ago (2016-12-09 18:48:16 UTC) #9
rune
On 2016/12/09 18:47:26, rune wrote: > On 2016/12/09 16:48:56, bokan wrote: > > > Visual ...
4 years ago (2016-12-09 19:35:42 UTC) #10
rune
On 2016/12/09 18:48:16, bokan wrote: > On 2016/12/09 18:47:26, rune wrote: > > On 2016/12/09 ...
4 years ago (2016-12-09 19:39:05 UTC) #11
bokan
4 years ago (2016-12-09 19:40:23 UTC) #12
On 2016/12/09 19:39:05, rune wrote:
> On 2016/12/09 18:48:16, bokan wrote:
> > On 2016/12/09 18:47:26, rune wrote:
> > > On 2016/12/09 16:48:56, bokan wrote:
> > > 
> > > > Visual Viewport size should never be 0, do you know why that happens?
> > Sigh...I
> > > > battled many size regressions related to extensions and their autosizing
> > > > behavior but I thought it was over...
> > > 
> > > No, I never actually debugged, I used printf and didn't check further
since
> I
> > > didn't know if that should ever happen.
> > 
> > Ok, I wrote all this so unless you're deep into it I can take over this bug
> for
> > you.
> 
> Please do.

Ok, thanks for digging into it.

Powered by Google App Engine
This is Rietveld 408576698