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

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:36:48 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 37c87ed2d02b5c20e8c3810c6ff4dc3f0be5d48a
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Apr 26 00:08:34 2004 +0000

            Reviewed by Darin.
    
    	<rdar://problem/3628309>: Fedex tracking page so slow it seems like a hang (site change?)
    	<rdar://problem/3608061>: "ATI Developer site so slow it seems like a hang"
    	<rdar://problem/3612130>: "Reproducible hang in JavaScript at www.tfl.gov.uk"
    	<rdar://problem/3626022>: "Safari was consuming > 100% CPU on dual-G5 Mac, sample shows JavaScript"
    	<rdar://problem/3632348>: "www.whatis.com search for "pivot table" leads to JavaScript hang"
    
            * khtml/ecma/kjs_html.cpp:
            (KJS::HTMLElement::getValueProperty): The "text" property for anchors should be
    	innerText, not innerHTML.
            * khtml/html/html_elementimpl.cpp:
            (HTMLElementImpl::innerText): Make sure not to include all the text after an
    	element if it has no children.
            * layout-tests/fast/dom/anchor-text-expected.txt: Added.
            * layout-tests/fast/dom/anchor-text.html: Added.
            * layout-tests/fast/dom/inner-text-expected.txt: Added.
            * layout-tests/fast/dom/inner-text.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6480 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/fast/dom/anchor-text-expected.txt b/LayoutTests/fast/dom/anchor-text-expected.txt
new file mode 100644
index 0000000..4b671da
--- /dev/null
+++ b/LayoutTests/fast/dom/anchor-text-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x34
+  RenderBlock {HTML} at (0,0) size 800x34
+    RenderBody {BODY} at (8,8) size 784x18
+      RenderInline {A} at (0,0) size 236x18 [color=#0000EE]
+        RenderInline {B} at (0,0) size 236x18
+          RenderText {TEXT} at (0,0) size 236x18
+            text run at (0,0) width 236: "the second copy should not be bold"
+      RenderText {TEXT} at (236,0) size 4x18
+        text run at (236,0) width 4: " "
+      RenderInline {B} at (0,0) size 236x18
+        RenderText {TEXT} at (240,0) size 236x18
+          text run at (240,0) width 236: "the second copy should not be bold"
diff --git a/LayoutTests/fast/dom/anchor-text.html b/LayoutTests/fast/dom/anchor-text.html
new file mode 100644
index 0000000..a5c6e97
--- /dev/null
+++ b/LayoutTests/fast/dom/anchor-text.html
@@ -0,0 +1,4 @@
+<a id="x" href="http://www.google.com"><b>the second copy should not be bold</b></a>
+<script>
+document.write(document.getElementById("x").text);
+</script>
\ No newline at end of file
diff --git a/LayoutTests/fast/dom/inner-text-expected.txt b/LayoutTests/fast/dom/inner-text-expected.txt
new file mode 100644
index 0000000..f47ebf5
--- /dev/null
+++ b/LayoutTests/fast/dom/inner-text-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x62
+  RenderBlock {HTML} at (0,0) size 800x62
+    RenderBody {BODY} at (8,8) size 784x46
+      RenderImage {IMG} at (0,0) size 24x24
+      RenderText {TEXT} at (24,10) size 225x18
+        text run at (24,10) width 225: " This text should only appear once. "
+      RenderText {TEXT} at (249,10) size 466x36
+        text run at (249,10) width 217: "This text should only appear once."
+        text run at (0,28) width 378: "document.write(document.getElementById(\"x\").innerText);"
diff --git a/LayoutTests/fast/dom/inner-text.html b/LayoutTests/fast/dom/inner-text.html
new file mode 100644
index 0000000..4f06f8d
--- /dev/null
+++ b/LayoutTests/fast/dom/inner-text.html
@@ -0,0 +1,5 @@
+<img id="x" src="broken.gif">
+This text should only appear once.
+<script>
+document.write(document.getElementById("x").innerText);
+</script>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ed8441a..c67912c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2004-04-25  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	<rdar://problem/3628309>: Fedex tracking page so slow it seems like a hang (site change?)
+	<rdar://problem/3608061>: "ATI Developer site so slow it seems like a hang"
+	<rdar://problem/3612130>: "Reproducible hang in JavaScript at www.tfl.gov.uk"
+	<rdar://problem/3626022>: "Safari was consuming > 100% CPU on dual-G5 Mac, sample shows JavaScript"
+	<rdar://problem/3632348>: "www.whatis.com search for "pivot table" leads to JavaScript hang"
+	
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLElement::getValueProperty): The "text" property for anchors should be
+	innerText, not innerHTML.
+        * khtml/html/html_elementimpl.cpp:
+        (HTMLElementImpl::innerText): Make sure not to include all the text after an
+	element if it has no children.
+        * layout-tests/fast/dom/anchor-text-expected.txt: Added.
+        * layout-tests/fast/dom/anchor-text.html: Added.
+        * layout-tests/fast/dom/inner-text-expected.txt: Added.
+        * layout-tests/fast/dom/inner-text.html: Added.
+
 2004-04-24  Darin Adler  <darin at apple.com>
 
         Reviewed by Dave.
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index c4e3a80..a01f81c 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -1544,7 +1544,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
     case AnchorShape:           return String(anchor.shape());
     case AnchorTabIndex:        return Number(anchor.tabIndex());
     case AnchorTarget:          return String(anchor.target());
-    case AnchorText:            return String(anchor.innerHTML());
+    case AnchorText:            return String(anchor.innerText());
     case AnchorType:            return String(anchor.type());
     }
   }
diff --git a/WebCore/khtml/html/html_elementimpl.cpp b/WebCore/khtml/html/html_elementimpl.cpp
index 4b4df19..687aa0e 100644
--- a/WebCore/khtml/html/html_elementimpl.cpp
+++ b/WebCore/khtml/html/html_elementimpl.cpp
@@ -614,9 +614,12 @@ DOMString HTMLElementImpl::innerText() const
 {
     DOMString text;
 
-    const NodeImpl *n = this;
+    const NodeImpl *n = firstChild();
     // find the next text/image after the anchor, to get a position
     while(n) {
+        if(n->isTextNode() ) {
+            text += static_cast<const TextImpl *>(n)->data();
+        }
         if(n->firstChild())
             n = n->firstChild();
         else if(n->nextSibling())
@@ -630,9 +633,6 @@ DOMString HTMLElementImpl::innerText() const
             }
             n = next;
         }
-        if(n->isTextNode() ) {
-            text += static_cast<const TextImpl *>(n)->data();
-        }
     }
  end:
     return text;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list