aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix Servo build.Emilio Cobos Álvarez2018-08-081-7/+10
|
* layout: script: Fix build.Emilio Cobos Álvarez2018-06-231-3/+3
|
* layout_thread: Don't parse internal properties in paint registration code.Emilio Cobos Álvarez2018-06-021-5/+7
|
* Auto merge of #20420 - pyfisch:corner-clipping, r=emiliobors-servo2018-04-291-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move DL items from gfx to layout and implement corner clipping Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, closes #19680, closes #19802 <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20420) <!-- Reviewable:end -->
| * Move DL items from gfx to layoutPyfisch2018-04-221-3/+2
| | | | | | | | | | | | | | | | | | Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, #19680, #19802
* | delegate resource reading to embedderPaul Rouget2018-04-271-9/+16
| |
* | fix time measurecsmoe2018-03-251-9/+20
| |
* | introduce layout query timestampcsmoe2018-03-181-1/+19
| |
* | extract querymsg from ReflowGoalmoe2018-03-171-104/+108
|/
* Auto merge of #20058 - Eijebong:rayon1.0, r=jdmbors-servo2018-02-271-5/+6
|\ | | | | | | | | | | | | | | Bump rayon to 1.0 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20058) <!-- Reviewable:end -->
| * Bump rayon to 1.0Bastien Orivel2018-02-241-5/+6
| |
* | Rebase and fix innerTextPyfisch2018-02-241-1/+1
| |
* | Introduce a dedicated data structure for text queriesPyfisch2018-02-241-5/+6
|/ | | | | | Add an IndexableText structure for text queries. Instead of linear search for a node this now uses a HashMap. Remove the now irrelevant fields from TextDisplayItem.
* Implement element.innerText getterFernando Jiménez Moreno2018-02-131-4/+12
|
* Update WR (various transform, hit-testing related fixes).Glenn Watson2018-02-081-1/+1
|
* Use LayoutRects for bounds and overflow in display listsPyfisch2018-02-071-2/+3
| | | | | Convert text runs to glyphs in display list builder. Remove ComplexClippingRegion and use the WebRender type.
* Update WebRenderMartin Robinson2018-02-061-18/+15
| | | | | | | | | This allows servo to use the ExternalScrollId API from WebRender fixing some issues related to duplicate scroll root ids. Fixes #17176. Fixes #19287. Fixes #19648.
* Auto merge of #19881 - jonleighton:issue-19811, r=emiliobors-servo2018-01-281-16/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add layout RPC query for getting an element's style This enables us to implement Element::has_css_layout_box() in a more direct way, and also enables us to remove some of the existing more specific queries. Fixes #19811. r? @emilio <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19881) <!-- Reviewable:end -->
| * Add layout RPC query for getting an element's styleJon Leighton2018-01-281-16/+8
| | | | | | | | | | | | | | | | This enables us to implement Element::has_css_layout_box() in a more direct way, and also enables us to remove some of the existing more specific queries. Fixes #19811.
* | style: Look at the snapshots when invalidating due to stylesheet changes.Emilio Cobos Álvarez2018-01-271-2/+2
|/ | | | | | | | | Otherwise removal of stylesheets may get out of sync with other DOM changes, and we may fail to invalidate the style of the affected elements. Bug: 1432850 Reviewed-by: bz MozReview-Commit-ID: DrMTgLzQcnk
* style: Derive debug for CascadeInputs.Emilio Cobos Álvarez2018-01-231-10/+15
| | | | It no longer has anything than rules.
* Replace NonZero<*{const,mut} _> with std::ptr::NonNullSimon Sapin2018-01-221-1/+0
|
* Update WR (minimal use of new transaction API).Glenn Watson2018-01-191-7/+8
|
* Introduce MaxRect traitPyfisch2018-01-171-2/+2
| | | | | It is implemented for LayoutRect and Rect<Au>. Replaces the max_rect() function from servo_geometry.
* Decoupled gfx and metricsGeorg Streich2018-01-151-1/+1
|
* Use the new WebRender conversion functions.Pyfisch2018-01-071-4/+9
| | | | Remove the old ones.
* Create own file for background calculations in layoutPyfisch2018-01-061-2/+1
| | | | | | | | | | Move display_list_builder.rs and webrender_helpers.rs along with the new file to components/layout/display_list/ Remove apparently unused IdType enum. Only variant used was OverflowClip. See #19676
* Paint worklets: Implement timeout for worklet painter threadsYati Sagade2017-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a paint worklet thread takes too long, we would like to move on, since we have a ~16ms budget for rendering @60fps. At the moment, there is no provision in the paintworklet spec to signal such timeouts to the developer. ajeffrey opened an [issue][1] for this, but it got punted to v2 of the spec. Hence we are silently timing out unresponsive paint scripts. The timeout value is chosen to be 10ms by default, and can be overridden by setting the `dom.worklet.timeout_ms` pref. In the absence of such a timeout, the reftest in this commit would fail by timing out the testrunner itself, since the paint script never returns. From my discussions with ajeffrey, this should do until we spec out a way to signal timeouts to the script developer. Since we did not have a better way to trigger a timeout than a busy waiting loop (which would hog one core of the test machine until the timeout was reached), we decided to implement a test only blocking sleep, available to the PaintWorkletGlobalScope. Since `dom.worklet.enabled` enables worklets in general, we also decided to have another pref `dom.worklet.blockingsleep.enabled`, which, in addition to `dom.worklet.enabled`, would be required for the blocking sleep to be available. This fixes #17370. [1]: https://github.com/w3c/css-houdini-drafts/issues/507
* Turn flow::base and friends into methodsMatt Brubeck2017-12-141-9/+9
|
* Update euclid, azure, skia, offscreen_gl_context, plane-split, webrenderSimon Sapin2017-12-081-4/+4
|
* style: Move property allowance tests to PropertyId::parse_into.Emilio Cobos Álvarez2017-11-211-1/+1
| | | | | | | | | | | It's not only more consistent (since we have a proper ParserContext there), but also fixes a bunch of bugs where Gecko accidentally exposes and allows setting internal state because of conversions from nsCSSPropertyID to PropertyId. This adds the extra complexity of caring about aliases for longer, but that's probably not a big deal in practice, since we also have PropertyDeclarationId. MozReview-Commit-ID: C2Js8PfloxQ
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-8/+10
|
* added time to interactive metrics, refactored metrics to use traitsddh2017-10-241-1/+1
| | | | changed task macro to take pipeline info
* Auto merge of #18968 - mbrubeck:try, r=emiliobors-servo2017-10-211-5/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Use try syntax for Option where appropriate - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are refactoring only <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18968) <!-- Reviewable:end -->
| * Use try syntax for Option where appropriateMatt Brubeck2017-10-201-5/+1
| |
* | Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-10/+8
|/ | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Auto merge of #18809 - Eijebong:bitflags, r=noxbors-servo2017-10-191-8/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update bitflags to 1.0 in every servo crate It still needs dependencies update to remove all the other bitflags versions. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because it's a dependency update <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18809) <!-- Reviewable:end -->
| * Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-8/+10
| | | | | | | | | | It still needs dependencies update to remove all the other bitflags versions.
* | Auto merge of #18944 - servo:jemallocator2, r=noxbors-servo2017-10-191-2/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Stop relying on linking details of std’s default allocator We’ve been bitten before by symbol names changing: https://github.com/servo/heapsize/pull/46, and upstream is planning to stop using jemalloc by default: https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465 So use the (relatively) new `#[global_allocator]` attribute to explicitly select the system allocator on Windows and jemalloc (now in an external crate) on other platforms. This choice matches current defaults. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18944) <!-- Reviewable:end -->
| * Stop relying on linking details of std’s default allocatorSimon Sapin2017-10-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | We’ve been bitten before by symbol names changing: https://github.com/servo/heapsize/pull/46 and upstream is planning to stop using jemalloc by default: https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465 So use the (relatively) new `#[global_allocator]` attribute to explicitly select the system allocator on Windows and jemalloc (now in an external crate) on other platforms. This choice matches current defaults.
* | Auto merge of #18933 - mrobinson:wr-text-index, r=jdmbors-servo2017-10-191-10/+11
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use WebRender to compute text index on click events This is the second half of switching over to WebRender for hit testing. Now that WebRender gives us the location of the hit tested point in the display item, we can use that to calculate text index. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they shouldn't change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18933) <!-- Reviewable:end -->
| * Use WebRender to compute text index on click eventsMartin Robinson2017-10-181-10/+11
| | | | | | | | | | | | This is the second half of switching over to WebRender for hit testing. Now that WebRender gives us the location of the hit tested point in the display item, we can use that to calculate text index.
* | Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-6/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Switch to using WebRender hit testingMartin Robinson2017-10-171-37/+34
| | | | | | | | This trades quite a bit of complicated code in Servo for few more messages and a significant performance improvement. In particular, WebRender can search the entire display list at once instead of ping-ponging down the pipeline tree. This allows us to send mouse events to the correct pipeline immediately.
* style: Refactor children handling.Emilio Cobos Álvarez2017-10-171-2/+2
| | | | | Moving traversal_children away from TNode I can make TNode trivial enough, in order to share a QuerySelector implementation between Servo and Gecko.
* Use wrappers in the nonzero crate so users don’t need unstable featuresSimon Sapin2017-10-131-1/+0
|
* Use NonZeroUsize in script_layout_interfaceSimon Sapin2017-10-131-2/+2
|
* Remove usage of unstable box syntax, except in the script crateSimon Sapin2017-10-121-3/+3
| | | | | … because there’s a lot of it, and script still uses any other unstable features anyway.
* layout_thread: Avoid adding the UA sheets multiple times when there's no ↵Emilio Cobos Álvarez2017-10-011-2/+1
| | | | | | root flow. Fixes #18631
* layout_thread: perform_post_main_layout_passes is always called with a root ↵Emilio Cobos Álvarez2017-10-011-16/+17
| | | | flow.