Shadow DOM, Pointer Lock and a new CSS Lexer

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

929 changes landed at Chromium’s repository last week, whereas WebKit’s received 626, totaling up to 1,555. Highlights include quite some progress on implementing the Shadow DOM and the Pointer Lock API.

Web Inspector’s Timeline Panel has been extended with three graphs, all hidden behind the Experimental Settings option, showing information about objects and events in the DOM. Hovering over a function in the Script Panel may now show an overlay with general information and it’s source-code and elements within iframes are selectable again.

The Flexible Box module implementation has been taught about distributed packing and now supports scrollbars for overflowing content, also taking the flex direction into account. Furthermore, floated pseudo-elements within table captions will now be positioned correctly.

In order to verify whether ES.next’s let keyword will be compatible with websites, Apple has reserved the word from normal usage in JavaScriptCore. Support for Uint8ClampedArray has landed for both V8 as JSC, values for the dropzone attribute will be normalized and various issues with radio-button groups have been fixed.

In terms of the Shadow DOM, registering of scoped stylesheets with the scoped element has been implemented and an initial version of the <content> element is now available as well. Following an API change and the actual interface, Vincent Scheib’ Pointer Lock API has made it into Chrome Canary as well.

Other changes which occurred last week:

And that’ll be all again, thanks for reading!

Read more (4 comments) »

Content Shell, Shadow DOM and Emulating Screen Sizes

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

Last week brought 563 new commits in WebKit’s repository and 709 new commits to Chromium’s, totalling up to 1,272 changes. Highlights include a content shell for Chromium and work on emulating screen sizes.

Chromium’s content shell for Linux-based systems was announced on the chromium-dev mailing list on Friday, sharing the news that it’s now usable for day-to-day WebKit development. It uses Chromium’s content module but leaves out other parts of the browser, so it’ll be significantly faster to compile and run.

For free-flow HTML editing in the Resources Panel of Web Inspector, revisions will now be tracked. Unsafe cross-origin requests will now show a stack trace in the console, making them easier to track down and content in iframes won’t appear to be in the same document anymore when using the DOM Viewer. Finally, a screen-size emulation back-end has been implemented, which will eventually allow you to emulate mobile device screens!


The -webkit-cross-fade will now report the intrinsic size of the background, fixing rendering when the background-size property is being used. Baseline grid alignment has been implemented, as have the text-overflow property for input fields and parsing for the custom() function of CSS Shaders. Painting background colors for regions has been re-enabled, and regions will now be exposed to the DOM.

WebKit’s Device Orientation implementation has been updated with the absolute property, which indicates whether the angles in the event are absolute. The abort() method for Application Cache has been added, as has a constructor for MediaStream accepting a collection of MediaStreamTracks. A window’s innerWidth and innerHeight properties won’t be affected by page scales anymore and drop and dragend events will now be issued for contentEditable elements.

Finally, the first significant patch in exposing the Shadow DOM to JavaScript has landed in WebKit! Minor as it is right now, it’ll pave the path to implementing the rest of the specification.

Other changes which occurred last week:

Finally, be sure to take a look at HTML5 Please, a new website sharing recommendations about which features of the Web Platform can be used today!

Read more (3 comments) »

Font CSS Properties, Selector Source Location and calc() Tests

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

Exactly 1,500 changes landed last week, 890 for Chromium and 610 for WebKit, bringing changes such as some usability updates in the CSS Profiler and new font-related CSS properties.

The experimental Sidebar Extension API has been removed from Chromium. The Downloads Extension API gained an getFileIcon method and now also works for POST-download requests, and Panels may now be resized and spawned without drawing attention using the chrome.windows API. chrome.experimental.dns made its entry.

Early steps in supporting IndexedDB in Web Inspector have been made and a “source” column has been added to the CSS Profiler, directly pointing out the offending CSS rule.
As part of an ongoing effort in WebKit, several failing tests on the IE Testcenter have been fixed. Among these are executing prepared scripts even when they’ve been removed from the DOM and sandboxed i-frames will now block the autofocus attribute if the sandbox flags request it.

WebKit now also supports getting the computed style for border-radius properties. Four compliance improvements have been made to JavaScriptCore, namely that defineOwnProperty is now available for arrays, changes around the length property for arrays, defineProperty and handling of colons in timezones. Finally, the navigator.startActivity method for Web Intents has been implemented, albeit behind a compile-time guard.

Following a specification change, the flex-align CSS property has been renamed to flex-item-align and a new version of flex-align has been implemented, and the implementation has been taught about handling absolutely positioned elements within flexboxes. Color matrix-based filters will now be done by Skia for Chromium, and the serpia tone filter has been aligned color-wise for Mac OS X. Text decorations won’t propagate to all descendants anymore and several more element types can now render outlines.

