[webkit-changes] cvs commit: WebCore/layout-tests/fast/frames iframe-name-and-id-expected.txt iframe-name-and-id.html

Geoffrey ggaren at opensource.apple.com
Mon Jul 11 19:00:19 PDT 2005


ggaren      05/07/11 19:00:18

  Modified:    .        ChangeLog
               khtml/html html_baseimpl.cpp
  Added:       layout-tests/fast/frames iframe-name-and-id-expected.txt
                        iframe-name-and-id.html
  Log:
  	-fixed rdar://problem/4170960
  	http://bugzilla.opendarwin.org/show_bug.cgi?id=3952
  	iFrame name and id information incorrectly returned
  
  	Reviewed by mjs.
  
          Test cases added: (NONE)
          * layout-tests/fast/frames/iframe-name-and-id-expected.txt: Added.
          * layout-tests/fast/frames/iframe-name-and-id.html: Added.
  
          * ChangeLog:
          * khtml/html/html_baseimpl.cpp:
          (HTMLFrameElementImpl::attach): removed misleading comment
          (HTMLIFrameElementImpl::attach): copied FrameElementImpl behavior
  	for initializing m_name
  
  Revision  Changes    Path
  1.4407    +28 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4406
  retrieving revision 1.4407
  diff -u -r1.4406 -r1.4407
  --- ChangeLog	11 Jul 2005 23:11:55 -0000	1.4406
  +++ ChangeLog	12 Jul 2005 02:00:14 -0000	1.4407
  @@ -1,3 +1,31 @@
  +2005-07-11  Geoffrey Garen  <ggaren at apple.com>
  +
  +	-fixed rdar://problem/4170960 
  +	http://bugzilla.opendarwin.org/show_bug.cgi?id=3952 
  +	iFrame name and id information incorrectly returned
  +        
  +	Reviewed by mjs.
  +
  +        Test cases added: (NONE)
  +        * layout-tests/fast/frames/iframe-name-and-id-expected.txt: Added.
  +        * layout-tests/fast/frames/iframe-name-and-id.html: Added.
  +
  +        * ChangeLog:
  +        * khtml/html/html_baseimpl.cpp:
  +        (HTMLFrameElementImpl::attach): removed misleading comment
  +        (HTMLIFrameElementImpl::attach): copied FrameElementImpl behavior
  +	for initializing m_name
  +
  +2005-07-11  Geoffrey Garen  <ggaren at apple.com>
  +
  +        Reviewed by NOBODY (OOPS!).
  +
  +        Test cases added: (NONE)
  +
  +        * khtml/html/html_baseimpl.cpp:
  +        (HTMLFrameElementImpl::attach):
  +        (HTMLIFrameElementImpl::attach):
  +
   2005-07-11  Ken Kocienda  <kocienda at apple.com>
   
           Reviewed by Richard
  
  
  
  1.74      +5 -3      WebCore/khtml/html/html_baseimpl.cpp
  
  Index: html_baseimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_baseimpl.cpp,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- html_baseimpl.cpp	9 Jul 2005 20:19:09 -0000	1.73
  +++ html_baseimpl.cpp	12 Jul 2005 02:00:18 -0000	1.74
  @@ -475,8 +475,6 @@
   
   void HTMLFrameElementImpl::attach()
   {
  -    // we should first look up via id, then via name.
  -    // this shortterm hack fixes the ugly case. ### rewrite needed for next release
       m_name = getAttribute(ATTR_NAME);
       if (m_name.isNull())
           m_name = getAttribute(ATTR_ID);
  @@ -936,12 +934,16 @@
   
   void HTMLIFrameElementImpl::attach()
   {
  +    m_name = getAttribute(ATTR_NAME);
  +    if (m_name.isNull())
  +        m_name = getAttribute(ATTR_ID);
  +    
       HTMLElementImpl::attach();
   
       KHTMLPart *part = getDocument()->part();
       if (m_render && part) {
           // we need a unique name for every frame in the frameset. Hope that's unique enough.
  -	part->incrementFrameCount();
  +        part->incrementFrameCount();
           if (m_name.isEmpty() || part->frameExists(m_name.string()))
               m_name = AtomicString(part->requestFrameName());
   
  
  
  
  1.1                  WebCore/layout-tests/fast/frames/iframe-name-and-id-expected.txt
  
  Index: iframe-name-and-id-expected.txt
  ===================================================================
  Tests: getting and setting frames[x].name on an iFrame
  
  Related bug: rdar://problem/4170960 http://bugzilla.opendarwin.org/show_bug.cgi?id=3952 iFrame name and id information incorrectly returned
  
  
  frames[0].name (should be frame0_name): frame0_name
  
  frames[0].id (should be undefined): undefined
  
  
  frames[0].name (should be frame0_newname): frame0_newname
  
  frames[0].id (should be frame0_newid): frame0_newid
  
  
  
  1.1                  WebCore/layout-tests/fast/frames/iframe-name-and-id.html
  
  Index: iframe-name-and-id.html
  ===================================================================
  <html>
  <head>
  <script>
  function print(message) {
  	var paragraph = document.createElement("p");
  	paragraph.appendChild(document.createTextNode(message));
  	document.getElementById("console").appendChild(paragraph);
  }
  
  function test() {
  	if (window.layoutTestController) {
  		window.layoutTestController.dumpAsText();
  	}
  	
  	print("frames[0].name (should be frame0_name): " + frames[0].name);
  	print("frames[0].id (should be undefined): " + frames[0].id);
  	print("");
  
  	frames[0].name = "frame0_newname"
  	frames[0].id = "frame0_newid";
  	print("frames[0].name (should be frame0_newname): " + frames[0].name);
  	print("frames[0].id (should be frame0_newid): " + frames[0].id);
  }
  </script>
  </head>
  <body onload="test()">
  <p>Tests: getting and setting frames[x].name on an iFrame</p>
  <p>Related bug: <i>rdar://problem/4170960 http://bugzilla.opendarwin.org/show_bug.cgi?id=3952 <a href=http://bugzilla.opendarwin.org/show_bug.cgi?id=3952>iFrame name and id information incorrectly returned</a></i></p>
  <hr>
  <div id='console'/>
  <iframe name="frame0_name" id="frame0_id"></iframe>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list