Bug 186751 - Remove the SVG elements' attributes macros
Summary: Remove the SVG elements' attributes macros
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
: 187258 (view as bug list)
Depends on: 187258
Blocks: 188147
  Show dependency treegraph
 
Reported: 2018-06-17 18:50 PDT by Said Abou-Hallawa
Modified: 2018-10-09 14:09 PDT (History)
9 users (show)

See Also:


Attachments
Patch (741.92 KB, patch)
2018-06-17 19:14 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.44 MB, application/zip)
2018-06-17 21:05 PDT, EWS Watchlist
no flags Details
Patch (741.35 KB, patch)
2018-06-18 15:53 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.59 MB, application/zip)
2018-06-18 18:26 PDT, EWS Watchlist
no flags Details
Patch (741.29 KB, patch)
2018-06-19 15:39 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.92 MB, application/zip)
2018-06-19 17:35 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.44 MB, application/zip)
2018-06-19 17:43 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews102 for mac-sierra (2.42 MB, application/zip)
2018-06-19 18:15 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews116 for mac-sierra (4.00 MB, application/zip)
2018-06-19 19:49 PDT, EWS Watchlist
no flags Details
Patch (742.59 KB, patch)
2018-06-20 10:14 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.39 MB, application/zip)
2018-06-20 11:26 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews107 for mac-sierra-wk2 (2.99 MB, application/zip)
2018-06-20 11:33 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews117 for mac-sierra (3.14 MB, application/zip)
2018-06-20 11:55 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.47 MB, application/zip)
2018-06-20 12:06 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews206 for win-future (12.87 MB, application/zip)
2018-06-20 21:47 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews204 for win-future (12.87 MB, application/zip)
2018-06-20 23:33 PDT, EWS Watchlist
no flags Details
Patch (755.62 KB, patch)
2018-06-22 08:36 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.81 MB, application/zip)
2018-06-22 10:00 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.40 MB, application/zip)
2018-06-22 10:32 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews100 for mac-sierra (2.29 MB, application/zip)
2018-06-22 10:33 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews113 for mac-sierra (3.12 MB, application/zip)
2018-06-22 10:49 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews202 for win-future (12.94 MB, application/zip)
2018-06-22 20:05 PDT, EWS Watchlist
no flags Details
Patch (756.63 KB, patch)
2018-06-29 17:15 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews112 for mac-sierra (3.20 MB, application/zip)
2018-06-29 19:13 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews200 for win-future (12.87 MB, application/zip)
2018-06-29 23:39 PDT, EWS Watchlist
no flags Details
Patch (700.47 KB, patch)
2018-07-06 21:51 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-sierra (3.15 MB, application/zip)
2018-07-06 23:32 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews201 for win-future (12.78 MB, application/zip)
2018-07-07 07:41 PDT, EWS Watchlist
no flags Details
Patch (700.52 KB, patch)
2018-07-07 18:17 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews200 for win-future (12.84 MB, application/zip)
2018-07-07 20:55 PDT, EWS Watchlist
no flags Details
Patch (697.73 KB, patch)
2018-07-13 15:03 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (696.68 KB, patch)
2018-07-13 15:16 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Introduce SVGAttribute (10.17 KB, patch)
2018-07-30 13:50 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Introduce SVGAttributeAccessor (14.81 KB, patch)
2018-07-30 14:42 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Introduce SVGAttributeRegistry (9.20 KB, patch)
2018-07-30 16:44 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Introduce SVGAttributeOwnerProxy (10.98 KB, patch)
2018-07-30 17:26 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Add TearOff creation methods (17.45 KB, patch)
2018-07-31 10:41 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedLength (3.51 KB, patch)
2018-07-31 10:56 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedLengthList (3.82 KB, patch)
2018-07-31 11:04 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedBoolean (3.78 KB, patch)
2018-07-31 11:28 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedInteger (5.08 KB, patch)
2018-07-31 11:59 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedNumber (5.14 KB, patch)
2018-07-31 12:12 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Add registration methods for SVGZoomAndPan (10.70 KB, patch)
2018-07-31 12:34 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedAngle (2.84 KB, patch)
2018-07-31 12:47 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedEnumeration (4.06 KB, patch)
2018-07-31 12:55 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Add animated type and animated attribute for PathSegList (11.10 KB, patch)
2018-07-31 13:25 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Add a registration method for SVGAnimatedPointList (4.67 KB, patch)
2018-07-31 13:42 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedPreserveAspectRatio (4.06 KB, patch)
2018-07-31 14:32 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedRect (3.62 KB, patch)
2018-07-31 14:33 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedString (3.95 KB, patch)
2018-07-31 14:34 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedTransformList (3.96 KB, patch)
2018-07-31 14:34 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Delete SVG macros for SVGAnimatedNumberList (4.04 KB, patch)
2018-07-31 14:35 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Add a registration method for SVGStringListValues (3.97 KB, patch)
2018-07-31 14:36 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Move AnimatedPropertyType to a separate file. (7.83 KB, patch)
2018-07-31 14:45 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove the reference to SVGPropertyInfo.h from SVGAnimatedProperty.h (17.88 KB, patch)
2018-07-31 15:30 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGLangSpace attributes into SVGAttributeRegistry (7.03 KB, patch)
2018-07-31 15:57 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGElement (12.40 KB, patch)
2018-07-31 16:24 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGTests attributes into SVGAttributeRegistry (12.92 KB, patch)
2018-07-31 16:49 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGGraphicsElement (8.80 KB, patch)
2018-07-31 17:06 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGGeometryElement (6.85 KB, patch)
2018-07-31 17:18 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGExternalResourcesRequired attributes into SVGAttributeRegistry (11.02 KB, patch)
2018-07-31 18:07 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGRectElement (10.78 KB, patch)
2018-07-31 18:22 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGCircleElement (8.64 KB, patch)
2018-07-31 18:29 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGEllipseElement (9.72 KB, patch)
2018-08-01 17:40 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGLineElement (10.38 KB, patch)
2018-08-01 17:40 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGPolyElement (9.87 KB, patch)
2018-08-01 17:41 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGURIReference attributes into SVGAttributeRegistry (5.91 KB, patch)
2018-08-01 17:42 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGAElement (7.00 KB, patch)
2018-08-01 17:43 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGTextContentElement (13.79 KB, patch)
2018-08-01 17:43 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGTextPositioningElement (9.44 KB, patch)
2018-08-01 17:44 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGAltGlyphElement (3.54 KB, patch)
2018-08-01 17:45 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGClipPathElement (7.68 KB, patch)
2018-08-01 17:45 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFilterPrimitiveStandardAttributes (11.06 KB, patch)
2018-08-01 17:46 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEBlendElement (6.33 KB, patch)
2018-08-01 17:46 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEColorMatrixElement (6.78 KB, patch)
2018-08-01 17:47 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEComponentTransferElement (4.88 KB, patch)
2018-08-01 17:47 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFECompositeElement (8.85 KB, patch)
2018-08-01 17:48 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEConvolveMatrixElement (16.93 KB, patch)
2018-08-01 17:48 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEDiffuseLightingElement (8.56 KB, patch)
2018-08-01 17:49 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEDisplacementMapElement (8.40 KB, patch)
2018-08-01 17:51 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEDropShadowElement (8.62 KB, patch)
2018-08-01 17:52 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEGaussianBlurElement (8.32 KB, patch)
2018-08-01 17:53 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEImageElement (6.08 KB, patch)
2018-08-01 17:53 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFELightElement (11.35 KB, patch)
2018-08-01 17:54 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEMergeNodeElement (4.64 KB, patch)
2018-08-01 17:54 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEMorphologyElement (7.46 KB, patch)
2018-08-01 17:55 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFEOffsetElement (6.30 KB, patch)
2018-08-01 17:56 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFESpecularLightingElement (9.58 KB, patch)
2018-08-01 17:56 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFETileElement (4.64 KB, patch)
2018-08-01 17:57 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFETurbulenceElement (10.48 KB, patch)
2018-08-01 17:58 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGCursorElement (8.88 KB, patch)
2018-08-01 17:58 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGDefsElement (3.35 KB, patch)
2018-08-01 17:59 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGGradientElement (9.64 KB, patch)
2018-08-01 17:59 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGLinearGradientElement (8.80 KB, patch)
2018-08-01 18:00 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGRadialGradientElement (10.27 KB, patch)
2018-08-01 18:01 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFontElement (3.26 KB, patch)
2018-08-01 18:01 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGForeignObjectElement (10.09 KB, patch)
2018-08-01 18:02 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGGElement (5.01 KB, patch)
2018-08-01 18:02 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGFilterElement (18.36 KB, patch)
2018-08-03 12:36 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGSwitchElement (3.44 KB, patch)
2018-08-03 12:36 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGFitToViewBox attributes into SVGAttributeRegistry (12.85 KB, patch)
2018-08-03 12:37 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGSymbolElement (4.86 KB, patch)
2018-08-03 12:38 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGComponentTransferFunctionElement (12.71 KB, patch)
2018-08-03 12:38 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGPatternElement (18.59 KB, patch)
2018-08-03 12:39 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGImageElement (13.31 KB, patch)
2018-08-03 12:40 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGGlyphRefElement (3.11 KB, patch)
2018-08-03 12:40 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGMarkerElement (20.31 KB, patch)
2018-08-03 12:41 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGUseElement (13.34 KB, patch)
2018-08-03 12:41 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGZoomAndPan attributes into SVGAttributeRegistry (5.96 KB, patch)
2018-08-03 12:42 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGViewElement (5.01 KB, patch)
2018-08-03 12:42 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGTRefElement (3.81 KB, patch)
2018-08-03 12:43 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGTextPathElement (9.63 KB, patch)
2018-08-03 12:44 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGSVGElement (17.17 KB, patch)
2018-08-03 12:44 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGScriptElement (9.76 KB, patch)
2018-08-03 12:45 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGPathElement (16.86 KB, patch)
2018-08-03 12:45 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGMPathElement (4.17 KB, patch)
2018-08-03 12:46 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGMaskElement (13.51 KB, patch)
2018-08-03 12:46 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove SVG macros from SVGAnimationElement (4.78 KB, patch)
2018-08-03 12:47 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Register SVGViewSpec attributes into SVGAttributeRegistry (15.06 KB, patch)
2018-08-03 12:47 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Remove macro files, fix build and address some of the review comments (112.54 KB, patch)
2018-08-03 12:48 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch for EWS (690.51 KB, patch)
2018-08-03 12:53 PDT, Said Abou-Hallawa
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2 (2.97 MB, application/zip)
2018-08-03 13:49 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews100 for mac-sierra (2.28 MB, application/zip)
2018-08-03 14:02 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.43 MB, application/zip)
2018-08-03 14:29 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews117 for mac-sierra (3.03 MB, application/zip)
2018-08-03 14:52 PDT, EWS Watchlist
no flags Details
Patch for EWS (690.56 KB, patch)
2018-08-03 15:20 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Memory shrinking patch (165.77 KB, patch)
2018-08-05 10:28 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch for EWS (654.43 KB, patch)
2018-08-05 10:41 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch for EWS (697.89 KB, patch)
2018-08-05 21:31 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (711.57 KB, patch)
2018-08-06 11:09 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (711.43 KB, patch)
2018-08-06 12:42 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2018-06-17 18:50:06 PDT
Each SVG element has to define its attributes via a set of macros. These macros, define the class member, the setter, the getter and the tear-off object creator. These set of macros have the following problems:

-- There is no way to debug through these macros.
-- The type of the the attributes' owner is not strongly typed. See the casting in SVGAnimatedPropertyMacros.h.
-- There is no actual inheritance between the C++ classes. For example SVGRectElement and SVGCircle both inherit SVGExternalResourcesRequired but they both have to hold a member named m_externalResourcesRequired.
-- Customizing the synchroniable attributes are awkward. See customizing m_orientType in SVGMarkerElement and m_textLength in SVGTextContentElement.
Comment 1 Said Abou-Hallawa 2018-06-17 19:14:04 PDT
Created attachment 342916 [details]
Patch
Comment 2 EWS Watchlist 2018-06-17 21:05:39 PDT
Comment on attachment 342916 [details]
Patch

Attachment 342916 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/8226505

New failing tests:
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 3 EWS Watchlist 2018-06-17 21:05:40 PDT
Created attachment 342917 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 4 Said Abou-Hallawa 2018-06-18 15:53:49 PDT
Created attachment 342985 [details]
Patch
Comment 5 EWS Watchlist 2018-06-18 18:26:06 PDT
Comment on attachment 342985 [details]
Patch

Attachment 342985 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/8238532

New failing tests:
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 6 EWS Watchlist 2018-06-18 18:26:07 PDT
Created attachment 343001 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 7 Said Abou-Hallawa 2018-06-19 15:39:05 PDT
Created attachment 343114 [details]
Patch
Comment 8 EWS Watchlist 2018-06-19 17:35:45 PDT
Comment on attachment 343114 [details]
Patch

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

