Archive for April, 2011

Spring Loaded Tabs, improved border rendering and the Web Request API

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

Averaging about 180 commits per day in the last month, this week’s commit count of 1,447 pushes the limit once again. Highlights include lots of border-rendering fixes, the WebRequest Extension API in Chromium, progress on Content Security Policy and lots of Web Inspector updates.

The WebRequest Extension API in Chromium, which can be used to intercept, block or modify requests as they’re being made, has been given five new implementations by Dominic Battre during last week: onRequestSent, onResponseStarted, onBeforeRedirectonErrorOccurred and the onCompleted callbacks.

One project I should give more attention to is v8, the JavaScript engine used in Chromium, especially as some interesting developments have become apparent recently. Support for Float64Arrays has been added and work on EcmaScript’s Internationalization APIs continues with a partial implementation of the Collator. Did you know Chromium already exposes a Locale object as window.v8Locale?

Besides that, the first steps towards adding Harmony Proxies have been made by exposing an experimental Proxy object, which can be enabled by running Chromium with –js-flags=”–harmony_proxies”. Do keep in mind that the implementation currently only exposes an empty, thus void, Proxy object.

It has been a busy week for the Web Inspector team again. A “Save As…” option has been added to several menus and, following some refactoring, detailed heap snapshot processing has been moved to a Web Worker. In the Resources panel, resources will now be grouped by their type, a go-to line dialog has been implemented and using tabs in the live editor won’t move away focus anymore. Finally, de-obfuscate has been renamed to Pretty Print and the metrics pane received some functional updates, as well as a small bug fix.

WebKit’s implementation of the Content Security Policy draft received quite some improvements again. Policy violations will be logged to Web Inspector’s console, support for the frame-src directive has been added and the report-uri directive has been implemented, which will send a violation report to a chosen URL, albeit slightly different from the current draft specification. Finally, the policy definition syntax has been updated.

As for specification support, the disabled property of link elements handling stylesheets now matches the HTML5 specification. The error-event for <script> elements won’t bubble anymore and form control elements’ label property will allow custom attributes to be set.

WebKit’s border rendering now sucks less, as Simon Fraser puts it. He fixed several bugs by refactoring a lot of code and implementing optimizations for common cases, among which are overlapping semi-transparent borders, anti-aliasing for borders on transformed elements and rounded border rendering for different border styles, which has been improved. Background color leakage has been fixed, as has gradient leaking.

Other changes which occurred last week:

  • The LevelDB wrappers landed and will be compiled in for Android WebKit.
  • Incremental decoding for the WebP image format has been added.
  • The requestFileSystem method from the FileSystem API has been prefixed.
  • Folders may now be dragged to file inputs with the webkitdirectory attribute.
  • New resources have been added for Chromium OS’ profile photo displays.
  • The auto-fill menu for Chromium got its appearance tweaked.
  • Support for the feDropShadow SVG Filter has been added by Dirk Schulze!
  • JavaScriptCore has started work towards using a General Visitor GC pattern.
  • Feature defines have been added that allow ports to disable <details> and <summary>.
  • Multiple profiles in Chromium can now be enabled in about:flags, although it’s not really functional yet.
  • Print preview will now show a message if the PDF plugin is not available.
  • Better omnibox history matching is now available through Chromium’s about:flags page.
  • A first part of enabling multiple tab selection on Mac OS X systems has been committed.
  • The HSTS list can now be controlled through a command line switch as well.
  • Shortcuts to Google Chrome Canary no longer mention the word “Build” in their name.
  • Support for Spring Loaded Tabs has been added to Chromium!

Given the large amount of command line switches in Chromium, work is being done to move them to different files. This causes the command line overview to be incomplete right now, which I plan to fix this week :)

Read more (2 comments) »

Web Audio API, script de-obfuscation, an updated UI and the contentSettings API

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

The Chromium and WebKit teams checked in a grand total of 1,496 changesets over the past 168 hours. Highlights include the availability for the Web Audio API on all platforms, script de-obfuscation in Web Inspector and a slightly updated user interface for Chrome 12.

