Simon Sapin
055a1c5cee
Update rust-selectors
...
Update for https://github.com/servo/rust-selectors/pull/37
2015-07-23 18:53:57 +02:00
Ms2ger
751a367eb9
Don't call type_id_for_layout directly in LayoutElement::is_link.
2015-07-22 18:29:38 +02:00
Ms2ger
9cc1e017ee
Move local_name and namespace to LayoutJS<Element>.
2015-07-22 18:28:17 +02:00
Ms2ger
23c679d55a
Implement style_attribute() on LayoutJS<Element>.
2015-07-22 17:27:23 +02:00
Corey Farwell
b1b03a32db
Upgrade rust-selectors, pass ':empty' tests
...
https://github.com/servo/rust-selectors/pull/36
2015-07-22 18:27:33 +07:00
Ms2ger
94e1d4d34c
Don't call mutate_layout_data in get_{before,after}_pseudo.
...
We don't mutate anything.
2015-07-21 22:58:16 +02:00
Ms2ger
093204a224
Replace get_{before,after}_display by get_{before,after}_pseudo.
2015-07-21 22:27:40 +02:00
Ms2ger
2e6a723970
Merge has_{before,after}_pseudo into get_{before,after}_display.
2015-07-21 22:27:38 +02:00
Ms2ger
cc356e58ae
Remove unused ThreadSafeLayoutNode::get_normal_display.
2015-07-21 22:27:36 +02:00
Ms2ger
930e111713
Scope ThreadSafeLayoutNode::first_child to ThreadSafeLayoutNodeChildrenIterator::new.
...
It is only used there.
2015-07-21 19:53:34 +02:00
Ms2ger
b3892b74f7
Simplify ThreadSafeLayoutNodeChildrenIterator::next().
2015-07-21 19:53:23 +02:00
Ms2ger
bb444df679
Remove unused ThreadSafeLayoutNode::traverse_postorder_mut.
2015-07-17 13:26:23 +02:00
Ms2ger
c018863201
Stop using Option in ThreadSafeLayoutNodeChildrenIterator::parent_node.
2015-07-17 11:41:57 +02:00
Ms2ger
3e2c44114c
Move the traversal traits into the traversal module.
2015-07-17 11:40:40 +02:00
Ms2ger
928f843392
Remove unused has_children method.
2015-07-10 19:34:04 +02:00
bors-servo
cc73aad447
Auto merge of #6546 - michaelwu:slim-layoutdatawrapper, r=Ms2ger
...
Remove LayoutChan from LayoutDataWrapper
Saves 32 bytes in Node.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6546 )
<!-- Reviewable:end -->
2015-07-05 21:39:12 -06:00
Ms2ger
58a7c81530
Store a LayoutJS<Element> in LayoutElement.
2015-07-04 17:38:42 +02:00
Michael Wu
1a014beb08
Remove LayoutChan from LayoutDataWrapper
2015-07-04 03:54:40 -04:00
Ms2ger
2f88b84e07
Remove *Cast::from_actual.
...
Since JSRef was removed, from_actual duplicates from_ref.
2015-07-04 12:55:01 +02:00
Simon Sapin
9e1a674b16
Update rust-selectors
2015-06-26 12:35:08 -07:00
Ms2ger
8375e0914a
Simplify ThreadSafeLayoutNodeChildrenIterator::next a bit.
2015-06-25 08:28:03 +02:00
Ms2ger
51d0f51dd9
Use a while let loop in ThreadSafeLayoutNode::traverse_postorder_mut.
2015-06-25 08:27:56 +02:00
Ms2ger
c87c7f1d84
Simplify ThreadSafeLayoutNode::text_content.
2015-06-25 08:27:53 +02:00
Ms2ger
e1cee995b7
Make {ThreadSafe,}LayoutNode::get_jsmanaged private.
...
There are no longer any callers outside wrapper.rs, and this makes it harder
to introduce buggy callers.
2015-06-24 15:14:19 +02:00
Ms2ger
2ea32829af
Replace OpaqueNodeMethods::from_{threadsafe_,}layout_node by opaque methods.
2015-06-24 14:55:43 +02:00
Ms2ger
a42e11a95f
Replace the LayoutDataAccess trait by inherent methods.
2015-06-22 11:34:31 +02:00
Ms2ger
167a396293
Replace TLayoutNode by inherent methods.
...
There is no reason for this trait to exist.
2015-06-22 11:04:43 +02:00
Ms2ger
50d4084e9a
Remove TLayoutNode::first_child.
...
It is replaced by the TNode implementation for LayoutNode and an inherent
implementation for ThreadSafeLayoutNode.
2015-06-22 11:04:41 +02:00
Ms2ger
dc167ca343
Implement type_id as inherent methods.
...
This implies LayoutNode no longer needs to return an Option, as it never
represents a pseudo-element.
Also, fixes lies in the documentation.
2015-06-22 10:47:52 +02:00
Ms2ger
f0034b4ac9
Remove some dead code from ThreadSafeLayoutNode::first_child.
...
self.pseudo is always PseudoElementType::Normal at this point.
2015-06-22 10:47:44 +02:00
Ms2ger
13a07a4ed2
Move some TLayoutNode methods to ThreadSafeLayoutNode.
...
They are unused on LayoutNode.
2015-06-22 10:47:38 +02:00
Ms2ger
8f58dafbd6
Inline node_is_element and node_is_document into their only callers.
2015-06-22 10:47:35 +02:00
Ms2ger
54b9dc6563
Inline LayoutNode::text_content into its only caller, ThreadSafeLayoutNode::text_content.
2015-06-22 10:47:31 +02:00
Ms2ger
1398616ec1
Remove incorrect claim from a comment.
2015-06-22 10:47:27 +02:00
Ms2ger
ae5191275a
Remove TLayoutNode::get.
...
It is highly unsafe and unused.
2015-06-22 10:47:23 +02:00
Ms2ger
eb2c508df0
Implement the LayoutData getters on LayoutJS<Node> rather than Node itself.
2015-06-22 10:47:21 +02:00
Simon Sapin
fc25397c91
Update rust-selectors
...
https://github.com/servo/rust-selectors/pull/30
2015-06-20 07:05:43 +02:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Corey Farwell
4f47b41fa7
Remove fnv & smallvec crate reexports from util
...
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.
These indirect dependencies through the util component are unnecessary.
This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
2015-06-10 07:14:55 -07:00
Corey Farwell
435e551753
Remove get_
prefix on getters
...
Part of #6224
I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
2015-06-02 08:54:44 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
ecoal95
3350522306
Layerize canvas
...
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.
Also see https://github.com/servo/servo/issues/6142
2015-05-20 19:10:50 +02:00
Ms2ger
52afa1dc34
Stop using get_unsigned_integer_attribute_for_layout in has_nonzero_border.
2015-05-12 13:03:15 +02:00
Ms2ger
8b0505930f
Move textarea cols/rows to the new infrastructure.
2015-05-12 09:14:42 +02:00
Ms2ger
f571a69b2e
Move table/td width to the new infrastructure.
2015-05-12 09:14:40 +02:00
Ms2ger
fa31d7d909
Replace TElement::get_link() by specific methods.
2015-05-11 10:52:58 +02:00
Ms2ger
34e35df986
Move get_attr and get_attrs into TElementAttributes.
...
These methods are only called on LayoutElement.
2015-05-10 18:26:06 +02:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00
Jinwoo Song
f404853c99
Make NodeTypeId include CharacterData variant
...
NodeTypeId is supposed to reflect the WebIDL inheritance hierarchy.
All of Text/ProcessingInstruction/Comment inherit from CharacterData,
which inherits from Node. There should be a CharacterDataTypeId value
that differentiates between those, instead.
2015-04-29 13:30:21 +09:00
Ms2ger
903305416a
Implement Clone for Copy types.
2015-04-28 23:31:10 +02:00