WebKit's week - #5
lundi 13 octobre 2008 - 3 commentaires
One month without news is bad. So we resume with only two weeks.
Changes of the week
Everything mentioned below should work with the latest nightly available at the moment (37469).
Styling placeholder (37123, 37217)
WebKit supports a placeholder attribute on input elements. This attribute allows you to display a tooltip in the field when the user hasn't enter any content. By default, this tooltip is printed in light gray. Now, we can play with his style using the -webkit-input-placeholder
pseudo-element. See the example.
Debugging before onload fires (37313)
Before this fix, it was impossible to debug a part of code running before the resource finished its loading. It wasn't really handy for a tool like the Web Inspector. Fixed !
Origin header for POST requests (37317)
Beginning of implementation for the Access Control for Cross-Site Requests specification. An Origin
header, which only contains the domain of the originating page, is added. This allows application to check if the request comes from an authorized domain. Unlike the Referer
header, this one doesn't reveal the complete path of the originating page.
Exact line search (37389)
Like Firebug, it's now possible to search for a particular line in the Resources panel. We can use two syntaxes : #123
or line:123
. We can add a keyword to only match lines with this keyword.
Fixing SunSpider (37389)
As David Mandelin mentioned on his blog, the regexp-dna test on SunSpider was incorrect. An option only supported in Gecko was in the test and so, this engine was disadvantaged. Eveyrthing is fine now, all the engines do the same test.
News of the week
While I wasn't giving news, three new posts were added to the Surfin' Safari blog:
- Introducing Squirrelfish Extreme, the latest evolution of the JavaScript engine.
- Full pass of Acid3, the last condition (smooth animation) is now ok.
- Web Inspector redesign, a summary of all the evolutions for the last nine months.
This is everything for this week. Of course, this is just a selection I've made. If you've noticed any other interesting changes, please let me know. Same thing if I got something wrong.
Commentaires
It would seem to me that ::input-placeholder is the wrong way to go. Should it not be :placeholder (ie. a generic placeholder pseudo-class) since there's been talk of image placeholder styling, too?
We tried making it a pseudo-class initially, but it doesn't really work well since it can be overridden too easily by inline styles set on an element. See https://bugs.webkit.org/show_bug.cg... If we add more generic support for this, or maybe when the attribute is specified in HTML5, then we can update the name of the pseudo-element.
As someone who had to write a cross browser compatible javascript hacky "input-placeholder" kind of thing, I am extremely excited to see this in webkit. I love how webkit keeps adding features like this.