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

Make image mask path optional in YAML reader #2225

Merged
merged 1 commit into from Dec 21, 2017
Merged

Conversation

@kvark
Copy link
Member

kvark commented Dec 14, 2017

Otherwise we crash during "show" command on some frames.
Appears to be broken as of #1412


This change is Reviewable

@kvark kvark requested a review from mrobinson Dec 14, 2017
@glennw
Copy link
Member

glennw commented Dec 14, 2017

Is this what was occurring when converting a binary replay to yaml? I think there might be a deeper bug in the binary writer not correctly storing image mask paths. Is it actually useful to support image masks without a path?

@kvark
Copy link
Member Author

kvark commented Dec 14, 2017

Is this what was occurring when converting a binary replay to yaml?

yes

I think there might be a deeper bug in the binary writer not correctly storing image mask paths.

would be great to look deeper into that for sure

Is it actually useful to support image masks without a path?

not much: my patch makes the reader ignore such masks

@glennw
Copy link
Member

glennw commented Dec 15, 2017

I'm not sure this is super useful - but r=me if it helps in the interim until we fix the bug in the yaml writer. We should probably log a warning that an invalid image mask was found and dropped though?

Copy link
Member

mrobinson left a comment

Perhaps this is happening when images are provided via data URLs? In any case, I think it's good to be robust here. Looks good to me, with a couple small cleanups.

@@ -464,7 +464,19 @@ impl YamlFrameReader {
return None;
}

let file = rsrc_path(&item["image"], &self.aux_dir);
//rsrc_path(&item["image"], &self.aux_dir);

This comment has been minimized.

@mrobinson

mrobinson Dec 15, 2017

Member

Looks like there is a bit of old code left over here.

This comment has been minimized.

@kvark

kvark Dec 15, 2017

Author Member

that was intentional, but I don't mind removing this

file
}
None => {
//warn!("No image provided for the image-mask!");

This comment has been minimized.

@mrobinson

mrobinson Dec 15, 2017

Member

This warning looks useful, but if you still think it doesn't belong, might as well remove the line.

This comment has been minimized.

@kvark

kvark Dec 15, 2017

Author Member

commented out because wrench isn't hooked up to log. I suppose this fixable :)

This comment has been minimized.

@mrobinson

mrobinson Dec 15, 2017

Member

Hrm. I notice that when I run the ahem.yaml reftest I get this output:

REFTEST reftests/text/ahem.yaml == reftests/text/ahem-ref.yaml
Skipping unknown item type: Hash({String("bounds"): Array([Integer(0), Integer(0), Integer(0), Integer(0)]), String("clip-rect"): Array([Integer(0), Integer(0), Integer(0), Integer(0)]), String("clip-and-scroll"): Integer(0), String("backface-visible"): Boolean(true)})
Skipping unknown item type: Hash({String("bounds"): Array([Integer(0),
@glennw
Copy link
Member

glennw commented Dec 21, 2017

@kvark What's the status of this one?

@kvark kvark force-pushed the kvark:yaml branch from 4461e09 to 42c3708 Dec 21, 2017
@kvark
Copy link
Member Author

kvark commented Dec 21, 2017

@glennw updated and ready for merging now

@glennw
Copy link
Member

glennw commented Dec 21, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Dec 21, 2017

📌 Commit 42c3708 has been approved by glennw

@bors-servo
Copy link
Contributor

bors-servo commented Dec 21, 2017

Testing commit 42c3708 with merge 7340ae7...

bors-servo added a commit that referenced this pull request Dec 21, 2017
Make image mask path optional in YAML reader

Otherwise we crash during "show" command on some frames.
Appears to be broken as of #1412

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2225)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Dec 21, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: glennw
Pushing 7340ae7 to master...

@bors-servo bors-servo merged commit 42c3708 into servo:master Dec 21, 2017
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@kvark kvark deleted the kvark:yaml branch Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.