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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1549153002: Fix preferred logical widths of orthogonal writing modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TestExpectations Created 5 years 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/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index de49f4bed8fe9b65c1d2548956bca675c16783dc..e3075a0daa8b21d7bfcb74c709982fe44b40cc45 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -834,6 +834,9 @@ void FrameView::performLayout(bool inSubtreeLayout)
forceLayoutParentViewIfNeeded();
+ if (hasOrthogonalWritingModeRoots())
+ layoutOrthogonalWritingModeRoots();
+
if (inSubtreeLayout) {
if (m_analyzer)
m_analyzer->increment(LayoutAnalyzer::PerformLayoutRootLayoutObjects, m_layoutSubtreeRootList.size());
@@ -1696,6 +1699,36 @@ void FrameView::clearLayoutSubtreeRootsAndMarkContainingBlocks()
m_layoutSubtreeRootList.clearAndMarkContainingBlocksForLayout();
}
+void FrameView::addOrthogonalWritingModeRoot(LayoutBox& root)
+{
+ m_orthogonalWritingModeRootList.addRoot(root);
+}
+
+void FrameView::removeOrthogonalWritingModeRoot(LayoutBox& root)
+{
+ m_orthogonalWritingModeRootList.removeRoot(root);
+}
+
+bool FrameView::hasOrthogonalWritingModeRoots() const
+{
+ return !m_orthogonalWritingModeRootList.isEmpty();
+}
+
+void FrameView::layoutOrthogonalWritingModeRoots()
+{
+ while (LayoutObject* root = m_orthogonalWritingModeRootList.takeDeepestRoot()) {
+ ASSERT(root->isBox() && toLayoutBox(*root).isOrthogonalWritingModeRoot());
+ if (!root->needsLayout()
+ || root->isOutOfFlowPositioned()
+ || root->isColumnSpanAll()
+ || !root->styleRef().logicalHeight().isIntrinsicOrAuto()) {
ojan 2016/01/22 02:22:35 If it's any of these last three, maybe we just sho
kojii 2016/01/22 02:33:51 Yeah, thought about it. But then we'll need to che
+ continue;
+ }
+ LayoutState layoutState(*root);
ojan 2016/01/22 02:22:35 I'm not 100% sure creating a LayoutState without d
kojii 2016/01/22 02:33:51 Yeah, wasn't sure either, but reading around and t
+ root->layout();
+ }
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);

Powered by Google App Engine
This is Rietveld 408576698