Patrick Walton
8f886e599e
layout: Stop exposing raw Element
types to layout as well.
...
This should make layout memory-safe as is, though we will need to do
more stuff for incremental reflow and parallelism.
2013-12-17 18:07:41 -08:00
Patrick Walton
9e2b63ddd3
layout: Move the LayoutNode
wrapper from script into layout.
2013-12-17 18:07:41 -08:00
Patrick Walton
c506e52c7c
layout: Add a lifetime to LayoutNode
to prevent layout from stuffing
...
them into evil places.
2013-12-17 18:07:41 -08:00
Patrick Walton
ee9873bdb5
script: Harden layout a bit more by mostly prohibiting it from seeing
...
`AbstractNode` at all.
It can still see it by calling `with_element` for now, although that
needs to be fixed.
2013-12-17 18:07:12 -08:00
Patrick Walton
be69a503fe
script: Eliminate the phantom type in favor of just whitelisting methods
...
that layout can safely call.
This is simpler. Currently, the set of methods is not safe, but I plan
to lock it down more soon.
2013-12-17 18:07:12 -08:00
Patrick Walton
199ca33b72
script: Make trees less generic
2013-12-17 13:46:14 -08:00
Bruno de Oliveira Abinader
cfb73ed123
Make Node::is_in_doc O(1)
...
Added a flags variable inside Node to represent boolean flags, with
is_in_doc being the first of them. It is updated whenever a node is
appended or removed from a parent.
This patch is for:
https://github.com/mozilla/servo/issues/1030
2013-12-17 16:32:43 -04:00
bors-servo
c5d81f13c1
auto merge of #1388 : hyunjunekim/servo/cssissues, r=kmcallister
...
Fixed this issue ( https://github.com/mozilla/rust/issues/10683 )
2013-12-13 15:40:13 -08:00
Patrick Walton
971f77d2c6
layout: Stop going to the DOM for iframe sizes
2013-12-13 15:10:04 -08:00
Patrick Walton
21e8c72a75
constellation: Stop using futures for frame sizes.
...
This will allow us to stop going to the DOM in order to handle iframe
sizing. Instead we can just store the pipeline and frame IDs of iframes
inside the flow tree itself.
2013-12-13 10:43:27 -08:00
Keegan McAllister
0238410b47
Allow setting id, class, style without a full reflow
...
Instead we do selector matching again, then diff the style structs to set the
"restyle damage" bits which are used to prune reflow traversals.
Also don't force a reflow when timers finish, because individual DOM methods
should already take care of that.
2013-12-12 14:43:26 -08:00
Keegan McAllister
93e10eaf20
Call Element::after_set_attr only for null namespace
2013-12-12 14:43:26 -08:00
Keegan McAllister
39fc9eb868
Get rid of reflow_all
...
This refactoring should not alter behavior.
2013-12-12 14:43:26 -08:00
Ms2ger
7f4283f4bc
Rename some 'new' functions to 'new_inherited'.
2013-12-12 14:34:58 +01:00
HyunJune Kim
cf537469b1
add FIX comments
2013-12-12 14:40:02 +09:00
HyunJune Kim
a7865495f6
Fixed this issue ( https://github.com/mozilla/rust/issues/10683 )
2013-12-12 13:14:37 +09:00
Patrick Walton
fc80be982a
Merge pull request #1368 from SimonSapin/master
...
Fix #1264 : support namespaced attribute selectors.
2013-12-11 09:16:47 -08:00
patrick kim
0026eb0899
remove @ in LayoutTask.FontContext
2013-12-11 11:42:14 +09:00
Simon Sapin
b290823f4d
Fix #1264 : support namespaced attribute selectors.
2013-12-10 17:53:12 +00:00
Patrick Walton
30bbaa49b7
Revert "auto merge of #1356 : ksh8281/servo/remove_@_in_LayoutTask.FontContext, r=pcwalton"
...
This reverts commit e8ffac13d7
, reversing
changes made to db923feffe
.
Reverting this change because FreeType is *not* thread safe. See the
documentation here:
http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html
"In multi-threaded applications, make sure that the same FT_Library
object or any of its children doesn't get accessed in parallel."
We will need to use a `MutexArc` instead.
2013-12-09 19:40:08 -08:00
patrick kim
f187035e25
remove @ in LayoutTask.FontContext
2013-12-10 08:59:43 +09:00
Simon Sapin
61c7f2f220
Change Namespace::to_str() to not allocate and return a reference.
2013-12-09 15:10:09 +00:00
Daniel Glazman
28575c20bf
add namespaces to elements
2013-12-09 15:55:51 +01:00
Ryan Choi
ecd44fe9a8
removing unnecessary to_owned
2013-12-06 17:50:26 +09:00
Ms2ger
29a7405b4e
Report exceptions to JS when the DOM implementation fails.
...
As a bonus, adds some debugging statements.
2013-12-05 16:14:02 +01:00
bors-servo
529c21bb65
auto merge of #1252 : jdm/servo/layoutassert, r=jdm,metajack
...
...224.
2013-12-02 16:32:32 -08:00
Josh Matthews
f9f9c42ab7
Ensure that it's safe to modify the DOM node pointers before doing so. Fixes #1224 .
2013-12-02 19:25:11 -05:00
june0cho
266b551aa4
Implement local bookmark(hashtag) for Acid2. With @joonwonlee
...
Support hashtag through link (e.g. <a href="#top">)
2013-12-01 00:36:11 +09:00
Keegan McAllister
5157eac238
Warning police
...
And fix some formatting.
2013-11-25 13:29:34 -08:00
bors-servo
f6646e17bf
auto merge of #1270 : evilpie/servo/url, r=jdm
...
I wasn't sure how to store @window in Location, so I just made it use @Page for now. I was going to implement stringifier, but sadly some of the webidl stuff is like 1 year out of sync.
2013-11-24 15:52:04 -08:00
Tom Schuster
f9433e357c
trace window.location and window.navigator
2013-11-24 23:11:11 +01:00
Tom Schuster
ccc7fa7be0
basic location
2013-11-24 22:40:24 +01:00
Tom Schuster
73e67568c1
Add FormData constructor
2013-11-24 22:37:28 +01:00
Tetsuharu OHZEKI
4e4eb10ffc
Use 'DOMString' to define the type insteand of '~str'.
...
At now, 'DOMString' is equal to '~str'.
155befe10d/src/components/script/dom/bindings/utils.rs (L119)
2013-11-23 22:24:52 +09:00
Tetsuharu OHZEKI
aa72c413ed
Enable to update id attribute for Document.getElementById(). ( #740 )
2013-11-23 11:53:45 +09:00
Tetsuharu OHZEKI
072ff20140
Use 'match' instead of 'if'.
2013-11-23 11:53:45 +09:00
Daniel Glazman
9b691611ff
Implement :root pseudo-class. Fix #1263 , fix #1265
2013-11-20 16:41:12 +00:00
Patrick Walton
155befe10d
Rewrite flow construction to be incrementalizable and parallelizable.
...
This replaces flow construction with a strict bottom-up tree traversal,
allowing for parallelism. Each step of the traversal creates a flow or
a `ConstructionItem`, similar to how Gecko works. {ib} splits are
handled by not creating `InlineFlow`s until the containing block is
reached.
This should be able to be incrementalized by storing the `Flow` from
layout to layout, and performing fixups during flow construction
and/or wiping containing blocks in a previous pass.
2013-11-18 11:24:11 -08:00
bors-servo
426d18ffb1
auto merge of #1219 : ksh8281/servo/impl_window_self, r=jdm
...
in order to Implement window.self
#868
2013-11-17 19:19:24 -08:00
Ms2ger
dc6dbc63af
Make the HTML parser parse into the document rather than an element.
...
This removes the duplicate html element.
2013-11-17 13:58:24 +01:00
bors-servo
800c2b3c0f
auto merge of #1267 : evilpie/servo/blob, r=jdm
...
I was going to add the Constructor overload, but that requires implementing that fallthrough case in CGCase, which I didn't feel like doing. At least we can compile the dict now.
2013-11-16 14:43:20 -08:00
Tom Schuster
586dd6aed6
Add some more Blob methods/types
2013-11-15 17:56:11 +01:00
bors-servo
8880419a76
auto merge of #1250 : Ms2ger/servo/event-new, r=jdm
2013-11-15 07:34:25 -08:00
Ms2ger
d4a48995a2
Remove type_id arguments from Event::new and UIEvent::new.
2013-11-14 21:10:23 +01:00
Ms2ger
871d2f796c
Remove an unused lifetime parameter from Element::get_attribute.
2013-11-14 19:49:36 +01:00
Tetsuharu OHZEKI
f5ef4365f4
Stop passing DOMStrings via borrowed pointer. ( #1201 )
2013-11-14 20:35:36 +09:00
sh8281.kim
853bcba0d1
fix indent & name
2013-11-14 13:44:02 +09:00
bors-servo
82dd9b5699
auto merge of #1251 : Ms2ger/servo/attr-localname, r=kmcallister
2013-11-13 19:22:39 -08:00
Ms2ger
d57c3a8149
Make Attr::local_name always initialized.
2013-11-13 20:38:51 +01:00
Ms2ger
591de8cff5
Cleanup attribute setting functions a bit.
2013-11-13 17:38:08 +01:00