⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 254581 in webkit


Ignore:
Timestamp:
Jan 15, 2020, 11:14:21 AM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r254042. rdar://problem/58549102

Source/WebCore/PAL:
DumpRenderTree doesn't always call updateRendering() when a test completes
​https://bugs.webkit.org/show_bug.cgi?id=205761

Reviewed by Darin Adler.

Add -[CATransaction synchronize].

  • pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:
DumpRenderTree doesn't always call updateRendering() when a test completes
​https://bugs.webkit.org/show_bug.cgi?id=205761

Reviewed by Darin Adler.

Use the QuartzCore SPI header.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

Source/WebKitLegacy/mac:
Fix a souce of WebKit1 test flakiness
​https://bugs.webkit.org/show_bug.cgi?id=205761

Reviewed by Darin Adler.

Some animation tests (and possibly many others) are flakey or broken in WK1 because
there was no code to guarantee that Page::updateRendering() was called at notifyDone()
time.

WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
and flushes a CATransaction.

In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
changes, and WebCore changes that make more things happen with HTML event loop timing, this
approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
WK2 is doing.

  • WebView/WebView.mm: (-[WebView _forceRepaintForTesting]):
  • WebView/WebViewPrivate.h:

Tools:
DumpRenderTree doesn't always call updateRendering() when a test completes
​https://bugs.webkit.org/show_bug.cgi?id=205761

Reviewed by Darin Adler.

Some animation tests (and possibly many others) are flakey or broken in WK1 because
there was no code to guarantee that Page::updateRendering() was called at notifyDone()
time.

WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
and flushes a CATransaction.