New failing tests:
svg/animations/repeating-path-animation.svg
svg/animations/path-animation.svg
svg/custom/marker-changes.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 9 EWS Watchlist 2018-06-19 17:35:47 PDT
Created attachment 343123 [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 10 EWS Watchlist 2018-06-19 17:43:09 PDT
Comment on attachment 343114 [details]
Patch

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

New failing tests:
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 11 EWS Watchlist 2018-06-19 17:43:10 PDT
Created attachment 343124 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 12 EWS Watchlist 2018-06-19 18:15:33 PDT
Comment on attachment 343114 [details]
Patch

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

New failing tests:
svg/custom/marker-changes.svg
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 13 EWS Watchlist 2018-06-19 18:15:34 PDT
Created attachment 343127 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 14 EWS Watchlist 2018-06-19 19:49:36 PDT
Comment on attachment 343114 [details]
Patch

Attachment 343114 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/8258917

New failing tests:
svg/animations/repeating-path-animation.svg
svg/animations/path-animation.svg
svg/custom/marker-changes.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 15 EWS Watchlist 2018-06-19 19:49:37 PDT
Created attachment 343129 [details]
Archive of layout-test-results from ews116 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 16 Said Abou-Hallawa 2018-06-20 10:14:14 PDT
Created attachment 343162 [details]
Patch
Comment 17 EWS Watchlist 2018-06-20 11:26:45 PDT
Comment on attachment 343162 [details]
Patch

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

New failing tests:
svg/animations/repeating-path-animation.svg
svg/animations/path-animation.svg
svg/custom/marker-changes.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 18 EWS Watchlist 2018-06-20 11:26:46 PDT
Created attachment 343167 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 19 EWS Watchlist 2018-06-20 11:33:55 PDT
Comment on attachment 343162 [details]
Patch

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

New failing tests:
svg/custom/marker-changes.svg
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 20 EWS Watchlist 2018-06-20 11:33:56 PDT
Created attachment 343169 [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 21 EWS Watchlist 2018-06-20 11:54:58 PDT
Comment on attachment 343162 [details]
Patch

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

New failing tests:
svg/custom/marker-changes.svg
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 22 EWS Watchlist 2018-06-20 11:55:00 PDT
Created attachment 343171 [details]
Archive of layout-test-results from ews117 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 23 EWS Watchlist 2018-06-20 12:06:53 PDT
Comment on attachment 343162 [details]
Patch

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

New failing tests:
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 24 EWS Watchlist 2018-06-20 12:06:55 PDT
Created attachment 343174 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 25 EWS Watchlist 2018-06-20 21:47:15 PDT
Comment on attachment 343162 [details]
Patch

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

New failing tests:
svg/animations/repeating-path-animation.svg
svg/animations/path-animation.svg
svg/custom/marker-changes.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 26 EWS Watchlist 2018-06-20 21:47:26 PDT
Created attachment 343213 [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 27 EWS Watchlist 2018-06-20 23:33:16 PDT
Comment on attachment 343162 [details]
Patch

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

New failing tests:
svg/custom/marker-changes.svg
svg/animations/path-animation.svg
svg/animations/repeating-path-animation.svg
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 28 EWS Watchlist 2018-06-20 23:33:28 PDT
Created attachment 343217 [details]
Archive of layout-test-results from ews204 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews204  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 29 Radar WebKit Bug Importer 2018-06-21 10:21:50 PDT
<rdar://problem/41333951>
Comment 30 Said Abou-Hallawa 2018-06-22 08:36:56 PDT
Created attachment 343327 [details]
Patch
Comment 31 EWS Watchlist 2018-06-22 10:00:13 PDT
Comment on attachment 343327 [details]
Patch

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 32 EWS Watchlist 2018-06-22 10:00:15 PDT
Created attachment 343335 [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 33 EWS Watchlist 2018-06-22 10:32:37 PDT
Comment on attachment 343327 [details]
Patch

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 34 EWS Watchlist 2018-06-22 10:32:39 PDT
Created attachment 343338 [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 35 EWS Watchlist 2018-06-22 10:33:05 PDT
Comment on attachment 343327 [details]
Patch

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 36 EWS Watchlist 2018-06-22 10:33:07 PDT
Created attachment 343339 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 37 EWS Watchlist 2018-06-22 10:49:02 PDT
Comment on attachment 343327 [details]
Patch

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

New failing tests:
inspector/model/remote-object-dom.html
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 38 EWS Watchlist 2018-06-22 10:49:04 PDT
Created attachment 343343 [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 39 EWS Watchlist 2018-06-22 20:05:35 PDT
Comment on attachment 343327 [details]
Patch

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

New failing tests:
svg/dom/SVGViewSpec.html
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 40 EWS Watchlist 2018-06-22 20:05:47 PDT
Created attachment 343415 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 41 Said Abou-Hallawa 2018-06-29 17:15:51 PDT
Created attachment 343979 [details]
Patch
Comment 42 EWS Watchlist 2018-06-29 19:13:45 PDT
Comment on attachment 343979 [details]
Patch

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

New failing tests:
inspector/model/remote-object-dom.html
Comment 43 EWS Watchlist 2018-06-29 19:13:47 PDT
Created attachment 343989 [details]
Archive of layout-test-results from ews112 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 44 EWS Watchlist 2018-06-29 23:39:03 PDT
Comment on attachment 343979 [details]
Patch

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

New failing tests:
http/tests/security/local-video-source-from-remote.html
Comment 45 EWS Watchlist 2018-06-29 23:39:15 PDT
Created attachment 344002 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 46 Said Abou-Hallawa 2018-07-06 21:51:04 PDT
Created attachment 344513 [details]
Patch
Comment 47 EWS Watchlist 2018-07-06 23:32:31 PDT
Comment on attachment 344513 [details]
Patch

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

New failing tests:
inspector/model/remote-object-dom.html
Comment 48 EWS Watchlist 2018-07-06 23:32:33 PDT
Created attachment 344516 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 49 EWS Watchlist 2018-07-07 07:41:38 PDT
Comment on attachment 344513 [details]
Patch

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

New failing tests:
svg/dom/SVGViewSpec.html
Comment 50 EWS Watchlist 2018-07-07 07:41:49 PDT
Created attachment 344523 [details]
Archive of layout-test-results from ews201 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews201  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 51 Said Abou-Hallawa 2018-07-07 18:17:03 PDT
Created attachment 344534 [details]
Patch
Comment 52 EWS Watchlist 2018-07-07 20:55:46 PDT
Comment on attachment 344534 [details]
Patch

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

New failing tests:
svg/dom/SVGViewSpec.html
Comment 53 EWS Watchlist 2018-07-07 20:55:58 PDT
Created attachment 344536 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 54 Said Abou-Hallawa 2018-07-13 15:03:07 PDT
Created attachment 344988 [details]
Patch
Comment 55 Said Abou-Hallawa 2018-07-13 15:16:43 PDT
Created attachment 344990 [details]
Patch
Comment 56 Dirk Schulze 2018-07-14 07:45:32 PDT
Though I understand and share the concern, the macros made it easier to manage attributes in general. Especially with regards to deprecatiom of animated attributes and re-linking them to base values, the macros would make it easier to archive that. Again, just something to consider.
Comment 57 Said Abou-Hallawa 2018-07-16 10:45:02 PDT
(In reply to Dirk Schulze from comment #56)
> Though I understand and share the concern, the macros made it easier to
> manage attributes in general. Especially with regards to deprecatiom of
> animated attributes and re-linking them to base values, the macros would
> make it easier to archive that. Again, just something to consider.

Thanks for the advice. But here is why I consider macros a bad design for the SVG attributes:

1. I agree macros make significant change, like the deprecation of animated attributes, would be easier. But you can get stuck easily with very simple implementation detail and you have to do an ugly work around. An example of that is the inheritance of the SVG attributes. With the current implementation, the attributes of non SVGElement-based objects, like SVGURIReference, SVGExternalResourcesRequired and SVGFitToViewBox, have to be repeated in all the derived classes. Simialrly you have to repeat the same handling for changing these attributes in the svgAttributeChanged() method of all the derived classes.

In fact, these base objects do not own any data. You see the ugliness of the macros implementation in functions like SVGFitToViewBox::parseAttribute().

2. You can't debug in the macros easily. For example you can't step into or set a break point in any of the functions that the macros generate for each attribute.

3. SVG macros are hard to customize. Changing, even for experimenting, the behavior for a single attribute is challenging. You can see how it is difficult if you look at the customization of the 'orientType' attribute of the SVGMarkerElement and the 'textLength' attribute of the SVGTextContentElement.

4. The macros violates the object oriented encapsulation principal by adding the implementation of the attributes' methods to the owner class. For example, the SVGRectElement has the the following methods which are related to the 'x' attribute:

    SVGLength& x()  const;
    SVGLength& xBaseValue() const;
    SVGLength& setXBaseValue() const;
    Ref<SVGAnimatedLength> xAnimated() const;
    bool xIsValid() const;
    void synchronizeX() const;
    static Ref<SVGAnimatedProperty> lookupOrCreateXWrapper(SVGElement);
    static void synchronizeX(SVGElement);

By the way these functions are not searchable since they do not exist in the code. If you receive a crash trace in any of these functions you have to find the caller instead.

5. The design of the optional attribute or the MULTIPLE_WRAPPERS is a little bit confusing. It is hard to grasp how the two data members are linked to the same attribute. You can see the connection between them only when you realize that SVGAttributeToPropertyMap maps from QualifiedName to a Vector<const SVGPropertyInfo*>. Then you see that elements like SVGFEGaussianBlurElement adds the two members stdDeviationX and  stdDeviationY to the SVGAttributeToPropertyMap under the same name: SVGName::stdDeviationAttr. This adds the two members into a single entry in SVGAttributeToPropertyMap. The confusion is: why we use a Vector for the value of the HasMap in SVGAttributeToPropertyMap although we only have an element or two at maximum in this Vector?

6. The SVG TearOff objects have been a source of many security crashes. I think the biggest part of this problem is we do not understand the state of the code clearly. The TearOff objects keep raw pointers to the properties data of the SVG attributes. But the TearOff objects use all kinds of pointers: raw, WeakPtr and RefPtr to ensure the owner SVGElement is alive when accessing the data. I believe that the difficulty of knowing the state of the code starts from these macros. And to fix these security issues and heave a clean implementation of the SVG attributes we have to get rid of these macros.
Comment 58 Ryosuke Niwa 2018-07-16 19:54:39 PDT
If there is a concern about the code duplication, maintenance, etc... we should be generating all that code as CPP files as we do elsewhere instead of using macros. These macros makes it impossible to debug SVG code.
Comment 59 Dirk Schulze 2018-07-17 08:36:53 PDT
I am not arguing for or against macros in general. The question is just the order of the work. If WebKit should deprecate and replace animated properties as specified by SVG 2, then this work might make sense to prioritize. If there aren’t plans like that then doing your work first is fine.
Comment 60 Said Abou-Hallawa 2018-07-30 13:50:54 PDT
Created attachment 346097 [details]
Introduce SVGAttribute
Comment 61 Said Abou-Hallawa 2018-07-30 14:42:27 PDT
Created attachment 346103 [details]
Introduce SVGAttributeAccessor
Comment 62 Simon Fraser (smfr) 2018-07-30 15:20:33 PDT
Comment on attachment 346103 [details]
Introduce SVGAttributeAccessor

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

> Source/WebCore/svg/properties/SVGAttributeAccessor.h:53
> +    virtual ~SVGAttributeAccessor() = default;

I prefer to see this after the constructor.

> Source/WebCore/svg/properties/SVGAttributeAccessor.h:61
> +    const QualifiedName& m_attributeName;

sizeof(QualifiedName) == sizeof(void*) so maybe you should just store it by value.
Comment 63 Said Abou-Hallawa 2018-07-30 16:42:55 PDT
*** Bug 187258 has been marked as a duplicate of this bug. ***
Comment 64 Said Abou-Hallawa 2018-07-30 16:44:05 PDT
Created attachment 346124 [details]
Introduce SVGAttributeRegistry
Comment 65 Said Abou-Hallawa 2018-07-30 17:26:58 PDT
Created attachment 346129 [details]
Introduce SVGAttributeOwnerProxy
Comment 66 Simon Fraser (smfr) 2018-07-30 17:41:34 PDT
Comment on attachment 346124 [details]
Introduce SVGAttributeRegistry

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

> Source/WebCore/ChangeLog:9
> +        attributes of a given owner. It takes into account the inheritance of the

By "owner" I think you mean a given attribute identified by a name/type pair? It's not that every instance of an attribute has a unique registry entry, but this is static data that is one per attribute class?

> Source/WebCore/svg/properties/SVGAttributeRegistry.h:48
> +        auto it = std::find_if(m_map.begin(), m_map.end(), [&attributeName](const auto& entry) -> bool {
> +            return entry.key.matches(attributeName);
> +        });
> +        return it != m_map.end();

Why isn't this just m_map.contains()? Seems like you're doing manual hash key iteration here?

> Source/WebCore/svg/properties/SVGAttributeRegistry.h:62
> +        for (auto* attributeAccessor : m_map.values())
> +            attributeAccessor->synchronizeProperty(owner, element);
> +            synchronizeAttributesBaseTypes(owner, element);

The indentation is off here.

> Source/WebCore/svg/properties/SVGAttributeRegistry.h:84
> +    template<size_t I = 0>
> +    static typename std::enable_if<I == sizeof...(BaseTypes), Vector<AnimatedPropertyType>>::type animatedTypesBaseTypes(const QualifiedName&) { return { }; }
> +
> +    template<size_t I = 0>
> +    static typename std::enable_if<I < sizeof...(BaseTypes), Vector<AnimatedPropertyType>>::type animatedTypesBaseTypes(const QualifiedName& attributeName)

I think this template magic deserves some comments to explain how it works.
Comment 67 Said Abou-Hallawa 2018-07-31 09:46:14 PDT
Comment on attachment 346124 [details]
Introduce SVGAttributeRegistry

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

>> Source/WebCore/ChangeLog:9
>> +        attributes of a given owner. It takes into account the inheritance of the
> 
> By "owner" I think you mean a given attribute identified by a name/type pair? It's not that every instance of an attribute has a unique registry entry, but this is static data that is one per attribute class?

Yes this is correct. The attribute is registered only once with owner/element pair types. To access the value of an attribute you need to provide owner/element pair instance. The owner/element pair instance will be provided to the attribute when creating it as SVGAttributeOwnerProxy.

>> Source/WebCore/svg/properties/SVGAttributeRegistry.h:48
>> +        return it != m_map.end();
> 
> Why isn't this just m_map.contains()? Seems like you're doing manual hash key iteration here?

No. We can't use m_map.contains.

We have to compare the attribute names using QualifiedName::matches() since matches() takes the namespace into account while operator==() does not. Please have a look at:

bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName)
bool SVGLangSpace::isKnownAttribute(const QualifiedName& attrName)
Comment 68 Said Abou-Hallawa 2018-07-31 10:41:45 PDT
Created attachment 346177 [details]
Add TearOff creation methods
Comment 69 Said Abou-Hallawa 2018-07-31 10:56:47 PDT
Created attachment 346179 [details]
Delete SVG macros for SVGAnimatedLength
Comment 70 Said Abou-Hallawa 2018-07-31 11:04:50 PDT
Created attachment 346180 [details]
Delete SVG macros for SVGAnimatedLengthList
Comment 71 Said Abou-Hallawa 2018-07-31 11:28:47 PDT
Created attachment 346182 [details]
Delete SVG macros for SVGAnimatedBoolean
Comment 72 Said Abou-Hallawa 2018-07-31 11:59:29 PDT
Created attachment 346185 [details]
Delete SVG macros for SVGAnimatedInteger
Comment 73 Said Abou-Hallawa 2018-07-31 12:12:32 PDT
Created attachment 346188 [details]
Delete SVG macros for SVGAnimatedNumber
Comment 74 Said Abou-Hallawa 2018-07-31 12:34:24 PDT
Created attachment 346190 [details]
Add registration methods for SVGZoomAndPan
Comment 75 Said Abou-Hallawa 2018-07-31 12:47:41 PDT
Created attachment 346192 [details]
Delete SVG macros for SVGAnimatedAngle
Comment 76 Said Abou-Hallawa 2018-07-31 12:55:37 PDT
Created attachment 346193 [details]
Delete SVG macros for SVGAnimatedEnumeration
Comment 77 Said Abou-Hallawa 2018-07-31 13:25:53 PDT
Created attachment 346197 [details]
Add animated type and animated attribute for PathSegList
Comment 78 Said Abou-Hallawa 2018-07-31 13:42:28 PDT
Created attachment 346199 [details]
Add a registration method for SVGAnimatedPointList
Comment 79 Said Abou-Hallawa 2018-07-31 14:32:44 PDT
Created attachment 346201 [details]
Delete SVG macros for SVGAnimatedPreserveAspectRatio
Comment 80 Said Abou-Hallawa 2018-07-31 14:33:30 PDT
Created attachment 346202 [details]
Delete SVG macros for SVGAnimatedRect
Comment 81 Said Abou-Hallawa 2018-07-31 14:34:11 PDT
Created attachment 346203 [details]
Delete SVG macros for SVGAnimatedString
Comment 82 Said Abou-Hallawa 2018-07-31 14:34:48 PDT
Created attachment 346204 [details]
Delete SVG macros for SVGAnimatedTransformList
Comment 83 Said Abou-Hallawa 2018-07-31 14:35:58 PDT
Created attachment 346205 [details]
Delete SVG macros for SVGAnimatedNumberList
Comment 84 Said Abou-Hallawa 2018-07-31 14:36:50 PDT
Created attachment 346206 [details]
Add a registration method for SVGStringListValues
Comment 85 Said Abou-Hallawa 2018-07-31 14:45:11 PDT
Created attachment 346207 [details]
Move AnimatedPropertyType to a separate file.
Comment 86 Said Abou-Hallawa 2018-07-31 15:04:41 PDT
Comment on attachment 346207 [details]
Move AnimatedPropertyType to a separate file.

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

> Source/WebCore/ChangeLog:12
> +        * svg/properties/:SVGAnimatedPropertyType.h: Added.

The file name should be SVGAnimatedPropertyType.h.
Comment 87 Said Abou-Hallawa 2018-07-31 15:30:04 PDT
Created attachment 346211 [details]
Remove the reference to SVGPropertyInfo.h from SVGAnimatedProperty.h
Comment 88 Said Abou-Hallawa 2018-07-31 15:57:33 PDT
Created attachment 346212 [details]
Register SVGLangSpace attributes into SVGAttributeRegistry
Comment 89 EWS Watchlist 2018-07-31 15:58:56 PDT
Attachment 346212 [details] did not pass style-queue:


ERROR: Source/WebCore/svg/SVGLangSpace.cpp:25:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/svg/SVGLangSpace.cpp:26:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 90 Said Abou-Hallawa 2018-07-31 16:24:29 PDT
Created attachment 346217 [details]
Remove SVG macros from SVGElement
Comment 91 Said Abou-Hallawa 2018-07-31 16:49:20 PDT
Created attachment 346224 [details]
Register SVGTests attributes into SVGAttributeRegistry
Comment 92 Said Abou-Hallawa 2018-07-31 17:06:53 PDT
Created attachment 346230 [details]
Remove SVG macros from SVGGraphicsElement
Comment 93 Said Abou-Hallawa 2018-07-31 17:18:31 PDT
Created attachment 346233 [details]
Remove SVG macros from SVGGeometryElement
Comment 94 Simon Fraser (smfr) 2018-07-31 17:26:14 PDT
Comment on attachment 346177 [details]
Add TearOff creation methods

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

> Source/WebCore/svg/properties/SVGAttributeRegistry.h:103
> +    // It is a template function with parameter 'I' whose default value = 0. So you can call it without any parameter from animatedTypes().

"This is..."
Comment 95 Jon Lee 2018-07-31 17:32:21 PDT
Comment on attachment 346124 [details]
Introduce SVGAttributeRegistry

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

>>> Source/WebCore/svg/properties/SVGAttributeRegistry.h:48
>>> +        return it != m_map.end();
>> 
>> Why isn't this just m_map.contains()? Seems like you're doing manual hash key iteration here?
> 
> No. We can't use m_map.contains.
> 
> We have to compare the attribute names using QualifiedName::matches() since matches() takes the namespace into account while operator==() does not. Please have a look at:
> 
> bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName)
> bool SVGLangSpace::isKnownAttribute(const QualifiedName& attrName)

This might be worth adding a comment, then, if there is a risk some time later someone decides to "optimize" this code.
Comment 96 Simon Fraser (smfr) 2018-07-31 17:32:42 PDT
Comment on attachment 346190 [details]
Add registration methods for SVGZoomAndPan

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

> Source/WebCore/svg/SVGZoomAndPanType.h:33
> +enum SVGZoomAndPanType {

Later this should be enum class : uint8_t
Comment 97 Simon Fraser (smfr) 2018-07-31 17:34:26 PDT
Comment on attachment 346193 [details]
Delete SVG macros for SVGAnimatedEnumeration

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

> Source/WebCore/svg/SVGAnimatedEnumeration.h:31
> +using SVGAnimatedEnumeration = SVGAnimatedStaticPropertyTearOff<unsigned>;

Will this still cause problems with 8-bit enum classes? Do we eventually need to provide tear-off types for each unique enum class?
Comment 98 Simon Fraser (smfr) 2018-07-31 17:36:10 PDT
Comment on attachment 346197 [details]
Add animated type and animated attribute for PathSegList

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

> Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp:51
> +    // This is an expensive operation and only done, if someone actually observes the animatedPathSegList() while an animation is running.

"and only done if" (no comma)
Makes me wonder why this isn't done everywhere.
Comment 99 Simon Fraser (smfr) 2018-07-31 17:39:50 PDT
Comment on attachment 346207 [details]
Move AnimatedPropertyType to a separate file.

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

> Source/WebCore/svg/properties/:SVGAnimatedPropertyType.h:30
> +enum AnimatedPropertyState {

Enum class (eventually)

> Source/WebCore/svg/properties/:SVGAnimatedPropertyType.h:35
> +enum AnimatedPropertyType {

Enum class (eventually)
Comment 100 Simon Fraser (smfr) 2018-07-31 17:41:21 PDT
Comment on attachment 346211 [details]
Remove the reference to SVGPropertyInfo.h from SVGAnimatedProperty.h

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

> Source/WebCore/svg/properties/SVGAnimatedProperty.h:81
> +        static NeverDestroyed<Cache> s_cache;

We don't tend to use the s_ naming convention now.
Comment 101 Simon Fraser (smfr) 2018-07-31 17:43:30 PDT
Comment on attachment 346212 [details]
Register SVGLangSpace attributes into SVGAttributeRegistry

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

> Source/WebCore/svg/SVGLangSpace.cpp:71
> +    if (auto* renderer = downcast<RenderSVGShape>(m_contextElement.renderer())) {

Weird, why is RenderSVGShape stuff here?

> Source/WebCore/svg/SVGLangSpace.h:45
> +    static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }

I hate that auto. I've no idea what the return type is.
Comment 102 Simon Fraser (smfr) 2018-07-31 17:45:34 PDT
Comment on attachment 346217 [details]
Remove SVG macros from SVGElement

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

> Source/WebCore/svg/SVGElement.h:152
> +    const auto& className() const { return m_className.currentValue(); }
> +    auto classNameAnimated() { return m_className.animatedProperty(); }

Those autos are bad too. Are they Strings, AtomicStrings, StringViews, StringImpls?
Comment 103 Said Abou-Hallawa 2018-07-31 18:07:59 PDT
Created attachment 346241 [details]
Register SVGExternalResourcesRequired attributes into SVGAttributeRegistry
Comment 104 Said Abou-Hallawa 2018-07-31 18:22:01 PDT
Created attachment 346244 [details]
Remove SVG macros from SVGRectElement
Comment 105 Said Abou-Hallawa 2018-07-31 18:29:50 PDT
Created attachment 346245 [details]
Remove SVG macros from SVGCircleElement
Comment 106 Simon Fraser (smfr) 2018-07-31 18:36:53 PDT
Comment on attachment 346241 [details]
Register SVGExternalResourcesRequired attributes into SVGAttributeRegistry

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

> Source/WebCore/svg/SVGExternalResourcesRequired.cpp:30
> +SVGExternalResourcesRequired::SVGExternalResourcesRequired(SVGElement* contextElement)

Can contextElement be a reference?

> Source/WebCore/svg/SVGExternalResourcesRequired.cpp:69
> +    if (renderer && is<RenderSVGShape>(renderer)) {

Again more RenderSVGShape specialness. Why?
Comment 107 Simon Fraser (smfr) 2018-07-31 18:38:21 PDT
Comment on attachment 346244 [details]
Remove SVG macros from SVGRectElement

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

> Source/WebCore/svg/SVGRectElement.h:74
> +    AttributeOwnerProxy m_attributeOwnerProxy { *this };
> +    SVGAnimatedLengthAttribute m_x { m_attributeOwnerProxy, LengthModeWidth };
> +    SVGAnimatedLengthAttribute m_y { m_attributeOwnerProxy, LengthModeHeight };
> +    SVGAnimatedLengthAttribute m_width { m_attributeOwnerProxy, LengthModeWidth };
> +    SVGAnimatedLengthAttribute m_height { m_attributeOwnerProxy, LengthModeHeight };
> +    SVGAnimatedLengthAttribute m_rx { m_attributeOwnerProxy, LengthModeWidth };
> +    SVGAnimatedLengthAttribute m_ry { m_attributeOwnerProxy, LengthModeHeight};

How does the size of SVGRectElement change (use dump-class-layout to tell).
Comment 108 Said Abou-Hallawa 2018-08-01 17:40:22 PDT
Created attachment 346315 [details]
Remove SVG macros from SVGEllipseElement
Comment 109 Said Abou-Hallawa 2018-08-01 17:40:58 PDT
Created attachment 346316 [details]
Remove SVG macros from SVGLineElement
Comment 110 Said Abou-Hallawa 2018-08-01 17:41:29 PDT
Created attachment 346317 [details]
Remove SVG macros from SVGPolyElement
Comment 111 Said Abou-Hallawa 2018-08-01 17:42:19 PDT
Created attachment 346318 [details]
Register SVGURIReference attributes into SVGAttributeRegistry
Comment 112 Said Abou-Hallawa 2018-08-01 17:43:17 PDT
Created attachment 346319 [details]
Remove SVG macros from SVGAElement
Comment 113 Said Abou-Hallawa 2018-08-01 17:43:56 PDT
Created attachment 346320 [details]
Remove SVG macros from SVGTextContentElement
Comment 114 Said Abou-Hallawa 2018-08-01 17:44:25 PDT
Created attachment 346322 [details]
Remove SVG macros from SVGTextPositioningElement
Comment 115 Said Abou-Hallawa 2018-08-01 17:45:10 PDT
Created attachment 346323 [details]
Remove SVG macros from SVGAltGlyphElement
Comment 116 Said Abou-Hallawa 2018-08-01 17:45:41 PDT
Created attachment 346324 [details]
Remove SVG macros from SVGClipPathElement
Comment 117 Said Abou-Hallawa 2018-08-01 17:46:10 PDT
Created attachment 346325 [details]
Remove SVG macros from SVGFilterPrimitiveStandardAttributes
Comment 118 Said Abou-Hallawa 2018-08-01 17:46:44 PDT
Created attachment 346326 [details]
Remove SVG macros from SVGFEBlendElement
Comment 119 Said Abou-Hallawa 2018-08-01 17:47:13 PDT
Created attachment 346327 [details]
Remove SVG macros from SVGFEColorMatrixElement
Comment 120 Said Abou-Hallawa 2018-08-01 17:47:47 PDT
Created attachment 346328 [details]
Remove SVG macros from SVGFEComponentTransferElement
Comment 121 Said Abou-Hallawa 2018-08-01 17:48:25 PDT
Created attachment 346329 [details]
Remove SVG macros from SVGFECompositeElement
Comment 122 Said Abou-Hallawa 2018-08-01 17:48:55 PDT
Created attachment 346330 [details]
Remove SVG macros from SVGFEConvolveMatrixElement
Comment 123 Said Abou-Hallawa 2018-08-01 17:49:33 PDT
Created attachment 346331 [details]
Remove SVG macros from SVGFEDiffuseLightingElement
Comment 124 Said Abou-Hallawa 2018-08-01 17:51:54 PDT
Created attachment 346332 [details]
Remove SVG macros from SVGFEDisplacementMapElement
Comment 125 Said Abou-Hallawa 2018-08-01 17:52:26 PDT
Created attachment 346333 [details]
Remove SVG macros from SVGFEDropShadowElement
Comment 126 Said Abou-Hallawa 2018-08-01 17:53:20 PDT
Created attachment 346334 [details]
Remove SVG macros from SVGFEGaussianBlurElement
Comment 127 Said Abou-Hallawa 2018-08-01 17:53:49 PDT
Created attachment 346335 [details]
Remove SVG macros from SVGFEImageElement
Comment 128 Said Abou-Hallawa 2018-08-01 17:54:17 PDT
Created attachment 346336 [details]
Remove SVG macros from SVGFELightElement
Comment 129 Said Abou-Hallawa 2018-08-01 17:54:49 PDT
Created attachment 346337 [details]
Remove SVG macros from SVGFEMergeNodeElement
Comment 130 Said Abou-Hallawa 2018-08-01 17:55:36 PDT
Created attachment 346338 [details]
Remove SVG macros from SVGFEMorphologyElement
Comment 131 Said Abou-Hallawa 2018-08-01 17:56:18 PDT
Created attachment 346339 [details]
Remove SVG macros from SVGFEOffsetElement
Comment 132 Said Abou-Hallawa 2018-08-01 17:56:56 PDT
Created attachment 346340 [details]
Remove SVG macros from SVGFESpecularLightingElement
Comment 133 Said Abou-Hallawa 2018-08-01 17:57:29 PDT
Created attachment 346341 [details]
Remove SVG macros from SVGFETileElement
Comment 134 Said Abou-Hallawa 2018-08-01 17:58:06 PDT
Created attachment 346342 [details]
Remove SVG macros from SVGFETurbulenceElement
Comment 135 Said Abou-Hallawa 2018-08-01 17:58:36 PDT
Created attachment 346343 [details]
Remove SVG macros from SVGCursorElement
Comment 136 Said Abou-Hallawa 2018-08-01 17:59:06 PDT
Created attachment 346344 [details]
Remove SVG macros from SVGDefsElement
Comment 137 Said Abou-Hallawa 2018-08-01 17:59:34 PDT
Created attachment 346345 [details]
Remove SVG macros from SVGGradientElement
Comment 138 Said Abou-Hallawa 2018-08-01 18:00:06 PDT
Created attachment 346346 [details]
Remove SVG macros from SVGLinearGradientElement
Comment 139 Said Abou-Hallawa 2018-08-01 18:01:01 PDT
Created attachment 346347 [details]
Remove SVG macros from SVGRadialGradientElement
Comment 140 Said Abou-Hallawa 2018-08-01 18:01:37 PDT
Created attachment 346348 [details]
Remove SVG macros from SVGFontElement
Comment 141 Said Abou-Hallawa 2018-08-01 18:02:07 PDT
Created attachment 346349 [details]
Remove SVG macros from SVGForeignObjectElement
Comment 142 Said Abou-Hallawa 2018-08-01 18:02:41 PDT
Created attachment 346350 [details]
Remove SVG macros from SVGGElement
Comment 143 EWS Watchlist 2018-08-01 18:14:15 PDT
Attachment 346336 [details] did not pass style-queue:


ERROR: Source/WebCore/svg/SVGFELightElement.cpp:132:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 144 Simon Fraser (smfr) 2018-08-01 18:29:38 PDT
I can't do it. rs=me for all the mechanical changes.
Comment 145 Said Abou-Hallawa 2018-08-03 12:36:20 PDT
Created attachment 346518 [details]
Remove SVG macros from SVGFilterElement
Comment 146 Said Abou-Hallawa 2018-08-03 12:36:58 PDT
Created attachment 346519 [details]
Remove SVG macros from SVGSwitchElement
Comment 147 Said Abou-Hallawa 2018-08-03 12:37:37 PDT
Created attachment 346520 [details]
Register SVGFitToViewBox attributes into SVGAttributeRegistry
Comment 148 Said Abou-Hallawa 2018-08-03 12:38:08 PDT
Created attachment 346521 [details]
Remove SVG macros from SVGSymbolElement
Comment 149 Said Abou-Hallawa 2018-08-03 12:38:52 PDT
Created attachment 346522 [details]
Remove SVG macros from SVGComponentTransferFunctionElement
Comment 150 Said Abou-Hallawa 2018-08-03 12:39:25 PDT
Created attachment 346524 [details]
Remove SVG macros from SVGPatternElement
Comment 151 Said Abou-Hallawa 2018-08-03 12:40:01 PDT
Created attachment 346525 [details]
Remove SVG macros from SVGImageElement
Comment 152 Said Abou-Hallawa 2018-08-03 12:40:29 PDT
Created attachment 346526 [details]
Remove SVG macros from SVGGlyphRefElement
Comment 153 Said Abou-Hallawa 2018-08-03 12:41:17 PDT
Created attachment 346527 [details]
Remove SVG macros from SVGMarkerElement
Comment 154 Said Abou-Hallawa 2018-08-03 12:41:52 PDT
Created attachment 346528 [details]
Remove SVG macros from SVGUseElement
Comment 155 Said Abou-Hallawa 2018-08-03 12:42:18 PDT
Created attachment 346529 [details]
Register SVGZoomAndPan attributes into SVGAttributeRegistry
Comment 156 Said Abou-Hallawa 2018-08-03 12:42:48 PDT
Created attachment 346530 [details]
Remove SVG macros from SVGViewElement
Comment 157 Said Abou-Hallawa 2018-08-03 12:43:55 PDT
Created attachment 346531 [details]
Remove SVG macros from SVGTRefElement
Comment 158 Said Abou-Hallawa 2018-08-03 12:44:27 PDT
Created attachment 346532 [details]
Remove SVG macros from SVGTextPathElement
Comment 159 Said Abou-Hallawa 2018-08-03 12:44:54 PDT
Created attachment 346533 [details]
Remove SVG macros from SVGSVGElement
Comment 160 Said Abou-Hallawa 2018-08-03 12:45:19 PDT
Created attachment 346534 [details]
Remove SVG macros from SVGScriptElement
Comment 161 Said Abou-Hallawa 2018-08-03 12:45:49 PDT
Created attachment 346535 [details]
Remove SVG macros from SVGPathElement
Comment 162 Said Abou-Hallawa 2018-08-03 12:46:16 PDT
Created attachment 346536 [details]
Remove SVG macros from SVGMPathElement
Comment 163 Said Abou-Hallawa 2018-08-03 12:46:44 PDT
Created attachment 346537 [details]
Remove SVG macros from SVGMaskElement
Comment 164 Said Abou-Hallawa 2018-08-03 12:47:18 PDT
Created attachment 346538 [details]
Remove SVG macros from SVGAnimationElement
Comment 165 Said Abou-Hallawa 2018-08-03 12:47:47 PDT
Created attachment 346539 [details]
Register SVGViewSpec attributes into SVGAttributeRegistry
Comment 166 Said Abou-Hallawa 2018-08-03 12:48:45 PDT
Created attachment 346540 [details]
Remove macro files, fix build and address some of the review comments
Comment 167 Said Abou-Hallawa 2018-08-03 12:53:38 PDT
Created attachment 346541 [details]
Patch for EWS
Comment 168 EWS Watchlist 2018-08-03 13:49:10 PDT
Comment on attachment 346541 [details]
Patch for EWS

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 169 EWS Watchlist 2018-08-03 13:49:14 PDT
Created attachment 346545 [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 170 EWS Watchlist 2018-08-03 14:02:33 PDT
Comment on attachment 346541 [details]
Patch for EWS

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 171 EWS Watchlist 2018-08-03 14:02:37 PDT
Created attachment 346546 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 172 EWS Watchlist 2018-08-03 14:29:43 PDT
Comment on attachment 346541 [details]
Patch for EWS

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 173 EWS Watchlist 2018-08-03 14:29:46 PDT
Created attachment 346549 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 174 EWS Watchlist 2018-08-03 14:52:05 PDT
Comment on attachment 346541 [details]
Patch for EWS

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

New failing tests:
imported/mozilla/svg/dynamic-pattern-02.svg
Comment 175 EWS Watchlist 2018-08-03 14:52:08 PDT
Created attachment 346551 [details]
Archive of layout-test-results from ews117 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 176 Said Abou-Hallawa 2018-08-03 15:20:17 PDT
Created attachment 346552 [details]
Patch for EWS
Comment 177 Said Abou-Hallawa 2018-08-05 10:28:50 PDT
Created attachment 346601 [details]
Memory shrinking patch
Comment 178 Said Abou-Hallawa 2018-08-05 10:41:39 PDT
Created attachment 346602 [details]
Patch for EWS
Comment 179 Said Abou-Hallawa 2018-08-05 21:31:07 PDT
Created attachment 346611 [details]
Patch for EWS
Comment 180 EWS Watchlist 2018-08-05 21:35:57 PDT
Attachment 346611 [details] did not pass style-queue:


ERROR: Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h:47:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h:48:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 2 in 170 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 181 Simon Fraser (smfr) 2018-08-06 11:05:36 PDT
Comment on attachment 346601 [details]
Memory shrinking patch

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

> Source/WebCore/ChangeLog:20
> +           that use it from the SVGElemnet and its super classes.

SVGElemnet
Comment 182 Said Abou-Hallawa 2018-08-06 11:09:43 PDT
Created attachment 346636 [details]
Patch
Comment 183 Said Abou-Hallawa 2018-08-06 11:13:28 PDT
Comment on attachment 346177 [details]
Add TearOff creation methods

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

>> Source/WebCore/svg/properties/SVGAttributeRegistry.h:103
>> +    // It is a template function with parameter 'I' whose default value = 0. So you can call it without any parameter from animatedTypes().
> 
> "This is..."

Fixed. The current wording is:

    // This is a template function with parameter 'I' whose default value = 0. So you can call it without any parameter from animatedTypes().
    // It returns Vector<AnimatedPropertyType> and is enable_if<I == sizeof...(BaseTypes)>. So it is mainly for breaking the recursion. If
    // it is called, this means no attribute was found in this registry for this QualifiedName. So return an empty Vector<AnimatedPropertyType>.
Comment 184 Said Abou-Hallawa 2018-08-06 11:19:00 PDT
Comment on attachment 346124 [details]
Introduce SVGAttributeRegistry

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

>>>> Source/WebCore/svg/properties/SVGAttributeRegistry.h:48
>>>> +        return it != m_map.end();
>>> 
>>> Why isn't this just m_map.contains()? Seems like you're doing manual hash key iteration here?
>> 
>> No. We can't use m_map.contains.
>> 
>> We have to compare the attribute names using QualifiedName::matches() since matches() takes the namespace into account while operator==() does not. Please have a look at:
>> 
>> bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName)
>> bool SVGLangSpace::isKnownAttribute(const QualifiedName& attrName)
> 
> This might be worth adding a comment, then, if there is a risk some time later someone decides to "optimize" this code.

The reason I gave above is incorrect. The correct reason I added as a comment to this function:

        // Here we need to loop through the entries in the map and use matches() to compare them with attributeName.
        // m_map.contains() uses QualifiedName::operator==() which compares the impl pointers only while matches()
        // compares the contents if the impl pointers differ.

>> Source/WebCore/svg/properties/SVGAttributeRegistry.h:62
>> +            synchronizeAttributesBaseTypes(owner, element);
> 
> The indentation is off here.

Fixed.

>> Source/WebCore/svg/properties/SVGAttributeRegistry.h:84
>> +    static typename std::enable_if<I < sizeof...(BaseTypes), Vector<AnimatedPropertyType>>::type animatedTypesBaseTypes(const QualifiedName& attributeName)
> 
> I think this template magic deserves some comments to explain how it works.

Two comments are added to this function and the one before it. And since the rest of template functions are very similar I did not any more comments.
Comment 185 Said Abou-Hallawa 2018-08-06 11:37:58 PDT
Comment on attachment 346197 [details]
Add animated type and animated attribute for PathSegList

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

>> Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp:51
>> +    // This is an expensive operation and only done, if someone actually observes the animatedPathSegList() while an animation is running.
> 
> "and only done if" (no comma)
> Makes me wonder why this isn't done everywhere.

Comma is removed.

I am not sure understand your question regarding this optimization. My understanding is this class tries to avoid building the PathSegListValues from the byte stream unless it really needs to. But in either case, it calls the Base::animValDidChange(). The only place that overrides this function is this place.
Comment 186 Said Abou-Hallawa 2018-08-06 11:40:54 PDT
Comment on attachment 346211 [details]
Remove the reference to SVGPropertyInfo.h from SVGAnimatedProperty.h

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

>> Source/WebCore/svg/properties/SVGAnimatedProperty.h:81
>> +        static NeverDestroyed<Cache> s_cache;
> 
> We don't tend to use the s_ naming convention now.

s_ is removed.
Comment 187 Said Abou-Hallawa 2018-08-06 11:49:35 PDT
Comment on attachment 346212 [details]
Register SVGLangSpace attributes into SVGAttributeRegistry

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

>> Source/WebCore/svg/SVGLangSpace.cpp:71
>> +    if (auto* renderer = downcast<RenderSVGShape>(m_contextElement.renderer())) {
> 
> Weird, why is RenderSVGShape stuff here?

I do not know. Similar code was in SVGCircleElement::svgAttributeChanged(), SVGEllipseElement::svgAttributeChanged() and other classes to handle the changes in the SVGLangSpace attributes. I will try removing this code and writing more tests for changing the attributes.

>> Source/WebCore/svg/SVGLangSpace.h:45
>> +    static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
> 
> I hate that auto. I've no idea what the return type is.

All autos are removed. Explicit types are now used for the attributes and the registry.
Comment 188 Said Abou-Hallawa 2018-08-06 12:20:40 PDT
Comment on attachment 346193 [details]
Delete SVG macros for SVGAnimatedEnumeration

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

>> Source/WebCore/svg/SVGAnimatedEnumeration.h:31
>> +using SVGAnimatedEnumeration = SVGAnimatedStaticPropertyTearOff<unsigned>;
> 
> Will this still cause problems with 8-bit enum classes? Do we eventually need to provide tear-off types for each unique enum class?

I do not think so. The definition of SVGAnimatedEnumeration should be like this:

template<typename EnumType>
using SVGAnimatedEnumeration = SVGAnimatedStaticPropertyTearOff<EnumType>;

And we need to clean SVGAnimatedEnumerationPropertyTearOff or get rid of it if possible.
Comment 189 Said Abou-Hallawa 2018-08-06 12:42:50 PDT
Created attachment 346642 [details]
Patch
Comment 190 Said Abou-Hallawa 2018-08-06 12:45:37 PDT
Comment on attachment 346241 [details]
Register SVGExternalResourcesRequired attributes into SVGAttributeRegistry

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

>> Source/WebCore/svg/SVGExternalResourcesRequired.cpp:30
>> +SVGExternalResourcesRequired::SVGExternalResourcesRequired(SVGElement* contextElement)
> 
> Can contextElement be a reference?

No it can't be a reference because this will conflict with the copy constructor since the context element is a super class of SVGExternalResourcesRequired.
Comment 191 Said Abou-Hallawa 2018-08-06 12:55:43 PDT
Comment on attachment 346244 [details]
Remove SVG macros from SVGRectElement

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

>> Source/WebCore/svg/SVGRectElement.h:74
>> +    SVGAnimatedLengthAttribute m_ry { m_attributeOwnerProxy, LengthModeHeight};
> 
> How does the size of SVGRectElement change (use dump-class-layout to tell).

The size with this patch is 568. With the macros, the size is 400 bytes. The difference is the SVGRectElement and each of its base classes now hold a member of AttributeOwnerProxy which is 32 bytes. This can be removed if SVGElement has these  functions as virtual functions and each SVGElement-base-class overrides them and provide a temporary SVGAttributeOwnerProxy or even better sending "this" to the SVGAttributeRegistry method.

    void synchronizeAttribute(const QualifiedName& name) { attributeOwnerProxy().synchronizeAttribute(name); }
    void synchronizeAttributes() { attributeOwnerProxy().synchronizeAttributes(); }
    Vector<AnimatedPropertyType> animatedTypes(const QualifiedName& attributeName) const { return attributeOwnerProxy().animatedTypes(attributeName); }
    RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGAttribute& attribute) const { return attributeOwnerProxy().lookupAnimatedProperty(attribute); }
    RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) { return attributeOwnerProxy().lookupOrCreateAnimatedProperty(attribute); }
    Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& name) { return attributeOwnerProxy().lookupOrCreateAnimatedProperties(name); }

I introduced the SVGAttributeOwnerProxy to remove the code duplication. If the code duplication is returned back, the size will be back to its original size.
Comment 192 WebKit Commit Bot 2018-08-06 14:09:04 PDT
Comment on attachment 346642 [details]
Patch

Clearing flags on attachment: 346642

Committed r234620: <https://trac.webkit.org/changeset/234620>
Comment 193 WebKit Commit Bot 2018-08-06 14:09:08 PDT
All reviewed patches have been landed.  Closing bug.