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

Issue 2794803002: Suppress frame requests in InputMethodController::textInputType() (Closed)

Created:
3 years, 8 months ago by alancutter (OOO until 2018)
Modified:
3 years, 8 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, chromium-reviews, Eric Willigers, rjwright, shans
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Suppress frame requests in InputMethodController::textInputType() This change generalises and exposes the frame request suppression logic in PageAnimator for use in InputMethodController::textInputType(). This is a temporary workaround for a performance regression bug where Blink would continuously request main thread frames during a composited animation. This patch is intended to be non invasive and suitable for merging. The proper fix for this issue involves much larger changes. See design doc: https://docs.google.com/document/d/1A22HVDbVh2xhPU0OeXVWTSAriZMsd_rH5seO7xIuzCI BUG=704763

Patch Set 1 #

Patch Set 2 : Typos #

Patch Set 3 : Use depth count #

Patch Set 4 : InputMethodController::textInputType() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -13 lines) Patch
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 2 3 2 chunks +15 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/page/PageAnimator.h View 1 2 3 1 chunk +18 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/PageAnimator.cpp View 1 2 3 chunks +21 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (13 generated)
alancutter (OOO until 2018)
3 years, 8 months ago (2017-04-03 04:57:58 UTC) #9
dstockwell
lgtm
3 years, 8 months ago (2017-04-03 05:07:03 UTC) #10
esprehn
I don't think this is a good idea, using a frame suppression scope is almost ...
3 years, 8 months ago (2017-04-03 05:14:16 UTC) #11
yosin_UTC9
lgtm Thanks for workaround! Patch [1] will make not to call update layout for opacity ...
3 years, 8 months ago (2017-04-03 05:17:14 UTC) #12
esprehn
not lgtm, this method is also called here: https://cs.chromium.org/chromium/src/content/renderer/render_widget.cc?l=2201 which is not inside BeginMainFrame. Also ...
3 years, 8 months ago (2017-04-03 05:39:41 UTC) #14
alancutter (OOO until 2018)
On 2017/04/03 at 05:14:16, esprehn wrote: > I don't think this is a good idea, ...
3 years, 8 months ago (2017-04-03 05:42:02 UTC) #15
alancutter (OOO until 2018)
On 2017/04/03 at 05:42:02, alancutter wrote: > On 2017/04/03 at 05:14:16, esprehn wrote: > > ...
3 years, 8 months ago (2017-04-03 05:43:40 UTC) #18
esprehn
On 2017/04/03 at 05:43:40, alancutter wrote: > On 2017/04/03 at 05:42:02, alancutter wrote: > > ...
3 years, 8 months ago (2017-04-03 06:03:55 UTC) #19
yosin_UTC9
3 years, 8 months ago (2017-04-03 06:27:42 UTC) #20
On 2017/04/03 at 05:17:14, yosin_UTC9 wrote:
> lgtm
> 
> Thanks for workaround!
> 
> Patch [1] will make not to call update layout for opacity animation case, but
there are unseen
> update layout call some path during animation. This patch fix perf regression
in such path.
> 
> We're investigating why [1] causes crash.
> 
> [1]  http://crrev.com/2782413002: Get rid of
computeVisibleSelectionInDOMTreeDeprecated() in InputMethodController

The crash reason of patch[1] is Blink paints with dirty layout tree[2]
Without [1], we make clean layout tree in IMC::textInputType(), by calling
updateStyleAndLayoutTreeIgnorePendingStylesheets(), during WillBeignMainFrame().
With [1], Blink paints with dirty layout tree then call Element::clientHeight()
during painting media play button and which calls update layout.
It seems that dirty layout  LayoutTextTrackContainer::layout() which modifies
inline style property[3].

[2] http://crbug.com/706865 ⚐	Crash during system_health.common_mobile
browse:media:youtube on Nexus5 Perf bot
[3] http://crbug.com/372245 ⚐	LayoutTextTrackContainer::layout() should not
modify DOM tree

Powered by Google App Engine
This is Rietveld 408576698