mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
stylo: Propagate quirks mode information from Gecko to Servo
This commit is contained in:
parent
875b07b4ec
commit
c54d255d07
9 changed files with 48 additions and 14 deletions
18
components/style/gecko_bindings/sugar/ns_compatibility.rs
Normal file
18
components/style/gecko_bindings/sugar/ns_compatibility.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Little helper for `nsCompatibility`.
|
||||
|
||||
use context::QuirksMode;
|
||||
use gecko_bindings::structs::nsCompatibility;
|
||||
|
||||
impl From<nsCompatibility> for QuirksMode {
|
||||
fn from(mode: nsCompatibility) -> QuirksMode {
|
||||
match mode {
|
||||
nsCompatibility::eCompatibility_FullStandards => QuirksMode::NoQuirks,
|
||||
nsCompatibility::eCompatibility_AlmostStandards => QuirksMode::LimitedQuirks,
|
||||
nsCompatibility::eCompatibility_NavQuirks => QuirksMode::Quirks,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue