[webkit-changes] cvs commit: WebCore/layout-tests/fast/dom anchor-backslash-expected.txt anchor-backslash.html

Darin darin at opensource.apple.com
Fri Jun 24 09:48:40 PDT 2005


darin       05/06/24 09:48:39

  Modified:    .        ChangeLog
               kwq      KWQKURL.mm
  Added:       layout-tests/fast/dom anchor-backslash-expected.txt
                        anchor-backslash.html
  Log:
          Reviewed by Justin Garcia.
  
          - fixed <rdar://problem/4151619> Safari changes "\" characters to "/" in the query part of links that start with "?"
  
          Test cases added:
          * layout-tests/fast/dom/anchor-backslash-expected.txt: Added.
          * layout-tests/fast/dom/anchor-backslash.html: Added.
  
          * kwq/KWQKURL.mm: (substituteBackslashes): Fix error where we'd ignore
          "?" and "#" characters if they were the first character in the string.
  
  Revision  Changes    Path
  1.4312    +13 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4311
  retrieving revision 1.4312
  diff -u -r1.4311 -r1.4312
  --- ChangeLog	24 Jun 2005 05:59:05 -0000	1.4311
  +++ ChangeLog	24 Jun 2005 16:48:36 -0000	1.4312
  @@ -1,3 +1,16 @@
  +2005-06-24  Darin Adler  <darin at apple.com>
  +
  +        Reviewed by Justin Garcia.
  +
  +        - fixed <rdar://problem/4151619> Safari changes "\" characters to "/" in the query part of links that start with "?"
  +
  +        Test cases added:
  +        * layout-tests/fast/dom/anchor-backslash-expected.txt: Added.
  +        * layout-tests/fast/dom/anchor-backslash.html: Added.
  +
  +        * kwq/KWQKURL.mm: (substituteBackslashes): Fix error where we'd ignore
  +        "?" and "#" characters if they were the first character in the string.
  +
   2005-06-23  Darin Adler  <darin at apple.com>
   
           * khtml/html/html_formimpl.cpp: (DOM::HTMLTextAreaElementImpl::setValue):
  
  
  
  1.91      +2 -2      WebCore/kwq/KWQKURL.mm
  
  Index: KWQKURL.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKURL.mm,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- KWQKURL.mm	27 May 2005 20:54:21 -0000	1.90
  +++ KWQKURL.mm	24 Jun 2005 16:48:39 -0000	1.91
  @@ -1733,9 +1733,9 @@
       int hashPos = string.find('#');
       unsigned pathEnd;
       
  -    if (hashPos > 0 && (questionPos < 0 || questionPos > hashPos)) {
  +    if (hashPos >= 0 && (questionPos < 0 || questionPos > hashPos)) {
   	pathEnd = hashPos;
  -    } else if (questionPos > 0) {
  +    } else if (questionPos >= 0) {
   	pathEnd = questionPos;
       } else {
   	pathEnd = string.length();
  
  
  
  1.1                  WebCore/layout-tests/fast/dom/anchor-backslash-expected.txt
  
  Index: anchor-backslash-expected.txt
  ===================================================================
  This tests \ characters being changed to / in anchor tags.
  
  If it works you should see five messages below that have \ or / characters as specified.
  
  1 2 3 4 5
  paths like this should turn all \ characters into /: "/a/b/c/"
  query strings like this one should still have \ characters: "?path=\\a\b\c\"
  query strings like this one should still have \ characters even if the URL is only a query: "?path=\\myshare\myfolder\myfile\"
  anchor strings like this one should still have \ characters: "#path=\\a\b\c\"
  anchor strings like this one should still have \ characters even if the URL is only an anchor: "#path=\\myshare\myfolder\myfile\"
  
  
  
  
  1.1                  WebCore/layout-tests/fast/dom/anchor-backslash.html
  
  Index: anchor-backslash.html
  ===================================================================
  <html>
      <head>
          <script type="text/javascript">
              function log(message)
              {
                  var item = document.createElement("li");
                  item.appendChild(document.createTextNode(message));
                  document.getElementById("console").appendChild(item);
              }
              function test()
              {
                  if (window.layoutTestController)
                      layoutTestController.dumpAsText();
                  log("paths like this should turn all \\ characters into /: \"" + document.getElementById("1").pathname + "\"");
                  log("query strings like this one should still have \\ characters: \"" + document.getElementById("2").search + "\"");
                  log("query strings like this one should still have \\ characters even if the URL is only a query: \"" + document.getElementById("3").search + "\"");
                  log("anchor strings like this one should still have \\ characters: \"" + document.getElementById("4").hash + "\"");
                  log("anchor strings like this one should still have \\ characters even if the URL is only an anchor: \"" + document.getElementById("5").hash + "\"");
              }
  	</script>
      </head>
      <body onload="test()">
          <p>This tests \ characters being changed to / in anchor tags.</p>
          <p>If it works you should see five messages below that have \ or / characters as specified.</p>
          <hr>
          <a id="1" href="file:\\\a\b\c\">1</a>
          <a id="2" href="file:///?path=\\a\b\c\">2</a>
          <a id="3" href="?path=\\myshare\myfolder\myfile\">3</a>
          <a id="4" href="file:///#path=\\a\b\c\">4</a>
          <a id="5" href="#path=\\myshare\myfolder\myfile\">5</a>
          <hr>
          <p><ol id="console"></ol></p>
      </body>
  </html>
  
  
  



More information about the webkit-changes mailing list