Rename InlineIterator::m_obj and make it private
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Nov 2013 23:25:19 +0000 (23:25 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Nov 2013 23:25:19 +0000 (23:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124837

Reviewed by Antti Koivisto.

InlineIterator has been exported m_obj as public though there is a getter function.
Besides *object* name isn't ambigious. So, changed it with m_renderer and renderer().
Additionally, setRenderer() is added as well.

No new tests, no behavior changes.

* rendering/InlineIterator.h:
(WebCore::InlineIterator::setObject):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::InlineBidiResolver::appendRun):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::appendRunsForObject):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::matchedEndLine):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::currentObject):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::iteratorIsBeyondEndOfRenderCombineText):
(WebCore::ensureCharacterGetsLineBox):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
(WebCore::checkMidpoints):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineInlineHeaders.h:
(WebCore::skipNonBreakingSpace):
(WebCore::requiresLineBox):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineIterator.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/line/BreakingContextInlineHeaders.h
Source/WebCore/rendering/line/LineBreaker.cpp
Source/WebCore/rendering/line/LineInlineHeaders.h
Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp

index 4bbd436..d033422 100644 (file)
@@ -1,3 +1,51 @@
+2013-11-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Rename InlineIterator::m_obj and make it private
+        https://bugs.webkit.org/show_bug.cgi?id=124837
+
+        Reviewed by Antti Koivisto.
+
+        InlineIterator has been exported m_obj as public though there is a getter function.
+        Besides *object* name isn't ambigious. So, changed it with m_renderer and renderer().
+        Additionally, setRenderer() is added as well.
+
+        No new tests, no behavior changes.
+
+        * rendering/InlineIterator.h:
+        (WebCore::InlineIterator::setObject):
+        (WebCore::operator==):
+        (WebCore::operator!=):
+        (WebCore::InlineBidiResolver::appendRun):
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::appendRunsForObject):
+        (WebCore::constructBidiRunsForLine):
+        (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::matchedEndLine):
+        * rendering/line/BreakingContextInlineHeaders.h:
+        (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
+        (WebCore::BreakingContext::BreakingContext):
+        (WebCore::BreakingContext::currentObject):
+        (WebCore::BreakingContext::initializeForCurrentObject):
+        (WebCore::BreakingContext::handleBR):
+        (WebCore::BreakingContext::handleOutOfFlowPositioned):
+        (WebCore::BreakingContext::handleFloat):
+        (WebCore::BreakingContext::handleEmptyInline):
+        (WebCore::BreakingContext::handleReplaced):
+        (WebCore::iteratorIsBeyondEndOfRenderCombineText):
+        (WebCore::ensureCharacterGetsLineBox):
+        (WebCore::BreakingContext::handleText):
+        (WebCore::BreakingContext::canBreakAtThisPosition):
+        (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
+        (WebCore::checkMidpoints):
+        (WebCore::BreakingContext::handleEndOfLine):
+        * rendering/line/LineBreaker.cpp:
+        (WebCore::LineBreaker::skipTrailingWhitespace):
+        (WebCore::LineBreaker::skipLeadingWhitespace):
+        * rendering/line/LineInlineHeaders.h:
+        (WebCore::skipNonBreakingSpace):
+        (WebCore::requiresLineBox):
+
 2013-11-28  Antti Koivisto  <antti@apple.com>
 
         Rename StylePropertySet to StyleProperties
index 2a4ea03..603df1d 100644 (file)
@@ -38,7 +38,7 @@ class InlineIterator {
 public:
     InlineIterator()
         : m_root(0)
-        , m_obj(0)
+        , m_renderer(0)
         , m_pos(0)
         , m_nextBreakablePosition(-1)
     {
@@ -46,7 +46,7 @@ public:
 
     InlineIterator(RenderElement* root, RenderObject* o, unsigned p)
         : m_root(root)
-        , m_obj(o)
+        , m_renderer(o)
         , m_pos(p)
         , m_nextBreakablePosition(-1)
     {
@@ -61,12 +61,13 @@ public:
 
     void moveTo(RenderObject* object, unsigned offset, int nextBreak = -1)
     {
-        m_obj = object;
+        m_renderer = object;
         m_pos = offset;
         m_nextBreakablePosition = nextBreak;
     }
 
-    RenderObject* object() const { return m_obj; }
+    RenderObject* renderer() const { return m_renderer; }
+    void setRenderer(RenderObject* renderer) { m_renderer = renderer; }
     unsigned offset() const { return m_pos; }
     RenderElement* root() const { return m_root; }
 
@@ -76,13 +77,13 @@ public:
 
     inline bool atTextParagraphSeparator()
     {
-        return m_obj && m_obj->preservesNewline() && m_obj->isText() && toRenderText(m_obj)->textLength()
-            && toRenderText(m_obj)->characterAt(m_pos) == '\n';
+        return m_renderer && m_renderer->preservesNewline() && m_renderer->isText() && toRenderText(m_renderer)->textLength()
+            && toRenderText(m_renderer)->characterAt(m_pos) == '\n';
     }
     
     inline bool atParagraphSeparator()
     {
-        return (m_obj && m_obj->isBR()) || atTextParagraphSeparator();
+        return (m_renderer && m_renderer->isBR()) || atTextParagraphSeparator();
     }
 
     UChar characterAt(unsigned) const;
@@ -92,22 +93,22 @@ public:
 
 private:
     RenderElement* m_root;
+    RenderObject* m_renderer;
 
-    // FIXME: These should be private.
+// FIXME: These should be private.
 public:
-    RenderObject* m_obj;
     unsigned m_pos;
     int m_nextBreakablePosition;
 };
 
 inline bool operator==(const InlineIterator& it1, const InlineIterator& it2)
 {
-    return it1.m_pos == it2.m_pos && it1.m_obj == it2.m_obj;
+    return it1.m_pos == it2.m_pos && it1.renderer() == it2.renderer();
 }
 
 inline bool operator!=(const InlineIterator& it1, const InlineIterator& it2)
 {
-    return it1.m_pos != it2.m_pos || it1.m_obj != it2.m_obj;
+    return it1.m_pos != it2.m_pos || it1.renderer() != it2.renderer();
 }
 
 static inline UCharDirection embedCharFromDirection(TextDirection direction, EUnicodeBidi unicodeBidi)
@@ -313,9 +314,9 @@ static inline RenderObject* bidiFirstIncludingEmptyInlines(RenderElement& root)
 
 inline void InlineIterator::fastIncrementInTextNode()
 {
-    ASSERT(m_obj);
-    ASSERT(m_obj->isText());
-    ASSERT(m_pos <= toRenderText(m_obj)->textLength());
+    ASSERT(m_renderer);
+    ASSERT(m_renderer->isText());
+    ASSERT(m_pos <= toRenderText(m_renderer)->textLength());
     m_pos++;
 }
 
@@ -352,28 +353,28 @@ private:
 
 inline void InlineIterator::increment(InlineBidiResolver* resolver)
 {
-    if (!m_obj)
+    if (!m_renderer)
         return;
-    if (m_obj->isText()) {
+    if (m_renderer->isText()) {
         fastIncrementInTextNode();
-        if (m_pos < toRenderText(m_obj)->textLength())
+        if (m_pos < toRenderText(m_renderer)->textLength())
             return;
     }
     // bidiNext can return 0, so use moveTo instead of moveToStartOf
-    moveTo(bidiNextSkippingEmptyInlines(*m_root, m_obj, resolver), 0);
+    moveTo(bidiNextSkippingEmptyInlines(*m_root, m_renderer, resolver), 0);
 }
 
 inline bool InlineIterator::atEnd() const
 {
-    return !m_obj;
+    return !m_renderer;
 }
 
 inline UChar InlineIterator::characterAt(unsigned index) const
 {
-    if (!m_obj || !m_obj->isText())
+    if (!m_renderer || !m_renderer->isText())
         return 0;
 
-    RenderText* text = toRenderText(m_obj);
+    RenderText* text = toRenderText(m_renderer);
     if (index >= text->textLength())
         return 0;
 
@@ -398,8 +399,8 @@ ALWAYS_INLINE UCharDirection InlineIterator::direction() const
     if (UChar character = current())
         return u_charDirection(character);
 
-    if (m_obj && m_obj->isListMarker())
-        return m_obj->style().isLeftToRightDirection() ? U_LEFT_TO_RIGHT : U_RIGHT_TO_LEFT;
+    if (m_renderer && m_renderer->isListMarker())
+        return m_renderer->style().isLeftToRightDirection() ? U_LEFT_TO_RIGHT : U_RIGHT_TO_LEFT;
 
     return U_OTHER_NEUTRAL;
 }
@@ -434,7 +435,7 @@ static inline RenderObject* containingIsolate(RenderObject* object, RenderObject
 
 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter)
 {
-    RenderObject* object = iter.object();
+    RenderObject* object = iter.renderer();
     if (!object)
         return 0;
     unsigned count = 0;
@@ -495,7 +496,7 @@ public:
         // For now, if we enter an isolate between midpoints, we increment our current midpoint or else
         // we'll leave the isolate and ignore the content that follows.
         MidpointState<InlineIterator>& midpointState = resolver.midpointState();
-        if (midpointState.betweenMidpoints && midpointState.midpoints[midpointState.currentMidpoint].object() == &obj) {
+        if (midpointState.betweenMidpoints && midpointState.midpoints[midpointState.currentMidpoint].renderer() == &obj) {
             midpointState.betweenMidpoints = false;
             ++midpointState.currentMidpoint;
         }
@@ -515,8 +516,8 @@ inline void InlineBidiResolver::appendRun()
         // FIXME: Could this initialize from this->inIsolate() instead of walking up the render tree?
         IsolateTracker isolateTracker(numberOfIsolateAncestors(m_sor));
         int start = m_sor.m_pos;
-        RenderObject* obj = m_sor.m_obj;
-        while (obj && obj != m_eor.m_obj && obj != endOfLine.m_obj) {
+        RenderObject* obj = m_sor.renderer();
+        while (obj && obj != m_eor.renderer() && obj != endOfLine.renderer()) {
             if (isolateTracker.inIsolate())
                 isolateTracker.addFakeRunIfNecessary(*obj, start, *this);
             else
@@ -526,8 +527,8 @@ inline void InlineBidiResolver::appendRun()
             obj = bidiNextSkippingEmptyInlines(*m_sor.root(), obj, &isolateTracker);
         }
         if (obj) {
-            unsigned pos = obj == m_eor.m_obj ? m_eor.m_pos : UINT_MAX;
-            if (obj == endOfLine.m_obj && endOfLine.m_pos <= pos) {
+            unsigned pos = obj == m_eor.renderer() ? m_eor.m_pos : UINT_MAX;
+            if (obj == endOfLine.renderer() && endOfLine.m_pos <= pos) {
                 m_reachedEndOfLine = true;
                 pos = endOfLine.m_pos;
             }
index 3dd60bc..4bfd4f9 100644 (file)
@@ -88,7 +88,7 @@ void RenderBlockFlow::appendRunsForObject(BidiRunList<BidiRun>& runs, int start,
     if (haveNextMidpoint)
         nextMidpoint = lineMidpointState.midpoints[lineMidpointState.currentMidpoint];
     if (lineMidpointState.betweenMidpoints) {
-        if (!(haveNextMidpoint && nextMidpoint.m_obj == obj))
+        if (!(haveNextMidpoint && nextMidpoint.renderer() == obj))
             return;
         // This is a new start point. Stop ignoring objects and
         // adjust our start.
@@ -98,7 +98,7 @@ void RenderBlockFlow::appendRunsForObject(BidiRunList<BidiRun>& runs, int start,
         if (start < end)
             return appendRunsForObject(runs, start, end, obj, resolver);
     } else {
-        if (!haveNextMidpoint || (obj != nextMidpoint.m_obj)) {
+        if (!haveNextMidpoint || (obj != nextMidpoint.renderer())) {
             runs.addRun(createRun(start, end, obj, resolver));
             return;
         }
@@ -962,8 +962,8 @@ static inline void constructBidiRunsForLine(const RenderBlockFlow* block, Inline
         iterator = segmentRanges[i].end;
         InlineIterator segmentEnd(iterator.root, iterator.object, iterator.offset);
         if (i) {
-            ASSERT(segmentStart.m_obj);
-            BidiRun* segmentMarker = createRun(segmentStart.m_pos, segmentStart.m_pos, segmentStart.m_obj, topResolver);
+            ASSERT(segmentStart.renderer());
+            BidiRun* segmentMarker = createRun(segmentStart.m_pos, segmentStart.m_pos, segmentStart.renderer(), topResolver);
             segmentMarker->m_startsSegment = true;
             bidiRuns.addRun(segmentMarker);
             // Do not collapse midpoints between segments
@@ -984,7 +984,7 @@ RootInlineBox* RenderBlockFlow::createLineBoxesFromBidiRuns(BidiRunList<BidiRun>
         return 0;
 
     // FIXME: Why is this only done when we had runs?
-    lineInfo.setLastLine(!end.m_obj);
+    lineInfo.setLastLine(!end.renderer());
 
     RootInlineBox* lineBox = constructLine(bidiRuns, lineInfo);
     if (!lineBox)
@@ -1361,7 +1361,7 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
         // This is a short-cut for empty lines.
         if (layoutState.lineInfo().isEmpty()) {
             if (lastRootBox())
-                lastRootBox()->setLineBreakInfo(end.m_obj, end.m_pos, resolver.status());
+                lastRootBox()->setLineBreakInfo(end.renderer(), end.m_pos, resolver.status());
         } else {
             VisualDirectionOverride override = (styleToUse.rtlOrdering() == VisualOrder ? (styleToUse.direction() == LTR ? VisualLeftToRightOverride : VisualRightToLeftOverride) : NoVisualOverride);
 
@@ -1394,7 +1394,7 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
             resolver.markCurrentRunEmpty(); // FIXME: This can probably be replaced by an ASSERT (or just removed).
 
             if (lineBox) {
-                lineBox->setLineBreakInfo(end.m_obj, end.m_pos, resolver.status());
+                lineBox->setLineBreakInfo(end.renderer(), end.m_pos, resolver.status());
                 if (layoutState.usesRepaintBounds())
                     layoutState.updateRepaintRangeFromBox(lineBox);
 
@@ -1972,7 +1972,7 @@ bool RenderBlockFlow::matchedEndLine(LineLayoutState& layoutState, const InlineB
     RootInlineBox* originalEndLine = layoutState.endLine();
     RootInlineBox* line = originalEndLine;
     for (int i = 0; i < numLines && line; i++, line = line->nextRootBox()) {
-        if (line->lineBreakObj() == resolver.position().m_obj && line->lineBreakPos() == resolver.position().m_pos) {
+        if (line->lineBreakObj() == resolver.position().renderer() && line->lineBreakPos() == resolver.position().m_pos) {
             // We have a match.
             if (line->lineBreakBidiStatus() != resolver.status())
                 return false; // ...but the bidi state doesn't match.
index 7b99575..f65d7bc 100644 (file)
@@ -147,7 +147,7 @@ void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMid
     if (lineMidpointState.numMidpoints % 2) {
         // Find the trailing space object's midpoint.
         int trailingSpaceMidpoint = lineMidpointState.numMidpoints - 1;
-        for ( ; trailingSpaceMidpoint > 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { }
+        for ( ; trailingSpaceMidpoint > 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].renderer() != m_whitespace; --trailingSpaceMidpoint) { }
         ASSERT(trailingSpaceMidpoint >= 0);
         if (collapseFirstSpace == CollapseFirstSpace)
             lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--;
@@ -160,12 +160,12 @@ void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMid
                 // We don't have a midpoint for this box yet.
                 ensureLineBoxInsideIgnoredSpaces(lineMidpointState, m_boxes[i]);
             } else {
-                ASSERT(lineMidpointState.midpoints[currentMidpoint].m_obj == m_boxes[i]);
-                ASSERT(lineMidpointState.midpoints[currentMidpoint + 1].m_obj == m_boxes[i]);
+                ASSERT(lineMidpointState.midpoints[currentMidpoint].renderer() == m_boxes[i]);
+                ASSERT(lineMidpointState.midpoints[currentMidpoint + 1].renderer() == m_boxes[i]);
             }
             currentMidpoint += 2;
         }
-    } else if (!lBreak.m_obj) {
+    } else if (!lBreak.renderer()) {
         ASSERT(m_whitespace->isText());
         ASSERT(collapseFirstSpace == CollapseFirstSpace);
         // Add a new end midpoint that stops right at the very end.
@@ -186,7 +186,7 @@ public:
         , m_current(resolver.position())
         , m_lineBreak(resolver.position())
         , m_block(block)
-        , m_lastObject(m_current.m_obj)
+        , m_lastObject(m_current.renderer())
         , m_nextObject(0)
         , m_currentStyle(0)
         , m_blockStyle(block.style())
@@ -216,7 +216,7 @@ public:
         m_lineInfo.setPreviousLineBrokeCleanly(false);
     }
 
-    RenderObject* currentObject() { return m_current.m_obj; }
+    RenderObject* currentObject() { return m_current.renderer(); }
     InlineIterator lineBreak() { return m_lineBreak; }
     InlineIterator& lineBreakRef() {return m_lineBreak; }
     LineWidth& lineWidth() { return m_width; }
@@ -310,22 +310,22 @@ inline void BreakingContext::initializeForCurrentObject()
 {
     m_hadUncommittedWidthBeforeCurrent = !!m_width.uncommittedWidth();
 
-    m_currentStyle = &m_current.m_obj->style();
+    m_currentStyle = &m_current.renderer()->style();
 
     ASSERT(m_currentStyle);
 
-    m_nextObject = bidiNextSkippingEmptyInlines(m_block, m_current.m_obj);
-    if (m_nextObject && m_nextObject->parent() && !m_nextObject->parent()->isDescendantOf(m_current.m_obj->parent()))
+    m_nextObject = bidiNextSkippingEmptyInlines(m_block, m_current.renderer());
+    if (m_nextObject && m_nextObject->parent() && !m_nextObject->parent()->isDescendantOf(m_current.renderer()->parent()))
         m_includeEndWidth = true;
 
-    m_currWS = m_current.m_obj->isReplaced() ? m_current.m_obj->parent()->style().whiteSpace() : m_currentStyle->whiteSpace();
+    m_currWS = m_current.renderer()->isReplaced() ? m_current.renderer()->parent()->style().whiteSpace() : m_currentStyle->whiteSpace();
     m_lastWS = m_lastObject->isReplaced() ? m_lastObject->parent()->style().whiteSpace() : m_lastObject->style().whiteSpace();
 
     m_autoWrap = RenderStyle::autoWrap(m_currWS);
     m_autoWrapWasEverTrueOnLine = m_autoWrapWasEverTrueOnLine || m_autoWrap;
 
 #if ENABLE(SVG)
-    m_preservesNewline = m_current.m_obj->isSVGInlineText() ? false : RenderStyle::preserveNewline(m_currWS);
+    m_preservesNewline = m_current.renderer()->isSVGInlineText() ? false : RenderStyle::preserveNewline(m_currWS);
 #else
     m_preservesNewline = RenderStyle::preserveNewline(m_currWS);
 #endif
@@ -347,7 +347,7 @@ inline void BreakingContext::increment()
 inline void BreakingContext::handleBR(EClear& clear)
 {
     if (m_width.fitsOnLine()) {
-        RenderObject* br = m_current.m_obj;
+        RenderObject* br = m_current.renderer();
         m_lineBreak.moveToStartOf(br);
         m_lineBreak.increment();
 
@@ -370,7 +370,7 @@ inline void BreakingContext::handleBR(EClear& clear)
         // collapsed away so that it doesn't push the text out from the container's right-hand edge.
         // FIXME: Do this regardless of the container's alignment - will require rebaselining a lot of test results.
         else if (m_ignoringSpaces && (m_blockStyle.textAlign() == RIGHT || m_blockStyle.textAlign() == WEBKIT_RIGHT))
-            stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.m_obj, m_current.m_pos));
+            stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.renderer(), m_current.m_pos));
 
         if (!m_lineInfo.isEmpty())
             clear = m_currentStyle->clear();
@@ -429,7 +429,7 @@ inline void BreakingContext::handleOutOfFlowPositioned(Vector<RenderBox*>& posit
 {
     // If our original display wasn't an inline type, then we can
     // go ahead and determine our static inline position now.
-    RenderBox* box = toRenderBox(m_current.m_obj);
+    RenderBox* box = toRenderBox(m_current.renderer());
     bool isInlineType = box->style().isOriginalDisplayInlineType();
     if (!isInlineType)
         m_block.setStaticInlinePositionForChild(*box, m_block.logicalHeight(), m_block.startOffsetForContent(m_block.logicalHeight()));
@@ -455,7 +455,7 @@ inline void BreakingContext::handleOutOfFlowPositioned(Vector<RenderBox*>& posit
 
 inline void BreakingContext::handleFloat()
 {
-    RenderBox& floatBox = toRenderBox(*m_current.m_obj);
+    RenderBox& floatBox = toRenderBox(*m_current.renderer());
     FloatingObject* floatingObject = m_block.insertFloatingObject(floatBox);
     // check if it fits in the current line.
     // If it does, position it now, otherwise, position
@@ -463,7 +463,7 @@ inline void BreakingContext::handleFloat()
     // FIXME: Bug 110372: Properly position multiple stacked floats with non-rectangular shape outside.
     if (m_floatsFitOnLine && m_width.fitsOnLineExcludingTrailingWhitespace(m_block.logicalWidthForFloat(floatingObject))) {
         m_block.positionNewFloatOnLine(floatingObject, m_lastFloatFromPreviousLine, m_lineInfo, m_width);
-        if (m_lineBreak.m_obj == m_current.m_obj) {
+        if (m_lineBreak.renderer() == m_current.renderer()) {
             ASSERT(!m_lineBreak.m_pos);
             m_lineBreak.increment();
         }
@@ -495,7 +495,7 @@ inline bool shouldSkipWhitespaceAfterStartObject(RenderBlockFlow& block, RenderO
 
 inline void BreakingContext::handleEmptyInline()
 {
-    RenderInline& flowBox = toRenderInline(*m_current.m_obj);
+    RenderInline& flowBox = toRenderInline(*m_current.renderer());
 
     // This should only end up being called on empty inlines
     ASSERT(isEmptyInline(flowBox));
@@ -512,9 +512,9 @@ inline void BreakingContext::handleEmptyInline()
             m_lineInfo.setEmpty(false, &m_block, &m_width);
         if (m_ignoringSpaces) {
             m_trailingObjects.clear();
-            ensureLineBoxInsideIgnoredSpaces(m_lineMidpointState, m_current.m_obj);
-        } else if (m_blockStyle.collapseWhiteSpace() && m_resolver.position().m_obj == m_current.m_obj
-            && shouldSkipWhitespaceAfterStartObject(m_block, m_current.m_obj, m_lineMidpointState)) {
+            ensureLineBoxInsideIgnoredSpaces(m_lineMidpointState, m_current.renderer());
+        } else if (m_blockStyle.collapseWhiteSpace() && m_resolver.position().renderer() == m_current.renderer()
+            && shouldSkipWhitespaceAfterStartObject(m_block, m_current.renderer(), m_lineMidpointState)) {
             // Like with list markers, we start ignoring spaces to make sure that any
             // additional spaces we see will be discarded.
             m_currentCharacterIsSpace = true;
@@ -524,24 +524,24 @@ inline void BreakingContext::handleEmptyInline()
             m_trailingObjects.appendBoxIfNeeded(&flowBox);
     }
 
-    m_width.addUncommittedWidth(inlineLogicalWidth(m_current.m_obj) + borderPaddingMarginStart(flowBox) + borderPaddingMarginEnd(flowBox));
+    m_width.addUncommittedWidth(inlineLogicalWidth(m_current.renderer()) + borderPaddingMarginStart(flowBox) + borderPaddingMarginEnd(flowBox));
 }
 
 inline void BreakingContext::handleReplaced()
 {
-    RenderBox& replacedBox = toRenderBox(*m_current.m_obj);
+    RenderBox& replacedBox = toRenderBox(*m_current.renderer());
 
     if (m_atStart)
         m_width.updateAvailableWidth(replacedBox.logicalHeight());
 
     // Break on replaced elements if either has normal white-space.
-    if ((m_autoWrap || RenderStyle::autoWrap(m_lastWS)) && (!m_current.m_obj->isImage() || m_allowImagesToBreak)) {
+    if ((m_autoWrap || RenderStyle::autoWrap(m_lastWS)) && (!m_current.renderer()->isImage() || m_allowImagesToBreak)) {
         m_width.commit();
-        m_lineBreak.moveToStartOf(m_current.m_obj);
+        m_lineBreak.moveToStartOf(m_current.renderer());
     }
 
     if (m_ignoringSpaces)
-        stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.m_obj, 0));
+        stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.renderer(), 0));
 
     m_lineInfo.setEmpty(false, &m_block, &m_width);
     m_ignoringSpaces = false;
@@ -551,21 +551,21 @@ inline void BreakingContext::handleReplaced()
 
     // Optimize for a common case. If we can't find whitespace after the list
     // item, then this is all moot.
-    LayoutUnit replacedLogicalWidth = m_block.logicalWidthForChild(replacedBox) + m_block.marginStartForChild(replacedBox) + m_block.marginEndForChild(replacedBox) + inlineLogicalWidth(m_current.m_obj);
-    if (m_current.m_obj->isListMarker()) {
-        if (m_blockStyle.collapseWhiteSpace() && shouldSkipWhitespaceAfterStartObject(m_block, m_current.m_obj, m_lineMidpointState)) {
+    LayoutUnit replacedLogicalWidth = m_block.logicalWidthForChild(replacedBox) + m_block.marginStartForChild(replacedBox) + m_block.marginEndForChild(replacedBox) + inlineLogicalWidth(m_current.renderer());
+    if (m_current.renderer()->isListMarker()) {
+        if (m_blockStyle.collapseWhiteSpace() && shouldSkipWhitespaceAfterStartObject(m_block, m_current.renderer(), m_lineMidpointState)) {
             // Like with inline flows, we start ignoring spaces to make sure that any
             // additional spaces we see will be discarded.
             m_currentCharacterIsSpace = true;
             m_currentCharacterIsWS = false;
             m_ignoringSpaces = true;
         }
-        if (toRenderListMarker(*m_current.m_obj).isInside())
+        if (toRenderListMarker(*m_current.renderer()).isInside())
             m_width.addUncommittedWidth(replacedLogicalWidth);
     } else
         m_width.addUncommittedWidth(replacedLogicalWidth);
-    if (m_current.m_obj->isRubyRun())
-        m_width.applyOverhang(toRenderRubyRun(m_current.m_obj), m_lastObject, m_nextObject);
+    if (m_current.renderer()->isRubyRun())
+        m_width.applyOverhang(toRenderRubyRun(m_current.renderer()), m_lastObject, m_nextObject);
     // Update prior line break context characters, using U+FFFD (OBJECT REPLACEMENT CHARACTER) for replaced element.
     m_renderTextInfo.m_lineBreakIterator.updatePriorContext(replacementCharacter);
 }
@@ -624,7 +624,7 @@ inline void updateSegmentsForShapes(RenderBlockFlow& block, const FloatingObject
 
 inline bool iteratorIsBeyondEndOfRenderCombineText(const InlineIterator& iter, RenderCombineText& renderer)
 {
-    return iter.m_obj == &renderer && iter.m_pos >= renderer.textLength();
+    return iter.renderer() == &renderer && iter.m_pos >= renderer.textLength();
 }
 
 inline void nextCharacter(UChar& currentCharacter, UChar& lastCharacter, UChar& secondToLastCharacter)
@@ -672,9 +672,9 @@ ALWAYS_INLINE float textWidth(RenderText* text, unsigned from, unsigned len, con
 // Adding a pair of midpoints before a character will split it out into a new line box.
 inline void ensureCharacterGetsLineBox(LineMidpointState& lineMidpointState, InlineIterator& textParagraphSeparator)
 {
-    InlineIterator midpoint(0, textParagraphSeparator.m_obj, textParagraphSeparator.m_pos);
-    startIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparator.m_obj, textParagraphSeparator.m_pos - 1));
-    stopIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparator.m_obj, textParagraphSeparator.m_pos));
+    InlineIterator midpoint(0, textParagraphSeparator.renderer(), textParagraphSeparator.m_pos);
+    startIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparator.renderer(), textParagraphSeparator.m_pos - 1));
+    stopIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparator.renderer(), textParagraphSeparator.m_pos));
 }
 
 inline void tryHyphenating(RenderText* text, const Font& font, const AtomicString& localeIdentifier, unsigned consecutiveHyphenatedLines, int consecutiveHyphenatedLinesLimit, int minimumPrefixLimit, int minimumSuffixLimit, unsigned lastSpace, unsigned pos, float xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
@@ -750,7 +750,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
     if (!m_current.m_pos)
         m_appliedStartWidth = false;
 
-    RenderText* renderText = toRenderText(m_current.m_obj);
+    RenderText* renderText = toRenderText(m_current.renderer());
 
 #if ENABLE(SVG)
     bool isSVGText = renderText->isSVGInlineText();
@@ -759,10 +759,10 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
     // If we have left a no-wrap inline and entered an autowrap inline while ignoring spaces
     // then we need to mark the start of the autowrap inline as a potential linebreak now.
     if (m_autoWrap && !RenderStyle::autoWrap(m_lastWS) && m_ignoringSpaces)
-        commitLineBreakAtCurrentWidth(m_current.m_obj);
+        commitLineBreakAtCurrentWidth(m_current.renderer());
 
-    if (renderText->style().hasTextCombine() && m_current.m_obj->isCombineText() && !toRenderCombineText(*m_current.m_obj).isCombined()) {
-        RenderCombineText& combineRenderer = toRenderCombineText(*m_current.m_obj);
+    if (renderText->style().hasTextCombine() && m_current.renderer()->isCombineText() && !toRenderCombineText(*m_current.renderer()).isCombined()) {
+        RenderCombineText& combineRenderer = toRenderCombineText(*m_current.renderer());
         combineRenderer.combineText();
         // The length of the renderer's text may have changed. Increment stale iterator positions
         if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreak, combineRenderer)) {
@@ -782,7 +782,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
     float lastSpaceWordSpacing = 0;
     float wordSpacingForWordMeasurement = 0;
 
-    float wrapW = m_width.uncommittedWidth() + inlineLogicalWidth(m_current.m_obj, !m_appliedStartWidth, true);
+    float wrapW = m_width.uncommittedWidth() + inlineLogicalWidth(m_current.renderer(), !m_appliedStartWidth, true);
     float charWidth = 0;
     bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == SPACE;
     // Auto-wrapping text should wrap in the middle of a word only if it could not wrap before the word,
@@ -856,7 +856,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
                     m_ignoringSpaces = false;
                     wordSpacingForWordMeasurement = 0;
                     lastSpace = m_current.m_pos; // e.g., "Foo    goo", don't add in any of the ignored spaces.
-                    stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.m_obj, m_current.m_pos));
+                    stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.renderer(), m_current.m_pos));
                     stoppedIgnoringSpaces = true;
                 } else {
                     // Just keep ignoring these spaces.
@@ -890,7 +890,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
                 m_width.setTrailingWhitespaceWidth(additionalTempWidth);
 
             if (!m_appliedStartWidth) {
-                m_width.addUncommittedWidth(inlineLogicalWidth(m_current.m_obj, true, false));
+                m_width.addUncommittedWidth(inlineLogicalWidth(m_current.renderer(), true, false));
                 m_appliedStartWidth = true;
             }
 
@@ -916,7 +916,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
                     // additional whitespace.
                     if (!m_width.fitsOnLineIncludingExtraWidth(charWidth)) {
                         lineWasTooWide = true;
-                        m_lineBreak.moveTo(m_current.m_obj, m_current.m_pos, m_current.m_nextBreakablePosition);
+                        m_lineBreak.moveTo(m_current.renderer(), m_current.m_pos, m_current.m_nextBreakablePosition);
                         m_lineBreaker.skipTrailingWhitespace(m_lineBreak, m_lineInfo);
                     }
                 }
@@ -935,7 +935,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
                         m_lineInfo.setPreviousLineBrokeCleanly(true);
                         wordMeasurement.endOffset = m_lineBreak.m_pos;
                     }
-                    if (m_lineBreak.m_obj && m_lineBreak.m_pos && m_lineBreak.m_obj->isText() && toRenderText(m_lineBreak.m_obj)->textLength() && toRenderText(m_lineBreak.m_obj)->characterAt(m_lineBreak.m_pos - 1) == softHyphen && style.hyphens() != HyphensNone)
+                    if (m_lineBreak.renderer() && m_lineBreak.m_pos && m_lineBreak.renderer()->isText() && toRenderText(m_lineBreak.renderer())->textLength() && toRenderText(m_lineBreak.renderer())->characterAt(m_lineBreak.m_pos - 1) == softHyphen && style.hyphens() != HyphensNone)
                         hyphenated = true;
                     if (m_lineBreak.m_pos && m_lineBreak.m_pos != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) {
                         if (charWidth) {
@@ -962,7 +962,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
             if (c == '\n' && m_preservesNewline) {
                 if (!stoppedIgnoringSpaces && m_current.m_pos > 0)
                     ensureCharacterGetsLineBox(m_lineMidpointState, m_current);
-                m_lineBreak.moveTo(m_current.m_obj, m_current.m_pos, m_current.m_nextBreakablePosition);
+                m_lineBreak.moveTo(m_current.renderer(), m_current.m_pos, m_current.m_nextBreakablePosition);
                 m_lineBreak.increment();
                 m_lineInfo.setPreviousLineBrokeCleanly(true);
                 return true;
@@ -971,7 +971,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
             if (m_autoWrap && betweenWords) {
                 m_width.commit();
                 wrapW = 0;
-                m_lineBreak.moveTo(m_current.m_obj, m_current.m_pos, m_current.m_nextBreakablePosition);
+                m_lineBreak.moveTo(m_current.renderer(), m_current.m_pos, m_current.m_nextBreakablePosition);
                 // Auto-wrapping text should not wrap in the middle of a word once it has had an
                 // opportunity to break after a word.
                 breakWords = false;
@@ -980,7 +980,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
             if (midWordBreak && !U16_IS_TRAIL(c) && !(U_GET_GC_MASK(c) & U_GC_M_MASK)) {
                 // Remember this as a breakable position in case
                 // adding the end width forces a break.
-                m_lineBreak.moveTo(m_current.m_obj, m_current.m_pos, m_current.m_nextBreakablePosition);
+                m_lineBreak.moveTo(m_current.renderer(), m_current.m_pos, m_current.m_nextBreakablePosition);
                 midWordBreak &= (breakWords || breakAll);
             }
 
@@ -1011,7 +1011,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
             lastSpaceWordSpacing = applyWordSpacing ? wordSpacing : 0;
             wordSpacingForWordMeasurement = (applyWordSpacing && wordMeasurements.last().width) ? wordSpacing : 0;
             lastSpace = m_current.m_pos; // e.g., "Foo    goo", don't add in any of the ignored spaces.
-            stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.m_obj, m_current.m_pos));
+            stopIgnoringSpaces(m_lineMidpointState, InlineIterator(0, m_current.renderer(), m_current.m_pos));
         }
 #if ENABLE(SVG)
         if (isSVGText && m_current.m_pos > 0) {
@@ -1022,7 +1022,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
 #endif
 
         if (m_currentCharacterIsSpace && !previousCharacterIsSpace) {
-            m_startOfIgnoredSpaces.m_obj = m_current.m_obj;
+            m_startOfIgnoredSpaces.setRenderer(m_current.renderer());
             m_startOfIgnoredSpaces.m_pos = m_current.m_pos;
             // Spaces after right-aligned text and before a line-break get collapsed away completely so that the trailing
             // space doesn't seem to push the text out from the right-hand edge.
@@ -1037,11 +1037,11 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
 
         if (!m_currentCharacterIsSpace && previousCharacterIsWS) {
             if (m_autoWrap && m_currentStyle->breakOnlyAfterWhiteSpace())
-                m_lineBreak.moveTo(m_current.m_obj, m_current.m_pos, m_current.m_nextBreakablePosition);
+                m_lineBreak.moveTo(m_current.renderer(), m_current.m_pos, m_current.m_nextBreakablePosition);
         }
 
         if (m_collapseWhiteSpace && m_currentCharacterIsSpace && !m_ignoringSpaces)
-            m_trailingObjects.setTrailingWhitespace(toRenderText(m_current.m_obj));
+            m_trailingObjects.setTrailingWhitespace(toRenderText(m_current.renderer()));
         else if (!m_currentStyle->collapseWhiteSpace() || !m_currentCharacterIsSpace)
             m_trailingObjects.clear();
 
@@ -1062,7 +1062,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
     wordMeasurement.width = m_ignoringSpaces ? 0 : additionalTempWidth + wordSpacingForWordMeasurement;
     additionalTempWidth += lastSpaceWordSpacing;
 
-    float inlineLogicalTempWidth = inlineLogicalWidth(m_current.m_obj, !m_appliedStartWidth, m_includeEndWidth);
+    float inlineLogicalTempWidth = inlineLogicalWidth(m_current.renderer(), !m_appliedStartWidth, m_includeEndWidth);
     m_width.addUncommittedWidth(additionalTempWidth + inlineLogicalTempWidth);
 
     if (wordMeasurement.fallbackFonts.isEmpty() && !fallbackFonts.isEmpty())
@@ -1116,7 +1116,7 @@ inline bool BreakingContext::canBreakAtThisPosition()
     bool nextIsAutoWrappingText = (m_nextObject && m_nextObject->isText() && (m_autoWrap || m_nextObject->style().autoWrap()));
     if (!nextIsAutoWrappingText)
         return m_autoWrap;
-    bool currentIsTextOrEmptyInline = m_current.m_obj->isText() || (m_current.m_obj->isRenderInline() && isEmptyInline(toRenderInline(*m_current.m_obj)));
+    bool currentIsTextOrEmptyInline = m_current.renderer()->isText() || (m_current.renderer()->isRenderInline() && isEmptyInline(toRenderInline(*m_current.renderer())));
     if (!currentIsTextOrEmptyInline)
         return m_autoWrap;
 
@@ -1163,8 +1163,8 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded()
         m_width.fitBelowFloats();
     }
 
-    if (!m_current.m_obj->isFloatingOrOutOfFlowPositioned()) {
-        m_lastObject = m_current.m_obj;
+    if (!m_current.renderer()->isFloatingOrOutOfFlowPositioned()) {
+        m_lastObject = m_current.renderer();
         if (m_lastObject->isReplaced() && m_autoWrap && (!m_lastObject->isImage() || m_allowImagesToBreak) && (!m_lastObject->isListMarker() || toRenderListMarker(*m_lastObject).isInside())) {
             m_width.commit();
             m_lineBreak.moveToStartOf(m_nextObject);
@@ -1177,7 +1177,7 @@ inline void checkMidpoints(LineMidpointState& lineMidpointState, InlineIterator&
     // Check to see if our last midpoint is a start point beyond the line break. If so,
     // shave it off the list, and shave off a trailing space if the previous end point doesn't
     // preserve whitespace.
-    if (lBreak.m_obj && lineMidpointState.numMidpoints && !(lineMidpointState.numMidpoints % 2)) {
+    if (lBreak.renderer() && lineMidpointState.numMidpoints && !(lineMidpointState.numMidpoints % 2)) {
         InlineIterator* midpoints = lineMidpointState.midpoints.data();
         InlineIterator& endpoint = midpoints[lineMidpointState.numMidpoints - 2];
         const InlineIterator& startpoint = midpoints[lineMidpointState.numMidpoints - 1];
@@ -1187,7 +1187,7 @@ inline void checkMidpoints(LineMidpointState& lineMidpointState, InlineIterator&
         if (currpoint == lBreak) {
             // We hit the line break before the start point. Shave off the start point.
             lineMidpointState.numMidpoints--;
-            if (endpoint.m_obj->style().collapseWhiteSpace() && endpoint.m_obj->isText())
+            if (endpoint.renderer()->style().collapseWhiteSpace() && endpoint.renderer()->isText())
                 endpoint.m_pos--;
         }
     }
@@ -1203,15 +1203,15 @@ InlineIterator BreakingContext::handleEndOfLine()
 #endif
     if (segmentAllowsOverflow) {
         if (m_lineBreak == m_resolver.position()) {
-            if (!m_lineBreak.m_obj || !m_lineBreak.m_obj->isBR()) {
+            if (!m_lineBreak.renderer() || !m_lineBreak.renderer()->isBR()) {
                 // we just add as much as possible
                 if (m_blockStyle.whiteSpace() == PRE && !m_current.m_pos) {
                     m_lineBreak.moveTo(m_lastObject, m_lastObject->isText() ? m_lastObject->length() : 0);
-                } else if (m_lineBreak.m_obj) {
+                } else if (m_lineBreak.renderer()) {
                     // Don't ever break in the middle of a word if we can help it.
                     // There's no room at all. We just have to be on this line,
                     // even though we'll spill out.
-                    m_lineBreak.moveTo(m_current.m_obj, m_current.m_pos);
+                    m_lineBreak.moveTo(m_current.renderer(), m_current.m_pos);
                 }
             }
             // make sure we consume at least one char/object.
index d12a97d..0cb32ca 100644 (file)
@@ -45,7 +45,7 @@ void LineBreaker::reset()
 void LineBreaker::skipTrailingWhitespace(InlineIterator& iterator, const LineInfo& lineInfo)
 {
     while (!iterator.atEnd() && !requiresLineBox(iterator, lineInfo, TrailingWhitespace)) {
-        RenderObject& object = *iterator.m_obj;
+        RenderObject& object = *iterator.renderer();
         if (object.isOutOfFlowPositioned())
             setStaticPositions(m_block, toRenderBox(object));
         else if (object.isFloating())
@@ -57,7 +57,7 @@ void LineBreaker::skipTrailingWhitespace(InlineIterator& iterator, const LineInf
 void LineBreaker::skipLeadingWhitespace(InlineBidiResolver& resolver, LineInfo& lineInfo, FloatingObject* lastFloatFromPreviousLine, LineWidth& width)
 {
     while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
-        RenderObject& object = *resolver.position().m_obj;
+        RenderObject& object = *resolver.position().renderer();
         if (object.isOutOfFlowPositioned()) {
             setStaticPositions(m_block, toRenderBox(object));
             if (object.style().isOriginalDisplayInlineType()) {
index 75a1bee..0b0c44e 100644 (file)
@@ -74,7 +74,7 @@ inline bool shouldCollapseWhiteSpace(const RenderStyle* style, const LineInfo& l
 
 inline bool skipNonBreakingSpace(const InlineIterator& it, const LineInfo& lineInfo)
 {
-    if (it.m_obj->style().nbspMode() != SPACE || it.current() != noBreakSpace)
+    if (it.renderer()->style().nbspMode() != SPACE || it.current() != noBreakSpace)
         return false;
 
     // FIXME: This is bad. It makes nbsp inconsistent with space and won't work correctly
@@ -98,25 +98,25 @@ inline bool alwaysRequiresLineBox(const RenderInline& flow)
 
 inline bool requiresLineBox(const InlineIterator& it, const LineInfo& lineInfo = LineInfo(), WhitespacePosition whitespacePosition = LeadingWhitespace)
 {
-    if (it.m_obj->isFloatingOrOutOfFlowPositioned())
+    if (it.renderer()->isFloatingOrOutOfFlowPositioned())
         return false;
 
-    if (it.m_obj->isBR())
+    if (it.renderer()->isBR())
         return true;
 
     bool rendererIsEmptyInline = false;
-    if (it.m_obj->isRenderInline()) {
-        const RenderInline& inlineRenderer = toRenderInline(*it.m_obj);
+    if (it.renderer()->isRenderInline()) {
+        const RenderInline& inlineRenderer = toRenderInline(*it.renderer());
         if (!alwaysRequiresLineBox(inlineRenderer) && !requiresLineBoxForContent(inlineRenderer, lineInfo))
             return false;
         rendererIsEmptyInline = isEmptyInline(inlineRenderer);
     }
 
-    if (!shouldCollapseWhiteSpace(&it.m_obj->style(), lineInfo, whitespacePosition))
+    if (!shouldCollapseWhiteSpace(&it.renderer()->style(), lineInfo, whitespacePosition))
         return true;
 
     UChar current = it.current();
-    bool notJustWhitespace = current != ' ' && current != '\t' && current != softHyphen && (current != '\n' || it.m_obj->preservesNewline()) && !skipNonBreakingSpace(it, lineInfo);
+    bool notJustWhitespace = current != ' ' && current != '\t' && current != softHyphen && (current != '\n' || it.renderer()->preservesNewline()) && !skipNonBreakingSpace(it, lineInfo);
     return notJustWhitespace || rendererIsEmptyInline;
 }
 
index b32bdb5..16281a9 100644 (file)
@@ -38,8 +38,8 @@
 namespace WebCore {
 
 LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIterator& end)
-    : start(start.root(), start.object(), start.offset())
-    , end(end.root(), end.object(), end.offset())
+    : start(start.root(), start.renderer(), start.offset())
+    , end(end.root(), end.renderer(), end.offset())
     {
     }