Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1698)

Unified Diff: Source/core/rendering/InlineIterator.h

Issue 295513003: add 'slow' prefix to RenderObject's firstChild() / lastChild() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineIterator.h
diff --git a/Source/core/rendering/InlineIterator.h b/Source/core/rendering/InlineIterator.h
index feb0d11fe8a8f2a069fb8797a8d9c884e117741a..e0ecc103241573527757a64c1f4d95836a05af37 100644
--- a/Source/core/rendering/InlineIterator.h
+++ b/Source/core/rendering/InlineIterator.h
@@ -25,6 +25,7 @@
#include "core/rendering/BidiRun.h"
#include "core/rendering/RenderBlockFlow.h"
+#include "core/rendering/RenderInline.h"
#include "core/rendering/RenderText.h"
#include "wtf/StdLibExtras.h"
@@ -189,7 +190,7 @@ static bool isEmptyInline(RenderObject* object)
if (!object->isRenderInline())
return false;
- for (RenderObject* curr = object->firstChild(); curr; curr = curr->nextSibling()) {
+ for (RenderObject* curr = toRenderInline(object)->firstChild(); curr; curr = curr->nextSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
if (curr->isText() && toRenderText(curr)->isAllCollapsibleWhitespace())
@@ -215,7 +216,7 @@ static inline RenderObject* bidiNextShared(RenderObject* root, RenderObject* cur
while (current) {
next = 0;
if (!oldEndOfInline && !isIteratorTarget(current)) {
- next = current->firstChild();
+ next = current->slowFirstChild();
notifyObserverEnteredObject(observer, next);
}
@@ -282,7 +283,7 @@ static inline RenderObject* bidiNextIncludingEmptyInlines(RenderObject* root, Re
return bidiNextShared(root, current, observer, IncludeEmptyInlines, endOfInlinePtr);
}
-static inline RenderObject* bidiFirstSkippingEmptyInlines(RenderObject* root, InlineBidiResolver* resolver = 0)
+static inline RenderObject* bidiFirstSkippingEmptyInlines(RenderBlockFlow* root, InlineBidiResolver* resolver = 0)
{
RenderObject* o = root->firstChild();
if (!o)
@@ -310,7 +311,7 @@ static inline RenderObject* bidiFirstSkippingEmptyInlines(RenderObject* root, In
}
// FIXME: This method needs to be renamed when bidiNext finds a good name.
-static inline RenderObject* bidiFirstIncludingEmptyInlines(RenderObject* root)
+static inline RenderObject* bidiFirstIncludingEmptyInlines(RenderBlock* root)
{
RenderObject* o = root->firstChild();
// If either there are no children to walk, or the first one is correct
@@ -334,7 +335,7 @@ inline void InlineIterator::fastIncrementInTextNode()
// it shouldn't use functions called bidiFirst and bidiNext.
class InlineWalker {
public:
- InlineWalker(RenderObject* root)
+ InlineWalker(RenderBlock* root)
: m_root(root)
, m_current(0)
, m_atEndOfInline(false)
@@ -343,7 +344,7 @@ public:
m_current = bidiFirstIncludingEmptyInlines(m_root);
}
- RenderObject* root() { return m_root; }
+ RenderBlock* root() { return m_root; }
RenderObject* current() { return m_current; }
bool atEndOfInline() { return m_atEndOfInline; }
@@ -356,7 +357,7 @@ public:
return m_current;
}
private:
- RenderObject* m_root;
+ RenderBlock* m_root;
RenderObject* m_current;
bool m_atEndOfInline;
};
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698