Native themes

July 06, 2009

Our port of Chrome's UI to Linux is at a higher level than it would appear at first glance; it took extra code to look like Windows. At one point, a glitch in our drawing code caused a few users to think we'd switched toolkits.

It turns out obeying the user's system theme is partially just turning off our custom drawing, though of course it's more complicated than that. But Elliot's taken the first step.

Theming web content will be even more complicated, because (as always) the renderers have no access to GTK. You could imagine proxying drawing calls that involve native widgets up to the browser process, and though that means you're doing slow interprocess IPCs in your critical path for drawing, it's an engineering problem and can be solved. To be honest, I'm skeptical this is too important; web content doesn't look like native content for a reason, and sites rarely work when the colors aren't as they expect. But we should at least get stuff like the text highlight color right.