Bobby Holley
513a75d86a
Hoist the rest of css/matching.rs into style/.
2016-01-04 09:41:31 -08:00
Bobby Holley
27987c3bb4
Introduce a concept of restyle damage to the style system.
...
We can't hoist RestyleDamage itself, because it's very layout-dependent. But this
should be enough to let us hoist the things we need.
2016-01-04 09:38:04 -08:00
bors-servo
1b0053f8b1
Auto merge of #9136 - frewsxcv:htmlbodyelement-background, r=nox
...
HTMLBodyElement 'background' attribute improvements
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9136 )
<!-- Reviewable:end -->
2016-01-03 11:00:49 +05:30
bors-servo
9da739acef
Auto merge of #9123 - karyon:clippy_cleanup, r=Manishearth
...
Fix a bunch of clippy lints
This fixes about 130 clippy lints. Let me know if i should split up the commit.
I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)
There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.
cc @Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9123 )
<!-- Reviewable:end -->
2016-01-03 09:16:34 +05:30
bors-servo
ebf4ce8288
Auto merge of #9070 - antrik:debug-fonts, r=nox
...
Derive Debug for more font-related types
Needs to pull in newer ipc-channel and azure.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9070 )
<!-- Reviewable:end -->
2016-01-03 08:11:57 +05:30
Olaf Buddenhagen
3c5a3ca4ff
Derive Debug for more font-related types
2016-01-03 02:54:55 +01:00
Corey Farwell
1a808219a8
Remove parsed attribute 'background' field on HTMLBodyElement
...
https://github.com/servo/servo/issues/7863
2016-01-02 16:54:38 -08:00
Johannes Linke
6b215f38ee
Fix a bunch of clippy lints
2016-01-02 23:27:15 +01:00
bors-servo
3791447de8
Auto merge of #9090 - Ms2ger:stylesheets-vec, r=SimonSapin
...
Don't copy the list of stylesheets in LayoutTask::handle_reflow.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9090 )
<!-- Reviewable:end -->
2015-12-31 21:50:22 +05:30
bors-servo
66c8aa8cda
Auto merge of #8420 - craftytrickster:8371/generic-font-family, r=glennw
...
Enabled use of FontFamily enum type
https://github.com/servo/servo/issues/8371
In addition to replacing loose strings with the FontFamily enum in `font_cache_task.rs`, I also centralized the add_generic_font calls into one single function. If centralizing into one function is not desired or if anything else needs to be changed, please let me know.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8420 )
<!-- Reviewable:end -->
2015-12-31 16:49:48 +05:30
David Raifaizen
d942bfb474
Enabled use of FontFamily enum type and replaced plain string parameters with enum
2015-12-30 18:21:37 -05:00
Ms2ger
828392b41c
Don't copy the list of stylesheets in LayoutTask::handle_reflow.
...
It would be nice to avoid exposing the fact that these are stored in an Arc
to the selector matching code.
2015-12-30 15:13:08 +01:00
Ms2ger
2fa45aa064
Deny unsafe code in style.
2015-12-30 14:46:35 +01:00
bors-servo
3f407ea3d6
Auto merge of #9077 - bholley:split_layout_context_etc, r=SimonSapin
...
Split the style-related bits out of LayoutContext and hoist more stuff into style/
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9077 )
<!-- Reviewable:end -->
2015-12-30 11:01:23 +05:30
bors-servo
0f5c614609
Auto merge of #9051 - bholley:split_style_and_layout_wrappers, r=SimonSapin
...
Split layout wrappers into style+layout and layout-only functionality
This is a step towards removing the dependency of stylo on layout/.
This PR depends on #9004 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9051 )
<!-- Reviewable:end -->
2015-12-30 10:04:14 +05:30
Bobby Holley
a05d7f1dfd
Hoist style-related context bits into style/.
...
We do a few things-here:
* Hoist non-layout-dependent fields in SharedLayoutData and LocalLayoutData into style/.
* Hoist parts of css/matching.rs into style/.
* Hoist parts of layout/animation.rs into style/animation.rs.
* Remove the duplicated-but-slightly-different definition of OpaqueNode.
2015-12-29 12:07:07 -08:00
Bobby Holley
47059d2d26
Separate style+layout and layout-specific wrapper functionality.
...
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.
There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
Corey Farwell
ba659cb99c
Implement non-zero dimension attribute parsing
...
Fixes #8445
The only attributes I found that we have implemented that uses non-zero
dimenion attributes:
* `width` for `<td>` and `<th>` (table cells)
* `width` for `<table>`
I updated these implementations to use the new non-zero dimension
attribute parsing and added associated regression tests.
2015-12-24 13:20:43 -08:00
Mathieu Agopian
11234f5370
Use Url.join instead of UrlParser.base_url(...).parse ( #9002 )
2015-12-18 17:02:41 +01:00
Patrick Walton
74d5170dda
style: Stop cloning error reporters all the time during cascading, and
...
outline the custom property handler into a slow path.
2015-12-14 13:57:01 -08:00
Patrick Walton
eb3e93af0b
style: Mark trivial CalcLengthOrPercentage
accessors as inline.
...
These were showing up all over profiles in layout.
2015-12-14 13:19:40 -08:00
GauriGNaik
fc81276c8e
Add pipeline information to CSS error reporting.
2015-12-14 11:18:30 -05:00
Tetsuharu OHZEKI
e8c12c1c6d
Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all
2015-12-10 16:49:29 -05:00
Simon Sapin
b19cc7e44c
Fix warnings
...
Fixing unused attributes warnings required updating serde_macros
which required updating to rustc 1.6.0-nightly (a2866e387 2015-11-30)
which required updating some other dependencies.
2015-12-03 17:05:26 +01:00
bors-servo
765ce074a3
Auto merge of #8784 - jdm:expose-css-errors-step2, r=jdm
...
Make log_css_error in parser.rs take a &ParserContext argument and ca…
…ll this method.
Rebase of #8472 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8784 )
<!-- Reviewable:end -->
2015-12-03 14:24:37 +05:30
bors-servo
8b95d7b8d8
Auto merge of #8757 - servo:skia, r=mbrubeck
...
Use skia and deps from crates.io.
This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687 .
Fix https://github.com/servo/skia/issues/70
This builds, but the at the moment causes a number of tidy errors for duplicated crates.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757 )
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Sam Gibson
9668500e97
Makes setting negative values to maxLength throw an IndexSize exception
2015-12-03 14:00:59 +11:00
Sam Gibson
d26c555e2a
Adds support for input element's maxlength attr
...
servo/servo#7320
servo/servo#7004
2015-12-03 14:00:51 +11:00
GauriGNaik
afdc60fa57
Make log_css_error in parser.rs take a &ParserContext argument and call this method
2015-12-02 16:03:04 -05:00
Simon Sapin
aa1eba4f5a
Use skia and deps from crates.io.
...
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
bors-servo
dbff1ab336
Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
...
Ensure crate are alphabetically sorted
cc @nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692 )
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
Guillaume Gomez
6e7de62b38
Add check up on extern crate order and sort extern crates alphabetically
2015-11-28 03:11:08 +01:00
Manish Goregaokar
dc0e467945
Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
...
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05: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
bors-servo
6449cd09eb
Auto merge of #8542 - KiChjang:style-whitespace-methods, r=SimonSapin
...
Extend whitespace::T with additional helper methods
Fixes #8128 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8542 )
<!-- Reviewable:end -->
2015-11-23 23:39:07 +05:30
bors-servo
e3eee5a41b
Auto merge of #8597 - r0e:testing, r=Manishearth
...
Fix for #8593 'loop..match' should be 'while let'
As per #8593 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8597 )
<!-- Reviewable:end -->
2015-11-23 08:18:20 +05:30
bors-servo
ea690a2dff
Auto merge of #8622 - frewsxcv:url-plugin, r=SimonSapin
...
Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136
https://github.com/servo/rust-url/pull/137
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8622 )
<!-- Reviewable:end -->
2015-11-21 21:10:52 +05:30
Corey Farwell
f34da4120d
Implement 'url!(..)' macro
...
https://github.com/servo/rust-url/issues/136
https://github.com/servo/rust-url/pull/137
2015-11-21 08:15:56 -05:00
bors-servo
c19b01c2f4
Auto merge of #8559 - glennw:transform-layers, r=pcwalton
...
Include transform changes in list that cause incremental reflows.
Also ensure that 3d translations get layers.
Fixes #8329 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8559 )
<!-- Reviewable:end -->
2015-11-21 02:28:18 +05:30
Keith Yeung
7de7cb4786
Extend whitespace::T with additional helper methods
2015-11-20 11:05:36 -08:00
r0e
99acd46c48
Fix for #8593 'loop..match' should be 'while let'
...
changed line 641 of constellation.rs to while let
added while let at line 1201 in constellation.rs
added while let to line 1199 in block.rs
2015-11-19 21:48:45 -08:00
Glenn Watson
f555e3861c
Include transform changes in list that cause incremental reflows.
...
Also ensure that 3d translations get layers.
Fixes #8329 .
2015-11-18 10:28:37 +10:00
Brandon Fairchild
7f75a881a4
Make Stylesheet::is_effective_for_device more idiomatic
2015-11-17 17:02:01 -05:00
Ms2ger
f2be9eb735
Move the from_declaration to its only caller and remove the empty legacy module.
2015-11-15 13:57:22 +01:00
Ms2ger
1154cf51c8
Inline PresentationalHintSynthesis::synthesize_presentational_hints_for_legacy_attributes.
2015-11-15 13:46:55 +01:00
Ms2ger
9c1d678b1b
Remove get_unsigned_integer_attribute.
2015-11-15 11:24:03 +01:00
Alan Jeffrey
84bde75b42
Replaced DOMString constructor by conversion functions.
...
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Bobby Holley
7fa7936657
Implement attribute restyle hints.
...
Fixes #6942 .
2015-11-10 11:57:24 -08:00
Bobby Holley
c9704992a9
Factor the name-related fields of Attr into a struct and move it to style.
2015-11-09 21:40:22 -08:00