Menu

Last Week in WebKit: Programmers programming programs

July 9th, 2013

Hello from WebKit land!

It’s been a few weeks since I’ve blogged here, but now I’m back! Let’s try a new format for the blog this week. Something terse but stylish. Perhaps something like…

Simon Fraser avoided a whole bunch of work.

152212 - Avoid doing work in RenderBox::outlineBoundsForRepaint() when the repaintContainer is this
152213 - Avoid calling isSimpleContainerCompositingLayer() an extra time
152214 - Avoid calling into Objective-C every time we get the scrollbar width
152235 - Don't set z-index: 0 on lots of elements with -webkit-overflow-scrolling: touch

A nice collection of optimizations from Simon this week, proving once again that laziness (and profiling) pays off.

Christophe Dumez made numerous improvements to the SVG object model.

152120 - Update SVG interfaces to stop inheriting from SVGURIReference and SVGTests
152156 - Merge SVGLangSpace into SVGElement
152299 - Remove SVGStyledLocatableElement class
152343 - Move SVGTests attributes parsing to SVGGraphicsElement
152350 - Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG
152404 - Have SVGTextContentElement inherit SVGGraphicsElement

These updates bring us six steps closer to the latest WebIDL and SVG specifications, specifically getting rid of multiple inheritance in the SVG object model. The increase in code sharing is a welcome side-effect!

Bem Jones-Bey added basic support for rectangle shape-outside.

152122 - [CSS Shapes] New positioning model: basic support for rectangle shape-outside

Bem writes: “With the latest Editor’s Draft of the CSS Shapes specification, shape-outside no longer affects the positioning of floats. This is the first step in changing the implementation to reflect this specification change.”

Kangil Han has been adding more isFooElement()/toFooElement() helpers and using them across WebKit.

152149 - Adopt is/toHTMLInputElement for code cleanup
152203 - Adopt is/toHTMLImageElement for code cleanup
152208 - Adopt is/toHTMLOptionElement for code cleanup
152211 - Adopt is/toHTMLOptGroupElement for code cleanup
152218 - Adopt toHTMLTextAreaElement for code cleanup
152290 - is/toHTMLStyleElement should use Element* for its argument
152353 - Append overloading function for isFooElement
152387 - Adopt is/toHTMLMapElement for code cleanup
152440 - Adopt is/toHTMLTableElement for code cleanup

I totally love these. isFooElement() looks way nicer than hasTagName(fooTag) and toFooElement() bakes an element type-check assertion into debug builds instead of blindly static_cast‘ing.

Geoff Garen removed some unwanted O(n2) behavior affecting .innerText.

152306 - plainText() is O(N^2)

Anyone removing something O(n2) is automatically awesome and gets a mention in the blog. 3Cheers4Geoff!

Frédéric Wang made some improvements to our MathML support.

152235 - Add Support for mspace element
152140 - Implement parsing of MathML lengths.

It’s so great to see MathML getting some love. Go Frédéric!

Andreas Kling (me!) made the CSS parser split rules with more than 8K selectors into multiple rules.

152453 - REGRESSION(r125294): A style rule with more than 8192 selectors can cause style corruption.

Still here? Time for some shameless self-promotion! I made this change to fix a popular browser extension that was thinking a little farther outside the box than I had expected when I introduced a 12-bit selector index (to save memory.)

All right, that’ll be it for this week, thanks for tuning in! I’m @awesomekling on twitter if you have feedback/questions about this blog.