[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hyatt at apple.com hyatt at apple.com
Wed Dec 22 13:42:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 84701b21894a5765934b17f28778dc5f45f8effb
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 20:21:49 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=46386, give line boxes a vertical bit so that it's easy to know
    the overall direction of the line without having to ask the containing block.
    
    Reviewed by Dan Bernstein.
    
    Also couldn't resist some cleanup.  Tightened up the type of the renderobject passed to RootInlineBox's
    constructor to be a RenderBlock.  Moved all the virtual logical height stuff outside of the SVG ifdef
    since TrailingFloatsRootInlineBox uses it and should work without SVG enabled.
    
    * rendering/EllipsisBox.h:
    (WebCore::EllipsisBox::EllipsisBox):
    * rendering/InlineBox.h:
    (WebCore::InlineBox::InlineBox):
    (WebCore::InlineBox::isVertical):
    (WebCore::InlineBox::setIsVertical):
    * rendering/InlineFlowBox.cpp:
    (WebCore::InlineFlowBox::addToLine):
    * rendering/RootInlineBox.cpp:
    (WebCore::RootInlineBox::RootInlineBox):
    (WebCore::RootInlineBox::placeEllipsis):
    * rendering/RootInlineBox.h:
    * rendering/SVGRootInlineBox.h:
    (WebCore::SVGRootInlineBox::SVGRootInlineBox):
    * rendering/TrailingFloatsRootInlineBox.h:
    (WebCore::TrailingFloatsRootInlineBox::TrailingFloatsRootInlineBox):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68186 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ae24c31..0f431e6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2010-09-23  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46386, give line boxes a vertical bit so that it's easy to know
+        the overall direction of the line without having to ask the containing block.
+
+        Also couldn't resist some cleanup.  Tightened up the type of the renderobject passed to RootInlineBox's
+        constructor to be a RenderBlock.  Moved all the virtual logical height stuff outside of the SVG ifdef
+        since TrailingFloatsRootInlineBox uses it and should work without SVG enabled.
+
+        * rendering/EllipsisBox.h:
+        (WebCore::EllipsisBox::EllipsisBox):
+        * rendering/InlineBox.h:
+        (WebCore::InlineBox::InlineBox):
+        (WebCore::InlineBox::isVertical):
+        (WebCore::InlineBox::setIsVertical):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::addToLine):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::RootInlineBox):
+        (WebCore::RootInlineBox::placeEllipsis):
+        * rendering/RootInlineBox.h:
+        * rendering/SVGRootInlineBox.h:
+        (WebCore::SVGRootInlineBox::SVGRootInlineBox):
+        * rendering/TrailingFloatsRootInlineBox.h:
+        (WebCore::TrailingFloatsRootInlineBox::TrailingFloatsRootInlineBox):
+
 2010-09-23  Patrick Gansterer  <paroga at webkit.org>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/rendering/EllipsisBox.h b/WebCore/rendering/EllipsisBox.h
index 476331c..ec1b00b 100644
--- a/WebCore/rendering/EllipsisBox.h
+++ b/WebCore/rendering/EllipsisBox.h
@@ -30,8 +30,8 @@ class HitTestResult;
 class EllipsisBox : public InlineBox {
 public:
     EllipsisBox(RenderObject* obj, const AtomicString& ellipsisStr, InlineFlowBox* parent,
-                int width, int height, int y, bool firstLine, InlineBox* markupBox)
-        : InlineBox(obj, 0, y, width, firstLine, true, false, false, 0, 0, parent)
+                int width, int height, int y, bool firstLine, bool isVertical, InlineBox* markupBox)
+        : InlineBox(obj, 0, y, width, firstLine, true, false, false, isVertical, 0, 0, parent)
         , m_height(height)
         , m_str(ellipsisStr)
         , m_markupBox(markupBox)
diff --git a/WebCore/rendering/InlineBox.h b/WebCore/rendering/InlineBox.h
index fa1ebfe..cbddef8 100644
--- a/WebCore/rendering/InlineBox.h
+++ b/WebCore/rendering/InlineBox.h
@@ -30,7 +30,6 @@ class HitTestRequest;
 class HitTestResult;
 class RootInlineBox;
 
-
 // InlineBox represents a rectangle that occurs on a line.  It corresponds to
 // some RenderObject (i.e., it represents a portion of that RenderObject).
 class InlineBox {
@@ -51,6 +50,7 @@ public:
 #if ENABLE(SVG)
         , m_hasVirtualLogicalHeight(false)
 #endif
+        , m_isVertical(false)
         , m_endsWithBreak(false)
         , m_hasSelectedChildren(false)
         , m_hasEllipsisBoxOrHyphen(false)
@@ -68,7 +68,7 @@ public:
     }
 
     InlineBox(RenderObject* obj, int x, int y, int logicalWidth, bool firstLine, bool constructed,
-              bool dirty, bool extracted, InlineBox* next, InlineBox* prev, InlineFlowBox* parent)
+              bool dirty, bool extracted, bool isVertical, InlineBox* next, InlineBox* prev, InlineFlowBox* parent)
         : m_next(next)
         , m_prev(prev)
         , m_parent(parent)
@@ -84,6 +84,7 @@ public:
 #if ENABLE(SVG)
         , m_hasVirtualLogicalHeight(false)
 #endif
+        , m_isVertical(isVertical)
         , m_endsWithBreak(false)
         , m_hasSelectedChildren(false)   
         , m_hasEllipsisBoxOrHyphen(false)
@@ -139,6 +140,7 @@ public:
 #if ENABLE(SVG)
     virtual bool isSVGInlineTextBox() const { return false; }
     virtual bool isSVGRootInlineBox() const { return false; }
+#endif
 
     bool hasVirtualLogicalHeight() const { return m_hasVirtualLogicalHeight; }
     void setHasVirtualLogicalHeight() { m_hasVirtualLogicalHeight = true; }
@@ -147,7 +149,9 @@ public:
         ASSERT_NOT_REACHED();
         return 0;
     }
-#endif
+
+    bool isVertical() const { return m_isVertical; }
+    void setIsVertical(bool v) { m_isVertical = v; }
 
     virtual IntRect calculateBoundaries() const
     {
@@ -283,6 +287,8 @@ protected:
     bool m_extracted : 1;
     bool m_hasVirtualLogicalHeight : 1;
 
+    bool m_isVertical;
+
     // for RootInlineBox
     bool m_endsWithBreak : 1;  // Whether the line ends with a <br>.
     bool m_hasSelectedChildren : 1; // Whether we have any children selected (this bit will also be set if the <br> that terminates our line is selected).
@@ -297,7 +303,7 @@ protected:
     mutable bool m_determinedIfPrevOnLineExists : 1;
     mutable bool m_nextOnLineExists : 1;
     mutable bool m_prevOnLineExists : 1;
-    int m_toAdd : 12; // for justified text
+    int m_toAdd : 11; // for justified text
 
 #ifndef NDEBUG
 private:
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index e6e88b1..a3e3207 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -80,6 +80,7 @@ void InlineFlowBox::addToLine(InlineBox* child)
         m_lastChild = child;
     }
     child->setFirstLineStyleBit(m_firstLine);
+    child->setIsVertical(m_isVertical);
     if (child->isText())
         m_hasTextChildren = true;
     if (child->renderer()->selectionState() != RenderObject::SelectionNone)
diff --git a/WebCore/rendering/RootInlineBox.cpp b/WebCore/rendering/RootInlineBox.cpp
index 355a6be..2a225a9 100644
--- a/WebCore/rendering/RootInlineBox.cpp
+++ b/WebCore/rendering/RootInlineBox.cpp
@@ -39,6 +39,18 @@ namespace WebCore {
 typedef WTF::HashMap<const RootInlineBox*, EllipsisBox*> EllipsisBoxMap;
 static EllipsisBoxMap* gEllipsisBoxMap = 0;
 
+RootInlineBox::RootInlineBox(RenderBlock* block)
+    : InlineFlowBox(block)
+    , m_lineBreakObj(0)
+    , m_lineBreakPos(0)
+    , m_lineTop(0)
+    , m_lineBottom(0)
+    , m_paginationStrut(0)
+{
+    setIsVertical(!block->style()->isVerticalBlockFlow());
+}
+
+
 void RootInlineBox::destroy(RenderArena* arena)
 {
     detachEllipsisBox(arena);
@@ -86,8 +98,7 @@ void RootInlineBox::placeEllipsis(const AtomicString& ellipsisStr,  bool ltr, in
     // Create an ellipsis box.
     EllipsisBox* ellipsisBox = new (renderer()->renderArena()) EllipsisBox(renderer(), ellipsisStr, this,
                                                               ellipsisWidth - (markupBox ? markupBox->logicalWidth() : 0), logicalHeight(),
-                                                              y(), !prevRootBox(),
-                                                              markupBox);
+                                                              y(), !prevRootBox(), isVertical(), markupBox);
     
     if (!gEllipsisBoxMap)
         gEllipsisBoxMap = new EllipsisBoxMap();
diff --git a/WebCore/rendering/RootInlineBox.h b/WebCore/rendering/RootInlineBox.h
index d97d0b1..150de4a 100644
--- a/WebCore/rendering/RootInlineBox.h
+++ b/WebCore/rendering/RootInlineBox.h
@@ -34,15 +34,7 @@ struct GapRects;
 
 class RootInlineBox : public InlineFlowBox {
 public:
-    RootInlineBox(RenderObject* obj)
-        : InlineFlowBox(obj)
-        , m_lineBreakObj(0)
-        , m_lineBreakPos(0)
-        , m_lineTop(0)
-        , m_lineBottom(0)
-        , m_paginationStrut(0)
-    {
-    }
+    RootInlineBox(RenderBlock* block);
 
     virtual void destroy(RenderArena*);
 
diff --git a/WebCore/rendering/SVGRootInlineBox.h b/WebCore/rendering/SVGRootInlineBox.h
index 3570c70..77e7fcb 100644
--- a/WebCore/rendering/SVGRootInlineBox.h
+++ b/WebCore/rendering/SVGRootInlineBox.h
@@ -37,8 +37,8 @@ class SVGInlineTextBox;
 
 class SVGRootInlineBox : public RootInlineBox {
 public:
-    SVGRootInlineBox(RenderObject* obj)
-        : RootInlineBox(obj)
+    SVGRootInlineBox(RenderBlock* block)
+        : RootInlineBox(block)
         , m_logicalHeight(0)
     {
     }
diff --git a/WebCore/rendering/TrailingFloatsRootInlineBox.h b/WebCore/rendering/TrailingFloatsRootInlineBox.h
index d51d9b4..6629857 100644
--- a/WebCore/rendering/TrailingFloatsRootInlineBox.h
+++ b/WebCore/rendering/TrailingFloatsRootInlineBox.h
@@ -32,11 +32,10 @@ namespace WebCore {
 
 class TrailingFloatsRootInlineBox : public RootInlineBox {
 public:
-    TrailingFloatsRootInlineBox(RenderObject* object) : RootInlineBox(object)
+    TrailingFloatsRootInlineBox(RenderBlock* block)
+        : RootInlineBox(block)
     {
-#if ENABLE(SVG)
         setHasVirtualLogicalHeight();
-#endif
     }
 
 private:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list