Ms2ger
c2e8916168
Move LowercaseString near its only consumer.
2016-06-06 08:54:35 +02:00
Ms2ger
06a1d04ca6
Move LengthOrPercentageOrAuto to style::attr.
2016-06-06 08:54:34 +02:00
Ms2ger
2767133ff3
Move c_str_to_string to its only consumer.
2016-06-05 12:31:52 +02:00
Keith Yeung
c93ed39f33
Parse HTMLInputElement attributes
2016-05-24 10:12:18 -04:00
Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Matt Brubeck
aa8e214e34
Use num_traits in util
2016-05-17 17:05:18 -07:00
Matt Brubeck
659305fe0a
Use byte indices instead of char indices for text runs
...
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking. This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
Keith Yeung
48b2e9c055
Add parsing of double values in style attributes
2016-04-25 01:09:30 -04:00
zakorgyula
95bebb9945
Remove extra definition of WHITESPACE under components/util/str.rs
2016-04-20 10:40:57 +02:00
Corey Farwell
5efbf0fa8f
Move util::str::parse_length
into 'style' component.
...
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
2016-03-24 10:45:33 -04:00
Anthony Ramine
0adfb08089
Implement From<DOMString> for Atom
2016-02-24 17:52:17 +01:00
zakorgyula
43d527fcc8
Move parse_integer and parse_unsigned_integer from util::str to style::attr
2016-02-17 07:05:39 +01:00
Jayflux
d169d7bd9e
refactor, moving functions into attr and htmlfontelemend fixes #9639 #9638
2016-02-15 22:33:14 +00:00
Peter
f374e8f420
#9640 Refactor: Move util::str::is_token to script::dom::bindings::str
2016-02-14 22:47:52 +00:00
Anthony Ramine
cb5cd8d881
Say farewell to in-tree HeapSizeOf
2016-02-04 22:03:32 +01:00
jmr0
3846cf52f2
fix websocket header validation, ensure it meets token requirements, add
...
testing
2016-01-24 18:31:21 -05:00
St.Spyder
763b99258f
Update XHR BodyInit, update extract method impl
2016-01-18 02:26:13 +05:30
Bobby Holley
dec296ddbc
Use features to prevent the util component from entraining the world in GeckoLib builds.
2016-01-11 19:38:43 -08:00
Johannes Linke
6b215f38ee
Fix a bunch of clippy lints
2016-01-02 23:27:15 +01: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
Patrick Walton
1c130819ca
compositing: Split Servo up into multiple sandboxed processes.
...
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
Corey Farwell
30ea772939
Make util::str::parse_length work with floats
2015-11-14 16:47:10 -05:00
rohan.prinja
337066063a
fix impl of parse_length()
2015-11-14 10:02:26 -05:00
Alan Jeffrey
0da1623788
Made DOMString opaque.
...
Removed the "pub" attribute from the String field of DOMString.
This enables experimenting with other string representations.
2015-11-12 17:53:01 -06:00
Alan Jeffrey
5db67b5981
Added in-place mutation to DOMString.
...
The methods which are currently implemented are the ones on String that are currently being used:
string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
2015-11-12 17:53:01 -06:00
Alan Jeffrey
c8af5b68fa
Made DOMString implement !Send.
...
This change makes DOMStrings only accessible from the main JS thread.
2015-11-12 17:52:59 -06:00
Alan Jeffrey
9cbc4393eb
Added conversion functions between DOMString and String.
...
Implemented From<String> and From<&str> for DOMString,
and From<DOMString> for String.
2015-11-12 17:51:18 -06:00
bors-servo
1720595a85
Auto merge of #8479 - frewsxcv:domstring-default, r=Ms2ger
...
Implement Default trait for DOMString
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8479 )
<!-- Reviewable:end -->
2015-11-13 04:51:32 +05:30
Ms2ger
6d2ae85c1f
Use the conversion traits from js.
2015-11-12 10:48:58 +01:00
Corey Farwell
00fa3b2f85
Implement Default trait for DOMString
2015-11-11 22:12:56 -05:00
Corey Farwell
73314ab10c
Add Dimension member to AttrValue
...
Fixes #8417
2015-11-09 20:32:56 -05:00
Ms2ger
6b75078503
Make DOMString a newtype around String, rather than a typedef.
...
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
Florian Merz
80e8a674e2
display input caret for textarea. fixes #7758
2015-10-21 22:38:23 +02:00
Eli Friedman
fa606bf1c8
Link to the HTML multipage spec, not the single-page one.
2015-10-13 11:48:51 -07:00
Corey Farwell
20beaf5af3
Fix issues found by rust-clippy
2015-10-12 20:21:49 -04:00
Corey Farwell
74e4c4fdc7
Implement size
attribute for <font> element
2015-09-30 22:51:30 -04:00
Corey Farwell
ea5e4e3ad0
Make util::str::str_join consistent with SliceConcatExt::join
...
Prior to this commit, `str_join` would skip empty items at the start of
the `Iterator` until it found a non-empty item. This contradicts
`SliceConcatExt::join` which doesn't skip anything.
Brought up in:
https://github.com/servo/servo/pull/7776#issuecomment-144317281
2015-09-30 19:23:18 -04:00
Glenn Watson
339a3f869b
Split Au type into separate crate, with minimal dependencies.
2015-10-01 07:16:11 +10:00
Corey Farwell
2857e547be
Make util::str::str_join operate on Iterators
2015-09-28 19:45:01 -04: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
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
João Oliveira
9c11781880
replace .len() == 0 with is_empty()
...
closes #7198
2015-08-14 04:00:33 +01:00
Jack Moffitt
dae1a398a4
Use local slice_chars
...
StrExt::slice_chars is deprecated and will be removed in Rust. This
lifts the implementation from Rust libstd and puts it in util::str.
This fixes a bunch of deprecation warnings in Servo.
2015-07-31 12:23:13 -06:00
Corey Farwell
7159fe749f
Create and utilize utility for joining strs
2015-07-08 05:18:07 +09:00
Ms2ger
5149f0e953
Remove null_str_as_empty and null_str_as_empty_ref functions.
...
With just one caller between the two functions, there doesn't seem to be
much point in having the abstraction.
2015-06-10 13:36:51 +02:00
Patrick Walton
1a3395e077
script: Implement the width
and height
attributes for iframes per
...
HTML5 § 4.8.6.
Improves Amazon and Ars Technica.
2015-05-20 11:15:25 -07:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00
Ms2ger
903305416a
Implement Clone for Copy types.
2015-04-28 23:31:10 +02:00
Ms2ger
6a55ae06d7
Remove some as_slice calls.
2015-04-24 17:44:47 +02:00