summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/BidiRun.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/BidiRun.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/BidiRun.cpp')
-rw-r--r--Source/WebCore/rendering/BidiRun.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/WebCore/rendering/BidiRun.cpp b/Source/WebCore/rendering/BidiRun.cpp
index 792e89388..f4681765a 100644
--- a/Source/WebCore/rendering/BidiRun.cpp
+++ b/Source/WebCore/rendering/BidiRun.cpp
@@ -33,7 +33,7 @@ namespace WebCore {
DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, bidiRunCounter, ("BidiRun"));
-BidiRun::BidiRun(int start, int stop, RenderObject& renderer, BidiContext* context, UCharDirection dir)
+BidiRun::BidiRun(unsigned start, unsigned stop, RenderObject& renderer, BidiContext* context, UCharDirection dir)
: BidiCharacterRun(start, stop, context, dir)
, m_renderer(renderer)
, m_box(nullptr)
@@ -41,12 +41,9 @@ BidiRun::BidiRun(int start, int stop, RenderObject& renderer, BidiContext* conte
#ifndef NDEBUG
bidiRunCounter.increment();
#endif
- ASSERT(!m_renderer.isText() || static_cast<unsigned>(stop) <= toRenderText(m_renderer).textLength());
+ ASSERT(!is<RenderText>(m_renderer) || static_cast<unsigned>(stop) <= downcast<RenderText>(m_renderer).textLength());
// Stored in base class to save space.
m_hasHyphen = false;
-#if ENABLE(CSS_SHAPES)
- m_startsSegment = false;
-#endif
}
BidiRun::~BidiRun()
@@ -56,4 +53,12 @@ BidiRun::~BidiRun()
#endif
}
+std::unique_ptr<BidiRun> BidiRun::takeNext()
+{
+ std::unique_ptr<BidiCharacterRun> next = BidiCharacterRun::takeNext();
+ BidiCharacterRun* raw = next.release();
+ std::unique_ptr<BidiRun> result = std::unique_ptr<BidiRun>(static_cast<BidiRun*>(raw));
+ return result;
+}
+
}