Two new CSS properties were implemented. The font-kerning property from the CSS Fonts specification will allow you to define kerning behavior, and the initial implementation of the font-variant-ligatures property will allow you to explicitly enable or disable OpenType’s common ligatures feature on a font.

Other changes which occurred last week:

Some interesting things currently going on include a Baidu contribution and basic grid alignment from the CSS Line Grid specification.

Read more (6 comments) »

Media Fragments, Performance and MediaElementAudioSourceNode

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

The new year’s first week ended calmly, bringing in 547 commits to WebKit and 650 to Chromium. Highlights include support for temporal dimensions for media files, alignment of Safari’s JavaScript engine with ES5 and lots of performance improvements.

Engadget, among other sites, has become significantly faster in WebKit, now using 10% less CPU over the entire page load due to analyzing inline stylesheet scopes. A CSS Selector using multiple indirect adjacency combinators won’t be able to be superlinear anymore, inserting nodes into the DOM has been sped up and several other tweaks were implemented.

Sanitization of non-parsable strings in date and time input boxes is now possible in WebKit, emptying the value if an invalid value has occurred. The </script>-close tag will now be properly highlighted in View Source, and horizontal paddings and borders will be used instead of vertical ones for a CSS table’s fixed width.

Safari’s JavaScript engine aligned its behavior closer to the ECMAScript specification. The JSON object is now configurable, the parseInt method won’t parse octal numbers anymore, ThrowTypeError is now a singleton and date parsing has been made more liberal. Alexis Menard implemented getComputedStyle output for the outline, border, list-style, border-image and background properties. Finally, the Web Audio API is now able to integrate with audio and video elements throught the MediaElementAudioSourceNode object!

Eric Carlson implemented the temporal dimension portion of the Media Fragments URI specification. This allows you to append a formatted hash-string to any media file’s URL selecting which portion of the file should be played. For example, this plays the fourth until the twelfth second: video.webm#t=4,12.

Other changes which occurred last week:

And that’ll be all for now! Lets get back on the Monday-track for updates starting next week!

Read more (9 comments) »

CSS Selector Profiler, Source Mapping and Software Rendering

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

Happy New Year! Since I didn’t publish an update last week, this one will cover all 680 WebKit and 986 Chromium commits made in the past two weeks. Highlights include a ton of Web Inspector changes, Jarred’s work on XMLHttpRequest and access to new JavaScript features through about:flags.

Besides support for true hardware acceleration, which pretty much is a requirement for features such as WebGL and CSS 3D Transforms, attention is also being given to software renderers. Several crashes for Apple’s OpenGL-software renderer have been fixed, and support for SwiftShader has been added for Windows installations, which will automatically be downloaded if support for GPU-based WebGL is blacklisted. While performance definitely won’t be en par with GPU-based WebGL, it’s a good solution for those on older systems.

The Web Inspector team landed some great new features, most notable of which is the CSS Selector Profiler. Available through the Profiles Panel in the Inspector, it will show the number of matches for a certain element and its contribution to the total style matching run-time. Two other new features, both displayed in the image below, are the ability to dock the Web Inspector to the right-side of the browser window (through the Settings window) and an experimental tabbed interface for the Script Panel.

New, experimental Web Inspector features will be hidden behind a command line flag and a setting. Tree views in side-bars cannot be collapsed anymore using the keyboard and subsequent @rule-statements in CSS will be highlighted. The ability to remove all breakpoints has been added, as has a cool Go To Function dialog. Finally, Web Inspector gained support for Source Mapping through the X-SourceMap HTTP header. When enabled (also through the Settings window), an Install Source Map context-menu item will be added to scripts in the Script Panel.

On Chromium’s side for Web Inspector, both the chrome.devtools and the chrome.debugger Extension APIs graduated from being experimental, so hopefully we’ll be seeing a lot of extensions starting with Chrome 18!

WebKit’s HTML5 parser has received a number of updates, which include support for the Noah’s Ark condition, 93 named entities which expand to more than a single character and some minor fixes related to NULL characters in HTML content. Video subtitles through the <track> element can now be rendered on a video, and subtitles will be enabled for WebKit-mac builds, meaning Safari. Finally, the dropzone attribute got aligned with the specification.

The XMLHttpRequest implementation has also been updated, which now compares the mime-types in a case insensitive way, gained support for the loadend event and allows more liberal modification of the withCredentials and responseType attributes. More excitingly, new response types (such as json) won’t support synchronous requests in a non-worker scope anymore. Two more init*Event methods have been removed, and retrieving the computed style of the border-style, border-color and margin properties has been implemented.

Default styling of the strong and b elements has been updated to be bold rather than bolder. CSS Filters may now be used on inline elements, the blur filter will now invalidate the entire element and animating brightness, contrast and drop-shadow filters won’t be reversed anymore, and two more issues with full CSS 2.1 support have been fixed.

