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

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: 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/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index a6304a708559976dd77b0674c4d684c51db6b62f..15b304181e2a1131fae63773c7f95b5d88125276 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -844,6 +844,9 @@ void FrameView::performLayout(bool inSubtreeLayout)
forceLayoutParentViewIfNeeded();
+ if (hasOrthogonalWritingModeRoots())
+ layoutOrthogonalWritingModeRoots();
+
if (inSubtreeLayout) {
if (m_analyzer)
m_analyzer->increment(LayoutAnalyzer::PerformLayoutRootLayoutObjects, m_layoutSubtreeRootList.size());
@@ -1736,6 +1739,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()) {
+ continue;
+ }
+ LayoutState layoutState(*root);
+ root->layout();
+ }
+}
+
void FrameView::scheduleRelayout()
{
ASSERT(m_frame->view() == this);

Powered by Google App Engine
This is Rietveld 408576698