[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:22:21 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d7cb0b13d668e1639eab2b79e470298cd2b3d372
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 28 21:55:50 2003 +0000

            Reviewed by Ken and Maciej.
    
            - fixed remaining bit of 3142646 -- JavaScript Error reported at www.hotmail.com after first time
    
            The problem was that forms that were attached, but had no render object yet, were
            not in the form names dictionary. This causes trouble for JavaScript that runs before
            style sheets load, since the FOUC code makes us not create render objects at that stage.
    
            * khtml/html/html_formimpl.cpp:
            (HTMLFormElementImpl::attach): Don't check m_render before adding to dictionary.
            (HTMLFormElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
            to track the name of the form in the dictionary.
    
            * khtml/html/html_imageimpl.cpp:
            (HTMLImageElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
            to track the name of the image in the dictionary.
            (HTMLImageElementImpl::attach): Don't check m_render before adding to dictionary.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3479 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index cb40c82..e16e0fc 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2003-01-28  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken and Maciej.
+
+        - fixed remaining bit of 3142646 -- JavaScript Error reported at www.hotmail.com after first time
+
+        The problem was that forms that were attached, but had no render object yet, were
+        not in the form names dictionary. This causes trouble for JavaScript that runs before
+        style sheets load, since the FOUC code makes us not create render objects at that stage.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLFormElementImpl::attach): Don't check m_render before adding to dictionary.
+        (HTMLFormElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
+        to track the name of the form in the dictionary.
+
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
+        to track the name of the image in the dictionary.
+        (HTMLImageElementImpl::attach): Don't check m_render before adding to dictionary.
+
 2003-01-28  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by John.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index cb40c82..e16e0fc 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2003-01-28  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken and Maciej.
+
+        - fixed remaining bit of 3142646 -- JavaScript Error reported at www.hotmail.com after first time
+
+        The problem was that forms that were attached, but had no render object yet, were
+        not in the form names dictionary. This causes trouble for JavaScript that runs before
+        style sheets load, since the FOUC code makes us not create render objects at that stage.
+
+        * khtml/html/html_formimpl.cpp:
+        (HTMLFormElementImpl::attach): Don't check m_render before adding to dictionary.
+        (HTMLFormElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
+        to track the name of the form in the dictionary.
+
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
+        to track the name of the image in the dictionary.
+        (HTMLImageElementImpl::attach): Don't check m_render before adding to dictionary.
+
 2003-01-28  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by John.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 8674a34..841fad4 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -106,7 +106,7 @@ void HTMLFormElementImpl::attach()
 {
     HTMLElementImpl::attach();
 
-    if (m_render && getDocument()->isHTMLDocument()) {
+    if (getDocument()->isHTMLDocument()) {
 	HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
 	document->addNamedImageOrForm(oldNameAttr);
 	document->addNamedImageOrForm(oldIdAttr);
@@ -565,7 +565,7 @@ void HTMLFormElementImpl::parseAttribute(AttributeImpl *attr)
     case ATTR_NAME:
 	{
 	    QString newNameAttr = attr->value().string();
-	    if (m_render && getDocument()->isHTMLDocument()) {
+	    if (attached() && getDocument()->isHTMLDocument()) {
 		HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
 		document->removeNamedImageOrForm(oldNameAttr);
 		document->addNamedImageOrForm(newNameAttr);
@@ -576,7 +576,7 @@ void HTMLFormElementImpl::parseAttribute(AttributeImpl *attr)
     case ATTR_ID:
 	{
 	    QString newIdAttr = attr->value().string();
-	    if (m_render && getDocument()->isHTMLDocument()) {
+	    if (attached() && getDocument()->isHTMLDocument()) {
 		HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
 		document->removeNamedImageOrForm(oldIdAttr);
 		document->addNamedImageOrForm(newIdAttr);
diff --git a/WebCore/khtml/html/html_imageimpl.cpp b/WebCore/khtml/html/html_imageimpl.cpp
index 717092d..dc53c5a 100644
--- a/WebCore/khtml/html/html_imageimpl.cpp
+++ b/WebCore/khtml/html/html_imageimpl.cpp
@@ -138,7 +138,7 @@ void HTMLImageElementImpl::parseAttribute(AttributeImpl *attr)
     case ATTR_NAME:
 	{
 	    QString newNameAttr = attr->value().string();
-	    if (m_render && getDocument()->isHTMLDocument()) {
+	    if (attached() && getDocument()->isHTMLDocument()) {
 		HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
 		document->removeNamedImageOrForm(oldNameAttr);
 		document->addNamedImageOrForm(newNameAttr);
@@ -149,7 +149,7 @@ void HTMLImageElementImpl::parseAttribute(AttributeImpl *attr)
     case ATTR_ID:
 	{
 	    QString newIdAttr = attr->value().string();
-	    if (m_render && getDocument()->isHTMLDocument()) {
+	    if (attached() && getDocument()->isHTMLDocument()) {
 		HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
 		document->removeNamedImageOrForm(oldIdAttr);
 		document->addNamedImageOrForm(newIdAttr);
@@ -192,14 +192,14 @@ RenderObject *HTMLImageElementImpl::createRenderer(RenderArena *arena, RenderSty
 void HTMLImageElementImpl::attach()
 {
     createRendererIfNeeded();
-
     if (m_render) {
         m_render->updateFromElement();
-        if (getDocument()->isHTMLDocument()) {
-            HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
-            document->addNamedImageOrForm(oldIdAttr);
-            document->addNamedImageOrForm(oldNameAttr);
-        }
+    }
+
+    if (getDocument()->isHTMLDocument()) {
+        HTMLDocumentImpl *document = static_cast<HTMLDocumentImpl *>(getDocument());
+        document->addNamedImageOrForm(oldIdAttr);
+        document->addNamedImageOrForm(oldNameAttr);
     }
 
     NodeBaseImpl::attach();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list