Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylo: support content property #14905

Merged
merged 2 commits into from Jan 8, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

stylo: Stop setting the now-removed nsStyleContentData::mImageTracked.

  • Loading branch information
heycam committed Jan 7, 2017
commit 95e5e799580bd4a7213023ec976b8a5603544870
@@ -2508,7 +2508,6 @@ clip-path
pub fn set_content(&mut self, v: longhands::content::computed_value::T) {
use properties::longhands::content::computed_value::T;
use properties::longhands::content::computed_value::ContentItem;
use gecko_bindings::structs::nsStyleContentData;
use gecko_bindings::structs::nsStyleContentType::*;
use gecko_bindings::bindings::Gecko_ClearStyleContents;

@@ -2522,16 +2521,6 @@ clip-path
ptr
}

#[inline(always)]
#[cfg(debug_assertions)]
fn set_image_tracked(contents: &mut nsStyleContentData, val: bool) {
contents.mImageTracked = val;
}

#[inline(always)]
#[cfg(not(debug_assertions))]
fn set_image_tracked(_contents: &mut nsStyleContentData, _val: bool) {}

// Ensure destructors run, otherwise we could leak.
if !self.gecko.mContents.is_empty() {
unsafe {
@@ -2546,10 +2535,7 @@ clip-path
// NB: set_len also reserves the appropriate space.
unsafe { self.gecko.mContents.set_len(items.len() as u32) }
for (i, item) in items.into_iter().enumerate() {
// TODO: Servo lacks support for attr(), and URIs,
// We don't support images, but need to remember to
// explicitly initialize mImageTracked in debug builds.
set_image_tracked(&mut self.gecko.mContents[i], false);
// TODO: Servo lacks support for attr(), and URIs.
// NB: Gecko compares the mString value if type is not image
// or URI independently of whatever gets there. In the quote
// cases, they set it to null, so do the same here.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.