|
|
Chromium Code Reviews
DescriptionAvoid 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
Messages
Total messages: 14 (6 generated)
The CQ bit was checked by rune@opera.com 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...
I don't know if this is the correct fix, or if the visual viewport width should have been different from 0.
https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/frame/FrameView.cpp:1357: m_frame->host()->visualViewport().size().width()) { I should probably check the pageScaleAtLayoutWidth for 0 below instead ...
https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2563783003/diff/1/third_party/WebKit/Source/c... 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 should probably check the pageScaleAtLayoutWidth for 0 below instead ... 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...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
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.
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.
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. newSize is (0,0) here when I click the icon to open the extension drop-down. #0 blink::WebViewImpl::resizeVisualViewport (this=0x4b3c3ae9e90, newSize=...) at ../../third_party/WebKit/Source/web/WebViewImpl.cpp:1762 #1 0x00007fffe76c12ec in blink::WebViewFrameWidget::resizeVisualViewport (this=0x280d50c75980, size=...) at ../../third_party/WebKit/Source/web/WebViewFrameWidget.cpp:49 #2 0x00007ffff210b3fe in content::RenderWidget::Resize (this=0x280d511e7a20, params=...) at ../../content/renderer/render_widget.cc:1169 #3 0x00007ffff21086c2 in content::RenderWidget::OnResize (this=0x280d511e7a20, params=...) at ../../content/renderer/render_widget.cc:724 #4 0x00007ffff20ede46 in content::RenderViewImpl::OnResize (this=0x280d511e7a20, params=...) at ../../content/renderer/render_view_impl.cc:2335 #5 0x00007ffff20e2074 in content::RenderViewImpl::Initialize(content::mojom::CreateViewParams const&, base::Callback<void (content::RenderWidget*, blink::WebNavigationPolicy, gfx::Rect const&), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) (this=0x280d511e7a20, params=..., show_callback=...) at ../../content/renderer/render_view_impl.cc:708 #6 0x00007ffff20e4dc8 in content::RenderViewImpl::Create(content::CompositorDependencies*, content::mojom::CreateViewParams const&, base::Callback<void (content::RenderWidget*, blink::WebNavigationPolicy, gfx::Rect const&), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) (compositor_deps=0x280d50118638, params=..., show_callback=...) at ../../content/renderer/render_view_impl.cc:1097 #7 0x00007ffff20bb9a9 in content::RenderThreadImpl::CreateView (this=0x280d50118220, params=...) at ../../content/renderer/render_thread_impl.cc:2156 #8 0x00007ffff06aeb06 in content::mojom::RendererStubDispatch::Accept (impl=0x280d50118630, context=0x280d50118a68, message=0x7fffffffb968) at gen/content/common/renderer.mojom.cc:446 #9 0x00007ffff20c7b23 in content::mojom::RendererStub<mojo::RawPtrImplRefTraits<content::mojom::Renderer> >::Accept (this=0x280d50118a58, message=0x7fffffffb968) at gen/content/common/renderer.mojom.h:273 #10 0x00007ffff7f3a1f9 in ?? () from /chromium/dev/src/out/Debug/./libbindings.so ... and that's the only size I see passed into that method in this case.
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.
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.
Description was changed from ========== 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 ========== to ========== 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 ==========
Description was changed from ========== 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 ========== to ========== 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 ========== |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
