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

Unified Diff: Source/platform/text/BidiResolver.h

Issue 26315003: Bidi-Isolate inlines break layout with collapsed whitespace (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased patch Created 7 years, 2 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/RenderBlockLineLayout.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/BidiResolver.h
diff --git a/Source/platform/text/BidiResolver.h b/Source/platform/text/BidiResolver.h
index 52e7f2b22dc99becc3199256efe6b97d2d6ce170..cc5eb275720c30ebb5ea1db50dd117418916e6d0 100644
--- a/Source/platform/text/BidiResolver.h
+++ b/Source/platform/text/BidiResolver.h
@@ -25,6 +25,7 @@
#include "platform/text/BidiContext.h"
#include "platform/text/BidiRunList.h"
#include "platform/text/TextDirection.h"
+#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Vector.h"
@@ -225,6 +226,9 @@ public:
TextDirection determineParagraphDirectionality(bool* hasStrongDirectionality = 0);
+ void setMidpointStateForIsolatedRun(Run*, const MidpointState<Iterator>&);
+ MidpointState<Iterator> midpointStateForIsolatedRun(Run*);
+
protected:
void increment() { m_current.increment(); }
// FIXME: Instead of InlineBidiResolvers subclassing this method, we should
@@ -262,6 +266,7 @@ private:
void reorderRunsFromLevels();
Vector<BidiEmbedding, 8> m_currentExplicitEmbeddingSequence;
+ HashMap<Run *, MidpointState<Iterator> > m_midpointStateForIsolatedRun;
};
#ifndef NDEBUG
@@ -957,6 +962,20 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, Vis
endOfLine = Iterator();
}
+template <class Iterator, class Run>
+void BidiResolver<Iterator, Run>::setMidpointStateForIsolatedRun(Run* run, const MidpointState<Iterator>& midpoint)
+{
+ ASSERT(!m_midpointStateForIsolatedRun.contains(run));
+ m_midpointStateForIsolatedRun.add(run, midpoint);
+}
+
+template<class Iterator, class Run>
+MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun(Run* run)
+{
+ return m_midpointStateForIsolatedRun.take(run);
+}
+
+
} // namespace WebCore
#endif // BidiResolver_h
« no previous file with comments | « Source/core/rendering/RenderBlockLineLayout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698