[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:57:52 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 01bcc3591b939c25f223db7db1fd658514d6ae0b
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 25 16:51:11 2003 +0000
Reviewed by Dave
Name change: TextRun is now InlineTextBox. Some related names
have been changed as well. There should be no change in
behavior as a result of this patch.
* khtml/khtml_part.cpp:
(KHTMLPart::selectedText):
(firstRunAt):
(lastRunAt):
(startAndEndLineNodesIncludingNode):
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLineBoxDecorations):
* khtml/rendering/render_line.cpp:
(InlineFlowBox::placeBoxesHorizontally):
(InlineFlowBox::placeBoxesVertically):
* khtml/rendering/render_line.h:
* khtml/rendering/render_text.cpp:
(InlineTextBox::detach):
(throw):
(InlineTextBox::operator delete):
(InlineTextBox::paintSelection):
(InlineTextBox::paintDecoration):
(InlineTextBox::checkSelectionPoint):
(InlineTextBoxArray::InlineTextBoxArray):
(InlineTextBoxArray::compareItems):
(InlineTextBoxArray::findFirstMatching):
(RenderText::deleteRuns):
(RenderText::findNextInlineTextBox):
(RenderText::nodeAtPoint):
(RenderText::checkSelectionPointIgnoringContinuations):
(RenderText::cursorPos):
(RenderText::posOfChar):
(RenderText::paintObject):
(RenderText::createInlineBox):
(RenderText::position):
(RenderText::width):
* khtml/rendering/render_text.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
* kwq/KWQRenderTreeDebug.cpp:
(writeTextRun):
(write):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d4de92d..6c6699e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,50 @@
+2003-09-25 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Dave
+
+ Name change: TextRun is now InlineTextBox. Some related names
+ have been changed as well. There should be no change in
+ behavior as a result of this patch.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::selectedText):
+ (firstRunAt):
+ (lastRunAt):
+ (startAndEndLineNodesIncludingNode):
+ * khtml/rendering/bidi.cpp:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::paintLineBoxDecorations):
+ * khtml/rendering/render_line.cpp:
+ (InlineFlowBox::placeBoxesHorizontally):
+ (InlineFlowBox::placeBoxesVertically):
+ * khtml/rendering/render_line.h:
+ * khtml/rendering/render_text.cpp:
+ (InlineTextBox::detach):
+ (throw):
+ (InlineTextBox::operator delete):
+ (InlineTextBox::paintSelection):
+ (InlineTextBox::paintDecoration):
+ (InlineTextBox::checkSelectionPoint):
+ (InlineTextBoxArray::InlineTextBoxArray):
+ (InlineTextBoxArray::compareItems):
+ (InlineTextBoxArray::findFirstMatching):
+ (RenderText::deleteRuns):
+ (RenderText::findNextInlineTextBox):
+ (RenderText::nodeAtPoint):
+ (RenderText::checkSelectionPointIgnoringContinuations):
+ (RenderText::cursorPos):
+ (RenderText::posOfChar):
+ (RenderText::paintObject):
+ (RenderText::createInlineBox):
+ (RenderText::position):
+ (RenderText::width):
+ * khtml/rendering/render_text.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::attributedString):
+ * kwq/KWQRenderTreeDebug.cpp:
+ (writeTextRun):
+ (write):
+
2003-09-25 Darin Adler <darin at apple.com>
Added a new layout test.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d4de92d..6c6699e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,50 @@
+2003-09-25 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Dave
+
+ Name change: TextRun is now InlineTextBox. Some related names
+ have been changed as well. There should be no change in
+ behavior as a result of this patch.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::selectedText):
+ (firstRunAt):
+ (lastRunAt):
+ (startAndEndLineNodesIncludingNode):
+ * khtml/rendering/bidi.cpp:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::paintLineBoxDecorations):
+ * khtml/rendering/render_line.cpp:
+ (InlineFlowBox::placeBoxesHorizontally):
+ (InlineFlowBox::placeBoxesVertically):
+ * khtml/rendering/render_line.h:
+ * khtml/rendering/render_text.cpp:
+ (InlineTextBox::detach):
+ (throw):
+ (InlineTextBox::operator delete):
+ (InlineTextBox::paintSelection):
+ (InlineTextBox::paintDecoration):
+ (InlineTextBox::checkSelectionPoint):
+ (InlineTextBoxArray::InlineTextBoxArray):
+ (InlineTextBoxArray::compareItems):
+ (InlineTextBoxArray::findFirstMatching):
+ (RenderText::deleteRuns):
+ (RenderText::findNextInlineTextBox):
+ (RenderText::nodeAtPoint):
+ (RenderText::checkSelectionPointIgnoringContinuations):
+ (RenderText::cursorPos):
+ (RenderText::posOfChar):
+ (RenderText::paintObject):
+ (RenderText::createInlineBox):
+ (RenderText::position):
+ (RenderText::width):
+ * khtml/rendering/render_text.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::attributedString):
+ * kwq/KWQRenderTreeDebug.cpp:
+ (writeTextRun):
+ (write):
+
2003-09-25 Darin Adler <darin at apple.com>
Added a new layout test.
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 115d87f..063287b 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -99,7 +99,7 @@ using namespace DOM;
using khtml::Decoder;
using khtml::RenderObject;
using khtml::RenderText;
-using khtml::TextRunArray;
+using khtml::InlineTextBoxArray;
using KParts::BrowserInterface;
@@ -2220,8 +2220,8 @@ QString KHTMLPart::selectedText() const
{
// FIXME: This whole function should use the render tree and not the DOM tree, since elements could
// be hidden using CSS, or additional generated content could be added. For now, we just make sure
- // text objects walk their renderers' TextRuns, so that we at least get the whitespace stripped out properly
- // and obey CSS visibility for text runs.
+ // text objects walk their renderers' InlineTextBox objects, so that we at least get the whitespace
+ // stripped out properly and obey CSS visibility for text runs.
bool hasNewLine = true;
bool addedSpace = true;
QString text;
@@ -2245,7 +2245,7 @@ QString KHTMLPart::selectedText() const
}
else {
RenderText* textObj = static_cast<RenderText*>(n.handle()->renderer());
- TextRunArray runs = textObj->textRuns();
+ InlineTextBoxArray runs = textObj->inlineTextBoxes();
if (runs.count() == 0 && str.length() > 0 && !addedSpace) {
// We have no runs, but we do have a length. This means we must be
// whitespace that collapsed away at the end of a line.
@@ -4272,7 +4272,7 @@ static bool firstRunAt(RenderObject *renderNode, int y, NodeImpl *&startNode, lo
for (RenderObject *n = renderNode; n; n = n->nextSibling()) {
if (n->isText()) {
RenderText *textRenderer = static_cast<khtml::RenderText *>(n);
- TextRunArray runs = textRenderer->textRuns();
+ InlineTextBoxArray runs = textRenderer->inlineTextBoxes();
for (unsigned i = 0; i != runs.count(); i++) {
if (runs[i]->m_y == y) {
startNode = textRenderer->element();
@@ -4308,7 +4308,7 @@ static bool lastRunAt(RenderObject *renderNode, int y, NodeImpl *&endNode, long
if (n->isText()) {
RenderText *textRenderer = static_cast<khtml::RenderText *>(n);
- TextRunArray runs = textRenderer->textRuns();
+ InlineTextBoxArray runs = textRenderer->inlineTextBoxes();
for (int i = (int)runs.count()-1; i >= 0; i--) {
if (runs[i]->m_y == y) {
endNode = textRenderer->element();
@@ -4332,7 +4332,7 @@ static bool startAndEndLineNodesIncludingNode (DOM::NodeImpl *node, int offset,
int pos;
int selectionPointY;
khtml::RenderText *renderer = static_cast<khtml::RenderText *>(node->renderer());
- khtml::TextRun * run = renderer->findTextRun( offset, pos );
+ khtml::InlineTextBox * run = renderer->findNextInlineTextBox( offset, pos );
DOMString t = node->nodeValue();
DOM::NodeImpl* startNode;
DOM::NodeImpl* endNode;
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 3ed9b23..2c2250e 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -713,7 +713,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
// Only justify text with white-space: normal.
if (r->obj->style()->whiteSpace() != PRE) {
spaceAdd = (availableWidth - totWidth)*spaces/numSpaces;
- static_cast<TextRun*>(r->box)->setSpaceAdd(spaceAdd);
+ static_cast<InlineTextBox*>(r->box)->setSpaceAdd(spaceAdd);
totWidth += spaceAdd;
}
numSpaces -= spaces;
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index 8c16313..58807d1 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -206,7 +206,7 @@ void RenderFlow::paintLineBoxDecorations(QPainter *p, int _x, int _y,
if (style()->visibility() == VISIBLE && paintAction == PaintActionForeground) {
// We only paint line box decorations in strict or almost strict mode.
- // Otherwise we let the TextRuns paint their own decorations.
+ // Otherwise we let the InlineTextBoxes paint their own decorations.
if (style()->htmlHacks())
return;
diff --git a/WebCore/khtml/rendering/render_line.cpp b/WebCore/khtml/rendering/render_line.cpp
index dd616a2..8cab347 100644
--- a/WebCore/khtml/rendering/render_line.cpp
+++ b/WebCore/khtml/rendering/render_line.cpp
@@ -228,7 +228,7 @@ int InlineFlowBox::placeBoxesHorizontally(int x)
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->object()->isText()) {
- TextRun* text = static_cast<TextRun*>(curr);
+ InlineTextBox* text = static_cast<InlineTextBox*>(curr);
text->setXPos(x);
x += text->width();
}
@@ -414,7 +414,7 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
int newY = curr->yPos();
int newHeight = curr->height();
int newBaseline = curr->baseline();
- if (curr->isTextRun() || curr->isInlineFlowBox()) {
+ if (curr->isInlineTextBox() || curr->isInlineFlowBox()) {
const QFontMetrics &fm = curr->object()->fontMetrics( m_firstLine );
newBaseline = fm.ascent();
newY += curr->baseline() - newBaseline;
diff --git a/WebCore/khtml/rendering/render_line.h b/WebCore/khtml/rendering/render_line.h
index a2c3a14..73cc7b7 100644
--- a/WebCore/khtml/rendering/render_line.h
+++ b/WebCore/khtml/rendering/render_line.h
@@ -58,7 +58,7 @@ public:
virtual bool isInlineBox() { return false; }
virtual bool isInlineFlowBox() { return false; }
virtual bool isContainer() { return false; }
- virtual bool isTextRun() { return false; }
+ virtual bool isInlineTextBox() { return false; }
virtual bool isRootInlineBox() { return false; }
bool isConstructed() { return m_constructed; }
@@ -173,7 +173,7 @@ public:
}
child->setFirstLineStyleBit(m_firstLine);
child->setParent(this);
- if (child->isTextRun())
+ if (child->isInlineTextBox())
m_hasTextChildren = true;
}
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 32faef7..f479223 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -41,37 +41,37 @@ using namespace khtml;
using namespace DOM;
#ifndef NDEBUG
-static bool inTextRunDetach;
+static bool inInlineTextBoxDetach;
#endif
-void TextRun::detach(RenderArena* renderArena)
+void InlineTextBox::detach(RenderArena* renderArena)
{
#ifndef NDEBUG
- inTextRunDetach = true;
+ inInlineTextBoxDetach = true;
#endif
delete this;
#ifndef NDEBUG
- inTextRunDetach = false;
+ inInlineTextBoxDetach = false;
#endif
// Recover the size left there for us by operator delete and free the memory.
renderArena->free(*(size_t *)this, this);
}
-void* TextRun::operator new(size_t sz, RenderArena* renderArena) throw()
+void* InlineTextBox::operator new(size_t sz, RenderArena* renderArena) throw()
{
return renderArena->allocate(sz);
}
-void TextRun::operator delete(void* ptr, size_t sz)
+void InlineTextBox::operator delete(void* ptr, size_t sz)
{
- assert(inTextRunDetach);
+ assert(inInlineTextBoxDetach);
// Stash size where detach can find it.
*(size_t *)ptr = sz;
}
-void TextRun::paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos)
+void InlineTextBox::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;
@@ -97,14 +97,14 @@ void TextRun::paintSelection(const Font *f, RenderText *text, QPainter *p, Rende
#endif
ty += m_baseline;
- //kdDebug( 6040 ) << "textRun::painting(" << s.string() << ") at(" << x+_tx << "/" << y+_ty << ")" << endl;
+ //kdDebug( 6040 ) << "InlineTextBox::painting(" << s.string() << ") at(" << x+_tx << "/" << y+_ty << ")" << endl;
f->drawHighlightForText(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 TextRun::paintDecoration( QPainter *pt, int _tx, int _ty, int deco)
+void InlineTextBox::paintDecoration( QPainter *pt, int _tx, int _ty, int deco)
{
_tx += m_x;
_ty += m_y;
@@ -128,7 +128,7 @@ void TextRun::paintDecoration( QPainter *pt, int _tx, int _ty, int deco)
}
}
#else
-void TextRun::paintDecoration( QPainter *pt, int _tx, int _ty, int decoration)
+void InlineTextBox::paintDecoration( QPainter *pt, int _tx, int _ty, int decoration)
{
_tx += m_x;
_ty += m_y;
@@ -160,9 +160,9 @@ void TextRun::paintDecoration( QPainter *pt, int _tx, int _ty, int decoration)
#define LOCAL_WIDTH_BUF_SIZE 1024
-FindSelectionResult TextRun::checkSelectionPoint(int _x, int _y, int _tx, int _ty, const Font *f, RenderText *text, int & offset, short lineHeight)
+FindSelectionResult InlineTextBox::checkSelectionPoint(int _x, int _y, int _tx, int _ty, const Font *f, RenderText *text, int & offset, short lineHeight)
{
-// kdDebug(6040) << "TextRun::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
+// kdDebug(6040) << "InlineTextBox::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
// << " _tx+m_x=" << _tx+m_x << " _ty+m_y=" << _ty+m_y << endl;
offset = 0;
@@ -189,7 +189,7 @@ FindSelectionResult TextRun::checkSelectionPoint(int _x, int _y, int _tx, int _t
int pos = f->checkSelectionPoint (text->str->s, text->str->l, m_start, m_len, m_toAdd, _x - (_tx + m_x), m_reversed);
#else
int delta = _x - (_tx + m_x);
- //kdDebug(6040) << "TextRun::checkSelectionPoint delta=" << delta << endl;
+ //kdDebug(6040) << "InlineTextBox::checkSelectionPoint delta=" << delta << endl;
int pos = 0;
if ( m_reversed ) {
delta -= m_width;
@@ -221,21 +221,21 @@ FindSelectionResult TextRun::checkSelectionPoint(int _x, int _y, int _tx, int _t
// -----------------------------------------------------------------------------
-TextRunArray::TextRunArray()
+InlineTextBoxArray::InlineTextBoxArray()
{
setAutoDelete(false);
}
-int TextRunArray::compareItems( Item d1, Item d2 )
+int InlineTextBoxArray::compareItems( Item d1, Item d2 )
{
assert(d1);
assert(d2);
- return static_cast<TextRun*>(d1)->m_y - static_cast<TextRun*>(d2)->m_y;
+ return static_cast<InlineTextBox*>(d1)->m_y - static_cast<InlineTextBox*>(d2)->m_y;
}
// remove this once QVector::bsearch is fixed
-int TextRunArray::findFirstMatching(Item d) const
+int InlineTextBoxArray::findFirstMatching(Item d) const
{
int len = count();
@@ -346,7 +346,7 @@ void RenderText::deleteRuns(RenderArena *arena)
if (!arena)
arena = renderArena();
for(unsigned int i=0; i < len; i++) {
- TextRun* s = m_lines.at(i);
+ InlineTextBox* s = m_lines.at(i);
if (s)
s->detach(arena);
m_lines.remove(i);
@@ -356,7 +356,7 @@ void RenderText::deleteRuns(RenderArena *arena)
KHTMLAssert(m_lines.count() == 0);
}
-TextRun * RenderText::findTextRun( int offset, int &pos )
+InlineTextBox * RenderText::findNextInlineTextBox( int offset, int &pos )
{
// The text runs point to parts of the rendertext's str string
// (they don't include '\n')
@@ -366,7 +366,7 @@ TextRun * RenderText::findTextRun( int offset, int &pos )
if ( m_lines.isEmpty() )
return 0L;
- TextRun* s = m_lines[0];
+ InlineTextBox* s = m_lines[0];
uint si = 1;
int off = s->m_len;
while(offset > off && si < m_lines.count())
@@ -384,7 +384,7 @@ bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
{
assert(parent());
- TextRun *s = m_lines.count() ? m_lines[0] : 0;
+ InlineTextBox *s = m_lines.count() ? m_lines[0] : 0;
int si = 0;
while(s) {
if((_y >=_ty + s->m_y) && (_y < _ty + s->m_y + s->height()) &&
@@ -421,24 +421,24 @@ FindSelectionResult RenderText::checkSelectionPointIgnoringContinuations(int _x,
{
// kdDebug(6040) << "RenderText::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
// << " _tx=" << _tx << " _ty=" << _ty << endl;
- TextRun *lastPointAfterInline=0;
+ InlineTextBox *lastPointAfterInline=0;
for(unsigned int si = 0; si < m_lines.count(); si++)
{
- TextRun* s = m_lines[si];
+ InlineTextBox* 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 textrun
+ if ( result == SelectionPointInside ) // x,y is inside the InlineTextBox
{
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 textrun -> stop here
+ // x,y is before the InlineTextBox -> stop here
if ( si > 0 && lastPointAfterInline ) {
offset = lastPointAfterInline->m_start + lastPointAfterInline->m_len;
//kdDebug(6040) << "RenderText::checkSelectionPoint before -> " << offset << endl;
@@ -471,7 +471,7 @@ void RenderText::cursorPos(int offset, int &_x, int &_y, int &height)
}
int pos;
- TextRun * s = findTextRun( offset, pos );
+ InlineTextBox * s = findNextInlineTextBox( offset, pos );
_y = s->m_y;
height = s->m_height;
@@ -515,7 +515,7 @@ void RenderText::posOfChar(int chr, int &x, int &y)
//chr = str->l;
int pos;
- TextRun * s = findTextRun( chr, pos );
+ InlineTextBox * s = findNextInlineTextBox( chr, pos );
if ( s )
{
@@ -569,7 +569,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()->textDecorationsInEffect();
- TextRun f(0, y-ty);
+ InlineTextBox 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);
@@ -597,7 +597,7 @@ void RenderText::paintObject(QPainter *p, int /*x*/, int y, int /*w*/, int h,
//kdDebug(6040) << this << " Selection from " << startPos << " to " << endPos << endl;
}
- TextRun* s;
+ InlineTextBox* s;
int minx = 1000000;
int maxx = -1000000;
int outlinebox_y = m_lines[si]->m_y;
@@ -1220,12 +1220,12 @@ InlineBox* RenderText::createInlineBox(bool, bool isRootLineBox)
{
// FIXME: Either ditch the array or get this object into it.
KHTMLAssert(!isRootLineBox);
- return new (renderArena()) TextRun(this);
+ return new (renderArena()) InlineTextBox(this);
}
void RenderText::position(InlineBox* box, int from, int len, bool reverse)
{
- TextRun *s = static_cast<TextRun*>(box);
+ InlineTextBox *s = static_cast<InlineTextBox*>(box);
// ### should not be needed!!!
if (len == 0 || (str->l && len == 1 && *(str->s+from) == '\n')) {
@@ -1288,7 +1288,7 @@ short RenderText::width() const
int maxx = 0;
// slooow
for(unsigned int si = 0; si < m_lines.count(); si++) {
- TextRun* s = m_lines[si];
+ InlineTextBox* 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 c3ae5ac..c63f269 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -41,10 +41,10 @@ namespace khtml
class RenderText;
class RenderStyle;
-class TextRun : public InlineBox
+class InlineTextBox : public InlineBox
{
public:
- TextRun(RenderObject* obj)
+ InlineTextBox(RenderObject* obj)
:InlineBox(obj)
{
m_start = 0;
@@ -70,7 +70,7 @@ public:
void setSpaceAdd(int add) { m_width -= m_toAdd; m_toAdd = add; m_width += m_toAdd; }
int spaceAdd() { return m_toAdd; }
- virtual bool isTextRun() { return true; }
+ virtual bool isInlineTextBox() { return true; }
void paintDecoration( QPainter *pt, int _tx, int _ty, int decoration);
void paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos);
@@ -93,7 +93,7 @@ public:
int m_toAdd : 14; // for justified text
private:
// this is just for QVector::bsearch. Don't use it otherwise
- TextRun(int _x, int _y)
+ InlineTextBox(int _x, int _y)
:InlineBox(0)
{
m_x = _x;
@@ -103,12 +103,12 @@ private:
friend class RenderText;
};
-class TextRunArray : public QPtrVector<TextRun>
+class InlineTextBoxArray : public QPtrVector<InlineTextBox>
{
public:
- TextRunArray();
+ InlineTextBoxArray();
- TextRun* first();
+ InlineTextBox* first();
int findFirstMatching( Item ) const;
virtual int compareItems( Item, Item );
@@ -116,7 +116,7 @@ public:
class RenderText : public RenderObject
{
- friend class TextRun;
+ friend class InlineTextBox;
public:
RenderText(DOM::NodeImpl* node, DOM::DOMStringImpl *_str);
@@ -208,7 +208,7 @@ public:
{ return static_cast<DOM::TextImpl*>(RenderObject::element()); }
#if APPLE_CHANGES
- TextRunArray textRuns() const { return m_lines; }
+ InlineTextBoxArray inlineTextBoxes() const { return m_lines; }
int widthFromCache(const Font *, int start, int len) const;
bool shouldUseMonospaceCache(const Font *) const;
void cacheWidths();
@@ -221,10 +221,10 @@ protected:
#if APPLE_CHANGES
public:
#endif
- TextRun * findTextRun( int offset, int &pos );
+ InlineTextBox * findNextInlineTextBox( int offset, int &pos );
protected: // members
- TextRunArray m_lines;
+ InlineTextBoxArray m_lines;
DOM::DOMStringImpl *str; //
short m_lineHeight;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 642dfda..468d009 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -85,7 +85,7 @@ using khtml::RenderStyle;
using khtml::RenderTableCell;
using khtml::RenderText;
using khtml::RenderWidget;
-using khtml::TextRunArray;
+using khtml::InlineTextBoxArray;
using khtml::VISIBLE;
using KIO::Job;
@@ -1970,7 +1970,7 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
}
else {
RenderText* textObj = static_cast<RenderText*>(renderer);
- TextRunArray runs = textObj->textRuns();
+ InlineTextBoxArray runs = textObj->inlineTextBoxes();
if (runs.count() == 0 && str.length() > 0 && !addedSpace) {
// We have no runs, but we do have a length. This means we must be
// whitespace that collapsed away at the end of a line.
diff --git a/WebCore/kwq/KWQRenderTreeDebug.cpp b/WebCore/kwq/KWQRenderTreeDebug.cpp
index ca7b1fb..751b9de 100644
--- a/WebCore/kwq/KWQRenderTreeDebug.cpp
+++ b/WebCore/kwq/KWQRenderTreeDebug.cpp
@@ -39,8 +39,8 @@ using khtml::RenderObject;
using khtml::RenderTableCell;
using khtml::RenderWidget;
using khtml::RenderText;
-using khtml::TextRun;
-using khtml::TextRunArray;
+using khtml::InlineTextBox;
+using khtml::InlineTextBoxArray;
static void writeLayers(QTextStream &ts, const RenderLayer* rootLayer, RenderLayer* l,
const QRect& paintDirtyRect, int indent=0);
@@ -113,7 +113,7 @@ static QString quoteAndEscapeNonPrintables(const QString &s)
return result;
}
-static void writeTextRun(QTextStream &ts, const RenderText &o, const TextRun &run)
+static void writeTextRun(QTextStream &ts, const RenderText &o, const InlineTextBox &run)
{
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))
@@ -128,7 +128,7 @@ static void write(QTextStream &ts, const RenderObject &o, int indent = 0)
if (o.isText()) {
const RenderText &text = static_cast<const RenderText &>(o);
- TextRunArray runs = text.textRuns();
+ InlineTextBoxArray runs = text.inlineTextBoxes();
for (unsigned int i = 0; i < runs.count(); i++) {
writeIndent(ts, indent+1);
writeTextRun(ts, text, *runs[i]);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list