- 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
+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.
}
}
-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.
// 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);
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(); }
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);
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;
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());
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
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;
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;
}
}
}
// 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);
}
}