aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Include padding in ascent reported for <img>David Winslow2015-07-061-1/+1
| | | | fixes #6452
* Replace OpaqueNodeMethods::from_{threadsafe_,}layout_node by opaque methods.Ms2ger2015-06-241-6/+3
|
* Replace the LayoutDataAccess trait by inherent methods.Ms2ger2015-06-221-1/+1
|
* Implement type_id as inherent methods.Ms2ger2015-06-221-1/+1
| | | | | | | This implies LayoutNode no longer needs to return an Option, as it never represents a pseudo-element. Also, fixes lies in the documentation.
* Make LOCAL_CONTEXT_KEY safe and non-leaky.Nicholas Nethercote2015-06-041-3/+3
| | | | | | | | | | | | | | | | `LOCAL_CONTEXT_KEY` is currently a `Cell<*mut LocalLayoutContext>`. The use of the raw pointer means that the `LocalLayoutContext` is not dropped when the thread dies; this leaks FreeType instances and probably other things. There are also some unsafe getter functions in `LayoutContext` (`font_context`, `applicable_declarations_cache` and `style_sharing_candidate_cache`) that @eddyb says involve undefined behaviour. This changeset changes `LOCAL_CONTEXT_KEY` to `RefCell<Option<Rc<LocalLayoutContext>>>`. This fixes the leak and also results in safe getters. (Fixes #6282.)
* Remove `get_` prefix on gettersCorey Farwell2015-06-021-9/+8
| | | | | | Part of #6224 I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-1/+2
| | | | Part of https://github.com/servo/servo/issues/6041
* script: Implement the `width` and `height` attributes for iframes perPatrick Walton2015-05-201-2/+2
| | | | | | HTML5 § 4.8.6. Improves Amazon and Ars Technica.
* layout: Support inline incremental reflow, and stop reconstructing allPatrick Walton2015-05-191-13/+37
| | | | | | | flows when mousing over the document. This exposes more "jumpiness" on sites like Hacker News, but the bug that causes it was pre-existing.
* layout: Minor whitespace and formatting cleanups.Patrick Walton2015-05-131-1/+3
|
* gfx: Print out stacking context info when dumping display lists.Patrick Walton2015-05-131-1/+1
|
* layout: Allow inline elements to be containing blocks forPatrick Walton2015-05-131-87/+159
| | | | | | | | | | absolutely-positioned elements. This also implements a little bit of the infrastructure needed to support for fragmentation via support for multiple positioned fragments in one flow. Improves Google.
* layout: Implement inline margins.Patrick Walton2015-05-071-7/+12
| | | | | | | | | Improves the Google SERPs. We mark `html/rendering/replaced-elements/images/space.html` as failing. This test tested whether `<img hspace>` and inline margins do the same thing. Since this was trivially the case before (since we implemented neither) and now is not, this test now fails.
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-2/+1
|
* layout: Fix a couple of issues relating to intrinsic widths of inlinePatrick Walton2015-05-011-1/+1
| | | | | | | | | | | | blocks. * Stop double-counting border and padding for inline-block fragments. (Test case: `inline_block_border_intrinsic_size_a.html`.) * Take clearance into account when determining intrinsic widths of blocks containing floats. Improves the Amazon headers.
* Various fixes to getClientBoundingRect()Glenn Watson2015-05-011-7/+9
| | | | | | | | | * Fix queries involving stacking contexts * The code was double accumulating stacking context origins. * Handle queries of inline elements. * The node addresses being compared were incorrect (CharacterData vs. Span) * Handle ScriptQuery reflows correctly. * The layout task was skipping the compute absolute positions traversal, so failed before window.onload.
* Make NodeTypeId include CharacterData variantJinwoo Song2015-04-291-8/+7
| | | | | | | 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.
* Refactor flow construction to make `float` less of a special case.Simon Sapin2015-04-291-43/+19
|
* Add MulticolFlow and use it for multicol elements.Simon Sapin2015-04-291-2/+7
| | | | It currently "inherits" from BlockFlow and does not override anything.
* layout: Generate anonymous table objects as necessary per CSS 2.1 §Patrick Walton2015-04-271-3/+40
| | | | | | 17.2.1. Improves Facebook Timeline.
* Refactored image cache task - details below.Glenn Watson2015-04-231-23/+12
| | | | | | | | | | | | | | | | | | | | * Simpler image cache API for clients to use. * Significantly fewer threads. * One thread for image cache task (multiplexes commands, decoder threads and async resource requests). * 4 threads for decoder worker tasks. * Removed ReflowEvent hacks in script and layout tasks. * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe. * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow. * Add reflow batching for when multiple images load quickly. * Reduces the number of paints loading wikipedia from ~95 to ~35. * Reasonably simple to add proper prefetch support in a follow up PR. * Async loaded images always construct Image fragments now, instead of generic. * Image fragments support the image not being present. * Simpler implementation of synchronous image loading for reftests. * Removed image holder. * image.onload support. * image NaturalWidth and NaturalHeight support. * Updated WPT expectations.
* layout: Lay out nested inline elements with different `vertical-align`Patrick Walton2015-04-091-7/+4
| | | | | | | values properly in simple cases. This allows things like `<sup><span>Foo</span></sup>` to work and improves Wikipedia.
* Stop using u/i suffixes in layout.Ms2ger2015-04-021-2/+2
|
* layout: Stop rebuilding all inline-block flows unconditionally, andPatrick Walton2015-04-011-2/+27
| | | | | bubble intrinsic inline sizes as necessary when doing incremental reflow.
* Use usize for debug ids.Ms2ger2015-03-281-1/+1
|
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-1/+1
|
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-21/+21
|
* Restore part of PR #5125 that was accidentally removed in PR #5160.Glenn Watson2015-03-161-21/+23
|
* layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1Patrick Walton2015-03-091-145/+181
| | | | | | | | | | | | | | § 12.3-12.5. Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases.
* Get rid of servo_utilDan Fox2015-03-051-1/+1
|
* Merge in servo/masterDan Fox2015-03-051-29/+38
|\
| * Remove compositor layers when iframes are removed from doc or display:none.Glenn Watson2015-03-041-29/+38
| |
* | layout/layout_data.rs -> layout/data.rsDan Fox2015-03-031-1/+1
| |
* | Re-alphabetise importsDan Fox2015-03-031-10/+10
| |
* | Rename util.rs -> layout_data.rsDan Fox2015-03-031-1/+1
| |
* | Extract OpaqueNodeMethods to own fileDan Fox2015-03-031-1/+2
|/
* auto merge of #5086 : glennw/servo/reap-more-stuff, r=jdmbors-servo2015-03-021-0/+7
|\ | | | | | | | | | | Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts. Clear the layout data when a node becomes display:none.
| * Reap layout data whenever a node is removed from the tree.Glenn Watson2015-03-031-0/+7
| | | | | | | | | | | | Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts. Clear the layout data when a node becomes display:none.
* | Remove interior borders during flow constructionBryan Bell2015-02-271-6/+9
|/ | | | | | Instead of looking at the boundaries of the text run, set the border width to zero and the border style to none on border sides that are not the outermost for a node container that is display: inline.
* Fix setting display:none after a layout where the element was visible.Glenn Watson2015-02-271-1/+2
| | | | | | | | Prior to incremental layout, the code would remove the existing construction result. However, with incremental layout the construction result is cloned rather than removed. This change ensures that the previous construction result is cleared when an element's display type changes to none.
* Upgrade to rustc ba2f13ef0 2015-02-04Simon Sapin2015-02-111-2/+2
|
* End the libstyle 'pub use' madness.Simon Sapin2015-01-301-2/+2
|
* Add layout support and tests for inline iframes. Fixes #1697.Glenn Watson2015-01-291-0/+1
|
* layout: Implement floated list items.Patrick Walton2015-01-281-7/+19
| | | | | | | This patch also makes Servo not crash when `generated_containing_block_rect()` is called on a list item (as, for example, GitHub does), and for good measure I added the fix to other flows as well.
* layout: Implement `text-overflow: ellipsis` per CSS-UI-3 § 6.2.Patrick Walton2015-01-281-1/+2
| | | | Only the one-value syntax is supported for now.
* Don't shadow lifetimes in layout.Ms2ger2015-01-281-2/+2
|
* self importManish Goregaokar2015-01-281-2/+2
|
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-5/+5
|
* Stop calling deref() and deref_mut() explicitly.Ms2ger2015-01-221-5/+5
|
* Use std::sync::atomic::Ordering explicitly.Ms2ger2015-01-221-2/+2
|