stylo: Parse eSafeAgentSheetFeatures as agent sheet

This was reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1321754

MozReview-Commit-ID: 7GdsOP8lBxk
This commit is contained in:
Ting-Yu Lin 2017-04-28 12:14:54 +08:00 committed by Ting-Yu Lin
parent 4f13bc3829
commit 81fdd0bfc8
3 changed files with 22 additions and 0 deletions

View file

@ -5293,18 +5293,28 @@ pub mod root {
* exposure on the public Web, but are very useful for expressing
* user style overrides, such as @-moz-document rules.
*
* XXX: eUserSheetFeatures was added in bug 1035091, but some patches in
* that bug never landed to use this enum value. Currently, all the features
* in user sheet are also available in author sheet.
*
* Agent sheets have access to all author- and user-sheet features
* plus more extensions that are necessary for internal use but,
* again, not yet suitable for exposure on the public Web. Some of
* these are outright unsafe to expose; in particular, incorrect
* styling of anonymous box pseudo-elements can violate layout
* invariants.
*
* Agent sheets that do not use any unsafe rules could use
* eSafeAgentSheetFeatures when creating the sheet. This enum value allows
* Servo backend to recognize the sheets as the agent level, but Gecko
* backend will parse it under _author_ level.
*/
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum SheetParsingMode {
eAuthorSheetFeatures = 0,
eUserSheetFeatures = 1,
eAgentSheetFeatures = 2,
eSafeAgentSheetFeatures = 3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]

View file

@ -5222,18 +5222,28 @@ pub mod root {
* exposure on the public Web, but are very useful for expressing
* user style overrides, such as @-moz-document rules.
*
* XXX: eUserSheetFeatures was added in bug 1035091, but some patches in
* that bug never landed to use this enum value. Currently, all the features
* in user sheet are also available in author sheet.
*
* Agent sheets have access to all author- and user-sheet features
* plus more extensions that are necessary for internal use but,
* again, not yet suitable for exposure on the public Web. Some of
* these are outright unsafe to expose; in particular, incorrect
* styling of anonymous box pseudo-elements can violate layout
* invariants.
*
* Agent sheets that do not use any unsafe rules could use
* eSafeAgentSheetFeatures when creating the sheet. This enum value allows
* Servo backend to recognize the sheets as the agent level, but Gecko
* backend will parse it under _author_ level.
*/
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum SheetParsingMode {
eAuthorSheetFeatures = 0,
eUserSheetFeatures = 1,
eAgentSheetFeatures = 2,
eSafeAgentSheetFeatures = 3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]