[Webkit-unassigned] [Bug 16639] New: Acid3 excpects className to preserve whitespace when setting

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 28 02:08:35 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16639

           Summary: Acid3 excpects className to preserve whitespace when
                    setting
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org


Acid3 excpects className to preserve whitespace when setting

We fail this section:
      p.className = p.className.replace(/ /, '\n');
      if (!p.hasAttribute('class') ||
          p.getAttribute('class') != '\nte\n\nst\n' ||
          p.className != '\nte\n\nst\n')

of the following test:

    function () {
      // test 51: className and the class attribute: space preservation
      var ok = true;
      var p = document.createElement('p');
      if (p.hasAttribute('class'))
        ok = false;
      p.setAttribute('class', ' te  st ');
      if (!p.hasAttribute('class') ||
          p.getAttribute('class') != ' te  st ' ||
          p.className != ' te  st ')
        ok = false;
      p.className = p.className.replace(/ /, '\n');
      if (!p.hasAttribute('class') ||
          p.getAttribute('class') != '\nte\n\nst\n' ||
          p.className != '\nte\n\nst\n')
        ok = false;
      p.className = '';
      if (!p.hasAttribute('class') ||
          p.getAttribute('class') != '' ||
          p.className != '')
        ok = false;
      if (ok)
        return 4;
    },

I'm not sure what spec supports preserving whitespace like that (or what other
browsers do).


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list