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

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

Issue 23483035: Fast increment to the next inline renderer when the current renderer is isolated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Proposed Patch V2 Created 7 years, 3 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 | « no previous file | Source/core/rendering/RenderBlockLineLayout.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 d88205ae92425e121e171ac28d5876fa629ad7e0..d5fca7a2743342a1ffe62e09f85c4fac5a5596cc 100644
--- a/Source/core/rendering/InlineIterator.h
+++ b/Source/core/rendering/InlineIterator.h
@@ -35,6 +35,11 @@ namespace WebCore {
// optionally notifying a BidiResolver every time it steps into/out of a RenderInline.
class InlineIterator {
public:
+ enum IncrementRule {
+ FastIncrementInlineRenderer,
+ FastIncrementInTextNode
+ };
+
InlineIterator()
: m_root(0)
, m_obj(0)
@@ -70,7 +75,7 @@ public:
RenderObject* root() const { return m_root; }
void fastIncrementInTextNode();
- void increment(InlineBidiResolver* = 0);
+ void increment(InlineBidiResolver* = 0, IncrementRule = FastIncrementInTextNode);
bool atEnd() const;
inline bool atTextParagraphSeparator()
@@ -352,11 +357,11 @@ private:
bool m_atEndOfInline;
};
-inline void InlineIterator::increment(InlineBidiResolver* resolver)
+inline void InlineIterator::increment(InlineBidiResolver* resolver, IncrementRule rule)
{
if (!m_obj)
return;
- if (m_obj->isText()) {
+ if (m_obj->isText() && rule == FastIncrementInTextNode) {
fastIncrementInTextNode();
if (m_pos < toRenderText(m_obj)->textLength())
return;
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698