[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

hyatt at apple.com hyatt at apple.com
Thu Apr 8 02:21:14 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9f47d5813a4b71f0cccd7f3043a536444d2bfa7a
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 12 20:29:50 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=36069
    
    Reviewed by Dan Bernstein.
    
    Eliminate InlineRunBox.
    
    * WebCore.xcodeproj/project.pbxproj:
    * rendering/InlineFlowBox.cpp:
    (WebCore::InlineFlowBox::adjustPosition):
    (WebCore::InlineFlowBox::paintFillLayer):
    (WebCore::InlineFlowBox::paintBoxDecorations):
    (WebCore::InlineFlowBox::paintMask):
    * rendering/InlineFlowBox.h:
    (WebCore::InlineFlowBox::InlineFlowBox):
    (WebCore::InlineFlowBox::prevLineBox):
    (WebCore::InlineFlowBox::nextLineBox):
    (WebCore::InlineFlowBox::setNextLineBox):
    (WebCore::InlineFlowBox::setPreviousLineBox):
    * rendering/InlineRunBox.h: Removed.
    * rendering/InlineTextBox.h:
    (WebCore::InlineTextBox::InlineTextBox):
    (WebCore::InlineTextBox::prevTextBox):
    (WebCore::InlineTextBox::nextTextBox):
    (WebCore::InlineTextBox::setNextTextBox):
    (WebCore::InlineTextBox::setPreviousTextBox):
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::destroy):
    (WebCore::RenderBlock::rightmostPosition):
    (WebCore::RenderBlock::leftmostPosition):
    * rendering/RenderInline.cpp:
    (WebCore::RenderInline::destroy):
    (WebCore::RenderInline::absoluteRects):
    (WebCore::RenderInline::absoluteQuads):
    (WebCore::RenderInline::linesBoundingBox):
    (WebCore::RenderInline::linesVisibleOverflowBoundingBox):
    (WebCore::RenderInline::addFocusRingRects):
    (WebCore::RenderInline::paintOutline):
    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::localBoundingBox):
    * rendering/RenderLineBoxList.cpp:
    (WebCore::RenderLineBoxList::deleteLineBoxTree):
    (WebCore::RenderLineBoxList::extractLineBox):
    (WebCore::RenderLineBoxList::attachLineBox):
    (WebCore::RenderLineBoxList::removeLineBox):
    (WebCore::RenderLineBoxList::deleteLineBoxes):
    (WebCore::RenderLineBoxList::dirtyLineBoxes):
    (WebCore::RenderLineBoxList::paint):
    (WebCore::RenderLineBoxList::hitTest):
    (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
    (WebCore::RenderLineBoxList::checkConsistency):
    * rendering/RenderSVGInline.cpp:
    (WebCore::RenderSVGInline::absoluteRects):
    (WebCore::RenderSVGInline::absoluteQuads):
    * rendering/RenderSVGText.cpp:
    (WebCore::RenderSVGText::absoluteRects):
    (WebCore::RenderSVGText::absoluteQuads):
    (WebCore::RenderSVGText::objectBoundingBox):
    * rendering/RenderText.cpp:
    (WebCore::RenderText::extractTextBox):
    (WebCore::RenderText::attachTextBox):
    (WebCore::RenderText::removeTextBox):
    (WebCore::RenderText::createInlineTextBox):
    (WebCore::RenderText::positionLineBox):
    * rendering/RootInlineBox.h:
    (WebCore::RootInlineBox::nextRootBox):
    (WebCore::RootInlineBox::prevRootBox):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55928 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 285292d..7334916 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,72 @@
+2010-03-12  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=36069
+        
+        Eliminate InlineRunBox.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::adjustPosition):
+        (WebCore::InlineFlowBox::paintFillLayer):
+        (WebCore::InlineFlowBox::paintBoxDecorations):
+        (WebCore::InlineFlowBox::paintMask):
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::InlineFlowBox):
+        (WebCore::InlineFlowBox::prevLineBox):
+        (WebCore::InlineFlowBox::nextLineBox):
+        (WebCore::InlineFlowBox::setNextLineBox):
+        (WebCore::InlineFlowBox::setPreviousLineBox):
+        * rendering/InlineRunBox.h: Removed.
+        * rendering/InlineTextBox.h:
+        (WebCore::InlineTextBox::InlineTextBox):
+        (WebCore::InlineTextBox::prevTextBox):
+        (WebCore::InlineTextBox::nextTextBox):
+        (WebCore::InlineTextBox::setNextTextBox):
+        (WebCore::InlineTextBox::setPreviousTextBox):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::destroy):
+        (WebCore::RenderBlock::rightmostPosition):
+        (WebCore::RenderBlock::leftmostPosition):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::destroy):
+        (WebCore::RenderInline::absoluteRects):
+        (WebCore::RenderInline::absoluteQuads):
+        (WebCore::RenderInline::linesBoundingBox):
+        (WebCore::RenderInline::linesVisibleOverflowBoundingBox):
+        (WebCore::RenderInline::addFocusRingRects):
+        (WebCore::RenderInline::paintOutline):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::localBoundingBox):
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::deleteLineBoxTree):
+        (WebCore::RenderLineBoxList::extractLineBox):
+        (WebCore::RenderLineBoxList::attachLineBox):
+        (WebCore::RenderLineBoxList::removeLineBox):
+        (WebCore::RenderLineBoxList::deleteLineBoxes):
+        (WebCore::RenderLineBoxList::dirtyLineBoxes):
+        (WebCore::RenderLineBoxList::paint):
+        (WebCore::RenderLineBoxList::hitTest):
+        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
+        (WebCore::RenderLineBoxList::checkConsistency):
+        * rendering/RenderSVGInline.cpp:
+        (WebCore::RenderSVGInline::absoluteRects):
+        (WebCore::RenderSVGInline::absoluteQuads):
+        * rendering/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::absoluteRects):
+        (WebCore::RenderSVGText::absoluteQuads):
+        (WebCore::RenderSVGText::objectBoundingBox):
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::extractTextBox):
+        (WebCore::RenderText::attachTextBox):
+        (WebCore::RenderText::removeTextBox):
+        (WebCore::RenderText::createInlineTextBox):
+        (WebCore::RenderText::positionLineBox):
+        * rendering/RootInlineBox.h:
+        (WebCore::RootInlineBox::nextRootBox):
+        (WebCore::RootInlineBox::prevRootBox):
+
 2010-03-12  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Reviewed by Eric Carlson.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 1b4fdbc..13c1ec6 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1777,7 +1777,6 @@ webcore_sources += \
 	WebCore/rendering/InlineFlowBox.cpp \
 	WebCore/rendering/InlineFlowBox.h \
 	WebCore/rendering/InlineIterator.h \
