Anthony Ramine
561ec7e21d
Rename many name arguments to local_name
2015-04-06 14:31:28 +02:00
Anthony Ramine
254207730e
Make Element::get_attribute() take its namespace by reference
2015-04-06 14:31:27 +02:00
Anthony Ramine
dd88bcddc4
Fix Element::RemoveAttribute*()
2015-04-06 14:12:56 +02:00
Anthony Ramine
1906f835b9
Fix Element::GetAttribute()
...
Local names should not be used to get a attribute without providing a namespace.
2015-04-06 14:12:20 +02:00
bors-servo
f22d920b4d
auto merge of #5524 : servo/servo/attributes-ownerElement, r=Manishearth
2015-04-05 05:54:53 -06:00
Matt Brubeck
791fa3757d
Implement the :focus pseudo-class selector
...
Fixes #5460 . This supports for simple focusable elements that are their own
DOM anchors, like text `input` fields.
2015-04-04 10:57:11 -07:00
Anthony Ramine
d3d12e6324
Make attributes lose their owner when removed
2015-04-04 17:39:39 +02:00
Corey Farwell
ae9b1636b1
Fix useless assert in script::dom::element
...
We should ensure the parameter is lowercased. Right now, the assert will
always return true.
Discussed in #5445
Introduced in ee2ccc4f87
2015-03-29 17:54:01 -04:00
Corey Farwell
d838fcce30
Remove some unnecessary uses of as_slice
...
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:
* `String` -> `str`
* `Atom` -> `str`
The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Mukilan Thiyagarajan
e8a1e9eabb
Implement RootedVec<T>
2015-03-29 11:58:25 +02:00
Corey Farwell
b5d3e77716
Cleanup and modernize script::dom::element
2015-03-26 17:58:38 -04:00
Manish Goregaokar
3479d3fa7f
Replace unsafe_blocks by unsafe_code.
2015-03-21 10:27:32 +01:00
Maciej Skrzypkowski
7da356cd05
Added document.activeElement attribute.
2015-03-19 23:00:13 +01:00
bors-servo
1236280bea
auto merge of #5029 : ChrisParis/servo/h5e-serialize, r=jdm
...
Fixes https://github.com/servo/servo/issues/3713 . Depends on https://github.com/servo/html5ever/pull/100 and https://github.com/servo/html5ever/pull/101 .
2015-03-18 18:06:49 -06:00
Chris Paris
a5d6c6a1fc
Serialize using html5ever
2015-03-18 12:17:56 -10:00
Chris Paris
99286e4b4f
Implement Element.innerHTML setter
2015-03-18 11:20:47 -10:00
Ms2ger
5f15eb5fbf
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
2015-03-18 13:18:31 -04:00
Patrick Walton
586c12ccc4
layout: Implement border-spacing
per CSS 2.1 § 17.6.1 and the legacy
...
`cellspacing` attribute per HTML5 § 14.3.9.
Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.
This commit also fixes two nasty issues in table layout:
* In fixed layout, extra space would not be divided among columns that
had auto width but had nonzero minimum width.
* In automatic layout, extra space would be distributed to constrained
columns as well even if unconstrained columns with percentage equal to
zero were present.
2015-03-12 12:00:40 -07:00
Zack Slayton
08ac0766ed
Use new if let
syntax wherever possible. Fixes #4153 .
2015-03-10 09:18:55 -04:00
Simon Sapin
2a50755c8a
Move selector matching to an external library, for use outside Servo.
2015-02-23 16:29:34 +01:00
Shing Lyu
f4a2afc3a6
Bug 4236: Moved anchorelement click event to activation behaviour
2015-02-21 09:26:39 +08:00
Ms2ger
b3f93b25a5
Remove JS::unsafe_get.
...
The codegen users already migrated to Unrooted, and the layout users are
better off using LayoutJS.
2015-02-12 20:59:22 +01:00
Simon Sapin
d5dd1d658e
Upgrade to rustc ba2f13ef0 2015-02-04
2015-02-11 14:48:34 -08:00
Josh Matthews
ae2b74c783
Make Document::url return the page's URL to avoid stale URLs after redirects.
2015-02-04 13:34:06 +00:00
Gilles Leblanc
a1804effaf
Initialize trusted-ness of DOM events properly
...
Fixes #3740
2015-02-03 21:40:07 -05:00
Tetsuharu OHZEKI
e2bd9eadd8
LayoutJS<T> implements Layout*Helpers instead of JS<T>.
2015-02-01 01:54:37 +09:00
Manish Goregaokar
26732403b9
Specific instances of activatable elements may not be activatable ( fixes #4765
2015-01-31 06:08:38 +05:30
Simon Sapin
d13d36f57f
End the libstyle 'pub use' madness.
2015-01-30 15:08:29 +01:00
Ms2ger
505159a464
Import the util crate as util rather than servo_util.
...
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
f8ac1777ff
Don't shadow lifetimes in script.
2015-01-28 13:48:28 +01:00
Manish Goregaokar
b68b7e87c8
self import
2015-01-28 13:46:00 +05:30
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Ms2ger
13c7cf928a
Stop calling deref() and deref_mut() explicitly.
2015-01-22 16:04:21 +01:00
Simon Sapin
d034a6c6bc
Port to the new cssparser.
...
https://github.com/servo/rust-cssparser/pull/68
2015-01-21 22:23:46 +01:00
Ms2ger
01ed338746
Move to to_owned rather than into_string.
...
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Ms2ger
394f816343
Disallow lines that span more than 160 columns.
...
The Rust style guide suggests 100, but we have too many violations in the
tree already. This check can be tightened over time.
2015-01-19 13:48:32 +01:00
Jim Hoskins
7759358e09
Implement Element#closest
...
fixes #4603
- Add definition to the Element.webidl and implementation to element.rs.
- Create inclusive_ancestors helper in NodeHelpers
- Update test expectations
2015-01-17 07:29:33 -08:00
Bruno de Oliveira Abinader
9da761fc64
Check quirks mode in {Document,Element}::getElementsByClassName
...
Fixes #4604 .
2015-01-12 17:38:13 -04:00
Ms2ger
edc1d89251
Deny unsafe blocks in script.
...
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
bors-servo
ba8cf6b0e6
auto merge of #4542 : servo/servo/pre-rustup_20141221, r=saneyuki
...
In particular, this contains changes to qualify enums where rust will require it, and to stop using some features that will be removed.
2015-01-04 12:39:47 -07:00
bors-servo
2e17cae5d0
auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger
2015-01-04 12:12:48 -07:00
Ms2ger
76b8810a86
Disambiguate trait object reference syntax.
2015-01-04 11:59:51 +01:00
Ms2ger
b51e83819d
Fix obsolete format traits.
...
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Megha Gupta
f85b9e37cc
Add HTMLElementTypeId enum ( fixes #3625 )
2015-01-02 23:10:31 +05:30
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
bors-servo
56d1b16d1b
auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister
...
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.
A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
2014-12-27 22:12:45 -07:00
Ms2ger
0031498e6b
Remove some transmute calls.
2014-12-27 17:07:32 +01:00
Manish Goregaokar
e9d1740e19
script: to_string() -> into_string()
2014-12-27 14:48:36 +01:00
Manish Goregaokar
7d65673561
Remove extra spaces
...
Command: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/}\\n\\n\\n/}\\n\\n/"`
2014-12-27 02:53:35 +05:30