Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout: Fix some particularly bad cases of spurious reflows leading to script thread unresponsiveness. #14418

Merged
merged 5 commits into from Dec 1, 2016

Commits on Dec 1, 2016

  1. layout_thread: Log reflows that happen due to animation ticks if

    `-Z relayout-event` is on.
    pcwalton committed Dec 1, 2016
  2. compositing: Only make the compositor responsible for initiating reflow

    for CSS transitions and animations, not `requestAnimationFrame()`
    callbacks.
    
    In the case of the latter, the script thread will kick off the reflow if
    it's necessary, so there's no need for the compositor to do it.
    
    Some pages, like nytimes.com, like to call `requestAnimationFrame()`
    without actually mutating the DOM in the callback. We should avoid
    reflowing in this case.
    pcwalton committed Dec 1, 2016
  3. layout: Don't restart a transition if the end value for the new

    transition is the same as the end value for a running transition per
    CSS-TRANSITIONS § 3.
    
    Besides being contrary to spec, the old behavior could cause a cascade
    of CSS transitions incorrectly triggering themselves when calls to
    `getComputedStyle()` were intermingled with them.
    
    Improves performance of nytimes.com.
    pcwalton committed Dec 1, 2016
  4. layout: Minor style cleanup.

    pcwalton committed Dec 1, 2016
You can’t perform that action at this time.