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 440463002: Fix display:none issue for <webview>. (Closed)

Created:
6 years, 4 months ago by lazyboy
Modified:
6 years, 3 months ago
Reviewers:
Fady Samuel
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, jam, extensions-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Fix display:none issue for <webview>. After we load a <webview>, setting its display to "none" removes the plugin <object> from the render tree. If we set the display back to "", we need to properly detect the case and allocate new instance id and call attach to make things work. The problem is briefly described here: https://docs.google.com/a/chromium.org/document/d/1ITPOxS97DsG1HkbTAlpH0YcaTXKZNYUs84p1MppaHg0/view BUG=399060 Test=Load a <webview> in a chrome app. See it render. Set <webview>.style.display = 'none', see it go away. Set <webview>.stlye.display = '', see it render properly. Committed: https://crrev.com/cee3dc262eb5e002fc8be52cd23506172087c53d Cr-Commit-Position: refs/heads/master@{#291990}

Patch Set 1 #

Patch Set 2 : sync after internal patch landed #

Patch Set 3 : current #

Patch Set 4 : rewrite test #

Patch Set 5 : Cleaned up for review. #

Patch Set 6 : unnecessary var removal #

Total comments: 1

Patch Set 7 : fix syntax error #

Total comments: 2

Patch Set 8 : forgot to upload the new test files #

Patch Set 9 : sync #

Total comments: 4

Patch Set 10 : Address comments from Fady #

Patch Set 11 : sync @tott #

Patch Set 12 : resolve conflict + fix bad merge #

Patch Set 13 : fix back the merge change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -18 lines) Patch
M chrome/browser/apps/web_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +53 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view.js View 1 2 3 4 5 6 7 8 9 5 chunks +15 lines, -6 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view_events.js View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -3 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/display_none_and_back/main.html View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/display_none_and_back/main.js View 1 2 3 4 5 6 7 3 chunks +10 lines, -3 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/display_none_and_back/manifest.json View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/display_none_and_back/test.js View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
M extensions/browser/guest_view/guest_view_manager.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M extensions/browser/guest_view/web_view/web_view_constants.h View 1 2 3 4 5 6 7 8 9 10 12 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_constants.cc View 1 2 3 4 5 6 7 8 9 10 12 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
lazyboy
https://chromiumcodereview.appspot.com/440463002/diff/100001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://chromiumcodereview.appspot.com/440463002/diff/100001/chrome/renderer/resources/extensions/web_view.js#newcode119 chrome/renderer/resources/extensions/web_view.js:119: shadowRoot.appendChild(this.browserPluginNode); This reshuffle is needed, otherwise "internalinstanceid" mutation would ...
6 years, 4 months ago (2014-08-22 22:49:27 UTC) #1
Fady Samuel
https://codereview.chromium.org/440463002/diff/120001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://codereview.chromium.org/440463002/diff/120001/chrome/renderer/resources/extensions/web_view.js#newcode743 chrome/renderer/resources/extensions/web_view.js:743: this.reset(); What happens if you try to set the ...
6 years, 4 months ago (2014-08-23 11:06:16 UTC) #2
lazyboy
https://codereview.chromium.org/440463002/diff/120001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://codereview.chromium.org/440463002/diff/120001/chrome/renderer/resources/extensions/web_view.js#newcode743 chrome/renderer/resources/extensions/web_view.js:743: this.reset(); On 2014/08/23 11:06:16, Fady Samuel wrote: > What ...
6 years, 4 months ago (2014-08-23 16:10:18 UTC) #3
Fady Samuel
lgtm with nits. https://codereview.chromium.org/440463002/diff/160001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://codereview.chromium.org/440463002/diff/160001/chrome/renderer/resources/extensions/web_view.js#newcode578 chrome/renderer/resources/extensions/web_view.js:578: this.parseAttributes(); Early exit preferred for readability: ...
6 years, 4 months ago (2014-08-25 18:55:34 UTC) #4
lazyboy
Address comments in patchest #10 https://chromiumcodereview.appspot.com/440463002/diff/160001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://chromiumcodereview.appspot.com/440463002/diff/160001/chrome/renderer/resources/extensions/web_view.js#newcode578 chrome/renderer/resources/extensions/web_view.js:578: this.parseAttributes(); On 2014/08/25 18:55:34, ...
6 years, 4 months ago (2014-08-25 19:16:44 UTC) #5
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 4 months ago (2014-08-25 22:58:32 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/440463002/200001
6 years, 4 months ago (2014-08-25 23:02:53 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-26 00:07:36 UTC) #8
commit-bot: I haz the power
Failed to commit the patch.
6 years, 4 months ago (2014-08-26 00:07:37 UTC) #9
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 3 months ago (2014-08-26 15:48:11 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/440463002/200001
6 years, 3 months ago (2014-08-26 15:49:03 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-26 15:49:35 UTC) #12
commit-bot: I haz the power
Failed to apply patch for chrome/browser/apps/web_view_browsertest.cc: While running git apply --index -p1; error: patch failed: ...
6 years, 3 months ago (2014-08-26 15:49:39 UTC) #13
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 3 months ago (2014-08-26 16:44:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/440463002/220001
6 years, 3 months ago (2014-08-26 16:45:59 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 3 months ago (2014-08-26 18:10:45 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-26 19:05:39 UTC) #17
commit-bot: I haz the power
Failed to apply patch for chrome/browser/guest_view/web_view/web_view_constants.cc: While running git apply --index -p1; error: chrome/browser/guest_view/web_view/web_view_constants.cc: does ...
6 years, 3 months ago (2014-08-26 19:05:40 UTC) #18
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 3 months ago (2014-08-26 19:36:45 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/440463002/240001
6 years, 3 months ago (2014-08-26 19:38:06 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 3 months ago (2014-08-26 20:43:30 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-26 20:58:07 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/49769)
6 years, 3 months ago (2014-08-26 20:58:08 UTC) #23
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 3 months ago (2014-08-26 22:00:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/440463002/240001
6 years, 3 months ago (2014-08-26 22:02:26 UTC) #25
commit-bot: I haz the power
Committed patchset #13 (240001) as e9391fa563657cbec02a0a1a254bf5f44b119dc3
6 years, 3 months ago (2014-08-26 22:06:59 UTC) #26
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:45:54 UTC) #27
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/cee3dc262eb5e002fc8be52cd23506172087c53d
Cr-Commit-Position: refs/heads/master@{#291990}

Powered by Google App Engine
This is Rietveld 408576698