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

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:23:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9f5c96b7b274d35358c92c02bf2cd8f1457b7e3e
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 3 23:41:26 2003 +0000

    	Rename TextSlave to TextRun.
    
            Reviewed by darin
    
            * khtml/khtml_part.cpp:
            (firstRunAt):
            (lastRunAt):
            (startAndEndLineNodesIncludingNode):
            * khtml/rendering/bidi.cpp:
            (RenderBlock::layoutInlineChildren):
            * khtml/rendering/render_text.cpp:
            (TextRun::detach):
            (throw):
            (TextRun::operator delete):
            (TextRun::paintSelection):
            (TextRun::paintDecoration):
            (TextRun::paintBoxDecorations):
            (TextRun::checkSelectionPoint):
            (TextRunArray::TextRunArray):
            (TextRunArray::compareItems):
            (TextRunArray::findFirstMatching):
            (RenderText::detach):
            (RenderText::deleteRuns):
            (RenderText::findTextRun):
            (RenderText::nodeAtPoint):
            (RenderText::checkSelectionPoint):
            (RenderText::cursorPos):
            (RenderText::posOfChar):
            (RenderText::paintObject):
            (RenderText::position):
            (RenderText::width):
            * khtml/rendering/render_text.h:
            * kwq/KWQRenderTreeDebug.cpp:
            (writeTextRun):
            (write):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index be052b3..f44ec0d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,43 @@
 2003-02-03  David Hyatt  <hyatt at apple.com>
 
+	Rename TextSlave to TextRun.
+	
+        Reviewed by darin
+
+        * khtml/khtml_part.cpp:
+        (firstRunAt):
+        (lastRunAt):
+        (startAndEndLineNodesIncludingNode):
+        * khtml/rendering/bidi.cpp:
+        (RenderBlock::layoutInlineChildren):
+        * khtml/rendering/render_text.cpp:
+        (TextRun::detach):
+        (throw):
+        (TextRun::operator delete):
+        (TextRun::paintSelection):
+        (TextRun::paintDecoration):
+        (TextRun::paintBoxDecorations):
+        (TextRun::checkSelectionPoint):
+        (TextRunArray::TextRunArray):
+        (TextRunArray::compareItems):
+        (TextRunArray::findFirstMatching):
+        (RenderText::detach):
+        (RenderText::deleteRuns):
+        (RenderText::findTextRun):
+        (RenderText::nodeAtPoint):
+        (RenderText::checkSelectionPoint):
+        (RenderText::cursorPos):
+        (RenderText::posOfChar):
+        (RenderText::paintObject):
+        (RenderText::position):
+        (RenderText::width):
+        * khtml/rendering/render_text.h:
+        * kwq/KWQRenderTreeDebug.cpp:
+        (writeTextRun):
+        (write):
+
+2003-02-03  David Hyatt  <hyatt at apple.com>
+
 	Fix for assertion on nasdaq.com.  Patch containingBlock
 	to return 0 when it can't find a containingBlock at all (e.g.,
 	when the object is orphaned).
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index be052b3..f44ec0d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,43 @@
 2003-02-03  David Hyatt  <hyatt at apple.com>
 
+	Rename TextSlave to TextRun.
+	
+        Reviewed by darin
+
+        * khtml/khtml_part.cpp:
+        (firstRunAt):
+        (lastRunAt):
+        (startAndEndLineNodesIncludingNode):
+        * khtml/rendering/bidi.cpp:
+        (RenderBlock::layoutInlineChildren):
+        * khtml/rendering/render_text.cpp:
+        (TextRun::detach):
+        (throw):
+        (TextRun::operator delete):
+        (TextRun::paintSelection):
+        (TextRun::paintDecoration):
+        (TextRun::paintBoxDecorations):
+        (TextRun::checkSelectionPoint):
+        (TextRunArray::TextRunArray):
+        (TextRunArray::compareItems):
+        (TextRunArray::findFirstMatching):
+        (RenderText::detach):
+        (RenderText::deleteRuns):
+        (RenderText::findTextRun):
+        (RenderText::nodeAtPoint):
+        (RenderText::checkSelectionPoint):
+        (RenderText::cursorPos):
+        (RenderText::posOfChar):
+        (RenderText::paintObject):
+        (RenderText::position):
+        (RenderText::width):
+        * khtml/rendering/render_text.h:
+        * kwq/KWQRenderTreeDebug.cpp:
+        (writeTextRun):
+        (write):
+
+2003-02-03  David Hyatt  <hyatt at apple.com>
+
 	Fix for assertion on nasdaq.com.  Patch containingBlock
 	to return 0 when it can't find a containingBlock at all (e.g.,
 	when the object is orphaned).
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 3df105b..89d1e21 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -97,7 +97,7 @@ using namespace DOM;
 #endif
 
 using khtml::RenderText;