Other changes which occurred during these weeks:

And that’s all again. Two bugs to keep an eye out for this week are updated patches for CSS calc()’s parsing and the beforeprint and afterprint events.

Read more (10 comments) »

Reversed Lists, Animatable Filters, CSS Shaders and secure SSL

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

Another 1,492 commits have been added to the projects; 826 to Chromium and an evil 666 to WebKit. Highlights include support for <ol reversed>, lots of changes for CSS Filters and rendering CSS Shaders.

Going forth in improving security in the browser, Chromium will now display a fatal error when it encounters pages using SSL certificates signed with the MD2 and MD4 hashing algorithms, and will display an interstitial warning page for certificates signed with MD5. Certificates with RSA and DSA keys of less than 1024 keys will also be rejected.

Within Web Inspector, a sidebar has been added to the Script Panel displaying the included scripts on by their host. A large amount of internal properties of objects using the Detailed Heap Snapshot tool have been hidden and hex-colors with just three characters will now be highlighted.

As for specification related updates, Adam Barth made sure that six recent changes to the HTML5 parsing algorithm reflect in WebKit’s implementation. Clickable controls such as form fields may now be used as a <detail> element summary and cancelRequestAnimationFrame has been renamed to cancelAnimationFrame. Numbered lists can now be reversed using the reverse-attribute and XMLHttpRequest.responseXML now supports HTML documents.

A large amount of work has been done on the CSS Filter implementation. Filters are now animatable, they will affect visual overflow and several filters will now accept percentages as values. Finally, the implementation has been aligned with the specification and they can now be hardware accelerated, with an implementation for Apple’s Safari. Filters are now enabled for Chromium, and despite the security concerns, rendering CSS Shaders is now possible in WebKit builds which have the feature enabled!

Other changes which occurred last week:

Since next Monday happens to be Boxing Day, I’ll publish a (probably brief) update the day after, Tuesday the 27th. Thank you for reading and have a Merry Christmas!

Read more (1 comment) »

Animatable Background Images, Mutation Observers and !important

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 18

With 912 commits at Chromium and 590 at WebKit, totaling up at 1,502 changes, a fair amount of changes have happened again. Highlights include Mutation Observers for Chromium and animatable background images.

Chromium has reached a version number which equals a pentagonal pyramidal number: 18. In total, 7,107 Chromium commits, 4,198 WebKit commits and 526 v8 commits are included, totaling up to 11,831 changes for the Google Chrome 17 release, besides changes in other related projects such as Skia and NaCL.

Mutation Observers have been enabled for Chromium, which provide a much better alternative to DOM Mutation Events. Though still disabled by default, Chromium has been taught how to handle meta viewport elements, the scoped attribute for scoped stylesheets landed, table cells now understand widths in percentages and security around loading out-of-band text tracks has been improved by utilizing CORS.

WebKit now supports animations between background, border and list images utilizing the cross-fade() function which landed a few weeks ago. Parsing for multiple grid rows and columns has been added, as has parsing for the wrap and wrap-reverse values for the flex-flow property.

As a first step in being able to CSS Regions, background colors will now be applied. The behavior of !important in inline style sets has been aligned with the specification, automatic color adjustments for disabled input elements has been removed for Chromium and various more CSS 2.1 test failures have been fixed.

Other changes which occurred last week:

And that’ll be all for last week again. Things to keep an eye out for this week include custom written CSS Lexer and work by Simon Fraser to make the CSS Filter property animatable!

Read more (1 comment) »

Reverse flexible rows and columns, Socket API and Panels

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 17

Following the relatively low count of 1,097 changes two weeks ago, last week introduced a combined total of 1,945 changes, 1,186 at Chromium and 759 at WebKit. While many of these changes were part of the rush for features to make it into Google Chrome 17 (which will be branched tomorrow), highlights include two important new features for the Flexbox implementation and a Socket API.

A few updates have been made to Chromium’s extension APIs, namely that the MHTML and webRequest APIs have been moved out of the experimental namespace, and a checkpoint commit for a new Socket API. While it’s not functional yet, it will eventually allow for extensions such as SSH and IRC clients to be made.

The visual appearance of Panels has been worked on quite a lot last week, with a visual refresh landing on Chromium for Mac OS X, together with a three-stage minimize animation. For Windows, the UI has been updated as well, and Panels can now also be drawn in iconified mode.

As for specification support, WebKit’s implementation of the bdo, bdi and output elements is now mostly aligned with the HTML5 specification. Limited parsing for the grid-columns and grid-rows properties has been implemented, CSS Filters will now render correctly on transformed elements and CSS Flexbox has been taught about reverse rows and columns. Images’ sources can be overwritten using the CSS content property now, and the correct focus rings for areas defined in an image’s image map will now be shown for zoomed pages.

