Skip to content

Added checks that selection is valid, and fix set_selection_range. - #11906

Merged
bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:textinput-ok-selection
Jun 29, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:textinput-ok-selection

Conversation

@asajeffrey

@asajeffrey asajeffrey commented Jun 28, 2016 •

Copy link
Copy Markdown
Contributor

Fixed range checking for text inputs. Included some debug_assert! statements to check that the selection range is always valid.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix Panic when deleting text on bhtml url bar #11901.
  • These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

This change is Reviewable

@asajeffrey asajeffrey added A-content/dom Interacting with the DOM from web content I-panic Servo encounters a panic. labels Jun 28, 2016
@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

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

Copy link
Copy Markdown

warning Warning warning

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

@cbrewster

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 717c14d has been approved by ConnorGBrewster

@highfive highfive assigned cbrewster and unassigned Manishearth Jun 28, 2016
@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 Jun 28, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 717c14d with merge 4550188...

bors-servo pushed a commit that referenced this pull request Jun 28, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

<!-- Please describe your changes on the following line: -->

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 fix #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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/11906)
<!-- Reviewable:end -->
@bors-servo bors-servo mentioned this pull request Jun 28, 2016
3 tasks done
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 28, 2016
@cbrewster

Copy link
Copy Markdown
Contributor

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 717c14d with merge 8802f37...

bors-servo pushed a commit that referenced this pull request Jun 28, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

<!-- Please describe your changes on the following line: -->

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 fix #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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/11906)
<!-- 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 28, 2016
@jdm

jdm commented Jun 28, 2016

Copy link
Copy Markdown
Member

No test?

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 29, 2016
@cbrewster

Copy link
Copy Markdown
Contributor

@jdm yeah might be good to add a test. Would a unit test work?

@jdm

jdm commented Jun 29, 2016

Copy link
Copy Markdown
Member

If a unit test can reproduce the problem, I'm fine with it.

@jdm jdm added the S-needs-tests New tests have been requested by a reviewer. label Jun 29, 2016
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 29, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

@asajeffrey

Copy link
Copy Markdown
Contributor Author

Squashed.

@bors-servo r=ConnorGBrewster

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 7ed8408 has been approved by ConnorGBrewster

@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-needs-squash Some (or all) of the commits in the PR should be combined. labels Jun 29, 2016
bors-servo pushed a commit that referenced this pull request Jun 29, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

<!-- Please describe your changes on the following line: -->

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 fix #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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/11906)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7ed8408 with merge 52d48aa...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 29, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

@Manishearth Manishearth removed this from the Tech Demo milestone Jun 29, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7ed8408 with merge 61b9f60...

bors-servo pushed a commit that referenced this pull request Jun 29, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

<!-- Please describe your changes on the following line: -->

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 fix #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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/11906)
<!-- 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 29, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 29, 2016
@cbrewster

Copy link
Copy Markdown
Contributor

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7ed8408 with merge aa91412...

bors-servo pushed a commit that referenced this pull request Jun 29, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

<!-- Please describe your changes on the following line: -->

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 fix #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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/11906)
<!-- 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 29, 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 7ed8408 into servo:master Jun 29, 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 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-content/dom Interacting with the DOM from web content I-panic Servo encounters a panic.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic when deleting text on bhtml url bar

7 participants