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 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.



This change is Reviewable

@highfive
Copy link

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

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 28, 2017
@jdm
Copy link
Member Author

jdm commented Feb 28, 2017

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 06e8bc0 with merge 3d4a1c6...

bors-servo pushed 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

💔 Test failed - arm32

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Feb 28, 2017
@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 The changes caused existing tests to fail. label Feb 28, 2017
@notriddle
Copy link
Contributor

@bors-servo: retry

@bors-servo
Copy link
Contributor

⌛ Trying commit 06e8bc0 with merge 353a59b...

bors-servo pushed 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

💔 Test failed - linux-dev

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Feb 28, 2017
…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.
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Mar 1, 2017
@jdm
Copy link
Member Author

jdm commented Mar 1, 2017

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 859d7f7 with merge 54f0bac...

bors-servo pushed 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

💔 Test failed - mac-rel-wpt1

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Mar 1, 2017
@@ -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>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document the field.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't document the field.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nox
Copy link
Contributor

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)

@nox nox added the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Mar 3, 2017
@nox nox added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 5, 2017
jdm added 4 commits March 7, 2017 14:02
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.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Mar 7, 2017
@jdm
Copy link
Member Author

jdm commented Mar 7, 2017

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit f798507 with merge 14e7f24...

bors-servo pushed 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

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
State: approved= try=True

@nox
Copy link
Contributor

nox commented Mar 7, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit f798507 has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 7, 2017
@nox
Copy link
Contributor

nox commented Mar 8, 2017

@bors-servo try- retry

@bors-servo
Copy link
Contributor

⌛ Testing commit f798507 with merge f90fc2f...

bors-servo pushed 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

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
Approved by: nox
Pushing f90fc2f to master...

@bors-servo bors-servo merged commit f798507 into servo:master Mar 8, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 8, 2017
@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
jdm added a commit to web-platform-tests/wpt that referenced this pull request Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unknown completed load Image("https://avatars2.githubusercontent.com/u/1593513?v=3&s=60")
6 participants