mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make the choice of layout runtime setting
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
f11c6045e3
commit
d31cdb682f
262 changed files with 1740 additions and 3700 deletions
65
.github/workflows/linux.yml
vendored
65
.github/workflows/linux.yml
vendored
|
@ -2,9 +2,6 @@ name: Linux workflow
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
layout:
|
||||
required: true
|
||||
type: string
|
||||
wpt:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -21,10 +18,6 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
layout:
|
||||
required: true
|
||||
type: choice
|
||||
options: ["2013", "2020"]
|
||||
wpt:
|
||||
default: "test"
|
||||
required: false
|
||||
|
@ -44,8 +37,6 @@ on:
|
|||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
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"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CCACHE: "sccache"
|
||||
|
@ -72,22 +63,22 @@ jobs:
|
|||
- name: Tidy
|
||||
run: python3 ./mach test-tidy --no-progress --all
|
||||
- name: Release build
|
||||
run: python3 ./mach build --release --with-${{ env.LAYOUT }}
|
||||
run: python3 ./mach build --release
|
||||
- name: Smoketest
|
||||
run: xvfb-run python3 ./mach smoketest
|
||||
- name: Script tests
|
||||
run: ./mach test-scripts
|
||||
- name: Unit tests
|
||||
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
|
||||
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
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*-${{ env.LAYOUT }}
|
||||
path: target/cargo-timings-*
|
||||
- name: Lockfile check
|
||||
run: ./etc/ci/lockfile_changed.sh
|
||||
- name: Package
|
||||
|
@ -95,12 +86,12 @@ jobs:
|
|||
- name: Upload Package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PACKAGE }}
|
||||
name: linux
|
||||
path: target/release/servo-tech-demo.tar.gz
|
||||
- name: Upload
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
python3 ./mach upload-nightly ${{ env.PACKAGE }} \
|
||||
python3 ./mach upload-nightly linux \
|
||||
--secret-from-environment \
|
||||
--github-release-id ${{ inputs.github-release-id }}
|
||||
env:
|
||||
|
@ -112,7 +103,7 @@ jobs:
|
|||
- name: Archive binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.LAYOUT }}-release-binary
|
||||
name: release-binary
|
||||
path: target.tar.gz
|
||||
|
||||
linux-wpt:
|
||||
|
@ -125,6 +116,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
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]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -132,7 +124,7 @@ jobs:
|
|||
fetch-depth: 2
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ env.LAYOUT }}-release-binary
|
||||
name: release-binary
|
||||
path: release-binary
|
||||
- name: unPackage binary
|
||||
run: tar -xzf release-binary/target.tar.gz
|
||||
|
@ -151,45 +143,43 @@ jobs:
|
|||
- name: Run tests
|
||||
if: ${{ inputs.wpt != 'sync' }}
|
||||
run: |
|
||||
python3 ./mach test-wpt --with-${{ env.LAYOUT }} \
|
||||
python3 ./mach test-wpt --with-${{ matrix.layout }} \
|
||||
--release --processes $(nproc) --timeout-multiplier 2 \
|
||||
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
||||
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
|
||||
--log-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \
|
||||
--filter-intermittents filtered-test-wpt.${{ matrix.chunk_id }}.json
|
||||
--log-raw test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
|
||||
--log-raw-unexpected unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
|
||||
--filter-intermittents filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }}
|
||||
- name: Run tests (sync)
|
||||
if: ${{ inputs.wpt == 'sync' }}
|
||||
run: |
|
||||
python3 ./mach test-wpt --with-${{ env.LAYOUT }} \
|
||||
python3 ./mach test-wpt --with-${{ matrix.layout }} \
|
||||
--release --processes $(nproc) --timeout-multiplier 2 \
|
||||
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
||||
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
|
||||
--log-servojson wpt-jsonsummary.${{ matrix.chunk_id }}.log \
|
||||
--always-succeed
|
||||
- name: Archive filtered results
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ always() && inputs.wpt != 'sync' }}
|
||||
with:
|
||||
name: wpt-filtered-results-linux-${{ env.LAYOUT }}
|
||||
name: wpt-filtered-results-linux
|
||||
path: |
|
||||
filtered-test-wpt.${{ matrix.chunk_id }}.json
|
||||
unexpected-test-wpt.${{ matrix.chunk_id }}.log
|
||||
filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
|
||||
unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
|
||||
- name: Archive logs
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() && inputs.wpt != 'sync' }}
|
||||
with:
|
||||
name: wpt-logs-linux-${{ env.LAYOUT }}
|
||||
name: wpt-logs-linux
|
||||
path: |
|
||||
test-wpt.${{ matrix.chunk_id }}.log
|
||||
filtered-wpt-results.${{ matrix.chunk_id }}.json
|
||||
test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
|
||||
- name: Archive logs
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ inputs.wpt == 'sync' }}
|
||||
with:
|
||||
name: wpt-logs-linux-${{ env.LAYOUT }}
|
||||
name: wpt-logs-linux-${{ matrix.layout }}
|
||||
path: |
|
||||
test-wpt.${{ matrix.chunk_id }}.log
|
||||
wpt-jsonsummary.${{ matrix.chunk_id }}.log
|
||||
|
@ -206,18 +196,23 @@ jobs:
|
|||
fetch-depth: 2
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: wpt-filtered-results-linux-${{ env.LAYOUT }}
|
||||
name: wpt-filtered-results-linux
|
||||
path: wpt-filtered-results-linux
|
||||
- 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
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: wpt-filtered-results-linux-${{ env.LAYOUT }}
|
||||
name: wpt-filtered-results-linux
|
||||
path: |
|
||||
unexpected-test-wpt.log
|
||||
unexpected-test-wpt-layout-2020.log
|
||||
unexpected-test-wpt-layout-2013.log
|
||||
- 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:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
23
.github/workflows/mac.yml
vendored
23
.github/workflows/mac.yml
vendored
|
@ -3,9 +3,6 @@ name: Mac workflow
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
layout:
|
||||
required: true
|
||||
type: string
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -19,10 +16,6 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
layout:
|
||||
required: true
|
||||
type: choice
|
||||
options: ["2013", "2020"]
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -37,8 +30,6 @@ on:
|
|||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
|
||||
PACKAGE: "${{ contains(inputs.layout, '2020') && 'mac-layout2020' || 'mac' }}"
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CCACHE: "sccache"
|
||||
|
@ -60,35 +51,35 @@ jobs:
|
|||
python3 ./mach bootstrap
|
||||
- name: Release build
|
||||
run: |
|
||||
python3 ./mach build --release --with-${{ env.LAYOUT }}
|
||||
python3 ./mach build --release
|
||||
- name: Smoketest
|
||||
run: python3 ./mach smoketest
|
||||
- name: Script tests
|
||||
run: ./mach test-scripts
|
||||
- name: Unit tests
|
||||
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
|
||||
run: python3 ./mach package --release
|
||||
- name: Package smoketest
|
||||
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
|
||||
- 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
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*-${{ env.LAYOUT }}
|
||||
path: target/cargo-timings-*
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PACKAGE }}
|
||||
name: mac
|
||||
path: target/release/servo-tech-demo.dmg
|
||||
- name: Upload
|
||||
if: ${{ inputs.upload }}
|
||||
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 }}
|
||||
env:
|
||||
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
|
||||
|
@ -100,7 +91,7 @@ jobs:
|
|||
- name: Archive binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release-${{ env.LAYOUT }}-binary-macos
|
||||
name: release-binary-macos
|
||||
path: target.tar.gz
|
||||
|
||||
# mac-wpt:
|
||||
|
|
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
|
@ -38,7 +38,6 @@ jobs:
|
|||
needs: ["decision"]
|
||||
uses: ./.github/workflows/windows.yml
|
||||
with:
|
||||
layout: '2013'
|
||||
unit-tests: true
|
||||
|
||||
build-mac:
|
||||
|
@ -46,7 +45,6 @@ jobs:
|
|||
needs: ["decision"]
|
||||
uses: ./.github/workflows/mac.yml
|
||||
with:
|
||||
layout: '2013'
|
||||
unit-tests: true
|
||||
|
||||
build-linux:
|
||||
|
@ -54,16 +52,6 @@ jobs:
|
|||
needs: ["decision"]
|
||||
uses: ./.github/workflows/linux.yml
|
||||
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'
|
||||
unit-tests: true
|
||||
|
||||
|
@ -77,7 +65,6 @@ jobs:
|
|||
- "build-win"
|
||||
- "build-mac"
|
||||
- "build-linux"
|
||||
- "build-linux-layout-2020"
|
||||
|
||||
steps:
|
||||
- name: Mark the job as successful
|
||||
|
|
45
.github/workflows/nightly.yml
vendored
45
.github/workflows/nightly.yml
vendored
|
@ -59,11 +59,8 @@ jobs:
|
|||
needs:
|
||||
- create-draft-release
|
||||
- upload-linux
|
||||
- upload-linux-2013
|
||||
- upload-win
|
||||
- upload-win-2013
|
||||
- upload-mac
|
||||
- upload-mac-2013
|
||||
|
||||
upload-win:
|
||||
# This job is only useful when run on upstream servo.
|
||||
|
@ -73,20 +70,6 @@ jobs:
|
|||
- create-draft-release
|
||||
uses: ./.github/workflows/windows.yml
|
||||
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
|
||||
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
|
||||
secrets: inherit
|
||||
|
@ -99,20 +82,6 @@ jobs:
|
|||
- create-draft-release
|
||||
uses: ./.github/workflows/mac.yml
|
||||
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
|
||||
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
|
||||
secrets: inherit
|
||||
|
@ -125,20 +94,6 @@ jobs:
|
|||
- create-draft-release
|
||||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
layout: '2020'
|
||||
upload: true
|
||||
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
|
||||
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
|
9
.github/workflows/pull-request.yml
vendored
9
.github/workflows/pull-request.yml
vendored
|
@ -11,13 +11,4 @@ jobs:
|
|||
if: github.repository == 'servo/servo'
|
||||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
layout: '2013'
|
||||
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
|
10
.github/workflows/quick-check.yml
vendored
10
.github/workflows/quick-check.yml
vendored
|
@ -13,14 +13,4 @@ jobs:
|
|||
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
|
||||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
layout: '2013'
|
||||
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
|
||||
|
|
12
.github/workflows/scheduled-wpt-import.yml
vendored
12
.github/workflows/scheduled-wpt-import.yml
vendored
|
@ -15,17 +15,6 @@ jobs:
|
|||
name: Linux
|
||||
uses: ./.github/workflows/linux.yml
|
||||
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'
|
||||
unit-tests: false
|
||||
|
||||
|
@ -36,7 +25,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- "linux"
|
||||
- "linux-layout-2020"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
|
21
.github/workflows/windows.yml
vendored
21
.github/workflows/windows.yml
vendored
|
@ -3,9 +3,6 @@ name: Windows workflow
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
layout:
|
||||
required: true
|
||||
type: string
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -19,10 +16,6 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
layout:
|
||||
required: true
|
||||
type: choice
|
||||
options: ["2013", "2020"]
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -37,8 +30,6 @@ on:
|
|||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
|
||||
PACKAGE: "${{ contains(inputs.layout, '2020') && 'windows-msvc-layout2020' || 'windows-msvc' }}"
|
||||
CCACHE: "ccache"
|
||||
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
|
||||
|
||||
|
@ -64,28 +55,28 @@ jobs:
|
|||
python mach fetch
|
||||
python mach bootstrap-gstreamer
|
||||
- name: Release build
|
||||
run: python mach build --release --with-${{ env.LAYOUT }}
|
||||
run: python mach build --release
|
||||
- name: Copy resources
|
||||
run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse
|
||||
- name: Smoketest
|
||||
run: python mach smoketest --angle
|
||||
- name: Unit tests
|
||||
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
|
||||
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
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*-${{ env.LAYOUT }}
|
||||
path: target/cargo-timings-*
|
||||
- name: Package
|
||||
run: python mach package --release
|
||||
- name: Upload Package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.PACKAGE }}
|
||||
name: win
|
||||
# These files are available
|
||||
# MSI Installer: C:\a\servo\servo\target\release\msi\Installer.msi
|
||||
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
|
||||
|
@ -94,7 +85,7 @@ jobs:
|
|||
- name: Upload
|
||||
if: ${{ inputs.upload }}
|
||||
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 }}
|
||||
env:
|
||||
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
|
||||
|
|
|
@ -27,6 +27,9 @@ pub struct Opts {
|
|||
/// The initial URL to load.
|
||||
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`).
|
||||
pub tile_size: usize,
|
||||
|
||||
|
@ -376,6 +379,7 @@ pub fn default_opts() -> Opts {
|
|||
Opts {
|
||||
is_running_problem_test: false,
|
||||
url: None,
|
||||
legacy_layout: false,
|
||||
tile_size: 512,
|
||||
time_profiling: 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 {
|
||||
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("g", "gpu", "GPU painting");
|
||||
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 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 {
|
||||
debug: debug_options.clone(),
|
||||
is_running_problem_test,
|
||||
url: url_opt,
|
||||
legacy_layout,
|
||||
tile_size,
|
||||
time_profiling,
|
||||
time_profiler_trace_path: opt_match.opt_str("profiler-trace-path"),
|
||||
|
|
|
@ -440,6 +440,7 @@ mod gen {
|
|||
flexbox: {
|
||||
enabled: bool,
|
||||
},
|
||||
legacy_layout: bool,
|
||||
#[serde(default = "default_layout_threads")]
|
||||
threads: i64,
|
||||
writing_mode: {
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2018"
|
|||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "layout"
|
||||
name = "layout_2013"
|
||||
path = "lib.rs"
|
||||
test = false
|
||||
doctest = false
|
||||
|
@ -45,7 +45,7 @@ servo_config = { path = "../config" }
|
|||
servo_geometry = { path = "../geometry" }
|
||||
servo_url = { path = "../url" }
|
||||
smallvec = { workspace = true, features = ["union"] }
|
||||
style = { path = "../style", features = ["servo", "servo-layout-2013"] }
|
||||
style = { path = "../style", features = ["servo"] }
|
||||
style_traits = { path = "../style_traits" }
|
||||
unicode-bidi = { workspace = true, features = ["with_serde"] }
|
||||
unicode-script = { workspace = true }
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#[macro_use]
|
||||
extern crate size_of_test;
|
||||
|
||||
use layout::Fragment;
|
||||
use layout::SpecificFragmentInfo;
|
||||
use layout_2013::Fragment;
|
||||
use layout_2013::SpecificFragmentInfo;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
size_of_test!(test_size_of_fragment, Fragment, 176);
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2018"
|
|||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "layout"
|
||||
name = "layout_2020"
|
||||
path = "lib.rs"
|
||||
test = false
|
||||
doctest = false
|
||||
|
@ -41,7 +41,7 @@ serde = { workspace = true }
|
|||
serde_json = { workspace = true }
|
||||
servo_arc = { path = "../servo_arc" }
|
||||
servo_url = { path = "../url" }
|
||||
style = { path = "../style", features = ["servo", "servo-layout-2020"] }
|
||||
style = { path = "../style", features = ["servo"] }
|
||||
style_traits = { path = "../style_traits" }
|
||||
unicode-script = { workspace = true }
|
||||
webrender_api = { workspace = true }
|
||||
|
|
|
@ -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.
|
||||
Image::Rect(ref rect) => match **rect {},
|
||||
Image::ImageSet(..) | Image::CrossFade(..) => {
|
||||
|
|
|
@ -361,6 +361,14 @@ where
|
|||
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
|
||||
|
|
|
@ -473,6 +473,16 @@ impl Lines {
|
|||
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 {
|
||||
TextAlign::Start => Length::zero(),
|
||||
|
|
|
@ -33,6 +33,7 @@ where
|
|||
Image::Rect(..) |
|
||||
Image::Gradient(..) |
|
||||
Image::CrossFade(..) |
|
||||
Image::PaintWorklet(..) |
|
||||
Image::None => None,
|
||||
};
|
||||
marker_image().or_else(|| {
|
||||
|
@ -44,7 +45,6 @@ where
|
|||
|
||||
/// https://drafts.csswg.org/css-lists/#marker-string
|
||||
fn marker_string(style: &style_structs::List) -> Option<&'static str> {
|
||||
// FIXME: add support for counters and other style types
|
||||
match style.list_style_type {
|
||||
ListStyleType::None => None,
|
||||
ListStyleType::Disc => Some("• "),
|
||||
|
@ -52,5 +52,36 @@ fn marker_string(style: &style_structs::List) -> Option<&'static str> {
|
|||
ListStyleType::Square => Some("▪ "),
|
||||
ListStyleType::DisclosureOpen => 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
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ impl PositioningContext {
|
|||
match position {
|
||||
Position::Fixed => {}, // fall through
|
||||
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
|
||||
|
|
|
@ -492,8 +492,9 @@ fn process_offset_parent_query_inner(
|
|||
// TODO: Handle case 2
|
||||
(true, _) |
|
||||
(false, Position::Absolute) |
|
||||
(false, Position::Fixed) |
|
||||
(false, Position::Relative) |
|
||||
(false, Position::Fixed) => true,
|
||||
(false, Position::Sticky) => true,
|
||||
|
||||
// Otherwise, it's not a valid parent
|
||||
(false, Position::Static) => false,
|
||||
|
|
|
@ -497,6 +497,18 @@ impl From<stylo::Display> for Display {
|
|||
// These should not be values of DisplayInside, but oh well
|
||||
stylo::DisplayInside::None => return Display::None,
|
||||
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() {
|
||||
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
|
||||
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 })
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2018"
|
|||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "layout_thread"
|
||||
name = "layout_thread_2013"
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2018"
|
|||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "layout_thread"
|
||||
name = "layout_thread_2020"
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -16,8 +16,6 @@ debugmozjs = ["script/debugmozjs"]
|
|||
googlevr = ["webxr/googlevr"]
|
||||
jitspew = ["script/jitspew"]
|
||||
js_backtrace = ["script/js_backtrace"]
|
||||
layout-2013 = ["layout_thread_2013"]
|
||||
layout-2020 = ["layout_thread_2020"]
|
||||
max_log_level = ["log/release_max_level_info"]
|
||||
media-dummy = ["servo-media-dummy"]
|
||||
media-gstreamer = ["servo-media-gstreamer", "gstreamer"]
|
||||
|
@ -55,8 +53,8 @@ gleam = { workspace = true }
|
|||
gstreamer = { version = "0.15", features = ["v1_16"], optional = true }
|
||||
ipc-channel = { workspace = true }
|
||||
keyboard-types = { workspace = true }
|
||||
layout_thread_2013 = { path = "../layout_thread", optional = true }
|
||||
layout_thread_2020 = { path = "../layout_thread_2020", optional = true }
|
||||
layout_thread_2013 = { path = "../layout_thread" }
|
||||
layout_thread_2020 = { path = "../layout_thread_2020" }
|
||||
log = { workspace = true }
|
||||
media = { path = "../media" }
|
||||
mozangle = { workspace = true }
|
||||
|
|
|
@ -8,16 +8,6 @@ use std::path::Path;
|
|||
use std::process::Command;
|
||||
|
||||
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");
|
||||
|
||||
let output = Command::new(find_python())
|
||||
|
@ -34,11 +24,6 @@ fn main() {
|
|||
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 {
|
||||
env::var("PYTHON3").ok().unwrap_or_else(|| {
|
||||
let candidates = if cfg!(windows) {
|
||||
|
|
|
@ -33,7 +33,8 @@ pub use embedder_traits;
|
|||
pub use euclid;
|
||||
pub use gfx;
|
||||
pub use ipc_channel;
|
||||
pub use layout_thread;
|
||||
pub use layout_thread_2013;
|
||||
pub use layout_thread_2020;
|
||||
pub use media;
|
||||
pub use msg;
|
||||
pub use net;
|
||||
|
@ -887,12 +888,23 @@ fn create_constellation(
|
|||
wgpu_image_map,
|
||||
};
|
||||
|
||||
let constellation_chan = Constellation::<
|
||||
script_layout_interface::message::Msg,
|
||||
layout_thread::LayoutThread,
|
||||
script::script_thread::ScriptThread,
|
||||
script::serviceworker_manager::ServiceWorkerManager,
|
||||
>::start(
|
||||
let start_constellation_chan = if opts::get().legacy_layout {
|
||||
Constellation::<
|
||||
script_layout_interface::message::Msg,
|
||||
layout_thread_2013::LayoutThread,
|
||||
script::script_thread::ScriptThread,
|
||||
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_window_size,
|
||||
opts.random_pipeline_closure_probability,
|
||||
|
@ -902,9 +914,7 @@ fn create_constellation(
|
|||
!opts.debug.disable_canvas_antialiasing,
|
||||
canvas_create_sender,
|
||||
canvas_ipc_sender,
|
||||
);
|
||||
|
||||
constellation_chan
|
||||
)
|
||||
}
|
||||
|
||||
struct FontCacheWR(CompositorProxy);
|
||||
|
@ -1017,14 +1027,23 @@ pub fn run_content_process(token: String) {
|
|||
set_logger(content.script_to_constellation_chan().clone());
|
||||
|
||||
let background_hang_monitor_register = content.register_with_background_hang_monitor();
|
||||
|
||||
content.start_all::<script_layout_interface::message::Msg,
|
||||
layout_thread::LayoutThread,
|
||||
script::script_thread::ScriptThread>(
|
||||
true,
|
||||
background_hang_monitor_register,
|
||||
None,
|
||||
);
|
||||
if opts::get().legacy_layout {
|
||||
content.start_all::<script_layout_interface::message::Msg,
|
||||
layout_thread_2013::LayoutThread,
|
||||
script::script_thread::ScriptThread>(
|
||||
true,
|
||||
background_hang_monitor_register,
|
||||
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) => {
|
||||
content.start::<ServiceWorkerManager>();
|
||||
|
|
|
@ -22,8 +22,6 @@ servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5eve
|
|||
"cssparser/serde", "encoding_rs", "malloc_size_of/servo", "servo_url",
|
||||
"string_cache", "to_shmem/servo",
|
||||
"servo_arc/servo"]
|
||||
servo-layout-2013 = []
|
||||
servo-layout-2020 = []
|
||||
gecko_debug = []
|
||||
gecko_refcount_logging = []
|
||||
|
||||
|
|
|
@ -71,16 +71,12 @@ fn generate_properties(engine: &str) {
|
|||
fn main() {
|
||||
let gecko = cfg!(feature = "gecko");
|
||||
let servo = cfg!(feature = "servo");
|
||||
let l2013 = cfg!(feature = "servo-layout-2013");
|
||||
let l2020 = cfg!(feature = "servo-layout-2020");
|
||||
let engine = match (gecko, servo, l2013, l2020) {
|
||||
(true, false, false, false) => "gecko",
|
||||
(false, true, true, false) => "servo-2013",
|
||||
(false, true, false, true) => "servo-2020",
|
||||
let engine = match (gecko, servo) {
|
||||
(true, false) => "gecko",
|
||||
(false, true) => "servo",
|
||||
_ => panic!(
|
||||
"\n\n\
|
||||
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'.\
|
||||
The style crate requires enabling one of its 'servo' or 'gecko' feature flags. \
|
||||
\n\n"
|
||||
),
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@ STYLE_STRUCT_LIST = [
|
|||
|
||||
def main():
|
||||
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]
|
||||
)
|
||||
if len(sys.argv) < 3:
|
||||
|
@ -58,7 +58,7 @@ def main():
|
|||
engine = sys.argv[1]
|
||||
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",
|
||||
"geckolib",
|
||||
"html",
|
||||
|
@ -102,14 +102,10 @@ def main():
|
|||
rust = render(template, data=properties)
|
||||
write(OUT_DIR, "gecko_properties.rs", rust)
|
||||
|
||||
if engine in ["servo-2013", "servo-2020"]:
|
||||
if engine == "servo-2013":
|
||||
pref_attr = "servo_2013_pref"
|
||||
if engine == "servo-2020":
|
||||
pref_attr = "servo_2020_pref"
|
||||
if engine == "servo":
|
||||
properties_dict = {
|
||||
kind: {
|
||||
p.name: {"pref": getattr(p, pref_attr)}
|
||||
p.name: {"pref": getattr(p, "servo_pref")}
|
||||
for prop in properties_list
|
||||
if prop.enabled_in_content()
|
||||
for p in [prop] + prop.aliases
|
||||
|
|
|
@ -116,11 +116,9 @@ class Keyword(object):
|
|||
gecko_enum_prefix=None,
|
||||
custom_consts=None,
|
||||
extra_gecko_values=None,
|
||||
extra_servo_2013_values=None,
|
||||
extra_servo_2020_values=None,
|
||||
extra_servo_values=None,
|
||||
gecko_aliases=None,
|
||||
servo_2013_aliases=None,
|
||||
servo_2020_aliases=None,
|
||||
servo_aliases=None,
|
||||
gecko_strip_moz_prefix=None,
|
||||
gecko_inexhaustive=None,
|
||||
):
|
||||
|
@ -136,11 +134,9 @@ class Keyword(object):
|
|||
)
|
||||
self.gecko_enum_prefix = gecko_enum_prefix
|
||||
self.extra_gecko_values = (extra_gecko_values or "").split()
|
||||
self.extra_servo_2013_values = (extra_servo_2013_values or "").split()
|
||||
self.extra_servo_2020_values = (extra_servo_2020_values or "").split()
|
||||
self.extra_servo_values = (extra_servo_values or "").split()
|
||||
self.gecko_aliases = parse_aliases(gecko_aliases or "")
|
||||
self.servo_2013_aliases = parse_aliases(servo_2013_aliases or "")
|
||||
self.servo_2020_aliases = parse_aliases(servo_2020_aliases or "")
|
||||
self.servo_aliases = parse_aliases(servo_aliases or "")
|
||||
self.consts_map = {} if custom_consts is None else custom_consts
|
||||
self.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):
|
||||
if engine == "gecko":
|
||||
return self.values + self.extra_gecko_values
|
||||
elif engine == "servo-2013":
|
||||
return self.values + self.extra_servo_2013_values
|
||||
elif engine == "servo-2020":
|
||||
return self.values + self.extra_servo_2020_values
|
||||
elif engine == "servo":
|
||||
return self.values + self.extra_servo_values
|
||||
else:
|
||||
raise Exception("Bad engine: " + engine)
|
||||
|
||||
def aliases_for(self, engine):
|
||||
if engine == "gecko":
|
||||
return self.gecko_aliases
|
||||
elif engine == "servo-2013":
|
||||
return self.servo_2013_aliases
|
||||
elif engine == "servo-2020":
|
||||
return self.servo_2020_aliases
|
||||
elif engine == "servo":
|
||||
return self.servo_aliases
|
||||
else:
|
||||
raise Exception("Bad engine: " + engine)
|
||||
|
||||
|
@ -229,8 +221,7 @@ class Property(object):
|
|||
self,
|
||||
name,
|
||||
spec,
|
||||
servo_2013_pref,
|
||||
servo_2020_pref,
|
||||
servo_pref,
|
||||
gecko_pref,
|
||||
enabled_in,
|
||||
rule_types_allowed,
|
||||
|
@ -244,8 +235,7 @@ class Property(object):
|
|||
self.spec = spec
|
||||
self.ident = to_rust_ident(name)
|
||||
self.camel_case = to_camel_case(self.ident)
|
||||
self.servo_2013_pref = servo_2013_pref
|
||||
self.servo_2020_pref = servo_2020_pref
|
||||
self.servo_pref = servo_pref
|
||||
self.gecko_pref = gecko_pref
|
||||
self.rule_types_allowed = rule_values_from_arg(rule_types_allowed)
|
||||
# For enabled_in, the setup is as follows:
|
||||
|
@ -269,10 +259,8 @@ class Property(object):
|
|||
def experimental(self, engine):
|
||||
if engine == "gecko":
|
||||
return bool(self.gecko_pref)
|
||||
elif engine == "servo-2013":
|
||||
return bool(self.servo_2013_pref)
|
||||
elif engine == "servo-2020":
|
||||
return bool(self.servo_2020_pref)
|
||||
elif engine == "servo":
|
||||
return bool(self.servo_pref)
|
||||
else:
|
||||
raise Exception("Bad engine: " + engine)
|
||||
|
||||
|
@ -298,8 +286,7 @@ class Longhand(Property):
|
|||
animation_value_type=None,
|
||||
keyword=None,
|
||||
predefined_type=None,
|
||||
servo_2013_pref=None,
|
||||
servo_2020_pref=None,
|
||||
servo_pref=None,
|
||||
gecko_pref=None,
|
||||
enabled_in="content",
|
||||
need_index=False,
|
||||
|
@ -323,8 +310,7 @@ class Longhand(Property):
|
|||
self,
|
||||
name=name,
|
||||
spec=spec,
|
||||
servo_2013_pref=servo_2013_pref,
|
||||
servo_2020_pref=servo_2020_pref,
|
||||
servo_pref=servo_pref,
|
||||
gecko_pref=gecko_pref,
|
||||
enabled_in=enabled_in,
|
||||
rule_types_allowed=rule_types_allowed,
|
||||
|
@ -416,15 +402,10 @@ class Longhand(Property):
|
|||
def may_be_disabled_in(self, shorthand, engine):
|
||||
if engine == "gecko":
|
||||
return self.gecko_pref and self.gecko_pref != shorthand.gecko_pref
|
||||
elif engine == "servo-2013":
|
||||
elif engine == "servo":
|
||||
return (
|
||||
self.servo_2013_pref
|
||||
and self.servo_2013_pref != shorthand.servo_2013_pref
|
||||
)
|
||||
elif engine == "servo-2020":
|
||||
return (
|
||||
self.servo_2020_pref
|
||||
and self.servo_2020_pref != shorthand.servo_2020_pref
|
||||
self.servo_pref
|
||||
and self.servo_pref != shorthand.servo_pref
|
||||
)
|
||||
else:
|
||||
raise Exception("Bad engine: " + engine)
|
||||
|
@ -545,8 +526,7 @@ class Shorthand(Property):
|
|||
name,
|
||||
sub_properties,
|
||||
spec=None,
|
||||
servo_2013_pref=None,
|
||||
servo_2020_pref=None,
|
||||
servo_pref=None,
|
||||
gecko_pref=None,
|
||||
enabled_in="content",
|
||||
rule_types_allowed=DEFAULT_RULES,
|
||||
|
@ -558,8 +538,7 @@ class Shorthand(Property):
|
|||
self,
|
||||
name=name,
|
||||
spec=spec,
|
||||
servo_2013_pref=servo_2013_pref,
|
||||
servo_2020_pref=servo_2020_pref,
|
||||
servo_pref=servo_pref,
|
||||
gecko_pref=gecko_pref,
|
||||
enabled_in=enabled_in,
|
||||
rule_types_allowed=rule_types_allowed,
|
||||
|
@ -599,8 +578,7 @@ class Alias(object):
|
|||
self.original = original
|
||||
self.enabled_in = original.enabled_in
|
||||
self.animatable = original.animatable
|
||||
self.servo_2013_pref = original.servo_2013_pref
|
||||
self.servo_2020_pref = original.servo_2020_pref
|
||||
self.servo_pref = original.servo_pref
|
||||
self.gecko_pref = gecko_pref
|
||||
self.transitionable = original.transitionable
|
||||
self.rule_types_allowed = original.rule_types_allowed
|
||||
|
@ -617,10 +595,8 @@ class Alias(object):
|
|||
def experimental(self, engine):
|
||||
if engine == "gecko":
|
||||
return bool(self.gecko_pref)
|
||||
elif engine == "servo-2013":
|
||||
return bool(self.servo_2013_pref)
|
||||
elif engine == "servo-2020":
|
||||
return bool(self.servo_2020_pref)
|
||||
elif engine == "servo":
|
||||
return bool(self.servo_pref)
|
||||
else:
|
||||
raise Exception("Bad engine: " + engine)
|
||||
|
||||
|
@ -750,7 +726,7 @@ def _add_logical_props(data, props):
|
|||
groups = set()
|
||||
for prop in props:
|
||||
if prop not in data.longhands_by_name:
|
||||
assert data.engine in ["servo-2013", "servo-2020"]
|
||||
assert data.engine == "servo"
|
||||
continue
|
||||
prop = data.longhands_by_name[prop]
|
||||
if prop.logical_group:
|
||||
|
|
|
@ -547,8 +547,7 @@
|
|||
'gecko_constant_prefix',
|
||||
'gecko_enum_prefix',
|
||||
'extra_gecko_values',
|
||||
'extra_servo_2013_values',
|
||||
'extra_servo_2020_values',
|
||||
'extra_servo_values',
|
||||
'custom_consts',
|
||||
'gecko_inexhaustive',
|
||||
]}
|
||||
|
@ -714,11 +713,9 @@
|
|||
'gecko_constant_prefix',
|
||||
'gecko_enum_prefix',
|
||||
'extra_gecko_values',
|
||||
'extra_servo_2013_values',
|
||||
'extra_servo_2020_values',
|
||||
'extra_servo_values',
|
||||
'gecko_aliases',
|
||||
'servo_2013_aliases',
|
||||
'servo_2020_aliases',
|
||||
'servo_aliases',
|
||||
'custom_consts',
|
||||
'gecko_inexhaustive',
|
||||
'gecko_strip_moz_prefix',
|
||||
|
|
|
@ -10,7 +10,7 @@ ${helpers.predefined_type(
|
|||
"background-color",
|
||||
"Color",
|
||||
"computed::Color::transparent()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="SpecifiedValue::transparent()",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
|
||||
animation_value_type="AnimatedColor",
|
||||
|
@ -22,7 +22,7 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"background-image",
|
||||
"Image",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::Image::None",
|
||||
initial_specified_value="specified::Image::None",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
|
||||
|
@ -36,7 +36,7 @@ ${helpers.predefined_type(
|
|||
"background-position-" + axis,
|
||||
"position::" + direction + "Position",
|
||||
"computed::LengthPercentage::zero_percent()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="SpecifiedValue::initial_specified_value()",
|
||||
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-" + axis,
|
||||
animation_value_type="ComputedValue",
|
||||
|
@ -49,7 +49,7 @@ ${helpers.predefined_type(
|
|||
"background-repeat",
|
||||
"BackgroundRepeat",
|
||||
"computed::BackgroundRepeat::repeat()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::BackgroundRepeat::repeat()",
|
||||
animation_value_type="discrete",
|
||||
vector=True,
|
||||
|
@ -58,8 +58,8 @@ ${helpers.predefined_type(
|
|||
|
||||
${helpers.single_keyword(
|
||||
"background-attachment",
|
||||
"scroll" + (" fixed" if engine in ["gecko", "servo-2013"] else "") + (" local" if engine == "gecko" else ""),
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
"scroll fixed" + (" local" if engine == "gecko" else ""),
|
||||
engines="gecko servo",
|
||||
vector=True,
|
||||
gecko_enum_prefix="StyleImageLayerAttachment",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
|
||||
|
@ -69,7 +69,7 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"background-clip",
|
||||
"border-box padding-box content-box",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
extra_gecko_values="text",
|
||||
vector=True, extra_prefixes="webkit",
|
||||
gecko_enum_prefix="StyleGeometryBox",
|
||||
|
@ -81,7 +81,7 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"background-origin",
|
||||
"padding-box border-box content-box",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
vector=True, extra_prefixes="webkit",
|
||||
gecko_enum_prefix="StyleGeometryBox",
|
||||
gecko_inexhaustive=True,
|
||||
|
@ -92,7 +92,7 @@ ${helpers.single_keyword(
|
|||
${helpers.predefined_type(
|
||||
"background-size",
|
||||
"BackgroundSize",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::BackgroundSize::auto()",
|
||||
initial_specified_value="specified::BackgroundSize::auto()",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-size",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
${helpers.predefined_type(
|
||||
"border-%s-color" % side_name, "Color",
|
||||
"computed_value::T::currentcolor()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-color"),
|
||||
spec=maybe_logical_spec(side, "color"),
|
||||
animation_value_type="AnimatedColor",
|
||||
|
@ -36,7 +36,7 @@
|
|||
${helpers.predefined_type(
|
||||
"border-%s-style" % side_name, "BorderStyle",
|
||||
"specified::BorderStyle::None",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-style"),
|
||||
spec=maybe_logical_spec(side, "style"),
|
||||
animation_value_type="discrete" if not is_logical else "none",
|
||||
|
@ -48,7 +48,7 @@
|
|||
"border-%s-width" % side_name,
|
||||
"BorderSideWidth",
|
||||
"crate::values::computed::NonNegativeLength::new(3.)",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
computed_type="crate::values::computed::NonNegativeLength",
|
||||
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-width"),
|
||||
spec=maybe_logical_spec(side, "width"),
|
||||
|
@ -74,7 +74,7 @@
|
|||
"BorderCornerRadius",
|
||||
"computed::BorderCornerRadius::zero()",
|
||||
"parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
extra_prefixes=prefixes,
|
||||
spec=maybe_logical_spec(corner, "radius"),
|
||||
boxed=True,
|
||||
|
@ -106,20 +106,20 @@ ${helpers.single_keyword(
|
|||
${helpers.predefined_type(
|
||||
"border-image-source",
|
||||
"Image",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::Image::None",
|
||||
initial_specified_value="specified::Image::None",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
|
||||
vector=False,
|
||||
animation_value_type="discrete",
|
||||
boxed=engine == "servo-2013",
|
||||
boxed=engine == "servo",
|
||||
ignored_when_colors_disabled=True
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"border-image-outset",
|
||||
"NonNegativeLengthOrNumberRect",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero())",
|
||||
initial_specified_value="generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero())",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset",
|
||||
|
@ -131,7 +131,7 @@ ${helpers.predefined_type(
|
|||
"border-image-repeat",
|
||||
"BorderImageRepeat",
|
||||
"computed::BorderImageRepeat::stretch()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::BorderImageRepeat::stretch()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat",
|
||||
|
@ -140,7 +140,7 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"border-image-width",
|
||||
"BorderImageWidth",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())",
|
||||
initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-width",
|
||||
|
@ -151,7 +151,7 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"border-image-slice",
|
||||
"BorderImageSlice",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::BorderImageSlice::hundred_percent()",
|
||||
initial_specified_value="specified::BorderImageSlice::hundred_percent()",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",
|
||||
|
|
|
@ -13,7 +13,7 @@ ${helpers.predefined_type(
|
|||
"display",
|
||||
"Display",
|
||||
"computed::Display::inline()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Display::inline()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-display/#propdef-display",
|
||||
|
@ -36,7 +36,7 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"-servo-top-layer",
|
||||
"none top",
|
||||
engines="servo-2013 servo-2020",
|
||||
engines="servo",
|
||||
animation_value_type="none",
|
||||
enabled_in="ua",
|
||||
spec="Internal (not web-exposed)",
|
||||
|
@ -44,8 +44,8 @@ ${helpers.single_keyword(
|
|||
|
||||
<%helpers:single_keyword
|
||||
name="position"
|
||||
values="static absolute relative fixed ${'sticky' if engine in ['gecko', 'servo-2013'] else ''}"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
values="static absolute relative fixed sticky"
|
||||
engines="gecko servo"
|
||||
animation_value_type="discrete"
|
||||
gecko_enum_prefix="StylePositionProperty"
|
||||
spec="https://drafts.csswg.org/css-position/#position-property"
|
||||
|
@ -65,7 +65,7 @@ ${helpers.predefined_type(
|
|||
"float",
|
||||
"Float",
|
||||
"computed::Float::None",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Float::None",
|
||||
spec="https://drafts.csswg.org/css-box/#propdef-float",
|
||||
animation_value_type="discrete",
|
||||
|
@ -77,7 +77,7 @@ ${helpers.predefined_type(
|
|||
"clear",
|
||||
"Clear",
|
||||
"computed::Clear::None",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="discrete",
|
||||
gecko_ffi_name="mBreakType",
|
||||
spec="https://drafts.csswg.org/css-box/#propdef-clear",
|
||||
|
@ -88,7 +88,8 @@ ${helpers.predefined_type(
|
|||
"vertical-align",
|
||||
"VerticalAlign",
|
||||
"computed::VerticalAlign::baseline()",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align",
|
||||
servo_restyle_damage = "reflow",
|
||||
|
@ -99,13 +100,15 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"-servo-overflow-clip-box",
|
||||
"padding-box content-box",
|
||||
engines="servo-2013",
|
||||
engines="servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="none",
|
||||
enabled_in="ua",
|
||||
spec="Internal, not web-exposed, \
|
||||
may be standardized in the future (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)",
|
||||
)}
|
||||
|
||||
|
||||
% for direction in ["inline", "block"]:
|
||||
${helpers.predefined_type(
|
||||
"overflow-clip-box-" + direction,
|
||||
|
@ -126,7 +129,7 @@ ${helpers.single_keyword(
|
|||
full_name,
|
||||
"Overflow",
|
||||
"computed::Overflow::Visible",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
logical_group="overflow",
|
||||
logical=logical,
|
||||
animation_value_type="discrete",
|
||||
|
@ -153,7 +156,7 @@ ${helpers.predefined_type(
|
|||
"transition-duration",
|
||||
"Time",
|
||||
"computed::Time::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Time::zero()",
|
||||
parse_method="parse_non_negative",
|
||||
vector=True,
|
||||
|
@ -167,7 +170,7 @@ ${helpers.predefined_type(
|
|||
"transition-timing-function",
|
||||
"TimingFunction",
|
||||
"computed::TimingFunction::ease()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::TimingFunction::ease()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -180,7 +183,7 @@ ${helpers.predefined_type(
|
|||
"transition-property",
|
||||
"TransitionProperty",
|
||||
"computed::TransitionProperty::all()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::TransitionProperty::all()",
|
||||
vector=True,
|
||||
allow_empty="NotInitial",
|
||||
|
@ -194,7 +197,7 @@ ${helpers.predefined_type(
|
|||
"transition-delay",
|
||||
"Time",
|
||||
"computed::Time::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Time::zero()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -209,7 +212,7 @@ ${helpers.predefined_type(
|
|||
"animation-name",
|
||||
"AnimationName",
|
||||
"computed::AnimationName::none()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::AnimationName::none()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -223,7 +226,7 @@ ${helpers.predefined_type(
|
|||
"animation-duration",
|
||||
"Time",
|
||||
"computed::Time::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Time::zero()",
|
||||
parse_method="parse_non_negative",
|
||||
vector=True,
|
||||
|
@ -239,7 +242,7 @@ ${helpers.predefined_type(
|
|||
"animation-timing-function",
|
||||
"TimingFunction",
|
||||
"computed::TimingFunction::ease()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::TimingFunction::ease()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -252,7 +255,7 @@ ${helpers.predefined_type(
|
|||
"animation-iteration-count",
|
||||
"AnimationIterationCount",
|
||||
"computed::AnimationIterationCount::one()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::AnimationIterationCount::one()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -266,7 +269,7 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"animation-direction",
|
||||
"normal reverse alternate alternate-reverse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
need_index=True,
|
||||
animation_value_type="none",
|
||||
vector=True,
|
||||
|
@ -281,7 +284,7 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"animation-play-state",
|
||||
"running paused",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
need_index=True,
|
||||
animation_value_type="none",
|
||||
vector=True,
|
||||
|
@ -294,7 +297,7 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"animation-fill-mode",
|
||||
"none forwards backwards both",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
need_index=True,
|
||||
animation_value_type="none",
|
||||
vector=True,
|
||||
|
@ -309,7 +312,7 @@ ${helpers.predefined_type(
|
|||
"animation-delay",
|
||||
"Time",
|
||||
"computed::Time::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Time::zero()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -323,9 +326,8 @@ ${helpers.predefined_type(
|
|||
"animation-timeline",
|
||||
"AnimationTimeline",
|
||||
"computed::AnimationTimeline::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2013_pref="layout.2013.unimplemented",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.unimplemented",
|
||||
initial_specified_value="specified::AnimationTimeline::auto()",
|
||||
vector=True,
|
||||
need_index=True,
|
||||
|
@ -341,7 +343,7 @@ ${helpers.predefined_type(
|
|||
"transform",
|
||||
"Transform",
|
||||
"generics::transform::Transform::none()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
extra_prefixes=transform_extra_prefixes,
|
||||
animation_value_type="ComputedValue",
|
||||
flags="CAN_ANIMATE_ON_COMPOSITOR",
|
||||
|
@ -353,7 +355,7 @@ ${helpers.predefined_type(
|
|||
"rotate",
|
||||
"Rotate",
|
||||
"generics::transform::Rotate::None",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
boxed=True,
|
||||
flags="CAN_ANIMATE_ON_COMPOSITOR",
|
||||
|
@ -366,7 +368,7 @@ ${helpers.predefined_type(
|
|||
"scale",
|
||||
"Scale",
|
||||
"generics::transform::Scale::None",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
boxed=True,
|
||||
flags="CAN_ANIMATE_ON_COMPOSITOR",
|
||||
|
@ -379,7 +381,7 @@ ${helpers.predefined_type(
|
|||
"translate",
|
||||
"Translate",
|
||||
"generics::transform::Translate::None",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
boxed=True,
|
||||
flags="CAN_ANIMATE_ON_COMPOSITOR",
|
||||
|
@ -538,7 +540,7 @@ ${helpers.predefined_type(
|
|||
"perspective",
|
||||
"Perspective",
|
||||
"computed::Perspective::none()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
gecko_ffi_name="mChildPerspective",
|
||||
spec="https://drafts.csswg.org/css-transforms/#perspective",
|
||||
extra_prefixes=transform_extra_prefixes,
|
||||
|
@ -550,7 +552,7 @@ ${helpers.predefined_type(
|
|||
"perspective-origin",
|
||||
"Position",
|
||||
"computed::position::Position::center()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
boxed=True,
|
||||
extra_prefixes=transform_extra_prefixes,
|
||||
spec="https://drafts.csswg.org/css-transforms-2/#perspective-origin-property",
|
||||
|
@ -561,7 +563,7 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"backface-visibility",
|
||||
"visible hidden",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
gecko_enum_prefix="StyleBackfaceVisibility",
|
||||
spec="https://drafts.csswg.org/css-transforms/#backface-visibility-property",
|
||||
extra_prefixes=transform_extra_prefixes,
|
||||
|
@ -582,7 +584,7 @@ ${helpers.predefined_type(
|
|||
"transform-style",
|
||||
"TransformStyle",
|
||||
"computed::TransformStyle::Flat",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-transforms-2/#transform-style-property",
|
||||
extra_prefixes=transform_extra_prefixes,
|
||||
animation_value_type="discrete",
|
||||
|
@ -593,7 +595,7 @@ ${helpers.predefined_type(
|
|||
"transform-origin",
|
||||
"TransformOrigin",
|
||||
"computed::TransformOrigin::initial_value()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
extra_prefixes=transform_extra_prefixes,
|
||||
gecko_ffi_name="mTransformOrigin",
|
||||
|
|
|
@ -10,11 +10,10 @@ ${helpers.predefined_type(
|
|||
"column-width",
|
||||
"length::NonNegativeLengthOrAuto",
|
||||
"computed::length::NonNegativeLengthOrAuto::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::length::NonNegativeLengthOrAuto::auto()",
|
||||
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",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
)}
|
||||
|
@ -23,10 +22,9 @@ ${helpers.predefined_type(
|
|||
"column-count",
|
||||
"ColumnCount",
|
||||
"computed::ColumnCount::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::ColumnCount::auto()",
|
||||
servo_2013_pref="layout.columns.enabled",
|
||||
servo_pref="layout.columns.enabled",
|
||||
animation_value_type="AnimatedColumnCount",
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -67,8 +65,8 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"column-span",
|
||||
"none all",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.columns.enabled",
|
||||
animation_value_type="discrete",
|
||||
gecko_enum_prefix="StyleColumnSpan",
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-span",
|
||||
|
|
|
@ -10,7 +10,7 @@ ${helpers.predefined_type(
|
|||
"content",
|
||||
"Content",
|
||||
"computed::Content::normal()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Content::normal()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-content/#propdef-content",
|
||||
|
@ -20,7 +20,8 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"counter-increment",
|
||||
"CounterIncrement",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
initial_value="Default::default()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment",
|
||||
|
@ -30,7 +31,8 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"counter-reset",
|
||||
"CounterReset",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
initial_value="Default::default()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",
|
||||
|
|
|
@ -11,7 +11,7 @@ ${helpers.predefined_type(
|
|||
"opacity",
|
||||
"Opacity",
|
||||
"1.0",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
flags="CAN_ANIMATE_ON_COMPOSITOR",
|
||||
spec="https://drafts.csswg.org/css-color/#transparency",
|
||||
|
@ -22,8 +22,8 @@ ${helpers.predefined_type(
|
|||
"box-shadow",
|
||||
"BoxShadow",
|
||||
None,
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
vector=True,
|
||||
simple_vector_bindings=True,
|
||||
animation_value_type="AnimatedBoxShadowList",
|
||||
|
@ -37,7 +37,7 @@ ${helpers.predefined_type(
|
|||
"clip",
|
||||
"ClipRectOrAuto",
|
||||
"computed::ClipRectOrAuto::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
boxed=True,
|
||||
allow_quirks="Yes",
|
||||
|
@ -48,7 +48,7 @@ ${helpers.predefined_type(
|
|||
"filter",
|
||||
"Filter",
|
||||
None,
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
vector=True,
|
||||
simple_vector_bindings=True,
|
||||
gecko_ffi_name="mFilters",
|
||||
|
@ -79,7 +79,7 @@ ${helpers.single_keyword(
|
|||
"""normal multiply screen overlay darken lighten color-dodge
|
||||
color-burn hard-light soft-light difference exclusion hue
|
||||
saturation color luminosity""" + ("plus-lighter" if engine == 'gecko' else ""),
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
gecko_enum_prefix="StyleBlend",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
${helpers.predefined_type(
|
||||
"font-family",
|
||||
"FontFamily",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::FontFamily::serif()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
|
||||
|
@ -20,7 +20,7 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"font-style",
|
||||
"FontStyle",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::FontStyle::normal()",
|
||||
initial_specified_value="specified::FontStyle::normal()",
|
||||
animation_value_type="FontStyle",
|
||||
|
@ -37,7 +37,7 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword_system(
|
||||
"font-variant-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",
|
||||
gecko_constant_prefix="NS_FONT_VARIANT_CAPS",
|
||||
gecko_ffi_name="mFont.variantCaps",
|
||||
|
@ -50,7 +50,7 @@ ${helpers.single_keyword_system(
|
|||
${helpers.predefined_type(
|
||||
"font-weight",
|
||||
"FontWeight",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::FontWeight::normal()",
|
||||
initial_specified_value="specified::FontWeight::normal()",
|
||||
animation_value_type="Number",
|
||||
|
@ -61,7 +61,7 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"font-size",
|
||||
"FontSize",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::FontSize::medium()",
|
||||
initial_specified_value="specified::FontSize::medium()",
|
||||
animation_value_type="NonNegativeLength",
|
||||
|
@ -92,7 +92,7 @@ ${helpers.predefined_type(
|
|||
${helpers.predefined_type(
|
||||
"font-stretch",
|
||||
"FontStretch",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::FontStretch::hundred()",
|
||||
initial_specified_value="specified::FontStretch::normal()",
|
||||
animation_value_type="Percentage",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
${helpers.single_keyword(
|
||||
"visibility",
|
||||
"visible hidden collapse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
gecko_ffi_name="mVisible",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-box/#propdef-visibility",
|
||||
|
@ -22,13 +22,12 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"writing-mode",
|
||||
"horizontal-tb vertical-rl vertical-lr",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
extra_gecko_values="sideways-rl sideways-lr",
|
||||
gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
|
||||
rl=horizontal-tb rl-tb=horizontal-tb \
|
||||
tb=vertical-rl tb-rl=vertical-rl",
|
||||
servo_2013_pref="layout.writing-mode.enabled",
|
||||
servo_2020_pref="layout.writing-mode.enabled",
|
||||
servo_pref="layout.writing-mode.enabled",
|
||||
animation_value_type="none",
|
||||
spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
|
||||
gecko_enum_prefix="StyleWritingModeProperty",
|
||||
|
@ -38,8 +37,8 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"direction",
|
||||
"ltr rtl",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="none",
|
||||
spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
|
||||
gecko_enum_prefix="StyleDirection",
|
||||
|
@ -72,7 +71,7 @@ ${helpers.predefined_type(
|
|||
"image-rendering",
|
||||
"ImageRendering",
|
||||
"computed::ImageRendering::Auto",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-images/#propdef-image-rendering",
|
||||
animation_value_type="discrete",
|
||||
)}
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
${helpers.single_keyword(
|
||||
"border-collapse",
|
||||
"separate collapse",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
gecko_enum_prefix="StyleBorderCollapse",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-tables/#propdef-border-collapse",
|
||||
|
@ -19,7 +20,8 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"empty-cells",
|
||||
"show hide",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
gecko_enum_prefix="StyleEmptyCells",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-tables/#propdef-empty-cells",
|
||||
|
@ -30,7 +32,8 @@ ${helpers.predefined_type(
|
|||
"caption-side",
|
||||
"table::CaptionSide",
|
||||
"computed::table::CaptionSide::Top",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-tables/#propdef-caption-side",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -40,8 +43,8 @@ ${helpers.predefined_type(
|
|||
"border-spacing",
|
||||
"BorderSpacing",
|
||||
"computed::BorderSpacing::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="BorderSpacing",
|
||||
boxed=True,
|
||||
spec="https://drafts.csswg.org/css-tables/#propdef-border-spacing",
|
||||
|
|
|
@ -10,7 +10,7 @@ ${helpers.predefined_type(
|
|||
"color",
|
||||
"ColorPropertyValue",
|
||||
"::cssparser::RGBA::new(0, 0, 0, 255)",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="AnimatedRGBA",
|
||||
ignored_when_colors_disabled="True",
|
||||
spec="https://drafts.csswg.org/css-color/#color",
|
||||
|
@ -20,7 +20,7 @@ ${helpers.predefined_type(
|
|||
"line-height",
|
||||
"LineHeight",
|
||||
"computed::LineHeight::normal()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="LineHeight",
|
||||
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height",
|
||||
servo_restyle_damage="reflow"
|
||||
|
@ -32,7 +32,8 @@ ${helpers.predefined_type(
|
|||
"text-transform",
|
||||
"TextTransform",
|
||||
"computed::TextTransform::none()",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-text-transform",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -64,7 +65,7 @@ ${helpers.predefined_type(
|
|||
"text-indent",
|
||||
"LengthPercentage",
|
||||
"computed::LengthPercentage::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-text-indent",
|
||||
allow_quirks="Yes",
|
||||
|
@ -77,8 +78,8 @@ ${helpers.predefined_type(
|
|||
"overflow-wrap",
|
||||
"OverflowWrap",
|
||||
"computed::OverflowWrap::Normal",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
|
||||
aliases="word-wrap",
|
||||
|
@ -89,8 +90,8 @@ ${helpers.predefined_type(
|
|||
"word-break",
|
||||
"WordBreak",
|
||||
"computed::WordBreak::Normal",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-word-break",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -100,8 +101,8 @@ ${helpers.predefined_type(
|
|||
"text-justify",
|
||||
"TextJustify",
|
||||
"computed::TextJustify::Auto",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-text-justify",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -121,7 +122,7 @@ ${helpers.predefined_type(
|
|||
"text-align",
|
||||
"TextAlign",
|
||||
"computed::TextAlign::Start",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-text-align",
|
||||
servo_restyle_damage = "reflow",
|
||||
|
@ -131,7 +132,7 @@ ${helpers.predefined_type(
|
|||
"letter-spacing",
|
||||
"LetterSpacing",
|
||||
"computed::LetterSpacing::normal()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -141,7 +142,7 @@ ${helpers.predefined_type(
|
|||
"word-spacing",
|
||||
"WordSpacing",
|
||||
"computed::WordSpacing::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-word-spacing",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -150,7 +151,7 @@ ${helpers.predefined_type(
|
|||
<%helpers:single_keyword
|
||||
name="white-space"
|
||||
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"
|
||||
gecko_enum_prefix="StyleWhiteSpace"
|
||||
needs_conversion="True"
|
||||
|
@ -158,7 +159,7 @@ ${helpers.predefined_type(
|
|||
spec="https://drafts.csswg.org/css-text/#propdef-white-space"
|
||||
servo_restyle_damage="rebuild_and_reflow"
|
||||
>
|
||||
% if engine in ["servo-2013", "servo-2020"]:
|
||||
% if engine == "servo":
|
||||
impl SpecifiedValue {
|
||||
pub fn allow_wrap(&self) -> bool {
|
||||
match *self {
|
||||
|
@ -197,7 +198,8 @@ ${helpers.predefined_type(
|
|||
"text-shadow",
|
||||
"SimpleShadow",
|
||||
None,
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
vector=True,
|
||||
vector_animation_type="with_zero",
|
||||
animation_value_type="AnimatedTextShadowList",
|
||||
|
@ -325,7 +327,7 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"text-rendering",
|
||||
"auto optimizespeed optimizelegibility geometricprecision",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
gecko_enum_prefix="StyleTextRendering",
|
||||
animation_value_type="discrete",
|
||||
spec="https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty",
|
||||
|
|
|
@ -10,7 +10,7 @@ ${helpers.predefined_type(
|
|||
"cursor",
|
||||
"Cursor",
|
||||
"computed::Cursor::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Cursor::auto()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-ui/#cursor",
|
||||
|
@ -22,7 +22,7 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"pointer-events",
|
||||
"auto none",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="discrete",
|
||||
extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all",
|
||||
spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty",
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
${helpers.single_keyword(
|
||||
"list-style-position",
|
||||
"outside inside",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.2020.unimplemented",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -22,17 +22,16 @@ ${helpers.single_keyword(
|
|||
// upper-roman
|
||||
//
|
||||
// [1]: http://dev.w3.org/csswg/css-counter-styles/
|
||||
% if engine in ["servo-2013", "servo-2020"]:
|
||||
% if engine == "servo":
|
||||
${helpers.single_keyword(
|
||||
"list-style-type",
|
||||
"disc none circle square disclosure-open disclosure-closed",
|
||||
extra_servo_2013_values="""
|
||||
decimal lower-alpha upper-alpha arabic-indic bengali cambodian cjk-decimal devanagari
|
||||
gujarati gurmukhi kannada khmer lao malayalam mongolian myanmar oriya persian telugu
|
||||
thai tibetan cjk-earthly-branch cjk-heavenly-stem lower-greek hiragana hiragana-iroha
|
||||
katakana katakana-iroha
|
||||
"""disc none circle square disclosure-open disclosure-closed
|
||||
decimal lower-alpha upper-alpha arabic-indic bengali cambodian cjk-decimal devanagari
|
||||
gujarati gurmukhi kannada khmer lao malayalam mongolian myanmar oriya persian telugu
|
||||
thai tibetan cjk-earthly-branch cjk-heavenly-stem lower-greek hiragana hiragana-iroha
|
||||
katakana katakana-iroha
|
||||
""",
|
||||
engines="servo-2013 servo-2020",
|
||||
engines="servo",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -55,12 +54,12 @@ ${helpers.single_keyword(
|
|||
${helpers.predefined_type(
|
||||
"list-style-image",
|
||||
"Image",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_value="computed::Image::None",
|
||||
initial_specified_value="specified::Image::None",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image",
|
||||
boxed=engine == "servo-2013",
|
||||
boxed=engine == "servo",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
)}
|
||||
|
||||
|
@ -68,7 +67,8 @@ ${helpers.predefined_type(
|
|||
"quotes",
|
||||
"Quotes",
|
||||
"computed::Quotes::get_initial_value()",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-content/#propdef-quotes",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"margin-%s" % side[0],
|
||||
"LengthPercentageOrAuto",
|
||||
"computed::LengthPercentageOrAuto::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
aliases=maybe_moz_logical_alias(engine, side, "-moz-margin-%s"),
|
||||
allow_quirks="No" if side[1] else "Yes",
|
||||
animation_value_type="ComputedValue",
|
||||
|
|
|
@ -14,7 +14,7 @@ ${helpers.predefined_type(
|
|||
"outline-color",
|
||||
"Color",
|
||||
"computed_value::T::currentcolor()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Color::currentcolor()",
|
||||
animation_value_type="AnimatedColor",
|
||||
ignored_when_colors_disabled=True,
|
||||
|
@ -25,7 +25,7 @@ ${helpers.predefined_type(
|
|||
"outline-style",
|
||||
"OutlineStyle",
|
||||
"computed::OutlineStyle::none()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::OutlineStyle::none()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
|
||||
|
@ -35,7 +35,7 @@ ${helpers.predefined_type(
|
|||
"outline-width",
|
||||
"BorderSideWidth",
|
||||
"crate::values::computed::NonNegativeLength::new(3.)",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::BorderSideWidth::Medium",
|
||||
computed_type="crate::values::computed::NonNegativeLength",
|
||||
animation_value_type="NonNegativeLength",
|
||||
|
@ -46,7 +46,7 @@ ${helpers.predefined_type(
|
|||
"outline-offset",
|
||||
"Length",
|
||||
"crate::values::computed::Length::new(0.)",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset",
|
||||
)}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"padding-%s" % side[0],
|
||||
"NonNegativeLengthPercentage",
|
||||
"computed::NonNegativeLengthPercentage::zero()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
aliases=maybe_moz_logical_alias(engine, side, "-moz-padding-%s"),
|
||||
animation_value_type="NonNegativeLengthPercentage",
|
||||
logical=side[1],
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
side,
|
||||
"LengthPercentageOrAuto",
|
||||
"computed::LengthPercentageOrAuto::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
|
||||
animation_value_type="ComputedValue",
|
||||
allow_quirks="Yes",
|
||||
|
@ -28,7 +28,7 @@
|
|||
"inset-%s" % side,
|
||||
"LengthPercentageOrAuto",
|
||||
"computed::LengthPercentageOrAuto::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side,
|
||||
animation_value_type="ComputedValue",
|
||||
logical=True,
|
||||
|
@ -58,7 +58,7 @@ ${helpers.predefined_type(
|
|||
"z-index",
|
||||
"ZIndex",
|
||||
"computed::ZIndex::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://www.w3.org/TR/CSS2/visuren.html#z-index",
|
||||
animation_value_type="ComputedValue",
|
||||
)}
|
||||
|
@ -70,8 +70,8 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"flex-direction",
|
||||
"row row-reverse column column-reverse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
|
||||
extra_prefixes="webkit",
|
||||
animation_value_type="discrete",
|
||||
|
@ -82,8 +82,8 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"flex-wrap",
|
||||
"nowrap wrap wrap-reverse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
|
||||
extra_prefixes="webkit",
|
||||
animation_value_type="discrete",
|
||||
|
@ -91,13 +91,13 @@ ${helpers.single_keyword(
|
|||
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.
|
||||
${helpers.single_keyword(
|
||||
"justify-content",
|
||||
"flex-start stretch flex-end center space-between space-around",
|
||||
engines="servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
|
||||
animation_value_type="discrete",
|
||||
|
@ -128,13 +128,13 @@ ${helpers.single_keyword(
|
|||
)}
|
||||
% endif
|
||||
|
||||
% if engine in ["servo-2013", "servo-2020"]:
|
||||
% if engine == "servo":
|
||||
// FIXME: Update Servo to support the same Syntax as Gecko.
|
||||
${helpers.single_keyword(
|
||||
"align-content",
|
||||
"stretch flex-start flex-end center space-between space-around",
|
||||
engines="servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-align/#propdef-align-content",
|
||||
animation_value_type="discrete",
|
||||
|
@ -144,8 +144,8 @@ ${helpers.single_keyword(
|
|||
${helpers.single_keyword(
|
||||
"align-items",
|
||||
"stretch flex-start flex-end center baseline",
|
||||
engines="servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
|
||||
animation_value_type="discrete",
|
||||
|
@ -207,8 +207,8 @@ ${helpers.predefined_type(
|
|||
"flex-grow",
|
||||
"NonNegativeNumber",
|
||||
"From::from(0.0)",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
|
||||
extra_prefixes="webkit",
|
||||
animation_value_type="NonNegativeNumber",
|
||||
|
@ -219,8 +219,8 @@ ${helpers.predefined_type(
|
|||
"flex-shrink",
|
||||
"NonNegativeNumber",
|
||||
"From::from(1.0)",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
|
||||
extra_prefixes="webkit",
|
||||
animation_value_type="NonNegativeNumber",
|
||||
|
@ -228,13 +228,13 @@ ${helpers.predefined_type(
|
|||
)}
|
||||
|
||||
// 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.
|
||||
${helpers.single_keyword(
|
||||
"align-self",
|
||||
"auto stretch flex-start flex-end center baseline",
|
||||
engines="servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
|
||||
animation_value_type="discrete",
|
||||
|
@ -270,8 +270,8 @@ ${helpers.predefined_type(
|
|||
"order",
|
||||
"Integer",
|
||||
"0",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
extra_prefixes="webkit",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#order-property",
|
||||
|
@ -282,8 +282,8 @@ ${helpers.predefined_type(
|
|||
"flex-basis",
|
||||
"FlexBasis",
|
||||
"computed::FlexBasis::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
|
||||
extra_prefixes="webkit",
|
||||
animation_value_type="FlexBasis",
|
||||
|
@ -302,7 +302,7 @@ ${helpers.predefined_type(
|
|||
size,
|
||||
"Size",
|
||||
"computed::Size::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
logical=logical,
|
||||
logical_group="size",
|
||||
allow_quirks="No" if logical else "Yes",
|
||||
|
@ -315,7 +315,7 @@ ${helpers.predefined_type(
|
|||
"min-%s" % size,
|
||||
"Size",
|
||||
"computed::Size::auto()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
logical=logical,
|
||||
logical_group="min-size",
|
||||
allow_quirks="No" if logical else "Yes",
|
||||
|
@ -327,7 +327,7 @@ ${helpers.predefined_type(
|
|||
"max-%s" % size,
|
||||
"MaxSize",
|
||||
"computed::MaxSize::none()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
logical=logical,
|
||||
logical_group="max-size",
|
||||
allow_quirks="No" if logical else "Yes",
|
||||
|
@ -340,7 +340,7 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"box-sizing",
|
||||
"content-box border-box",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
extra_prefixes="moz:layout.css.prefixes.box-sizing webkit",
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
|
||||
gecko_enum_prefix="StyleBoxSizing",
|
||||
|
@ -432,9 +432,9 @@ ${helpers.predefined_type(
|
|||
"column-gap",
|
||||
"length::NonNegativeLengthPercentageOrNormal",
|
||||
"computed::length::NonNegativeLengthPercentageOrNormal::normal()",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
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",
|
||||
animation_value_type="NonNegativeLengthPercentageOrNormal",
|
||||
servo_restyle_damage="reflow",
|
||||
|
@ -456,7 +456,8 @@ ${helpers.predefined_type(
|
|||
"aspect-ratio",
|
||||
"AspectRatio",
|
||||
"computed::AspectRatio::auto()",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-sizing-4/#aspect-ratio",
|
||||
gecko_pref="layout.css.aspect-ratio.enabled",
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
${helpers.single_keyword(
|
||||
"table-layout",
|
||||
"auto fixed",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
gecko_ffi_name="mLayoutStrategy",
|
||||
animation_value_type="discrete",
|
||||
gecko_enum_prefix="StyleTableLayout",
|
||||
|
|
|
@ -11,7 +11,8 @@ ${helpers.predefined_type(
|
|||
"text-overflow",
|
||||
"TextOverflow",
|
||||
"computed::TextOverflow::get_initial_value()",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="discrete",
|
||||
boxed=True,
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",
|
||||
|
@ -21,7 +22,8 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"unicode-bidi",
|
||||
"normal embed isolate bidi-override isolate-override plaintext",
|
||||
engines="gecko servo-2013",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.legacy_layout",
|
||||
animation_value_type="none",
|
||||
spec="https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
|
@ -31,7 +33,7 @@ ${helpers.predefined_type(
|
|||
"text-decoration-line",
|
||||
"TextDecorationLine",
|
||||
"specified::TextDecorationLine::none()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::TextDecorationLine::none()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
|
||||
|
@ -41,7 +43,7 @@ ${helpers.predefined_type(
|
|||
${helpers.single_keyword(
|
||||
"text-decoration-style",
|
||||
"solid double dotted dashed wavy -moz-none",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style",
|
||||
)}
|
||||
|
@ -50,7 +52,7 @@ ${helpers.predefined_type(
|
|||
"text-decoration-color",
|
||||
"Color",
|
||||
"computed_value::T::currentcolor()",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
initial_specified_value="specified::Color::currentcolor()",
|
||||
animation_value_type="AnimatedColor",
|
||||
ignored_when_colors_disabled=True,
|
||||
|
|
|
@ -177,7 +177,7 @@ pub mod shorthands {
|
|||
data.declare_shorthand(
|
||||
"all",
|
||||
logical_longhands + other_longhands,
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
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():
|
||||
<%
|
||||
attrs = {"servo-2013": "servo_2013_pref", "servo-2020": "servo_2020_pref"}
|
||||
pref = getattr(property, attrs[engine])
|
||||
pref = getattr(property, "servo_pref")
|
||||
%>
|
||||
% if pref:
|
||||
Some("${pref}"),
|
||||
|
@ -1351,9 +1350,7 @@ impl LonghandId {
|
|||
LonghandId::BorderRightColor |
|
||||
LonghandId::BorderBottomColor |
|
||||
LonghandId::BorderLeftColor |
|
||||
% if engine in ["gecko", "servo-2013"]:
|
||||
LonghandId::OutlineColor |
|
||||
% endif
|
||||
LonghandId::Color
|
||||
)
|
||||
}
|
||||
|
@ -3817,7 +3814,7 @@ impl<'a> StyleBuilder<'a> {
|
|||
}
|
||||
% 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`.
|
||||
#[allow(non_snake_case)]
|
||||
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"]:
|
||||
macro_rules! restyle_damage_${effect_name} {
|
||||
($old: ident, $new: ident, $damage: ident, [ $($effect:expr),* ]) => ({
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
// TODO: other background-* properties
|
||||
<%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
|
||||
background-attachment background-image background-size background-origin
|
||||
background-clip"
|
||||
|
@ -194,7 +194,7 @@
|
|||
</%helpers:shorthand>
|
||||
|
||||
<%helpers:shorthand name="background-position"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
flags="SHORTHAND_IN_GETCS"
|
||||
sub_properties="background-position-x background-position-y"
|
||||
spec="https://drafts.csswg.org/css-backgrounds-4/#the-background-position">
|
||||
|
|
|
@ -9,7 +9,7 @@ ${helpers.four_sides_shorthand(
|
|||
"border-color",
|
||||
"border-%s-color",
|
||||
"specified::Color::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#border-color",
|
||||
allow_quirks="Yes",
|
||||
)}
|
||||
|
@ -17,13 +17,13 @@ ${helpers.four_sides_shorthand(
|
|||
${helpers.four_sides_shorthand(
|
||||
"border-style",
|
||||
"border-%s-style",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#border-style",
|
||||
)}
|
||||
|
||||
<%helpers:shorthand
|
||||
name="border-width"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="${
|
||||
' '.join('border-%s-width' % side
|
||||
for side in PHYSICAL_SIDES)}"
|
||||
|
@ -107,7 +107,7 @@ pub fn parse_border<'i, 't>(
|
|||
%>
|
||||
<%helpers:shorthand
|
||||
name="border-${side}"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="${' '.join(
|
||||
'border-%s-%s' % (side, prop)
|
||||
for prop in ['color', 'style', 'width']
|
||||
|
@ -142,7 +142,7 @@ pub fn parse_border<'i, 't>(
|
|||
% endfor
|
||||
|
||||
<%helpers:shorthand name="border"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="${' '.join('border-%s-%s' % (side, prop)
|
||||
for side in PHYSICAL_SIDES
|
||||
for prop in ['color', 'style', 'width'])}
|
||||
|
@ -236,7 +236,7 @@ pub fn parse_border<'i, 't>(
|
|||
|
||||
<%helpers:shorthand
|
||||
name="border-radius"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="${' '.join(
|
||||
'border-%s-radius' % (corner)
|
||||
for corner in ['top-left', 'top-right', 'bottom-right', 'bottom-left']
|
||||
|
@ -282,7 +282,8 @@ pub fn parse_border<'i, 't>(
|
|||
|
||||
<%helpers:shorthand
|
||||
name="border-image"
|
||||
engines="gecko servo-2013"
|
||||
engines="gecko servo"
|
||||
servo_pref="layout.legacy_layout",
|
||||
sub_properties="border-image-outset
|
||||
border-image-repeat border-image-slice border-image-source border-image-width"
|
||||
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)
|
||||
%>
|
||||
<%helpers:shorthand
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
name="border-${axis}-${prop}"
|
||||
sub_properties="${' '.join(
|
||||
'border-%s-%s-%s' % (axis, side, prop)
|
||||
|
@ -436,7 +437,7 @@ pub fn parse_border<'i, 't>(
|
|||
%>
|
||||
<%helpers:shorthand
|
||||
name="border-${axis}"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="${' '.join(
|
||||
'border-%s-%s-width' % (axis, side)
|
||||
for side in ['start', 'end']
|
||||
|
|
|
@ -8,7 +8,7 @@ ${helpers.two_properties_shorthand(
|
|||
"overflow",
|
||||
"overflow-x",
|
||||
"overflow-y",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
flags="SHORTHAND_IN_GETCS",
|
||||
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow",
|
||||
)}
|
||||
|
@ -38,7 +38,7 @@ macro_rules! try_parse_one {
|
|||
}
|
||||
|
||||
<%helpers:shorthand name="transition"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
extra_prefixes="moz:layout.css.prefixes.transitions webkit"
|
||||
sub_properties="transition-property transition-duration
|
||||
transition-timing-function
|
||||
|
@ -184,7 +184,7 @@ macro_rules! try_parse_one {
|
|||
</%helpers:shorthand>
|
||||
|
||||
<%helpers:shorthand name="animation"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
extra_prefixes="moz:layout.css.prefixes.animations webkit"
|
||||
sub_properties="animation-name animation-duration
|
||||
animation-timing-function animation-delay
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%helpers:shorthand name="columns"
|
||||
engines="gecko servo-2013"
|
||||
engines="gecko servo"
|
||||
sub_properties="column-width column-count"
|
||||
servo_2013_pref="layout.columns.enabled",
|
||||
servo_pref="layout.columns.enabled"
|
||||
derive_serialize="True"
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
|
||||
use crate::properties::longhands::{column_count, column_width};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<%helpers:shorthand
|
||||
name="font"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="
|
||||
font-style
|
||||
font-variant-caps
|
||||
|
@ -297,7 +297,8 @@
|
|||
</%helpers:shorthand>
|
||||
|
||||
<%helpers:shorthand name="font-variant"
|
||||
engines="gecko servo-2013"
|
||||
engines="gecko servo"
|
||||
servo_pref="layout.legacy_layout",
|
||||
flags="SHORTHAND_IN_GETCS"
|
||||
sub_properties="font-variant-caps
|
||||
${'font-variant-alternates' if engine == 'gecko' else ''}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%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"
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style">
|
||||
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_image::SpecifiedValue as ListStyleImage;
|
||||
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;
|
||||
#[cfg(feature = "servo-layout-2020")]
|
||||
#[cfg(feature = "servo")]
|
||||
let position_is_initial = self.list_style_position == Some(&ListStylePosition::Outside);
|
||||
if !position_is_initial {
|
||||
self.list_style_position.to_css(dest)?;
|
||||
|
|
|
@ -9,7 +9,7 @@ ${helpers.four_sides_shorthand(
|
|||
"margin",
|
||||
"margin-%s",
|
||||
"specified::LengthPercentageOrAuto::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-box/#propdef-margin",
|
||||
rule_types_allowed=DEFAULT_RULES_AND_PAGE,
|
||||
allow_quirks="Yes",
|
||||
|
@ -20,7 +20,7 @@ ${helpers.two_properties_shorthand(
|
|||
"margin-block-start",
|
||||
"margin-block-end",
|
||||
"specified::LengthPercentageOrAuto::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-margin-block"
|
||||
)}
|
||||
|
||||
|
@ -29,7 +29,7 @@ ${helpers.two_properties_shorthand(
|
|||
"margin-inline-start",
|
||||
"margin-inline-end",
|
||||
"specified::LengthPercentageOrAuto::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-margin-inline"
|
||||
)}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%helpers:shorthand name="outline"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
sub_properties="outline-color outline-style outline-width"
|
||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline">
|
||||
use crate::properties::longhands::{outline_color, outline_width, outline_style};
|
||||
|
|
|
@ -8,7 +8,7 @@ ${helpers.four_sides_shorthand(
|
|||
"padding",
|
||||
"padding-%s",
|
||||
"specified::NonNegativeLengthPercentage::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-box-3/#propdef-padding",
|
||||
allow_quirks="Yes",
|
||||
)}
|
||||
|
@ -18,7 +18,7 @@ ${helpers.two_properties_shorthand(
|
|||
"padding-block-start",
|
||||
"padding-block-end",
|
||||
"specified::NonNegativeLengthPercentage::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-padding-block"
|
||||
)}
|
||||
|
||||
|
@ -27,7 +27,7 @@ ${helpers.two_properties_shorthand(
|
|||
"padding-inline-start",
|
||||
"padding-inline-end",
|
||||
"specified::NonNegativeLengthPercentage::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-padding-inline"
|
||||
)}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%helpers:shorthand name="flex-flow"
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
sub_properties="flex-direction flex-wrap"
|
||||
extra_prefixes="webkit"
|
||||
derive_serialize="True"
|
||||
|
@ -46,8 +46,8 @@
|
|||
</%helpers:shorthand>
|
||||
|
||||
<%helpers:shorthand name="flex"
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
servo_2020_pref="layout.flexbox.enabled",
|
||||
engines="gecko servo",
|
||||
servo_pref="layout.flexbox.enabled",
|
||||
sub_properties="flex-grow flex-shrink flex-basis"
|
||||
extra_prefixes="webkit"
|
||||
derive_serialize="True"
|
||||
|
@ -839,7 +839,7 @@ ${helpers.four_sides_shorthand(
|
|||
"inset",
|
||||
"%s",
|
||||
"specified::LengthPercentageOrAuto::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-inset",
|
||||
allow_quirks="No",
|
||||
)}
|
||||
|
@ -849,7 +849,7 @@ ${helpers.two_properties_shorthand(
|
|||
"inset-block-start",
|
||||
"inset-block-end",
|
||||
"specified::LengthPercentageOrAuto::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-inset-block"
|
||||
)}
|
||||
|
||||
|
@ -858,6 +858,6 @@ ${helpers.two_properties_shorthand(
|
|||
"inset-inline-start",
|
||||
"inset-inline-end",
|
||||
"specified::LengthPercentageOrAuto::parse",
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
engines="gecko servo",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-inset-inline"
|
||||
)}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%helpers:shorthand name="text-decoration"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
engines="gecko servo"
|
||||
flags="SHORTHAND_IN_GETCS"
|
||||
sub_properties="text-decoration-line
|
||||
${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}"
|
||||
|
|
|
@ -245,11 +245,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
.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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -675,7 +675,7 @@ where
|
|||
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)
|
||||
where
|
||||
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)
|
||||
where
|
||||
E: TElement,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! 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;
|
||||
#[cfg(feature = "gecko")]
|
||||
use crate::values::generics::CounterStyle;
|
||||
|
@ -185,13 +185,13 @@ pub struct GenericCounters<I>(
|
|||
);
|
||||
pub use self::GenericCounters as Counters;
|
||||
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
type CounterStyleType = ListStyleType;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
type CounterStyleType = CounterStyle;
|
||||
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
#[inline]
|
||||
fn is_decimal(counter_type: &CounterStyleType) -> bool {
|
||||
*counter_type == ListStyleType::Decimal
|
||||
|
@ -244,11 +244,9 @@ pub enum GenericContentItem<I> {
|
|||
/// Literal string content.
|
||||
String(crate::OwnedStr),
|
||||
/// `counter(name, style)`.
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
#[css(comma, function)]
|
||||
Counter(CustomIdent, #[css(skip_if = "is_decimal")] CounterStyleType),
|
||||
/// `counters(name, separator, style)`.
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
#[css(comma, function)]
|
||||
Counters(
|
||||
CustomIdent,
|
||||
|
@ -256,16 +254,12 @@ pub enum GenericContentItem<I> {
|
|||
#[css(skip_if = "is_decimal")] CounterStyleType,
|
||||
),
|
||||
/// `open-quote`.
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
OpenQuote,
|
||||
/// `close-quote`.
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
CloseQuote,
|
||||
/// `no-open-quote`.
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
NoOpenQuote,
|
||||
/// `no-close-quote`.
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
NoCloseQuote,
|
||||
/// `-moz-alt-content`.
|
||||
#[cfg(feature = "gecko")]
|
||||
|
|
|
@ -43,7 +43,7 @@ pub enum GenericImage<G, MozImageRect, ImageUrl, Color, Percentage, Resolution>
|
|||
|
||||
/// A paint worklet image.
|
||||
/// <https://drafts.css-houdini.org/css-paint-api/>
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
PaintWorklet(PaintWorklet),
|
||||
|
||||
/// A `<cross-fade()>` image. Storing this directly inside of
|
||||
|
@ -440,7 +440,7 @@ where
|
|||
Image::Url(ref url) => url.to_css(dest),
|
||||
Image::Gradient(ref gradient) => gradient.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),
|
||||
#[cfg(feature = "gecko")]
|
||||
Image::Element(ref selector) => {
|
||||
|
|
|
@ -34,12 +34,14 @@ fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
|
|||
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 {
|
||||
true
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo-layout-2020")]
|
||||
#[cfg(feature = "servo")]
|
||||
fn flexbox_enabled() -> bool {
|
||||
servo_config::prefs::pref_map()
|
||||
.get("layout.flexbox.enabled")
|
||||
|
@ -57,9 +59,7 @@ pub enum DisplayOutside {
|
|||
None = 0,
|
||||
Inline,
|
||||
Block,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableCaption,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
InternalTable,
|
||||
#[cfg(feature = "gecko")]
|
||||
InternalRuby,
|
||||
|
@ -78,21 +78,13 @@ pub enum DisplayInside {
|
|||
Flex,
|
||||
#[cfg(feature = "gecko")]
|
||||
Grid,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
Table,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableRowGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableColumn,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableColumnGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableHeaderGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableFooterGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableRow,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
TableCell,
|
||||
#[cfg(feature = "gecko")]
|
||||
Ruby,
|
||||
|
@ -153,11 +145,8 @@ impl Display {
|
|||
pub const Grid: Self = Self::new(DisplayOutside::Block, DisplayInside::Grid);
|
||||
#[cfg(feature = "gecko")]
|
||||
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);
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
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);
|
||||
#[cfg(feature = "gecko")]
|
||||
pub const Ruby: Self = Self::new(DisplayOutside::Inline, DisplayInside::Ruby);
|
||||
|
@ -168,36 +157,29 @@ impl Display {
|
|||
|
||||
// Internal table boxes.
|
||||
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
pub const TableRowGroup: Self =
|
||||
Self::new(DisplayOutside::InternalTable, DisplayInside::TableRowGroup);
|
||||
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
pub const TableHeaderGroup: Self = Self::new(
|
||||
DisplayOutside::InternalTable,
|
||||
DisplayInside::TableHeaderGroup,
|
||||
);
|
||||
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
pub const TableFooterGroup: Self = Self::new(
|
||||
DisplayOutside::InternalTable,
|
||||
DisplayInside::TableFooterGroup,
|
||||
);
|
||||
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
pub const TableColumn: Self =
|
||||
Self::new(DisplayOutside::InternalTable, DisplayInside::TableColumn);
|
||||
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
pub const TableColumnGroup: Self = Self::new(
|
||||
DisplayOutside::InternalTable,
|
||||
DisplayInside::TableColumnGroup,
|
||||
);
|
||||
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
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);
|
||||
|
||||
/// Internal ruby boxes.
|
||||
|
@ -315,7 +297,6 @@ impl Display {
|
|||
pub fn is_atomic_inline_level(&self) -> bool {
|
||||
match *self {
|
||||
Display::InlineBlock | Display::InlineFlex => true,
|
||||
#[cfg(any(feature = "servo-layout-2013"))]
|
||||
Display::InlineTable => true,
|
||||
_ => false,
|
||||
}
|
||||
|
@ -368,7 +349,6 @@ impl Display {
|
|||
Display::from3(DisplayOutside::Block, inside, self.is_list_item())
|
||||
},
|
||||
DisplayOutside::Block | DisplayOutside::None => *self,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
_ => Display::Block,
|
||||
}
|
||||
}
|
||||
|
@ -421,13 +401,11 @@ impl ToCss for Display {
|
|||
Display::WebkitInlineBox => dest.write_str("-webkit-inline-box"),
|
||||
#[cfg(feature = "gecko")]
|
||||
Display::MozInlineBox => dest.write_str("-moz-inline-box"),
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
Display::TableCaption => dest.write_str("table-caption"),
|
||||
_ => match (outside, inside) {
|
||||
#[cfg(feature = "gecko")]
|
||||
(DisplayOutside::Inline, DisplayInside::Grid) => dest.write_str("inline-grid"),
|
||||
(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"),
|
||||
#[cfg(feature = "gecko")]
|
||||
(DisplayOutside::Block, DisplayInside::Ruby) => dest.write_str("block ruby"),
|
||||
|
@ -460,7 +438,6 @@ fn parse_display_inside<'i, 't>(
|
|||
"flow" => DisplayInside::Flow,
|
||||
"flex" if flexbox_enabled() => DisplayInside::Flex,
|
||||
"flow-root" => DisplayInside::FlowRoot,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table" => DisplayInside::Table,
|
||||
#[cfg(feature = "gecko")]
|
||||
"grid" => DisplayInside::Grid,
|
||||
|
@ -559,27 +536,18 @@ impl Parse for Display {
|
|||
"none" => Display::None,
|
||||
"contents" => Display::Contents,
|
||||
"inline-block" => Display::InlineBlock,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"inline-table" => Display::InlineTable,
|
||||
"-webkit-flex" if flexbox_enabled() => Display::Flex,
|
||||
"inline-flex" | "-webkit-inline-flex" if flexbox_enabled() => Display::InlineFlex,
|
||||
#[cfg(feature = "gecko")]
|
||||
"inline-grid" => Display::InlineGrid,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-caption" => Display::TableCaption,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-row-group" => Display::TableRowGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-header-group" => Display::TableHeaderGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-footer-group" => Display::TableFooterGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-column" => Display::TableColumn,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-column-group" => Display::TableColumnGroup,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-row" => Display::TableRow,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
"table-cell" => Display::TableCell,
|
||||
#[cfg(feature = "gecko")]
|
||||
"ruby-base" => Display::RubyBase,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! 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::parser::{Parse, ParserContext};
|
||||
use crate::values::generics::counters as generics;
|
||||
|
@ -16,7 +16,6 @@ use crate::values::specified::Attr;
|
|||
use crate::values::specified::Integer;
|
||||
use crate::values::CustomIdent;
|
||||
use cssparser::{Parser, Token};
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
use selectors::parser::SelectorParseErrorKind;
|
||||
use style_traits::{KeywordsCollectFn, ParseError, SpecifiedValueInfo, StyleParseErrorKind};
|
||||
|
||||
|
@ -155,7 +154,7 @@ pub type Content = generics::GenericContent<Image>;
|
|||
pub type ContentItem = generics::GenericContentItem<Image>;
|
||||
|
||||
impl Content {
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
fn parse_counter_style(_: &ParserContext, input: &mut Parser) -> ListStyleType {
|
||||
input
|
||||
.try_parse(|input| {
|
||||
|
@ -215,14 +214,12 @@ impl Parse for Content {
|
|||
},
|
||||
Ok(&Token::Function(ref name)) => {
|
||||
let result = match_ignore_ascii_case! { &name,
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
"counter" => input.parse_nested_block(|input| {
|
||||
let location = input.current_source_location();
|
||||
let name = CustomIdent::from_ident(location, input.expect_ident()?, &[])?;
|
||||
let style = Content::parse_counter_style(context, input);
|
||||
Ok(generics::ContentItem::Counter(name, style))
|
||||
}),
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
"counters" => input.parse_nested_block(|input| {
|
||||
let location = input.current_source_location();
|
||||
let name = CustomIdent::from_ident(location, input.expect_ident()?, &[])?;
|
||||
|
@ -244,7 +241,6 @@ impl Parse for Content {
|
|||
}?;
|
||||
content.push(result);
|
||||
},
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
Ok(&Token::Ident(ref ident)) => {
|
||||
content.push(match_ignore_ascii_case! { &ident,
|
||||
"open-quote" => generics::ContentItem::OpenQuote,
|
||||
|
|
|
@ -228,7 +228,7 @@ impl Image {
|
|||
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)) {
|
||||
return Ok(generic::Image::PaintWorklet(paint_worklet));
|
||||
|
|
|
@ -585,7 +585,6 @@ pub enum TextAlignKeyword {
|
|||
Left,
|
||||
Right,
|
||||
Center,
|
||||
#[cfg(any(feature = "gecko", feature = "servo-layout-2013"))]
|
||||
Justify,
|
||||
#[css(skip)]
|
||||
#[cfg(feature = "gecko")]
|
||||
|
@ -597,11 +596,11 @@ pub enum TextAlignKeyword {
|
|||
MozLeft,
|
||||
#[cfg(feature = "gecko")]
|
||||
MozRight,
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
ServoCenter,
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
ServoLeft,
|
||||
#[cfg(feature = "servo-layout-2013")]
|
||||
#[cfg(feature = "servo")]
|
||||
ServoRight,
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,6 @@ default = ["webdriver", "max_log_level"]
|
|||
googlevr = ["libservo/googlevr"]
|
||||
jitspew = ["libservo/jitspew"]
|
||||
js_backtrace = ["libservo/js_backtrace"]
|
||||
layout-2013 = ["libservo/layout-2013"]
|
||||
layout-2020 = ["libservo/layout-2020"]
|
||||
max_log_level = ["log/release_max_level_info"]
|
||||
media-dummy = ["libservo/media-dummy"]
|
||||
media-gstreamer = ["libservo/media-gstreamer"]
|
||||
|
|
|
@ -34,8 +34,6 @@ default = ["webdriver", "max_log_level"]
|
|||
googlevr = ["simpleservo/googlevr"]
|
||||
jitspew = ["simpleservo/jitspew"]
|
||||
js_backtrace = ["simpleservo/js_backtrace"]
|
||||
layout-2013 = ["simpleservo/layout-2013"]
|
||||
layout-2020 = ["simpleservo/layout-2020"]
|
||||
max_log_level = ["simpleservo/max_log_level"]
|
||||
media-dummy = ["simpleservo/media-dummy"]
|
||||
media-gstreamer = ["simpleservo/media-gstreamer"]
|
||||
|
|
|
@ -31,8 +31,6 @@ debugmozjs = ["simpleservo/debugmozjs"]
|
|||
default = ["webdriver", "max_log_level"]
|
||||
googlevr = ["simpleservo/googlevr"]
|
||||
js_backtrace = ["simpleservo/js_backtrace"]
|
||||
layout-2013 = ["simpleservo/layout-2013"]
|
||||
layout-2020 = ["simpleservo/layout-2020"]
|
||||
max_log_level = ["simpleservo/max_log_level"]
|
||||
media-dummy = ["simpleservo/media-dummy"]
|
||||
media-gstreamer = ["simpleservo/media-gstreamer"]
|
||||
|
|
|
@ -30,8 +30,6 @@ debugmozjs = ["libservo/debugmozjs"]
|
|||
default = ["webdriver", "max_log_level"]
|
||||
jitspew = ["libservo/jitspew"]
|
||||
js_backtrace = ["libservo/js_backtrace"]
|
||||
layout-2013 = ["libservo/layout-2013"]
|
||||
layout-2020 = ["libservo/layout-2020"]
|
||||
max_log_level = ["log/release_max_level_info"]
|
||||
media-dummy = ["libservo/media-dummy"]
|
||||
media-gstreamer = ["libservo/media-gstreamer"]
|
||||
|
|
|
@ -859,11 +859,6 @@ class CommandBase(object):
|
|||
action='store_true',
|
||||
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'),
|
||||
]
|
||||
|
||||
|
@ -961,10 +956,6 @@ class CommandBase(object):
|
|||
|
||||
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:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C force-frame-pointers=yes"
|
||||
features.append("profilemozjs")
|
||||
|
|
|
@ -502,11 +502,7 @@ class PackageCommands(CommandBase):
|
|||
release = nightly_repo.get_release(github_release_id)
|
||||
package_hash_fileobj = io.BytesIO(package_hash.encode('utf-8'))
|
||||
|
||||
if '2020' in platform:
|
||||
asset_name = f'servo-latest.{extension}'
|
||||
else:
|
||||
asset_name = f'servo-latest-legacy-layout.{extension}'
|
||||
|
||||
asset_name = f'servo-latest.{extension}'
|
||||
release.upload_asset(package, name=asset_name)
|
||||
release.upload_asset_from_memory(
|
||||
package_hash_fileobj,
|
||||
|
@ -530,11 +526,7 @@ class PackageCommands(CommandBase):
|
|||
BUCKET = 'servo-builds2'
|
||||
DISTRIBUTION_ID = 'EJ8ZWSJKFCJS2'
|
||||
|
||||
if '2020' in platform:
|
||||
nightly_dir = 'nightly/{}'.format(platform.replace('-layout2020', ''))
|
||||
else:
|
||||
nightly_dir = 'nightly/{}-legacy-layout'.format(platform)
|
||||
|
||||
nightly_dir = f'nightly/{platform}'
|
||||
filename = nightly_filename(package, timestamp)
|
||||
package_upload_key = '{}/{}'.format(nightly_dir, filename)
|
||||
extension = path.basename(package).partition('.')[2]
|
||||
|
|
|
@ -100,8 +100,11 @@ def run_tests(**kwargs):
|
|||
# TODO: Delete rr traces from green test runs?
|
||||
|
||||
prefs = kwargs.pop("prefs")
|
||||
kwargs.setdefault("binary_args", [])
|
||||
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"):
|
||||
test_types = {
|
||||
|
@ -116,6 +119,7 @@ def run_tests(**kwargs):
|
|||
raw_log_outputs = kwargs.get("log_raw", [])
|
||||
|
||||
wptcommandline.check_args(kwargs)
|
||||
|
||||
update_args_for_legacy_layout(kwargs)
|
||||
|
||||
mozlog.commandline.log_formatters["servo"] = (
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
"layout.animations.test.enabled": false,
|
||||
"layout.columns.enabled": false,
|
||||
"layout.flexbox.enabled": false,
|
||||
"layout.legacy_layout": false,
|
||||
"layout.threads": 3,
|
||||
"layout.writing-mode.enabled": false,
|
||||
"media.glvideo.enabled": false,
|
||||
|
|
|
@ -112,22 +112,16 @@ macro_rules! parse_longhand {
|
|||
};
|
||||
}
|
||||
|
||||
mod background;
|
||||
mod border;
|
||||
mod box_;
|
||||
mod column;
|
||||
mod effects;
|
||||
mod image;
|
||||
mod inherited_text;
|
||||
mod outline;
|
||||
mod selectors;
|
||||
mod supports;
|
||||
mod text_overflow;
|
||||
mod transition_duration;
|
||||
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;
|
||||
|
|
|
@ -10,3 +10,6 @@
|
|||
|
||||
[Property object-position does not support quirky length]
|
||||
expected: FAIL
|
||||
|
||||
[Property column-span does not support quirky length]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[table-caption-is-containing-block-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[table-caption-passes-abspos-up-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-008.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-018.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-030.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-034.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-037.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-095.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-097.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-101.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-103.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-107.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-109.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-reset-001.xht]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[border-bottom-applies-to-014.xht]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[border-bottom-color-applies-to-014.xht]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[border-bottom-width-applies-to-014.xht]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[border-top-applies-to-014.xht]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[border-top-color-applies-to-014.xht]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[border-top-width-applies-to-014.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[containing-block-027.xht]
|
||||
expected: FAIL
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue