mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #18373 - canaltinova:font-feature-vals, r=xidorn
Don't unnecessarily construct gfxFontFeatureValueSet This is reviewed by xidorn in bugzilla. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Bug 1394551](https://bugzilla.mozilla.org/show_bug.cgi?id=1394551) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18373) <!-- Reviewable:end -->
This commit is contained in:
commit
21c9ef3c6d
3 changed files with 19 additions and 12 deletions
|
@ -913,6 +913,10 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_nsFont_Destroy(dst: *mut nsFont);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_ConstructFontFeatureValueSet()
|
||||
-> *mut gfxFontFeatureValueSet;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_AppendFeatureValueHashEntry(value_set:
|
||||
*mut gfxFontFeatureValueSet,
|
||||
|
@ -2047,10 +2051,8 @@ extern "C" {
|
|||
}
|
||||
extern "C" {
|
||||
pub fn Servo_StyleSet_BuildFontFeatureValueSet(set:
|
||||
RawServoStyleSetBorrowed,
|
||||
list:
|
||||
*mut gfxFontFeatureValueSet)
|
||||
-> bool;
|
||||
RawServoStyleSetBorrowed)
|
||||
-> *mut gfxFontFeatureValueSet;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_StyleSet_ResolveForDeclarations(set:
|
||||
|
|
|
@ -210,7 +210,7 @@ impl<'a, 'b, 'i, T> DeclarationParser<'i> for FFVDeclarationsParser<'a, 'b, T>
|
|||
-> Result<(), ParseError<'i>> {
|
||||
let value = input.parse_entirely(|i| T::parse(self.context, i))?;
|
||||
let new = FFVDeclaration {
|
||||
name: Atom::from(&*name).to_ascii_lowercase(),
|
||||
name: Atom::from(&*name),
|
||||
value: value,
|
||||
};
|
||||
update_or_push(&mut self.declarations, new);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue