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

Add support for navigating by a delta #11616

Merged
merged 2 commits into from Jun 7, 2016
Merged

Conversation

@cbrewster
Copy link
Member

cbrewster commented Jun 4, 2016

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

highfive commented Jun 4, 2016

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

highfive commented Jun 4, 2016

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@cbrewster cbrewster force-pushed the cbrewster:navigation_delta branch from f2ee10c to 44a4226 Jun 4, 2016
@highfive
Copy link

highfive commented Jun 4, 2016

New code was committed to pull request.

@cbrewster cbrewster mentioned this pull request Jun 4, 2016
18 of 24 tasks complete
@cbrewster cbrewster force-pushed the cbrewster:navigation_delta branch from 44a4226 to 2dd8722 Jun 5, 2016
@highfive
Copy link

highfive commented Jun 5, 2016

New code was committed to pull request.

@cbrewster cbrewster force-pushed the cbrewster:navigation_delta branch from 2dd8722 to c0ea1f1 Jun 5, 2016
@highfive
Copy link

highfive commented Jun 5, 2016

New code was committed to pull request.

@asajeffrey
Copy link
Member

asajeffrey commented Jun 5, 2016

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

@highfive
Copy link

highfive commented Jun 7, 2016

New code was committed to pull request.

@cbrewster
Copy link
Member Author

cbrewster commented Jun 7, 2016

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
Member

asajeffrey commented Jun 7, 2016

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
Member

asajeffrey commented Jun 7, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2016

📌 Commit a042166 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2016

Testing commit a042166 with merge 4e7bcb0...

bors-servo added 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
Contributor

bors-servo commented Jun 7, 2016

💔 Test failed - mac-rel-wpt

@highfive
Copy link

highfive commented Jun 7, 2016

  ▶ 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!
@KiChjang
Copy link
Member

KiChjang commented Jun 7, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2016

Testing commit a042166 with merge a807679...

bors-servo added 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
Contributor

bors-servo commented Jun 7, 2016

@bors-servo bors-servo merged commit a042166 into servo:master Jun 7, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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.

None yet

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