-using khtml::TextSlaveArray;
+using khtml::TextRunArray;
 
 namespace khtml {
     class PartStyleSheetLoader : public CachedObjectClient
@@ -3977,22 +3977,22 @@ void KHTMLPart::customEvent( QCustomEvent *event )
 
 #if APPLE_CHANGES
 
-static bool firstSlaveAt(RenderObject *renderNode, int y, NodeImpl *&startNode, long &startOffset)
+static bool firstRunAt(RenderObject *renderNode, int y, NodeImpl *&startNode, long &startOffset)
 {
     for (RenderObject *n = renderNode; n; n = n->nextSibling()) {
         if (n->isText()) {
             RenderText *textRenderer = static_cast<khtml::RenderText *>(n);
-            TextSlaveArray slaves = textRenderer->textSlaves();
-            for (unsigned i = 0; i != slaves.count(); i++) {
-                if (slaves[i]->m_y == y) {
+            TextRunArray runs = textRenderer->textRuns();
+            for (unsigned i = 0; i != runs.count(); i++) {
+                if (runs[i]->m_y == y) {
                     startNode = textRenderer->element();
-                    startOffset = slaves[i]->m_start;
+                    startOffset = runs[i]->m_start;
                     return true;
                 }
             }
         }
         
-        if (firstSlaveAt(n->firstChild(), y, startNode, startOffset)) {
+        if (firstRunAt(n->firstChild(), y, startNode, startOffset)) {
             return true;
         }
     }
@@ -4000,7 +4000,7 @@ static bool firstSlaveAt(RenderObject *renderNode, int y, NodeImpl *&startNode,
     return false;
 }
 
-static bool lastSlaveAt(RenderObject *renderNode, int y, NodeImpl *&endNode, long &endOffset)
+static bool lastRunAt(RenderObject *renderNode, int y, NodeImpl *&endNode, long &endOffset)
 {
     RenderObject *n = renderNode;
     if (!n) {
@@ -4012,17 +4012,17 @@ static bool lastSlaveAt(RenderObject *renderNode, int y, NodeImpl *&endNode, lon
     }
     
     while (1) {
-        if (lastSlaveAt(n->firstChild(), y, endNode, endOffset)) {
+        if (lastRunAt(n->firstChild(), y, endNode, endOffset)) {
             return true;
         }
     
         if (n->isText()) {
             RenderText *textRenderer =  static_cast<khtml::RenderText *>(n);
-            TextSlaveArray slaves = textRenderer->textSlaves();
-            for (int i = (int)slaves.count()-1; i >= 0; i--) {
-                if (slaves[i]->m_y == y) {
+            TextRunArray runs = textRenderer->textRuns();
+            for (int i = (int)runs.count()-1; i >= 0; i--) {
+                if (runs[i]->m_y == y) {
                     endNode = textRenderer->element();
-                    endOffset = slaves[i]->m_start + slaves[i]->m_len;
+                    endOffset = runs[i]->m_start + runs[i]->m_len;
                     return true;
                 }
             }
@@ -4042,15 +4042,15 @@ static bool startAndEndLineNodesIncludingNode (DOM::NodeImpl *node, int offset,
         int pos;
         int selectionPointY;
         khtml::RenderText *renderer = static_cast<khtml::RenderText *>(node->renderer());
-        khtml::TextSlave * slave = renderer->findTextSlave( offset, pos );
+        khtml::TextRun * run = renderer->findTextRun( offset, pos );
         DOMString t = node->nodeValue();
         DOM::NodeImpl* startNode;
         DOM::NodeImpl* endNode;
         
-        if (!slave)
+        if (!run)
             return false;
             
-        selectionPointY = slave->m_y;
+        selectionPointY = run->m_y;
         
         // Go up to first non-inline element.
         khtml::RenderObject *renderNode = renderer;
@@ -4061,12 +4061,12 @@ static bool startAndEndLineNodesIncludingNode (DOM::NodeImpl *node, int offset,
         
         // Look for all the first child in the block that is on the same line
         // as the selection point.
-        if (!firstSlaveAt (renderNode, selectionPointY, startNode, startOffset))
+        if (!firstRunAt (renderNode, selectionPointY, startNode, startOffset))
             return false;
     
         // Look for all the last child in the block that is on the same line
         // as the selection point.
-        if (!lastSlaveAt (renderNode, selectionPointY, endNode, endOffset))
+        if (!lastRunAt (renderNode, selectionPointY, endNode, endOffset))
             return false;
         
         _startNode = startNode;
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 125dac8..5abb141 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -1048,7 +1048,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren)
                     o->containingBlock()->insertSpecialObject(o);
             }
             else if(o->isText())
-                static_cast<RenderText *>(o)->deleteSlaves();
+                static_cast<RenderText *>(o)->deleteRuns();
             o = Bidinext( this, o );
         }
 
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index c6a0515..f8cc399 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -42,37 +42,37 @@ using namespace khtml;
 using namespace DOM;
 
 #ifndef NDEBUG
-static bool inTextSlaveDetach;
+static bool inTextRunDetach;
 #endif
 
-void TextSlave::detach(RenderArena* renderArena)
+void TextRun::detach(RenderArena* renderArena)
 {
 #ifndef NDEBUG
-    inTextSlaveDetach = true;
+    inTextRunDetach = true;
 #endif
     delete this;
 #ifndef NDEBUG
-    inTextSlaveDetach = false;
+    inTextRunDetach = false;
 #endif
     
     // Recover the size left there for us by operator delete and free the memory.
     renderArena->free(*(size_t *)this, this);
 }
 
-void* TextSlave::operator new(size_t sz, RenderArena* renderArena) throw()
+void* TextRun::operator new(size_t sz, RenderArena* renderArena) throw()
 {
     return renderArena->allocate(sz);
 }
 
-void TextSlave::operator delete(void* ptr, size_t sz)
+void TextRun::operator delete(void* ptr, size_t sz)
 {
-    assert(inTextSlaveDetach);
+    assert(inTextRunDetach);
     
     // Stash size where detach can find it.
     *(size_t *)ptr = sz;
 }
 
-void TextSlave::paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos)
+void TextRun::paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos)
 {
     if(startPos > m_len) return;
     if(startPos < 0) startPos = 0;
@@ -91,14 +91,14 @@ void TextSlave::paintSelection(const Font *f, RenderText *text, QPainter *p, Ren
 #endif
     ty += m_baseline;
 
-    //kdDebug( 6040 ) << "textSlave::painting(" << s.string() << ") at(" << x+_tx << "/" << y+_ty << ")" << endl;
+    //kdDebug( 6040 ) << "textRun::painting(" << s.string() << ") at(" << x+_tx << "/" << y+_ty << ")" << endl;
     f->drawText(p, m_x + tx, m_y + ty, text->str->s, text->str->l, m_start, m_len,
 		m_toAdd, m_reversed ? QPainter::RTL : QPainter::LTR, startPos, endPos, c);
     p->restore();
 }
 
 #ifdef APPLE_CHANGES
-void TextSlave::paintDecoration( QPainter *pt, const Font *f, RenderText* p,
+void TextRun::paintDecoration( QPainter *pt, const Font *f, RenderText* p,
                                  int _tx, int _ty, int deco, bool begin, bool end, int from, int to)
 {
     _tx += m_x;
@@ -119,7 +119,7 @@ void TextSlave::paintDecoration( QPainter *pt, const Font *f, RenderText* p,
     }
 }
 #else
-void TextSlave::paintDecoration( QPainter *pt, RenderText* p, int _tx, int _ty, int decoration, bool begin, bool end)
+void TextRun::paintDecoration( QPainter *pt, RenderText* p, int _tx, int _ty, int decoration, bool begin, bool end)
 {
     _tx += m_x;
     _ty += m_y;
@@ -148,7 +148,7 @@ void TextSlave::paintDecoration( QPainter *pt, RenderText* p, int _tx, int _ty,
 #endif
 
 
-void TextSlave::paintBoxDecorations(QPainter *pt, RenderStyle* style, RenderText *p, int _tx, int _ty, bool begin, bool end)
+void TextRun::paintBoxDecorations(QPainter *pt, RenderStyle* style, RenderText *p, int _tx, int _ty, bool begin, bool end)
 {
     int topExtra = p->borderTop() + p->paddingTop();
     int bottomExtra = p->borderBottom() + p->paddingBottom();
@@ -187,9 +187,9 @@ void TextSlave::paintBoxDecorations(QPainter *pt, RenderStyle* style, RenderText
 
 #define LOCAL_WIDTH_BUF_SIZE	1024
 
-FindSelectionResult TextSlave::checkSelectionPoint(int _x, int _y, int _tx, int _ty, const Font *f, RenderText *text, int & offset, short lineHeight)
+FindSelectionResult TextRun::checkSelectionPoint(int _x, int _y, int _tx, int _ty, const Font *f, RenderText *text, int & offset, short lineHeight)
 {
-//     kdDebug(6040) << "TextSlave::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
+//     kdDebug(6040) << "TextRun::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
 //                   << " _tx+m_x=" << _tx+m_x << " _ty+m_y=" << _ty+m_y << endl;
     offset = 0;
 
@@ -261,7 +261,7 @@ FindSelectionResult TextSlave::checkSelectionPoint(int _x, int _y, int _tx, int
         free (widths);
 #else
     int delta = _x - (_tx + m_x);
-    //kdDebug(6040) << "TextSlave::checkSelectionPoint delta=" << delta << endl;
+    //kdDebug(6040) << "TextRun::checkSelectionPoint delta=" << delta << endl;
     int pos = 0;
     if ( m_reversed ) {
 	delta -= m_width;
@@ -293,21 +293,21 @@ FindSelectionResult TextSlave::checkSelectionPoint(int _x, int _y, int _tx, int
 
 // -----------------------------------------------------------------------------
 
-TextSlaveArray::TextSlaveArray()
+TextRunArray::TextRunArray()
 {
     setAutoDelete(false);
 }
 
-int TextSlaveArray::compareItems( Item d1, Item d2 )
+int TextRunArray::compareItems( Item d1, Item d2 )
 {
     assert(d1);
     assert(d2);
 
-    return static_cast<TextSlave*>(d1)->m_y - static_cast<TextSlave*>(d2)->m_y;
+    return static_cast<TextRun*>(d1)->m_y - static_cast<TextRun*>(d2)->m_y;
 }
 
 // remove this once QVector::bsearch is fixed
-int TextSlaveArray::findFirstMatching(Item d) const
+int TextRunArray::findFirstMatching(Item d) const
 {
     int len = count();
 
@@ -398,11 +398,11 @@ RenderText::~RenderText()
 
 void RenderText::detach(RenderArena* renderArena)
 {
-    deleteSlaves(renderArena);
+    deleteRuns(renderArena);
     RenderObject::detach(renderArena);
 }
 
-void RenderText::deleteSlaves(RenderArena *arena)
+void RenderText::deleteRuns(RenderArena *arena)
 {
     // this is a slight variant of QArray::clear().
     // We don't delete the array itself here because its
@@ -413,7 +413,7 @@ void RenderText::deleteSlaves(RenderArena *arena)
         if (!arena)
             arena = renderArena();
         for(unsigned int i=0; i < len; i++) {
-            TextSlave* s = m_lines.at(i);
+            TextRun* s = m_lines.at(i);
             if (s)
                 s->detach(arena);
             m_lines.remove(i);
@@ -423,17 +423,17 @@ void RenderText::deleteSlaves(RenderArena *arena)
     KHTMLAssert(m_lines.count() == 0);
 }
 
-TextSlave * RenderText::findTextSlave( int offset, int &pos )
+TextRun * RenderText::findTextRun( int offset, int &pos )
 {
-    // The text slaves point to parts of the rendertext's str string
+    // The text runs point to parts of the rendertext's str string
     // (they don't include '\n')
-    // Find the text slave that includes the character at @p offset
-    // and return pos, which is the position of the char in the slave.
+    // Find the text run that includes the character at @p offset
+    // and return pos, which is the position of the char in the run.
 
     if ( m_lines.isEmpty() )
         return 0L;
 
-    TextSlave* s = m_lines[0];
+    TextRun* s = m_lines[0];
     uint si = 1;
     int off = s->m_len;
     while(offset > off && si < m_lines.count())
@@ -441,7 +441,7 @@ TextSlave * RenderText::findTextSlave( int offset, int &pos )
         s = m_lines[si++];
         off = s->m_start + s->m_len;
     }
-    // we are now in the correct text slave
+    // we are now in the correct text run
     pos = (offset > off ? s->m_len : s->m_len - (off - offset) );
     return s;
 }
@@ -456,7 +456,7 @@ bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, b
     int height = m_lineHeight + borderTop() + paddingTop() +
                  borderBottom() + paddingBottom();
 
-    TextSlave *s = m_lines.count() ? m_lines[0] : 0;
+    TextRun *s = m_lines.count() ? m_lines[0] : 0;
     int si = 0;
     while(s) {
         if((_y >=_ty + s->m_y) && (_y < _ty + s->m_y + height) &&
@@ -495,24 +495,24 @@ FindSelectionResult RenderText::checkSelectionPoint(int _x, int _y, int _tx, int
 {
 //     kdDebug(6040) << "RenderText::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
 //                   << " _tx=" << _tx << " _ty=" << _ty << endl;
-    TextSlave *lastPointAfterInline=0;
+    TextRun *lastPointAfterInline=0;
 
     for(unsigned int si = 0; si < m_lines.count(); si++)
     {
-        TextSlave* s = m_lines[si];
+        TextRun* s = m_lines[si];
         int result;
         const Font *f = htmlFont( si==0 );
         result = s->checkSelectionPoint(_x, _y, _tx, _ty, f, this, offset, m_lineHeight);
 
 //         kdDebug(6040) << "RenderText::checkSelectionPoint " << this << " line " << si << " result=" << result << " offset=" << offset << endl;
-        if ( result == SelectionPointInside ) // x,y is inside the textslave
+        if ( result == SelectionPointInside ) // x,y is inside the textrun
         {
             offset += s->m_start; // add the offset from the previous lines
             //kdDebug(6040) << "RenderText::checkSelectionPoint inside -> " << offset << endl;
             node = element();
             return SelectionPointInside;
         } else if ( result == SelectionPointBefore ) {
-            // x,y is before the textslave -> stop here
+            // x,y is before the textrun -> stop here
             if ( si > 0 && lastPointAfterInline ) {
                 offset = lastPointAfterInline->m_start + lastPointAfterInline->m_len;
                 //kdDebug(6040) << "RenderText::checkSelectionPoint before -> " << offset << endl;
@@ -545,7 +545,7 @@ void RenderText::cursorPos(int offset, int &_x, int &_y, int &height)
   }
 
   int pos;
-  TextSlave * s = findTextSlave( offset, pos );
+  TextRun * s = findTextRun( offset, pos );
   _y = s->m_y;
   height = m_lineHeight; // ### firstLine!!! s->m_height;
 
@@ -597,7 +597,7 @@ void RenderText::posOfChar(int chr, int &x, int &y)
     //chr = str->l;
 
     int pos;
-    TextSlave * s = findTextSlave( chr, pos );
+    TextRun * s = findTextRun( chr, pos );
 
     if ( s )
     {
@@ -621,7 +621,7 @@ void RenderText::paintObject(QPainter *p, int /*x*/, int y, int /*w*/, int h,
     int ow = style()->outlineWidth();
     RenderStyle* pseudoStyle = style()->getPseudoStyle(RenderStyle::FIRST_LINE);
     int d = style()->textDecoration();
-    TextSlave f(0, y-ty);
+    TextRun f(0, y-ty);
     int si = m_lines.findFirstMatching(&f);
     // something matching found, find the first one to print
     bool isPrinting = (p->device()->devType() == QInternal::Printer);
@@ -649,7 +649,7 @@ void RenderText::paintObject(QPainter *p, int /*x*/, int y, int /*w*/, int h,
             //kdDebug(6040) << this << " Selection from " << startPos << " to " << endPos << endl;
         }
 
-        TextSlave* s;
+        TextRun* s;
         int minx =  1000000;
         int maxx = -1000000;
         int outlinebox_y = m_lines[si]->m_y;
@@ -1212,10 +1212,10 @@ void RenderText::position(int x, int y, int from, int len, int width, bool rever
 #ifdef DEBUG_LAYOUT
     QChar *ch = str->s+from;
     QConstString cstr(ch, len);
-    qDebug("setting slave text to *%s*, len=%d, w)=%d" , cstr.string().latin1(), len, width );//" << y << ")" << " height=" << lineHeight(false) << " fontHeight=" << metrics(false).height() << " ascent =" << metrics(false).ascent() << endl;
+    qDebug("setting run text to *%s*, len=%d, w)=%d" , cstr.string().latin1(), len, width );//" << y << ")" << " height=" << lineHeight(false) << " fontHeight=" << metrics(false).height() << " ascent =" << metrics(false).ascent() << endl;
 #endif
 
-    TextSlave *s = new (renderArena()) TextSlave(x, y, from, len,
+    TextRun *s = new (renderArena()) TextRun(x, y, from, len,
                                  baselinePosition( firstLine ),
                                  width+spaceAdd, reverse, spaceAdd, firstLine);
 
@@ -1271,7 +1271,7 @@ short RenderText::width() const
     int maxx = 0;
     // slooow
     for(unsigned int si = 0; si < m_lines.count(); si++) {
-        TextSlave* s = m_lines[si];
+        TextRun* s = m_lines[si];
         if(s->m_x < minx)
             minx = s->m_x;
         if(s->m_x + s->m_width > maxx)
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index ae0cff1..a22497c 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -40,10 +40,10 @@ namespace khtml
     class RenderText;
     class RenderStyle;
 
-class TextSlave
+class TextRun
 {
 public:
-    TextSlave(int x, int y, int start, int len,
+    TextRun(int x, int y, int start, int len,
 	      int baseline, int width,
               bool reversed = false, int toAdd = 0, bool firstLine = false)
     {
@@ -86,7 +86,7 @@ public:
     FindSelectionResult checkSelectionPoint(int _x, int _y, int _tx, int _ty, const Font *f, RenderText *text, int & offset, short lineheight);
 
     /**
-     * if this textslave was rendered @ref _ty pixels below the upper edge
+     * if this text run was rendered @ref _ty pixels below the upper edge
      * of a view, would the @ref _y -coordinate be inside the vertical range
      * of this object's representation?
      */
@@ -105,7 +105,7 @@ public:
     int m_toAdd : 14; // for justified text
 private:
     // this is just for QVector::bsearch. Don't use it otherwise
-    TextSlave(int _x, int _y)
+    TextRun(int _x, int _y)
     {
         m_x = _x;
         m_y = _y;
@@ -114,12 +114,12 @@ private:
     friend class RenderText;
 };
 
-class TextSlaveArray : public QPtrVector<TextSlave>
+class TextRunArray : public QPtrVector<TextRun>
 {
 public:
-    TextSlaveArray();
+    TextRunArray();
 
-    TextSlave* first();
+    TextRun* first();
 
     int	  findFirstMatching( Item ) const;
     virtual int compareItems( Item, Item );
@@ -127,7 +127,7 @@ public:
 
 class RenderText : public RenderObject
 {
-    friend class TextSlave;
+    friend class TextRun;
 
 public:
     RenderText(DOM::NodeImpl* node, DOM::DOMStringImpl *_str);
@@ -142,7 +142,7 @@ public:
     virtual void paintObject(QPainter *, int x, int y, int w, int h,
                              int tx, int ty, PaintAction paintAction);
 
-    void deleteSlaves(RenderArena *renderArena = 0);
+    void deleteRuns(RenderArena *renderArena = 0);
     virtual void detach(RenderArena* renderArena);
     
     DOM::DOMString data() const { return str; }
@@ -182,7 +182,7 @@ public:
     
     bool containsOnlyWhitespace(unsigned int from, unsigned int len) const;
     
-    // returns the minimum x position of all slaves relative to the parent.
+    // returns the minimum x position of all runs relative to the parent.
     // defaults to 0.
     int minXPos() const;
 
@@ -216,7 +216,7 @@ public:
     { return static_cast<DOM::TextImpl*>(RenderObject::element()); }
 
 #if APPLE_CHANGES
-    TextSlaveArray textSlaves() const { return m_lines; }
+    TextRunArray textRuns() const { return m_lines; }
     int widthFromCache(const Font *, int start, int len) const;
     bool shouldUseMonospaceCache(const Font *) const;
     void cacheWidths();
@@ -228,10 +228,10 @@ protected:
 #if APPLE_CHANGES
 public:
 #endif
-    TextSlave * findTextSlave( int offset, int &pos );
+    TextRun * findTextRun( int offset, int &pos );
 
 protected: // members
-    TextSlaveArray m_lines;
+    TextRunArray m_lines;
     DOM::DOMStringImpl *str; //
 
     short m_lineHeight;
diff --git a/WebCore/kwq/KWQRenderTreeDebug.cpp b/WebCore/kwq/KWQRenderTreeDebug.cpp
index cc72813..edc17c2 100644
--- a/WebCore/kwq/KWQRenderTreeDebug.cpp
+++ b/WebCore/kwq/KWQRenderTreeDebug.cpp
@@ -41,8 +41,8 @@ using khtml::RenderObject;
 using khtml::RenderTableCell;
 using khtml::RenderWidget;
 using khtml::RenderText;
-using khtml::TextSlave;
-using khtml::TextSlaveArray;
+using khtml::TextRun;
+using khtml::TextRunArray;
 
 typedef khtml::RenderLayer::RenderLayerElement RenderLayerElement;
 typedef khtml::RenderLayer::RenderZTreeNode RenderZTreeNode;
@@ -112,10 +112,10 @@ static QString quoteAndEscapeNonPrintables(const QString &s)
     return result;
 }
 
-static void writeTextSlave(QTextStream &ts, const RenderText &o, const TextSlave &slave)
+static void writeTextRun(QTextStream &ts, const RenderText &o, const TextRun &run)
 {
-    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))
+    ts << "text run at (" << run.m_x << "," << run.m_y << ") width " << run.m_width << ": "
+    	<< quoteAndEscapeNonPrintables(o.data().string().mid(run.m_start, run.m_len))
     	<< "\n"; 
 }
 
@@ -127,10 +127,10 @@ static void write(QTextStream &ts, const RenderObject &o, int indent = 0)
     
     if (o.isText()) {
         const RenderText &text = static_cast<const RenderText &>(o);
-        TextSlaveArray slaves = text.textSlaves();
-        for (unsigned int i = 0; i < slaves.count(); i++) {
+        TextRunArray runs = text.textRuns();
+        for (unsigned int i = 0; i < runs.count(); i++) {
             writeIndent(ts, indent+1);
-            writeTextSlave(ts, text, *slaves[i]);
+            writeTextRun(ts, text, *runs[i]);
         }
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list