Following the availability of the Web Audio API on Mac OS X, Kenneth Russell flipped the switch for branded Windows builds, after which Chris Rogers landed a patch making it work on Linux. If you’re on Windows, get yourself a Chrome Canary build, launch it with the “–enable-webaudio” flag and check out some examples! The commit has been reverted, but work is on its way to get the API back in.

The Web Inspector team has made some great commits again. Firstly, obfuscated source-code (such as a minimized jQuery) may now be cleaned up in the Script Panel by right-clicking on the content and selecting the de-obfuscate option. Undo and redo has been implemented for the text editor, accidentally switching panels during live editing using certain shortcuts has been fixed and the resources panel can now display raw HTTP-headers. Finally, early steps have been taken to move the Detailed Heap Snapshots processing into workers.

One of the problems the prefetch relation for <link>-elements has, is that the linked file will be loaded in WebKit at a very low priority. In order to offer authors a way to preload resources which will be used on the current page, Gavin Peters has implemented the “subresource” relation.

As for specification compliance, a regression related to the ACID3 test has been fixed meaning that it will render pixel-perfect again. The Blob’s slice method has been renamed to Blob.webkitSlice, while also having its semantics change to mimic Array.slice. Simon Fraser has begun with improving WebKit’s border mechanisms, initially by improving the logic used to compute the inner radii on curved borders. Stay tuned..

WebKit’s Content-Security-Policy is now aware of the “self” source and will block string arguments to setTimeout and setInterval unless the “eval-script” option has been set, as they would evaluate the string internally. It is now also possible to define what sources media elements can load from, using the media-src directive.

Other changes which occurred last week:

  • Following the skeleton and the WebKit define-switch, compiling the LevelDB back-end for IndexedDB has been enabled for Chromium.
  • The SH4 JIT for JavaScriptCore has been both finished and enabled by default for Qt!
  • WebKit2 now supports searching text within PDF documents using the default Find in Page.
  • Composition propagation has been implemented for object-elements and framesets.
  • ArrayBuffer responses for XMLHttpRequest in Safari on Windows have been enabled.
  • Good news for WebKit reviewers with an iPad: the review tool is now compatible.
  • A bunch of new icons have been committed for Chrome 12′s user interface, being a bit more gray.
  • The SVG lighting filters have been sped up four times for ARM-processors.
  • Speech input has been disabled for readonly and disabled form input fields.
  • Chromium’s compositor will now tile larger (>512 pixels) content and image layers.
  • A unified Quota API will now be exposed from WebKit if it’s built in a certain way.
  • The Qt port has implemented mime-snifing based on Adam Barth’s IETF proposal.
  • A flag has been added so development of a Page Visibility API in WebKit can begin.
  • The experiment with moving the caret by word in visual order received two follow-ups.
  • Chrome’s text anti-aliasing has been fixed when text renders with a shadow.
  • The enableReferrers and enableHyperlinkAuditing options have been added to a new contentSettings extension API for Chromium. Looks promising.
  • A user interface has been added to control Virtual Private Networks in Chromium OS.
  • The Print to PDF dialog for Chrome’s Print Preview feature will now suggest a filename.

And that’ll be all again!

Read more (5 comments) »

Ruby overhang, HTML5 track element and a full-screen button

Published on in Browser Vendors, Google Chrome, Last Week, tech, WebKit. Version: Chrome 12

The 630 commits at WebKit and 707 commits at Chromium add up to a total of 1,337 commits. And I’m not even kidding. Highlights are two removed events, automated ruby overhang behavior and offline audio rendering for the Web Audio API.

Quite some visual changes have been made to Chromium. The concept of scrolling tabs has been introduced for the Touch UI, ensuring that selected tabs stay in the view. Users of Side Tabs will have noticed two new arrows at the top of the tab-bar, allowing you to scroll through the tabs upwards and downwards. The profile button has been moved a bit, making space for a new full-screen button and a stub implementation has been added for Panels, one thing I really miss for extensions.

New features have been given quite some attention. Feature defines have been added for an implementation of the <track> element, which means that work will be starting. The getUserMedia method and JavaScript bindings have been implemented for the Media Stream API and WebKit is now capable of rendering fonts using Skia, bringing its PDF rendering one step closer to handling Chrome’s print previews.

