Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLoad a placeholder when a url to an image is broken. #5366
Conversation
|
See #5330 . |
| placeholder_url.push("rippy.jpg"); | ||
| let image = load_image_data(Url::from_file_path(&*placeholder_url).unwrap(), resource_task, &self.placeholder_data); | ||
|
|
||
| if image != Err(()) { |
This comment has been minimized.
This comment has been minimized.
frewsxcv
Mar 25, 2015
Member
This should probably be a match so you don't have to manually unwrap below
hoppipolla-critic-bot
commented
Mar 25, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/4372 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
Should I squash it now? |
|
Yes, go ahead. |
|
Going to rebase. |
|
Done. |
I decided to use the old Netscape broken image link icon (later we may replace the image asset for something more trendier).
|
Yep, it triggered regressions on net unit tests. Investigating it now. |
|
I talked with @larsbergstrom and it seems some of the tests expect a request to fail, the issue being that this patch changed the behavior (i.e. we always return a valid image for invalid urls). It will require to inspect each failing unit test to see if they still make sense given this change on behavior. |
|
Ok, should be fine by now. |
I decided to use the old Netscape broken image link icon (later we may replace the image asset for something more trendier).
|
|
Gonk should be ok now. |
|
Squash these, please. |
|
Squashed. |
I decided to use the old Netscape broken image link icon (later we may replace the image asset for something more trendier).
|
@Adenilson: and now a rebase, please |
I decided to use the old Netscape broken image link icon (later we may replace the image asset for something more trendier). The ref test will expect that a failed load should display the rippy image. ImageCacheTask users can define if a placeholder image should be loaded at start up or not. This enables both the new behavior (e.g. always return an image even for broken urls) as also the previous one.
|
Rebased. |
This comment has been minimized.
This comment has been minimized.
jdm
commented on cdebb3c
Mar 30, 2015
|
r+ |
This comment has been minimized.
This comment has been minimized.
|
saw approval from jdm |
This comment has been minimized.
This comment has been minimized.
|
merging Adenilson/servo/loadPlaceholder01 = cdebb3c into auto |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
all tests pass: |
This comment has been minimized.
This comment has been minimized.
|
fast-forwarding master to auto = 1e282d5 |
I decided to use the old Netscape broken image link icon (later we may replace the image asset for something more trendier).
cdebb3c
into
servo:master
The previous version would have ignored a message like: `I'm talking about servo/servo#5366 here` Also could have ignored some issues.
Adenilson commentedMar 25, 2015
I decided to use the old Netscape broken image link icon (later we may
replace the image asset for something more trendier).