Send information to script as part of finishing layout.

This avoids the need for multiple layout RPC operations immediately
following return of control to script. This means that layout and
script can continue to operate in parallel at this point, rather
than one potentially waiting on the shared mutex to be unlocked.
This commit is contained in:
Josh Matthews 2017-04-10 17:47:20 +10:00
parent c3b9714ab7
commit 9134918844
5 changed files with 60 additions and 51 deletions

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use PendingImage;
use app_units::Au;
use euclid::point::Point2D;
use euclid::rect::Rect;
@ -38,12 +37,8 @@ pub trait LayoutRPC {
fn offset_parent(&self) -> OffsetParentResponse;
/// Query layout for the resolve values of the margin properties for an element.
fn margin_style(&self) -> MarginStyleResponse;
/// Requests the list of not-yet-loaded images that were encountered in the last reflow.
fn pending_images(&self) -> Vec<PendingImage>;
/// Requests the list of nodes from the given point.
fn nodes_from_point_response(&self) -> Vec<UntrustedNodeAddress>;
/// Requests the list of nodes that have just started CSS transitions in the last reflow.
fn newly_transitioning_nodes(&self) -> Vec<UntrustedNodeAddress>;
fn text_index(&self) -> TextIndexResponse;
}