Following some discussion and a change to the HTML specification, WebKit has removed support for the onformchange and onforminput events. The CSS parser won’t accept #papayawhip as a valid color anymore, WebKit’s Server-Sent Events implementation will now only accept UTF-8 as its encoding and negative shadow spread should not round inset shadows. Finally, hidden iframes won’t receive focus anymore.

Dan Bernstein had a go at improving WebKit’s ruby implementation by adding support automated overhang, which means that ruby text can overhang characters adjacent to the base text. While this has become the default and only behavior for WebKit, as the ruby-overhang CSS property has not been implemented yet, the specification’s draft does not reflect the new initial value yet.

Now that the Web Audio API has been in development for well over a year, work has begun on making it testable. Offline audio rendering has been added to the AudioContext API and DumpRenderTree (the testing-framework) for WebKit’s Mac port has been improved with supporting audio tests.

Other changes which occurred last week:

  • WebKit’s GTK port is now capable of running WebGL!
  • Spin-buttons for numeric input elements are clickable again when large paddings are used.
  • A WebUI implementation for HTTP Authentication dialogs has landed for Chromium OS.
  • The default favicon to show for websites has been changed to the address bar’s little globe.
  • Tabs on Chromium’s Touch UI tab-bar will be using 32×32 pixel favicons, double their normale size.
  • TCP-classes have been renamed to Transport in scope of unifying APIs for TCP, UDP and SCTP protocols.
  • Dragging multiple tabs in Chromium will now show an accurate thumbnail showing all tabs.
  • Just pre-loading the metadata for video elements can now be done by setting preload=metadata.
  • Adam Barth’s Content-Security-Policy system can now block plugins, inline scripts, images, styles
    and fonts
    and has been given an options directive.
  • A fast path has been added for rendering simple color-based backgrounds.
  • A recently closed option has been added to Chromium’s Touch UI New Tab-page.
  • Another fast path is now available for parsing simple CSS values, such as dimensions and colors.
  • Repaints during style recalculation will be deferred, improving performance.
  • The page up, page down, home and end buttons will now affect selection in the <select> element.
  • Bouncing for single-finger panning gestures on Windows Touch systems is now available in WebKit2.
  • Skia’s PDF back-end has been pulled in to Chromium’s repository and will be compiled for Print Preview.
  • The HTML5 <meter> element now uses the Shadow DOM, and <progress> has been refactored.
  • The new HTML5 Media Elements will now be rendered using Dimitri’s Shadow DOM as well.
  • Similar to Mac OS X, Chromium on Windows will now also fade tab titles.
  • The Bali release of libvpx, used by the WebM video codec, has been pulled in to Chromium.
  • Support has been added to the WebKit 2 API for Windows 7 gestures.
  • Incoming source can now be preload scanned even if the parser is blocked.
  • Web Inspector’s feature to export HAR-files of resource loading has been improved.
  • Several changes to Chromium’s Web Driver implementation add versioning and health checking.
  • Web Inspector’s protocol format will be updated towards the JSON-RPC 2.0 specification.
  • Searching in Web Inspector’s Resources panel has been fixed.
  • Some layout tests were added for Chromium’s detailed heap snapshots’s summary view.
  • Work in WebKit has begun on implementing an unified storage quota for websites.
  • Chrome will start gathering statistics on modal dialogs in unload events.

And that’s it again. If you hadn’t noticed yet, last Tuesday I announced that I’ll be joining the Google Chrome team in June. While the set-up of these updates may change, I definitely intend to continue making them!

Read more (8 comments) »

Joining Google!

Published on in Google Chrome, Personal, tech.

I’m very excited to announce that I’ll be joining Google as a Software Engineer on the Google Chrome team!

Starting mid June, I’ll be working with the guys over at Google London to improve the browser, WebKit and related products. As my passion for both Google Chrome and WebKit has become quite obvious over the past year, I can’t wait to get started on my new position. Since I’m currently living in the Netherlands, this also means that I’ll be moving to London and the United Kingdom.

