Surfin' Safari

Front Page  -  Technorati

February 11, 2004


Regressions from 1.1

Posted at 1:39 AM

There have been some excellent discoveries of some minor regressions from 1.1 to 1.2. For those who are curious, here are some of the highlights.

(1) A bug with display:block in generated content. Reported here. This particular bug was caused by a rearchitecture to unify anonymous blocks created by the render tree when wrapping normal inline flows and the anonymous blocks created for generated content. I forgot to patch the code that coalesced inlines within anonymous blocks to ignore pseudo-element anonymous blocks, and so all the inline children end up *inside* the anonymous :before block. I have a fix.

(2) A regression from incremental repainting. If you change the position of an object from absolute/fixed/relative to static, and if you have descendant positioned elements for whom the object is acting as a containing block, Safari will try to repaint those elements, but only after the containing block chain has been updated... meaning that repaints happen in the wrong place. I don't have a fix yet, but it should be pretty easy to patch. This is honestly kind of a weird thing to do in DHTML, so our odds of catching it were pretty slim. Typically position changes like this only happen on alternate stylesheet re-resolves, which change so much that the whole page would repaint anyway, masking the bug.

(3) Classic image rollovers (e.g., preloads using "new Image") are busted, resulting in a flash on initial rollover, even when the images should have been pre-loaded. This is the truly weird one. I looked at this for a couple of hours tonight, and the images do get pre-loaded into the WebCore cache, but then for some reason they get punted out at rollover time. Not sure why.

I feel bad for not catching this. The problem is that I patched CSS rollovers so that they would load lazily in order to avoid loading unused images, and so when I saw this image flashing, I just assumed I was seeing the results of my CSS change. In reality some other unrelated and as-yet-unknown change caused the regression.

Have any other regressions from 1.1 to report? If so, please post trackbacks in this entry with bug descriptions and (ideally) test pages.

February 9, 2004


Safari 1.2 Released

Posted at 9:32 PM

Safari 1.2 has been released for Panther (OS 10.3). Here are some of the technical highlights:

LiveConnect - LiveConnect is now supported for Java applets, allowing for bi-directional communication between Javascript and Java. Many Java sites that didn't work in earlier versions of Safari will now work properly in 1.2.

Personal Certificate Support - Personal certificates are now supported, so sites that were previously inaccessible are now available in the latest Safari.

keygen Implementation - The keygen element is now supported, so you can now generate key pairs from e.g., VeriSign.

Full Keyboard Access - You can now tab to all controls (and optionally links) on a page. There has been much confusion over this feature, since the ability to tab to all controls honors the OS setting.

In order to tab to popup menus, you need to go to your system preferences, select the Keyboard and Mouse panel, and then select the Keyboard tab. At the bottom of the tab is a checkbox next to the words "Turn on full keyboard access." Check that box to enable full keyboard access, and you'll find that you'll now be able to tab to popups all over the operating system (including Safari).

Another complaint I've seen on forums was that you couldn't type letters to have the popup jump directly to a selected item (e.g., typing "U" to jump to "United States"). Again, we obey the OS behavior, which does allow this, but only after you hit the spacebar when the control has the keyboard focus. Multi-letter typing is supported to complete to a specific item. Try it. You'll like it. :)

Improved Downloads - A download halted by the user or stalled due to network troubles can now be resumed in the Download Manager. You'll also find a number of other improvements to downloads, including the ability to select individual downloads to e.g., delete them, the ability to save images to specific locations via the context menu, and the removal of the 4-connection limitation when downloading while browsing.

Printing Improvements - The "huge margin" problem for printing has been fixed, and Safari is also smarter now about scaling the page when it contains long unwrappable lines. In addition, the CSS2 page break properties are now supported (for values of "always") as per the CSS2.1 Paged Media specification. The speed of printing has been improved dramatically, and you can also now disable backgrounds when printing.

International Domain Name Support - Safari 1.2 supports the IDN standard, which allows for non-ASCII characters in host names.

RTL and International Text Improvements - Handling of RTL and international text has been improved for better Hebrew, Arabic and Hindi support.

Accessibility Improvements - The title attribute is now supported as a tooltip, and 1.2 also supports the accesskey attribute for accessing specific objects in the Web page via the keyboard. In addition, minimum font size is now supported and exposed in Safari's preferences.

Mini Form Controls - Safari 1.2 now analyzes the font size specified by a Web page for form controls and swaps in the mini and small versions as needed. Sites like Travelocity will now render properly with mini form controls in place.

XMLHTTPRequest - XMLHttpRequest is now supported, which means that those of you subscribed to Orkut can now rate your friends. ;)

CSS2 Table Support - Table support has been improved, with border-spacing now fully supported, empty-cells supported, and border collapsing supported.

DHTML Performance Improvements - Safari 1.2 is light years ahead of 1.1 in terms of DHTML performance. When objects change size or position, Safari 1.2 will only repaint the affected areas (whereas older versions would repaint the entire visible area every time).

hover/active improvements - Safari 1.2 has a faster (and more correct) implementation of :hover and :active, so it will no longer get into "stuck hover" states or mistakenly put multiple overlapping objects into :hover simultaneously.

Generated Content Support - 1.2 supports the positioning and floating of generated content as per the CSS2.1 spec, and many bugs have been fixed in generated content, particularly with first-letter and first-line. First-letter is now fully dynamic, and first-line styles will now be inherited properly into the descendants of the line. Both styles will even work across nested block-level children (something I believe that no other browser can yet do).

Marquee Support - All forms of marquees are supported, and the behavior is designed to match Internet Explorer for windows. The start() and stop() methods are also supported, so that marquee animations can be paused and resumed. Safari supports marquees using a special overflow value in conjunction with the CSS3 draft properties, and so it's easy to disable the animation while still allowing access to the content (all via a user stylesheet).

Small-caps Support - Safari 1.2 supports small-caps variants for fonts. It does not support true variants but instead synthesizes the font using the 70% heuristic employed by other browsers (like Mozilla).

Stability - Many crashes and hangs have been addressed.

Performance - Safari has added smarts when transitioning between pages (e.g., preserving the vertical scrollbar to avoid an extra layout), so that pages load more quickly on fast networks. This is just one example of several performance enhancements we made to speed up browsing since 1.1.

Caching Improvements - Safari's WebCore cache was not honoring expiration time, and this led to stale content remaining in the cache. This issue has been addressed.

HTTPS Speed Improvements - HTTPS pages load more quickly in Safari 1.2, thanks to bug fixes and improvements.

CSS Load Improvements - Safari no longer aggressively fetches images specified in CSS files but instead waits until the image is used in the Web page before loading it. This reduces the load time on sites that use generic cross-site CSS files with lots of rules that might never apply on many pages. (Translation: SprintPCS is fast now.)

comment (142) -

Copyright � Dave Hyatt 2003, Design by Stéphane Curzi/ProjetsUrbain.com