aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/text.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move util::range into its own crateJonathan Schuster2016-02-251-1/+1
|
* Move util::logical_geometry to styleAnthony Ramine2016-02-181-1/+1
|
* Prefer `is_empty` over `len` when option is available.Corey Farwell2016-01-291-1/+1
|
* layout/text.rs: Add assertion for empty fontgroupOlaf Buddenhagen2016-01-141-0/+2
|
* Fix a bunch of clippy lintsJohannes Linke2016-01-021-8/+5
|
* Extend whitespace::T with additional helper methodsKeith Yeung2015-11-201-2/+2
|
* display input caret for textarea. fixes #7758Florian Merz2015-10-211-1/+11
|
* Add support for `pre-wrap` and `pre-line` values for `white-space`.Eli Friedman2015-10-201-15/+13
| | | | | | | This is mostly straightforward. I had to modify a couple of places which were accidentally discarding whitespace. Fixes #1513.
* Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+1
|
* Fix text-transform:capitalize across text runsMatt Brubeck2015-09-291-5/+8
|
* Break text runs by unicode scriptMatt Brubeck2015-09-291-1/+32
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-2/+1
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* layout: Query and maintain the position of the insertion pointPatrick Walton2015-09-171-7/+38
| | | | throughout layout for input elements.
* Remove 'get_*' on getters as per RFC 0344 on various componentsMathieu Rheaume2015-09-121-2/+2
|
* layout: Fix several bugs relating to inline borders, padding, andPatrick Walton2015-09-031-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | margins. * The code that attempted to strip out borders that span multiple fragments in the same element could go wrong if fragments were stripped out due to text clumping or whitespace stripping. This patch rewrites that code to maintain flags in the inline fragment context specifying whether the node is the beginning or end of the element. Not only is this easier to maintain, it's closer in spirit to what roc originally suggested two years ago: it's isomorphic to "begin element, end element" markers for inline layout. * Padding and margins for spans containing inline-blocks are now properly handled via a division of labor between the `InlineBlock` fragment and the `BlockFlow` that represents the inline-block. * Unscanned text fragments may not be joined together into a text run if borders, padding, or margins separate them. Because Servo now matches the rendering of Gecko and WebKit on the `input_button_margins_a` reftest, I had to modify it to add some vertical alignment. The combined effect of all of these fixes places "Advertising" on the right place on google.com.
* Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01)Simon Sapin2015-09-021-1/+1
|
* Correctly handle length-changing mappings in text-transformAnthony Ramine2015-08-191-6/+7
|
* layout: Rewrite whitespace stripping.Patrick Walton2015-08-111-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes Servo unconditionally strip whitespace before text run scanning (assuming that the `white-space` property allows it). Whitespace stripping during reflow is now only used for handling whitespace at the ends of lines; reflow now never attempts to handle ignorable whitespace. Many CSS tests pass now. There are some new failures, however. The following reference tests now fail due to a pre-existing bug whereby whitespace is used to calculate the position of inline hypothetical boxes for elements with `display: inline; position: absolute`: * `absolute-replaced-height-036.htm` * `vertical-align-sub-001.htm` * `vertical-align-super-001.htm` The following reference tests fail due to a pre-existing bug whereby we don't handle `font-size: 0` properly in inline reflow: * `font-size-zero-1.htm` * `font-size-zero-2.htm` The following reference test fails due to the fact that it relied on our incorrect insertion of whitespace to make room for the black background: * `inline-formatting-context-007.htm`
* Rollup merge of #7015 - mbrubeck:arc-box, r=Ms2gerMatt Brubeck2015-08-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Replace Arc<Box<TextRun>> with Arc<TextRun> Removes an extraneous level of indirection. r? @pcwalton <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7015) <!-- Reviewable:end -->
| * Replace Arc<Box<TextRun>> with Arc<TextRun>Matt Brubeck2015-08-051-1/+1
| |
* | Use Box<str> instead of Box<String> for UnscannedTextFragmentInfoMatt Brubeck2015-08-051-2/+2
|/ | | | | | | This removes an extraneous layer of indirection, without increasing the size of the `SpecificFragmentInfo` enum (because `Box<str>` is a fat pointer, which is the same size as the `FlowRef` trait object that is already stored in `InlineAbsoluteHypotheticalFragmentInfo`)
* Implement getComputedStyleDavid Zbarsky2015-07-291-2/+2
|
* Basic support for bidirectional textMatt Brubeck2015-07-231-36/+94
|
* Slice TextRuns by byte range instead of char rangeMatt Brubeck2015-06-231-7/+13
| | | | Fixes #6431
* layout: Implement per-glyph font fallback.Patrick Walton2015-05-221-108/+247
| | | | | | This improves numerous pages, for example Wikipedia and Ars Technica. Closes #177.
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-7/+7
|
* layout: Use a flag to record whether we need to perform a line break ifPatrick Walton2015-04-241-4/+13
| | | | | | | | | | wrapping on newlines rather than searching for a newline character. Since the newline character might have been stripped out during whitespace stripping, this was incorrect. Fixes the "jumpiness" seen on the Google home page, Wikipedia, and many other places.
* Remove some as_slice calls.Ms2ger2015-04-241-1/+1
|
* layout: Simplify and improve the correctness of whitespace stripping inPatrick Walton2015-04-081-21/+57
| | | | | | | | | text layout, and unify the inline layout paths for pre- and normally-formatted text. This fixes a lot of "jumpiness" and removes the `new_line_pos` stuff. Closes #2260.
* Use isize for CharIndex.Ms2ger2015-04-021-2/+2
|
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-1/+1
|
* Rename dlist to linked_list.Matt Brubeck2015-03-181-3/+3
|
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-10/+12
|
* Get rid of servo_utilDan Fox2015-03-051-5/+5
|
* Make dlist::split use new DList::split_off.Matt Brubeck2015-02-121-2/+2
|
* Upgrade to rustc ba2f13ef0 2015-02-04Simon Sapin2015-02-111-2/+2
|
* End the libstyle 'pub use' madness.Simon Sapin2015-01-301-2/+2
|
* layout: Implement `text-overflow: ellipsis` per CSS-UI-3 § 6.2.Patrick Walton2015-01-281-5/+7
| | | | Only the one-value syntax is supported for now.
* self importManish Goregaokar2015-01-281-1/+1
|
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-2/+2
|
* Use chars().count() rather than char_len().Ms2ger2015-01-221-2/+2
| | | | The latter is obsolete in current Rust.
* layout: Implement `mix-blend-mode` per COMPOSITING § 3.4.1.Patrick Walton2015-01-121-2/+6
| | | | | `background-blend-mode` is not yet supported because we don't support multiple backgrounds yet.
* layout: Implement `text-rendering` per SVG 1.1 § 11.7.4.Patrick Walton2015-01-081-7/+16
| | | | | Like Gecko, we treat `geometricprecision` the same as `optimizelegibility` for now.
* Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.Ms2ger2015-01-081-14/+14
|
* Fix obsolete format traits.Ms2ger2015-01-021-1/+1
| | | | They are to be removed from the language in the next rust upgrade.
* Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.Ms2ger2014-12-171-4/+4
|
* layout: Implement `word-spacing` per CSS 2.1 § 16.4.Patrick Walton2014-12-121-2/+6
| | | | | | | This assumes that there are no ligatures that span across multiple words. Since we have a per-word shape cache, this is a safe assumption as of now. I have left comments to ensure that, if and when this is revisted, we make sure to handle it properly.
* gfx: Implement `letter-spacing` per CSS 2.1 § 16.4.Patrick Walton2014-12-121-2/+20
| | | | | | | | | | The ligature disabling code has been manually verified, but I was unable to reftest it. (The only way I could think of would be to create an Ahem-like font with a ligature table, but that would be an awful lot of work.) Near as I can tell, the method used to apply the spacing (manually inserting extra advance post-shaping) matches Gecko.
* Fix spelling mistakes in comments.Joseph Crail2014-12-111-1/+1
|