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

Unified Diff: third_party/WebKit/Source/core/frame/OrthogonalWritingModeRootList.h

Issue 1549153002: Fix preferred logical widths of orthogonal writing modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (merge conflict resolved) Created 4 years, 11 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
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

Powered by Google App Engine
This is Rietveld 408576698