Bobby Holley
e55a56d757
Add an is_text_node to LayoutNode, so that we don't need to implement type_id for the style system.
2015-12-23 12:05:25 -07:00
GauriGNaik
fc81276c8e
Add pipeline information to CSS error reporting.
2015-12-14 11:18:30 -05:00
Bobby Holley
77a8091996
Generalize css/matching.rs to operate on generic Layout*.
2015-11-28 18:01:02 -08:00
GauriGNaik
996e9e06b2
Defined new trait ParseErrorReporter and added error_reporter member to ParserContext
2015-11-25 18:28:30 -05:00
Alan Jeffrey
3dec6edd10
Update string_cache to 0.2.
...
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Patrick Walton
e881f0feeb
Write animated values into the ComputedValues
structures when
...
animations complete or are interrupted.
This adds a new pair of reader-writer locks. I measured the performance
of style recalculation on Wikipedia and the overhead of the locks was
not measurable.
Closes #7816 .
2015-11-24 19:50:52 -06:00
Bobby Holley
2f6e94943a
Rename Layout*Trait to Layout*.
...
The next step will be to remote the Servo-specificity of the layout code we want
to share by making it operate generically on Layout*.
2015-11-18 17:24:36 -08:00
Bobby Holley
9dd45b9f2a
Prefix concrete types with 'Servo'.
2015-11-18 17:23:46 -08:00
Bobby Holley
54f2700ba6
Hoist exported wrapper functionality into a family of traits.
...
All the existing code still uses the concrete implementations, so this
shouldn't impact the generated code at all.
2015-11-18 17:23:29 -08:00
Ms2ger
5ec1cdea9b
Remove dead code from layout.
2015-11-18 15:00:58 +01:00
Ms2ger
8fc75704c9
Wrap SharedLayoutContext::new_animations_sender in a Mutex.
2015-11-07 11:23:47 +01:00
bors-servo
36c5dd4c8c
Auto merge of #8299 - pcwalton:dont-reflow-on-hover, r=mbrubeck
...
Fix several bugs causing the page to reflow on every mouse move event
After all these changes are applied, Hacker News and GitHub only repaint and reflow nodes that actually have hover styles applied when the mouse moves over them.
r? @mbrubeck
cc @bholley
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8299 )
<!-- Reviewable:end -->
2015-11-04 06:28:46 +05:30
Patrick Walton
3ae5f04bd1
layout: Store viewport and screen size separately.
...
Fixes a bug whereby all nodes would get unconditionally reflowed on
every layout event if the page set a viewport.
2015-11-03 13:12:45 -08:00
rohan.prinja
9fd823e449
replace InheritTypes imports with inheritance imports
2015-10-30 20:26:30 +09:00
Ms2ger
843629b29f
Remove the unused boolean in StyleSharingResult::CannotShare.
2015-10-19 15:01:30 +02:00
Ms2ger
f3faaa6b01
Define share_style_if_possible on LayoutElement.
2015-10-19 15:01:29 +02:00
Ms2ger
604601f1f4
Return the result from match_element rather than using an outparam.
2015-10-19 15:01:27 +02:00
Ms2ger
5c7dc4c633
Define match_node on LayoutElement as match_element.
2015-10-19 15:01:26 +02:00
Ms2ger
a9f75b7c4f
Define share_style_with_candidate_if_possible on LayoutElement.
2015-10-19 14:59:18 +02:00
Ms2ger
e5df6fa753
Improve code flow in share_style_if_possible.
2015-10-19 14:59:17 +02:00
Anthony Ramine
aab2c40389
Generate the TypeId enums in codegen
2015-10-14 18:45:35 +02:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
bors-servo
be9a9ffda1
Auto merge of #7523 - eefriedman:unnecessary-unsafe, r=SimonSapin
...
Fix up some unnecessary uses of `unsafe`.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7523 )
<!-- Reviewable:end -->
2015-09-09 00:05:17 -06:00
Manish Goregaokar
8e2c37a542
Fix match_refs and let_returns in layout, address review changes
2015-09-04 18:30:46 +05:30
Manish Goregaokar
e94df1ed5c
Remove needless returns
2015-09-04 09:13:48 +05:30
Manish Goregaokar
54c036cd66
Elide most 'a lifetimes
2015-09-04 08:55:51 +05:30
Eli Friedman
94dec69247
Fix up some unnecessary uses of unsafe
.
2015-09-02 15:50:17 -07:00
bors-servo
3424e234c8
Auto merge of #7499 - nerith:style, r=metajack
...
Improve style nit check for space after a comma
Fixes #7345 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7499 )
<!-- Reviewable:end -->
2015-09-02 12:05:58 -06:00
Simon Sapin
40b4348824
Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01)
2015-09-02 09:22:17 +02:00
Brandon Fairchild
d61a6e2161
Fix reported test-tidy errors
...
This fixes lines that were reported to have missing
space after a comma.
2015-09-01 16:30:42 -04:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Josh Matthews
8bb853f643
Fix existing syntactics nits.
2015-08-16 10:30:43 -04:00
João Oliveira
0038580abf
Replace uses of for foo in bar.iter()
and for foo in bar.iter_mut()
...
closes #7197
2015-08-15 02:27:39 +01:00
João Oliveira
9c11781880
replace .len() == 0 with is_empty()
...
closes #7198
2015-08-14 04:00:33 +01:00
Patrick Walton
7349b6ac28
layout: Tie transitions to the DOM node and finish them instantly when
...
new styles are set.
Tying transitions to the DOM node avoids quadratic complexity when
updating them.
Finishing transitions instantly when styles are updated makes our
behavior more correct.
2015-08-01 23:01:43 -07:00
Ms2ger
3984e39011
Replace the StyledNode trait with inherent methods.
2015-07-27 19:57:33 +02:00
Ms2ger
760f5c70c5
Remove unused StyledNode::has_style method.
2015-07-27 15:57:26 +02:00
Simon Sapin
055a1c5cee
Update rust-selectors
...
Update for https://github.com/servo/rust-selectors/pull/37
2015-07-23 18:53:57 +02:00
Bogdan Cuza
681b11c08b
Fix #6680
2015-07-22 16:45:43 +03:00
Ms2ger
46b36242a3
Use Ref::map to make ThreadSafeLayoutNode::style safe.
2015-07-17 14:51:58 +02:00
Simon Sapin
9e1a674b16
Update rust-selectors
2015-06-26 12:35:08 -07: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
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
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
Patrick Walton
72f031e2a1
layout: Support inline incremental reflow, and stop reconstructing all
...
flows when mousing over the document.
This exposes more "jumpiness" on sites like Hacker News, but the bug
that causes it was pre-existing.
2015-05-19 11:08:27 -07:00
Ms2ger
fa31d7d909
Replace TElement::get_link() by specific methods.
2015-05-11 10:52:58 +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