[webkit-changes] [WebKit/WebKit] 86a5ff: Display property as specified on svg elements

Ahmad Saleem noreply at github.com
Sat May 27 07:30:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 86a5ffe6350f324c9a4a8b7a81b8096861960bf9
      https://github.com/WebKit/WebKit/commit/86a5ffe6350f324c9a4a8b7a81b8096861960bf9
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-05-27 (Sat, 27 May 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-contents-svg-anchor-child-expected.txt
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/masking-path-12-f-manual-expected.txt
    M LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/svg/import/masking-path-12-f-manual-expected.txt
    M LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/masking-path-12-f-manual-expected.txt
    A LayoutTests/svg/css/display-computed-expected.txt
    A LayoutTests/svg/css/display-computed.html
    A LayoutTests/svg/css/display-expected.html
    A LayoutTests/svg/css/display.html
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/style/StyleBuilderCustom.h

  Log Message:
  -----------
  Display property as specified on svg elements

https://bugs.webkit.org/show_bug.cgi?id=257267

Reviewed by Tim Nguyen.

This patch aligns WebKit with Blink / Chromium and Gecko / Firefox.

Merge: https://src.chromium.org/viewvc/blink?view=revision&revision=177649

The computed display of svg elements should be as for other elements. For
svg:svg elements, they should behave as other replaced elements when styled
with inline-block, table-cell, etc. For svg elements inside the root svg
element, they still get a computed value for display as other elements,
although the rendering is the same for all display values different from
'none'.

Also, this change makes it possible to remove the custom style building for
display.

NOTE: We still need to add special handling of '<g>' etc., for display type
content and have FIXME in 'StyleAdjuster.cpp'.

* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/style/StyleBuilderCustom.h: Remove 'isValidDisplayValue'
(BuilderCustom::isValidDisplayValue): Removed
(BuilderCustom::applyInheritDisplay): Removed
(BuilderCustom::applyValueDisplay): Removed
* LayoutTests/svg/css/display-computed.html: Add Test Case
* LayoutTests/svg/css/display-computed-expected.txt: Add Test Case Expectation
* LayoutTests/svg/css/display.html: Add Test Case
* LayoutTests/svg/css/display-expected.html: Add Test Case Expectation
* LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-contents-svg-anchor-child-expected.txt: Rebaselined
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/masking-path-12-f-manual-expected.txt: Rebaselined
* LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/svg/imp…/masking-path-12-f-manual-expected.txt: Rebaselined
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/masking-path-12-f-manual-expected.txt: Rebaselined

Canonical link: https://commits.webkit.org/264627@main




More information about the webkit-changes mailing list