Reviewed by Anders.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jul 2006 05:13:24 +0000 (05:13 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jul 2006 05:13:24 +0000 (05:13 +0000)
        - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
          Cleanup: remove useless parameters from RenderObject::position()

        No test possible (no functionality change)

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::position):
        * rendering/RenderBox.h:
        * rendering/RenderObject.h:
        (WebCore::RenderObject::position):
        * rendering/RenderTableRow.h:
        (WebCore::RenderTableRow::position):
        * rendering/RenderTableSection.h:
        (WebCore::RenderTableSection::position):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::position):
        * rendering/RenderText.h:
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::constructLine):
        (WebCore::RenderBlock::computeVerticalPositionsForLine):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderTableRow.h
WebCore/rendering/RenderTableSection.h
WebCore/rendering/RenderText.cpp
WebCore/rendering/RenderText.h
WebCore/rendering/bidi.cpp

index 34dbde3d3ca022c9e1f475d03be7c6294f055ede..256651ff243de405fb1b11111f416e638da3c32b 100644 (file)
@@ -1,3 +1,28 @@
+2006-07-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by Anders.
+
+        - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
+          Cleanup: remove useless parameters from RenderObject::position()
+
+        No test possible (no functionality change)
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::position):
+        * rendering/RenderBox.h:
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::position):
+        * rendering/RenderTableRow.h:
+        (WebCore::RenderTableRow::position):
+        * rendering/RenderTableSection.h:
+        (WebCore::RenderTableSection::position):
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::position):
+        * rendering/RenderText.h:
+        * rendering/bidi.cpp:
+        (WebCore::RenderBlock::constructLine):
+        (WebCore::RenderBlock::computeVerticalPositionsForLine):
+
 2006-07-27  Rob Buis  <buis@kde.org>
 
         Reviewed by Maciej.
index 5793404bb5c35bd9e96aa2465831e74928a68da7..986b79258f13dcf5a484bfea31c0024ad5b2dc2c 100644 (file)
@@ -812,7 +812,7 @@ void RenderBox::dirtyLineBoxes(bool fullLayout, bool)
     }
 }
 
-void RenderBox::position(InlineBox* box, int from, int len, bool reverse, bool override)
+void RenderBox::position(InlineBox* box)
 {
     if (isPositioned()) {
         // Cache the x position only if we were an INLINE type originally.
index 09a163d2d5b9e87c0c10e933c07be99e9edfa067..4059c1e53873d04012784650cabe2d23485b7977 100644 (file)
@@ -88,7 +88,7 @@ public:
     // shifted. -dwh
     void calcHorizontalMargins(const Length& ml, const Length& mr, int cw);
 
-    virtual void position(InlineBox* box, int from, int len, bool reverse, bool override);
+    virtual void position(InlineBox*);
     
     virtual void dirtyLineBoxes(bool fullLayout, bool isRootLineBox=false);
 
index dfd3cd079d7fb59ba0ee78fc27b390bcfd50e2a9..26774186fd56bafa55fd0fcac368a3c4c0b08404 100644 (file)
@@ -757,7 +757,7 @@ public:
     bool usesLineWidth() const;
 
     // positioning of inline children (bidi)
-    virtual void position(InlineBox*, int, int, bool, bool) {}
+    virtual void position(InlineBox*) { }
 
     bool isTransparent() const { return style()->opacity() < 1.0f; }
     float opacity() const { return style()->opacity(); }
index d87130899c250f18f1074ed1bc026dfe0a52e14d..75e59c001b954fd1cee986704ca05ffa9b4b88b3 100644 (file)
@@ -42,7 +42,7 @@ public:
     virtual bool isTableRow() const { return true; }
     virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
     virtual short lineHeight(bool) const { return 0; }
-    virtual void position(int, int, int, int, int, bool, bool, int) { }
+    virtual void position(InlineBox*) { }
     virtual void layout();
     virtual IntRect getAbsoluteRepaintRect();
     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, HitTestAction action);
index 7216d16b585a88eff0639a25cce5fddd705dfacf..a98ab35c8514d61fc055f1dfb06e2414f48385f3 100644 (file)
@@ -50,7 +50,7 @@ public:
     virtual bool isTableSection() const { return true; }
 
     virtual short lineHeight(bool) const { return 0; }
-    virtual void position(int, int, int, int, int, bool, bool, int) {}
+    virtual void position(InlineBox*) { }
 
 #ifndef NDEBUG
     virtual void dump(TextStream *stream, DeprecatedString ind = "") const;
index b472fa9655b814ce4b327c4df63882024005f406..59f334bd6e8c0d659fa244d5f31866f1bca70882 100644 (file)
@@ -958,12 +958,12 @@ InlineBox* RenderText::createInlineBox(bool, bool isRootLineBox, bool)
     return textBox;
 }
 
-void RenderText::position(InlineBox* box, int from, int len, bool reverse, bool override)
+void RenderText::position(InlineBox* box)
 {
     InlineTextBox *s = static_cast<InlineTextBox*>(box);
     
     // ### should not be needed!!!
-    if (len == 0) {
+    if (s->m_len == 0) {
         // We want the box to be destroyed.
         s->remove();
         s->destroy(renderArena());
@@ -971,13 +971,7 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse, bool
         return;
     }
     
-    reverse = reverse && !style()->visuallyOrdered();
-    m_containsReversedText |= reverse;
-
-    s->m_reversed = reverse;
-    s->m_dirOverride = override || style()->visuallyOrdered();
-    s->m_start = from;
-    s->m_len = len;
+    m_containsReversedText |= s->m_reversed;
 }
 
 unsigned int RenderText::width(unsigned int from, unsigned int len, int xpos, bool firstLine) const
index 54085cfeea7761edc6e9996a4bafee445cba20d9..f0a2cfcd195944958fc338dbe59e0864c3032432 100644 (file)
@@ -81,7 +81,7 @@ public:
     virtual unsigned length() const { return str->length(); }
     const UChar* text() const { return str->characters(); }
     unsigned stringLength() const { return str->length(); } // non virtual implementation of length()
-    virtual void position(InlineBox* box, int from, int len, bool reverse, bool override);
+    virtual void position(InlineBox*);
 
     virtual unsigned width(unsigned from, unsigned len, const Font*, int xpos) const;
     virtual unsigned width(unsigned from, unsigned len, int xpos, bool firstLine = false) const;
index d23490e49a17557566c682ecab29dbf2cd09e238..90121fb54fdf28bf60fb1a7a34499669284d61c8 100644 (file)
@@ -813,7 +813,10 @@ RootInlineBox* RenderBlock::constructLine(const BidiIterator& start, const BidiI
             if (r->box->isInlineTextBox()) {
                 InlineTextBox *text = static_cast<InlineTextBox*>(r->box);
                 text->setStart(r->start);
-                text->setLen(r->stop-r->start);
+                text->setLen(r->stop - r->start);
+                bool visuallyOrdered = r->obj->style()->visuallyOrdered();
+                text->m_reversed = r->level % 2 && !visuallyOrdered;
+                text->m_dirOverride = r->override || visuallyOrdered;
             }
         }
     }
@@ -995,7 +998,7 @@ void RenderBlock::computeVerticalPositionsForLine(RootInlineBox* lineBox)
 
         // Position is used to properly position both replaced elements and
         // to update the static normal flow x/y of positioned elements.
-        r->obj->position(r->box, r->start, r->stop - r->start, r->level%2, r->override);
+        r->obj->position(r->box);
     }
 }