While this is an amazing opportunity that I’m definitely looking forward to, there’s a lot I have to leave behind. Besides friends and family, I will no longer be the Technical Director at videobankonline, a great company I co-founded. While I can no longer be an active volunteer at Fronteers, the association for Dutch front-end developers, I’ll finish my role in this year’s conference’s committee and will host an HTML5-course in May.

I certainly intend to continue writing last week posts on my blog, but the set up is going to change. Right now I have the liberty to write about anything I find, seeing that I don’t have access to internal information. As this is going to change, I’ll have to be a lot more careful about the things I write about.

Huge thanks to Paul Irish and Dimitri Glazkov. Cheers, guys!

Read more (64 comments) »

Free-flow CSS editing in Web Inspector, BiDi sprint and nested headers

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

1,403 new patches have been introduced to the Chromium and WebKit repositories in the last week, among which were results of the WebKit BiDi-sprint, free-flow CSS editing and SMS notifications for Chromium OS.

More work has been done on the multiple-profile implementation for Chromium, resulting in visual results for Mac users now as well. The button is quite different from the early mock-ups shown in November, but definitely looks neat and uses less space than the original version.

Quite some patches were submitted to WebKit as part of the announced BiDi-sprint. The <title>-element now supports the dir attribute, moving the caret by word will now occur in visual order when editing text and BiDi-rendering for SVG Text has been improved. Furthermore, the text-align CSS property can now handle match-parent and the values isolate and plaintext can now be parsed for the unicode-bidi property, all prefixed.

Web Inspector now supports free-flow text editing for CSS files! This is a major usability improvement, as it means that making larger modification will be a lot easier. The feature is already available in Google Canary and Chromium nightlies. Just go to the Resources Panel, select a CSS file and double click on its contents to start editing. Committing the changes may be done via Cmd/Ctrl+S.

Many other fixes landed as well for Web Inspector. Changing the value of a hexadecimal number will now be treated correctly, as will a console message’s position for formatted scripts. Furthermore, property abbreviation has been disabled and the periods at the end of error messages have been removed.

In light of improving spec alignment, the behavior of the “start” and “end” values for the text-align property has been updated to match other browsers. DOM bindings have been implemented for the ping attribute on anchor tags and the noresize attribute on frames may now be set using JavaScript. Finally, the sizes of H1-elements nested in HTML5 sectioning elements will now be determined based on their depth.

Other changes which occurred last week:

  • Some bits of work on the Touch new tab page: support for theming and refactoring.
  • Speech recognizion in Chromium will now use FLAC rather than Speex as its codec.
  • The onerror event may now be fired for prefetch link-relational types.
  • The Accept-Language and Accept-Charset headers won’t be send anymore in all cases.
  • JavaScriptCore is now capable of using JIT compilation for regular expressions on SH4 platforms.
  • Chromium now supports the “none” value for media-element preloading, e.g. <video preload=none>.
  • The beforeunload event is now available for icon and perfetch link relational types.
  • The font-sizes of the omnibox and tabs on Chromium GTK have been tweaked.
  • An issue has been fixed with a tab’s spinner when prerendering would be used.
  • The HTTP authentication dialog will now also use WebUI (HTML) for its content.
  • A list of the opened pages will now be exposed via JSON, for remote debugging.
  • Two fixes came in for the :any-selector: style sharing and :last-child selecting.
  • Clipping has been sped up for accelerated 2D Canvasses in Chromium.
  • Accelerated path drawing, e.g. drawing beziers, has been improved as well.
  • The orientation and color settings in the print preview page are now functional.
  • The print-preview page now shows the option to print to a PDF file rather than to a printer.
  • A fast-path for parsing CSS rgb() colors with percent values has been implemented.
  • The title of print-preview tabs has been changed to reflect the page they’re previewing.
  • Support for creating screenshots has been implemented for the WebDriver implementation.
  • Line layout has been sped up by 10% by optimizing overflow computations on them.
  • Changing certain CSS properties on SVG elements won’t initiate a re-layout anymore.
  • Chromium OS will now shows a notification when a SMS message has been received.

And that’ll be all again for this week. Check back tomorrow for some exciting (personal) news! :)

Read more (6 comments) »