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

Side by Side 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, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 837
838 ASSERT(!isInPerformLayout()); 838 ASSERT(!isInPerformLayout());
839 lifecycle().advanceTo(DocumentLifecycle::InPerformLayout); 839 lifecycle().advanceTo(DocumentLifecycle::InPerformLayout);
840 840
841 // performLayout is the actual guts of layout(). 841 // performLayout is the actual guts of layout().
842 // FIXME: The 300 other lines in layout() probably belong in other helper fu nctions 842 // FIXME: The 300 other lines in layout() probably belong in other helper fu nctions
843 // so that a single human could understand what layout() is actually doing. 843 // so that a single human could understand what layout() is actually doing.
844 844
845 forceLayoutParentViewIfNeeded(); 845 forceLayoutParentViewIfNeeded();
846 846
847 if (hasOrthogonalWritingModeRoots())
848 layoutOrthogonalWritingModeRoots();
849
847 if (inSubtreeLayout) { 850 if (inSubtreeLayout) {
848 if (m_analyzer) 851 if (m_analyzer)
849 m_analyzer->increment(LayoutAnalyzer::PerformLayoutRootLayoutObjects , m_layoutSubtreeRootList.size()); 852 m_analyzer->increment(LayoutAnalyzer::PerformLayoutRootLayoutObjects , m_layoutSubtreeRootList.size());
850 while (LayoutObject* root = m_layoutSubtreeRootList.takeDeepestRoot()) { 853 while (LayoutObject* root = m_layoutSubtreeRootList.takeDeepestRoot()) {
851 if (!root->needsLayout()) 854 if (!root->needsLayout())
852 continue; 855 continue;
853 layoutFromRootObject(*root); 856 layoutFromRootObject(*root);
854 857
855 // We need to ensure that we mark up all layoutObjects up to the Lay outView 858 // We need to ensure that we mark up all layoutObjects up to the Lay outView
856 // for paint invalidation. This simplifies our code as we just alway s 859 // for paint invalidation. This simplifies our code as we just alway s
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 void FrameView::clearLayoutSubtreeRoot(const LayoutObject& root) 1732 void FrameView::clearLayoutSubtreeRoot(const LayoutObject& root)
1730 { 1733 {
1731 m_layoutSubtreeRootList.removeRoot(const_cast<LayoutObject&>(root)); 1734 m_layoutSubtreeRootList.removeRoot(const_cast<LayoutObject&>(root));
1732 } 1735 }
1733 1736
1734 void FrameView::clearLayoutSubtreeRootsAndMarkContainingBlocks() 1737 void FrameView::clearLayoutSubtreeRootsAndMarkContainingBlocks()
1735 { 1738 {
1736 m_layoutSubtreeRootList.clearAndMarkContainingBlocksForLayout(); 1739 m_layoutSubtreeRootList.clearAndMarkContainingBlocksForLayout();
1737 } 1740 }
1738 1741
1742 void FrameView::addOrthogonalWritingModeRoot(LayoutBox& root)
1743 {
1744 m_orthogonalWritingModeRootList.addRoot(root);
1745 }
1746
1747 void FrameView::removeOrthogonalWritingModeRoot(LayoutBox& root)
1748 {
1749 m_orthogonalWritingModeRootList.removeRoot(root);
1750 }
1751
1752 bool FrameView::hasOrthogonalWritingModeRoots() const
1753 {
1754 return !m_orthogonalWritingModeRootList.isEmpty();
1755 }
1756
1757 void FrameView::layoutOrthogonalWritingModeRoots()
1758 {
1759 while (LayoutObject* root = m_orthogonalWritingModeRootList.takeDeepestRoot( )) {
1760 ASSERT(root->isBox() && toLayoutBox(*root).isOrthogonalWritingModeRoot() );
1761 if (!root->needsLayout()
1762 || root->isOutOfFlowPositioned()
1763 || root->isColumnSpanAll()
1764 || !root->styleRef().logicalHeight().isIntrinsicOrAuto()) {
1765 continue;
1766 }
1767 LayoutState layoutState(*root);
1768 root->layout();
1769 }
1770 }
1771
1739 void FrameView::scheduleRelayout() 1772 void FrameView::scheduleRelayout()
1740 { 1773 {
1741 ASSERT(m_frame->view() == this); 1774 ASSERT(m_frame->view() == this);
1742 1775
1743 if (!m_layoutSchedulingEnabled) 1776 if (!m_layoutSchedulingEnabled)
1744 return; 1777 return;
1745 if (!needsLayout()) 1778 if (!needsLayout())
1746 return; 1779 return;
1747 if (!m_frame->document()->shouldScheduleLayout()) 1780 if (!m_frame->document()->shouldScheduleLayout())
1748 return; 1781 return;
(...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after
4050 return m_hiddenForThrottling && m_crossOriginForThrottling; 4083 return m_hiddenForThrottling && m_crossOriginForThrottling;
4051 } 4084 }
4052 4085
4053 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4086 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4054 { 4087 {
4055 ASSERT(layoutView()); 4088 ASSERT(layoutView());
4056 return *layoutView(); 4089 return *layoutView();
4057 } 4090 }
4058 4091
4059 } // namespace blink 4092 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698