-	WebCore/rendering/InlineRunBox.h \
 	WebCore/rendering/InlineTextBox.cpp \
 	WebCore/rendering/InlineTextBox.h \
 	WebCore/rendering/LayoutState.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 2c8e3ea..6bbdc04 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3018,7 +3018,6 @@
             'rendering/InlineFlowBox.cpp',
             'rendering/InlineFlowBox.h',
             'rendering/InlineIterator.h',
-            'rendering/InlineRunBox.h',
             'rendering/InlineTextBox.cpp',
             'rendering/InlineTextBox.h',
             'rendering/LayoutState.cpp',
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 413ad58..9f43bde 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -27137,10 +27137,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\rendering\InlineRunBox.h"
-				>
-			</File>
-			<File
 				RelativePath="..\rendering\InlineTextBox.cpp"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 3933fe3..c829659 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2936,7 +2936,6 @@
 		A8CFF0500A154F09000A4234 /* AutoTableLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8CFF04B0A154F09000A4234 /* AutoTableLayout.cpp */; };
 		A8CFF0510A154F09000A4234 /* TableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF04C0A154F09000A4234 /* TableLayout.h */; };
 		A8CFF5E10A155A05000A4234 /* RootInlineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DA0A155A05000A4234 /* RootInlineBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		A8CFF5E20A155A05000A4234 /* InlineRunBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DB0A155A05000A4234 /* InlineRunBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A8CFF5E30A155A05000A4234 /* InlineFlowBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DC0A155A05000A4234 /* InlineFlowBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A8CFF5E40A155A05000A4234 /* InlineFlowBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8CFF5DD0A155A05000A4234 /* InlineFlowBox.cpp */; };
 		A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF5DE0A155A05000A4234 /* InlineBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8193,7 +8192,6 @@
 		A8CFF04B0A154F09000A4234 /* AutoTableLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AutoTableLayout.cpp; sourceTree = "<group>"; };
 		A8CFF04C0A154F09000A4234 /* TableLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableLayout.h; sourceTree = "<group>"; };
 		A8CFF5DA0A155A05000A4234 /* RootInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RootInlineBox.h; sourceTree = "<group>"; };
-		A8CFF5DB0A155A05000A4234 /* InlineRunBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineRunBox.h; sourceTree = "<group>"; };
 		A8CFF5DC0A155A05000A4234 /* InlineFlowBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineFlowBox.h; sourceTree = "<group>"; };
 		A8CFF5DD0A155A05000A4234 /* InlineFlowBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineFlowBox.cpp; sourceTree = "<group>"; };
 		A8CFF5DE0A155A05000A4234 /* InlineBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineBox.h; sourceTree = "<group>"; };
@@ -15687,7 +15685,6 @@
 				A8CFF5DD0A155A05000A4234 /* InlineFlowBox.cpp */,
 				A8CFF5DC0A155A05000A4234 /* InlineFlowBox.h */,
 				BCE789151120D6080060ECE5 /* InlineIterator.h */,
