Closed Bug 1647845 Opened 4 years ago Closed 4 years ago

Geckolib/glue changes to support @page rule size attribute

Categories

(Core :: CSS Parsing and Computation, enhancement, P2)

Desktop
All
enhancement

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

Details

(Whiteboard: [DevRel:P3][layout:backlog:2020], [wptsync upstream])

Attachments

(2 files)

To use the size attribute from @page rules, the following changes will likely need to be made:

  • Update the geckolib glue to handle the new fields
  • Add a ServoStyleSet::AppendPageRules (similar in structure to ServoStyleSet::AppendFontFaceRules)
  • Update the existing Gecko CSSPageRule class to handle the new attributes. This might end up looking more like a rewrite, as it needs to behave more like a CSSFontFaceRule (with possible support for block names like keyframes in the future).
Blocks: 1647849
Flags: needinfo?(emcdonough)

This is NOT COMPLETE yet. This needs to be hidden behind a pref still and have
the testing situation fixed up.

This adds a bit of a hack to properties.mako.rs where we just handle the size
attribute in a special manner. Ideally we would do something more like a bitmap
of allowed rule types for each property.

Depends on: 1692356
Attachment #9201005 - Attachment description: Bug 1647845 - WIP Add page-size attribute to nsStyleStruct and property parsing → Bug 1647845 - WIP Add page-size attribute to nsStyleStruct and property parsing

To know the valid rules for each property, we need to puyt this information
into the Servo prop list and add an appropriate getter to Longhand/Shorthand.

Attachment #9201005 - Attachment description: Bug 1647845 - WIP Add page-size attribute to nsStyleStruct and property parsing → Bug 1647845 Part 2 - WIP Add page-size attribute to nsStyleStruct and property parsing
Attachment #9204295 - Attachment description: Bug 1647845 Part 1 - Ignore any proeprties which aren't valid for a style rule when generating CSS2Properties → Bug 1647845 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties
Attachment #9201005 - Attachment description: Bug 1647845 Part 2 - WIP Add page-size attribute to nsStyleStruct and property parsing → Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing
Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bc1815fb4405 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio https://hg.mozilla.org/integration/autoland/rev/1564d93002de Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28107 for changes under testing/web-platform/tests
Whiteboard: [DevRel:P3][layout:backlog:2020] → [DevRel:P3][layout:backlog:2020], [wptsync upstream]
Upstream PR was closed without merging
Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5a44095128e0 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio https://hg.mozilla.org/integration/autoland/rev/8822a2e578f2 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
Upstream PR was closed without merging
Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/131f3f40fbce Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio https://hg.mozilla.org/integration/autoland/rev/2dffdaa4ef0b Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(emcdonough)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: