Bug 188141 - Shrink GraphicsLayerCA
Summary: Shrink GraphicsLayerCA
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-28 14:49 PDT by Simon Fraser (smfr)
Modified: 2018-07-30 16:09 PDT (History)
6 users (show)

See Also:


Attachments
Patch (80.78 KB, patch)
2018-07-28 14:58 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (82.17 KB, patch)
2018-07-28 18:23 PDT, Simon Fraser (smfr)
zalan: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews206 for win-future (13.13 MB, application/zip)
2018-07-29 02:34 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-07-28 14:49:01 PDT
Shrink GraphicsLayerCA
Comment 1 Simon Fraser (smfr) 2018-07-28 14:58:24 PDT
Created attachment 346000 [details]
Patch
Comment 2 EWS Watchlist 2018-07-28 15:00:38 PDT
Attachment 346000 [details] did not pass style-queue:


ERROR: Source/WebKit/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 12 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2018-07-28 18:23:57 PDT
Created attachment 346006 [details]
Patch
Comment 4 EWS Watchlist 2018-07-28 18:26:34 PDT
Attachment 346006 [details] did not pass style-queue:


ERROR: Source/WebKit/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:9:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKitLegacy/mac/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 12 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 EWS Watchlist 2018-07-29 02:34:32 PDT
Comment on attachment 346006 [details]
Patch

Attachment 346006 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8689257

New failing tests:
http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
http/tests/security/video-poster-cross-origin-crash2.html
Comment 6 EWS Watchlist 2018-07-29 02:34:44 PDT
Created attachment 346025 [details]
Archive of layout-test-results from ews206 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 7 Said Abou-Hallawa 2018-07-30 10:33:19 PDT
Comment on attachment 346006 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=346006&action=review

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:2790
> +    if (!m_animations)
> +        return;

I would suggest also hiding this lazy initialization by an inline function like:

bool isAnimationAvailable() { return m_animations; }

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:2864
> +void GraphicsLayerCA::ensureLayerAnimations()
> +{
> +    if (!m_animations)
> +        m_animations = std::make_unique<LayerAnimations>();
> +}

I would suggest writing this function like this:

LayerAnimations& GraphicsLayerCA::ensureLayerAnimations()
{
    if (!m_animations)
        m_animations = std::make_unique<LayerAnimations>();
    return *m_animations;
}

And replace all the instances of m_animations with ensureLayerAnimations(). This will make it clear that m_animations should not be accessed directly since it can be nullptr. But calling ensureLayerAnimations() is always safe to use.
Comment 8 Simon Fraser (smfr) 2018-07-30 16:08:01 PDT
https://trac.webkit.org/changeset/234393/webkit
Comment 9 Radar WebKit Bug Importer 2018-07-30 16:09:15 PDT
<rdar://problem/42750761>