-				A8CFF5DB0A155A05000A4234 /* InlineRunBox.h */,
 				BCEA481A097D93020094C9E4 /* InlineTextBox.cpp */,
 				BCEA481B097D93020094C9E4 /* InlineTextBox.h */,
 				2D9066040BE141D400956998 /* LayoutState.cpp */,
@@ -17394,7 +17391,6 @@
 				A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */,
 				A8CFF5E30A155A05000A4234 /* InlineFlowBox.h in Headers */,
 				BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */,
-				A8CFF5E20A155A05000A4234 /* InlineRunBox.h in Headers */,
 				BCEA485A097D93020094C9E4 /* InlineTextBox.h in Headers */,
 				08591AA50F085C4E009BACB1 /* InputElement.h in Headers */,
 				93309DEA099E64920056E581 /* InsertIntoTextNodeCommand.h in Headers */,
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index 34eec30..23dc4e7 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -165,7 +165,7 @@ void InlineFlowBox::attachLineBoxToRenderObject()
 
 void InlineFlowBox::adjustPosition(int dx, int dy)
 {
-    InlineRunBox::adjustPosition(dx, dy);
+    InlineBox::adjustPosition(dx, dy);
     for (InlineBox* child = firstChild(); child; child = child->nextOnLine())
         child->adjustPosition(dx, dy);
     if (m_overflow)
@@ -703,11 +703,11 @@ void InlineFlowBox::paintFillLayer(const RenderObject::PaintInfo& paintInfo, con
         // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right,
         // but it isn't even clear how this should work at all.
         int xOffsetOnLine = 0;
-        for (InlineRunBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
+        for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
             xOffsetOnLine += curr->width();
         int startX = tx - xOffsetOnLine;
         int totalWidth = xOffsetOnLine;
-        for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
+        for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
             totalWidth += curr->width();
         paintInfo.context->save();
         paintInfo.context->clip(IntRect(tx, ty, width(), height()));
@@ -788,11 +788,11 @@ void InlineFlowBox::paintBoxDecorations(RenderObject::PaintInfo& paintInfo, int
                 // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right,
                 // but it isn't even clear how this should work at all.
                 int xOffsetOnLine = 0;
-                for (InlineRunBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
+                for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
                     xOffsetOnLine += curr->width();
                 int startX = tx - xOffsetOnLine;
                 int totalWidth = xOffsetOnLine;
-                for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
+                for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
                     totalWidth += curr->width();
                 context->save();
                 context->clip(IntRect(tx, ty, w, h));
@@ -859,11 +859,11 @@ void InlineFlowBox::paintMask(RenderObject::PaintInfo& paintInfo, int tx, int ty
         // We have a mask image that spans multiple lines.
         // We need to adjust _tx and _ty by the width of all previous lines.
         int xOffsetOnLine = 0;
-        for (InlineRunBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
+        for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
             xOffsetOnLine += curr->width();
         int startX = tx - xOffsetOnLine;
         int totalWidth = xOffsetOnLine;
-        for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
+        for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
             totalWidth += curr->width();
         paintInfo.context->save();
         paintInfo.context->clip(IntRect(tx, ty, w, h));
diff --git a/WebCore/rendering/InlineFlowBox.h b/WebCore/rendering/InlineFlowBox.h
index 23b5cc9..ecb4724 100644
--- a/WebCore/rendering/InlineFlowBox.h
+++ b/WebCore/rendering/InlineFlowBox.h
@@ -21,7 +21,7 @@
 #ifndef InlineFlowBox_h
 #define InlineFlowBox_h
 
-#include "InlineRunBox.h"
+#include "InlineBox.h"
 #include "RenderOverflow.h"
 
 namespace WebCore {
@@ -30,12 +30,14 @@ class HitTestRequest;
 class HitTestResult;
 class RenderLineBoxList;
 
-class InlineFlowBox : public InlineRunBox {
+class InlineFlowBox : public InlineBox {
 public:
     InlineFlowBox(RenderObject* obj)
-        : InlineRunBox(obj)
+        : InlineBox(obj)
         , m_firstChild(0)
         , m_lastChild(0)
+        , m_prevLineBox(0)
+        , m_nextLineBox(0)
         , m_includeLeftEdge(false)
         , m_includeRightEdge(false)
 #ifndef NDEBUG
@@ -54,8 +56,10 @@ public:
     virtual ~InlineFlowBox();
 #endif
 
-    InlineFlowBox* prevFlowBox() const { return static_cast<InlineFlowBox*>(m_prevLine); }
-    InlineFlowBox* nextFlowBox() const { return static_cast<InlineFlowBox*>(m_nextLine); }
+    InlineFlowBox* prevLineBox() const { return m_prevLineBox; }
+    InlineFlowBox* nextLineBox() const { return m_nextLineBox; }
+    void setNextLineBox(InlineFlowBox* n) { m_nextLineBox = n; }
+    void setPreviousLineBox(InlineFlowBox* p) { m_prevLineBox = p; }
 
     InlineBox* firstChild() const { checkConsistency(); return m_firstChild; }
     InlineBox* lastChild() const { checkConsistency(); return m_lastChild; }
@@ -164,12 +168,14 @@ public:
 protected:
     OwnPtr<RenderOverflow> m_overflow;
 
-private:
     virtual bool isInlineFlowBox() const { return true; }
 
     InlineBox* m_firstChild;
     InlineBox* m_lastChild;
     
+    InlineFlowBox* m_prevLineBox; // The previous box that also uses our RenderObject
+    InlineFlowBox* m_nextLineBox; // The next box that also uses our RenderObject
+
     bool m_includeLeftEdge : 1;
     bool m_includeRightEdge : 1;
     bool m_hasTextChildren : 1;
diff --git a/WebCore/rendering/InlineRunBox.h b/WebCore/rendering/InlineRunBox.h
deleted file mode 100644
index cbc82d5..0000000
--- a/WebCore/rendering/InlineRunBox.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2003, 2006 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef InlineRunBox_h
-#define InlineRunBox_h
-
-#include "InlineBox.h"
-
-namespace WebCore {
-
-class InlineRunBox : public InlineBox {
-public:
-    InlineRunBox(RenderObject* obj)
-        : InlineBox(obj)
-        , m_prevLine(0)
-        , m_nextLine(0)
-    {
-    }
-
-    InlineRunBox* prevLineBox() const { return m_prevLine; }
-    InlineRunBox* nextLineBox() const { return m_nextLine; }
-    void setNextLineBox(InlineRunBox* n) { m_nextLine = n; }
-    void setPreviousLineBox(InlineRunBox* p) { m_prevLine = p; }
-
-    virtual void paintBoxDecorations(RenderObject::PaintInfo&, int /*tx*/, int /*ty*/) { }
-    virtual void paintTextDecorations(RenderObject::PaintInfo&, int /*tx*/, int /*ty*/, bool /*paintedChildren*/ = false) { }
-    
-protected:
-    InlineRunBox* m_prevLine;  // The previous box that also uses our RenderObject
-    InlineRunBox* m_nextLine;  // The next box that also uses our RenderObject
-};
-
-} // namespace WebCore
-
-#endif // InlineRunBox_h
diff --git a/WebCore/rendering/InlineTextBox.h b/WebCore/rendering/InlineTextBox.h
index 0a83ddd..96ca4c3 100644
--- a/WebCore/rendering/InlineTextBox.h
+++ b/WebCore/rendering/InlineTextBox.h
@@ -23,7 +23,7 @@
 #ifndef InlineTextBox_h
 #define InlineTextBox_h
 
-#include "InlineRunBox.h"
+#include "InlineBox.h"
 #include "RenderText.h" // so textRenderer() can be inline
 
 namespace WebCore {
@@ -37,18 +37,22 @@ const unsigned short cFullTruncation = USHRT_MAX - 1;
 void updateGraphicsContext(GraphicsContext*, const Color& fillColor, const Color& strokeColor, float strokeThickness, ColorSpace);
 Color correctedTextColor(Color textColor, Color backgroundColor);
 
-class InlineTextBox : public InlineRunBox {
+class InlineTextBox : public InlineBox {
 public:
     InlineTextBox(RenderObject* obj)
-        : InlineRunBox(obj)
+        : InlineBox(obj)
+        , m_prevTextBox(0)
+        , m_nextTextBox(0)
         , m_start(0)
         , m_len(0)
         , m_truncation(cNoTruncation)
     {
     }
 
-    InlineTextBox* nextTextBox() const { return static_cast<InlineTextBox*>(nextLineBox()); }
-    InlineTextBox* prevTextBox() const { return static_cast<InlineTextBox*>(prevLineBox()); }
+    InlineTextBox* prevTextBox() const { return m_prevTextBox; }
+    InlineTextBox* nextTextBox() const { return m_nextTextBox; }
+    void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; }
+    void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; }
 
     unsigned start() const { return m_start; }
     unsigned end() const { return m_len ? m_start + m_len - 1 : m_start; }
@@ -116,6 +120,9 @@ public:
     bool containsCaretOffset(int offset) const; // false for offset after line break
 
 private:
+    InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderObject
+    InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObject
+
     int m_start;
     unsigned short m_len;
 
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 06fe7dc..e4a30a5 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -183,7 +183,7 @@ void RenderBlock::destroy()
             // that will outlast this block. In the non-anonymous block case those
             // children will be destroyed by the time we return from this function.
             if (isAnonymousBlock()) {
-                for (InlineFlowBox* box = firstLineBox(); box; box = box->nextFlowBox()) {
+                for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) {
                     while (InlineBox* childBox = box->firstChild())
                         childBox->remove();
                 }
@@ -2800,7 +2800,7 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel
     if (!includeSelf) {
         right = max(right, borderLeft() + paddingLeft() + paddingRight() + relativeOffset);
         if (childrenInline()) {
-            for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox()) {
+            for (InlineFlowBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox()) {
                 int childRightEdge = currBox->x() + currBox->width();
                 
                 // If this node is a root editable element, then the rightmostPosition should account for a caret at the end.
@@ -2895,7 +2895,7 @@ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf
     }
 
     if (!includeSelf && firstLineBox()) {
-        for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox())
+        for (InlineFlowBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox())
             left = min(left, (int)currBox->x() + relativeOffset);
     }
     
diff --git a/WebCore/rendering/RenderInline.cpp b/WebCore/rendering/RenderInline.cpp
index f399878..1d76742 100644
--- a/WebCore/rendering/RenderInline.cpp
+++ b/WebCore/rendering/RenderInline.cpp
@@ -80,7 +80,7 @@ void RenderInline::destroy()
             // not have a parent that means they are either already disconnected or
             // root lines that can just be destroyed without disconnecting.
             if (firstLineBox()->parent()) {
-                for (InlineRunBox* box = firstLineBox(); box; box = box->nextLineBox())
+                for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
                     box->remove();
             }
         } else if (isInline() && parent())
@@ -410,7 +410,7 @@ void RenderInline::paint(PaintInfo& paintInfo, int tx, int ty)
 
 void RenderInline::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
 {
-    if (InlineRunBox* curr = firstLineBox()) {
+    if (InlineFlowBox* curr = firstLineBox()) {
         for (; curr; curr = curr->nextLineBox())
             rects.append(IntRect(tx + curr->x(), ty + curr->y(), curr->width(), curr->height()));
     } else
@@ -429,7 +429,7 @@ void RenderInline::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
 
 void RenderInline::absoluteQuads(Vector<FloatQuad>& quads)
 {
-    if (InlineRunBox* curr = firstLineBox()) {
+    if (InlineFlowBox* curr = firstLineBox()) {
         for (; curr; curr = curr->nextLineBox()) {
             FloatRect localRect(curr->x(), curr->y(), curr->width(), curr->height());
             quads.append(localToAbsoluteQuad(localRect));
@@ -534,7 +534,7 @@ IntRect RenderInline::linesBoundingBox() const
         // Return the width of the minimal left side and the maximal right side.
         int leftSide = 0;
         int rightSide = 0;
-        for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
+        for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
             if (curr == firstLineBox() || curr->x() < leftSide)
                 leftSide = curr->x();
             if (curr == firstLineBox() || curr->x() + curr->width() > rightSide)
@@ -557,7 +557,7 @@ IntRect RenderInline::linesVisibleOverflowBoundingBox() const
     // Return the width of the minimal left side and the maximal right side.
     int leftSide = numeric_limits<int>::max();
     int rightSide = numeric_limits<int>::min();
-    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextFlowBox()) {
+    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         leftSide = min(leftSide, curr->leftVisibleOverflow());
         rightSide = max(rightSide, curr->rightVisibleOverflow());
     }
@@ -927,7 +927,7 @@ void RenderInline::imageChanged(WrappedImagePtr, const IntRect*)
 
 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
 {
-    for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
+    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         RootInlineBox* root = curr->root();
         int top = max(root->lineTop(), curr->y());
         int bottom = min(root->lineBottom(), curr->y() + curr->height());
@@ -985,7 +985,7 @@ void RenderInline::paintOutline(GraphicsContext* graphicsContext, int tx, int ty
     Vector<IntRect> rects;
 
     rects.append(IntRect());
-    for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
+    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         RootInlineBox* root = curr->root();
         int top = max(root->lineTop(), curr->y());
         int bottom = min(root->lineBottom(), curr->y() + curr->height());
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index c6c68de..15ffb64 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2981,7 +2981,7 @@ IntRect RenderLayer::localBoundingBox() const
         int top = firstBox->topVisibleOverflow();
         int bottom = inlineFlow->lastLineBox()->bottomVisibleOverflow();
         int left = firstBox->x();
-        for (InlineRunBox* curr = firstBox->nextLineBox(); curr; curr = curr->nextLineBox())
+        for (InlineFlowBox* curr = firstBox->nextLineBox(); curr; curr = curr->nextLineBox())
             left = min(left, curr->x());
         result = IntRect(left, top, width(), bottom - top);
     } else if (renderer()->isTableRow()) {
diff --git a/WebCore/rendering/RenderLineBoxList.cpp b/WebCore/rendering/RenderLineBoxList.cpp
index 57bc26c..9736874 100644
--- a/WebCore/rendering/RenderLineBoxList.cpp
+++ b/WebCore/rendering/RenderLineBoxList.cpp
@@ -67,7 +67,7 @@ void RenderLineBoxList::deleteLineBoxTree(RenderArena* arena)
     InlineFlowBox* line = m_firstLineBox;
     InlineFlowBox* nextLine;
     while (line) {
-        nextLine = line->nextFlowBox();
+        nextLine = line->nextLineBox();
         line->deleteLine(arena);
         line = nextLine;
     }
@@ -78,13 +78,13 @@ void RenderLineBoxList::extractLineBox(InlineFlowBox* box)
 {
     checkConsistency();
     
-    m_lastLineBox = box->prevFlowBox();
+    m_lastLineBox = box->prevLineBox();
     if (box == m_firstLineBox)
         m_firstLineBox = 0;
     if (box->prevLineBox())
         box->prevLineBox()->setNextLineBox(0);
     box->setPreviousLineBox(0);
-    for (InlineRunBox* curr = box; curr; curr = curr->nextLineBox())
+    for (InlineFlowBox* curr = box; curr; curr = curr->nextLineBox())
         curr->setExtracted();
 
     checkConsistency();
@@ -100,7 +100,7 @@ void RenderLineBoxList::attachLineBox(InlineFlowBox* box)
     } else
         m_firstLineBox = box;
     InlineFlowBox* last = box;
-    for (InlineFlowBox* curr = box; curr; curr = curr->nextFlowBox()) {
+    for (InlineFlowBox* curr = box; curr; curr = curr->nextLineBox()) {
         curr->setExtracted(false);
         last = curr;
     }
@@ -114,9 +114,9 @@ void RenderLineBoxList::removeLineBox(InlineFlowBox* box)
     checkConsistency();
 
     if (box == m_firstLineBox)
-        m_firstLineBox = box->nextFlowBox();
+        m_firstLineBox = box->nextLineBox();
     if (box == m_lastLineBox)
-        m_lastLineBox = box->prevFlowBox();
+        m_lastLineBox = box->prevLineBox();
     if (box->nextLineBox())
         box->nextLineBox()->setPreviousLineBox(box->prevLineBox());
     if (box->prevLineBox())
@@ -128,8 +128,8 @@ void RenderLineBoxList::removeLineBox(InlineFlowBox* box)
 void RenderLineBoxList::deleteLineBoxes(RenderArena* arena)
 {
     if (m_firstLineBox) {
-        InlineRunBox* next;
-        for (InlineRunBox* curr = m_firstLineBox; curr; curr = next) {
+        InlineFlowBox* next;
+        for (InlineFlowBox* curr = m_firstLineBox; curr; curr = next) {
             next = curr->nextLineBox();
             curr->destroy(arena);
         }
@@ -140,7 +140,7 @@ void RenderLineBoxList::deleteLineBoxes(RenderArena* arena)
 
 void RenderLineBoxList::dirtyLineBoxes()
 {
-    for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
+    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
         curr->dirtyLineBoxes();
 }
 
@@ -177,7 +177,7 @@ void RenderLineBoxList::paint(RenderBoxModelObject* renderer, RenderObject::Pain
     // based off positions of our first line box or our last line box.
     RenderView* v = renderer->view();
     bool usePrintRect = !v->printRect().isEmpty();
-    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextFlowBox()) {
+    for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         if (usePrintRect) {
             // FIXME: This is a feeble effort to avoid splitting a line across two pages.
             // It is utterly inadequate, and this should not be done at paint time at all.
@@ -236,7 +236,7 @@ bool RenderLineBoxList::hitTest(RenderBoxModelObject* renderer, const HitTestReq
     // See if our root lines contain the point.  If so, then we hit test
     // them further.  Note that boxes can easily overlap, so we can't make any assumptions
     // based off positions of our first line box or our last line box.
-    for (InlineFlowBox* curr = lastLineBox(); curr; curr = curr->prevFlowBox()) {
+    for (InlineFlowBox* curr = lastLineBox(); curr; curr = curr->prevLineBox()) {
         if (y >= ty + curr->root()->topVisibleOverflow() && y < ty + curr->root()->bottomVisibleOverflow()) {
             bool inside = curr->nodeAtPoint(request, result, x, y, tx, ty);
             if (inside) {
@@ -281,9 +281,9 @@ void RenderLineBoxList::dirtyLinesFromChangedChild(RenderObject* container, Rend
             if (textBox)
                 box = textBox->root();
         } else if (curr->isRenderInline()) {
-            InlineRunBox* runBox = toRenderInline(curr)->lastLineBox();
-            if (runBox)
-                box = runBox->root();
+            InlineFlowBox* flowBox = toRenderInline(curr)->lastLineBox();
+            if (flowBox)
+                box = flowBox->root();
         }
 
         if (box)
@@ -321,8 +321,8 @@ void RenderLineBoxList::checkConsistency() const
 {
 #ifdef CHECK_CONSISTENCY
     const InlineFlowBox* prev = 0;
-    for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child->nextFlowBox()) {
-        ASSERT(child->prevFlowBox() == prev);
+    for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child->nextLineBox()) {
+        ASSERT(child->prevLineBox() == prev);
         prev = child;
     }
     ASSERT(prev == m_lastLineBox);
diff --git a/WebCore/rendering/RenderSVGInline.cpp b/WebCore/rendering/RenderSVGInline.cpp
index cc2029c..33459ce 100644
--- a/WebCore/rendering/RenderSVGInline.cpp
+++ b/WebCore/rendering/RenderSVGInline.cpp
@@ -48,9 +48,9 @@ InlineFlowBox* RenderSVGInline::createInlineFlowBox()
 
 void RenderSVGInline::absoluteRects(Vector<IntRect>& rects, int, int)
 {
-    InlineRunBox* firstBox = firstLineBox();
+    InlineFlowBox* firstBox = firstLineBox();
 
-    SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstBox)->svgRootInlineBox() : 0;
+    RootInlineBox* rootBox = firstBox ? firstBox->root() : 0;
     RenderBox* object = rootBox ? rootBox->block() : 0;
 
     if (!object)
@@ -59,7 +59,7 @@ void RenderSVGInline::absoluteRects(Vector<IntRect>& rects, int, int)
     int xRef = object->x();
     int yRef = object->y();
 
-    for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) {
+    for (InlineFlowBox* curr = firstBox; curr; curr = curr->nextLineBox()) {
         FloatRect rect(xRef + curr->x(), yRef + curr->y(), curr->width(), curr->height());
         rects.append(enclosingIntRect(localToAbsoluteQuad(rect).boundingBox()));
     }
@@ -95,9 +95,9 @@ FloatRect RenderSVGInline::repaintRectInLocalCoordinates() const
 
 void RenderSVGInline::absoluteQuads(Vector<FloatQuad>& quads)
 {
-    InlineRunBox* firstBox = firstLineBox();
+    InlineFlowBox* firstBox = firstLineBox();
 
-    SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstBox)->svgRootInlineBox() : 0;
+    RootInlineBox* rootBox = firstBox ? firstBox->root() : 0;
     RenderBox* object = rootBox ? rootBox->block() : 0;
 
     if (!object)
@@ -106,7 +106,7 @@ void RenderSVGInline::absoluteQuads(Vector<FloatQuad>& quads)
     int xRef = object->x();
     int yRef = object->y();
 
-    for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) {
+    for (InlineFlowBox* curr = firstBox; curr; curr = curr->nextLineBox()) {
         FloatRect rect(xRef + curr->x(), yRef + curr->y(), curr->width(), curr->height());
         quads.append(localToAbsoluteQuad(rect));
     }
diff --git a/WebCore/rendering/RenderSVGText.cpp b/WebCore/rendering/RenderSVGText.cpp
index b8b9553..76b8b86 100644
--- a/WebCore/rendering/RenderSVGText.cpp
+++ b/WebCore/rendering/RenderSVGText.cpp
@@ -128,11 +128,8 @@ void RenderSVGText::absoluteRects(Vector<IntRect>& rects, int, int)
  
     // Don't use objectBoundingBox here, as it's unites the selection rects. Makes it hard
     // to spot errors, if there are any using WebInspector. Individually feed them into 'rects'.
-    for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLineBox()) {
-        ASSERT(runBox->isInlineFlowBox());
-
-        InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox);
-        for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine()) {
+    for (InlineFlowBox* flow = firstLineBox(); flow; flow = flow->nextLineBox()) {
+        for (InlineBox* box = flow->firstChild(); box; box = box->nextOnLine()) {
             FloatRect boxRect(box->x(), box->y(), box->width(), box->height());
             // FIXME: crawling up the parent chain to map each rect is very inefficient
             // we should compute the absoluteTransform outside this loop first.
@@ -149,11 +146,8 @@ void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads)
  
     // Don't use objectBoundingBox here, as it's unites the selection rects. Makes it hard
     // to spot errors, if there are any using WebInspector. Individually feed them into 'rects'.
-    for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLineBox()) {
-        ASSERT(runBox->isInlineFlowBox());
-
-        InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox);
-        for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine()) {
+    for (InlineFlowBox* flow = firstLineBox(); flow; flow = flow->nextLineBox()) {
+        for (InlineBox* box = flow->firstChild(); box; box = box->nextOnLine()) {
             FloatRect boxRect(box->x(), box->y(), box->width(), box->height());
             // FIXME: crawling up the parent chain to map each quad is very inefficient
             // we should compute the absoluteTransform outside this loop first.
@@ -175,11 +169,8 @@ FloatRect RenderSVGText::objectBoundingBox() const
 {
     FloatRect boundingBox;
 
-    for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLineBox()) {
-        ASSERT(runBox->isInlineFlowBox());
-
-        InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox);
-        for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine())
+    for (InlineFlowBox* flow = firstLineBox(); flow; flow = flow->nextLineBox()) {
+        for (InlineBox* box = flow->firstChild(); box; box = box->nextOnLine())
             boundingBox.unite(FloatRect(box->x(), box->y(), box->width(), box->height()));
     }
 
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp
index 4653273..111d510 100644
--- a/WebCore/rendering/RenderText.cpp
+++ b/WebCore/rendering/RenderText.cpp
@@ -150,9 +150,9 @@ void RenderText::extractTextBox(InlineTextBox* box)
     if (box == m_firstTextBox)
         m_firstTextBox = 0;
     if (box->prevTextBox())
-        box->prevTextBox()->setNextLineBox(0);
-    box->setPreviousLineBox(0);
-    for (InlineRunBox* curr = box; curr; curr = curr->nextLineBox())
+        box->prevTextBox()->setNextTextBox(0);
+    box->setPreviousTextBox(0);
+    for (InlineTextBox* curr = box; curr; curr = curr->nextTextBox())
         curr->setExtracted();
 
     checkConsistency();
@@ -163,8 +163,8 @@ void RenderText::attachTextBox(InlineTextBox* box)
     checkConsistency();
 
     if (m_lastTextBox) {
-        m_lastTextBox->setNextLineBox(box);
-        box->setPreviousLineBox(m_lastTextBox);
+        m_lastTextBox->setNextTextBox(box);
+        box->setPreviousTextBox(m_lastTextBox);
     } else
         m_firstTextBox = box;
     InlineTextBox* last = box;
@@ -186,9 +186,9 @@ void RenderText::removeTextBox(InlineTextBox* box)
     if (box == m_lastTextBox)
         m_lastTextBox = box->prevTextBox();
     if (box->nextTextBox())
-        box->nextTextBox()->setPreviousLineBox(box->prevTextBox());
+        box->nextTextBox()->setPreviousTextBox(box->prevTextBox());
     if (box->prevTextBox())
-        box->prevTextBox()->setNextLineBox(box->nextTextBox());
+        box->prevTextBox()->setNextTextBox(box->nextTextBox());
 
     checkConsistency();
 }
@@ -1055,8 +1055,8 @@ InlineTextBox* RenderText::createInlineTextBox()
     if (!m_firstTextBox)
         m_firstTextBox = m_lastTextBox = textBox;
     else {
-        m_lastTextBox->setNextLineBox(textBox);
-        textBox->setPreviousLineBox(m_lastTextBox);
+        m_lastTextBox->setNextTextBox(textBox);
+        textBox->setPreviousTextBox(m_lastTextBox);
         m_lastTextBox = textBox;
     }
     textBox->setIsText(true);
@@ -1074,11 +1074,11 @@ void RenderText::positionLineBox(InlineBox* box)
         if (m_firstTextBox == s)
             m_firstTextBox = s->nextTextBox();
         else
-            s->prevTextBox()->setNextLineBox(s->nextTextBox());
+            s->prevTextBox()->setNextTextBox(s->nextTextBox());
         if (m_lastTextBox == s)
             m_lastTextBox = s->prevTextBox();
         else
-            s->nextTextBox()->setPreviousLineBox(s->prevTextBox());
+            s->nextTextBox()->setPreviousTextBox(s->prevTextBox());
         s->destroy(renderArena());
         return;
     }
diff --git a/WebCore/rendering/RootInlineBox.h b/WebCore/rendering/RootInlineBox.h
index 7fce1d3..fae0cba 100644
--- a/WebCore/rendering/RootInlineBox.h
+++ b/WebCore/rendering/RootInlineBox.h
@@ -49,8 +49,8 @@ public:
 
     void detachEllipsisBox(RenderArena*);
 
-    RootInlineBox* nextRootBox() const { return static_cast<RootInlineBox*>(m_nextLine); }
-    RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_prevLine); }
+    RootInlineBox* nextRootBox() const { return static_cast<RootInlineBox*>(m_nextLineBox); }
+    RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_prevLineBox); }
 
     virtual void adjustPosition(int dx, int dy);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list