Commit graph

123 commits

Author SHA1 Message Date
bors-servo
2e17cae5d0 auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger 2015-01-04 12:12:48 -07: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
Manish Goregaokar
552db382d6 Remove manual impls of Reflectors (autogen)
Obtained via:

 `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
 `find . -maxdepth 1 -type f -print0 |xargs -0  grep -lZ dom_struct | xargs -0 grep -LZ  "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`

followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Bruno de Oliveira Abinader
51fac3d2cc Added Element::get_tokenlist_attribute 2014-12-26 14:55:26 -04:00
Bruno de Oliveira Abinader
8859286a99 Added AttrValue::from_atomic_tokens & Element::set_atomic_tokenlist_attribute 2014-12-26 14:55:26 -04:00
Bruno de Oliveira Abinader
eb3678fa28 AttrValue's s/from_tokenlist/from_serialized_tokenlist/ 2014-12-26 13:08:20 -04:00
bors-servo
0e6304dcf7 auto merge of #4467 : servo/servo/dataset, r=Ms2ger 2014-12-25 02:27:43 -07:00
thiagopnts
eacbe331c9 Replace bool attribute in Element::update_inline_style with a descriptive enum 2014-12-24 13:23:58 -02:00
Adam Sunderland
674fe910c1 Add GetPropertyPriority to CSSStyleDeclaration
Tweak getPropertyPriority to match recommendations

Adding Tests for Style Priority

Use else if

Adding Content Test for GetPropertyPriority

Revert "Adding Tests for Style Priority"

This reverts commit 8666a37f833b06c3e43f27acd8a9678e94425e55.
2014-12-23 11:41:33 -06:00
Bruno de Oliveira Abinader
285a06ff59 Implement Element::set_custom_attribute. 2014-12-23 14:23:30 +01:00
Bruno de Oliveira Abinader
63ed36cfce Factor out the name handling in Element::{Get,Set,Remove}Attribute. 2014-12-23 14:23:30 +01:00
Ms2ger
dc63735ca7 Revert PR #4038 for causing WPT failures. 2014-12-23 09:53:12 +01:00
Bruno de Oliveira Abinader
9686840ee7 Avoid duplicated code 2014-12-19 14:07:43 -04:00
Bruno de Oliveira Abinader
e1a7d99df7 Added Element::set_custom_attribute 2014-12-19 14:07:43 -04:00
bors-servo
824788649c auto merge of #4342 : jdm/servo/cssom, r=jdm,metajack
This does not implement any notion of CSSStyleDeclaration objects that do not have an owning element; there's no actual CSS object model in play here. This does support setting and getting properties of the style attribute for HTMLElement, and tries to implement the ambiguous CSS value serialization spec.
2014-12-18 11:54:52 -07:00
Josh Matthews
3cfe8ab53e Address review comments. 2014-12-18 12:54:02 -05:00
Josh Matthews
9d82e06e64 Implement RemoveProperty, SetProperty, and supported property indices. 2014-12-18 12:54:02 -05:00
Josh Matthews
755ebd6528 Improve color serialization by retaining author-specified keywords. 2014-12-18 12:54:02 -05:00
Josh Matthews
6f8a9b6d46 Implement setting element style properties. Improve serialization to return initial values when unspecified. 2014-12-18 12:54:02 -05:00
Tetsuharu OHZEKI
135ee60f5a style: Remove glob imports added in #4405 2014-12-19 01:49:24 +09:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
bors-servo
5951056973 auto merge of #4133 : mttr/servo/form_resetting, r=jdm
We can reset `<input type=text>` fields! I wish I could've done something with checkboxes, but unfortunately, that's it for now.

In addition to that, this PR implements `HTMLInputAttribute.defaultValue`, updates wpt-test to expect passing tests as a result of that implementation, and fixes an index error crash with text inputs.

