Changeset 211154 in webkit


Ignore:
Timestamp:
Jan 25, 2017 10:32:05 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167253

Patch by Antoine Quint <Antoine Quint> on 2017-01-25
Reviewed by Jon Lee.

Source/WebCore:

An IconButton loads its image asynchronously and waits for its load to obtain metrics. Once that happens,
its layout delegate needs to be notified that it needs a new layout. The test was a flaky failure because
the images would sometime load prior to layout, and sometime after, which would cause a failure. The test
is now robust with a controls layout happening after all buttons had loaded.

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype._updateImage):
(IconButton):

LayoutTests:

This test should no longer be flaky, so let's not mark it as such anymore.

  • platform/mac-wk1/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r211152 r211154  
     12017-01-25  Antoine Quint  <graouts@apple.com>
     2
     3        LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=167253
     5
     6        Reviewed by Jon Lee.
     7
     8        This test should no longer be flaky, so let's not mark it as such anymore.
     9
     10        * platform/mac-wk1/TestExpectations:
     11
    1122017-01-25  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r211130 r211154  
    300300media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html [ Pass Timeout ]
    301301
    302 webkit.org/b/167253 media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html [ Pass Failure ]
    303 
    304302webkit.org/b/167320 [ Sierra Release ] media/modern-media-controls/placard-support/placard-support-pip.html [ Pass Crash ]
    305303
  • trunk/Source/WebCore/ChangeLog

    r211153 r211154  
     12017-01-25  Antoine Quint  <graouts@apple.com>
     2
     3        LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=167253
     5
     6        Reviewed by Jon Lee.
     7
     8        An IconButton loads its image asynchronously and waits for its load to obtain metrics. Once that happens,
     9        its layout delegate needs to be notified that it needs a new layout. The test was a flaky failure because
     10        the images would sometime load prior to layout, and sometime after, which would cause a failure. The test
     11        is now robust with a controls layout happening after all buttons had loaded.
     12
     13        * Modules/modern-media-controls/controls/icon-button.js:
     14        (IconButton.prototype._updateImage):
     15        (IconButton):
     16
    1172017-01-25  Timothy Hatcher  <timothy@hatcher.name>
    218
  • trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-button.js

    r209451 r211154  
    104104    _updateImage()
    105105    {
    106         this.width = this._image.width / window.devicePixelRatio;
    107         this.height = this._image.height / window.devicePixelRatio;
     106        const width = this._image.width / window.devicePixelRatio;
     107        const height = this._image.height / window.devicePixelRatio;
     108
     109        if (this.width === width && this.height === height)
     110            return;
     111
     112        this.width = width;
     113        this.height = height;
    108114
    109115        this.needsLayout = true;
     116
     117        if (this.layoutDelegate)
     118            this.layoutDelegate.needsLayout = true;
    110119    }
    111120
Note: See TracChangeset for help on using the changeset viewer.