aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #12261 - szeged:gattcharacteristicfunctions, r=jdmbors-servo2016-07-062-1/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing steps of Characteristic's readValue, writeValue functions <!-- Please describe your changes on the following line: --> Add a check for the read property of the characteristic as described in https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-readvalue (Step 4.1) Add two missing steps to characteristic's WriteValue function. https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-writevalue (Step 4 and 5) --- <!-- 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, there are no Web Bluetooth test API implementation yet. <!-- 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/12261) <!-- Reviewable:end -->
| * Missing steps of Characteristic's readValue, writeValue functionszakorgy2016-07-062-1/+19
| |
* | Auto merge of #11950 - jdm:keylayout2, r=emiliobors-servo2016-07-066-69/+67
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support non-QWERTY keyboards Using the ReceivedCharacter event from glutin, we can obtain the actual key characters that the user is pressing and releasing. This gets passed to the script thread along with the physical key data, since KeyboardEvent needs both pieces of information, where they get merged into a single logical key that gets processed by clients like TextInput without any special changes. Tested by switching my macbook keyboard to dvorak and looking at the output of keypress/keyup/keydown event listeners, as well as playing with tests/html/textarea.html. Non-content keybindings like reload work as expected, too - the remapped keybinding triggers the reload action. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #4144 - [X] These changes do not require tests because I can't think of a way to test remapped keyboard input Fixes #11991. <!-- 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/11950) <!-- Reviewable:end -->
| * | Make textinput handle actual key values. Don't restrict character values to ↵Josh Matthews2016-07-065-60/+37
| | | | | | | | | | | | a single byte.
| * | Associate logical and physical keypresses together to support non-QWERTY ↵Josh Matthews2016-07-055-27/+48
| | | | | | | | | | | | keyboards.
* | | Auto merge of #11948 - stshine:flex-shorthand-properties, r=emiliobors-servo2016-07-051-0/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support 'flex' and 'flex-flow' shorthand properties <!-- Please describe your changes on the following line: --> Support the `flex` and `flex-flow` shorthand properties in servo. Currently they are marked as experimental, so they are added to `__dir__.ini`. Thanks SimonSapin and jdm for help :) --- <!-- 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] There are tests for these changes <!-- 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/11948) <!-- Reviewable:end -->
| * | | Support flexbox shorthand propertiesPu Xingyu2016-06-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support the `flex` and `flex-flow` shorthand properties in servo. Currently they are marked as experimental, so they are added to '__dir__.ini'. Thanks SimonSapin and jdm for help :)
* | | | Remove get_attr from TElement. \o/Bobby Holley2016-07-051-7/+7
| | | |
* | | | Upgrade rust-selectors.Bobby Holley2016-07-053-61/+68
| | | |
* | | | Add attr_equals to TElement.Bobby Holley2016-07-051-0/+5
| | | | | | | | | | | | | | | | Same reasons as the previous patch.
* | | | Add has_attr method to TElement.Bobby Holley2016-07-051-0/+5
| | | | | | | | | | | | | | | | | | | | If this is all the information the caller needs, we can get it from gecko without worrying about atomization and string conversions.
* | | | Remove get_attrs from TElement.Bobby Holley2016-07-051-8/+4
| | | | | | | | | | | | | | | | This should just be a helper.
* | | | Auto merge of #12003 - Manishearth:no-crash-url-parse, r=jdmbors-servo2016-07-052-33/+77
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash when <img> fails to parse its src Fixes #11992 <!-- 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/12003) <!-- Reviewable:end -->
| * | | Don't crash when <img> fails to parse its srcManish Goregaokar2016-07-051-31/+73
| | | |
| * | | Add Miscellaneous event type to DOM task sourceManish Goregaokar2016-07-051-2/+4
| | | |
* | | | Auto merge of #12258 - izgzhen:remove-data-slice, r=Manishearthbors-servo2016-07-058-119/+54
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove DataSlice, fix #12249 r? @Manishearth --- <!-- 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 #12249 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12258) <!-- Reviewable:end -->
| * | | | Remove DataSlice, fix #12249Zhen Zhang2016-07-058-119/+54
| | | | |
* | | | | Auto merge of #12256 - nox:die-util-die, r=Ms2gerbors-servo2016-07-0512-12/+12
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move some stuff from util to style <!-- 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/12256) <!-- Reviewable:end -->
| * | | | | Move util::str to styleAnthony Ramine2016-07-0512-12/+12
| | |/ / / | |/| | |
* | | | | Move webdriver_msg to script_traits.Ms2ger2016-07-053-4/+4
| | | | |
* | | | | Move WindowSizeData to script_traits.Ms2ger2016-07-053-7/+6
|/ / / /
* | | | Auto merge of #12241 - jdm:multiple-stylesheets, r=notriddlebors-servo2016-07-041-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't load stylesheets in documents without browsing contexts Per https://github.com/whatwg/html/issues/1495, this fixes the most commonly reported panic in nightlies by making us match what other browsers do. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12047 (github issue number if applicable). - [X] There are tests for these changes OR <!-- 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/12241) <!-- Reviewable:end -->
| * | | | Avoid loading stylesheets in inactive documents.Josh Matthews2016-07-041-0/+4
| | | | |
* | | | | Auto merge of #12243 - TravisDean:else-brace-check, r=ConnorGBrewsterbors-servo2016-07-043-10/+6
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add style check and test for else braces <!-- Please describe your changes on the following line: --> Added a regex check to enforce project style guidelines. Added unit check. Catches: ``` } else { ``` when it should be `} else {` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors (no core files changed) - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12234 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12243) <!-- Reviewable:end -->
| * | | | Add style check, test, and code fixes for an else brace check.Travis Dean2016-07-043-10/+6
| | | | |
* | | | | Auto merge of #12224 - nox:die-util-die, r=Ms2gerbors-servo2016-07-044-11/+10
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some stuff from util <!-- 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/12224) <!-- Reviewable:end -->
| * | | | Move util::vec::byte_swap to canvas_traitsAnthony Ramine2016-07-042-5/+4
| | | | |
| * | | | Move util::vec::ForgetfulSink to style::sink and simplify itAnthony Ramine2016-07-042-6/+6
| | | | |
* | | | | Auto merge of #11872 - eddyb:back-to-roots, r=Ms2gerbors-servo2016-07-0431-299/+306
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace return_address usage for rooting with stack guards and convenience macros. The existing `Rooted` and `RootedVec` users were migrated the the following two macros: ```rust let x = Rooted::new(cx, value); // Was changed to: rooted!(in(cx) let x = value); // Which expands to: let mut __root = Rooted::new_unrooted(value); let x = RootedGuard::new(cx, &mut __root); ``` ```rust let mut v = RootedVec::new(); v.extend(iterator); // Was changed to: rooted_vec!(let v <- iterator); // Which expands to: let mut __root = RootableVec::new(); let v = RootedVec::new(&mut __root, iterator); ``` The `rooted!` macro depends on servo/rust-mozjs#272. These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`. Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10. Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway. `RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT. By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix rust-lang/rust#34227 - [x] These changes do not require tests because they are not functional changes <!-- 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/11872) <!-- Reviewable:end -->
| * | | | | Use a stack guard and a macro for RootedVec instead of return_address.Eduard Burtescu2016-07-048-64/+70
| | | | | |
| * | | | | Switch to using the new rooted!/RootedGuard API for rooting.Eduard Burtescu2016-07-0426-235/+236
| | | | | |
* | | | | | Auto merge of #11875 - izgzhen:file-manager-backend, r=Manishearthbors-servo2016-07-045-83/+173
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integration and improvements of File API backends Basically three major changes: 1. More complete origin check in `FileManagerThreadMsg` 2. Add reference counting logic to file manage store and script API 3. Integrate the support of slicing r? @Manishearth --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/11875) <!-- Reviewable:end -->
| * | | | | | Integration and improvements of File API backendsZhen Zhang2016-07-045-83/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. More complete origin check in FileManagerThreadMsg 2. Add reference counting logic to file manage store and script API 3. Integrate the support of slicing
* | | | | | | Skip the root node in querySelectorAllAnthony Ramine2016-07-041-1/+4
| |_|/ / / / |/| | | | | | | | | | | | | | | | | This accounts for https://github.com/whatwg/dom/issues/263.
* | | | | | Auto merge of #12196 - izgzhen:emit-change-file-select, r=Manishearthbors-servo2016-07-031-1/+19
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit change event when files are selected <!-- Please describe your changes on the following line: --> r? @Manishearth As specified in step 6 of [activation behaviour](https://html.spec.whatwg.org/multipage/forms.html#file-upload-state-(type=file)). --- <!-- 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 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12196) <!-- Reviewable:end -->
| * | | | | Emit change event when files are selectedZhen Zhang2016-07-031-1/+19
| |/ / / /
* | | | | Auto merge of #12195 - izgzhen:fix-url-blob, r=Manishearthbors-servo2016-07-031-1/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Blob URL origin when scheme is file <!-- Please describe your changes on the following line: --> r? @Manishearth --- <!-- 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 <!-- Either: --> - [x] These changes do not require tests because it needs future integration <!-- 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/12195) <!-- Reviewable:end -->
| * | | | | Fix Blob URL origin when scheme is fileZhen Zhang2016-07-031-1/+14
| |/ / / /
* / / / / Refactor `util::prefs` operations to be methods on static struct.Corey Farwell2016-07-0213-58/+56
|/ / / /
* | | | Auto merge of #12136 - ConnorGBrewster:servo_version_reporter, r=asajeffreybors-servo2016-07-022-0/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send servo version in mozbrowser error. <!-- Please describe your changes on the following line: --> Adds support for sending a version string to b.html so we can put the servo version in the auto generated issue reports. 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 fix #12083 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because sending servo version on mozbrwosererror for issue reporter. <!-- 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/12136) <!-- Reviewable:end -->
| * | | | Send servo version in mozbrowser error.Connor Brewster2016-07-012-0/+3
| |/ / / | | | | | | | | | | | | | | | | Also moved servo version to util for usage by the --version flag and for sending the version to browser.html with mozbrowsererror
* / / / Removing u8 from HTMLIframeElementPatrick Trottier2016-07-011-19/+21
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove u8 in HTMLIframeElement.rs Remove u8 from IframeElement.rs u8 removal trying to pass test - uri Update htmliframeelement.rs u8 removal removing u8 from Rust HTMLIFrameElement
* | / change load blocker drop assert to debug_assertConnor Brewster2016-06-301-1/+1
| |/ |/|
* | Auto merge of #11931 - izgzhen:fix-html-input-element, r=Manishearthbors-servo2016-06-302-1/+15
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix file-type input element A simple fix to put `inputElem.files` online --- <!-- 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 <!-- Either: --> - [x] There are tests for these changes <!-- 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/11931) <!-- Reviewable:end -->
| * Fix file-type input elementZhen Zhang2016-06-302-1/+15
| |
* | Auto merge of #11934 - jdm:navigatefragment, r=emiliobors-servo2016-06-291-1/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special-case setting location.hash to the empty string This avoids endless redirect loops on facebook and makes us compliant with https://github.com/whatwg/html/pull/1318. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #10952 - [X] There are tests for these changes OR <!-- 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/11934) <!-- Reviewable:end -->
| * | Ensure that a navigation to the same URL is aborted. Fixes #10952.Josh Matthews2016-06-291-1/+4
| | |
* | | Auto merge of #11932 - jdm:servoorg-cert, r=asajeffreybors-servo2016-06-291-4/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print out useful SSL-related information on SSL error page. Make certificate error pages more useful. Attempt to identify known cases where upgrading OpenSSL would be useful. <img width="553" alt="screen shot 2016-06-29 at 12 29 30 pm" src="https://cloud.githubusercontent.com/assets/27658/16460435/4d07d5e2-3df5-11e6-94ab-cf061c0e64cc.png"> --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- 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/11932) <!-- Reviewable:end -->
| * | | Print out useful SSL-related information on SSL error page.Josh Matthews2016-06-291-4/+5
| |/ /
* | | Auto merge of #11906 - asajeffrey:textinput-ok-selection, r=ConnorGBrewsterbors-servo2016-06-291-4/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->