[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:23:20 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9699da118002dbf92b424778f5dfdd74d84c974f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 3 17:02:45 2003 +0000

            Reviewed by Maciej.
    
            - fixed 3146862 -- meta http-equiv refresh with a space before the delay does not work
    
            * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
            Fix code that was trying to use positions within the whitespace-stripped string,
            but extracting substrings from the non-stripped original.
    
            - tweaks to render tree dumping format
    
            * khtml/rendering/render_block.h: Make renderName not be inline, since
            an inline virtual function doesn't really do any good.
            * khtml/rendering/render_block.cpp: (RenderBlock::renderName): Use the
            string RenderBlock instead of the string Block for consistency with all the
            other renderName results.
    
            * khtml/rendering/render_inline.h: Make renderName not be inline, since
            an inline virtual function doesn't really do any good.
            * khtml/rendering/render_inline.cpp: (RenderInline::renderName): Use the
            string RenderInline instead of the string Inline for consistency with all the
            other renderName results.
    
            * khtml/rendering/render_text.h: Make textSlaves() a const member function.
            * kwq/KWQRenderTreeDebug.cpp:
            (operator<<): Format rectangles as "x at (1,2) size 3x4" rather than "(1,2,3,4)".
            (quoteAndEscapeNonPrintables): Added. Makes it easy to turn an arbitrary Unicode
            string into something that's all ASCII.
            (writeTextSlave): Change this so it also writes out the text.
            (write): Call the new writeTextSlave, and also use "layer" instead of "RenderLayer".
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3541 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2c9946d..e4a006c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,35 @@
+2003-02-03  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed 3146862 -- meta http-equiv refresh with a space before the delay does not work
+
+        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
+        Fix code that was trying to use positions within the whitespace-stripped string,
+        but extracting substrings from the non-stripped original.
+
+        - tweaks to render tree dumping format
+
+        * khtml/rendering/render_block.h: Make renderName not be inline, since
+        an inline virtual function doesn't really do any good.
+        * khtml/rendering/render_block.cpp: (RenderBlock::renderName): Use the
+        string RenderBlock instead of the string Block for consistency with all the
+        other renderName results.
+        
+        * khtml/rendering/render_inline.h: Make renderName not be inline, since
+        an inline virtual function doesn't really do any good.
+        * khtml/rendering/render_inline.cpp: (RenderInline::renderName): Use the
+        string RenderInline instead of the string Inline for consistency with all the
+        other renderName results.
+        
+        * khtml/rendering/render_text.h: Make textSlaves() a const member function.
+        * kwq/KWQRenderTreeDebug.cpp:
+        (operator<<): Format rectangles as "x at (1,2) size 3x4" rather than "(1,2,3,4)".
+        (quoteAndEscapeNonPrintables): Added. Makes it easy to turn an arbitrary Unicode
+        string into something that's all ASCII.
+        (writeTextSlave): Change this so it also writes out the text.
+        (write): Call the new writeTextSlave, and also use "layer" instead of "RenderLayer".
+
 2003-02-01  Darin Adler  <darin at apple.com>
 
         - fix mistake that broke build
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2c9946d..e4a006c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,35 @@
+2003-02-03  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed 3146862 -- meta http-equiv refresh with a space before the delay does not work
+
+        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
+        Fix code that was trying to use positions within the whitespace-stripped string,
+        but extracting substrings from the non-stripped original.
+
+        - tweaks to render tree dumping format
+
+        * khtml/rendering/render_block.h: Make renderName not be inline, since
+        an inline virtual function doesn't really do any good.
+        * khtml/rendering/render_block.cpp: (RenderBlock::renderName): Use the
+        string RenderBlock instead of the string Block for consistency with all the
+        other renderName results.
+        
+        * khtml/rendering/render_inline.h: Make renderName not be inline, since
+        an inline virtual function doesn't really do any good.
+        * khtml/rendering/render_inline.cpp: (RenderInline::renderName): Use the
+        string RenderInline instead of the string Inline for consistency with all the
+        other renderName results.
+        
+        * khtml/rendering/render_text.h: Make textSlaves() a const member function.
+        * kwq/KWQRenderTreeDebug.cpp:
+        (operator<<): Format rectangles as "x at (1,2) size 3x4" rather than "(1,2,3,4)".
+        (quoteAndEscapeNonPrintables): Added. Makes it easy to turn an arbitrary Unicode
+        string into something that's all ASCII.
+        (writeTextSlave): Change this so it also writes out the text.
+        (write): Call the new writeTextSlave, and also use "layer" instead of "RenderLayer".
+
 2003-02-01  Darin Adler  <darin at apple.com>
 
         - fix mistake that broke build
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 47f8480..280c4f0 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -1964,6 +1964,19 @@ void RenderBlock::close()
     RenderFlow::close();
 }
 
