Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Safari Passes the Acid2 Test

Posted by Zonk on Thu Apr 28, 2005 10:20 AM
from the congratulations-its-a-web-browser! dept.
TigerX writes "The Mac web browser Safari has become the first browser to pass the Acid2 test. Acid2 is a CSS/HTML test suite put out by the Web Standards Project (WASP). Developer David Hyatt had been working on the project for the past few weeks. Details can be found at his blog. The patched Safari is not yet avaliable for public consumption. It is unknown when the patches will appear in a public version of Safari."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Go Apple! (Score:4, Funny)

    by HeaththeGreat (708430) <hborders@mail.win.org> on Thursday April 28 2005, @10:22AM (#12372249)
    Nice to see some big companies care about standards!
    • by iamthemoog (410374) on Thursday April 28 2005, @10:23AM (#12372272) Homepage
      unlike slashdot

      *ducks*

    • Re:Go Apple! (Score:4, Insightful)

      by AKAImBatman (238306) * <akaimbatman@g m a i l . c om> on Thursday April 28 2005, @10:43AM (#12372576) Homepage Journal
      Go Apple!

      Indeed. I still use OS X 10.2, but the differences in Safari between 10.2 and 10.3 are just astounding. Especially in the areas of CSS and DHTML support. KHTML was always a nice little widget, but Apple seems to have some of the best minds I've ever seen working on this. Not even Microsoft got their act togther this fast! (And they started with Spyglass, a component that was superior to the KHTML one that Apple started with.)
      • Re:Go Apple! (Score:5, Informative)

        by Have Blue (616) on Thursday April 28 2005, @10:48AM (#12372650) Homepage
        Apple (specifically, Dave Hyatt) did all the work related to this specific subtopic of "browser development". KDE can have the glory for writing a world-class web rendering engine from scratch, but within the scope of this article it's all Hyatt.
        • Yes, but... (Score:4, Insightful)

          by CarpetShark (865376) on Thursday April 28 2005, @12:00PM (#12373619)

          Konqueror still put in place all of the stuff necessary to make this happen. According to his blog, the he's only been working on this since April 12, but Konqueror has been in development for years. That's what we call standing on the shoulders of giants.

          Also, I'll be interested to see when Dave/Apple get around to contributing this back to the KDE team.

          • Re:Yes, but... (Score:5, Informative)

            by gutter (27465) <ian.ragsdale@nosPaM.gmail.com> on Thursday April 28 2005, @12:33PM (#12374007) Homepage
            Had you bothered to read the blog, you'd have seen that he already published the patches there:

            http://weblogs.mozillazine.org/hyatt/archives/2005 _04.html#008042 [mozillazine.org]
              • Re:Yes, but... (Score:5, Informative)

                by ahillen (45680) on Thursday April 28 2005, @01:01PM (#12374360)
                Apple feeds their improvements back to KHTML after the Safari version they appear in is public.

                Although it doesn't seem to be very useful [kdedevelopers.org].
                • by LionMage (318500) on Thursday April 28 2005, @06:51PM (#12378287) Homepage
                  Yeah, I went through the comments on Dave Hyatt's blog and found this link [kdedevelopers.org] in the comments section (the same link you give above), and I was pretty shocked. Like most folks, I thought that KHTML was benefiting from Apple's contributions. However, after reading the critique by Zack Rusin (one of the KHTML developers), I took a closer look at some of the patches that Dave Hyatt posted links to on his blog.

                  While many of the patches were simple logic changes, a few of them had OS X specific code in them which makes them non portable. Hyatt's follow-up comments indicate that he tried to hide many of the Mac-isms behind an abstraction layer so that they could port cleanly to other platforms, but a cursory glance at the patches shows that he didn't hide everything.

                  So while this is a great win for Apple and for Mac OS X, it's not the boon to KHTML that many thought it would be.

                  Personally, I'm disappointed that the Safari team would put Mac-specific code into the KHTML engine, making some of their patches impossible to incorporate back into the KHTML baseline. This is the kind of thing I would expect from a novice programmer who's only ever coded for, say, Windows.

                  (Just a side note to the poster I'm responding to: Most folks who read your comment probably didn't realize the significance of it because they didn't follow the link. A brief summary of what the link is pointing to would have been really useful.)
  • by mwkaufman (859791) on Thursday April 28 2005, @10:22AM (#12372253)
    If I pass a test, but don't hand it in, should I still get an A?
  • More to the point (Score:5, Interesting)

    by overshoot (39700) on Thursday April 28 2005, @10:23AM (#12372261)
    It is unknown when the patches will appear in a public version of Safari."

    Will the patches appear in Konqueror (KHTML)?

    • Re:More to the point (Score:5, Informative)

      by twener (603089) on Thursday April 28 2005, @01:01PM (#12374366)
      > Will the patches appear in Konqueror (KHTML)?

      Zack Rusin just blogged about this [kdedevelopers.org].
      • by MasterVidBoi (267096) on Thursday April 28 2005, @03:10PM (#12375903)
        I'm not sure Zack Rusin's response is entirely well thought out. Hyatt links directly to the individual patch files for each of the bugs in KHTML. I've scanned through them, and there isn't much OS X specific at all, except in files that are explicitly platform specific.

        Look at http://weblogs.mozillazine.org/hyatt/acid3.txt [mozillazine.org] as an example.

        In one of the other patches, an APPLE_CHANGES ifdef was actually replaced with entirely cross-platform code.

        The KHTML team would understandably like every change in Safari to be packaged up into a nice little independant patch, but it realistically cannot work that way. I'm sure everyone who has tried to contribute to a project maintained by someone else has had to wait before their patch was (or was not) accepted, and Apple really can't wait on the KTML devs. They have a job that needs to get done by a particular deadline (a deadline that doesn't apply to the KHTML devs).

        The patches posted by Hyatt look really well done to me, and not at all representative of what Rusin is accusing them.
      • by IamTheRealMike (537420) on Thursday April 28 2005, @11:01AM (#12372844) Homepage
        They can (and do) release the changes as patch dumps which are hard/impossible to merge in without spending lots of time doing so.

        IOW there's a big difference between "not breaking the license" and "working well with outside projects".

        The GCC changes they make are the same. Some aren't rolled back in and whilst the tree is available, documentation on what the patches are and where you can get them are not (and it's a CVS branch so you can't just do a "svn log" and see the individual commits).

        • by Paradox (13555) on Thursday April 28 2005, @11:18AM (#12373056) Homepage Journal
          A lot of their changes make no sense to merge. They do lots of things to ahve the compiler fit with their development and library model, which is quite a bit different from how everyone else does things.

          And some Apple patches, especially with regards to Objective-C, have made their way into GCC. Maybe they could be doing more, but they're allready doing more than many corperations of their stature.
                • by Paradox (13555) on Thursday April 28 2005, @12:02PM (#12373634) Homepage Journal
                  So what, "Here's our source tree" is obfuscation? That's a pretty extreme position to take.

                  I suspect it's more of a cultural clash. To someone being paid, being told to take the patches from the source tree is a minor irritant at best. For a volunteer, any extra effort streches allready scarce donated time.
  • KHTML (Score:4, Informative)

    by Mitchell Mebane (594797) on Thursday April 28 2005, @10:23AM (#12372266) Homepage Journal
    It looks like he's actually fixing the bugs, and not just adding some lame hack to make it show up right - nice!

    I hope these fixes trickle back down to KHTML soon. In time for KDE 3.5 would be great. ;)
  • Hmmm (Score:5, Interesting)

    by gowen (141411) <gwowen@gmail.com> on Thursday April 28 2005, @10:25AM (#12372290) Homepage Journal
    The patched Safari is not yet avaliable for public consumption. It is unknown when the patches will appear in a public version of Safari.
    Hypothetical : Which might mean that fixing the browser to display Acid2 broke something else (related to the browser making reasonable attempts to display broken code, perhaps).

    Which does point out the problem with tests like Acid2, which really don't resemble any code in the wild that anyone has ever used. What you end up with is browsers that are brilliant at rendering completely pathological corner cases, but only at the cost of changing some other well-thought-out-but-not-standardised. behaviour.

    Now, I admit that this is purely hypothetical, but surely a better guide to browser usability is how well it renders the morass of dodgy XML/HTML that gets sent to it every single day.

    Optimise for corner cases, and it possible that all you'll get are really well rendered corner cases.
    • Re:Hmmm (Score:5, Insightful)

      by hrieke (126185) on Thursday April 28 2005, @10:34AM (#12372409) Homepage
      Catch-22.
      We have browsers that can't do standard HTML / CSS because no one writes clean HTML / CSS, and we can't have clean HTML / CSS until we have a browser that supports it correctly.

      This is just a small step forward in that fight, and hopefully it will go forward.
      • by parvenu74 (310712) on Thursday April 28 2005, @11:34AM (#12373266)
        Saying that a browser should not support full standards because people generally don't write standards compliant code is absurd. Make the browser support the standards and then expose the faulty css/html writers for the hacks they are. Just because someone is too stupid or too lazy to follow the standard is no reason to effectively abandon the standard!
    • Re:Hmmm (Score:5, Informative)

      by vidarlo (134906) <vidarlo AT freakforum DOT nu> on Thursday April 28 2005, @10:35AM (#12372440) Homepage
      Now, I admit that this is purely hypothetical, but surely a better guide to browser usability is how well it renders the morass of dodgy XML/HTML that gets sent to it every single day.

      There is where the "quirks mode" [mozilla.org] comes in. The browser should (and is) able to detect whenever something is written after the standard, or not. If it is written in a standard compliant manner, it should be rendered the same everywhere. If it is in quirks mode, it should be rendered different, and the page will behave different.

    • Re:Hmmm (Score:5, Informative)

      by typhoonius (611834) on Thursday April 28 2005, @10:49AM (#12372661) Homepage

      There's a "tour" of the test [webstandards.org] available that explains exactly what each row is meant to test, and it all looks like pretty fundamental stuff, so I wouldn't write it all off as a "corner case."

      If nothing else, it helped Hyatt corner a number of outright glitches and bugs. I hope the Mozilla and IE7 teams follow his lead.

  • by James_Duncan8181 (588316) on Thursday April 28 2005, @10:25AM (#12372294) Homepage
    It should also be noted that all of the fixes done on the Safari KHTML codebase will eventually work their way back to Konqueror proper, meaning that GNU/Linux will benefit directly from this. *smiles* Thanks, Apple.
    • by IamTheRealMike (537420) on Thursday April 28 2005, @11:10AM (#12372959) Homepage
      No, they won't. Why don't you read what the KDE developers themselves found [kde.org] before assuming that Apple, a publically traded corporation not exactly known for its humility and openness, is working hand in hand with the original authors?
      • by nether (221468) on Thursday April 28 2005, @11:44AM (#12373387)
        Eh? Maybe you should read the thread that you linked. Yes, there was initial dismay, but then Apple - in their "humility and openness" - helped the team crack open the tar ball.

        This is the exact same thing that happened way back when - when safari was first unveiled. Apple submitted a large tar, and then helped the KHTML team decifer it.

        Being both a Safari *and* Konq user, this makes me happy.

        Suggestion: know what you link ... you might get goatse.cx
          • by Mitchell Mebane (594797) on Thursday April 28 2005, @01:39PM (#12374874) Homepage Journal
            From his latest blog entry [kdedevelopers.org]:

            "Do you have any idea how hard it is to be merging between two totally different trees when one of them doesn't have any history? That's the situation KDE is in. We created the khtml-cvs list for Apple, they got CVS accounts for KDE CVS. What did we get? We get periodical code bombs in the form of them releasing WebCore. Many of us wanted to even sign NDA's with Apple to at least get access to the history of their internal vcs and be able to be merging the changes incrementally, the way they can right now. Nothing came out of it. They do the very, very minimum required by LGPL."

            Go read the whole post. Very informative, and kind of sad.
  • by Letter (634816) on Thursday April 28 2005, @10:27AM (#12372315)
    Dear Safari Acid Test,

    I'm testing the Safari Acid now...

    Look over there! A pink wildebeest mating with a green giraffe! A blue moongoose mounting a purple elephant! Is that a lion under the zebra? Heavenly stripes galore!

    Trippy,
    Letter

  • by Anonymous Coward on Thursday April 28 2005, @10:33AM (#12372398)
    Enough with the lame LSD comments!

    The term "acid test" dates back to the freaking gold rush days when they would use nitric acid to test for gold.

  • by ssj_195 (827847) on Thursday April 28 2005, @10:34AM (#12372420)
    ... of the patch was discovered earlier, and is presented here:
    if (url == "http://webstandards.org/act/acid2/test.html#top")
    {
    print("Hello World!");
    drawSmileyFace();
    }
  • From WASP website (Score:5, Informative)

    by karvind (833059) <karvind AT gmail DOT com> on Thursday April 28 2005, @10:57AM (#12372754) Journal
    The site has more details and has a list of additional features that are tested

    Transparent PNGs -- The eyes are encoded as transparent PNGs.

    The object element -- The eyes of the face are attached to an object element. Being able to use object (which can have alternative content) is one of the oldest requests from web designers.

    Absolute, relative and fixed positioning -- Being able to position elements accurately is important for advanced page layouts.

    Box model -- The original Acid test focused on the CSS box model. Acid2 continues in this fine tradition by testing 'height', 'width', 'max-width', 'min-width', 'max-height' and 'min-height'.

    CSS tables -- There is nothing wrong with table layouts. It is a powerful layout model which makes sense on bigger screens. However, the table markup is troublesome as it ties the content to these screens. Therefore, being able to specify table layouts in CSS is important.

    Margins -- CSS defines accurate algorithms for how margins around elements should be calculated.

    Generated content -- The ability to add decorations and annotations to Web pages without modifying the markup has long been requested by authors.

    CSS parsing -- Acid2 includes a number of illegal CSS statements that should be ignored by a compliant browser.

    Paint order -- We test that overlapping content is painted in the right order. This is not a feature in itself, but a requirement for other features to work correctly.

    Line heights -- The Acid2 test checks a few key parts of the CSS inline box model, upon which any standards-compliant Web page depends.

    Hovering effects -- One of the elements in the face changes color when you hover over it. Which one?

  • by rewinn (647614) on Thursday April 28 2005, @12:05PM (#12373671) Homepage

    Quite apart from the merits of the Acid2 test, its use of rendering a smiley face both (a) to be the test itself and (b) to show the quality of the test result ... is clever!

    Most tests create an abstract "score" such as "85% compliant" which can be rendered by a graphic, such as a pie chart, but which is fundamentally different from the test itself. This abstraction process is extra work both for the researcher and for the reader. There is also the danger that it can be misleading. Edward Tufte [edwardtufte.com] has written on this at length in "Visual Explanations" and other books.

    To put the test & the results together in a meaningful, intuitive package, as Acid2 seems to have done, is just great!

    • by lukewarmfusion (726141) on Thursday April 28 2005, @10:27AM (#12372325) Homepage Journal
      No, the test was designed to use code that many developers would use and many would use incorrectly. There are details on how a browser should handle bad code - and most fall short of the standards. That's one of the reasons why you have browser "hacks" and why many developers end up with bad habits.

      In other words, don't be so forgiving with bad code. It hurts the world of web development when bad code becomes a de facto "standard."
    • Re:Purpose of Acid2 (Score:5, Informative)

      by fox8118 (538985) on Thursday April 28 2005, @10:30AM (#12372362)
      From the Acid2 site:

      Acid2 is a test page for web browsers published by The Web Standards Project (WaSP). It has been written to help browser vendors make sure their products correctly support features that web designers would like to use. These features are part of existing standards but haven't been interoperably supported by major browsers. Acid2 tries to change this by challenging browsers to render Acid2 correctly before shipping.

      Acid2 is a complex web page. It uses features that are not in common use yet, because of lack of support, and it crams many tests into one page. The aim has been to make it simple for developers and users to check if a browser passes the test. If it does, the smiley face on the left will appear. If something is wrong, the face will be distorted and/or shown partly in red.

      The purpose of this document is to explain how Acid2 works. The markup behind Acid2 is peculiar in that it attempts, on one single page, to test many different features. We do not envision or recommend that normal Web pages should be written this way, but it is appropriate for a test page. At first sight, the source code is hard to understand, but the guided tour offered in this document will explain it in some detail. The guide assumes a technical understanding of HTML, CSS and PNG.
    • Re:Purpose of Acid2 (Score:5, Informative)

      by FidelCatsro (861135) <<fidelcatsro> <at> <gmail.com>> on Thursday April 28 2005, @10:30AM (#12372369) Journal
      The test was designed to check the browser implementations of the newer CSS standards.
      Basicaly the point being not in obscure code , but in rendering normal code properly ,all-be-it and extremly complex example of which made to test the browsers and how well they implement the standard.
      Web designers/developers will use the code when it is avaliable in their arsenal.
      As of now , the newest version of webcore is the only rendering engine that can do it so congratulations to apple(and ofcourse the khtml team ,khtml being the thing on which webcore is based)
      • by masklinn (823351) <slashdot.org@NOsPAm.masklinn.net> on Thursday April 28 2005, @10:55AM (#12372734)
        We have the same problem with javascript, only that is 10 times more disturbing because if javascript was actually the same all other the place web surfing could be enhanced so much. The only reason people don't like javascript is because the popups, and that's not everything in javascript.
        I beg to disagree, popups is not the only reason why people hate JS (one could even say that they fear it).

        General misuses and abuses of JS is, and in this general abuses are:
        • Popups, of course
        • Stupid effects (shitty animated gifs following cursors anyone?)
        • Messing with browsers (resizing, changing parts of the global UI, alert boxes)
        • Code design so bad that browsers grind to a halt (oh, i so love seing my CPU usage skyrocket to 100% and stay there because i opened a bugged page)
        • Slowing the browsing
        • Disabling the browsing altogether because of non standard or stupid scripts (mmm, yummy Javascript links, I mean anchor tags are certainly not hip enough for a damn link are they?)
        • Probably many other i can't think of right now
        "Modern" javascript and the usage of DOM scripting allow wonderful flexibility, and applying the priciples of graceful degradation and progressive enhancement [hesketh.com] while fully decoupling Javascript from HTML/CSS (by putting JS in a separate file and associating it via the Event Handlers, layering a behavioural javascript on top of an existing fully functionnal JS-less website) allows improving every JS-enabled's navigation while not degrading at all JS-disabled's navigation.

        As Douglas Crockford put it, Javascript is the most misunderstood programming language [crockford.com], and I'd add that it's the one with the most extensive yet qualitatively (sp, more than likely) worst documentation ever.

        And yet, finding good javascript tutorials [howtocreate.co.uk] and stunning Javascript reference websites [quirksmode.org] is possible. People just don't bother looking for them...
    • Re:Firefox? (Score:4, Informative)

      by wowbagger (69688) on Thursday April 28 2005, @10:28AM (#12372335) Homepage Journal
      Since Safari has nothing to do with Firefox, Mozilla, or the Gecko HTML engine, being instead based upon the KHTML engine from KDE, I would say "When can we expect the code to flow out and make Firefox/Mozilla pass the Acid2 test? Never."
    • by bullitB (447519) on Thursday April 28 2005, @10:30AM (#12372371)
      Now if only it would play a CD without forcing me to enter a contractual relationship with iTunes (which I am not interested in doing) I'd be less disappointed in it.

      You're aware you had to enter into a similar contract to like...boot the Mac? Remember that thing you clicked through right before it asked for your name? You know, with the bouncing blue thing?
    • by Dot.Com.CEO (624226) on Thursday April 28 2005, @10:35AM (#12372435)
      Apple menu / System Preferences / Hardware / CDs and DVDs

      Change the entry "when you insert a music CD open iTunes" to your favourite app. Bob's your uncle.

      Good luck finding something better than itunes by the way.