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

Issue 1774653002: Decouple scheduling animation of webview plugins from layout. (Closed)

Created:
4 years, 9 months ago by chrishtr
Modified:
4 years, 9 months ago
Reviewers:
Xianzhu, wkorman
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-layout_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, eae+blinkwatch, jam, jchaffraix+rendering, jochen+watch_chromium.org, leviw+renderwatch, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decouple scheduling animation of webview plugins from layout. Previously, any time the webview plugin needed to schedule animation, it dirtied layout in the containing frame. This was because it used to be the case that LayoutEmbeddedObject would run the webview plugin's lifecycle as part of layout. However, this is not right, for two reasons: 1. A lifecycle update for later phases may be needed for the plugin due to changes in the parent, even if layout is not dirty. This can lead to not running the webview lifecyle in some cases. https://codereview.chromium.org/1708923002 fixed this by always running the lifecycle of the webview plugin when the parent does. 2. Animation is scheduled for two reasons: lifecyle update, and actual animations, such as issuing resize events to script. It is valid to queue up async script events during a lifecycle update. (In one case in the referenced bug, FrameView:: sendResizeEventIfNeeded does this when it notices that layout changed the size of the frame). This CL fixes cases such as that, and builds up on the one fixing issue #1, by scheduling animation of the parent frame but not dirtying layout. BUG=590856 TBR=tommycli,bbudge,fsamuel Committed: https://crrev.com/78ea22a8529ec7ac2ea07d7e69ddd1446f0ed262 Cr-Commit-Position: refs/heads/master@{#379694}

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -30 lines) Patch
M components/plugins/renderer/webview_plugin.h View 1 chunk +1 line, -1 line 0 comments Download
M components/plugins/renderer/webview_plugin.cc View 1 3 chunks +4 lines, -6 lines 0 comments Download
M components/test_runner/test_plugin.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/browser_plugin/browser_plugin.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/npapi/webplugin_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/npapi/webplugin_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_webplugin_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp View 1 chunk +2 lines, -1 line 2 comments Download
M third_party/WebKit/Source/core/plugins/PluginView.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.cpp View 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FakeWebPlugin.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/web/WebPlugin.h View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/public/web/WebPluginContainer.h View 1 chunk +2 lines, -5 lines 2 comments Download

Messages

Total messages: 25 (13 generated)
chrishtr
https://codereview.chromium.org/1774653002/diff/1/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp File third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp (right): https://codereview.chromium.org/1774653002/diff/1/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp#newcode139 third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp:139: toPluginView(widget)->updateAllLifecyclePhases(); I'm leaving this in here out of caution, ...
4 years, 9 months ago (2016-03-07 21:49:24 UTC) #3
chrishtr
I'm no longer able to crash deepika.com with this CL.
4 years, 9 months ago (2016-03-07 21:52:17 UTC) #9
Xianzhu
lgtm https://codereview.chromium.org/1774653002/diff/1/components/plugins/renderer/webview_plugin.cc File components/plugins/renderer/webview_plugin.cc (right): https://codereview.chromium.org/1774653002/diff/1/components/plugins/renderer/webview_plugin.cc#newcode137 components/plugins/renderer/webview_plugin.cc:137: // for layout again, and it does help ...
4 years, 9 months ago (2016-03-07 21:53:04 UTC) #10
chrishtr
https://codereview.chromium.org/1774653002/diff/1/components/plugins/renderer/webview_plugin.cc File components/plugins/renderer/webview_plugin.cc (right): https://codereview.chromium.org/1774653002/diff/1/components/plugins/renderer/webview_plugin.cc#newcode137 components/plugins/renderer/webview_plugin.cc:137: // for layout again, and it does help us ...
4 years, 9 months ago (2016-03-07 22:23:43 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1774653002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1774653002/20001
4 years, 9 months ago (2016-03-07 22:24:54 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/32284) android_compile_dbg on tryserver.chromium.android (JOB_FAILED, ...
4 years, 9 months ago (2016-03-07 22:33:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1774653002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1774653002/20001
4 years, 9 months ago (2016-03-07 23:09:58 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-08 01:11:43 UTC) #19
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/78ea22a8529ec7ac2ea07d7e69ddd1446f0ed262 Cr-Commit-Position: refs/heads/master@{#379694}
4 years, 9 months ago (2016-03-08 01:13:41 UTC) #21
wkorman
Is there a feasible path to reducing a test case? https://codereview.chromium.org/1774653002/diff/20001/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp File third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp (right): https://codereview.chromium.org/1774653002/diff/20001/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp#newcode137 ...
4 years, 9 months ago (2016-03-08 01:38:50 UTC) #23
chrishtr
https://codereview.chromium.org/1774653002/diff/20001/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp File third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp (right): https://codereview.chromium.org/1774653002/diff/20001/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp#newcode137 third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp:137: // TODO(chrishtr): remove this code. It's now called in ...
4 years, 9 months ago (2016-03-10 19:06:14 UTC) #24
chrishtr
4 years, 9 months ago (2016-03-10 19:08:03 UTC) #25
Message was sent while issue was closed.
On 2016/03/08 at 01:38:50, wkorman wrote:
> Is there a feasible path to reducing a test case?
> 

Probably yes. I'll try.

Powered by Google App Engine
This is Rietveld 408576698