+const char *RenderBlock::renderName() const
+{
+    if (isFloating())
+        return "RenderBlock (floating)";
+    if (isPositioned())
+        return "RenderBlock (positioned)";
+    if (isAnonymousBox())
+        return "RenderBlock (anonymous)";
+    if (isRelPositioned())
+        return "RenderBlock (relative positioned)";
+    return "RenderBlock";
+}
+
 #ifndef NDEBUG
 void RenderBlock::printTree(int indent) const
 {
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index f56e14a..41b035d 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -35,18 +35,7 @@ public:
     RenderBlock(DOM::NodeImpl* node);
     virtual ~RenderBlock();
 
-    virtual const char *renderName() const
-    {
-        if (isFloating())
-            return "Block (Floating)";
-        if (isPositioned())
-            return "Block (Positioned)";
-        if (isAnonymousBox())
-            return "Block (Anonymous)";
-        if (isRelPositioned())
-            return "Block (Rel Positioned)";
-        return "Block";
-    };
+    virtual const char *renderName() const;
 
     virtual bool isRenderBlock() const { return true; }
     virtual bool containsSpecial() { return m_specialObjects!=0; }
diff --git a/WebCore/khtml/rendering/render_inline.cpp b/WebCore/khtml/rendering/render_inline.cpp
index 3f44470..ec7b12e 100644
--- a/WebCore/khtml/rendering/render_inline.cpp
+++ b/WebCore/khtml/rendering/render_inline.cpp
@@ -311,3 +311,11 @@ int RenderInline::offsetTop() const
     return y;
 }
 
+const char *RenderInline::renderName() const
+{
+    if (isRelPositioned())
+        return "RenderInline (relative positioned)";
+    if (isAnonymousBox())
+        return "RenderInline (anonymous)";
+    return "RenderInline";
+}
diff --git a/WebCore/khtml/rendering/render_inline.h b/WebCore/khtml/rendering/render_inline.h
index 6686339..b372e59 100644
--- a/WebCore/khtml/rendering/render_inline.h
+++ b/WebCore/khtml/rendering/render_inline.h
@@ -33,14 +33,7 @@ public:
     RenderInline(DOM::NodeImpl* node);
     virtual ~RenderInline();
 
-    virtual const char *renderName() const
-    {
-        if (isRelPositioned())
-            return "Inline (Rel Positioned)";
-        else if (isAnonymousBox())
-            return "Inline (Anonymous)";
-        return "Inline";
-    };
+    virtual const char *renderName() const;
 
     virtual bool isRenderInline() const { return true; }
     virtual bool childrenInline() const { return true; }
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index 2fbf5f7..ae0cff1 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -216,8 +216,7 @@ public:
     { return static_cast<DOM::TextImpl*>(RenderObject::element()); }
 
 #if APPLE_CHANGES
-    TextSlave * findTextSlave( int offset, int &pos );
-    TextSlaveArray textSlaves() { return m_lines; }
+    TextSlaveArray textSlaves() const { return m_lines; }
     int widthFromCache(const Font *, int start, int len) const;
     bool shouldUseMonospaceCache(const Font *) const;
     void cacheWidths();
@@ -226,10 +225,10 @@ public:
 protected:
     void paintTextOutline(QPainter *p, int tx, int ty, const QRect &prevLine, const QRect &thisLine, const QRect &nextLine);
 
-#if !APPLE_CHANGES
-    TextSlave * findTextSlave( int offset, int &pos );
-    
+#if APPLE_CHANGES
+public:
 #endif
