Anthony Ramine
aab2c40389
Generate the TypeId enums in codegen
2015-10-14 18:45:35 +02:00
Corey Farwell
9b68d715de
Explicitly place '/' before fragment for multipage spec links
...
This prevents us from 301 redirecting, which could cause the fragment to
get lost
2015-10-10 12:07:10 -04:00
Corey Farwell
85f2b6fc5b
Replace usage of old-style WHATWG spec links
2015-10-10 11:55:09 -04:00
bors-servo
94dc98717b
Auto merge of #7892 - anthgur:form-data-refactor, r=jdm
...
Refactor html form dataset collection
Factor out FormDatum collection for `<input>`
Improve early return logic for getting the FormDatum from an `<input>`
Condense element type patterns
Proposed to close #7851
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7892 )
<!-- Reviewable:end -->
2015-10-07 08:32:44 -06:00
Anthony Urena
31980a7a34
Refactor html form dataset collection
...
Factor out FormDatum collection for <input>
Improve early return logic for getting the FormDatum from an <input>
Condense element type patterns
2015-10-07 10:22:02 -04:00
Maciej Skrzypkowski
7a5390d936
Removed unneeded pub annotations in HTMLInputElement #7897
...
get_size method appeared to be never used so I removed it.
2015-10-07 11:24:49 +02:00
bors-servo
e9842b7db2
Auto merge of #7777 - KiChjang:caseless-group-name-match, r=jdm
...
Add support for caseless group name matching in HTML input elements
Fixes #7749
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7777 )
<!-- Reviewable:end -->
2015-10-02 13:26:05 -06:00
Keith Yeung
5c9a25d46b
Add support for caseless group name matching in HTML input elements
2015-10-02 10:41:02 -07:00
bors-servo
94e85a5226
Auto merge of #7801 - aopicier:refactor_formcontrol, r=Manishearth
...
Refactor FormControl trait
The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.
Suggested by @Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7801 )
<!-- Reviewable:end -->
2015-09-30 19:06:18 -06:00
Philipp Hartwig
bae4abd388
Refactor FormControl trait
...
The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.
2015-09-30 22:02:56 +02:00
Jacob Parker
9cf43877f2
Only display text carets in text inputs
2015-09-27 19:23:20 -04:00
bors-servo
37ce248f31
Auto merge of #7733 - nox:checked, r=Manishearth
...
Properly consider radio button groups
Radio button groups with missing or empty names are always the only element of their respective radio button group.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7733 )
<!-- Reviewable:end -->
2015-09-26 11:21:11 -06:00
Anthony Ramine
e72b77b1e3
Properly consider radio button groups
...
Radio button groups with missing or empty names are always the only element
of their respective radio button group.
2015-09-25 00:29:03 +02:00
Anthony Ramine
01ea761bd0
Use an atom for HTMLInputElement's name attribute's value
2015-09-25 00:04:43 +02:00
Manish Goregaokar
b677f0f4ae
Add form getter for input/button elements; update test expectations
2015-09-24 11:58:24 +05:30
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Patrick Walton
357419dc8d
layout: Query and maintain the position of the insertion point
...
throughout layout for input elements.
2015-09-17 13:31:12 +02:00
Patrick Walton
34d9a6091b
script: Ask layout to redraw the selection whenever the user moves the
...
caret in an input element.
2015-09-17 13:31:11 +02:00
Ms2ger
9faa2de0fc
Use static atoms in some places.
2015-09-14 10:33:16 +02:00
Manish Goregaokar
8e2c37a542
Fix match_refs and let_returns in layout, address review changes
2015-09-04 18:30:46 +05:30
Manish Goregaokar
2e02ea38fc
Elide most 'b lifetimes
2015-09-04 09:02:12 +05:30
Manish Goregaokar
54c036cd66
Elide most 'a lifetimes
2015-09-04 08:55:51 +05:30
Prabhjyot Singh Sodhi
105ea0d690
renaming tokens(), atom() and uint() and rewriting to return or panic
2015-09-02 22:20:33 +05:30
bors-servo
eaf90c0b1c
Auto merge of #7452 - nox:cleanup-attributes, r=nox
...
Introduce VirtualMethods::attribute_mutated()
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7452 )
<!-- Reviewable:end -->
2015-09-02 08:14:33 -06:00
Anthony Ramine
58e1bd0e57
Introduce VirtualMethods::attribute_mutated()
...
This replaces before_remove_attr(), after_remove_attr() and after_set_attr().
The virtual method takes the mutated attribute and an AttributeMutation value
to disambiguate between "attribute is changed", "attribute is added" and
"attribute is removed".
In the case of "attribute is changed", the mutation value contains a reference
to the old value of the mutated attribute, which is used to unregister outdated
named elements when the "id" attribute is changed on an element.
This greatly simplifies the handling of attributes, which in many cases don't
have any specific behaviour whether they are removed or changed or added. It
also fixes a few bugs where things were put in before_remove_attr() instead of
after_remove_attr() (e.g. when removing an href attribute from a base element).
A few helper functions in Element were also renamed and made private.
2015-09-02 15:45:38 +02:00
Corey Farwell
3a1d140ab5
Enforce linking to spec for method implementations via macros
2015-08-31 21:02:23 -04:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
Anthony Ramine
2a028f66a2
Remove AttributeHandlers
...
On components/script/*.rs:
# Remove imports.
/^ *use dom::element::\{.*AttributeHandlers/ {
s/\{AttributeHandlers, /\{/
s/, AttributeHandlers//g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::element::\{?AttributeHandlers\}?;$/d
# Remove AttributeHandlers.
/^pub trait AttributeHandlers \{$/,/^\}$/D
# Patch AttributeHandlers methods.
/^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ {
s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/
/^ *fn /s/\(self([,)])/\(\&self\1/
/^ *fn.*\(&self/s/fn/pub fn/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:04 +02:00
Anthony Ramine
c831c2c0a5
Remove helper traits
...
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:02 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Manish Goregaokar
4678ec16bb
remove to_borrowed_ref, fix Activatable
2015-08-27 02:27:42 +05:30
Manish Goregaokar
b33c5427bc
Remove doublepointer in VirtualMethods, and from_borrowed_ref
...
Most of the heavy lifting done by:
```
$ ls *rs | xargs gawk -i inplace '/let .*: &&.*from_borrowed_ref/{sub("&&", "\\&");sub("_borrowed_","_");} {print $0}'
$ ls *rs | xargs gawk -i inplace "/impl.*VirtualMethods/{in_vm=1; sub(/<'a>/,\"\");sub(/&'a /,\"\")} /^}\$/{in_vm=0;} in_vm{\$0=gensub(/\\*self([^.])/,\"self\\\1\",\"g\"); sub(/from_borrowed_ref/,\"from_ref\")} {print}"
```
2015-08-27 02:14:48 +05:30
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
bors-servo
4837dd9a1c
Auto merge of #6850 - servo:rustup_2015-07-30, r=SimonSapin
...
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)
This builds and passes unit tests.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850 )
<!-- Reviewable:end -->
2015-07-30 14:46:13 -06:00
Simon Sapin
6737be1fb1
Remove usage of the deprecated OwnedAsciiExt
2015-07-30 18:01:41 +02:00
Ms2ger
09f0d8fac9
Remove unused allow(unrooted_must_root) attribute.
2015-07-25 21:29:55 +02:00
David Zbarsky
861ddedaef
Remove some redundant let bindings
2015-07-04 13:12:49 -04:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Ms2ger
108c9b161c
Remove unused imports.
2015-06-27 19:37:12 +02:00
Michael Wu
0cd855379d
Don't use MutNullableHeap in InputActivationState
...
No internal mutability required here.
2015-06-26 19:32:12 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
WriterOfAlicrow
11a4aac2a2
fixup! Fix for Issue #6073
2015-05-15 23:04:15 -04:00
WriterOfAlicrow
85c88c707f
Fix for Issue #6073
2015-05-15 22:44:10 -04:00
bors-servo
5cb1356e9e
Auto merge of #5800 - aweinstock314:x11-clipboard, r=jdm
...
...ed test_clipboard_paste to the "test-unit" suite.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5800 )
<!-- Reviewable:end -->
2015-05-06 16:09:37 -05:00
Anthony Ramine
fedad2af1f
Improve support of limited unsigned long attributes
2015-05-06 20:18:08 +02:00
Avi Weinstock
b742eeca05
Made the clipboard-related functionality in TextInput more testable. Added test_clipboard_paste to the "test-unit" suite.
2015-05-06 11:46:18 -04:00
Ms2ger
024323004d
Remove remaining as_slice / as_mut_slice calls.
2015-04-28 23:31:11 +02:00