Commit graph

541 commits

Author SHA1 Message Date
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
Manish Goregaokar
ddfa0c7de7 Implement basic (unhooked) framework for element activation 2014-12-05 18:32:12 -08:00
aakashjain
fab09a5137 Fixes #4123 2014-11-29 15:06:17 +05:30
Tetsuharu OHZEKI
1305ac4dd0 Remove Element.node(). 2014-11-28 06:05:45 +09:00
bors-servo
60dfb65ab2 auto merge of #4068 : Manishearth/servo/atomify, r=jdm 2014-11-23 22:00:40 -07:00
Manish Goregaokar
534919327d Use atom! in place of Atom::from_slice where necessary 2014-11-23 22:03:27 +05:30
Rohan Prinja
4b754bd457 implement Document#createAttribute 2014-11-23 14:51:04 +05:30
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00
Josh Matthews
80764f65e3 Add single-line text input with no visible cursor. 2014-11-13 12:53:54 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
bors-servo
fba6cb9c42 auto merge of #3897 : Ms2ger/servo/enable-reflection, r=Manishearth 2014-11-05 11:12:40 -07:00
Ms2ger
214c356ecd Pass an Atom to VirtualMethods::parse_plain_attribute. 2014-11-05 16:19:11 +01:00
Ms2ger
cdde96e989 Defer to GetAttribute in HasAttribute.
The semantics of has_attribute aren't anywhere close to the ones expected for
Element#hasAttribute, and it fails an assertion when passed non-lower-case
names.
2014-11-05 16:05:06 +01:00
Bruno de Oliveira Abinader
5db3eb0cee Cleanup Element's AttributeHandlers
Remove notify_attribute_{changed,removed} in favor of a unified
notify_content_changed.
2014-10-30 17:14:25 -04:00
bors-servo
7de9ed5fc7 auto merge of #3856 : Ms2ger/servo/tagname, r=Manishearth
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is
not intended here.
2014-10-30 12:27:35 -06:00
Ms2ger
82216fd5c0 Move build_element_from_tag out of the HTML parser.
This function is not particular to the parser, so should live in the DOM.
2014-10-30 18:03:19 +01:00
Ms2ger
671a487145 Format Element#tagName correctly when there's a prefix.
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is
not intended here.
2014-10-30 11:51:27 +01:00
Clark Gaebel
a8f80b89f4 layout: Implement flow tree dumping with RUST_LOG=debug is on.
r? @pcwalton
2014-10-28 10:14:12 -07:00
Ms2ger
d643ade7e8 Introduce LayoutDocumentHelpers::is_html_document_for_layout for LayoutElementHelpers::html_element_in_html_document_for_layout. 2014-10-23 18:20:11 +02:00
Bruno de Oliveira Abinader
bbab8831e0 Usage of JSRef<Attr> in before_remove_attr & after_set_attr
JSRef<Attr> does not require allocating a DOMString for value, which are
unused in most cases. It also provides more access to Attr data.
2014-10-22 11:13:58 -04:00
Keegan McAllister
9da7679367 Use html5ever for HTML parsing 2014-10-16 13:06:34 -07:00
bors-servo
1de2fb3721 auto merge of #3695 : saneyuki/servo/cell, r=jdm
#3050
2014-10-16 00:03:18 -06:00
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30
Tetsuharu OHZEKI
ab90c718eb Add the comment about to use mem::transmute() for values contained in DOMRefCell. 2014-10-16 10:48:23 +09:00
Tetsuharu OHZEKI
fb98384fa5 Use DOMRefCell<T> in Element. 2014-10-15 13:44:02 +09:00
Patrick Walton
5f8d3f72d8 layout: Introduce support for legacy presentational attributes to selector
matching, and use it for `<input size>` and `<td width>`.

This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.
2014-10-14 12:44:09 -07:00
Patrick Walton
ee2ccc4f87 script: Use atom comparison in more places, especially for attributes.
75% improvement in style recalc for Guardians of the Galaxy.
2014-10-14 10:32:40 -07:00
Tim Taubert
cbe50f1f14 Privatize Element 2014-10-13 13:25:44 +02:00
Tim Taubert
8825296869 Privatize Document 2014-10-13 13:25:43 +02:00
Tim Taubert
df60f8b2c5 Privatize EventTarget and EventListenerEntry 2014-10-13 13:25:43 +02:00
Tim Taubert
78fef7eec5 Privatize Attr 2014-10-13 13:18:57 +02:00
Tim Taubert
9a52bb8310 Privatize InheritTypes 2014-10-13 11:13:12 +02:00
Patrick Walton
2a790d06dd Use Gecko's simpler Bloom filter instead of one based on hash
stretching.

This preserves the usage of the Bloom filter throughout style recalc,
but the implementation is rewritten. Provides a 15% improvement on
Guardians of the Galaxy.
2014-10-10 17:02:27 -07:00