mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Auto merge of #16947 - nox:moz-alt-content, r=Wafflespeanut
Parse -moz-alt-content as a whole content value (fixes #15726) <!-- 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/16947) <!-- Reviewable:end -->
This commit is contained in:
commit
a03d0b8472
4 changed files with 37 additions and 31 deletions
|
@ -4237,8 +4237,8 @@ clip-path
|
|||
}
|
||||
|
||||
match v {
|
||||
T::none |
|
||||
T::normal => {
|
||||
T::None |
|
||||
T::Normal => {
|
||||
// Ensure destructors run, otherwise we could leak.
|
||||
if !self.gecko.mContents.is_empty() {
|
||||
unsafe {
|
||||
|
@ -4246,7 +4246,14 @@ clip-path
|
|||
}
|
||||
}
|
||||
},
|
||||
T::Content(items) => {
|
||||
T::MozAltContent => {
|
||||
unsafe {
|
||||
Gecko_ClearAndResizeStyleContents(&mut self.gecko, 1);
|
||||
*self.gecko.mContents[0].mContent.mString.as_mut() = ptr::null_mut();
|
||||
}
|
||||
self.gecko.mContents[0].mType = eStyleContentType_AltContent;
|
||||
},
|
||||
T::Items(items) => {
|
||||
unsafe {
|
||||
Gecko_ClearAndResizeStyleContents(&mut self.gecko,
|
||||
items.len() as u32);
|
||||
|
@ -4288,8 +4295,6 @@ clip-path
|
|||
=> self.gecko.mContents[i].mType = eStyleContentType_NoOpenQuote,
|
||||
ContentItem::NoCloseQuote
|
||||
=> self.gecko.mContents[i].mType = eStyleContentType_NoCloseQuote,
|
||||
ContentItem::MozAltContent
|
||||
=> self.gecko.mContents[i].mType = eStyleContentType_AltContent,
|
||||
ContentItem::Counter(name, style) => {
|
||||
unsafe {
|
||||
bindings::Gecko_SetContentDataArray(&mut self.gecko.mContents[i],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue