Bug 188147 - Make CompositeOperator and BlendMode into 8-bit enum classes
Summary: Make CompositeOperator and BlendMode into 8-bit enum classes
Status: RESOLVED DUPLICATE of bug 188325
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:
Depends on: 186751
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-29 08:28 PDT by Simon Fraser (smfr)
Modified: 2018-08-06 11:31 PDT (History)
5 users (show)

See Also:


Attachments
Patch (134.74 KB, patch)
2018-07-29 08:30 PDT, Simon Fraser (smfr)
darin: review+
Details | Formatted Diff | Diff
Patch (134.75 KB, patch)
2018-07-30 09:41 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (136.49 KB, patch)
2018-07-30 09:48 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (136.82 KB, patch)
2018-07-30 10:16 PDT, Simon Fraser (smfr)
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-sierra (2.49 MB, application/zip)
2018-07-30 11:31 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews113 for mac-sierra (3.23 MB, application/zip)
2018-07-30 11:59 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.53 MB, application/zip)
2018-07-30 12:21 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews107 for mac-sierra-wk2 (3.74 MB, application/zip)
2018-07-30 13:28 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.33 MB, application/zip)
2018-07-30 13:58 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (12.99 MB, application/zip)
2018-07-30 14:08 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-29 08:28:50 PDT
Make CompositeOperator and BlendMode into 8-bit enum classes
Comment 1 Simon Fraser (smfr) 2018-07-29 08:30:52 PDT
Created attachment 346029 [details]
Patch
Comment 2 Darin Adler 2018-07-29 12:19:43 PDT
Comment on attachment 346029 [details]
Patch

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

> Source/WebCore/html/HTMLImageElement.cpp:70
> +    , m_compositeOperator(CompositeOperator::SourceOver)

Do this in the header instead?

> Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:202
> +    , globalComposite(CompositeOperator::SourceOver)
> +    , globalBlend(BlendMode::Normal)

Do these in the class definition instead of the constructor?
Comment 3 Simon Fraser (smfr) 2018-07-30 09:41:12 PDT
Created attachment 346063 [details]
Patch
Comment 4 Simon Fraser (smfr) 2018-07-30 09:48:36 PDT
Created attachment 346064 [details]
Patch
Comment 5 Simon Fraser (smfr) 2018-07-30 10:16:59 PDT
Created attachment 346065 [details]
Patch
Comment 6 EWS Watchlist 2018-07-30 11:31:46 PDT
Comment on attachment 346065 [details]
Patch

Attachment 346065 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/8700661

New failing tests:
svg/dom/SVGAnimatedEnumeration-case-sensitive.html
svg/animations/svgenum-animation-11.html
svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop.html
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
Comment 7 EWS Watchlist 2018-07-30 11:31:48 PDT
Created attachment 346077 [details]
Archive of layout-test-results from ews103 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 Simon Fraser (smfr) 2018-07-30 11:55:19 PDT
SVG tests are failing because:
template<typename EnumType>
class SVGAnimatedEnumerationPropertyTearOff final : public SVGAnimatedStaticPropertyTearOff<unsigned> {

fails badly if EnumType is 8-bit; we're casting an 8-bit enum to unsigned and taking a reference
Comment 9 EWS Watchlist 2018-07-30 11:59:40 PDT
Comment on attachment 346065 [details]
Patch

Attachment 346065 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/8700709

New failing tests:
svg/dom/SVGAnimatedEnumeration-case-sensitive.html
svg/animations/svgenum-animation-11.html
svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop.html
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
Comment 10 EWS Watchlist 2018-07-30 11:59:41 PDT
Created attachment 346079 [details]
Archive of layout-test-results from ews113 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 11 EWS Watchlist 2018-07-30 12:21:45 PDT
Comment on attachment 346065 [details]
Patch

Attachment 346065 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/8700818

New failing tests:
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
svg/dom/SVGAnimatedEnumeration-case-sensitive.html
svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop.html
Comment 12 EWS Watchlist 2018-07-30 12:21:47 PDT
Created attachment 346083 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 13 EWS Watchlist 2018-07-30 13:28:20 PDT
Comment on attachment 346065 [details]
Patch

Attachment 346065 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/8702131

New failing tests:
css3/filters/backdrop/add-remove-add-backdrop-filter.html
svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop.html
svg/dom/SVGAnimatedEnumeration-case-sensitive.html
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
svg/animations/svgenum-animation-11.html
Comment 14 EWS Watchlist 2018-07-30 13:28:21 PDT
Created attachment 346094 [details]
Archive of layout-test-results from ews107 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 15 EWS Watchlist 2018-07-30 13:58:20 PDT
Comment on attachment 346065 [details]
Patch

Attachment 346065 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/8702368

New failing tests:
svg/dom/SVGAnimatedEnumeration-case-sensitive.html
svg/animations/svgenum-animation-11.html
svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop.html
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
Comment 16 EWS Watchlist 2018-07-30 13:58:21 PDT
Created attachment 346098 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 17 EWS Watchlist 2018-07-30 14:08:37 PDT
Comment on attachment 346065 [details]
Patch

Attachment 346065 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/8702250

New failing tests:
svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop.html
svg/dom/SVGAnimatedEnumeration-case-sensitive.html
svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
Comment 18 EWS Watchlist 2018-07-30 14:08:39 PDT
Created attachment 346099 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 19 Alex Christensen 2018-08-06 11:31:09 PDT

*** This bug has been marked as a duplicate of bug 188325 ***