In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
changes, and WebCore changes that make more things happen with HTML event loop timing, this
approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
WK2 is doing.

  • DumpRenderTree/mac/DumpRenderTree.mm: (updateDisplay):
  • DumpRenderTree/mac/PixelDumpSupportMac.mm:

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@254042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-609-branch
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-609-branch/LayoutTests/platform/mac-wk1/TestExpectations

    r254014 r254581  
    810810# No support for reftest-wait in DRT.
    811811imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-setattribute-value.html [ ImageOnlyFailure ]
     812imported/w3c/web-platform-tests/css/css-display/display-none-inline-img.html [ ImageOnlyFailure ]
    812813
    813814# <rdar://problem/42625657> REGRESSION (Mojave): 12 fast/images tests timing out on WK1
  • branches/safari-609-branch/Source/WebCore/PAL/ChangeLog

    r254476 r254581  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254042. rdar://problem/58549102
     4
     5    Source/WebCore/PAL:
     6    DumpRenderTree doesn't always call updateRendering() when a test completes
     7    https://bugs.webkit.org/show_bug.cgi?id=205761
     8   
     9    Reviewed by Darin Adler.
     10   
     11    Add -[CATransaction synchronize].
     12   
     13    * pal/spi/cocoa/QuartzCoreSPI.h:
     14   
     15    Source/WebKit:
     16    DumpRenderTree doesn't always call updateRendering() when a test completes
     17    https://bugs.webkit.org/show_bug.cgi?id=205761
     18   
     19    Reviewed by Darin Adler.
     20   
     21    Use the QuartzCore SPI header.
     22   
     23    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     24   
     25    Source/WebKitLegacy/mac:
     26    Fix a souce of WebKit1 test flakiness
     27    https://bugs.webkit.org/show_bug.cgi?id=205761
     28   
     29    Reviewed by Darin Adler.
     30   
     31    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     32    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     33    time.
     34   
     35    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     36    and flushes a CATransaction.
     37   
     38    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     39    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     40    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     41    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     42    WK2 is doing.
     43   
     44    * WebView/WebView.mm:
     45    (-[WebView _forceRepaintForTesting]):
     46    * WebView/WebViewPrivate.h:
     47   
     48    Tools:
     49    DumpRenderTree doesn't always call updateRendering() when a test completes
     50    https://bugs.webkit.org/show_bug.cgi?id=205761
     51   
     52    Reviewed by Darin Adler.
     53   
     54    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     55    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     56    time.
     57   
     58    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     59    and flushes a CATransaction.
     60   
     61    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     62    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     63    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     64    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     65    WK2 is doing.
     66   
     67    * DumpRenderTree/mac/DumpRenderTree.mm:
     68    (updateDisplay):
     69    * DumpRenderTree/mac/PixelDumpSupportMac.mm:
     70   
     71    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     72
     73    2020-01-05  Simon Fraser  <simon.fraser@apple.com>
     74
     75            DumpRenderTree doesn't always call updateRendering() when a test completes
     76            https://bugs.webkit.org/show_bug.cgi?id=205761
     77
     78            Reviewed by Darin Adler.
     79
     80            Add -[CATransaction synchronize].
     81
     82            * pal/spi/cocoa/QuartzCoreSPI.h:
     83
    1842020-01-13  Alan Coon  <alancoon@apple.com>
    285
  • branches/safari-609-branch/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h

    r250310 r254581  
    142142+ (void)addCommitHandler:(void(^)(void))block forPhase:(CATransactionPhase)phase;
    143143+ (CATransactionPhase)currentPhase;
     144+ (void)synchronize;
    144145@end
    145146
  • branches/safari-609-branch/Source/WebKit/ChangeLog

    r254580 r254581  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254042. rdar://problem/58549102
     4
     5    Source/WebCore/PAL:
     6    DumpRenderTree doesn't always call updateRendering() when a test completes
     7    https://bugs.webkit.org/show_bug.cgi?id=205761
     8   
     9    Reviewed by Darin Adler.
     10   
     11    Add -[CATransaction synchronize].
     12   
     13    * pal/spi/cocoa/QuartzCoreSPI.h:
     14   
     15    Source/WebKit:
     16    DumpRenderTree doesn't always call updateRendering() when a test completes
     17    https://bugs.webkit.org/show_bug.cgi?id=205761
     18   
     19    Reviewed by Darin Adler.
     20   
     21    Use the QuartzCore SPI header.
     22   
     23    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     24   
     25    Source/WebKitLegacy/mac:
     26    Fix a souce of WebKit1 test flakiness
     27    https://bugs.webkit.org/show_bug.cgi?id=205761
     28   
     29    Reviewed by Darin Adler.
     30   
     31    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     32    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     33    time.
     34   
     35    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     36    and flushes a CATransaction.
     37   
     38    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     39    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     40    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     41    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     42    WK2 is doing.
     43   
     44    * WebView/WebView.mm:
     45    (-[WebView _forceRepaintForTesting]):
     46    * WebView/WebViewPrivate.h:
     47   
     48    Tools:
     49    DumpRenderTree doesn't always call updateRendering() when a test completes
     50    https://bugs.webkit.org/show_bug.cgi?id=205761
     51   
     52    Reviewed by Darin Adler.
     53   
     54    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     55    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     56    time.
     57   
     58    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     59    and flushes a CATransaction.
     60   
     61    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     62    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     63    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     64    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     65    WK2 is doing.
     66   
     67    * DumpRenderTree/mac/DumpRenderTree.mm:
     68    (updateDisplay):
     69    * DumpRenderTree/mac/PixelDumpSupportMac.mm:
     70   
     71    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     72
     73    2020-01-05  Simon Fraser  <simon.fraser@apple.com>
     74
     75            DumpRenderTree doesn't always call updateRendering() when a test completes
     76            https://bugs.webkit.org/show_bug.cgi?id=205761
     77
     78            Reviewed by Darin Adler.
     79
     80            Use the QuartzCore SPI header.
     81
     82            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     83
    1842020-01-14  Alan Coon  <alancoon@apple.com>
    285
  • branches/safari-609-branch/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r253689 r254581  
    6767#endif
    6868
    69 @interface CATransaction (Details)
    70 + (void)synchronize;
    71 @end
    72 
    7369namespace WebKit {
    7470using namespace WebCore;
  • branches/safari-609-branch/Source/WebKitLegacy/mac/ChangeLog

    r254010 r254581  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254042. rdar://problem/58549102
     4
     5    Source/WebCore/PAL:
     6    DumpRenderTree doesn't always call updateRendering() when a test completes
     7    https://bugs.webkit.org/show_bug.cgi?id=205761
     8   
     9    Reviewed by Darin Adler.
     10   
     11    Add -[CATransaction synchronize].
     12   
     13    * pal/spi/cocoa/QuartzCoreSPI.h:
     14   
     15    Source/WebKit:
     16    DumpRenderTree doesn't always call updateRendering() when a test completes
     17    https://bugs.webkit.org/show_bug.cgi?id=205761
     18   
     19    Reviewed by Darin Adler.
     20   
     21    Use the QuartzCore SPI header.
     22   
     23    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     24   
     25    Source/WebKitLegacy/mac:
     26    Fix a souce of WebKit1 test flakiness
     27    https://bugs.webkit.org/show_bug.cgi?id=205761
     28   
     29    Reviewed by Darin Adler.
     30   
     31    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     32    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     33    time.
     34   
     35    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     36    and flushes a CATransaction.
     37   
     38    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     39    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     40    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     41    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     42    WK2 is doing.
     43   
     44    * WebView/WebView.mm:
     45    (-[WebView _forceRepaintForTesting]):
     46    * WebView/WebViewPrivate.h:
     47   
     48    Tools:
     49    DumpRenderTree doesn't always call updateRendering() when a test completes
     50    https://bugs.webkit.org/show_bug.cgi?id=205761
     51   
     52    Reviewed by Darin Adler.
     53   
     54    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     55    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     56    time.
     57   
     58    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     59    and flushes a CATransaction.
     60   
     61    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     62    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     63    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     64    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     65    WK2 is doing.
     66   
     67    * DumpRenderTree/mac/DumpRenderTree.mm:
     68    (updateDisplay):
     69    * DumpRenderTree/mac/PixelDumpSupportMac.mm:
     70   
     71    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     72
     73    2020-01-05  Simon Fraser  <simon.fraser@apple.com>
     74
     75            Fix a souce of WebKit1 test flakiness
     76            https://bugs.webkit.org/show_bug.cgi?id=205761
     77
     78            Reviewed by Darin Adler.
     79
     80            Some animation tests (and possibly many others) are flakey or broken in WK1 because
     81            there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     82            time.
     83
     84            WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     85            and flushes a CATransaction.
     86
     87            In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     88            and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     89            changes, and WebCore changes that make more things happen with HTML event loop timing, this
     90            approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     91            WK2 is doing.
     92
     93            * WebView/WebView.mm:
     94            (-[WebView _forceRepaintForTesting]):
     95            * WebView/WebViewPrivate.h:
     96
    1972020-01-03  Yusuke Suzuki  <ysuzuki@apple.com>
    298
  • branches/safari-609-branch/Source/WebKitLegacy/mac/WebView/WebView.mm

    r253834 r254581  
    233233#import <pal/spi/cocoa/NSURLDownloadSPI.h>
    234234#import <pal/spi/cocoa/NSURLFileTypeMappingsSPI.h>
     235#import <pal/spi/cocoa/QuartzCoreSPI.h>
    235236#import <pal/spi/mac/NSResponderSPI.h>
    236237#import <pal/spi/mac/NSSpellCheckerSPI.h>
    … …  
    47694770}
    47704771
     4772- (void)_forceRepaintForTesting
     4773{
     4774#if PLATFORM(IOS_FAMILY)
     4775    // Ensure fixed positions layers are where they should be.
     4776    [self _synchronizeCustomFixedPositionLayoutRect];
     4777#endif
     4778
     4779    [self _viewWillDrawInternal];
     4780    [self _flushCompositingChanges];
     4781    [CATransaction flush];
     4782    [CATransaction synchronize];
     4783}
     4784
    47714785- (BOOL)allowsNewCSSAnimationsWhileSuspended
    47724786{
  • branches/safari-609-branch/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h

    r252254 r254581  
    818818// SPI for DumpRenderTree
    819819+ (void)_setLoadResourcesSerially:(BOOL)serialize;
     820- (void)_forceRepaintForTesting;
    820821
    821822/*!
  • branches/safari-609-branch/Tools/ChangeLog

    r254478 r254581  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254042. rdar://problem/58549102
     4
     5    Source/WebCore/PAL:
     6    DumpRenderTree doesn't always call updateRendering() when a test completes
     7    https://bugs.webkit.org/show_bug.cgi?id=205761
     8   
     9    Reviewed by Darin Adler.
     10   
     11    Add -[CATransaction synchronize].
     12   
     13    * pal/spi/cocoa/QuartzCoreSPI.h:
     14   
     15    Source/WebKit:
     16    DumpRenderTree doesn't always call updateRendering() when a test completes
     17    https://bugs.webkit.org/show_bug.cgi?id=205761
     18   
     19    Reviewed by Darin Adler.
     20   
     21    Use the QuartzCore SPI header.
     22   
     23    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     24   
     25    Source/WebKitLegacy/mac:
     26    Fix a souce of WebKit1 test flakiness
     27    https://bugs.webkit.org/show_bug.cgi?id=205761
     28   
     29    Reviewed by Darin Adler.
     30   
     31    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     32    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     33    time.
     34   
     35    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     36    and flushes a CATransaction.
     37   
     38    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     39    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     40    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     41    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     42    WK2 is doing.
     43   
     44    * WebView/WebView.mm:
     45    (-[WebView _forceRepaintForTesting]):
     46    * WebView/WebViewPrivate.h:
     47   
     48    Tools:
     49    DumpRenderTree doesn't always call updateRendering() when a test completes
     50    https://bugs.webkit.org/show_bug.cgi?id=205761
     51   
     52    Reviewed by Darin Adler.
     53   
     54    Some animation tests (and possibly many others) are flakey or broken in WK1 because
     55    there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     56    time.
     57   
     58    WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     59    and flushes a CATransaction.
     60   
     61    In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     62    and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     63    changes, and WebCore changes that make more things happen with HTML event loop timing, this
     64    approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     65    WK2 is doing.
     66   
     67    * DumpRenderTree/mac/DumpRenderTree.mm:
     68    (updateDisplay):
     69    * DumpRenderTree/mac/PixelDumpSupportMac.mm:
     70   
     71    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     72
     73    2020-01-05  Simon Fraser  <simon.fraser@apple.com>
     74
     75            DumpRenderTree doesn't always call updateRendering() when a test completes
     76            https://bugs.webkit.org/show_bug.cgi?id=205761
     77
     78            Reviewed by Darin Adler.
     79
     80            Some animation tests (and possibly many others) are flakey or broken in WK1 because
     81            there was no code to guarantee that Page::updateRendering() was called at notifyDone()
     82            time.
     83
     84            WK2 calls DrawingArea::forceRepaint(), which does updateRendering(), flushes layers,
     85            and flushes a CATransaction.
     86
     87            In WK1, we historically relied in AppKit to call -viewWillDraw on WebView and/or WebHTMLView,
     88            and just called [webView display] to make this happen. However, with layer backing, AppKit behavior
     89            changes, and WebCore changes that make more things happen with HTML event loop timing, this
     90            approach no longer works. The fix is to add WebView SPI, _forceRepaintForTesting, which emulates what
     91            WK2 is doing.
     92
     93            * DumpRenderTree/mac/DumpRenderTree.mm:
     94            (updateDisplay):
     95            * DumpRenderTree/mac/PixelDumpSupportMac.mm:
     96
    1972020-01-13  Alan Coon  <alancoon@apple.com>
    298
  • branches/safari-609-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r253093 r254581  
    9090#import <WebKit/WebResourceLoadDelegate.h>
    9191#import <WebKit/WebStorageManagerPrivate.h>
     92#import <WebKit/WebView.h>
    9293#import <WebKit/WebViewPrivate.h>
    9394#import <getopt.h>
    … …  
    17221723    [webView _flushCompositingChanges];
    17231724#else
     1725    [webView _forceRepaintForTesting];
    17241726    if ([webView _isUsingAcceleratedCompositing])
    17251727        [webView display];
  • branches/safari-609-branch/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm

    r249901 r254581  
    3838#import <QuartzCore/QuartzCore.h>
    3939#import <pal/spi/cg/CoreGraphicsSPI.h>
     40#import <pal/spi/cocoa/QuartzCoreSPI.h>
    4041#import <wtf/Assertions.h>
    4142#import <wtf/RefPtr.h>
    … …  
    4647#import <WebKit/WebKit.h>
    4748#import <WebKit/WebViewPrivate.h>
    48 
    49 @interface CATransaction ()
    50 + (void)synchronize;
    51 @end
    5249
    5350@interface WebView ()
Note: See TracChangeset for help on using the changeset viewer.