Version 3 (modified by, 9 years ago) (diff)


Five Year Plan

A collection of thoughts about where we want to take WebKit over the next five years.

DOM Event Loop

High Level:This task would create a DOM event loop construct to be used in WebKit C++ code to provide HTML specification. Lower level: we would use platform run loop representations (ranging from CFRunLoop, to bare threads, to other platform primitives).

  • Benefit:
    1. Fix lots of bugs because we enqueue events in one order, but they get fired in some other order.
    2. Would potentially help address our lack of micro-task abstraction.
  • Potential problems:
    1. May be difficult to get right.
    2. Need to understand how this will interact with platform run loop

Render Tree Refcounting

Goal is to manage repaint complexity by moving to a refcount model for the Render Tree. The existing tree of nodes with back-pointers is very difficult to reason about.

  • Possibly treat render tree as immutable after layout. Use this read-only tree to answer questions about current layout.
  • Downside:
    1. Potential for ref cycles.
    2. Slightly larger memory use (additional count)
    3. Potential cost of copying the trees.
  • Benefits:
    1. Allow layout and painting logic to be split, perhaps run on separate threads.
    2. Allow us to get rid of some back pointers.
    3. Allow hit testing or other "read only" operations to be done on the read-only tree.
    4. Allow web code to query geometry and other questions without triggering layout.

Painting: Display Lists

Goal is to move drawing off of the main thread. See separate topic.

Image Decoding

We hear from Facebook and others that they want to achieve 60 fps, and find that image decoding is a major bottleneck.

  • Perhaps have a heuristic that if an image is large, we eagerly decode?
  • Can we break up rendering across multiple frames and allow partially-decoded images to be displayed as retrieved?
  • Could sites use progressive JPEGs?
  • Would like a way to opt-in to doing the image decoding on a background thread?
  • Perhaps a new <img> property that says "decode on background thread", and perhaps a way to be notified when decoding is complete.

Layout State Machine


  • Renaming.

Text Measurement


  • Downstream
  • Incremental


  • Text measurement