+    TextSlave * findTextSlave( int offset, int &pos );
 
 protected: // members
     TextSlaveArray m_lines;
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 6ecd573..6d833d2 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1472,15 +1472,12 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
         {
             bool ok = false;
             int delay = 0;
-	    delay = content.implementation()->toInt(&ok);
+	    delay = str.toInt(&ok);
             if(ok) v->part()->scheduleRedirection(delay, v->part()->url().url() );
         } else {
             double delay = 0;
             bool ok = false;
-
-	    DOMStringImpl* s = content.implementation()->substring(0, pos);
-	    delay = QConstString(s->s, s->l).string().stripWhiteSpace().toDouble(&ok);
-	    delete s;
+	    delay = str.left(pos).stripWhiteSpace().toDouble(&ok);
 
             pos++;
             while(pos < (int)str.length() && str[pos].isSpace()) pos++;
diff --git a/WebCore/kwq/KWQRenderTreeDebug.cpp b/WebCore/kwq/KWQRenderTreeDebug.cpp
index f610fe5..cc72813 100644
--- a/WebCore/kwq/KWQRenderTreeDebug.cpp
+++ b/WebCore/kwq/KWQRenderTreeDebug.cpp
@@ -51,15 +51,14 @@ static void writeLayers(QTextStream &ts, const RenderObject &o, int indent = 0);
 
 static QTextStream &operator<<(QTextStream &ts, const QRect &r)
 {
-    return ts << "(" << r.x() << "," << r.y() << "," << r.width() << "," << r.height() << ")";
+    return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
 }
 
-static QTextStream &operator<<(QTextStream &ts, const TextSlave& slave)
+static void writeIndent(QTextStream &ts, int indent)
 {
-    ts << "TextSlave at pos (";
-    ts << slave.m_x << "," << slave.m_y << ") with width: " << slave.m_width;
-    ts << "\n"; 
-    return ts;
+    for (int i = 0; i != indent; ++i) {
+        ts << "  ";
+    }
 }
 
 static QTextStream &operator<<(QTextStream &ts, const RenderObject &o)
@@ -88,11 +87,36 @@ static QTextStream &operator<<(QTextStream &ts, const RenderObject &o)
     return ts;
 }
 
-static void writeIndent(QTextStream &ts, int indent)
+static QString quoteAndEscapeNonPrintables(const QString &s)
 {
-    for (int i = 0; i != indent; ++i) {
-        ts << "  ";
+    QString result;
+    result += '"';
+    for (uint i = 0; i != s.length(); ++i) {
+        QChar c = s.at(i);
+        if (c == '\\') {
+            result += "\\\\";
+        } else if (c == '"') {
+            result += "\\\"";
+        } else {
+            ushort u = c.unicode();
+            if (u >= 0x20 && u < 0x7F) {
+                result += c;
+            } else {
+                QString hex;
+                hex.sprintf("\\x{%X}", u);
+                result += hex;
+            }
+        }
     }
+    result += '"';
+    return result;
+}
+
+static void writeTextSlave(QTextStream &ts, const RenderText &o, const TextSlave &slave)
+{
+    ts << "text run at (" << slave.m_x << "," << slave.m_y << ") width " << slave.m_width << ": "
+    	<< quoteAndEscapeNonPrintables(o.data().string().mid(slave.m_start, slave.m_len))
+    	<< "\n"; 
 }
 
 static void write(QTextStream &ts, const RenderObject &o, int indent = 0)
@@ -102,11 +126,11 @@ static void write(QTextStream &ts, const RenderObject &o, int indent = 0)
     ts << o << "\n";
     
     if (o.isText()) {
-        RenderText* text = (RenderText*)(&o);
-        TextSlaveArray slaves = text->textSlaves();
+        const RenderText &text = static_cast<const RenderText &>(o);
+        TextSlaveArray slaves = text.textSlaves();
         for (unsigned int i = 0; i < slaves.count(); i++) {
             writeIndent(ts, indent+1);
-            ts << *slaves[i];
+            writeTextSlave(ts, text, *slaves[i]);
         }
     }
 
@@ -134,7 +158,7 @@ static void write(QTextStream &ts, const RenderLayerElement &e, int indent = 0)
     
     writeIndent(ts, indent);
     
-    ts << "RenderLayer";
+    ts << "layer";
     
     QRect r(l.xPos(), l.yPos(), l.width(), l.height());
     

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list