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

Issue 2646663002: [Blink] Don't center images in Android WebViews (Closed)

Created:
3 years, 11 months ago by gone
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Blink] Don't center images in Android WebViews Android WebViews currently get into a loop where Blink's ImageDocument::windowSizeChanged() is called, causing WebViews to be resized larger, causing Blink's windowSizeChanged() to be called. Instead of using a different height for the calculation, it was decided on the bug that Android WebViews shouldn't return true for shouldShrinkToFit(), treating them similarly to non-main frames. BUG=679709 Review-Url: https://codereview.chromium.org/2646663002 Cr-Commit-Position: refs/heads/master@{#444842} Committed: https://chromium.googlesource.com/chromium/src/+/684507d88c125e0ea9077787e94328ced875eae3

Patch Set 1 #

Patch Set 2 : Fixing comments #

Total comments: 1

Patch Set 3 : [Blink] Don't center images in Android WebViews #

Total comments: 2

Patch Set 4 : [Blink] Don't center images in Android WebViews #

Total comments: 5

Patch Set 5 : Update test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -2 lines) Patch
M third_party/WebKit/Source/core/html/ImageDocument.h View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/ImageDocument.cpp View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/ImageDocumentTest.cpp View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (20 generated)
gone
What do you all think of this? It cordons off the new presentation codepath for ...
3 years, 11 months ago (2017-01-18 23:48:46 UTC) #3
aelias_OOO_until_Jul13
https://codereview.chromium.org/2646663002/diff/20001/third_party/WebKit/Source/core/html/ImageDocument.cpp File third_party/WebKit/Source/core/html/ImageDocument.cpp (right): https://codereview.chromium.org/2646663002/diff/20001/third_party/WebKit/Source/core/html/ImageDocument.cpp#newcode568 third_party/WebKit/Source/core/html/ImageDocument.cpp:568: m_imageElement->setInlineStyleProperty( Could you try instead returning false from ImageDocument::shouldShrinkToFit() ...
3 years, 11 months ago (2017-01-19 00:23:49 UTC) #6
gone
Well, that works better than expected. I was worried that m_shouldShrinkToFit would be problematic, but ...
3 years, 11 months ago (2017-01-19 01:05:55 UTC) #9
gone
https://codereview.chromium.org/2646663002/diff/40001/third_party/WebKit/Source/core/html/ImageDocument.cpp File third_party/WebKit/Source/core/html/ImageDocument.cpp (right): https://codereview.chromium.org/2646663002/diff/40001/third_party/WebKit/Source/core/html/ImageDocument.cpp#newcode599 third_party/WebKit/Source/core/html/ImageDocument.cpp:599: page() ? page()->settings().getForceZeroLayoutHeight() : false; Is there a better ...
3 years, 11 months ago (2017-01-19 01:06:29 UTC) #11
aelias_OOO_until_Jul13
Looks good, thanks. Could you add a test case to ImageDocumentTest.cpp that sets this setting? ...
3 years, 11 months ago (2017-01-19 01:11:08 UTC) #13
aelias_OOO_until_Jul13
Hmm, since this is for M56 cherry-pick and time is running out, lgtm without a ...
3 years, 11 months ago (2017-01-19 03:05:58 UTC) #16
pdr.
https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocument.cpp File third_party/WebKit/Source/core/html/ImageDocument.cpp (right): https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocument.cpp#newcode599 third_party/WebKit/Source/core/html/ImageDocument.cpp:599: page() ? page()->settings().getForceZeroLayoutHeight() : false; Is getForceZeroLayoutHeight causing the ...
3 years, 11 months ago (2017-01-19 03:17:32 UTC) #17
aelias_OOO_until_Jul13
https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocument.cpp File third_party/WebKit/Source/core/html/ImageDocument.cpp (right): https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocument.cpp#newcode599 third_party/WebKit/Source/core/html/ImageDocument.cpp:599: page() ? page()->settings().getForceZeroLayoutHeight() : false; On 2017/01/19 at 03:17:32, ...
3 years, 11 months ago (2017-01-19 03:53:07 UTC) #20
aelias_OOO_until_Jul13
https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp File third_party/WebKit/Source/core/html/ImageDocumentTest.cpp (right): https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp#newcode188 third_party/WebKit/Source/core/html/ImageDocumentTest.cpp:188: if (document().shouldShrinkToFit()) { This test can never go red, ...
3 years, 11 months ago (2017-01-19 04:08:22 UTC) #21
pdr.
LGTM % a comment and aelias's point about tests. https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocument.cpp File third_party/WebKit/Source/core/html/ImageDocument.cpp (right): https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocument.cpp#newcode599 third_party/WebKit/Source/core/html/ImageDocument.cpp:599: ...
3 years, 11 months ago (2017-01-19 05:04:27 UTC) #22
gone
Cool, thanks. Can I get a sanity check on the last patch? https://codereview.chromium.org/2646663002/diff/60001/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp File third_party/WebKit/Source/core/html/ImageDocumentTest.cpp ...
3 years, 11 months ago (2017-01-19 18:56:29 UTC) #23
pdr.
On 2017/01/19 at 18:56:29, dfalcantara wrote: > Cool, thanks. Can I get a sanity check ...
3 years, 11 months ago (2017-01-19 19:10:59 UTC) #26
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/2646663002/80001
3 years, 11 months ago (2017-01-19 20:53:57 UTC) #31
commit-bot: I haz the power
3 years, 11 months ago (2017-01-19 20:59:03 UTC) #34
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/684507d88c125e0ea9077787e943...

Powered by Google App Engine
This is Rietveld 408576698