edit: also includes an html example where one may lazily watch form resets in action: ` tests/html/form_reset_handsfree.html`
2014-12-16 15:03:49 -07:00
Matthew Rasmus
504f968b20 Implements :indeterminate pseudo-class
Addresses reviews
2014-12-16 11:34:04 -08:00
Matthew Rasmus
fc0748f50e Makes layout respect <textarea> rows attribute
review addresssing
2014-12-16 11:02:01 -08:00
Matthew Rasmus
2c7f6076d1 Makes layout respect <textarea> cols attribute 2014-12-16 10:44:15 -08:00
bors-servo
746b262ff4 auto merge of #4374 : thiagopnts/servo/dispatch-event, r=Ms2ger
servo/pull/4369 with the right commit.
2014-12-16 06:36:47 -07:00
thiagopnts
79487252ca Add auxiliary method to EventTargetHelpers for events without target
fixup! Add auxiliary method to EventTargetHelpers for events without target
2014-12-16 10:01:38 -02:00
Patrick Walton
a1ea44b294 style: Address review comments relating to bgcolor and column spans 2014-12-15 18:09:44 -08:00
Patrick Walton
56b78de5bc style: Implement basic column spans.
This patch provides some of the groundwork for column spans greater than
1. It implements the column-span CSS property (prefixed so as not to be
exposed to content) as well as the corresponding colspan attribute;
although the former is not well-specified outside of CSS multi-column
layout, INTRINSIC refers to it. Although width is distributed to
spanning columns, they do not yet contribute minimum and preferred
widths; this will be implemented in a follow-up.

Additionally, this patch cleans up some miscellaneous formatting issues
and improves the handling of table rowgroups.
2014-12-15 17:41:51 -08:00
Patrick Walton
14bafb11be style: Parse the legacy bgcolor attribute per the HTML5 specification.
Additionally, this patch cleans up some miscellaneous formatting issues.
2014-12-15 17:41:44 -08:00
Patrick Walton
10f1ed5e31 style: Parse the legacy border attribute per the legacy HTML specification.
Additionally, this patch cleans up some miscellaneous formatting issues
and refactors files in `layout/css/` somewhat to eliminate needless
levels of indirection. It also fixes our handling of presentational
hints that only apply if border is nonzero.
2014-12-15 17:41:37 -08:00
Patrick Walton
d101c1dd91 script: Improve dirty propagation and fix script-layout synchronization.
This fixes race conditions whereby layout and script could be running
simultaneously.
2014-12-15 14:16:04 -08:00
bors-servo
2615be9bab auto merge of #4189 : chmanchester/servo/rootlint, r=jdm
I think this matches the intent of the issue, I'm a rust/servo novice; any suggestions for improvements are welcome. Thanks!
2014-12-11 15:57:58 -07:00
Chris Manchester
d25bc49772 Return early and decline analysis when linting within unsafe functions for must_root analysis.
Removes a handful of whitelist annotations obsoleted by this change. fixes #3658
2014-12-09 02:10:39 -05:00
Matthew Rasmus
1b84bd22b8 Implements the :checked pseudo-class for inputs
Relevant spec:
https://html.spec.whatwg.org/multipage/scripting.html#selector-checked

Also modifies HTMLInputElement::SetChecked to no longer modify its
checked content value, instead making use of its internal checkedness
state now that we can match `:checked` properly.
2014-12-08 08:40:15 -08:00
bors-servo
c68e2af0a7 auto merge of #4263 : Ms2ger/servo/or_init, r=jdm 2014-12-06 08:01:06 -07:00
Ms2ger
f0ef1f97ad Use or_init where appropriate. 2014-12-06 15:59:17 +01:00
bors-servo
19c69b1625 auto merge of #4002 : Manishearth/servo/activation, r=jdm
Still need to impl `Activatable` on all activatable elements. I'll probably push those changes to this PR, however they can be made separately as well.
2014-12-06 03:55:04 -07:00
Manish Goregaokar
5511e02a78 Add Comparable trait to js.rs; fixups 2014-12-06 02:51:52 -08:00
Ms2ger
6322b0bfab Clarify the panic in get_uint_attribute. 2014-12-06 10:19:05 +01:00
Manish Goregaokar
e7ac792ed6 Switch to NodeFlags (the footprint has not changed) 2014-12-05 18:34:53 -08:00
Manish Goregaokar
a2f7e0fbd6 Address review comments 2014-12-05 18:34:51 -08:00
Manish Goregaokar
d1547e3a7c Move InputSubmit to Activatable 2014-12-05 18:32:13 -08:00
Manish Goregaokar
2ed9626f1a Some reorganization of activation code:
- Make method name apply to trait implementor better (When a user agent is to run post-click activation steps on an element, it must run the activation behavior defined for that element)
 - Mention invariants and conditions on authentic_click_activation
2014-12-05 18:32:12 -08:00