mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Convert GetStringValue to use Servo.
And remove gPropertyTable / kCSSRawProperties while at it. Differential Revision: https://phabricator.services.mozilla.com/D2516
This commit is contained in:
parent
694d00eb5e
commit
eb49995737
1 changed files with 3 additions and 2 deletions
|
@ -427,9 +427,10 @@ impl NonCustomPropertyId {
|
||||||
unsafe { ::std::mem::transmute(self.0 as i32) }
|
unsafe { ::std::mem::transmute(self.0 as i32) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Convert an `nsCSSPropertyID` into a `NonCustomPropertyId`.
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_nscsspropertyid(prop: nsCSSPropertyID) -> Result<Self, ()> {
|
pub fn from_nscsspropertyid(prop: nsCSSPropertyID) -> Result<Self, ()> {
|
||||||
let prop = prop as i32;
|
let prop = prop as i32;
|
||||||
if prop < 0 {
|
if prop < 0 {
|
||||||
return Err(());
|
return Err(());
|
||||||
|
@ -443,7 +444,7 @@ impl NonCustomPropertyId {
|
||||||
|
|
||||||
/// Get the property name.
|
/// Get the property name.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn name(self) -> &'static str {
|
pub fn name(self) -> &'static str {
|
||||||
static MAP: [&'static str; ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())}] = [
|
static MAP: [&'static str; ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())}] = [
|
||||||
% for property in data.longhands + data.shorthands + data.all_aliases():
|
% for property in data.longhands + data.shorthands + data.all_aliases():
|
||||||
"${property.name}",
|
"${property.name}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue