Skip to content

Add support for navigating by a delta - #11616

Merged
bors-servo merged 2 commits into
servo:masterfrom
cbrewster:navigation_delta
Jun 7, 2016
Merged

bors-servo merged 2 commits into
servo:masterfrom
cbrewster:navigation_delta

Conversation

@cbrewster

@cbrewster cbrewster commented Jun 4, 2016 •

Copy link
Copy Markdown
Contributor

This adds support for passing a delta with NavigationDirection. This will be used with history.go

r? @asajeffrey


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because I am unsure how to write a test for this

This change is Reviewable

@highfive

highfive commented Jun 4, 2016

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/webdriver_server/lib.rs, components/constellation/constellation.rs
  • @jgraham: components/webdriver_server/lib.rs
  • @KiChjang: components/script/dom/htmliframeelement.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 4, 2016
@highfive

highfive commented Jun 4, 2016

Copy link
Copy Markdown

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive

highfive commented Jun 4, 2016

Copy link
Copy Markdown

New code was committed to pull request.

@cbrewster cbrewster mentioned this pull request Jun 4, 2016
18 of 24 tasks
@highfive

highfive commented Jun 5, 2016

Copy link
Copy Markdown

New code was committed to pull request.

@highfive

highfive commented Jun 5, 2016

Copy link
Copy Markdown

New code was committed to pull request.

@asajeffrey

Copy link
Copy Markdown
Contributor

Reviewed 5 of 5 files at r1.
Review status: 3 of 5 files reviewed at latest revision, 1 unresolved discussion.


components/constellation/constellation.rs, line 1287 [r1] (raw file):

                            return warn!("Invalid navigation delta");
                        }
                        let mut new_current = frame.current;

Can we do this a bit more simply? Something like:

   let new_next_len = frame.next.len() - detta;
   frame.prev.push(frame.current);
   frame.prev.extend(frame.next.drain(new_next_len..).rev());
   frame.current = frame.next.pop().unwrap();

Comments from Reviewable

@asajeffrey asajeffrey added S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 5, 2016
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 7, 2016
@highfive

highfive commented Jun 7, 2016

Copy link
Copy Markdown

New code was committed to pull request.

@cbrewster

Copy link
Copy Markdown
Contributor Author

Review status: 3 of 5 files reviewed at latest revision, 1 unresolved discussion.


components/constellation/constellation.rs, line 1287 [r1] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

Can we do this a bit more simply? Something like:

   let new_next_len = frame.next.len() - detta;
   frame.prev.push(frame.current);
   frame.prev.extend(frame.next.drain(new_next_len..).rev());
   frame.current = frame.next.pop().unwrap();
Done.

Comments from Reviewable

@asajeffrey

Copy link
Copy Markdown
Contributor

Reviewed 1 of 1 files at r2, 1 of 1 files at r5.
Review status: 4 of 5 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@asajeffrey

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit a042166 has been approved by asajeffrey

@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. S-awaiting-answer Someone asked a question that requires an answer. labels Jun 7, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit a042166 with merge 4e7bcb0...

bors-servo pushed a commit that referenced this pull request Jun 7, 2016
Add support for navigating by a delta

<!-- Please describe your changes on the following line: -->
This adds support for passing a delta with `NavigationDirection`. This will be used with `history.go`

r? @asajeffrey

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because I am unsure how to write a test for this

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 7, 2016
@highfive

highfive commented Jun 7, 2016

Copy link
Copy Markdown
  ▶ CRASH [expected OK] /dom/nodes/Node-parentNode.html
  │ 
  │ ERROR:constellation::constellation: Panic: resize sent to nonexistent pipeline
  │ ERROR:constellation::constellation: Backtrace:
  │ frame #0  - 0x000000010553f45e - backtrace::backtrace::trace::hde0eaf64954d96a0
  │ frame #1  - 0x000000010553f3e1 - backtrace::capture::Backtrace::new::h42f95930bb8c5ee8
  │ frame #2  - 0x0000000104a7e446 - _&lt;F as alloc..boxed..FnBox&lt;A&gt;&gt;::call_box::hcc1d865e247a370a
  │ frame #3  - 0x0000000105524e2a - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │ frame #4  - 0x0000000105731ee2 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │ frame #5  - 0x000000010443e014 - std::panicking::begin_panic::h4ebf9fe884b2415f
  │ frame #6  - 0x0000000104add940 - script::script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::h41a556e2c2c94fe6
  │ frame #7  - 0x0000000104ac03a2 - script::script_thread::ScriptThread::handle_msgs::h6a699373a020da16
  │ frame #8  - 0x0000000104a7cbf7 - std::panicking::try::call::hc9179c9e89d6d659
  │ frame #9  - 0x000000010574d55b - __rust_try
  │ frame #10 - 0x000000010574d4f5 - __rust_maybe_catch_panic
  │ frame #11 - 0x0000000104a7de74 - _&lt;F as alloc..boxed..FnBox&lt;A&gt;&gt;::call_box::hbef70c0af4cb429b
  │ frame #12 - 0x0000000105749218 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │ frame #13 - 0x00007fff9534f059 - _pthread_body
  │ frame #14 - 0x00007fff9534efd6 - _pthread_start
  │ 
  └ ERROR:constellation::constellation: Pipeline failed in hard-fail mode.  Crashing!

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 7, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit a042166 with merge a807679...

bors-servo pushed a commit that referenced this pull request Jun 7, 2016
Add support for navigating by a delta

<!-- Please describe your changes on the following line: -->
This adds support for passing a delta with `NavigationDirection`. This will be used with `history.go`

r? @asajeffrey

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because I am unsure how to write a test for this

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11616)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 7, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo
bors-servo merged commit a042166 into servo:master Jun 7, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 7, 2016
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.

5 participants