Prabhjyot Singh Sodhi
cfde40e225
Support form submission of multipart/form-data
2016-04-30 21:42:50 -04:00
bors-servo
ac8406f4ae
Auto merge of #10834 - yoava333:master, r=SimonSapin
...
added support for :read-only and :read-write pseudo-classes
partial fix for https://github.com/servo/servo/issues/10732
It's not a full fix because:
1. there's a bug in wpt-test https://github.com/w3c/web-platform-tests/issues/2889#issuecomment-214144420
2. we don't fully support all input types (namely image, color, hidden and range), which are defaulted to input text. this means that :read-write which is applicable to input text is mis-handled in those cases.
3. we don't support contenteditable, which is also possibly :read-write
<!-- 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/10834 )
<!-- Reviewable:end -->
2016-04-29 08:12:18 -07:00
Ms2ger
897be5f6ee
Reduce channel cloning.
2016-04-29 14:55:52 +02:00
bors-servo
cf121ad8df
Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton
...
Use byte indices instead of char indices for text runs
Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs. This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.
For most code this is just a simple replacement of char indices with byte indices. In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.
Also includes some related fixes to text shaping, discovered while working on this conversion. See the commit messages for details.
r? @pcwalton
<!-- 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/10895 )
<!-- Reviewable:end -->
2016-04-28 20:22:09 -07:00
Matt Brubeck
c4872d9544
Replace range::Range with std::ops::Range in script
2016-04-28 14:54:07 -07:00
Matt Brubeck
659305fe0a
Use byte indices instead of char indices for text runs
...
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking. This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
Keith Yeung
33acb1937c
Remove extraneous script_chan parameter from Trusted::new
2016-04-28 10:52:44 +02:00
Yoav Alon
9bf909ac2f
added support for :read-only and :read-write pseudo-classes
...
partial fix for https://github.com/servo/servo/issues/10732
2016-04-27 01:38:58 +03:00
Alberto Corona
5e863f2eb8
Implement HTMLTextArea.setSelectionRange
2016-04-17 17:27:26 +02:00
bors-servo
934ae41fc9
Auto merge of #10522 - KiChjang:input-cleanup, r=frewsxcv
...
Various cleanups in HTMLInputElement
<!-- 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/10522 )
<!-- Reviewable:end -->
2016-04-12 07:56:38 +05:30
Arnaud Marant
9b8f183cba
Issue #10491 add HTMLInputElement attributes that reflect content identically
...
it uses a new version of string-cache https://github.com/servo/string-cache/pull/148
2016-04-12 00:15:57 +02:00
Keith Yeung
c9193eaeca
Remove get_ prefix for functions in LayoutHTMLInputElementHelpers
2016-04-11 09:17:04 -04:00
Keith Yeung
2d503c8281
Rename fn get_form_datum to form_datum
2016-04-11 08:56:47 -04:00
Keith Yeung
814afd6537
Move check for mutability up as a guard clause
2016-04-11 08:55:26 -04:00
Keith Yeung
916c035b57
Rename fn mutable to is_mutable
2016-04-11 08:54:50 -04:00
Keith Yeung
f54a8fc845
Use fn in_same_group where appropriate
2016-04-11 08:41:46 -04:00
Keith Yeung
0541a01924
Rename get_radio_group_name to radio_group_name
2016-04-11 08:20:30 -04:00
Keith Yeung
e4cd8044a5
Remove unused fn get_indeterminate_state
2016-04-11 08:18:53 -04:00
Keith Yeung
311d2c65b6
Rename get_value_mode to value_mode
2016-04-11 08:07:32 -04:00
Corey Farwell
11a3ce1257
Remove get_*
on getters as per RFC 0344.
...
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis
https://github.com/servo/servo/issues/6224
2016-04-10 22:49:35 -04:00
Rahul Sharma
2caa9a2a76
refactors entities from script_thread into script_runtime
2016-04-06 12:46:49 +05:30
Matt Brubeck
776aae6399
Fix incremental reflow of text selection changes
...
Also replace force_relayout methods with direct Node::dirty calls, for
clarity.
2016-04-01 22:00:05 -07:00
bors-servo
80d903a897
Auto merge of #10019 - rebstar6:htmllabelclick, r=jdm
...
Fix htmllabelelement click to activate correct element
Address https://github.com/servo/servo/issues/9928
Pass on label click to the label element's labeled control
<!-- 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/10019 )
<!-- Reviewable:end -->
2016-03-30 05:41:00 +05:30
Rebecca
3c7e6a4be8
Fix HtmlLabelElement activation to run on correct element
...
Also removes old code that caused radio button clicks on disabled elements
2016-03-29 18:48:07 -04:00
Matt Brubeck
6171000875
Highlight selected text in input fields
...
Fixes #9993 . This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
2016-03-24 18:33:26 -07:00
Sagar Muchhal
051ffba0e5
Implement initial pieces of form validation.
2016-03-24 09:07:38 -04:00
bors-servo
f2f6787189
Auto merge of #9930 - rebstar6:htmlclick, r=jdm
...
Remove activatable element filter within HTMLElement#click()
Address https://github.com/servo/servo/issues/6542
Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9930 )
<!-- Reviewable:end -->
2016-03-11 10:06:24 +05:30
Rebecca
d6678a184b
Call synthetic_click_activation for all clicks
...
Moved synthetic_click_actiavtion out of Activatable trait so it can be
called by all elements (not just activatable). Calls appropriately
from click. Also updates the isdisabled check in click to check for all
types of elements
2016-03-10 14:43:33 -05:00
Saurav Sachidanand
a3d77790a6
Implement input.setSelectionRange
2016-03-10 19:54:21 +05:30
Greg Guthe
e6c31e305d
Get input value IDL attribute matching spec
...
Refs: https://github.com/servo/servo/issues/9455
2016-02-25 18:59:34 -05:00
Daniel Robertson
7a35ef1555
Implement RootedReference<T> for Option<JS<T>>
...
An implementation of RootedReference for Option<JS<T>> based off of
other implementations of RootedReference for Option wrapped types.
2016-02-16 22:40:03 +00:00
Kamil Muszyński
076cc409e6
Issue #9561 Renamed *_thread_source to *_task_source and ThreadSource to TaskSource
2016-02-14 15:29:44 +01:00
bors-servo
a24e86e76f
Auto merge of #9614 - paulrouget:inputEventBubbles, r=mbrubeck
...
input event should bubble
No test because: https://github.com/servo/servo/issues/9574#issuecomment-181558144
Fix #9574
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9614 )
<!-- Reviewable:end -->
2016-02-12 12:00:31 +05:30
Paul Rouget
54e737c2b0
input event should bubble
2016-02-12 07:27:27 +01:00
Ms2ger
5317af1e19
Remove the global argument to EventTarget::{fire_event, fire_simple_event}.
2016-02-08 19:21:56 +01:00
Emilio Cobos Álvarez
a1c830f1c1
Update rust-selectors
...
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
2016-02-03 02:11:31 +01:00
bors-servo
099beee85c
Auto merge of #8983 - Manishearth:cursors, r=jdm
...
Various textinput fixes
- Currently the cursor sticks around if you click elsewhere. Now the text inputs are relayout-ed on blur.
- Currently whitespace gets collapsed in text input (https://github.com/servo/servo/issues/8772 ). Not anymore.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8983 )
<!-- Reviewable:end -->
2016-01-11 23:21:03 +05:30
rohan.prinja
1f02c4ebbb
task -> thread
2016-01-10 17:58:13 +09:00
Brandon Fairchild
fb0304cfdb
Rename fire_simple_event_params to fire_event
...
Fixes #9180 .
2016-01-07 13:49:49 -05:00
Manish Goregaokar
f67e208630
Remove virtual call and unconditionally dirty node on set_focus_state
2016-01-07 13:38:05 +05:30
Guillaume Gomez
99ac1a81cc
Generate PartialEq automatically
2016-01-03 18:07:09 +01:00
Manish Goregaokar
23e7dfa57b
Relayout text input elements on blur
2016-01-03 13:18:24 +05:30
bors-servo
7f156b8c12
Auto merge of #9072 - Manishearth:password-placeholder, r=eefriedman
...
Fix placeholders for password inputs
currently they show dots instead of the placeholder text
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9072 )
<!-- Reviewable:end -->
2016-01-03 10:21:26 +05:30
Manish Goregaokar
cc5844a373
Move placeholder logic out of get_raw_textinput_value
2016-01-03 09:47:30 +05:30
bors-servo
9da739acef
Auto merge of #9123 - karyon:clippy_cleanup, r=Manishearth
...
Fix a bunch of clippy lints
This fixes about 130 clippy lints. Let me know if i should split up the commit.
I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)
There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.
cc @Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9123 )
<!-- Reviewable:end -->
2016-01-03 09:16:34 +05:30
Iszak Bryan
603d0a54ea
Use atom's for matching to gain performance benefits
2016-01-03 00:13:52 +00:00
Johannes Linke
6b215f38ee
Fix a bunch of clippy lints
2016-01-02 23:27:15 +01:00
Chad Kimes
0e663e0f2f
De-duplicate input event send code
2016-01-02 11:31:22 -05:00
Chad Kimes
12a0884f51
Add 'input' event for HTMLInputElement
2016-01-02 11:07:12 -05:00
Manish Goregaokar
6a0ec85d43
Fix placeholders for password inputs
...
currently they show dots
2015-12-27 00:18:06 +05:30