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

Remove usage of slice_chars in script #6854

Merged
merged 3 commits into from Aug 28, 2015
Merged

Remove usage of slice_chars in script #6854

merged 3 commits into from Aug 28, 2015

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Jul 30, 2015

It’s deprecated in the #6850 rustup.

The first commit changes some behavior which was previously incorrect: the spec says indices in DOM strings are UTF-16 code units, not char code points.

The second commit should not change behavior, unless I made a mistake.

r? @jdm

Review on Reviewable

@Ms2ger
Copy link
Contributor

Ms2ger commented Jul 30, 2015

Needs tests

@jdm jdm added the S-needs-tests label Jul 30, 2015
@SimonSapin
Copy link
Member Author

SimonSapin commented Jul 30, 2015

I’ll tweak tests/wpt/web-platform-tests/dom/nodes/CharacterData-* to exercise these changes, but I don’t know what to do about textinput.

@jdm
Copy link
Member

jdm commented Jul 30, 2015

There are unit tests in test/unit/script/textinput.rs - can you add some there?

@SimonSapin
Copy link
Member Author

SimonSapin commented Jul 30, 2015

I’ll look into that tomorrow

@bors-servo
Copy link
Contributor

bors-servo commented Jul 31, 2015

The latest upstream changes (presumably #6876) made this pull request unmergeable. Please resolve the merge conflicts.

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 1, 2015

Rebased and added some tests, including a new file marked expected: CRASH because of #6873.

@jdm
Copy link
Member

jdm commented Aug 4, 2015

So if a text input contains "🌠" with the cursor at the left side, what happens now if you press right and insert or delete a character? Can we write tests for that?

-S-awaiting-review +S-awaiting-answer +S-needs-code-changes


Reviewed 2 of 2 files at r1, 13 of 13 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions, all commit checks successful.


components/script/textinput.rs, line 260 [r2] (raw file):
s/adjusting/adjust/


components/script/textinput.rs, line 280 [r2] (raw file):
adjust_selection_for_horizontal_change


components/script/textinput.rs, line 292 [r2] (raw file):
This is a change in behaviour; previously performing a horizonal adjustment without pressing shift while a selection was present would warp the cursor to one end up of the selection, but no further. Do the tests in test/unit/script catch this?


components/script/textinput.rs, line 297 [r2] (raw file):
perform_horizontal_adjustment


Comments from the review on Reviewable.io

@bors-servo
Copy link
Contributor

bors-servo commented Aug 7, 2015

The latest upstream changes (presumably #7073) made this pull request unmergeable. Please resolve the merge conflicts.

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 17, 2015

Added a couple tests for the scenarios described.


Review status: 7 of 12 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending.


components/script/textinput.rs, line 260 [r2] (raw file):
Done.


components/script/textinput.rs, line 280 [r2] (raw file):
Done.


components/script/textinput.rs, line 292 [r2] (raw file):
Tests still pass with this code change, but I don’t understand how it is a behavior change. Could you explain a bit more?


components/script/textinput.rs, line 297 [r2] (raw file):
Done.


Comments from the review on Reviewable.io

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 20, 2015

Added the tests that I had apparently forgotten to commit.

@bors-servo
Copy link
Contributor

bors-servo commented Aug 25, 2015

💔 Test failed - mac1

@@ -29106,6 +29106,12 @@
"shadow-dom/shadow-trees/hosting-multiple-shadow-trees-005.html"
],
"items": {},
],

This comment has been minimized.

Copy link
@jdm

jdm Aug 25, 2015

Member

Rebase error?

@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2015

The latest upstream changes (presumably #7416) made this pull request unmergeable. Please resolve the merge conflicts.

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 28, 2015

Rebased and ran mach test-wpt --manifest-update again, but some unrelated tests have been marked as "deleted" in tests/wpt/metadata/MANIFEST.json

r? for the changes in that file.

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 28, 2015

@bors-servo r=jdm+Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2015

📌 Commit dcc8f63 has been approved by jdm+Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2015

Testing commit dcc8f63 with merge 2ca48ca...

bors-servo pushed a commit that referenced this pull request Aug 28, 2015
Remove usage of slice_chars in script

It’s deprecated in the #6850 rustup.

The first commit changes some behavior which was previously incorrect: the spec says indices in DOM strings are UTF-16 code units, not `char` code points.

The second commit should not change behavior, unless I made a mistake.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6854)
<!-- Reviewable:end -->
@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 28, 2015

@bors-servo r=jdm+Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2015

📌 Commit dcc8f63 has been approved by jdm+Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2015

☀️ Test successful - android, gonk, linux1, linux2, mac1, mac2, mac3

@bors-servo bors-servo merged commit dcc8f63 into master Aug 28, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@SimonSapin SimonSapin deleted the slice_chars branch Aug 28, 2015
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

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