Make the choice of layout runtime setting

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Martin Robinson 2023-06-28 10:07:08 +02:00
parent f11c6045e3
commit d31cdb682f
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
262 changed files with 1740 additions and 3700 deletions

View file

@ -2,9 +2,6 @@ name: Linux workflow
on: on:
workflow_call: workflow_call:
inputs: inputs:
layout:
required: true
type: string
wpt: wpt:
required: false required: false
type: string type: string
@ -21,10 +18,6 @@ on:
type: string type: string
workflow_dispatch: workflow_dispatch:
inputs: inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
wpt: wpt:
default: "test" default: "test"
required: false required: false
@ -44,8 +37,6 @@ on:
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
SHELL: /bin/bash SHELL: /bin/bash
LAYOUT: "${{ (contains(inputs.layout, '2020') || github.ref_name == 'try-wpt-2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ (contains(inputs.layout, '2020') || github.ref_name == 'try-wpt-2020') && 'linux-layout2020' || 'linux' }}"
SCCACHE_GHA_ENABLED: "true" SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache" RUSTC_WRAPPER: "sccache"
CCACHE: "sccache" CCACHE: "sccache"
@ -72,22 +63,22 @@ jobs:
- name: Tidy - name: Tidy
run: python3 ./mach test-tidy --no-progress --all run: python3 ./mach test-tidy --no-progress --all
- name: Release build - name: Release build
run: python3 ./mach build --release --with-${{ env.LAYOUT }} run: python3 ./mach build --release
- name: Smoketest - name: Smoketest
run: xvfb-run python3 ./mach smoketest run: xvfb-run python3 ./mach smoketest
- name: Script tests - name: Script tests
run: ./mach test-scripts run: ./mach test-scripts
- name: Unit tests - name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-linux' }} if: ${{ inputs.unit-tests || github.ref_name == 'try-linux' }}
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }} run: python3 ./mach test-unit --release
- name: Rename build timing - name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-linux-${{ env.LAYOUT }} run: cp -r target/cargo-timings target/cargo-timings-linux
- name: Archive build timing - name: Archive build timing
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: cargo-timings name: cargo-timings
# Using a wildcard here ensures that the archive includes the path. # Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }} path: target/cargo-timings-*
- name: Lockfile check - name: Lockfile check
run: ./etc/ci/lockfile_changed.sh run: ./etc/ci/lockfile_changed.sh
- name: Package - name: Package
@ -95,12 +86,12 @@ jobs:
- name: Upload Package - name: Upload Package
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.PACKAGE }} name: linux
path: target/release/servo-tech-demo.tar.gz path: target/release/servo-tech-demo.tar.gz
- name: Upload - name: Upload
if: ${{ inputs.upload }} if: ${{ inputs.upload }}
run: | run: |
python3 ./mach upload-nightly ${{ env.PACKAGE }} \ python3 ./mach upload-nightly linux \
--secret-from-environment \ --secret-from-environment \
--github-release-id ${{ inputs.github-release-id }} --github-release-id ${{ inputs.github-release-id }}
env: env:
@ -112,7 +103,7 @@ jobs:
- name: Archive binary - name: Archive binary
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.LAYOUT }}-release-binary name: release-binary
path: target.tar.gz path: target.tar.gz
linux-wpt: linux-wpt:
@ -125,6 +116,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
layout: ["layout-2020", "layout-2013"]
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -132,7 +124,7 @@ jobs:
fetch-depth: 2 fetch-depth: 2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: ${{ env.LAYOUT }}-release-binary name: release-binary
path: release-binary path: release-binary
- name: unPackage binary - name: unPackage binary
run: tar -xzf release-binary/target.tar.gz run: tar -xzf release-binary/target.tar.gz
@ -151,45 +143,43 @@ jobs:
- name: Run tests - name: Run tests
if: ${{ inputs.wpt != 'sync' }} if: ${{ inputs.wpt != 'sync' }}
run: | run: |
python3 ./mach test-wpt --with-${{ env.LAYOUT }} \ python3 ./mach test-wpt --with-${{ matrix.layout }} \
--release --processes $(nproc) --timeout-multiplier 2 \ --release --processes $(nproc) --timeout-multiplier 2 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \ --total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw test-wpt.${{ matrix.chunk_id }}.log \ --log-raw test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
--log-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \ --log-raw-unexpected unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
--filter-intermittents filtered-test-wpt.${{ matrix.chunk_id }}.json --filter-intermittents filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
env: env:
GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }} INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }}
- name: Run tests (sync) - name: Run tests (sync)
if: ${{ inputs.wpt == 'sync' }} if: ${{ inputs.wpt == 'sync' }}
run: | run: |
python3 ./mach test-wpt --with-${{ env.LAYOUT }} \ python3 ./mach test-wpt --with-${{ matrix.layout }} \
--release --processes $(nproc) --timeout-multiplier 2 \ --release --processes $(nproc) --timeout-multiplier 2 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \ --total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw test-wpt.${{ matrix.chunk_id }}.log \ --log-raw test-wpt.${{ matrix.chunk_id }}.log \
--log-servojson wpt-jsonsummary.${{ matrix.chunk_id }}.log \
--always-succeed --always-succeed
- name: Archive filtered results - name: Archive filtered results
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: ${{ always() && inputs.wpt != 'sync' }} if: ${{ always() && inputs.wpt != 'sync' }}
with: with:
name: wpt-filtered-results-linux-${{ env.LAYOUT }} name: wpt-filtered-results-linux
path: | path: |
filtered-test-wpt.${{ matrix.chunk_id }}.json filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
unexpected-test-wpt.${{ matrix.chunk_id }}.log unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
- name: Archive logs - name: Archive logs
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: ${{ failure() && inputs.wpt != 'sync' }} if: ${{ failure() && inputs.wpt != 'sync' }}
with: with:
name: wpt-logs-linux-${{ env.LAYOUT }} name: wpt-logs-linux
path: | path: |
test-wpt.${{ matrix.chunk_id }}.log test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
filtered-wpt-results.${{ matrix.chunk_id }}.json
- name: Archive logs - name: Archive logs
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: ${{ inputs.wpt == 'sync' }} if: ${{ inputs.wpt == 'sync' }}
with: with:
name: wpt-logs-linux-${{ env.LAYOUT }} name: wpt-logs-linux-${{ matrix.layout }}
path: | path: |
test-wpt.${{ matrix.chunk_id }}.log test-wpt.${{ matrix.chunk_id }}.log
wpt-jsonsummary.${{ matrix.chunk_id }}.log wpt-jsonsummary.${{ matrix.chunk_id }}.log
@ -206,18 +196,23 @@ jobs:
fetch-depth: 2 fetch-depth: 2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: wpt-filtered-results-linux-${{ env.LAYOUT }} name: wpt-filtered-results-linux
path: wpt-filtered-results-linux path: wpt-filtered-results-linux
- name: Create aggregated unexpected results - name: Create aggregated unexpected results
run: cat wpt-filtered-results-linux/*.log > unexpected-test-wpt.log run: |
cat wpt-filtered-results-linux/*-layout-2020.*.log > unexpected-test-wpt-layout-2020.log
cat wpt-filtered-results-linux/*-layout-2013.*.log > unexpected-test-wpt-layout-2013.log
- name: Archive aggregate results - name: Archive aggregate results
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: wpt-filtered-results-linux-${{ env.LAYOUT }} name: wpt-filtered-results-linux
path: | path: |
unexpected-test-wpt.log unexpected-test-wpt-layout-2020.log
unexpected-test-wpt-layout-2013.log
- name: Comment on PR with results - name: Comment on PR with results
run: etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-${{ env.LAYOUT }}" wpt-filtered-results-linux/*.json run: |
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-2020" wpt-filtered-results-linux/*-layout-2020.*.json
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-2013" wpt-filtered-results-linux/*-layout-2013.*.json
env: env:
GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -3,9 +3,6 @@ name: Mac workflow
on: on:
workflow_call: workflow_call:
inputs: inputs:
layout:
required: true
type: string
unit-tests: unit-tests:
required: false required: false
default: false default: false
@ -19,10 +16,6 @@ on:
type: string type: string
workflow_dispatch: workflow_dispatch:
inputs: inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests: unit-tests:
required: false required: false
default: false default: false
@ -37,8 +30,6 @@ on:
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
SHELL: /bin/bash SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'mac-layout2020' || 'mac' }}"
SCCACHE_GHA_ENABLED: "true" SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache" RUSTC_WRAPPER: "sccache"
CCACHE: "sccache" CCACHE: "sccache"
@ -60,35 +51,35 @@ jobs:
python3 ./mach bootstrap python3 ./mach bootstrap
- name: Release build - name: Release build
run: | run: |
python3 ./mach build --release --with-${{ env.LAYOUT }} python3 ./mach build --release
- name: Smoketest - name: Smoketest
run: python3 ./mach smoketest run: python3 ./mach smoketest
- name: Script tests - name: Script tests
run: ./mach test-scripts run: ./mach test-scripts
- name: Unit tests - name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-mac' }} if: ${{ inputs.unit-tests || github.ref_name == 'try-mac' }}
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }} run: python3 ./mach test-unit --release
- name: Package - name: Package
run: python3 ./mach package --release run: python3 ./mach package --release
- name: Package smoketest - name: Package smoketest
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
- name: Rename build timing - name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-macos-${{ env.LAYOUT }} run: cp -r target/cargo-timings target/cargo-timings-macos
- name: Archive build timing - name: Archive build timing
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: cargo-timings name: cargo-timings
# Using a wildcard here ensures that the archive includes the path. # Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }} path: target/cargo-timings-*
- name: Upload package - name: Upload package
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.PACKAGE }} name: mac
path: target/release/servo-tech-demo.dmg path: target/release/servo-tech-demo.dmg
- name: Upload - name: Upload
if: ${{ inputs.upload }} if: ${{ inputs.upload }}
run: | run: |
python3 ./mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment \ python3 ./mach upload-nightly mac --secret-from-environment \
--github-release-id ${{ inputs.github-release-id }} --github-release-id ${{ inputs.github-release-id }}
env: env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }} S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
@ -100,7 +91,7 @@ jobs:
- name: Archive binary - name: Archive binary
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: release-${{ env.LAYOUT }}-binary-macos name: release-binary-macos
path: target.tar.gz path: target.tar.gz
# mac-wpt: # mac-wpt:

View file

@ -38,7 +38,6 @@ jobs:
needs: ["decision"] needs: ["decision"]
uses: ./.github/workflows/windows.yml uses: ./.github/workflows/windows.yml
with: with:
layout: '2013'
unit-tests: true unit-tests: true
build-mac: build-mac:
@ -46,7 +45,6 @@ jobs:
needs: ["decision"] needs: ["decision"]
uses: ./.github/workflows/mac.yml uses: ./.github/workflows/mac.yml
with: with:
layout: '2013'
unit-tests: true unit-tests: true
build-linux: build-linux:
@ -54,16 +52,6 @@ jobs:
needs: ["decision"] needs: ["decision"]
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
layout: '2013'
wpt: 'test'
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
needs: ["decision"]
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
wpt: 'test' wpt: 'test'
unit-tests: true unit-tests: true
@ -77,7 +65,6 @@ jobs:
- "build-win" - "build-win"
- "build-mac" - "build-mac"
- "build-linux" - "build-linux"
- "build-linux-layout-2020"
steps: steps:
- name: Mark the job as successful - name: Mark the job as successful

View file

@ -59,11 +59,8 @@ jobs:
needs: needs:
- create-draft-release - create-draft-release
- upload-linux - upload-linux
- upload-linux-2013
- upload-win - upload-win
- upload-win-2013
- upload-mac - upload-mac
- upload-mac-2013
upload-win: upload-win:
# This job is only useful when run on upstream servo. # This job is only useful when run on upstream servo.
@ -73,20 +70,6 @@ jobs:
- create-draft-release - create-draft-release
uses: ./.github/workflows/windows.yml uses: ./.github/workflows/windows.yml
with: with:
layout: '2020'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
upload-win-2013:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Windows layout-2013)
needs:
- create-draft-release
uses: ./.github/workflows/windows.yml
with:
layout: '2013'
upload: true upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }} github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit secrets: inherit
@ -99,20 +82,6 @@ jobs:
- create-draft-release - create-draft-release
uses: ./.github/workflows/mac.yml uses: ./.github/workflows/mac.yml
with: with:
layout: '2020'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
upload-mac-2013:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (macOS layout-2013)
needs:
- create-draft-release
uses: ./.github/workflows/mac.yml
with:
layout: '2013'
upload: true upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }} github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit secrets: inherit
@ -125,20 +94,6 @@ jobs:
- create-draft-release - create-draft-release
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
layout: '2020'
upload: true upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }} github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit secrets: inherit
upload-linux-2013:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Linux layout-2013)
needs:
- create-draft-release
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit

View file

@ -11,13 +11,4 @@ jobs:
if: github.repository == 'servo/servo' if: github.repository == 'servo/servo'
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
layout: '2013' unit-tests: true
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
if: github.repository == 'servo/servo'
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
unit-tests: false

View file

@ -13,14 +13,4 @@ jobs:
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch' if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
layout: '2013' unit-tests: true
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
# TODO: unit tests on layout-2020
unit-tests: false

View file

@ -15,17 +15,6 @@ jobs:
name: Linux name: Linux
uses: ./.github/workflows/linux.yml uses: ./.github/workflows/linux.yml
with: with:
layout: '2013'
wpt: 'sync'
unit-tests: false
linux-layout-2020:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Linux (layout-2020)
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
wpt: 'sync' wpt: 'sync'
unit-tests: false unit-tests: false
@ -36,7 +25,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- "linux" - "linux"
- "linux-layout-2020"
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3

View file

@ -3,9 +3,6 @@ name: Windows workflow
on: on:
workflow_call: workflow_call:
inputs: inputs:
layout:
required: true
type: string
unit-tests: unit-tests:
required: false required: false
default: false default: false
@ -19,10 +16,6 @@ on:
type: string type: string
workflow_dispatch: workflow_dispatch:
inputs: inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests: unit-tests:
required: false required: false
default: false default: false
@ -37,8 +30,6 @@ on:
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
SHELL: /bin/bash SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'windows-msvc-layout2020' || 'windows-msvc' }}"
CCACHE: "ccache" CCACHE: "ccache"
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
@ -64,28 +55,28 @@ jobs:
python mach fetch python mach fetch
python mach bootstrap-gstreamer python mach bootstrap-gstreamer
- name: Release build - name: Release build
run: python mach build --release --with-${{ env.LAYOUT }} run: python mach build --release
- name: Copy resources - name: Copy resources
run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse
- name: Smoketest - name: Smoketest
run: python mach smoketest --angle run: python mach smoketest --angle
- name: Unit tests - name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-windows' }} if: ${{ inputs.unit-tests || github.ref_name == 'try-windows' }}
run: python mach test-unit --release --with-${{ env.LAYOUT }} run: python mach test-unit --release
- name: Rename build timing - name: Rename build timing
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows-${{ env.LAYOUT }} -Recurse run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows -Recurse
- name: Archive build timing - name: Archive build timing
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: cargo-timings name: cargo-timings
# Using a wildcard here ensures that the archive includes the path. # Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }} path: target/cargo-timings-*
- name: Package - name: Package
run: python mach package --release run: python mach package --release
- name: Upload Package - name: Upload Package
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.PACKAGE }} name: win
# These files are available # These files are available
# MSI Installer: C:\a\servo\servo\target\release\msi\Installer.msi # MSI Installer: C:\a\servo\servo\target\release\msi\Installer.msi
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe # Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
@ -94,7 +85,7 @@ jobs:
- name: Upload - name: Upload
if: ${{ inputs.upload }} if: ${{ inputs.upload }}
run: | run: |
python mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment ` python mach upload-nightly win --secret-from-environment `
--github-release-id ${{ inputs.github-release-id }} --github-release-id ${{ inputs.github-release-id }}
env: env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }} S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}

View file

@ -27,6 +27,9 @@ pub struct Opts {
/// The initial URL to load. /// The initial URL to load.
pub url: Option<ServoUrl>, pub url: Option<ServoUrl>,
/// Whether or not the legacy layout system is enabled.
pub legacy_layout: bool,
/// The maximum size of each tile in pixels (`-s`). /// The maximum size of each tile in pixels (`-s`).
pub tile_size: usize, pub tile_size: usize,
@ -376,6 +379,7 @@ pub fn default_opts() -> Opts {
Opts { Opts {
is_running_problem_test: false, is_running_problem_test: false,
url: None, url: None,
legacy_layout: false,
tile_size: 512, tile_size: 512,
time_profiling: None, time_profiling: None,
time_profiler_trace_path: None, time_profiler_trace_path: None,
@ -410,6 +414,7 @@ pub fn default_opts() -> Opts {
pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingResult { pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingResult {
let (app_name, args) = args.split_first().unwrap(); let (app_name, args) = args.split_first().unwrap();
opts.optflag("", "legacy-layout", "Use the legacy layout engine");
opts.optflag("c", "cpu", "CPU painting"); opts.optflag("c", "cpu", "CPU painting");
opts.optflag("g", "gpu", "GPU painting"); opts.optflag("g", "gpu", "GPU painting");
opts.optopt("o", "output", "Output file", "output.png"); opts.optopt("o", "output", "Output file", "output.png");
@ -731,10 +736,17 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
let is_printing_version = opt_match.opt_present("v") || opt_match.opt_present("version"); let is_printing_version = opt_match.opt_present("v") || opt_match.opt_present("version");
let legacy_layout = opt_match.opt_present("legacy-layout");
if legacy_layout {
set_pref!(layout.legacy_layout, true);
set_pref!(layout.flexbox.enabled, true);
}
let opts = Opts { let opts = Opts {
debug: debug_options.clone(), debug: debug_options.clone(),
is_running_problem_test, is_running_problem_test,
url: url_opt, url: url_opt,
legacy_layout,
tile_size, tile_size,
time_profiling, time_profiling,
time_profiler_trace_path: opt_match.opt_str("profiler-trace-path"), time_profiler_trace_path: opt_match.opt_str("profiler-trace-path"),

View file

@ -440,6 +440,7 @@ mod gen {
flexbox: { flexbox: {
enabled: bool, enabled: bool,
}, },
legacy_layout: bool,
#[serde(default = "default_layout_threads")] #[serde(default = "default_layout_threads")]
threads: i64, threads: i64,
writing_mode: { writing_mode: {

View file

@ -7,7 +7,7 @@ edition = "2018"
publish = false publish = false
[lib] [lib]
name = "layout" name = "layout_2013"
path = "lib.rs" path = "lib.rs"
test = false test = false
doctest = false doctest = false
@ -45,7 +45,7 @@ servo_config = { path = "../config" }
servo_geometry = { path = "../geometry" } servo_geometry = { path = "../geometry" }
servo_url = { path = "../url" } servo_url = { path = "../url" }
smallvec = { workspace = true, features = ["union"] } smallvec = { workspace = true, features = ["union"] }
style = { path = "../style", features = ["servo", "servo-layout-2013"] } style = { path = "../style", features = ["servo"] }
style_traits = { path = "../style_traits" } style_traits = { path = "../style_traits" }
unicode-bidi = { workspace = true, features = ["with_serde"] } unicode-bidi = { workspace = true, features = ["with_serde"] }
unicode-script = { workspace = true } unicode-script = { workspace = true }

View file

@ -7,8 +7,8 @@
#[macro_use] #[macro_use]
extern crate size_of_test; extern crate size_of_test;
use layout::Fragment; use layout_2013::Fragment;
use layout::SpecificFragmentInfo; use layout_2013::SpecificFragmentInfo;
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
size_of_test!(test_size_of_fragment, Fragment, 176); size_of_test!(test_size_of_fragment, Fragment, 176);

View file

@ -7,7 +7,7 @@ edition = "2018"
publish = false publish = false
[lib] [lib]
name = "layout" name = "layout_2020"
path = "lib.rs" path = "lib.rs"
test = false test = false
doctest = false doctest = false
@ -41,7 +41,7 @@ serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
servo_arc = { path = "../servo_arc" } servo_arc = { path = "../servo_arc" }
servo_url = { path = "../url" } servo_url = { path = "../url" }
style = { path = "../style", features = ["servo", "servo-layout-2020"] } style = { path = "../style", features = ["servo"] }
style_traits = { path = "../style_traits" } style_traits = { path = "../style_traits" }
unicode-script = { workspace = true } unicode-script = { workspace = true }
webrender_api = { workspace = true } webrender_api = { workspace = true }

View file

@ -638,6 +638,9 @@ impl<'a> BuilderForBoxFragment<'a> {
} }
} }
}, },
Image::PaintWorklet(_) => {
// TODO: Add support for PaintWorklet rendering.
},
// Gecko-only value, represented as a (boxed) empty enum on non-Gecko. // Gecko-only value, represented as a (boxed) empty enum on non-Gecko.
Image::Rect(ref rect) => match **rect {}, Image::Rect(ref rect) => match **rect {},
Image::ImageSet(..) | Image::CrossFade(..) => { Image::ImageSet(..) | Image::CrossFade(..) => {

View file

@ -361,6 +361,14 @@ where
vec.push(PseudoElementContentItem::Replaced(replaced_content)); vec.push(PseudoElementContentItem::Replaced(replaced_content));
} }
}, },
ContentItem::Counter(_, _) |
ContentItem::Counters(_, _, _) |
ContentItem::OpenQuote |
ContentItem::CloseQuote |
ContentItem::NoOpenQuote |
ContentItem::NoCloseQuote => {
// TODO: Add support for counters and quotes.
},
} }
} }
vec vec

View file

@ -473,6 +473,16 @@ impl Lines {
TextAlign::Start TextAlign::Start
} }
}, },
TextAlignKeyword::Justify => {
// TODO: Add support for justfied text.
TextAlign::Start
},
TextAlignKeyword::ServoCenter |
TextAlignKeyword::ServoLeft |
TextAlignKeyword::ServoRight => {
// TODO: Implement these modes which seem to be used by quirks mode.
TextAlign::Start
},
}; };
let move_by = match text_align { let move_by = match text_align {
TextAlign::Start => Length::zero(), TextAlign::Start => Length::zero(),

View file

@ -33,6 +33,7 @@ where
Image::Rect(..) | Image::Rect(..) |
Image::Gradient(..) | Image::Gradient(..) |
Image::CrossFade(..) | Image::CrossFade(..) |
Image::PaintWorklet(..) |
Image::None => None, Image::None => None,
}; };
marker_image().or_else(|| { marker_image().or_else(|| {
@ -44,7 +45,6 @@ where
/// https://drafts.csswg.org/css-lists/#marker-string /// https://drafts.csswg.org/css-lists/#marker-string
fn marker_string(style: &style_structs::List) -> Option<&'static str> { fn marker_string(style: &style_structs::List) -> Option<&'static str> {
// FIXME: add support for counters and other style types
match style.list_style_type { match style.list_style_type {
ListStyleType::None => None, ListStyleType::None => None,
ListStyleType::Disc => Some(""), ListStyleType::Disc => Some(""),
@ -52,5 +52,36 @@ fn marker_string(style: &style_structs::List) -> Option<&'static str> {
ListStyleType::Square => Some(""), ListStyleType::Square => Some(""),
ListStyleType::DisclosureOpen => Some(""), ListStyleType::DisclosureOpen => Some(""),
ListStyleType::DisclosureClosed => Some(""), ListStyleType::DisclosureClosed => Some(""),
ListStyleType::Decimal |
ListStyleType::LowerAlpha |
ListStyleType::UpperAlpha |
ListStyleType::ArabicIndic |
ListStyleType::Bengali |
ListStyleType::Cambodian |
ListStyleType::CjkDecimal |
ListStyleType::Devanagari |
ListStyleType::Gujarati |
ListStyleType::Gurmukhi |
ListStyleType::Kannada |
ListStyleType::Khmer |
ListStyleType::Lao |
ListStyleType::Malayalam |
ListStyleType::Mongolian |
ListStyleType::Myanmar |
ListStyleType::Oriya |
ListStyleType::Persian |
ListStyleType::Telugu |
ListStyleType::Thai |
ListStyleType::Tibetan |
ListStyleType::CjkEarthlyBranch |
ListStyleType::CjkHeavenlyStem |
ListStyleType::LowerGreek |
ListStyleType::Hiragana |
ListStyleType::HiraganaIroha |
ListStyleType::Katakana |
ListStyleType::KatakanaIroha => {
// TODO: Implement support for counters.
None
},
} }
} }

View file

@ -290,7 +290,7 @@ impl PositioningContext {
match position { match position {
Position::Fixed => {}, // fall through Position::Fixed => {}, // fall through
Position::Absolute => return nearest.push(box_), Position::Absolute => return nearest.push(box_),
Position::Static | Position::Relative => unreachable!(), Position::Static | Position::Relative | Position::Sticky => unreachable!(),
} }
} }
self.for_nearest_containing_block_for_all_descendants self.for_nearest_containing_block_for_all_descendants

View file

@ -492,8 +492,9 @@ fn process_offset_parent_query_inner(
// TODO: Handle case 2 // TODO: Handle case 2
(true, _) | (true, _) |
(false, Position::Absolute) | (false, Position::Absolute) |
(false, Position::Fixed) |
(false, Position::Relative) | (false, Position::Relative) |
(false, Position::Fixed) => true, (false, Position::Sticky) => true,
// Otherwise, it's not a valid parent // Otherwise, it's not a valid parent
(false, Position::Static) => false, (false, Position::Static) => false,

View file

@ -497,6 +497,18 @@ impl From<stylo::Display> for Display {
// These should not be values of DisplayInside, but oh well // These should not be values of DisplayInside, but oh well
stylo::DisplayInside::None => return Display::None, stylo::DisplayInside::None => return Display::None,
stylo::DisplayInside::Contents => return Display::Contents, stylo::DisplayInside::Contents => return Display::Contents,
// TODO: Implement support for tables.
stylo::DisplayInside::Table |
stylo::DisplayInside::TableRowGroup |
stylo::DisplayInside::TableColumn |
stylo::DisplayInside::TableColumnGroup |
stylo::DisplayInside::TableHeaderGroup |
stylo::DisplayInside::TableFooterGroup |
stylo::DisplayInside::TableRow |
stylo::DisplayInside::TableCell => DisplayInside::Flow {
is_list_item: packed.is_list_item(),
},
}; };
let outside = match packed.outside() { let outside = match packed.outside() {
stylo::DisplayOutside::Block => DisplayOutside::Block, stylo::DisplayOutside::Block => DisplayOutside::Block,
@ -504,6 +516,11 @@ impl From<stylo::Display> for Display {
// This should not be a value of DisplayInside, but oh well // This should not be a value of DisplayInside, but oh well
stylo::DisplayOutside::None => return Display::None, stylo::DisplayOutside::None => return Display::None,
// TODO: Implement support for tables.
stylo::DisplayOutside::TableCaption | stylo::DisplayOutside::InternalTable => {
DisplayOutside::Block
},
}; };
Display::GeneratingBox(DisplayGeneratingBox::OutsideInside { outside, inside }) Display::GeneratingBox(DisplayGeneratingBox::OutsideInside { outside, inside })
} }

View file

@ -7,7 +7,7 @@ edition = "2018"
publish = false publish = false
[lib] [lib]
name = "layout_thread" name = "layout_thread_2013"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]

View file

@ -7,7 +7,7 @@ edition = "2018"
publish = false publish = false
[lib] [lib]
name = "layout_thread" name = "layout_thread_2020"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]

View file

@ -16,8 +16,6 @@ debugmozjs = ["script/debugmozjs"]
googlevr = ["webxr/googlevr"] googlevr = ["webxr/googlevr"]
jitspew = ["script/jitspew"] jitspew = ["script/jitspew"]
js_backtrace = ["script/js_backtrace"] js_backtrace = ["script/js_backtrace"]
layout-2013 = ["layout_thread_2013"]
layout-2020 = ["layout_thread_2020"]
max_log_level = ["log/release_max_level_info"] max_log_level = ["log/release_max_level_info"]
media-dummy = ["servo-media-dummy"] media-dummy = ["servo-media-dummy"]
media-gstreamer = ["servo-media-gstreamer", "gstreamer"] media-gstreamer = ["servo-media-gstreamer", "gstreamer"]
@ -55,8 +53,8 @@ gleam = { workspace = true }
gstreamer = { version = "0.15", features = ["v1_16"], optional = true } gstreamer = { version = "0.15", features = ["v1_16"], optional = true }
ipc-channel = { workspace = true } ipc-channel = { workspace = true }
keyboard-types = { workspace = true } keyboard-types = { workspace = true }
layout_thread_2013 = { path = "../layout_thread", optional = true } layout_thread_2013 = { path = "../layout_thread" }
layout_thread_2020 = { path = "../layout_thread_2020", optional = true } layout_thread_2020 = { path = "../layout_thread_2020" }
log = { workspace = true } log = { workspace = true }
media = { path = "../media" } media = { path = "../media" }
mozangle = { workspace = true } mozangle = { workspace = true }

View file

@ -8,16 +8,6 @@ use std::path::Path;
use std::process::Command; use std::process::Command;
fn main() { fn main() {
let layout_2013 = std::env::var_os("CARGO_FEATURE_LAYOUT_2013").is_some();
let layout_2020 = std::env::var_os("CARGO_FEATURE_LAYOUT_2020").is_some();
if !(layout_2013 || layout_2020) {
error("Must enable one of the `layout-2013` or `layout-2020` features.")
}
if layout_2013 && layout_2020 {
error("Must not enable both of the `layout-2013` or `layout-2020` features.")
}
println!("cargo:rerun-if-changed=../../python/servo/gstreamer.py"); println!("cargo:rerun-if-changed=../../python/servo/gstreamer.py");
let output = Command::new(find_python()) let output = Command::new(find_python())
@ -34,11 +24,6 @@ fn main() {
fs::write(path, output.stdout).unwrap(); fs::write(path, output.stdout).unwrap();
} }
fn error(message: &str) {
print!("\n\n Error: {}\n\n", message);
std::process::exit(1);
}
fn find_python() -> String { fn find_python() -> String {
env::var("PYTHON3").ok().unwrap_or_else(|| { env::var("PYTHON3").ok().unwrap_or_else(|| {
let candidates = if cfg!(windows) { let candidates = if cfg!(windows) {

View file

@ -33,7 +33,8 @@ pub use embedder_traits;
pub use euclid; pub use euclid;
pub use gfx; pub use gfx;
pub use ipc_channel; pub use ipc_channel;
pub use layout_thread; pub use layout_thread_2013;
pub use layout_thread_2020;
pub use media; pub use media;
pub use msg; pub use msg;
pub use net; pub use net;
@ -887,12 +888,23 @@ fn create_constellation(
wgpu_image_map, wgpu_image_map,
}; };
let constellation_chan = Constellation::< let start_constellation_chan = if opts::get().legacy_layout {
script_layout_interface::message::Msg, Constellation::<
layout_thread::LayoutThread, script_layout_interface::message::Msg,
script::script_thread::ScriptThread, layout_thread_2013::LayoutThread,
script::serviceworker_manager::ServiceWorkerManager, script::script_thread::ScriptThread,
>::start( script::serviceworker_manager::ServiceWorkerManager,
>::start
} else {
Constellation::<
script_layout_interface::message::Msg,
layout_thread_2020::LayoutThread,
script::script_thread::ScriptThread,
script::serviceworker_manager::ServiceWorkerManager,
>::start
};
start_constellation_chan(
initial_state, initial_state,
initial_window_size, initial_window_size,
opts.random_pipeline_closure_probability, opts.random_pipeline_closure_probability,
@ -902,9 +914,7 @@ fn create_constellation(
!opts.debug.disable_canvas_antialiasing, !opts.debug.disable_canvas_antialiasing,
canvas_create_sender, canvas_create_sender,
canvas_ipc_sender, canvas_ipc_sender,
); )
constellation_chan
} }
struct FontCacheWR(CompositorProxy); struct FontCacheWR(CompositorProxy);
@ -1017,14 +1027,23 @@ pub fn run_content_process(token: String) {
set_logger(content.script_to_constellation_chan().clone()); set_logger(content.script_to_constellation_chan().clone());
let background_hang_monitor_register = content.register_with_background_hang_monitor(); let background_hang_monitor_register = content.register_with_background_hang_monitor();
if opts::get().legacy_layout {
content.start_all::<script_layout_interface::message::Msg, content.start_all::<script_layout_interface::message::Msg,
layout_thread::LayoutThread, layout_thread_2013::LayoutThread,
script::script_thread::ScriptThread>( script::script_thread::ScriptThread>(
true, true,
background_hang_monitor_register, background_hang_monitor_register,
None, None,
); );
} else {
content.start_all::<script_layout_interface::message::Msg,
layout_thread_2020::LayoutThread,
script::script_thread::ScriptThread>(
true,
background_hang_monitor_register,
None,
);
}
}, },
UnprivilegedContent::ServiceWorker(content) => { UnprivilegedContent::ServiceWorker(content) => {
content.start::<ServiceWorkerManager>(); content.start::<ServiceWorkerManager>();

View file

@ -22,8 +22,6 @@ servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5eve
"cssparser/serde", "encoding_rs", "malloc_size_of/servo", "servo_url", "cssparser/serde", "encoding_rs", "malloc_size_of/servo", "servo_url",
"string_cache", "to_shmem/servo", "string_cache", "to_shmem/servo",
"servo_arc/servo"] "servo_arc/servo"]
servo-layout-2013 = []
servo-layout-2020 = []
gecko_debug = [] gecko_debug = []
gecko_refcount_logging = [] gecko_refcount_logging = []

View file

@ -71,16 +71,12 @@ fn generate_properties(engine: &str) {
fn main() { fn main() {
let gecko = cfg!(feature = "gecko"); let gecko = cfg!(feature = "gecko");
let servo = cfg!(feature = "servo"); let servo = cfg!(feature = "servo");
let l2013 = cfg!(feature = "servo-layout-2013"); let engine = match (gecko, servo) {
let l2020 = cfg!(feature = "servo-layout-2020"); (true, false) => "gecko",
let engine = match (gecko, servo, l2013, l2020) { (false, true) => "servo",
(true, false, false, false) => "gecko",
(false, true, true, false) => "servo-2013",
(false, true, false, true) => "servo-2020",
_ => panic!( _ => panic!(
"\n\n\ "\n\n\
The style crate requires enabling one of its 'servo' or 'gecko' feature flags \ The style crate requires enabling one of its 'servo' or 'gecko' feature flags. \
and, in the 'servo' case, one of 'servo-layout-2013' or 'servo-layout-2020'.\
\n\n" \n\n"
), ),
}; };

View file

@ -50,7 +50,7 @@ STYLE_STRUCT_LIST = [
def main(): def main():
usage = ( usage = (
"Usage: %s [ servo-2013 | servo-2020 | gecko ] [ style-crate | geckolib <template> | html ]" "Usage: %s [ servo | gecko ] [ style-crate | geckolib <template> | html ]"
% sys.argv[0] % sys.argv[0]
) )
if len(sys.argv) < 3: if len(sys.argv) < 3:
@ -58,7 +58,7 @@ def main():
engine = sys.argv[1] engine = sys.argv[1]
output = sys.argv[2] output = sys.argv[2]
if engine not in ["servo-2013", "servo-2020", "gecko"] or output not in [ if engine not in ["servo", "gecko"] or output not in [
"style-crate", "style-crate",
"geckolib", "geckolib",
"html", "html",
@ -102,14 +102,10 @@ def main():
rust = render(template, data=properties) rust = render(template, data=properties)
write(OUT_DIR, "gecko_properties.rs", rust) write(OUT_DIR, "gecko_properties.rs", rust)
if engine in ["servo-2013", "servo-2020"]: if engine == "servo":
if engine == "servo-2013":
pref_attr = "servo_2013_pref"
if engine == "servo-2020":
pref_attr = "servo_2020_pref"
properties_dict = { properties_dict = {
kind: { kind: {
p.name: {"pref": getattr(p, pref_attr)} p.name: {"pref": getattr(p, "servo_pref")}
for prop in properties_list for prop in properties_list
if prop.enabled_in_content() if prop.enabled_in_content()
for p in [prop] + prop.aliases for p in [prop] + prop.aliases

View file

@ -116,11 +116,9 @@ class Keyword(object):
gecko_enum_prefix=None, gecko_enum_prefix=None,
custom_consts=None, custom_consts=None,
extra_gecko_values=None, extra_gecko_values=None,
extra_servo_2013_values=None, extra_servo_values=None,
extra_servo_2020_values=None,
gecko_aliases=None, gecko_aliases=None,
servo_2013_aliases=None, servo_aliases=None,
servo_2020_aliases=None,
gecko_strip_moz_prefix=None, gecko_strip_moz_prefix=None,
gecko_inexhaustive=None, gecko_inexhaustive=None,
): ):
@ -136,11 +134,9 @@ class Keyword(object):
) )
self.gecko_enum_prefix = gecko_enum_prefix self.gecko_enum_prefix = gecko_enum_prefix
self.extra_gecko_values = (extra_gecko_values or "").split() self.extra_gecko_values = (extra_gecko_values or "").split()
self.extra_servo_2013_values = (extra_servo_2013_values or "").split() self.extra_servo_values = (extra_servo_values or "").split()
self.extra_servo_2020_values = (extra_servo_2020_values or "").split()
self.gecko_aliases = parse_aliases(gecko_aliases or "") self.gecko_aliases = parse_aliases(gecko_aliases or "")
self.servo_2013_aliases = parse_aliases(servo_2013_aliases or "") self.servo_aliases = parse_aliases(servo_aliases or "")
self.servo_2020_aliases = parse_aliases(servo_2020_aliases or "")
self.consts_map = {} if custom_consts is None else custom_consts self.consts_map = {} if custom_consts is None else custom_consts
self.gecko_strip_moz_prefix = ( self.gecko_strip_moz_prefix = (
True if gecko_strip_moz_prefix is None else gecko_strip_moz_prefix True if gecko_strip_moz_prefix is None else gecko_strip_moz_prefix
@ -150,20 +146,16 @@ class Keyword(object):
def values_for(self, engine): def values_for(self, engine):
if engine == "gecko": if engine == "gecko":
return self.values + self.extra_gecko_values return self.values + self.extra_gecko_values
elif engine == "servo-2013": elif engine == "servo":
return self.values + self.extra_servo_2013_values return self.values + self.extra_servo_values
elif engine == "servo-2020":
return self.values + self.extra_servo_2020_values
else: else:
raise Exception("Bad engine: " + engine) raise Exception("Bad engine: " + engine)
def aliases_for(self, engine): def aliases_for(self, engine):
if engine == "gecko": if engine == "gecko":
return self.gecko_aliases return self.gecko_aliases
elif engine == "servo-2013": elif engine == "servo":
return self.servo_2013_aliases return self.servo_aliases
elif engine == "servo-2020":
return self.servo_2020_aliases
else: else:
raise Exception("Bad engine: " + engine) raise Exception("Bad engine: " + engine)
@ -229,8 +221,7 @@ class Property(object):
self, self,
name, name,
spec, spec,
servo_2013_pref, servo_pref,
servo_2020_pref,
gecko_pref, gecko_pref,
enabled_in, enabled_in,
rule_types_allowed, rule_types_allowed,
@ -244,8 +235,7 @@ class Property(object):
self.spec = spec self.spec = spec
self.ident = to_rust_ident(name) self.ident = to_rust_ident(name)
self.camel_case = to_camel_case(self.ident) self.camel_case = to_camel_case(self.ident)
self.servo_2013_pref = servo_2013_pref self.servo_pref = servo_pref
self.servo_2020_pref = servo_2020_pref
self.gecko_pref = gecko_pref self.gecko_pref = gecko_pref
self.rule_types_allowed = rule_values_from_arg(rule_types_allowed) self.rule_types_allowed = rule_values_from_arg(rule_types_allowed)
# For enabled_in, the setup is as follows: # For enabled_in, the setup is as follows:
@ -269,10 +259,8 @@ class Property(object):
def experimental(self, engine): def experimental(self, engine):
if engine == "gecko": if engine == "gecko":
return bool(self.gecko_pref) return bool(self.gecko_pref)
elif engine == "servo-2013": elif engine == "servo":
return bool(self.servo_2013_pref) return bool(self.servo_pref)
elif engine == "servo-2020":
return bool(self.servo_2020_pref)
else: else:
raise Exception("Bad engine: " + engine) raise Exception("Bad engine: " + engine)
@ -298,8 +286,7 @@ class Longhand(Property):
animation_value_type=None, animation_value_type=None,
keyword=None, keyword=None,
predefined_type=None, predefined_type=None,
servo_2013_pref=None, servo_pref=None,
servo_2020_pref=None,
gecko_pref=None, gecko_pref=None,
enabled_in="content", enabled_in="content",
need_index=False, need_index=False,
@ -323,8 +310,7 @@ class Longhand(Property):
self, self,
name=name, name=name,
spec=spec, spec=spec,
servo_2013_pref=servo_2013_pref, servo_pref=servo_pref,
servo_2020_pref=servo_2020_pref,
gecko_pref=gecko_pref, gecko_pref=gecko_pref,
enabled_in=enabled_in, enabled_in=enabled_in,
rule_types_allowed=rule_types_allowed, rule_types_allowed=rule_types_allowed,
@ -416,15 +402,10 @@ class Longhand(Property):
def may_be_disabled_in(self, shorthand, engine): def may_be_disabled_in(self, shorthand, engine):
if engine == "gecko": if engine == "gecko":
return self.gecko_pref and self.gecko_pref != shorthand.gecko_pref return self.gecko_pref and self.gecko_pref != shorthand.gecko_pref
elif engine == "servo-2013": elif engine == "servo":
return ( return (
self.servo_2013_pref self.servo_pref
and self.servo_2013_pref != shorthand.servo_2013_pref and self.servo_pref != shorthand.servo_pref
)
elif engine == "servo-2020":
return (
self.servo_2020_pref
and self.servo_2020_pref != shorthand.servo_2020_pref
) )
else: else:
raise Exception("Bad engine: " + engine) raise Exception("Bad engine: " + engine)
@ -545,8 +526,7 @@ class Shorthand(Property):
name, name,
sub_properties, sub_properties,
spec=None, spec=None,
servo_2013_pref=None, servo_pref=None,
servo_2020_pref=None,
gecko_pref=None, gecko_pref=None,
enabled_in="content", enabled_in="content",
rule_types_allowed=DEFAULT_RULES, rule_types_allowed=DEFAULT_RULES,
@ -558,8 +538,7 @@ class Shorthand(Property):
self, self,
name=name, name=name,
spec=spec, spec=spec,
servo_2013_pref=servo_2013_pref, servo_pref=servo_pref,
servo_2020_pref=servo_2020_pref,
gecko_pref=gecko_pref, gecko_pref=gecko_pref,
enabled_in=enabled_in, enabled_in=enabled_in,
rule_types_allowed=rule_types_allowed, rule_types_allowed=rule_types_allowed,
@ -599,8 +578,7 @@ class Alias(object):
self.original = original self.original = original
self.enabled_in = original.enabled_in self.enabled_in = original.enabled_in
self.animatable = original.animatable self.animatable = original.animatable
self.servo_2013_pref = original.servo_2013_pref self.servo_pref = original.servo_pref
self.servo_2020_pref = original.servo_2020_pref
self.gecko_pref = gecko_pref self.gecko_pref = gecko_pref
self.transitionable = original.transitionable self.transitionable = original.transitionable
self.rule_types_allowed = original.rule_types_allowed self.rule_types_allowed = original.rule_types_allowed
@ -617,10 +595,8 @@ class Alias(object):
def experimental(self, engine): def experimental(self, engine):
if engine == "gecko": if engine == "gecko":
return bool(self.gecko_pref) return bool(self.gecko_pref)
elif engine == "servo-2013": elif engine == "servo":
return bool(self.servo_2013_pref) return bool(self.servo_pref)
elif engine == "servo-2020":
return bool(self.servo_2020_pref)
else: else:
raise Exception("Bad engine: " + engine) raise Exception("Bad engine: " + engine)
@ -750,7 +726,7 @@ def _add_logical_props(data, props):
groups = set() groups = set()
for prop in props: for prop in props:
if prop not in data.longhands_by_name: if prop not in data.longhands_by_name:
assert data.engine in ["servo-2013", "servo-2020"] assert data.engine == "servo"
continue continue
prop = data.longhands_by_name[prop] prop = data.longhands_by_name[prop]
if prop.logical_group: if prop.logical_group:

View file

@ -547,8 +547,7 @@
'gecko_constant_prefix', 'gecko_constant_prefix',
'gecko_enum_prefix', 'gecko_enum_prefix',
'extra_gecko_values', 'extra_gecko_values',
'extra_servo_2013_values', 'extra_servo_values',
'extra_servo_2020_values',
'custom_consts', 'custom_consts',
'gecko_inexhaustive', 'gecko_inexhaustive',
]} ]}
@ -714,11 +713,9 @@
'gecko_constant_prefix', 'gecko_constant_prefix',
'gecko_enum_prefix', 'gecko_enum_prefix',
'extra_gecko_values', 'extra_gecko_values',
'extra_servo_2013_values', 'extra_servo_values',
'extra_servo_2020_values',
'gecko_aliases', 'gecko_aliases',
'servo_2013_aliases', 'servo_aliases',
'servo_2020_aliases',
'custom_consts', 'custom_consts',
'gecko_inexhaustive', 'gecko_inexhaustive',
'gecko_strip_moz_prefix', 'gecko_strip_moz_prefix',

View file

@ -10,7 +10,7 @@ ${helpers.predefined_type(
"background-color", "background-color",
"Color", "Color",
"computed::Color::transparent()", "computed::Color::transparent()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="SpecifiedValue::transparent()", initial_specified_value="SpecifiedValue::transparent()",
spec="https://drafts.csswg.org/css-backgrounds/#background-color", spec="https://drafts.csswg.org/css-backgrounds/#background-color",
animation_value_type="AnimatedColor", animation_value_type="AnimatedColor",
@ -22,7 +22,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"background-image", "background-image",
"Image", "Image",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::Image::None", initial_value="computed::Image::None",
initial_specified_value="specified::Image::None", initial_specified_value="specified::Image::None",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image", spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
@ -36,7 +36,7 @@ ${helpers.predefined_type(
"background-position-" + axis, "background-position-" + axis,
"position::" + direction + "Position", "position::" + direction + "Position",
"computed::LengthPercentage::zero_percent()", "computed::LengthPercentage::zero_percent()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="SpecifiedValue::initial_specified_value()", initial_specified_value="SpecifiedValue::initial_specified_value()",
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-" + axis, spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-" + axis,
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
@ -49,7 +49,7 @@ ${helpers.predefined_type(
"background-repeat", "background-repeat",
"BackgroundRepeat", "BackgroundRepeat",
"computed::BackgroundRepeat::repeat()", "computed::BackgroundRepeat::repeat()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::BackgroundRepeat::repeat()", initial_specified_value="specified::BackgroundRepeat::repeat()",
animation_value_type="discrete", animation_value_type="discrete",
vector=True, vector=True,
@ -58,8 +58,8 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"background-attachment", "background-attachment",
"scroll" + (" fixed" if engine in ["gecko", "servo-2013"] else "") + (" local" if engine == "gecko" else ""), "scroll fixed" + (" local" if engine == "gecko" else ""),
engines="gecko servo-2013 servo-2020", engines="gecko servo",
vector=True, vector=True,
gecko_enum_prefix="StyleImageLayerAttachment", gecko_enum_prefix="StyleImageLayerAttachment",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment", spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
@ -69,7 +69,7 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"background-clip", "background-clip",
"border-box padding-box content-box", "border-box padding-box content-box",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_gecko_values="text", extra_gecko_values="text",
vector=True, extra_prefixes="webkit", vector=True, extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox", gecko_enum_prefix="StyleGeometryBox",
@ -81,7 +81,7 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"background-origin", "background-origin",
"padding-box border-box content-box", "padding-box border-box content-box",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
vector=True, extra_prefixes="webkit", vector=True, extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox", gecko_enum_prefix="StyleGeometryBox",
gecko_inexhaustive=True, gecko_inexhaustive=True,
@ -92,7 +92,7 @@ ${helpers.single_keyword(
${helpers.predefined_type( ${helpers.predefined_type(
"background-size", "background-size",
"BackgroundSize", "BackgroundSize",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::BackgroundSize::auto()", initial_value="computed::BackgroundSize::auto()",
initial_specified_value="specified::BackgroundSize::auto()", initial_specified_value="specified::BackgroundSize::auto()",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-size", spec="https://drafts.csswg.org/css-backgrounds/#the-background-size",

View file

@ -23,7 +23,7 @@
${helpers.predefined_type( ${helpers.predefined_type(
"border-%s-color" % side_name, "Color", "border-%s-color" % side_name, "Color",
"computed_value::T::currentcolor()", "computed_value::T::currentcolor()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-color"), aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-color"),
spec=maybe_logical_spec(side, "color"), spec=maybe_logical_spec(side, "color"),
animation_value_type="AnimatedColor", animation_value_type="AnimatedColor",
@ -36,7 +36,7 @@
${helpers.predefined_type( ${helpers.predefined_type(
"border-%s-style" % side_name, "BorderStyle", "border-%s-style" % side_name, "BorderStyle",
"specified::BorderStyle::None", "specified::BorderStyle::None",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-style"), aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-style"),
spec=maybe_logical_spec(side, "style"), spec=maybe_logical_spec(side, "style"),
animation_value_type="discrete" if not is_logical else "none", animation_value_type="discrete" if not is_logical else "none",
@ -48,7 +48,7 @@
"border-%s-width" % side_name, "border-%s-width" % side_name,
"BorderSideWidth", "BorderSideWidth",
"crate::values::computed::NonNegativeLength::new(3.)", "crate::values::computed::NonNegativeLength::new(3.)",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
computed_type="crate::values::computed::NonNegativeLength", computed_type="crate::values::computed::NonNegativeLength",
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-width"), aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-width"),
spec=maybe_logical_spec(side, "width"), spec=maybe_logical_spec(side, "width"),
@ -74,7 +74,7 @@
"BorderCornerRadius", "BorderCornerRadius",
"computed::BorderCornerRadius::zero()", "computed::BorderCornerRadius::zero()",
"parse", "parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_prefixes=prefixes, extra_prefixes=prefixes,
spec=maybe_logical_spec(corner, "radius"), spec=maybe_logical_spec(corner, "radius"),
boxed=True, boxed=True,
@ -106,20 +106,20 @@ ${helpers.single_keyword(
${helpers.predefined_type( ${helpers.predefined_type(
"border-image-source", "border-image-source",
"Image", "Image",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::Image::None", initial_value="computed::Image::None",
initial_specified_value="specified::Image::None", initial_specified_value="specified::Image::None",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image", spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
vector=False, vector=False,
animation_value_type="discrete", animation_value_type="discrete",
boxed=engine == "servo-2013", boxed=engine == "servo",
ignored_when_colors_disabled=True ignored_when_colors_disabled=True
)} )}
${helpers.predefined_type( ${helpers.predefined_type(
"border-image-outset", "border-image-outset",
"NonNegativeLengthOrNumberRect", "NonNegativeLengthOrNumberRect",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero())", initial_value="generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero())",
initial_specified_value="generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero())", initial_specified_value="generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero())",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset", spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset",
@ -131,7 +131,7 @@ ${helpers.predefined_type(
"border-image-repeat", "border-image-repeat",
"BorderImageRepeat", "BorderImageRepeat",
"computed::BorderImageRepeat::stretch()", "computed::BorderImageRepeat::stretch()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::BorderImageRepeat::stretch()", initial_specified_value="specified::BorderImageRepeat::stretch()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat", spec="https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat",
@ -140,7 +140,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"border-image-width", "border-image-width",
"BorderImageWidth", "BorderImageWidth",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())", initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())",
initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())", initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-width", spec="https://drafts.csswg.org/css-backgrounds/#border-image-width",
@ -151,7 +151,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"border-image-slice", "border-image-slice",
"BorderImageSlice", "BorderImageSlice",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::BorderImageSlice::hundred_percent()", initial_value="computed::BorderImageSlice::hundred_percent()",
initial_specified_value="specified::BorderImageSlice::hundred_percent()", initial_specified_value="specified::BorderImageSlice::hundred_percent()",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice", spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",

View file

@ -13,7 +13,7 @@ ${helpers.predefined_type(
"display", "display",
"Display", "Display",
"computed::Display::inline()", "computed::Display::inline()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Display::inline()", initial_specified_value="specified::Display::inline()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-display/#propdef-display", spec="https://drafts.csswg.org/css-display/#propdef-display",
@ -36,7 +36,7 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"-servo-top-layer", "-servo-top-layer",
"none top", "none top",
engines="servo-2013 servo-2020", engines="servo",
animation_value_type="none", animation_value_type="none",
enabled_in="ua", enabled_in="ua",
spec="Internal (not web-exposed)", spec="Internal (not web-exposed)",
@ -44,8 +44,8 @@ ${helpers.single_keyword(
<%helpers:single_keyword <%helpers:single_keyword
name="position" name="position"
values="static absolute relative fixed ${'sticky' if engine in ['gecko', 'servo-2013'] else ''}" values="static absolute relative fixed sticky"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
animation_value_type="discrete" animation_value_type="discrete"
gecko_enum_prefix="StylePositionProperty" gecko_enum_prefix="StylePositionProperty"
spec="https://drafts.csswg.org/css-position/#position-property" spec="https://drafts.csswg.org/css-position/#position-property"
@ -65,7 +65,7 @@ ${helpers.predefined_type(
"float", "float",
"Float", "Float",
"computed::Float::None", "computed::Float::None",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Float::None", initial_specified_value="specified::Float::None",
spec="https://drafts.csswg.org/css-box/#propdef-float", spec="https://drafts.csswg.org/css-box/#propdef-float",
animation_value_type="discrete", animation_value_type="discrete",
@ -77,7 +77,7 @@ ${helpers.predefined_type(
"clear", "clear",
"Clear", "Clear",
"computed::Clear::None", "computed::Clear::None",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="discrete", animation_value_type="discrete",
gecko_ffi_name="mBreakType", gecko_ffi_name="mBreakType",
spec="https://drafts.csswg.org/css-box/#propdef-clear", spec="https://drafts.csswg.org/css-box/#propdef-clear",
@ -88,7 +88,8 @@ ${helpers.predefined_type(
"vertical-align", "vertical-align",
"VerticalAlign", "VerticalAlign",
"computed::VerticalAlign::baseline()", "computed::VerticalAlign::baseline()",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align", spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align",
servo_restyle_damage = "reflow", servo_restyle_damage = "reflow",
@ -99,13 +100,15 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"-servo-overflow-clip-box", "-servo-overflow-clip-box",
"padding-box content-box", "padding-box content-box",
engines="servo-2013", engines="servo",
servo_pref="layout.legacy_layout",
animation_value_type="none", animation_value_type="none",
enabled_in="ua", enabled_in="ua",
spec="Internal, not web-exposed, \ spec="Internal, not web-exposed, \
may be standardized in the future (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)", may be standardized in the future (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)",
)} )}
% for direction in ["inline", "block"]: % for direction in ["inline", "block"]:
${helpers.predefined_type( ${helpers.predefined_type(
"overflow-clip-box-" + direction, "overflow-clip-box-" + direction,
@ -126,7 +129,7 @@ ${helpers.single_keyword(
full_name, full_name,
"Overflow", "Overflow",
"computed::Overflow::Visible", "computed::Overflow::Visible",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
logical_group="overflow", logical_group="overflow",
logical=logical, logical=logical,
animation_value_type="discrete", animation_value_type="discrete",
@ -153,7 +156,7 @@ ${helpers.predefined_type(
"transition-duration", "transition-duration",
"Time", "Time",
"computed::Time::zero()", "computed::Time::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Time::zero()", initial_specified_value="specified::Time::zero()",
parse_method="parse_non_negative", parse_method="parse_non_negative",
vector=True, vector=True,
@ -167,7 +170,7 @@ ${helpers.predefined_type(
"transition-timing-function", "transition-timing-function",
"TimingFunction", "TimingFunction",
"computed::TimingFunction::ease()", "computed::TimingFunction::ease()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::TimingFunction::ease()", initial_specified_value="specified::TimingFunction::ease()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -180,7 +183,7 @@ ${helpers.predefined_type(
"transition-property", "transition-property",
"TransitionProperty", "TransitionProperty",
"computed::TransitionProperty::all()", "computed::TransitionProperty::all()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::TransitionProperty::all()", initial_specified_value="specified::TransitionProperty::all()",
vector=True, vector=True,
allow_empty="NotInitial", allow_empty="NotInitial",
@ -194,7 +197,7 @@ ${helpers.predefined_type(
"transition-delay", "transition-delay",
"Time", "Time",
"computed::Time::zero()", "computed::Time::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Time::zero()", initial_specified_value="specified::Time::zero()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -209,7 +212,7 @@ ${helpers.predefined_type(
"animation-name", "animation-name",
"AnimationName", "AnimationName",
"computed::AnimationName::none()", "computed::AnimationName::none()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::AnimationName::none()", initial_specified_value="specified::AnimationName::none()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -223,7 +226,7 @@ ${helpers.predefined_type(
"animation-duration", "animation-duration",
"Time", "Time",
"computed::Time::zero()", "computed::Time::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Time::zero()", initial_specified_value="specified::Time::zero()",
parse_method="parse_non_negative", parse_method="parse_non_negative",
vector=True, vector=True,
@ -239,7 +242,7 @@ ${helpers.predefined_type(
"animation-timing-function", "animation-timing-function",
"TimingFunction", "TimingFunction",
"computed::TimingFunction::ease()", "computed::TimingFunction::ease()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::TimingFunction::ease()", initial_specified_value="specified::TimingFunction::ease()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -252,7 +255,7 @@ ${helpers.predefined_type(
"animation-iteration-count", "animation-iteration-count",
"AnimationIterationCount", "AnimationIterationCount",
"computed::AnimationIterationCount::one()", "computed::AnimationIterationCount::one()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::AnimationIterationCount::one()", initial_specified_value="specified::AnimationIterationCount::one()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -266,7 +269,7 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"animation-direction", "animation-direction",
"normal reverse alternate alternate-reverse", "normal reverse alternate alternate-reverse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
need_index=True, need_index=True,
animation_value_type="none", animation_value_type="none",
vector=True, vector=True,
@ -281,7 +284,7 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"animation-play-state", "animation-play-state",
"running paused", "running paused",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
need_index=True, need_index=True,
animation_value_type="none", animation_value_type="none",
vector=True, vector=True,
@ -294,7 +297,7 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"animation-fill-mode", "animation-fill-mode",
"none forwards backwards both", "none forwards backwards both",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
need_index=True, need_index=True,
animation_value_type="none", animation_value_type="none",
vector=True, vector=True,
@ -309,7 +312,7 @@ ${helpers.predefined_type(
"animation-delay", "animation-delay",
"Time", "Time",
"computed::Time::zero()", "computed::Time::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Time::zero()", initial_specified_value="specified::Time::zero()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -323,9 +326,8 @@ ${helpers.predefined_type(
"animation-timeline", "animation-timeline",
"AnimationTimeline", "AnimationTimeline",
"computed::AnimationTimeline::auto()", "computed::AnimationTimeline::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2013_pref="layout.2013.unimplemented", servo_pref="layout.unimplemented",
servo_2020_pref="layout.2020.unimplemented",
initial_specified_value="specified::AnimationTimeline::auto()", initial_specified_value="specified::AnimationTimeline::auto()",
vector=True, vector=True,
need_index=True, need_index=True,
@ -341,7 +343,7 @@ ${helpers.predefined_type(
"transform", "transform",
"Transform", "Transform",
"generics::transform::Transform::none()", "generics::transform::Transform::none()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_prefixes=transform_extra_prefixes, extra_prefixes=transform_extra_prefixes,
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
flags="CAN_ANIMATE_ON_COMPOSITOR", flags="CAN_ANIMATE_ON_COMPOSITOR",
@ -353,7 +355,7 @@ ${helpers.predefined_type(
"rotate", "rotate",
"Rotate", "Rotate",
"generics::transform::Rotate::None", "generics::transform::Rotate::None",
engines="gecko servo-2013", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
boxed=True, boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR", flags="CAN_ANIMATE_ON_COMPOSITOR",
@ -366,7 +368,7 @@ ${helpers.predefined_type(
"scale", "scale",
"Scale", "Scale",
"generics::transform::Scale::None", "generics::transform::Scale::None",
engines="gecko servo-2013", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
boxed=True, boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR", flags="CAN_ANIMATE_ON_COMPOSITOR",
@ -379,7 +381,7 @@ ${helpers.predefined_type(
"translate", "translate",
"Translate", "Translate",
"generics::transform::Translate::None", "generics::transform::Translate::None",
engines="gecko servo-2013", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
boxed=True, boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR", flags="CAN_ANIMATE_ON_COMPOSITOR",
@ -538,7 +540,7 @@ ${helpers.predefined_type(
"perspective", "perspective",
"Perspective", "Perspective",
"computed::Perspective::none()", "computed::Perspective::none()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
gecko_ffi_name="mChildPerspective", gecko_ffi_name="mChildPerspective",
spec="https://drafts.csswg.org/css-transforms/#perspective", spec="https://drafts.csswg.org/css-transforms/#perspective",
extra_prefixes=transform_extra_prefixes, extra_prefixes=transform_extra_prefixes,
@ -550,7 +552,7 @@ ${helpers.predefined_type(
"perspective-origin", "perspective-origin",
"Position", "Position",
"computed::position::Position::center()", "computed::position::Position::center()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
boxed=True, boxed=True,
extra_prefixes=transform_extra_prefixes, extra_prefixes=transform_extra_prefixes,
spec="https://drafts.csswg.org/css-transforms-2/#perspective-origin-property", spec="https://drafts.csswg.org/css-transforms-2/#perspective-origin-property",
@ -561,7 +563,7 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"backface-visibility", "backface-visibility",
"visible hidden", "visible hidden",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
gecko_enum_prefix="StyleBackfaceVisibility", gecko_enum_prefix="StyleBackfaceVisibility",
spec="https://drafts.csswg.org/css-transforms/#backface-visibility-property", spec="https://drafts.csswg.org/css-transforms/#backface-visibility-property",
extra_prefixes=transform_extra_prefixes, extra_prefixes=transform_extra_prefixes,
@ -582,7 +584,7 @@ ${helpers.predefined_type(
"transform-style", "transform-style",
"TransformStyle", "TransformStyle",
"computed::TransformStyle::Flat", "computed::TransformStyle::Flat",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-transforms-2/#transform-style-property", spec="https://drafts.csswg.org/css-transforms-2/#transform-style-property",
extra_prefixes=transform_extra_prefixes, extra_prefixes=transform_extra_prefixes,
animation_value_type="discrete", animation_value_type="discrete",
@ -593,7 +595,7 @@ ${helpers.predefined_type(
"transform-origin", "transform-origin",
"TransformOrigin", "TransformOrigin",
"computed::TransformOrigin::initial_value()", "computed::TransformOrigin::initial_value()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
extra_prefixes=transform_extra_prefixes, extra_prefixes=transform_extra_prefixes,
gecko_ffi_name="mTransformOrigin", gecko_ffi_name="mTransformOrigin",

View file

@ -10,11 +10,10 @@ ${helpers.predefined_type(
"column-width", "column-width",
"length::NonNegativeLengthOrAuto", "length::NonNegativeLengthOrAuto",
"computed::length::NonNegativeLengthOrAuto::auto()", "computed::length::NonNegativeLengthOrAuto::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented",
initial_specified_value="specified::length::NonNegativeLengthOrAuto::auto()", initial_specified_value="specified::length::NonNegativeLengthOrAuto::auto()",
animation_value_type="NonNegativeLengthOrAuto", animation_value_type="NonNegativeLengthOrAuto",
servo_2013_pref="layout.columns.enabled", servo_pref="layout.columns.enabled",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-width", spec="https://drafts.csswg.org/css-multicol/#propdef-column-width",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
)} )}
@ -23,10 +22,9 @@ ${helpers.predefined_type(
"column-count", "column-count",
"ColumnCount", "ColumnCount",
"computed::ColumnCount::auto()", "computed::ColumnCount::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented",
initial_specified_value="specified::ColumnCount::auto()", initial_specified_value="specified::ColumnCount::auto()",
servo_2013_pref="layout.columns.enabled", servo_pref="layout.columns.enabled",
animation_value_type="AnimatedColumnCount", animation_value_type="AnimatedColumnCount",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count", spec="https://drafts.csswg.org/css-multicol/#propdef-column-count",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -67,8 +65,8 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"column-span", "column-span",
"none all", "none all",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.columns.enabled",
animation_value_type="discrete", animation_value_type="discrete",
gecko_enum_prefix="StyleColumnSpan", gecko_enum_prefix="StyleColumnSpan",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-span", spec="https://drafts.csswg.org/css-multicol/#propdef-column-span",

View file

@ -10,7 +10,7 @@ ${helpers.predefined_type(
"content", "content",
"Content", "Content",
"computed::Content::normal()", "computed::Content::normal()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Content::normal()", initial_specified_value="specified::Content::normal()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-content/#propdef-content", spec="https://drafts.csswg.org/css-content/#propdef-content",
@ -20,7 +20,8 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"counter-increment", "counter-increment",
"CounterIncrement", "CounterIncrement",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
initial_value="Default::default()", initial_value="Default::default()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment", spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment",
@ -30,7 +31,8 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"counter-reset", "counter-reset",
"CounterReset", "CounterReset",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
initial_value="Default::default()", initial_value="Default::default()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset", spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",

View file

@ -11,7 +11,7 @@ ${helpers.predefined_type(
"opacity", "opacity",
"Opacity", "Opacity",
"1.0", "1.0",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
flags="CAN_ANIMATE_ON_COMPOSITOR", flags="CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.csswg.org/css-color/#transparency", spec="https://drafts.csswg.org/css-color/#transparency",
@ -22,8 +22,8 @@ ${helpers.predefined_type(
"box-shadow", "box-shadow",
"BoxShadow", "BoxShadow",
None, None,
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
vector=True, vector=True,
simple_vector_bindings=True, simple_vector_bindings=True,
animation_value_type="AnimatedBoxShadowList", animation_value_type="AnimatedBoxShadowList",
@ -37,7 +37,7 @@ ${helpers.predefined_type(
"clip", "clip",
"ClipRectOrAuto", "ClipRectOrAuto",
"computed::ClipRectOrAuto::auto()", "computed::ClipRectOrAuto::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
boxed=True, boxed=True,
allow_quirks="Yes", allow_quirks="Yes",
@ -48,7 +48,7 @@ ${helpers.predefined_type(
"filter", "filter",
"Filter", "Filter",
None, None,
engines="gecko servo-2013 servo-2020", engines="gecko servo",
vector=True, vector=True,
simple_vector_bindings=True, simple_vector_bindings=True,
gecko_ffi_name="mFilters", gecko_ffi_name="mFilters",
@ -79,7 +79,7 @@ ${helpers.single_keyword(
"""normal multiply screen overlay darken lighten color-dodge """normal multiply screen overlay darken lighten color-dodge
color-burn hard-light soft-light difference exclusion hue color-burn hard-light soft-light difference exclusion hue
saturation color luminosity""" + ("plus-lighter" if engine == 'gecko' else ""), saturation color luminosity""" + ("plus-lighter" if engine == 'gecko' else ""),
engines="gecko servo-2013 servo-2020", engines="gecko servo",
gecko_enum_prefix="StyleBlend", gecko_enum_prefix="StyleBlend",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode", spec="https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode",

View file

@ -10,7 +10,7 @@
${helpers.predefined_type( ${helpers.predefined_type(
"font-family", "font-family",
"FontFamily", "FontFamily",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::FontFamily::serif()", initial_value="computed::FontFamily::serif()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-fonts/#propdef-font-family", spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
@ -20,7 +20,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"font-style", "font-style",
"FontStyle", "FontStyle",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::FontStyle::normal()", initial_value="computed::FontStyle::normal()",
initial_specified_value="specified::FontStyle::normal()", initial_specified_value="specified::FontStyle::normal()",
animation_value_type="FontStyle", animation_value_type="FontStyle",
@ -37,7 +37,7 @@ ${helpers.predefined_type(
${helpers.single_keyword_system( ${helpers.single_keyword_system(
"font-variant-caps", "font-variant-caps",
"normal small-caps", "normal small-caps",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_gecko_values="all-small-caps petite-caps all-petite-caps unicase titling-caps", extra_gecko_values="all-small-caps petite-caps all-petite-caps unicase titling-caps",
gecko_constant_prefix="NS_FONT_VARIANT_CAPS", gecko_constant_prefix="NS_FONT_VARIANT_CAPS",
gecko_ffi_name="mFont.variantCaps", gecko_ffi_name="mFont.variantCaps",
@ -50,7 +50,7 @@ ${helpers.single_keyword_system(
${helpers.predefined_type( ${helpers.predefined_type(
"font-weight", "font-weight",
"FontWeight", "FontWeight",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::FontWeight::normal()", initial_value="computed::FontWeight::normal()",
initial_specified_value="specified::FontWeight::normal()", initial_specified_value="specified::FontWeight::normal()",
animation_value_type="Number", animation_value_type="Number",
@ -61,7 +61,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"font-size", "font-size",
"FontSize", "FontSize",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::FontSize::medium()", initial_value="computed::FontSize::medium()",
initial_specified_value="specified::FontSize::medium()", initial_specified_value="specified::FontSize::medium()",
animation_value_type="NonNegativeLength", animation_value_type="NonNegativeLength",
@ -92,7 +92,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"font-stretch", "font-stretch",
"FontStretch", "FontStretch",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::FontStretch::hundred()", initial_value="computed::FontStretch::hundred()",
initial_specified_value="specified::FontStretch::normal()", initial_specified_value="specified::FontStretch::normal()",
animation_value_type="Percentage", animation_value_type="Percentage",

View file

@ -10,7 +10,7 @@
${helpers.single_keyword( ${helpers.single_keyword(
"visibility", "visibility",
"visible hidden collapse", "visible hidden collapse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
gecko_ffi_name="mVisible", gecko_ffi_name="mVisible",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-box/#propdef-visibility", spec="https://drafts.csswg.org/css-box/#propdef-visibility",
@ -22,13 +22,12 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"writing-mode", "writing-mode",
"horizontal-tb vertical-rl vertical-lr", "horizontal-tb vertical-rl vertical-lr",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_gecko_values="sideways-rl sideways-lr", extra_gecko_values="sideways-rl sideways-lr",
gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \ gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
rl=horizontal-tb rl-tb=horizontal-tb \ rl=horizontal-tb rl-tb=horizontal-tb \
tb=vertical-rl tb-rl=vertical-rl", tb=vertical-rl tb-rl=vertical-rl",
servo_2013_pref="layout.writing-mode.enabled", servo_pref="layout.writing-mode.enabled",
servo_2020_pref="layout.writing-mode.enabled",
animation_value_type="none", animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode", spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
gecko_enum_prefix="StyleWritingModeProperty", gecko_enum_prefix="StyleWritingModeProperty",
@ -38,8 +37,8 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"direction", "direction",
"ltr rtl", "ltr rtl",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
animation_value_type="none", animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction", spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
gecko_enum_prefix="StyleDirection", gecko_enum_prefix="StyleDirection",
@ -72,7 +71,7 @@ ${helpers.predefined_type(
"image-rendering", "image-rendering",
"ImageRendering", "ImageRendering",
"computed::ImageRendering::Auto", "computed::ImageRendering::Auto",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-images/#propdef-image-rendering", spec="https://drafts.csswg.org/css-images/#propdef-image-rendering",
animation_value_type="discrete", animation_value_type="discrete",
)} )}

View file

@ -9,7 +9,8 @@
${helpers.single_keyword( ${helpers.single_keyword(
"border-collapse", "border-collapse",
"separate collapse", "separate collapse",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
gecko_enum_prefix="StyleBorderCollapse", gecko_enum_prefix="StyleBorderCollapse",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-tables/#propdef-border-collapse", spec="https://drafts.csswg.org/css-tables/#propdef-border-collapse",
@ -19,7 +20,8 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"empty-cells", "empty-cells",
"show hide", "show hide",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
gecko_enum_prefix="StyleEmptyCells", gecko_enum_prefix="StyleEmptyCells",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-tables/#propdef-empty-cells", spec="https://drafts.csswg.org/css-tables/#propdef-empty-cells",
@ -30,7 +32,8 @@ ${helpers.predefined_type(
"caption-side", "caption-side",
"table::CaptionSide", "table::CaptionSide",
"computed::table::CaptionSide::Top", "computed::table::CaptionSide::Top",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-tables/#propdef-caption-side", spec="https://drafts.csswg.org/css-tables/#propdef-caption-side",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -40,8 +43,8 @@ ${helpers.predefined_type(
"border-spacing", "border-spacing",
"BorderSpacing", "BorderSpacing",
"computed::BorderSpacing::zero()", "computed::BorderSpacing::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
animation_value_type="BorderSpacing", animation_value_type="BorderSpacing",
boxed=True, boxed=True,
spec="https://drafts.csswg.org/css-tables/#propdef-border-spacing", spec="https://drafts.csswg.org/css-tables/#propdef-border-spacing",

View file

@ -10,7 +10,7 @@ ${helpers.predefined_type(
"color", "color",
"ColorPropertyValue", "ColorPropertyValue",
"::cssparser::RGBA::new(0, 0, 0, 255)", "::cssparser::RGBA::new(0, 0, 0, 255)",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="AnimatedRGBA", animation_value_type="AnimatedRGBA",
ignored_when_colors_disabled="True", ignored_when_colors_disabled="True",
spec="https://drafts.csswg.org/css-color/#color", spec="https://drafts.csswg.org/css-color/#color",
@ -20,7 +20,7 @@ ${helpers.predefined_type(
"line-height", "line-height",
"LineHeight", "LineHeight",
"computed::LineHeight::normal()", "computed::LineHeight::normal()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="LineHeight", animation_value_type="LineHeight",
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height", spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height",
servo_restyle_damage="reflow" servo_restyle_damage="reflow"
@ -32,7 +32,8 @@ ${helpers.predefined_type(
"text-transform", "text-transform",
"TextTransform", "TextTransform",
"computed::TextTransform::none()", "computed::TextTransform::none()",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-transform", spec="https://drafts.csswg.org/css-text/#propdef-text-transform",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -64,7 +65,7 @@ ${helpers.predefined_type(
"text-indent", "text-indent",
"LengthPercentage", "LengthPercentage",
"computed::LengthPercentage::zero()", "computed::LengthPercentage::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-text-indent", spec="https://drafts.csswg.org/css-text/#propdef-text-indent",
allow_quirks="Yes", allow_quirks="Yes",
@ -77,8 +78,8 @@ ${helpers.predefined_type(
"overflow-wrap", "overflow-wrap",
"OverflowWrap", "OverflowWrap",
"computed::OverflowWrap::Normal", "computed::OverflowWrap::Normal",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap", spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
aliases="word-wrap", aliases="word-wrap",
@ -89,8 +90,8 @@ ${helpers.predefined_type(
"word-break", "word-break",
"WordBreak", "WordBreak",
"computed::WordBreak::Normal", "computed::WordBreak::Normal",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-word-break", spec="https://drafts.csswg.org/css-text/#propdef-word-break",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -100,8 +101,8 @@ ${helpers.predefined_type(
"text-justify", "text-justify",
"TextJustify", "TextJustify",
"computed::TextJustify::Auto", "computed::TextJustify::Auto",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-justify", spec="https://drafts.csswg.org/css-text/#propdef-text-justify",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -121,7 +122,7 @@ ${helpers.predefined_type(
"text-align", "text-align",
"TextAlign", "TextAlign",
"computed::TextAlign::Start", "computed::TextAlign::Start",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-align", spec="https://drafts.csswg.org/css-text/#propdef-text-align",
servo_restyle_damage = "reflow", servo_restyle_damage = "reflow",
@ -131,7 +132,7 @@ ${helpers.predefined_type(
"letter-spacing", "letter-spacing",
"LetterSpacing", "LetterSpacing",
"computed::LetterSpacing::normal()", "computed::LetterSpacing::normal()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing", spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -141,7 +142,7 @@ ${helpers.predefined_type(
"word-spacing", "word-spacing",
"WordSpacing", "WordSpacing",
"computed::WordSpacing::zero()", "computed::WordSpacing::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-word-spacing", spec="https://drafts.csswg.org/css-text/#propdef-word-spacing",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -150,7 +151,7 @@ ${helpers.predefined_type(
<%helpers:single_keyword <%helpers:single_keyword
name="white-space" name="white-space"
values="normal pre nowrap pre-wrap pre-line" values="normal pre nowrap pre-wrap pre-line"
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_gecko_values="break-spaces -moz-pre-space" extra_gecko_values="break-spaces -moz-pre-space"
gecko_enum_prefix="StyleWhiteSpace" gecko_enum_prefix="StyleWhiteSpace"
needs_conversion="True" needs_conversion="True"
@ -158,7 +159,7 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-text/#propdef-white-space" spec="https://drafts.csswg.org/css-text/#propdef-white-space"
servo_restyle_damage="rebuild_and_reflow" servo_restyle_damage="rebuild_and_reflow"
> >
% if engine in ["servo-2013", "servo-2020"]: % if engine == "servo":
impl SpecifiedValue { impl SpecifiedValue {
pub fn allow_wrap(&self) -> bool { pub fn allow_wrap(&self) -> bool {
match *self { match *self {
@ -197,7 +198,8 @@ ${helpers.predefined_type(
"text-shadow", "text-shadow",
"SimpleShadow", "SimpleShadow",
None, None,
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
vector=True, vector=True,
vector_animation_type="with_zero", vector_animation_type="with_zero",
animation_value_type="AnimatedTextShadowList", animation_value_type="AnimatedTextShadowList",
@ -325,7 +327,7 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"text-rendering", "text-rendering",
"auto optimizespeed optimizelegibility geometricprecision", "auto optimizespeed optimizelegibility geometricprecision",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
gecko_enum_prefix="StyleTextRendering", gecko_enum_prefix="StyleTextRendering",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty", spec="https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty",

View file

@ -10,7 +10,7 @@ ${helpers.predefined_type(
"cursor", "cursor",
"Cursor", "Cursor",
"computed::Cursor::auto()", "computed::Cursor::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Cursor::auto()", initial_specified_value="specified::Cursor::auto()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-ui/#cursor", spec="https://drafts.csswg.org/css-ui/#cursor",
@ -22,7 +22,7 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"pointer-events", "pointer-events",
"auto none", "auto none",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="discrete", animation_value_type="discrete",
extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all", extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all",
spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty", spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty",

View file

@ -9,8 +9,8 @@
${helpers.single_keyword( ${helpers.single_keyword(
"list-style-position", "list-style-position",
"outside inside", "outside inside",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.2020.unimplemented", servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position", spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -22,17 +22,16 @@ ${helpers.single_keyword(
// upper-roman // upper-roman
// //
// [1]: http://dev.w3.org/csswg/css-counter-styles/ // [1]: http://dev.w3.org/csswg/css-counter-styles/
% if engine in ["servo-2013", "servo-2020"]: % if engine == "servo":
${helpers.single_keyword( ${helpers.single_keyword(
"list-style-type", "list-style-type",
"disc none circle square disclosure-open disclosure-closed", """disc none circle square disclosure-open disclosure-closed
extra_servo_2013_values=""" decimal lower-alpha upper-alpha arabic-indic bengali cambodian cjk-decimal devanagari
decimal lower-alpha upper-alpha arabic-indic bengali cambodian cjk-decimal devanagari gujarati gurmukhi kannada khmer lao malayalam mongolian myanmar oriya persian telugu
gujarati gurmukhi kannada khmer lao malayalam mongolian myanmar oriya persian telugu thai tibetan cjk-earthly-branch cjk-heavenly-stem lower-greek hiragana hiragana-iroha
thai tibetan cjk-earthly-branch cjk-heavenly-stem lower-greek hiragana hiragana-iroha katakana katakana-iroha
katakana katakana-iroha
""", """,
engines="servo-2013 servo-2020", engines="servo",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type", spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -55,12 +54,12 @@ ${helpers.single_keyword(
${helpers.predefined_type( ${helpers.predefined_type(
"list-style-image", "list-style-image",
"Image", "Image",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_value="computed::Image::None", initial_value="computed::Image::None",
initial_specified_value="specified::Image::None", initial_specified_value="specified::Image::None",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image", spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image",
boxed=engine == "servo-2013", boxed=engine == "servo",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
)} )}
@ -68,7 +67,8 @@ ${helpers.predefined_type(
"quotes", "quotes",
"Quotes", "Quotes",
"computed::Quotes::get_initial_value()", "computed::Quotes::get_initial_value()",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-content/#propdef-quotes", spec="https://drafts.csswg.org/css-content/#propdef-quotes",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",

View file

@ -16,7 +16,7 @@
"margin-%s" % side[0], "margin-%s" % side[0],
"LengthPercentageOrAuto", "LengthPercentageOrAuto",
"computed::LengthPercentageOrAuto::zero()", "computed::LengthPercentageOrAuto::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-margin-%s"), aliases=maybe_moz_logical_alias(engine, side, "-moz-margin-%s"),
allow_quirks="No" if side[1] else "Yes", allow_quirks="No" if side[1] else "Yes",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",

View file

@ -14,7 +14,7 @@ ${helpers.predefined_type(
"outline-color", "outline-color",
"Color", "Color",
"computed_value::T::currentcolor()", "computed_value::T::currentcolor()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Color::currentcolor()", initial_specified_value="specified::Color::currentcolor()",
animation_value_type="AnimatedColor", animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True, ignored_when_colors_disabled=True,
@ -25,7 +25,7 @@ ${helpers.predefined_type(
"outline-style", "outline-style",
"OutlineStyle", "OutlineStyle",
"computed::OutlineStyle::none()", "computed::OutlineStyle::none()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::OutlineStyle::none()", initial_specified_value="specified::OutlineStyle::none()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style", spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
@ -35,7 +35,7 @@ ${helpers.predefined_type(
"outline-width", "outline-width",
"BorderSideWidth", "BorderSideWidth",
"crate::values::computed::NonNegativeLength::new(3.)", "crate::values::computed::NonNegativeLength::new(3.)",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::BorderSideWidth::Medium", initial_specified_value="specified::BorderSideWidth::Medium",
computed_type="crate::values::computed::NonNegativeLength", computed_type="crate::values::computed::NonNegativeLength",
animation_value_type="NonNegativeLength", animation_value_type="NonNegativeLength",
@ -46,7 +46,7 @@ ${helpers.predefined_type(
"outline-offset", "outline-offset",
"Length", "Length",
"crate::values::computed::Length::new(0.)", "crate::values::computed::Length::new(0.)",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset", spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset",
)} )}

View file

@ -16,7 +16,7 @@
"padding-%s" % side[0], "padding-%s" % side[0],
"NonNegativeLengthPercentage", "NonNegativeLengthPercentage",
"computed::NonNegativeLengthPercentage::zero()", "computed::NonNegativeLengthPercentage::zero()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-padding-%s"), aliases=maybe_moz_logical_alias(engine, side, "-moz-padding-%s"),
animation_value_type="NonNegativeLengthPercentage", animation_value_type="NonNegativeLengthPercentage",
logical=side[1], logical=side[1],

View file

@ -14,7 +14,7 @@
side, side,
"LengthPercentageOrAuto", "LengthPercentageOrAuto",
"computed::LengthPercentageOrAuto::auto()", "computed::LengthPercentageOrAuto::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side, spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
allow_quirks="Yes", allow_quirks="Yes",
@ -28,7 +28,7 @@
"inset-%s" % side, "inset-%s" % side,
"LengthPercentageOrAuto", "LengthPercentageOrAuto",
"computed::LengthPercentageOrAuto::auto()", "computed::LengthPercentageOrAuto::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side, spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side,
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
logical=True, logical=True,
@ -58,7 +58,7 @@ ${helpers.predefined_type(
"z-index", "z-index",
"ZIndex", "ZIndex",
"computed::ZIndex::auto()", "computed::ZIndex::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://www.w3.org/TR/CSS2/visuren.html#z-index", spec="https://www.w3.org/TR/CSS2/visuren.html#z-index",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
)} )}
@ -70,8 +70,8 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"flex-direction", "flex-direction",
"row row-reverse column column-reverse", "row row-reverse column column-reverse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property", spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="discrete", animation_value_type="discrete",
@ -82,8 +82,8 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"flex-wrap", "flex-wrap",
"nowrap wrap wrap-reverse", "nowrap wrap wrap-reverse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property", spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="discrete", animation_value_type="discrete",
@ -91,13 +91,13 @@ ${helpers.single_keyword(
gecko_enum_prefix = "StyleFlexWrap", gecko_enum_prefix = "StyleFlexWrap",
)} )}
% if engine in ["servo-2013", "servo-2020"]: % if engine in "servo":
// FIXME: Update Servo to support the same Syntax as Gecko. // FIXME: Update Servo to support the same Syntax as Gecko.
${helpers.single_keyword( ${helpers.single_keyword(
"justify-content", "justify-content",
"flex-start stretch flex-end center space-between space-around", "flex-start stretch flex-end center space-between space-around",
engines="servo-2013 servo-2020", engines="servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit", extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-align/#propdef-justify-content", spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
animation_value_type="discrete", animation_value_type="discrete",
@ -128,13 +128,13 @@ ${helpers.single_keyword(
)} )}
% endif % endif
% if engine in ["servo-2013", "servo-2020"]: % if engine == "servo":
// FIXME: Update Servo to support the same Syntax as Gecko. // FIXME: Update Servo to support the same Syntax as Gecko.
${helpers.single_keyword( ${helpers.single_keyword(
"align-content", "align-content",
"stretch flex-start flex-end center space-between space-around", "stretch flex-start flex-end center space-between space-around",
engines="servo-2013 servo-2020", engines="servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit", extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-align/#propdef-align-content", spec="https://drafts.csswg.org/css-align/#propdef-align-content",
animation_value_type="discrete", animation_value_type="discrete",
@ -144,8 +144,8 @@ ${helpers.single_keyword(
${helpers.single_keyword( ${helpers.single_keyword(
"align-items", "align-items",
"stretch flex-start flex-end center baseline", "stretch flex-start flex-end center baseline",
engines="servo-2013 servo-2020", engines="servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit", extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#align-items-property", spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
animation_value_type="discrete", animation_value_type="discrete",
@ -207,8 +207,8 @@ ${helpers.predefined_type(
"flex-grow", "flex-grow",
"NonNegativeNumber", "NonNegativeNumber",
"From::from(0.0)", "From::from(0.0)",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property", spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="NonNegativeNumber", animation_value_type="NonNegativeNumber",
@ -219,8 +219,8 @@ ${helpers.predefined_type(
"flex-shrink", "flex-shrink",
"NonNegativeNumber", "NonNegativeNumber",
"From::from(1.0)", "From::from(1.0)",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property", spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="NonNegativeNumber", animation_value_type="NonNegativeNumber",
@ -228,13 +228,13 @@ ${helpers.predefined_type(
)} )}
// https://drafts.csswg.org/css-align/#align-self-property // https://drafts.csswg.org/css-align/#align-self-property
% if engine in ["servo-2013", "servo-2020"]: % if engine == "servo":
// FIXME: Update Servo to support the same syntax as Gecko. // FIXME: Update Servo to support the same syntax as Gecko.
${helpers.single_keyword( ${helpers.single_keyword(
"align-self", "align-self",
"auto stretch flex-start flex-end center baseline", "auto stretch flex-start flex-end center baseline",
engines="servo-2013 servo-2020", engines="servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit", extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self", spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
animation_value_type="discrete", animation_value_type="discrete",
@ -270,8 +270,8 @@ ${helpers.predefined_type(
"order", "order",
"Integer", "Integer",
"0", "0",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-flexbox/#order-property", spec="https://drafts.csswg.org/css-flexbox/#order-property",
@ -282,8 +282,8 @@ ${helpers.predefined_type(
"flex-basis", "flex-basis",
"FlexBasis", "FlexBasis",
"computed::FlexBasis::auto()", "computed::FlexBasis::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property", spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="FlexBasis", animation_value_type="FlexBasis",
@ -302,7 +302,7 @@ ${helpers.predefined_type(
size, size,
"Size", "Size",
"computed::Size::auto()", "computed::Size::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
logical=logical, logical=logical,
logical_group="size", logical_group="size",
allow_quirks="No" if logical else "Yes", allow_quirks="No" if logical else "Yes",
@ -315,7 +315,7 @@ ${helpers.predefined_type(
"min-%s" % size, "min-%s" % size,
"Size", "Size",
"computed::Size::auto()", "computed::Size::auto()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
logical=logical, logical=logical,
logical_group="min-size", logical_group="min-size",
allow_quirks="No" if logical else "Yes", allow_quirks="No" if logical else "Yes",
@ -327,7 +327,7 @@ ${helpers.predefined_type(
"max-%s" % size, "max-%s" % size,
"MaxSize", "MaxSize",
"computed::MaxSize::none()", "computed::MaxSize::none()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
logical=logical, logical=logical,
logical_group="max-size", logical_group="max-size",
allow_quirks="No" if logical else "Yes", allow_quirks="No" if logical else "Yes",
@ -340,7 +340,7 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"box-sizing", "box-sizing",
"content-box border-box", "content-box border-box",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
extra_prefixes="moz:layout.css.prefixes.box-sizing webkit", extra_prefixes="moz:layout.css.prefixes.box-sizing webkit",
spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing", spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
gecko_enum_prefix="StyleBoxSizing", gecko_enum_prefix="StyleBoxSizing",
@ -432,9 +432,9 @@ ${helpers.predefined_type(
"column-gap", "column-gap",
"length::NonNegativeLengthPercentageOrNormal", "length::NonNegativeLengthPercentageOrNormal",
"computed::length::NonNegativeLengthPercentageOrNormal::normal()", "computed::length::NonNegativeLengthPercentageOrNormal::normal()",
engines="gecko servo-2013", engines="gecko servo",
aliases="grid-column-gap" if engine == "gecko" else "", aliases="grid-column-gap" if engine == "gecko" else "",
servo_2013_pref="layout.columns.enabled", servo_pref="layout.columns.enabled",
spec="https://drafts.csswg.org/css-align-3/#propdef-column-gap", spec="https://drafts.csswg.org/css-align-3/#propdef-column-gap",
animation_value_type="NonNegativeLengthPercentageOrNormal", animation_value_type="NonNegativeLengthPercentageOrNormal",
servo_restyle_damage="reflow", servo_restyle_damage="reflow",
@ -456,7 +456,8 @@ ${helpers.predefined_type(
"aspect-ratio", "aspect-ratio",
"AspectRatio", "AspectRatio",
"computed::AspectRatio::auto()", "computed::AspectRatio::auto()",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-sizing-4/#aspect-ratio", spec="https://drafts.csswg.org/css-sizing-4/#aspect-ratio",
gecko_pref="layout.css.aspect-ratio.enabled", gecko_pref="layout.css.aspect-ratio.enabled",

View file

@ -9,7 +9,8 @@
${helpers.single_keyword( ${helpers.single_keyword(
"table-layout", "table-layout",
"auto fixed", "auto fixed",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
gecko_ffi_name="mLayoutStrategy", gecko_ffi_name="mLayoutStrategy",
animation_value_type="discrete", animation_value_type="discrete",
gecko_enum_prefix="StyleTableLayout", gecko_enum_prefix="StyleTableLayout",

View file

@ -11,7 +11,8 @@ ${helpers.predefined_type(
"text-overflow", "text-overflow",
"TextOverflow", "TextOverflow",
"computed::TextOverflow::get_initial_value()", "computed::TextOverflow::get_initial_value()",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="discrete", animation_value_type="discrete",
boxed=True, boxed=True,
spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow", spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",
@ -21,7 +22,8 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"unicode-bidi", "unicode-bidi",
"normal embed isolate bidi-override isolate-override plaintext", "normal embed isolate bidi-override isolate-override plaintext",
engines="gecko servo-2013", engines="gecko servo",
servo_pref="layout.legacy_layout",
animation_value_type="none", animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi", spec="https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
@ -31,7 +33,7 @@ ${helpers.predefined_type(
"text-decoration-line", "text-decoration-line",
"TextDecorationLine", "TextDecorationLine",
"specified::TextDecorationLine::none()", "specified::TextDecorationLine::none()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::TextDecorationLine::none()", initial_specified_value="specified::TextDecorationLine::none()",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line", spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
@ -41,7 +43,7 @@ ${helpers.predefined_type(
${helpers.single_keyword( ${helpers.single_keyword(
"text-decoration-style", "text-decoration-style",
"solid double dotted dashed wavy -moz-none", "solid double dotted dashed wavy -moz-none",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
animation_value_type="discrete", animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style", spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style",
)} )}
@ -50,7 +52,7 @@ ${helpers.predefined_type(
"text-decoration-color", "text-decoration-color",
"Color", "Color",
"computed_value::T::currentcolor()", "computed_value::T::currentcolor()",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
initial_specified_value="specified::Color::currentcolor()", initial_specified_value="specified::Color::currentcolor()",
animation_value_type="AnimatedColor", animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True, ignored_when_colors_disabled=True,

View file

@ -177,7 +177,7 @@ pub mod shorthands {
data.declare_shorthand( data.declare_shorthand(
"all", "all",
logical_longhands + other_longhands, logical_longhands + other_longhands,
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-cascade-3/#all-shorthand" spec="https://drafts.csswg.org/css-cascade-3/#all-shorthand"
) )
%> %>
@ -542,8 +542,7 @@ impl NonCustomPropertyId {
}] = [ }] = [
% for property in data.longhands + data.shorthands + data.all_aliases(): % for property in data.longhands + data.shorthands + data.all_aliases():
<% <%
attrs = {"servo-2013": "servo_2013_pref", "servo-2020": "servo_2020_pref"} pref = getattr(property, "servo_pref")
pref = getattr(property, attrs[engine])
%> %>
% if pref: % if pref:
Some("${pref}"), Some("${pref}"),
@ -1351,9 +1350,7 @@ impl LonghandId {
LonghandId::BorderRightColor | LonghandId::BorderRightColor |
LonghandId::BorderBottomColor | LonghandId::BorderBottomColor |
LonghandId::BorderLeftColor | LonghandId::BorderLeftColor |
% if engine in ["gecko", "servo-2013"]:
LonghandId::OutlineColor | LonghandId::OutlineColor |
% endif
LonghandId::Color LonghandId::Color
) )
} }
@ -3817,7 +3814,7 @@ impl<'a> StyleBuilder<'a> {
} }
% endif % endif
% if not property.is_vector or property.simple_vector_bindings or engine in ["servo-2013", "servo-2020"]: % if not property.is_vector or property.simple_vector_bindings or engine == "servo":
/// Set the `${property.ident}` to the computed value `value`. /// Set the `${property.ident}` to the computed value `value`.
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub fn set_${property.ident}( pub fn set_${property.ident}(
@ -4207,7 +4204,7 @@ macro_rules! longhand_properties_idents {
} }
} }
% if engine in ["servo-2013", "servo-2020"]: % if engine == "servo":
% for effect_name in ["repaint", "reflow_out_of_flow", "reflow", "rebuild_and_reflow_inline", "rebuild_and_reflow"]: % for effect_name in ["repaint", "reflow_out_of_flow", "reflow", "rebuild_and_reflow_inline", "rebuild_and_reflow"]:
macro_rules! restyle_damage_${effect_name} { macro_rules! restyle_damage_${effect_name} {
($old: ident, $new: ident, $damage: ident, [ $($effect:expr),* ]) => ({ ($old: ident, $new: ident, $damage: ident, [ $($effect:expr),* ]) => ({

View file

@ -6,7 +6,7 @@
// TODO: other background-* properties // TODO: other background-* properties
<%helpers:shorthand name="background" <%helpers:shorthand name="background"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="background-color background-position-x background-position-y background-repeat sub_properties="background-color background-position-x background-position-y background-repeat
background-attachment background-image background-size background-origin background-attachment background-image background-size background-origin
background-clip" background-clip"
@ -194,7 +194,7 @@
</%helpers:shorthand> </%helpers:shorthand>
<%helpers:shorthand name="background-position" <%helpers:shorthand name="background-position"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
flags="SHORTHAND_IN_GETCS" flags="SHORTHAND_IN_GETCS"
sub_properties="background-position-x background-position-y" sub_properties="background-position-x background-position-y"
spec="https://drafts.csswg.org/css-backgrounds-4/#the-background-position"> spec="https://drafts.csswg.org/css-backgrounds-4/#the-background-position">

View file

@ -9,7 +9,7 @@ ${helpers.four_sides_shorthand(
"border-color", "border-color",
"border-%s-color", "border-%s-color",
"specified::Color::parse", "specified::Color::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-backgrounds/#border-color", spec="https://drafts.csswg.org/css-backgrounds/#border-color",
allow_quirks="Yes", allow_quirks="Yes",
)} )}
@ -17,13 +17,13 @@ ${helpers.four_sides_shorthand(
${helpers.four_sides_shorthand( ${helpers.four_sides_shorthand(
"border-style", "border-style",
"border-%s-style", "border-%s-style",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-backgrounds/#border-style", spec="https://drafts.csswg.org/css-backgrounds/#border-style",
)} )}
<%helpers:shorthand <%helpers:shorthand
name="border-width" name="border-width"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="${ sub_properties="${
' '.join('border-%s-width' % side ' '.join('border-%s-width' % side
for side in PHYSICAL_SIDES)}" for side in PHYSICAL_SIDES)}"
@ -107,7 +107,7 @@ pub fn parse_border<'i, 't>(
%> %>
<%helpers:shorthand <%helpers:shorthand
name="border-${side}" name="border-${side}"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="${' '.join( sub_properties="${' '.join(
'border-%s-%s' % (side, prop) 'border-%s-%s' % (side, prop)
for prop in ['color', 'style', 'width'] for prop in ['color', 'style', 'width']
@ -142,7 +142,7 @@ pub fn parse_border<'i, 't>(
% endfor % endfor
<%helpers:shorthand name="border" <%helpers:shorthand name="border"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="${' '.join('border-%s-%s' % (side, prop) sub_properties="${' '.join('border-%s-%s' % (side, prop)
for side in PHYSICAL_SIDES for side in PHYSICAL_SIDES
for prop in ['color', 'style', 'width'])} for prop in ['color', 'style', 'width'])}
@ -236,7 +236,7 @@ pub fn parse_border<'i, 't>(
<%helpers:shorthand <%helpers:shorthand
name="border-radius" name="border-radius"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="${' '.join( sub_properties="${' '.join(
'border-%s-radius' % (corner) 'border-%s-radius' % (corner)
for corner in ['top-left', 'top-right', 'bottom-right', 'bottom-left'] for corner in ['top-left', 'top-right', 'bottom-right', 'bottom-left']
@ -282,7 +282,8 @@ pub fn parse_border<'i, 't>(
<%helpers:shorthand <%helpers:shorthand
name="border-image" name="border-image"
engines="gecko servo-2013" engines="gecko servo"
servo_pref="layout.legacy_layout",
sub_properties="border-image-outset sub_properties="border-image-outset
border-image-repeat border-image-slice border-image-source border-image-width" border-image-repeat border-image-slice border-image-source border-image-width"
extra_prefixes="moz:layout.css.prefixes.border-image webkit" extra_prefixes="moz:layout.css.prefixes.border-image webkit"
@ -390,7 +391,7 @@ pub fn parse_border<'i, 't>(
spec = "https://drafts.csswg.org/css-logical/#propdef-border-%s-%s" % (axis, prop) spec = "https://drafts.csswg.org/css-logical/#propdef-border-%s-%s" % (axis, prop)
%> %>
<%helpers:shorthand <%helpers:shorthand
engines="gecko servo-2013 servo-2020" engines="gecko servo"
name="border-${axis}-${prop}" name="border-${axis}-${prop}"
sub_properties="${' '.join( sub_properties="${' '.join(
'border-%s-%s-%s' % (axis, side, prop) 'border-%s-%s-%s' % (axis, side, prop)
@ -436,7 +437,7 @@ pub fn parse_border<'i, 't>(
%> %>
<%helpers:shorthand <%helpers:shorthand
name="border-${axis}" name="border-${axis}"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="${' '.join( sub_properties="${' '.join(
'border-%s-%s-width' % (axis, side) 'border-%s-%s-width' % (axis, side)
for side in ['start', 'end'] for side in ['start', 'end']

View file

@ -8,7 +8,7 @@ ${helpers.two_properties_shorthand(
"overflow", "overflow",
"overflow-x", "overflow-x",
"overflow-y", "overflow-y",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
flags="SHORTHAND_IN_GETCS", flags="SHORTHAND_IN_GETCS",
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow", spec="https://drafts.csswg.org/css-overflow/#propdef-overflow",
)} )}
@ -38,7 +38,7 @@ macro_rules! try_parse_one {
} }
<%helpers:shorthand name="transition" <%helpers:shorthand name="transition"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
extra_prefixes="moz:layout.css.prefixes.transitions webkit" extra_prefixes="moz:layout.css.prefixes.transitions webkit"
sub_properties="transition-property transition-duration sub_properties="transition-property transition-duration
transition-timing-function transition-timing-function
@ -184,7 +184,7 @@ macro_rules! try_parse_one {
</%helpers:shorthand> </%helpers:shorthand>
<%helpers:shorthand name="animation" <%helpers:shorthand name="animation"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
extra_prefixes="moz:layout.css.prefixes.animations webkit" extra_prefixes="moz:layout.css.prefixes.animations webkit"
sub_properties="animation-name animation-duration sub_properties="animation-name animation-duration
animation-timing-function animation-delay animation-timing-function animation-delay

View file

@ -5,9 +5,9 @@
<%namespace name="helpers" file="/helpers.mako.rs" /> <%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="columns" <%helpers:shorthand name="columns"
engines="gecko servo-2013" engines="gecko servo"
sub_properties="column-width column-count" sub_properties="column-width column-count"
servo_2013_pref="layout.columns.enabled", servo_pref="layout.columns.enabled"
derive_serialize="True" derive_serialize="True"
spec="https://drafts.csswg.org/css-multicol/#propdef-columns"> spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
use crate::properties::longhands::{column_count, column_width}; use crate::properties::longhands::{column_count, column_width};

View file

@ -7,7 +7,7 @@
<%helpers:shorthand <%helpers:shorthand
name="font" name="font"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties=" sub_properties="
font-style font-style
font-variant-caps font-variant-caps
@ -297,7 +297,8 @@
</%helpers:shorthand> </%helpers:shorthand>
<%helpers:shorthand name="font-variant" <%helpers:shorthand name="font-variant"
engines="gecko servo-2013" engines="gecko servo"
servo_pref="layout.legacy_layout",
flags="SHORTHAND_IN_GETCS" flags="SHORTHAND_IN_GETCS"
sub_properties="font-variant-caps sub_properties="font-variant-caps
${'font-variant-alternates' if engine == 'gecko' else ''} ${'font-variant-alternates' if engine == 'gecko' else ''}

View file

@ -5,7 +5,7 @@
<%namespace name="helpers" file="/helpers.mako.rs" /> <%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="list-style" <%helpers:shorthand name="list-style"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="list-style-position list-style-image list-style-type" sub_properties="list-style-position list-style-image list-style-type"
spec="https://drafts.csswg.org/css-lists/#propdef-list-style"> spec="https://drafts.csswg.org/css-lists/#propdef-list-style">
use crate::properties::longhands::{list_style_image, list_style_position, list_style_type}; use crate::properties::longhands::{list_style_image, list_style_position, list_style_type};
@ -110,9 +110,9 @@
use longhands::list_style_type::SpecifiedValue as ListStyleType; use longhands::list_style_type::SpecifiedValue as ListStyleType;
use longhands::list_style_image::SpecifiedValue as ListStyleImage; use longhands::list_style_image::SpecifiedValue as ListStyleImage;
let mut have_one_non_initial_value = false; let mut have_one_non_initial_value = false;
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))] #[cfg(feature = "gecko")]
let position_is_initial = self.list_style_position == &ListStylePosition::Outside; let position_is_initial = self.list_style_position == &ListStylePosition::Outside;
#[cfg(feature = "servo-layout-2020")] #[cfg(feature = "servo")]
let position_is_initial = self.list_style_position == Some(&ListStylePosition::Outside); let position_is_initial = self.list_style_position == Some(&ListStylePosition::Outside);
if !position_is_initial { if !position_is_initial {
self.list_style_position.to_css(dest)?; self.list_style_position.to_css(dest)?;

View file

@ -9,7 +9,7 @@ ${helpers.four_sides_shorthand(
"margin", "margin",
"margin-%s", "margin-%s",
"specified::LengthPercentageOrAuto::parse", "specified::LengthPercentageOrAuto::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-box/#propdef-margin", spec="https://drafts.csswg.org/css-box/#propdef-margin",
rule_types_allowed=DEFAULT_RULES_AND_PAGE, rule_types_allowed=DEFAULT_RULES_AND_PAGE,
allow_quirks="Yes", allow_quirks="Yes",
@ -20,7 +20,7 @@ ${helpers.two_properties_shorthand(
"margin-block-start", "margin-block-start",
"margin-block-end", "margin-block-end",
"specified::LengthPercentageOrAuto::parse", "specified::LengthPercentageOrAuto::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-margin-block" spec="https://drafts.csswg.org/css-logical/#propdef-margin-block"
)} )}
@ -29,7 +29,7 @@ ${helpers.two_properties_shorthand(
"margin-inline-start", "margin-inline-start",
"margin-inline-end", "margin-inline-end",
"specified::LengthPercentageOrAuto::parse", "specified::LengthPercentageOrAuto::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-margin-inline" spec="https://drafts.csswg.org/css-logical/#propdef-margin-inline"
)} )}

View file

@ -5,7 +5,7 @@
<%namespace name="helpers" file="/helpers.mako.rs" /> <%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="outline" <%helpers:shorthand name="outline"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
sub_properties="outline-color outline-style outline-width" sub_properties="outline-color outline-style outline-width"
spec="https://drafts.csswg.org/css-ui/#propdef-outline"> spec="https://drafts.csswg.org/css-ui/#propdef-outline">
use crate::properties::longhands::{outline_color, outline_width, outline_style}; use crate::properties::longhands::{outline_color, outline_width, outline_style};

View file

@ -8,7 +8,7 @@ ${helpers.four_sides_shorthand(
"padding", "padding",
"padding-%s", "padding-%s",
"specified::NonNegativeLengthPercentage::parse", "specified::NonNegativeLengthPercentage::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-box-3/#propdef-padding", spec="https://drafts.csswg.org/css-box-3/#propdef-padding",
allow_quirks="Yes", allow_quirks="Yes",
)} )}
@ -18,7 +18,7 @@ ${helpers.two_properties_shorthand(
"padding-block-start", "padding-block-start",
"padding-block-end", "padding-block-end",
"specified::NonNegativeLengthPercentage::parse", "specified::NonNegativeLengthPercentage::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-padding-block" spec="https://drafts.csswg.org/css-logical/#propdef-padding-block"
)} )}
@ -27,7 +27,7 @@ ${helpers.two_properties_shorthand(
"padding-inline-start", "padding-inline-start",
"padding-inline-end", "padding-inline-end",
"specified::NonNegativeLengthPercentage::parse", "specified::NonNegativeLengthPercentage::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-padding-inline" spec="https://drafts.csswg.org/css-logical/#propdef-padding-inline"
)} )}

View file

@ -5,8 +5,8 @@
<%namespace name="helpers" file="/helpers.mako.rs" /> <%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="flex-flow" <%helpers:shorthand name="flex-flow"
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
sub_properties="flex-direction flex-wrap" sub_properties="flex-direction flex-wrap"
extra_prefixes="webkit" extra_prefixes="webkit"
derive_serialize="True" derive_serialize="True"
@ -46,8 +46,8 @@
</%helpers:shorthand> </%helpers:shorthand>
<%helpers:shorthand name="flex" <%helpers:shorthand name="flex"
engines="gecko servo-2013 servo-2020", engines="gecko servo",
servo_2020_pref="layout.flexbox.enabled", servo_pref="layout.flexbox.enabled",
sub_properties="flex-grow flex-shrink flex-basis" sub_properties="flex-grow flex-shrink flex-basis"
extra_prefixes="webkit" extra_prefixes="webkit"
derive_serialize="True" derive_serialize="True"
@ -839,7 +839,7 @@ ${helpers.four_sides_shorthand(
"inset", "inset",
"%s", "%s",
"specified::LengthPercentageOrAuto::parse", "specified::LengthPercentageOrAuto::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-inset", spec="https://drafts.csswg.org/css-logical/#propdef-inset",
allow_quirks="No", allow_quirks="No",
)} )}
@ -849,7 +849,7 @@ ${helpers.two_properties_shorthand(
"inset-block-start", "inset-block-start",
"inset-block-end", "inset-block-end",
"specified::LengthPercentageOrAuto::parse", "specified::LengthPercentageOrAuto::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-inset-block" spec="https://drafts.csswg.org/css-logical/#propdef-inset-block"
)} )}
@ -858,6 +858,6 @@ ${helpers.two_properties_shorthand(
"inset-inline-start", "inset-inline-start",
"inset-inline-end", "inset-inline-end",
"specified::LengthPercentageOrAuto::parse", "specified::LengthPercentageOrAuto::parse",
engines="gecko servo-2013 servo-2020", engines="gecko servo",
spec="https://drafts.csswg.org/css-logical/#propdef-inset-inline" spec="https://drafts.csswg.org/css-logical/#propdef-inset-inline"
)} )}

View file

@ -5,7 +5,7 @@
<%namespace name="helpers" file="/helpers.mako.rs" /> <%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="text-decoration" <%helpers:shorthand name="text-decoration"
engines="gecko servo-2013 servo-2020" engines="gecko servo"
flags="SHORTHAND_IN_GETCS" flags="SHORTHAND_IN_GETCS"
sub_properties="text-decoration-line sub_properties="text-decoration-line
${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}" ${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}"

View file

@ -245,11 +245,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
.add_flags(ComputedValueFlags::IS_ROOT_ELEMENT_STYLE); .add_flags(ComputedValueFlags::IS_ROOT_ELEMENT_STYLE);
} }
#[cfg(feature = "servo-layout-2013")] if self.style.get_parent_column().is_multicol() {
{ self.style.add_flags(ComputedValueFlags::CAN_BE_FRAGMENTED);
if self.style.get_parent_column().is_multicol() {
self.style.add_flags(ComputedValueFlags::CAN_BE_FRAGMENTED);
}
} }
} }

View file

@ -675,7 +675,7 @@ where
element.finish_restyle(context, data, new_styles, important_rules_changed) element.finish_restyle(context, data, new_styles, important_rules_changed)
} }
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
fn notify_paint_worklet<E>(context: &StyleContext<E>, data: &ElementData) fn notify_paint_worklet<E>(context: &StyleContext<E>, data: &ElementData)
where where
E: TElement, E: TElement,
@ -713,7 +713,7 @@ where
} }
} }
#[cfg(not(feature = "servo-layout-2013"))] #[cfg(not(feature = "servo"))]
fn notify_paint_worklet<E>(_context: &StyleContext<E>, _data: &ElementData) fn notify_paint_worklet<E>(_context: &StyleContext<E>, _data: &ElementData)
where where
E: TElement, E: TElement,

View file

@ -4,7 +4,7 @@
//! Generic types for counters-related CSS values. //! Generic types for counters-related CSS values.
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
use crate::computed_values::list_style_type::T as ListStyleType; use crate::computed_values::list_style_type::T as ListStyleType;
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
use crate::values::generics::CounterStyle; use crate::values::generics::CounterStyle;
@ -185,13 +185,13 @@ pub struct GenericCounters<I>(
); );
pub use self::GenericCounters as Counters; pub use self::GenericCounters as Counters;
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
type CounterStyleType = ListStyleType; type CounterStyleType = ListStyleType;
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
type CounterStyleType = CounterStyle; type CounterStyleType = CounterStyle;
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
#[inline] #[inline]
fn is_decimal(counter_type: &CounterStyleType) -> bool { fn is_decimal(counter_type: &CounterStyleType) -> bool {
*counter_type == ListStyleType::Decimal *counter_type == ListStyleType::Decimal
@ -244,11 +244,9 @@ pub enum GenericContentItem<I> {
/// Literal string content. /// Literal string content.
String(crate::OwnedStr), String(crate::OwnedStr),
/// `counter(name, style)`. /// `counter(name, style)`.
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
#[css(comma, function)] #[css(comma, function)]
Counter(CustomIdent, #[css(skip_if = "is_decimal")] CounterStyleType), Counter(CustomIdent, #[css(skip_if = "is_decimal")] CounterStyleType),
/// `counters(name, separator, style)`. /// `counters(name, separator, style)`.
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
#[css(comma, function)] #[css(comma, function)]
Counters( Counters(
CustomIdent, CustomIdent,
@ -256,16 +254,12 @@ pub enum GenericContentItem<I> {
#[css(skip_if = "is_decimal")] CounterStyleType, #[css(skip_if = "is_decimal")] CounterStyleType,
), ),
/// `open-quote`. /// `open-quote`.
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
OpenQuote, OpenQuote,
/// `close-quote`. /// `close-quote`.
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
CloseQuote, CloseQuote,
/// `no-open-quote`. /// `no-open-quote`.
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
NoOpenQuote, NoOpenQuote,
/// `no-close-quote`. /// `no-close-quote`.
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
NoCloseQuote, NoCloseQuote,
/// `-moz-alt-content`. /// `-moz-alt-content`.
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]

View file

@ -43,7 +43,7 @@ pub enum GenericImage<G, MozImageRect, ImageUrl, Color, Percentage, Resolution>
/// A paint worklet image. /// A paint worklet image.
/// <https://drafts.css-houdini.org/css-paint-api/> /// <https://drafts.css-houdini.org/css-paint-api/>
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
PaintWorklet(PaintWorklet), PaintWorklet(PaintWorklet),
/// A `<cross-fade()>` image. Storing this directly inside of /// A `<cross-fade()>` image. Storing this directly inside of
@ -440,7 +440,7 @@ where
Image::Url(ref url) => url.to_css(dest), Image::Url(ref url) => url.to_css(dest),
Image::Gradient(ref gradient) => gradient.to_css(dest), Image::Gradient(ref gradient) => gradient.to_css(dest),
Image::Rect(ref rect) => rect.to_css(dest), Image::Rect(ref rect) => rect.to_css(dest),
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
Image::PaintWorklet(ref paint_worklet) => paint_worklet.to_css(dest), Image::PaintWorklet(ref paint_worklet) => paint_worklet.to_css(dest),
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
Image::Element(ref selector) => { Image::Element(ref selector) => {

View file

@ -34,12 +34,14 @@ fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
static_prefs::pref!("layout.css.xul-box-display-values.content.enabled") static_prefs::pref!("layout.css.xul-box-display-values.content.enabled")
} }
#[cfg(not(feature = "servo-layout-2020"))]
#[cfg(not(feature = "servo"))]
fn flexbox_enabled() -> bool { fn flexbox_enabled() -> bool {
true true
} }
#[cfg(feature = "servo-layout-2020")] #[cfg(feature = "servo")]
fn flexbox_enabled() -> bool { fn flexbox_enabled() -> bool {
servo_config::prefs::pref_map() servo_config::prefs::pref_map()
.get("layout.flexbox.enabled") .get("layout.flexbox.enabled")
@ -57,9 +59,7 @@ pub enum DisplayOutside {
None = 0, None = 0,
Inline, Inline,
Block, Block,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableCaption, TableCaption,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
InternalTable, InternalTable,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
InternalRuby, InternalRuby,
@ -78,21 +78,13 @@ pub enum DisplayInside {
Flex, Flex,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
Grid, Grid,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
Table, Table,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableRowGroup, TableRowGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableColumn, TableColumn,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableColumnGroup, TableColumnGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableHeaderGroup, TableHeaderGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableFooterGroup, TableFooterGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableRow, TableRow,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
TableCell, TableCell,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
Ruby, Ruby,
@ -153,11 +145,8 @@ impl Display {
pub const Grid: Self = Self::new(DisplayOutside::Block, DisplayInside::Grid); pub const Grid: Self = Self::new(DisplayOutside::Block, DisplayInside::Grid);
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
pub const InlineGrid: Self = Self::new(DisplayOutside::Inline, DisplayInside::Grid); pub const InlineGrid: Self = Self::new(DisplayOutside::Inline, DisplayInside::Grid);
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const Table: Self = Self::new(DisplayOutside::Block, DisplayInside::Table); pub const Table: Self = Self::new(DisplayOutside::Block, DisplayInside::Table);
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const InlineTable: Self = Self::new(DisplayOutside::Inline, DisplayInside::Table); pub const InlineTable: Self = Self::new(DisplayOutside::Inline, DisplayInside::Table);
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableCaption: Self = Self::new(DisplayOutside::TableCaption, DisplayInside::Flow); pub const TableCaption: Self = Self::new(DisplayOutside::TableCaption, DisplayInside::Flow);
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
pub const Ruby: Self = Self::new(DisplayOutside::Inline, DisplayInside::Ruby); pub const Ruby: Self = Self::new(DisplayOutside::Inline, DisplayInside::Ruby);
@ -168,36 +157,29 @@ impl Display {
// Internal table boxes. // Internal table boxes.
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableRowGroup: Self = pub const TableRowGroup: Self =
Self::new(DisplayOutside::InternalTable, DisplayInside::TableRowGroup); Self::new(DisplayOutside::InternalTable, DisplayInside::TableRowGroup);
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableHeaderGroup: Self = Self::new( pub const TableHeaderGroup: Self = Self::new(
DisplayOutside::InternalTable, DisplayOutside::InternalTable,
DisplayInside::TableHeaderGroup, DisplayInside::TableHeaderGroup,
); );
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableFooterGroup: Self = Self::new( pub const TableFooterGroup: Self = Self::new(
DisplayOutside::InternalTable, DisplayOutside::InternalTable,
DisplayInside::TableFooterGroup, DisplayInside::TableFooterGroup,
); );
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableColumn: Self = pub const TableColumn: Self =
Self::new(DisplayOutside::InternalTable, DisplayInside::TableColumn); Self::new(DisplayOutside::InternalTable, DisplayInside::TableColumn);
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableColumnGroup: Self = Self::new( pub const TableColumnGroup: Self = Self::new(
DisplayOutside::InternalTable, DisplayOutside::InternalTable,
DisplayInside::TableColumnGroup, DisplayInside::TableColumnGroup,
); );
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableRow: Self = Self::new(DisplayOutside::InternalTable, DisplayInside::TableRow); pub const TableRow: Self = Self::new(DisplayOutside::InternalTable, DisplayInside::TableRow);
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
pub const TableCell: Self = Self::new(DisplayOutside::InternalTable, DisplayInside::TableCell); pub const TableCell: Self = Self::new(DisplayOutside::InternalTable, DisplayInside::TableCell);
/// Internal ruby boxes. /// Internal ruby boxes.
@ -315,7 +297,6 @@ impl Display {
pub fn is_atomic_inline_level(&self) -> bool { pub fn is_atomic_inline_level(&self) -> bool {
match *self { match *self {
Display::InlineBlock | Display::InlineFlex => true, Display::InlineBlock | Display::InlineFlex => true,
#[cfg(any(feature = "servo-layout-2013"))]
Display::InlineTable => true, Display::InlineTable => true,
_ => false, _ => false,
} }
@ -368,7 +349,6 @@ impl Display {
Display::from3(DisplayOutside::Block, inside, self.is_list_item()) Display::from3(DisplayOutside::Block, inside, self.is_list_item())
}, },
DisplayOutside::Block | DisplayOutside::None => *self, DisplayOutside::Block | DisplayOutside::None => *self,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
_ => Display::Block, _ => Display::Block,
} }
} }
@ -421,13 +401,11 @@ impl ToCss for Display {
Display::WebkitInlineBox => dest.write_str("-webkit-inline-box"), Display::WebkitInlineBox => dest.write_str("-webkit-inline-box"),
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
Display::MozInlineBox => dest.write_str("-moz-inline-box"), Display::MozInlineBox => dest.write_str("-moz-inline-box"),
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
Display::TableCaption => dest.write_str("table-caption"), Display::TableCaption => dest.write_str("table-caption"),
_ => match (outside, inside) { _ => match (outside, inside) {
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
(DisplayOutside::Inline, DisplayInside::Grid) => dest.write_str("inline-grid"), (DisplayOutside::Inline, DisplayInside::Grid) => dest.write_str("inline-grid"),
(DisplayOutside::Inline, DisplayInside::Flex) => dest.write_str("inline-flex"), (DisplayOutside::Inline, DisplayInside::Flex) => dest.write_str("inline-flex"),
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
(DisplayOutside::Inline, DisplayInside::Table) => dest.write_str("inline-table"), (DisplayOutside::Inline, DisplayInside::Table) => dest.write_str("inline-table"),
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
(DisplayOutside::Block, DisplayInside::Ruby) => dest.write_str("block ruby"), (DisplayOutside::Block, DisplayInside::Ruby) => dest.write_str("block ruby"),
@ -460,7 +438,6 @@ fn parse_display_inside<'i, 't>(
"flow" => DisplayInside::Flow, "flow" => DisplayInside::Flow,
"flex" if flexbox_enabled() => DisplayInside::Flex, "flex" if flexbox_enabled() => DisplayInside::Flex,
"flow-root" => DisplayInside::FlowRoot, "flow-root" => DisplayInside::FlowRoot,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table" => DisplayInside::Table, "table" => DisplayInside::Table,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
"grid" => DisplayInside::Grid, "grid" => DisplayInside::Grid,
@ -559,27 +536,18 @@ impl Parse for Display {
"none" => Display::None, "none" => Display::None,
"contents" => Display::Contents, "contents" => Display::Contents,
"inline-block" => Display::InlineBlock, "inline-block" => Display::InlineBlock,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"inline-table" => Display::InlineTable, "inline-table" => Display::InlineTable,
"-webkit-flex" if flexbox_enabled() => Display::Flex, "-webkit-flex" if flexbox_enabled() => Display::Flex,
"inline-flex" | "-webkit-inline-flex" if flexbox_enabled() => Display::InlineFlex, "inline-flex" | "-webkit-inline-flex" if flexbox_enabled() => Display::InlineFlex,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
"inline-grid" => Display::InlineGrid, "inline-grid" => Display::InlineGrid,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-caption" => Display::TableCaption, "table-caption" => Display::TableCaption,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-row-group" => Display::TableRowGroup, "table-row-group" => Display::TableRowGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-header-group" => Display::TableHeaderGroup, "table-header-group" => Display::TableHeaderGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-footer-group" => Display::TableFooterGroup, "table-footer-group" => Display::TableFooterGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-column" => Display::TableColumn, "table-column" => Display::TableColumn,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-column-group" => Display::TableColumnGroup, "table-column-group" => Display::TableColumnGroup,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-row" => Display::TableRow, "table-row" => Display::TableRow,
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
"table-cell" => Display::TableCell, "table-cell" => Display::TableCell,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
"ruby-base" => Display::RubyBase, "ruby-base" => Display::RubyBase,

View file

@ -4,7 +4,7 @@
//! Specified types for counter properties. //! Specified types for counter properties.
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
use crate::computed_values::list_style_type::T as ListStyleType; use crate::computed_values::list_style_type::T as ListStyleType;
use crate::parser::{Parse, ParserContext}; use crate::parser::{Parse, ParserContext};
use crate::values::generics::counters as generics; use crate::values::generics::counters as generics;
@ -16,7 +16,6 @@ use crate::values::specified::Attr;
use crate::values::specified::Integer; use crate::values::specified::Integer;
use crate::values::CustomIdent; use crate::values::CustomIdent;
use cssparser::{Parser, Token}; use cssparser::{Parser, Token};
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
use selectors::parser::SelectorParseErrorKind; use selectors::parser::SelectorParseErrorKind;
use style_traits::{KeywordsCollectFn, ParseError, SpecifiedValueInfo, StyleParseErrorKind}; use style_traits::{KeywordsCollectFn, ParseError, SpecifiedValueInfo, StyleParseErrorKind};
@ -155,7 +154,7 @@ pub type Content = generics::GenericContent<Image>;
pub type ContentItem = generics::GenericContentItem<Image>; pub type ContentItem = generics::GenericContentItem<Image>;
impl Content { impl Content {
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
fn parse_counter_style(_: &ParserContext, input: &mut Parser) -> ListStyleType { fn parse_counter_style(_: &ParserContext, input: &mut Parser) -> ListStyleType {
input input
.try_parse(|input| { .try_parse(|input| {
@ -215,14 +214,12 @@ impl Parse for Content {
}, },
Ok(&Token::Function(ref name)) => { Ok(&Token::Function(ref name)) => {
let result = match_ignore_ascii_case! { &name, let result = match_ignore_ascii_case! { &name,
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
"counter" => input.parse_nested_block(|input| { "counter" => input.parse_nested_block(|input| {
let location = input.current_source_location(); let location = input.current_source_location();
let name = CustomIdent::from_ident(location, input.expect_ident()?, &[])?; let name = CustomIdent::from_ident(location, input.expect_ident()?, &[])?;
let style = Content::parse_counter_style(context, input); let style = Content::parse_counter_style(context, input);
Ok(generics::ContentItem::Counter(name, style)) Ok(generics::ContentItem::Counter(name, style))
}), }),
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
"counters" => input.parse_nested_block(|input| { "counters" => input.parse_nested_block(|input| {
let location = input.current_source_location(); let location = input.current_source_location();
let name = CustomIdent::from_ident(location, input.expect_ident()?, &[])?; let name = CustomIdent::from_ident(location, input.expect_ident()?, &[])?;
@ -244,7 +241,6 @@ impl Parse for Content {
}?; }?;
content.push(result); content.push(result);
}, },
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
Ok(&Token::Ident(ref ident)) => { Ok(&Token::Ident(ref ident)) => {
content.push(match_ignore_ascii_case! { &ident, content.push(match_ignore_ascii_case! { &ident,
"open-quote" => generics::ContentItem::OpenQuote, "open-quote" => generics::ContentItem::OpenQuote,

View file

@ -228,7 +228,7 @@ impl Image {
return Ok(generic::Image::CrossFade(Box::new(cf))); return Ok(generic::Image::CrossFade(Box::new(cf)));
} }
} }
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
{ {
if let Ok(paint_worklet) = input.try_parse(|i| PaintWorklet::parse(context, i)) { if let Ok(paint_worklet) = input.try_parse(|i| PaintWorklet::parse(context, i)) {
return Ok(generic::Image::PaintWorklet(paint_worklet)); return Ok(generic::Image::PaintWorklet(paint_worklet));

View file

@ -585,7 +585,6 @@ pub enum TextAlignKeyword {
Left, Left,
Right, Right,
Center, Center,
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
Justify, Justify,
#[css(skip)] #[css(skip)]
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
@ -597,11 +596,11 @@ pub enum TextAlignKeyword {
MozLeft, MozLeft,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
MozRight, MozRight,
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
ServoCenter, ServoCenter,
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
ServoLeft, ServoLeft,
#[cfg(feature = "servo-layout-2013")] #[cfg(feature = "servo")]
ServoRight, ServoRight,
} }

View file

@ -38,8 +38,6 @@ default = ["webdriver", "max_log_level"]
googlevr = ["libservo/googlevr"] googlevr = ["libservo/googlevr"]
jitspew = ["libservo/jitspew"] jitspew = ["libservo/jitspew"]
js_backtrace = ["libservo/js_backtrace"] js_backtrace = ["libservo/js_backtrace"]
layout-2013 = ["libservo/layout-2013"]
layout-2020 = ["libservo/layout-2020"]
max_log_level = ["log/release_max_level_info"] max_log_level = ["log/release_max_level_info"]
media-dummy = ["libservo/media-dummy"] media-dummy = ["libservo/media-dummy"]
media-gstreamer = ["libservo/media-gstreamer"] media-gstreamer = ["libservo/media-gstreamer"]

View file

@ -34,8 +34,6 @@ default = ["webdriver", "max_log_level"]
googlevr = ["simpleservo/googlevr"] googlevr = ["simpleservo/googlevr"]
jitspew = ["simpleservo/jitspew"] jitspew = ["simpleservo/jitspew"]
js_backtrace = ["simpleservo/js_backtrace"] js_backtrace = ["simpleservo/js_backtrace"]
layout-2013 = ["simpleservo/layout-2013"]
layout-2020 = ["simpleservo/layout-2020"]
max_log_level = ["simpleservo/max_log_level"] max_log_level = ["simpleservo/max_log_level"]
media-dummy = ["simpleservo/media-dummy"] media-dummy = ["simpleservo/media-dummy"]
media-gstreamer = ["simpleservo/media-gstreamer"] media-gstreamer = ["simpleservo/media-gstreamer"]

View file

@ -31,8 +31,6 @@ debugmozjs = ["simpleservo/debugmozjs"]
default = ["webdriver", "max_log_level"] default = ["webdriver", "max_log_level"]
googlevr = ["simpleservo/googlevr"] googlevr = ["simpleservo/googlevr"]
js_backtrace = ["simpleservo/js_backtrace"] js_backtrace = ["simpleservo/js_backtrace"]
layout-2013 = ["simpleservo/layout-2013"]
layout-2020 = ["simpleservo/layout-2020"]
max_log_level = ["simpleservo/max_log_level"] max_log_level = ["simpleservo/max_log_level"]
media-dummy = ["simpleservo/media-dummy"] media-dummy = ["simpleservo/media-dummy"]
media-gstreamer = ["simpleservo/media-gstreamer"] media-gstreamer = ["simpleservo/media-gstreamer"]

View file

@ -30,8 +30,6 @@ debugmozjs = ["libservo/debugmozjs"]
default = ["webdriver", "max_log_level"] default = ["webdriver", "max_log_level"]
jitspew = ["libservo/jitspew"] jitspew = ["libservo/jitspew"]
js_backtrace = ["libservo/js_backtrace"] js_backtrace = ["libservo/js_backtrace"]
layout-2013 = ["libservo/layout-2013"]
layout-2020 = ["libservo/layout-2020"]
max_log_level = ["log/release_max_level_info"] max_log_level = ["log/release_max_level_info"]
media-dummy = ["libservo/media-dummy"] media-dummy = ["libservo/media-dummy"]
media-gstreamer = ["libservo/media-gstreamer"] media-gstreamer = ["libservo/media-gstreamer"]

View file

@ -859,11 +859,6 @@ class CommandBase(object):
action='store_true', action='store_true',
help='Build with frame pointer enabled, used by the background hang monitor.', help='Build with frame pointer enabled, used by the background hang monitor.',
), ),
CommandArgument(
'--with-layout-2020', '--layout-2020',
group="Feature Selection", default=None, action='store_true'),
CommandArgument(
'--with-layout-2013', '--layout-2013', group="Feature Selection", default=None, action='store_true'),
CommandArgument('--without-wgl', group="Feature Selection", default=None, action='store_true'), CommandArgument('--without-wgl', group="Feature Selection", default=None, action='store_true'),
] ]
@ -961,10 +956,6 @@ class CommandBase(object):
features.append("native-bluetooth") features.append("native-bluetooth")
if with_layout_2020 or (self.config["build"]["layout-2020"] and not with_layout_2013):
features.append("layout-2020")
elif "layout-2020" not in features:
features.append("layout-2013")
if with_frame_pointer: if with_frame_pointer:
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C force-frame-pointers=yes" env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C force-frame-pointers=yes"
features.append("profilemozjs") features.append("profilemozjs")

View file

@ -502,11 +502,7 @@ class PackageCommands(CommandBase):
release = nightly_repo.get_release(github_release_id) release = nightly_repo.get_release(github_release_id)
package_hash_fileobj = io.BytesIO(package_hash.encode('utf-8')) package_hash_fileobj = io.BytesIO(package_hash.encode('utf-8'))
if '2020' in platform: asset_name = f'servo-latest.{extension}'
asset_name = f'servo-latest.{extension}'
else:
asset_name = f'servo-latest-legacy-layout.{extension}'
release.upload_asset(package, name=asset_name) release.upload_asset(package, name=asset_name)
release.upload_asset_from_memory( release.upload_asset_from_memory(
package_hash_fileobj, package_hash_fileobj,
@ -530,11 +526,7 @@ class PackageCommands(CommandBase):
BUCKET = 'servo-builds2' BUCKET = 'servo-builds2'
DISTRIBUTION_ID = 'EJ8ZWSJKFCJS2' DISTRIBUTION_ID = 'EJ8ZWSJKFCJS2'
if '2020' in platform: nightly_dir = f'nightly/{platform}'
nightly_dir = 'nightly/{}'.format(platform.replace('-layout2020', ''))
else:
nightly_dir = 'nightly/{}-legacy-layout'.format(platform)
filename = nightly_filename(package, timestamp) filename = nightly_filename(package, timestamp)
package_upload_key = '{}/{}'.format(nightly_dir, filename) package_upload_key = '{}/{}'.format(nightly_dir, filename)
extension = path.basename(package).partition('.')[2] extension = path.basename(package).partition('.')[2]

View file

@ -100,8 +100,11 @@ def run_tests(**kwargs):
# TODO: Delete rr traces from green test runs? # TODO: Delete rr traces from green test runs?
prefs = kwargs.pop("prefs") prefs = kwargs.pop("prefs")
kwargs.setdefault("binary_args", [])
if prefs: if prefs:
kwargs["binary_args"] = ["--pref=" + pref for pref in prefs] kwargs["binary_args"] += ["--pref=" + pref for pref in prefs]
if not kwargs.get("layout_2020", False):
kwargs["binary_args"] += ["--legacy-layout"]
if not kwargs.get("no_default_test_types"): if not kwargs.get("no_default_test_types"):
test_types = { test_types = {
@ -116,6 +119,7 @@ def run_tests(**kwargs):
raw_log_outputs = kwargs.get("log_raw", []) raw_log_outputs = kwargs.get("log_raw", [])
wptcommandline.check_args(kwargs) wptcommandline.check_args(kwargs)
update_args_for_legacy_layout(kwargs) update_args_for_legacy_layout(kwargs)
mozlog.commandline.log_formatters["servo"] = ( mozlog.commandline.log_formatters["servo"] = (

View file

@ -99,6 +99,7 @@
"layout.animations.test.enabled": false, "layout.animations.test.enabled": false,
"layout.columns.enabled": false, "layout.columns.enabled": false,
"layout.flexbox.enabled": false, "layout.flexbox.enabled": false,
"layout.legacy_layout": false,
"layout.threads": 3, "layout.threads": 3,
"layout.writing-mode.enabled": false, "layout.writing-mode.enabled": false,
"media.glvideo.enabled": false, "media.glvideo.enabled": false,

View file

@ -112,22 +112,16 @@ macro_rules! parse_longhand {
}; };
} }
mod background;
mod border;
mod box_; mod box_;
mod column;
mod effects; mod effects;
mod image; mod image;
mod inherited_text; mod inherited_text;
mod outline; mod outline;
mod selectors; mod selectors;
mod supports; mod supports;
mod text_overflow;
mod transition_duration; mod transition_duration;
mod transition_timing_function; mod transition_timing_function;
// These tests test features that are only available in 2013 layout.
#[cfg(feature = "layout_2013")]
mod background;
#[cfg(feature = "layout_2013")]
mod border;
#[cfg(feature = "layout_2013")]
mod column;
#[cfg(feature = "layout_2013")]
mod text_overflow;

View file

@ -10,3 +10,6 @@
[Property object-position does not support quirky length] [Property object-position does not support quirky length]
expected: FAIL expected: FAIL
[Property column-span does not support quirky length]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-caption-is-containing-block-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-caption-passes-abspos-up-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-018.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-030.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-034.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-037.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-095.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-097.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-101.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-103.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-107.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-109.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[background-reset-001.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[border-bottom-applies-to-014.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[border-bottom-color-applies-to-014.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[border-bottom-width-applies-to-014.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[border-top-applies-to-014.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[border-top-color-applies-to-014.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[border-top-width-applies-to-014.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-027.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[display-011.xht]
expected: FAIL

Some files were not shown because too many files have changed in this diff Show more