Skip to content

Improve behaviour of image elements that perform multiple requests - #15771

Merged
bors-servo merged 7 commits into
servo:masterfrom
jdm:img-panic
Mar 8, 2017
Merged

bors-servo merged 7 commits into
servo:masterfrom
jdm:img-panic

Conversation

@jdm

@jdm jdm commented Feb 28, 2017 •

Copy link
Copy Markdown
Member

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
Copy Markdown

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
Copy Markdown

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

jdm commented Feb 28, 2017

Copy link
Copy Markdown
Member Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
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

jdm commented Feb 28, 2017

Copy link
Copy Markdown
Member Author

@nox You will be interested in ff53ec2 in particular.

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@bors-servo: retry

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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

jdm commented Mar 1, 2017

Copy link
Copy Markdown
Member Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Mar 1, 2017
Comment thread components/script/script_thread.rs Outdated
/// A handle to the webvr thread, if available
webvr_thread: Option<IpcSender<WebVRMsg>>,

docs_with_no_blocking_loads: DOMRefCell<HashSet<PipelineId>>,

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

nox commented Mar 3, 2017

Copy link
Copy Markdown
Contributor
  │ 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

jdm commented Mar 7, 2017

Copy link
Copy Markdown
Member Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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

nox commented Mar 7, 2017

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
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

nox commented Mar 8, 2017

Copy link
Copy Markdown
Contributor

@bors-servo try- retry

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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

6 participants