| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include "HTMLNames.h" | 30 #include "HTMLNames.h" |
| 31 #include "RuntimeEnabledFeatures.h" | 31 #include "RuntimeEnabledFeatures.h" |
| 32 #include "core/accessibility/AXObjectCache.h" | 32 #include "core/accessibility/AXObjectCache.h" |
| 33 #include "core/css/FontFaceSet.h" | 33 #include "core/css/FontFaceSet.h" |
| 34 #include "core/css/resolver/StyleResolver.h" | 34 #include "core/css/resolver/StyleResolver.h" |
| 35 #include "core/dom/DocumentMarkerController.h" | 35 #include "core/dom/DocumentMarkerController.h" |
| 36 #include "core/editing/FrameSelection.h" | 36 #include "core/editing/FrameSelection.h" |
| 37 #include "core/events/OverflowEvent.h" | 37 #include "core/events/OverflowEvent.h" |
| 38 #include "core/fetch/ResourceFetcher.h" | 38 #include "core/fetch/ResourceFetcher.h" |
| 39 #include "core/fetch/ResourceLoadPriorityOptimizer.h" |
| 39 #include "core/fetch/TextResourceDecoder.h" | 40 #include "core/fetch/TextResourceDecoder.h" |
| 40 #include "core/html/HTMLFrameElement.h" | 41 #include "core/html/HTMLFrameElement.h" |
| 41 #include "core/html/HTMLHtmlElement.h" | 42 #include "core/html/HTMLHtmlElement.h" |
| 42 #include "core/html/HTMLPlugInElement.h" | 43 #include "core/html/HTMLPlugInElement.h" |
| 43 #include "core/inspector/InspectorInstrumentation.h" | 44 #include "core/inspector/InspectorInstrumentation.h" |
| 44 #include "core/loader/FrameLoader.h" | 45 #include "core/loader/FrameLoader.h" |
| 45 #include "core/loader/FrameLoaderClient.h" | 46 #include "core/loader/FrameLoaderClient.h" |
| 46 #include "core/page/Chrome.h" | 47 #include "core/page/Chrome.h" |
| 47 #include "core/page/ChromeClient.h" | 48 #include "core/page/ChromeClient.h" |
| 48 #include "core/page/EventHandler.h" | 49 #include "core/page/EventHandler.h" |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 | 901 |
| 901 forceLayoutParentViewIfNeeded(); | 902 forceLayoutParentViewIfNeeded(); |
| 902 | 903 |
| 903 // Text Autosizing requires two-pass layout which is incompatible with p
artial layout. | 904 // Text Autosizing requires two-pass layout which is incompatible with p
artial layout. |
| 904 // If enabled, only do partial layout for the second layout. | 905 // If enabled, only do partial layout for the second layout. |
| 905 // FIXME (crbug.com/256657): Do not do two layouts for text autosizing. | 906 // FIXME (crbug.com/256657): Do not do two layouts for text autosizing. |
| 906 PartialLayoutDisabler partialLayoutDisabler(partialLayout(), m_frame->se
ttings() && m_frame->settings()->textAutosizingEnabled()); | 907 PartialLayoutDisabler partialLayoutDisabler(partialLayout(), m_frame->se
ttings() && m_frame->settings()->textAutosizingEnabled()); |
| 907 | 908 |
| 908 LayoutIndicator layoutIndicator; | 909 LayoutIndicator layoutIndicator; |
| 909 rootForThisLayout->layout(); | 910 rootForThisLayout->layout(); |
| 911 |
| 912 ResourceLoadPriorityOptimizer modifier; |
| 913 rootForThisLayout->didLayout(modifier); |
| 910 } | 914 } |
| 911 | 915 |
| 912 bool autosized = frame().document()->textAutosizer()->processSubtree(rootFor
ThisLayout); | 916 bool autosized = frame().document()->textAutosizer()->processSubtree(rootFor
ThisLayout); |
| 913 if (autosized && rootForThisLayout->needsLayout()) { | 917 if (autosized && rootForThisLayout->needsLayout()) { |
| 914 TRACE_EVENT0("webkit", "2nd layout due to Text Autosizing"); | 918 TRACE_EVENT0("webkit", "2nd layout due to Text Autosizing"); |
| 915 LayoutIndicator layoutIndicator; | 919 LayoutIndicator layoutIndicator; |
| 916 rootForThisLayout->layout(); | 920 rootForThisLayout->layout(); |
| 921 |
| 922 ResourceLoadPriorityOptimizer modifier; |
| 923 rootForThisLayout->didLayout(modifier); |
| 917 } | 924 } |
| 918 | 925 |
| 919 m_inLayout = false; | 926 m_inLayout = false; |
| 920 | 927 |
| 921 if (inSubtreeLayout) | 928 if (inSubtreeLayout) |
| 922 rootForThisLayout->view()->popLayoutState(rootForThisLayout); | 929 rootForThisLayout->view()->popLayoutState(rootForThisLayout); |
| 923 } | 930 } |
| 924 | 931 |
| 925 void FrameView::scheduleOrPerformPostLayoutTasks() | 932 void FrameView::scheduleOrPerformPostLayoutTasks() |
| 926 { | 933 { |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 | 1662 |
| 1656 void FrameView::scrollPositionChanged() | 1663 void FrameView::scrollPositionChanged() |
| 1657 { | 1664 { |
| 1658 m_frame->eventHandler().sendScrollEvent(); | 1665 m_frame->eventHandler().sendScrollEvent(); |
| 1659 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); | 1666 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); |
| 1660 | 1667 |
| 1661 if (RenderView* renderView = this->renderView()) { | 1668 if (RenderView* renderView = this->renderView()) { |
| 1662 if (renderView->usesCompositing()) | 1669 if (renderView->usesCompositing()) |
| 1663 renderView->compositor()->frameViewDidScroll(); | 1670 renderView->compositor()->frameViewDidScroll(); |
| 1664 } | 1671 } |
| 1672 |
| 1673 ResourceLoadPriorityOptimizer modifier; |
| 1674 m_frame->document()->renderer()->didScroll(modifier); |
| 1665 } | 1675 } |
| 1666 | 1676 |
| 1667 void FrameView::repaintFixedElementsAfterScrolling() | 1677 void FrameView::repaintFixedElementsAfterScrolling() |
| 1668 { | 1678 { |
| 1669 // For fixed position elements, update widget positions and compositing laye
rs after scrolling, | 1679 // For fixed position elements, update widget positions and compositing laye
rs after scrolling, |
| 1670 // but only if we're not inside of layout. | 1680 // but only if we're not inside of layout. |
| 1671 if (!m_nestedLayoutCount && hasViewportConstrainedObjects()) { | 1681 if (!m_nestedLayoutCount && hasViewportConstrainedObjects()) { |
| 1672 if (RenderView* renderView = this->renderView()) { | 1682 if (RenderView* renderView = this->renderView()) { |
| 1673 renderView->updateWidgetPositions(); | 1683 renderView->updateWidgetPositions(); |
| 1674 renderView->layer()->updateLayerPositionsAfterDocumentScroll(); | 1684 renderView->layer()->updateLayerPositionsAfterDocumentScroll(); |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3511 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3521 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
| 3512 { | 3522 { |
| 3513 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3523 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
| 3514 if (AXObjectCache* cache = axObjectCache()) { | 3524 if (AXObjectCache* cache = axObjectCache()) { |
| 3515 cache->remove(scrollbar); | 3525 cache->remove(scrollbar); |
| 3516 cache->handleScrollbarUpdate(this); | 3526 cache->handleScrollbarUpdate(this); |
| 3517 } | 3527 } |
| 3518 } | 3528 } |
| 3519 | 3529 |
| 3520 } // namespace WebCore | 3530 } // namespace WebCore |
| OLD | NEW |