• Stephen McGruer's avatar
    Fix active/pending id issues in cc::ScrollTimeline · 23e3596c
    Stephen McGruer authored
    There were two subtle bugs in the original implementation:
    
    i. cc::ScrollTimeline was incorrectly initialized with active_id_ ==
       pending_id_. This is incorrect as the current active tree may not
       yet have the relevant ScrollNode. Instead only pending_id_ should be
       set, and it will be promoted to active via the existing logic when
       the pending tree activates.
    
    ii. cc::ScrollTimeline::PushPropertiesTo incorrectly updated the impl
        thread active_id_ from the main side. This is incorrect, main never
        has a valid active_id_ value (since it never gets updated by pending
        tree activations). This should only push the pending_id_ value,
        which may change e.g. if the scroller went display:none and back.
    
    Bug: 853231
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: Ib7bf4e82e779d11895c373f7c786727c1bcadb9d
    Reviewed-on: https://chromium-review.googlesource.com/1110438
    Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
    Reviewed-by: default avatarMajid Valipour <majidvp@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569790}
    23e3596c
scroll_timeline.h 2.62 KB