MediaControls computeWhichControlsFit() is called too often |
||||
Issue descriptionIt seems that leaving a page idle will still produce a lot of calls to computeWhichControlsFit(). We should either reduce these calls or add optimisation to early return.
,
Jan 17 2017
,
Jan 20 2017
,
Feb 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6fb1451de0171f8bdd0915c22016750d79c0b3ac commit 6fb1451de0171f8bdd0915c22016750d79c0b3ac Author: steimel <steimel@chromium.org> Date: Wed Feb 15 00:24:19 2017 Remove unnecessary refreshCastButtonVisiblity call computeWhichControlsFit is being called on every mousemove event on a video (via a call to refreshCastButtonVisiblity). After discussing offline with mlamouri@ and avayvod@, it was determined that the call to refreshCastButtonVisiblity is no longer needed, and therefore can be removed. In addition, this CL refactors some media layout tests that test the cast button visibility, and appends to an existing cast button visibility test (controls-cast-button-narrow.html) to test for correct visibility after expanding and contracting a video. BUG= 639273 Review-Url: https://codereview.chromium.org/2684973004 Cr-Commit-Position: refs/heads/master@{#450524} [modify] https://crrev.com/6fb1451de0171f8bdd0915c22016750d79c0b3ac/third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html [modify] https://crrev.com/6fb1451de0171f8bdd0915c22016750d79c0b3ac/third_party/WebKit/LayoutTests/media/controls-cast-button.html [modify] https://crrev.com/6fb1451de0171f8bdd0915c22016750d79c0b3ac/third_party/WebKit/LayoutTests/media/controls-overlay-cast-button.html [modify] https://crrev.com/6fb1451de0171f8bdd0915c22016750d79c0b3ac/third_party/WebKit/LayoutTests/media/media-controls.js [modify] https://crrev.com/6fb1451de0171f8bdd0915c22016750d79c0b3ac/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
,
Feb 15 2017
We can't find other obvious spam call to the method so closing this. Thank you steimel@ for the fix :) |
||||
►
Sign in to add a comment |
||||
Comment 1 by w...@chromium.org
, Jan 17 2017