Index: third_party/WebKit/Source/core/frame/OrthogonalWritingModeRootList.h |
diff --git a/third_party/WebKit/Source/core/frame/OrthogonalWritingModeRootList.h b/third_party/WebKit/Source/core/frame/OrthogonalWritingModeRootList.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3be63984c53e389c797e918a0e9bf9a81b103899 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/frame/OrthogonalWritingModeRootList.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef OrthogonalWritingModeRootList_h |
+#define OrthogonalWritingModeRootList_h |
+ |
+#include "core/layout/DepthOrderedLayoutObjectList.h" |
+#include "wtf/Allocator.h" |
+#include "wtf/HashSet.h" |
+#include "wtf/Vector.h" |
+ |
+namespace blink { |
+ |
+class OrthogonalWritingModeRootList : public DepthOrderedLayoutObjectList { |
+ DISALLOW_NEW(); |
+public: |
+ OrthogonalWritingModeRootList() |
+ : m_isOrderedListDirty(false) |
+ , m_isAnyRemoved(false) |
+ , m_isIterating(false) |
+ { } |
+ |
+ void addRoot(LayoutObject& object) |
+ { |
+ m_roots.add(&object); |
+ m_isOrderedListDirty = true; |
+ } |
+ void removeRoot(LayoutObject& object) |
+ { |
+ m_roots.remove(&object); |
+ m_isOrderedListDirty = m_isAnyRemoved = true; |
+ } |
+ |
+ LayoutObject* takeDeepestRoot(); |
esprehn
2016/01/31 00:44:56
lets just merge this all into DepthOrderedLayoutOb
|
+ |
+private: |
+ typedef Vector<LayoutObjectWithDepth>::reverse_iterator iterator; |
+ iterator m_lastTaken; |
+ bool m_isOrderedListDirty; |
+ bool m_isAnyRemoved; |
+ bool m_isIterating; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // OrthogonalWritingModeRootList_h |