Building the Web of Tomorrow

A Case Study

About Me

Software engineer on the Web Engine team at Adobe

bear_travis / betravis

About You

Regions

css regions diagram
http://html.adobe.com/webstandards/cssregions/
article {
    flow-into: article_flow;
}
#region1, #region2,
#region3, #region4 {
    flow-from: article_flow;
}

Exclusions

css exclusions diagram
http://html.adobe.com/webstandards/cssexclusions/
.circle {
  wrap-flow: end;
  shape-outside: circle(50%, 50%, 50%);
  shape-margin: 10px;
  shape-inside: shape-outside;
  shape-padding: 10px;
}

Regions and Exclusions

illuminated manuscript example
http://www.historyhappenshere.org/node/6840
magazine layout example
http://www.flickr.com/photos/alexanderwolf/2452809327/

Regions Demo

A Princess of Mars

Exclusions Demo

A Princess of Mars

Before they were standards

http://www.alistapart.com/articles/sandbags

Let's make it a standard

  1. Agreed upon behavior
  2. Consistent browser implementations

The Goal: A W3C Recommendation

  1. Feature specification
  2. Two different browser implementations
  3. Test suite

Getting the ball rolling

Step 1: Idea

A complex layout may have several areas that are chained: when the first one fills up, the rest of the text flows to the second, etc. For example, a newspaper often has one small column of a story on the front page, and then the rest on other pages.
W3C List of Suggested Extensions to CSS - Dec 10, 1998

Step 2: Exploration

  1. Well-defined problem
  2. Web-appropriate solution
  3. Vendor interest

Step 3: Proposal

  1. Draft specification
  2. Functional prototype

Step 4: Acceptance as Working Draft

The Evolving Specification

Working Draft

Candidate Recommendation

Recommendation

Specification Implementation

Shape Inside Overflow

Overflow Proposals

Regions OM

interface Region {
    readonly attribute DOMString regionOverset
        throws DOMException;
    readonly attribute DOMString flowFrom
        throws DOMException;
    sequence<Range>? getRegionFlowRanges()
        throws DOMException;
    CSSStyleDeclaration getComputedStyle(Element elt);
    CSSStyleDeclaration getComputedStyle(Element elt, 
        DOMString pseudoElt);
};
Element implements Region;
var element = document.getElementById("region1");
try {
    /* handle region cases */
    switch(element.regionOverset) {
        case "overset":
        case "fit":
        case "empty": break;
    }
} catch (err) {
    /* handle non-region case */
}
var element = document.getElementById("region1");
/* handle all cases */
switch(element.regionOverset) {
    case "overset":
    case "fit":
    case "empty":
    default: break;
}
var element = document.createElementById("div");
for (var property in element) {
    console.log(property + ":" + element[property]);
}

Regions OM (Updated)

interface Region {
    readonly attribute DOMString regionOverset
        throws DOMException;
    readonly attribute DOMString flowFrom
        throws DOMException;
    sequence<Range>? getRegionFlowRanges()
        throws DOMException;
    CSSStyleDeclaration getComputedStyle(Element elt);
    CSSStyleDeclaration getComputedStyle(Element elt, 
        DOMString pseudoElt);
};
Element implements Region;

W3C Recommendation Requirements

  1. Feature specification
  2. Two different browser implementations
  3. Test suite

Contributing to WebKit, Made Easy

Step 1: Get the code

webkit icon
http://www.webkit.org

Step 2: File a bug

shape inside bug
https://bugs.webkit.org/

Step 3: Build and test a fix

xcode development

Step 3: Upload a patch

shape inside patch

Step 4: Solicit feedback

shape inside review

#webkit on irc.freenode.net | webkit-dev@lists.webkit.org

Lessons Learned

  • Patch reviews take time
  • Make patches small and modular
  • Respect your reviewer's time & feedback

New Feature Rollout

Source Code

Nightly Builds

Experimental Channel

Stable Channel

Standards, Browsers & You

When will they be ready for me to use?

How ready do you need them to be?

  • Regions in Chrome/IE
  • Exclusions in Chrome/IE
  • Regions polyfill coming soon!

Get Involved

  • Build cool stuff
  • Grab an experimental build
    ( CR | FF | IE | O | S )
  • Test drive a new feature
  • Read & comment on a specification
    ( W3C | WhatWG | Ecma )
  • Join the conversation

The End

bear_travis