The getMatchedCSSRules() method now knows how to handle pseudo-elements, SVG Gaussian blurs in a single dimension have been corrected, dragging the mouse out of :active elements will make it lose :hover as well and both range sliders and spin buttons have been fixed for usage in multiple columns.

To name a few improvements in accessibility support: multi-line selects on Windows will now expose the right states, tabs, menu and list items will receive mouse events and non-focusable nodes will no longer report to be focusable.

Other changes which occurred last week:

This week I expect Chromium to reach version 18, lots of additional BlackBerry upstreaming and more work on scoped stylesheets. That’ll be all again!

Read more (5 comments) »

GamePad API, revision 10,000 and WebGL for WebKitGTK

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 17

Thanksgiving made last week a short week for people living in the United States, and as such only 1,079 changes landed to the Chromium and WebKit repositories. Highlights include a number of extension API updates, work on supporting game controllers and WebGL for the WebKitGTK port.

Quite some housekeeping has been done in Chromium’s extension APIs: the clipboard API has been removed in favor of document.execCommand, the Settings API has been renamed to the Storage API and notifications were added for screen wake-ups and unlocks. Also new is the ability to change a window’s state.

In light of the recent commit milestones Chromium and WebKit hit, it’s noteworthy to add that v8 reached revision 10,000 last week. Performance of switches using string clauses has been improved and preliminary detection for ES.next’s extended mode has been added, which basically reflects strict mode with some added functionality.

Another two CSS 2.1 conformance errors were fixed, the CSS Exclusions implementation has been aligned with the specification and the wrap property will now be parsed. A crash with filters was fixed, and the first step towards being able to use CSS Transforms on SVG elements also landed last week.

WebKit’s side of supporting game controllers was landed by Scott Graham, together with the first part of the Chromium-side implementation. It may be tested using the --enable-gamepad command line flag, or via about:flags. The addCue and removeCue methods for subtitles are now supported, and the HTML5 dirname and Microdata properties attributes are now supported.

Other changes which occurred last week:

And that’s it again. Interesting changes for the upcoming week include the NamedFlow JavaScript interface for CSS Regions and stack traces for cross-origin access errors within Web Inspector.

Read more (3 comments) »

Cross Fading, CSS Flexible Box, Grid Layout, Filters and Meta Referrer

Published on in Google Chrome, Last Week, tech, WebKit. Version: Chrome 17

Last week was the busiest week so far for both projects, totaling up to 1,745 changes — 794 for WebKit, and 951 for Chromium. Highlights include CSS Cross Fading, Flexible Box, Filters and <meta name=referrer>.

Within Chromium, the new History UI has been launched and can be seen on chrome://history. Content Security Policy will be enabled for all extensions using a (newly introduced) manifest version of two or higher and improved download protection has now been enabled by default, assuming you have Safe Browsing enabled.

Right clicking on function values in Web Inspector will now give you the ability to browse to it’s definition. The font property in the styles pane will now show up as a proper shorthand property, selected items in context menus have been given a slight gradient and messages from the front-end to the back-end are now asynchronous.

Timothy Horton landed support for the CSS4 Images cross-fade() function. Though not fully implemented yet, it can be used as a value for any property that expects an image, such as background-image, and will render a cross faded combination of the two given images or gradients. Examples working in nightlies can be found here.

The new CSS3 Flexible Box implementation in WebKit has been enabled by default. While new features and enhancements are still incoming, it is a lot more performant and aligns WebKit better with the spec. Ojan, Tony and Julien have started working on implementing CSS Grid Layout, some patches for which have already landed.

Another new feature which landed today is support for <meta name=”referrer”>. By specifying the referrer policy in the content attribute, which can be one of never (don’t include a referrer header on navigation), always (which includes cross-protocol requests), origin (just send the page’s origin) and default, you can anonymize any request.

As for improved specification support, another CSS 2.1 test was fixed last week. The document.width and document.height properties have been removed, as has the initProgressEvent method, and access keys now work on all elements. JavaScriptCore’s implementation of Error.prototype.toString is now ES5 conformant, adding invalid track formats will throw an exception and the report-only mode for Content Security Policy has been fixed.

Most CSS Filters now work in WebKit nightlies, which includes grayscale, serpia, invert, hue rotating, saturating, opacity, gamma, drop shadow and blurring effects. Meanwhile, computed styles for CSS Shaders have been implemented as well. For CSS Exclusions, the wrap-margin, wrap-padding, wrap-flow and wrap-through properties are now being parsed, indicating good progress.

Other changes which occurred last week:

Work to keep an eye out for this week are related to Web Intents. That’ll be all!

Read more (7 comments) »