Ms2ger
31f8100b9d
Cleanup URL handling in ScriptTask::load a bit.
...
This should make it clearer that we always pass a URL to Document::new, and
avoids an unnecessary unwrap() call.
2014-10-04 15:19:08 +02:00
Andrew Guertin
815a701455
Replace Cell<Option<JS<T>>> with MutNullableJS<T>
...
https://github.com/servo/servo/issues/3564
2014-10-03 20:08:05 -04:00
Ms2ger
75ee535e3c
Use or_else in Document.find_fragment_node.
2014-10-03 09:20:54 +02:00
Ms2ger
c96018152f
Cleanup Document.find_fragment_node.
2014-10-02 19:54:12 +02:00
Ms2ger
4cc24e727b
Clear the fragment_name field when resizing.
...
This reinstates the behaviour from before the change in
a1bf49c1ce
.
2014-10-02 18:07:41 +02:00
Ms2ger
7508ca94b3
Remove the fragment_node field from Page ( fixes #3543 ).
...
Since Page isn't reflected, it cannot be rooted, and pointers to JS-managed
objects inside it are not guaranteed to be traced. This may cause the pointer
to become dangling.
2014-10-02 15:31:26 +02:00
Ms2ger
5d335fd524
Move find_fragment_node to Document.
2014-10-02 12:04:05 +02:00
Josh Matthews
7401cd0aeb
Split a long line.
2014-10-01 15:40:37 -04:00
Josh Matthews
8112859d55
Disallow toggling radio buttons. Use generated content for checkboxes and radio buttons. Switching to the glyph 0 for the average advance width.
2014-10-01 15:37:40 -04:00
Josh Matthews
f70bb68503
Implement simple layout for text, button, radio, and checkbox inputs. Implement simple interaction for checkboxes and radio buttons.
2014-10-01 15:35:42 -04:00
Josh Matthews
08cac68d5a
Check if the immediate node is an element before looking at ancestors when clicking, and flush pending layout changes after dispatching the event.
2014-10-01 15:03:15 -04:00
bors-servo
bae5440689
auto merge of #3531 : Ms2ger/servo/MutNullableJS, r=Ms2ger
...
Extracted from #3527 .
2014-10-01 09:09:28 -06:00
Josh Matthews
54fcab61d6
Implement MutNullableJS for mutable, nullable member pointers to DOM objects.
2014-10-01 17:06:23 +02:00
Cameron Zwarich
0ef191b37a
Remove an extra lifetime parameter on PrivateTreeWalkerHelpers
2014-10-01 02:07:52 -07:00
Cameron Zwarich
72656717d4
Remove an extra lifetime parameter on NodeHelpers
2014-10-01 02:07:46 -07:00
Cameron Zwarich
78791af7d6
Convert the NodeHelpers trait to use self methods
2014-09-30 23:42:03 -07:00
Cameron Zwarich
8b0361e251
Remove an unused lifetime parameter
2014-09-30 21:26:19 -07:00
Cameron Zwarich
79b4ec99b4
Convert TNode / TElement to use self methods rather than &self
2014-09-30 21:26:19 -07:00
Cameron Zwarich
1581c383bb
Convert the remaining ElementHelpers methods to take self
2014-09-30 21:26:19 -07:00
Cameron Zwarich
ccc5d976f7
Refine a lifetime parameter on TElement's get_local_name
2014-09-30 21:22:24 -07:00
Cameron Zwarich
e894499c17
Disambiguate methods without using trait objects
2014-09-30 21:22:24 -07:00
Cameron Zwarich
be9618d55b
Add a lifetime parameter to the ElementHelper trait
...
This refines the lifetime used in get_local_name / get_namespace and
makes it independent of the lifetime on the &self parameter.
2014-09-30 21:21:00 -07:00
Cameron Zwarich
4ef0f39c78
Remove a prefix from a method name by manually resolving methods
2014-09-30 21:21:00 -07:00
Cameron Zwarich
3953456b61
Convert a method from &JSRef to JSRef
...
This also removes the unnecessary formation of a trait object.
2014-09-30 15:55:05 -07:00
Keegan McAllister
d50114c41d
Use string-cache's Namespace type
2014-09-29 21:40:54 -07:00
Keegan McAllister
6429750b33
Eliminate servo_util::atom
...
We only needed this for Encodable, and now we use JSTraceable instead.
2014-09-29 18:39:36 -07:00
Bruno de Oliveira Abinader
4e6785f513
CSS selector :enabled no longer matches Anchor, Area & Link elements
...
HTML spec has been modified [1] to disable support for :enabled CSS
selector on Anchor, Area & Link elements, after discussion on W3C
Bugzilla [2].
[1] https://html5.org/r/8818
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26622
2014-09-29 13:06:03 -04:00
Simon Sapin
b3245fa407
Upgrade to rustc d2b30f7d3 2014-09-23
2014-09-29 17:41:45 +01:00
Ms2ger
e72b5613ee
Don't move the data when extracting the bytes in XMLHttpRequest::Send.
...
The data is used later to set the Content-Type header. Current rustc
(4d2af3861) does not detect this use-after-move, but treats the later use as
if the data was None. It will, however, detect the bug in d2b30f7d3, which we
are upgrading to.
2014-09-29 17:52:44 +02:00
Ms2ger
652a867800
Fix indentation in is_htmliframeelement.
2014-09-28 15:10:44 +02:00
bors-servo
42205675b3
Merge pull request #3508 from wenderen/JSTraceable.key
...
trace keys as well
Reviewed-by: Manishearth
2014-09-27 23:21:28 -06:00
Rohan Prinja
e50e704f5a
trace keys as well
2014-09-28 09:44:43 +05:30
bors-servo
c9c8d63727
Merge pull request #3501 from zwarich/telement-lifetimes
...
Remove the 'static lifetime parameters from TElement methods
Reviewed-by: jdm
2014-09-27 17:09:28 -06:00
bors-servo
1b5fac5bde
Merge pull request #3503 from Ms2ger/page-url
...
Simplify the Page URL handling in handle_resize_inactive_msg.
Reviewed-by: jdm
2014-09-27 13:39:27 -06:00
bors-servo
c10948736f
Merge pull request #3497 from zwarich/extended-deref
...
Add an extended_deref method to JSRef
Reviewed-by: Manishearth
2014-09-27 12:48:30 -06:00
Cameron Zwarich
b2a3519011
Remove the 'static lifetime parameters from TElement methods
...
This improves the static correctness of layout's use of DOM nodes.
Fixes #2595 .
2014-09-27 11:14:10 -07:00
Cameron Zwarich
61ae80e186
Add an extra lifetime parameter to TElement / TNode
...
This isn't used for anything yet, but it's easier to propagate this
change in a separate commit.
2014-09-27 11:14:10 -07:00
Ms2ger
a12f2b9f06
Simplify the Page URL handling in handle_resize_inactive_msg.
...
This also makes it more obvious what's actually happening.
2014-09-27 13:56:33 +02:00
bors-servo
a35212410a
Merge pull request #3496 from zwarich/disabled-state-helpers-jsref
...
Convert &JSRef -> JSRef in DisabledStateHelpers
Reviewed-by: jdm
2014-09-26 20:24:33 -06:00
bors-servo
86eec63a02
Merge pull request #3493 from zwarich/root-lifetimes
...
Improve the correctness of Root lifetimes
Reviewed-by: jdm
2014-09-26 19:57:33 -06:00
Cameron Zwarich
bad7915914
Make the DocumentHelpers trait use extended_deref
2014-09-26 18:38:58 -07:00
Cameron Zwarich
2789750f66
Make the AttrHelpers trait use extended_deref
2014-09-26 18:38:36 -07:00
Cameron Zwarich
8334942d0c
Add an extended_deref method to JSRef
...
The extended_deref method will take a JSRef<'a, T> and produce an &'a T,
in contrast to the standard deref method that takes an &'b JSRef<'a, T>
and produces an &'a T. This is useful when avoiding passing a JSRef by
reference.
2014-09-26 18:37:26 -07:00
bors-servo
39b6bd9b95
Merge pull request #3489 from ProgramFOX/issue2242-2
...
Made some DOM fields private.
Reviewed-by: jdm
2014-09-26 19:30:33 -06:00
bors-servo
1e5770a138
Merge pull request #3432 from gilles-leblanc/issue-3361
...
Handle dynamic addition of attributes
Reviewed-by: jdm
2014-09-26 19:00:35 -06:00
Gilles Leblanc
8e77422d8e
Handle dynamic addition of attributes
...
Handles dynamic addition of attributes to <link rel=stylesheet>
elements.
Fixes #3361
2014-09-26 19:04:32 -04:00
Cameron Zwarich
4bf2a88ae2
Convert &JSRef -> JSRef in DisabledStateHelpers
2014-09-26 15:58:36 -07:00
Cameron Zwarich
4f32d54fd8
Convert &JSRef -> JSRef for the PrivateNodeHelpers trait
2014-09-26 15:46:37 -07:00
Cameron Zwarich
78f061ee54
Improve the correctness of Root lifetimes
...
Use the new lifetime bounds feature of Rust to enforce that the
RootCollection field of Root outlives the jsref field. This still
doesn't enforce that the Root itself outlives the jsref field, and
doing this would require some sort of init dance.
2014-09-26 14:25:43 -07:00
ProgramFOX
71a05a9c39
Made some DOM fields private.
...
Relevant to #2242 .
2014-09-26 20:35:01 +02:00