| OLD | NEW |
| 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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 void FrameView::removeOrthogonalWritingModeRoot(LayoutBox& root) | 1839 void FrameView::removeOrthogonalWritingModeRoot(LayoutBox& root) |
| 1840 { | 1840 { |
| 1841 m_orthogonalWritingModeRootList.remove(root); | 1841 m_orthogonalWritingModeRootList.remove(root); |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 bool FrameView::hasOrthogonalWritingModeRoots() const | 1844 bool FrameView::hasOrthogonalWritingModeRoots() const |
| 1845 { | 1845 { |
| 1846 return !m_orthogonalWritingModeRootList.isEmpty(); | 1846 return !m_orthogonalWritingModeRootList.isEmpty(); |
| 1847 } | 1847 } |
| 1848 | 1848 |
| 1849 static inline void removeFloatingObjectsForSubtreeRoot(LayoutObject& root) |
| 1850 { |
| 1851 // TODO(kojii): Under certain conditions, moveChildTo() defers |
| 1852 // removeFloatingObjects() until the containing block layouts. For |
| 1853 // instance, when descendants of the moving child is floating, |
| 1854 // removeChildNode() does not clear them. In such cases, at this |
| 1855 // point, FloatingObjects may contain old or even deleted objects. |
| 1856 // Dealing this in markAllDescendantsWithFloatsForLayout() could |
| 1857 // solve, but since that is likely to suffer the performance and |
| 1858 // since the containing block of orthogonal writing mode roots |
| 1859 // having floats is very rare, prefer to re-create |
| 1860 // FloatingObjects. |
| 1861 if (LayoutBlock* cb = root.containingBlock()) { |
| 1862 if (cb->needsLayout() && cb->isLayoutBlockFlow()) |
| 1863 toLayoutBlockFlow(cb)->removeFloatingObjects(); |
| 1864 } |
| 1865 } |
| 1866 |
| 1849 void FrameView::layoutOrthogonalWritingModeRoots() | 1867 void FrameView::layoutOrthogonalWritingModeRoots() |
| 1850 { | 1868 { |
| 1851 for (auto& root : m_orthogonalWritingModeRootList.ordered()) { | 1869 for (auto& root : m_orthogonalWritingModeRootList.ordered()) { |
| 1852 ASSERT(root->isBox() && toLayoutBox(*root).isOrthogonalWritingModeRoot()
); | 1870 ASSERT(root->isBox() && toLayoutBox(*root).isOrthogonalWritingModeRoot()
); |
| 1853 if (!root->needsLayout() | 1871 if (!root->needsLayout() |
| 1854 || root->isOutOfFlowPositioned() | 1872 || root->isOutOfFlowPositioned() |
| 1855 || root->isColumnSpanAll() | 1873 || root->isColumnSpanAll() |
| 1856 || !root->styleRef().logicalHeight().isIntrinsicOrAuto()) { | 1874 || !root->styleRef().logicalHeight().isIntrinsicOrAuto()) { |
| 1857 continue; | 1875 continue; |
| 1858 } | 1876 } |
| 1859 LayoutState layoutState(*root); | 1877 |
| 1860 root->layout(); | 1878 removeFloatingObjectsForSubtreeRoot(*root); |
| 1879 layoutFromRootObject(*root); |
| 1861 } | 1880 } |
| 1862 } | 1881 } |
| 1863 | 1882 |
| 1864 bool FrameView::checkLayoutInvalidationIsAllowed() const | 1883 bool FrameView::checkLayoutInvalidationIsAllowed() const |
| 1865 { | 1884 { |
| 1866 if (m_allowsLayoutInvalidationAfterLayoutClean) | 1885 if (m_allowsLayoutInvalidationAfterLayoutClean) |
| 1867 return true; | 1886 return true; |
| 1868 | 1887 |
| 1869 // If we are updating all lifecycle phases beyond LayoutClean, we don't expe
ct dirty layout after LayoutClean. | 1888 // If we are updating all lifecycle phases beyond LayoutClean, we don't expe
ct dirty layout after LayoutClean. |
| 1870 CHECK_FOR_DIRTY_LAYOUT(lifecycle().state() < DocumentLifecycle::LayoutClean)
; | 1889 CHECK_FOR_DIRTY_LAYOUT(lifecycle().state() < DocumentLifecycle::LayoutClean)
; |
| (...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4330 } | 4349 } |
| 4331 | 4350 |
| 4332 bool FrameView::canThrottleRendering() const | 4351 bool FrameView::canThrottleRendering() const |
| 4333 { | 4352 { |
| 4334 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4353 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4335 return false; | 4354 return false; |
| 4336 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4355 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4337 } | 4356 } |
| 4338 | 4357 |
| 4339 } // namespace blink | 4358 } // namespace blink |
| OLD | NEW |