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

Improve behaviour of image elements that perform multiple requests #15771

Merged
merged 7 commits into from Mar 8, 2017

Conversation

@jdm
Copy link
Member

jdm commented Feb 28, 2017

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #15709 (github issue number if applicable).
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

highfive commented Feb 28, 2017

Heads up! This PR modifies the following files:

  • @fitzgen: components/script/dom/document.rs, components/script/dom/htmlimageelement.rs, components/script/document_loader.rs, components/script/script_thread.rs
  • @KiChjang: components/script/dom/document.rs, components/script/dom/htmlimageelement.rs, components/script/document_loader.rs, components/script/script_thread.rs
@highfive
Copy link

highfive commented Feb 28, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@jdm
Copy link
Member Author

jdm commented Feb 28, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Feb 28, 2017

Trying commit 06e8bc0 with merge 3d4a1c6...

bors-servo added a commit that referenced this pull request Feb 28, 2017
Improve behaviour of imag elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [X] There are tests for these changes
@jdm
Copy link
Member Author

jdm commented Feb 28, 2017

@nox You will be interested in ff53ec2 in particular.

@bors-servo
Copy link
Contributor

bors-servo commented Feb 28, 2017

💔 Test failed - arm32

@jdm jdm changed the title Improve behaviour of imag elements that perform multiple requests Improve behaviour of image elements that perform multiple requests Feb 28, 2017
@jdm jdm removed the S-tests-failed label Feb 28, 2017
@notriddle
Copy link
Contributor

notriddle commented Feb 28, 2017

@bors-servo: retry

@bors-servo
Copy link
Contributor

bors-servo commented Feb 28, 2017

Trying commit 06e8bc0 with merge 353a59b...

bors-servo added a commit that referenced this pull request Feb 28, 2017
Improve behaviour of image elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/15771)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 28, 2017

💔 Test failed - linux-dev

…re run.

Remove the redundant tracked loads for the underlying image request; the
load blockers present in the ImageRequest structure perform the same
duty with better accuracy.
@jdm jdm force-pushed the jdm:img-panic branch from 06e8bc0 to 859d7f7 Mar 1, 2017
@highfive highfive removed the S-tests-failed label Mar 1, 2017
@jdm
Copy link
Member Author

jdm commented Mar 1, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Mar 1, 2017

Trying commit 859d7f7 with merge 54f0bac...

bors-servo added a commit that referenced this pull request Mar 1, 2017
Improve behaviour of image elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/15771)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 1, 2017

💔 Test failed - mac-rel-wpt1

@@ -483,6 +483,8 @@ pub struct ScriptThread {

/// A handle to the webvr thread, if available
webvr_thread: Option<IpcSender<WebVRMsg>>,

docs_with_no_blocking_loads: DOMRefCell<HashSet<PipelineId>>,

This comment has been minimized.

Copy link
@nox

nox Mar 3, 2017

Member

Please document the field.

This comment has been minimized.

Copy link
@nox

nox Mar 5, 2017

Member

You didn't document the field.

This comment has been minimized.

Copy link
@jdm

jdm Mar 6, 2017

Author Member

Weird, I remember writing the documentation. I wonder what happened to it...

@nox
Copy link
Member

nox commented Mar 3, 2017

  │ assertion failed: !self.loader.borrow().events_inhibited() (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(1) }, at /Users/servo/buildbot/slave/mac-rel-wpt1/build/components/script/dom/document.rs:1622)
jdm added 4 commits Feb 28, 2017
This better reflects the text of the specification - rather than
queuing a task to dispatch the load evnet as soon as the document
loader is unblocked, we want to "spin the event loop until there
is nothing that delays the load event in the Document." Spinning
the event loop is a concept that requires running tasks
completely, hence we check the condition before returning to the
start of the event loop.
@jdm jdm force-pushed the jdm:img-panic branch from fce8e34 to f798507 Mar 7, 2017
@jdm
Copy link
Member Author

jdm commented Mar 7, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Mar 7, 2017

Trying commit f798507 with merge 14e7f24...

bors-servo added a commit that referenced this pull request Mar 7, 2017
Improve behaviour of image elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/15771)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 7, 2017

@nox
nox approved these changes Mar 7, 2017
@nox
Copy link
Member

nox commented Mar 7, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Mar 7, 2017

📌 Commit f798507 has been approved by nox

@nox
Copy link
Member

nox commented Mar 8, 2017

@bors-servo try- retry

@bors-servo
Copy link
Contributor

bors-servo commented Mar 8, 2017

Testing commit f798507 with merge f90fc2f...

bors-servo added a commit that referenced this pull request Mar 8, 2017
Improve behaviour of image elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/15771)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 8, 2017

@bors-servo bors-servo merged commit f798507 into servo:master Mar 8, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Mar 8, 2017
jdm added a commit to web-platform-tests/wpt that referenced this pull request Apr 17, 2017
Upstreamed from servo/servo#15771 [ci skip]
jdm added a commit to web-platform-tests/wpt that referenced this pull request Apr 17, 2017
…lable.

Upstreamed from servo/servo#15771 [ci skip]
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.

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