| 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 19 matching lines...) Expand all Loading... |
| 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/animation/DocumentAnimations.h" | 33 #include "core/animation/DocumentAnimations.h" |
| 34 #include "core/css/FontFaceSet.h" | 34 #include "core/css/FontFaceSet.h" |
| 35 #include "core/css/resolver/StyleResolver.h" | 35 #include "core/css/resolver/StyleResolver.h" |
| 36 #include "core/dom/DocumentMarkerController.h" | 36 #include "core/dom/DocumentMarkerController.h" |
| 37 #include "core/editing/FrameSelection.h" | 37 #include "core/editing/FrameSelection.h" |
| 38 #include "core/events/OverflowEvent.h" | 38 #include "core/events/OverflowEvent.h" |
| 39 #include "core/fetch/ResourceFetcher.h" | 39 #include "core/fetch/ResourceFetcher.h" |
| 40 #include "core/fetch/ResourceLoadPriorityOptimizer.h" |
| 40 #include "core/fetch/TextResourceDecoder.h" | 41 #include "core/fetch/TextResourceDecoder.h" |
| 41 #include "core/html/HTMLFrameElement.h" | 42 #include "core/html/HTMLFrameElement.h" |
| 42 #include "core/html/HTMLHtmlElement.h" | 43 #include "core/html/HTMLHtmlElement.h" |
| 43 #include "core/html/HTMLPlugInElement.h" | 44 #include "core/html/HTMLPlugInElement.h" |
| 44 #include "core/inspector/InspectorInstrumentation.h" | 45 #include "core/inspector/InspectorInstrumentation.h" |
| 45 #include "core/loader/FrameLoader.h" | 46 #include "core/loader/FrameLoader.h" |
| 46 #include "core/loader/FrameLoaderClient.h" | 47 #include "core/loader/FrameLoaderClient.h" |
| 47 #include "core/page/Chrome.h" | 48 #include "core/page/Chrome.h" |
| 48 #include "core/page/ChromeClient.h" | 49 #include "core/page/ChromeClient.h" |
| 49 #include "core/page/EventHandler.h" | 50 #include "core/page/EventHandler.h" |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 forceLayoutParentViewIfNeeded(); | 904 forceLayoutParentViewIfNeeded(); |
| 904 | 905 |
| 905 // Text Autosizing requires two-pass layout which is incompatible with p
artial layout. | 906 // Text Autosizing requires two-pass layout which is incompatible with p
artial layout. |
| 906 // If enabled, only do partial layout for the second layout. | 907 // If enabled, only do partial layout for the second layout. |
| 907 // FIXME (crbug.com/256657): Do not do two layouts for text autosizing. | 908 // FIXME (crbug.com/256657): Do not do two layouts for text autosizing. |
| 908 PartialLayoutDisabler partialLayoutDisabler(partialLayout(), m_frame->se
ttings() && m_frame->settings()->textAutosizingEnabled()); | 909 PartialLayoutDisabler partialLayoutDisabler(partialLayout(), m_frame->se
ttings() && m_frame->settings()->textAutosizingEnabled()); |
| 909 | 910 |
| 910 LayoutIndicator layoutIndicator; | 911 LayoutIndicator layoutIndicator; |
| 911 rootForThisLayout->layout(); | 912 rootForThisLayout->layout(); |
| 912 gatherDebugLayoutRects(rootForThisLayout); | 913 gatherDebugLayoutRects(rootForThisLayout); |
| 914 |
| 915 ResourceLoadPriorityOptimizer modifier; |
| 916 rootForThisLayout->didLayout(modifier); |
| 913 } | 917 } |
| 914 | 918 |
| 915 TextAutosizer* textAutosizer = frame().document()->textAutosizer(); | 919 TextAutosizer* textAutosizer = frame().document()->textAutosizer(); |
| 916 bool autosized = textAutosizer && textAutosizer->processSubtree(rootForThisL
ayout); | 920 bool autosized = textAutosizer && textAutosizer->processSubtree(rootForThisL
ayout); |
| 917 if (autosized && rootForThisLayout->needsLayout()) { | 921 if (autosized && rootForThisLayout->needsLayout()) { |
| 918 TRACE_EVENT0("webkit", "2nd layout due to Text Autosizing"); | 922 TRACE_EVENT0("webkit", "2nd layout due to Text Autosizing"); |
| 919 LayoutIndicator layoutIndicator; | 923 LayoutIndicator layoutIndicator; |
| 920 rootForThisLayout->layout(); | 924 rootForThisLayout->layout(); |
| 921 gatherDebugLayoutRects(rootForThisLayout); | 925 gatherDebugLayoutRects(rootForThisLayout); |
| 926 |
| 927 ResourceLoadPriorityOptimizer modifier; |
| 928 rootForThisLayout->didLayout(modifier); |
| 922 } | 929 } |
| 923 | 930 |
| 924 m_inLayout = false; | 931 m_inLayout = false; |
| 925 | 932 |
| 926 if (inSubtreeLayout) | 933 if (inSubtreeLayout) |
| 927 rootForThisLayout->view()->popLayoutState(rootForThisLayout); | 934 rootForThisLayout->view()->popLayoutState(rootForThisLayout); |
| 928 } | 935 } |
| 929 | 936 |
| 930 void FrameView::scheduleOrPerformPostLayoutTasks() | 937 void FrameView::scheduleOrPerformPostLayoutTasks() |
| 931 { | 938 { |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 | 1686 |
| 1680 void FrameView::scrollPositionChanged() | 1687 void FrameView::scrollPositionChanged() |
| 1681 { | 1688 { |
| 1682 m_frame->eventHandler().sendScrollEvent(); | 1689 m_frame->eventHandler().sendScrollEvent(); |
| 1683 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); | 1690 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); |
| 1684 | 1691 |
| 1685 if (RenderView* renderView = this->renderView()) { | 1692 if (RenderView* renderView = this->renderView()) { |
| 1686 if (renderView->usesCompositing()) | 1693 if (renderView->usesCompositing()) |
| 1687 renderView->compositor()->frameViewDidScroll(); | 1694 renderView->compositor()->frameViewDidScroll(); |
| 1688 } | 1695 } |
| 1696 |
| 1697 ResourceLoadPriorityOptimizer modifier; |
| 1698 m_frame->document()->renderer()->didScroll(modifier); |
| 1689 } | 1699 } |
| 1690 | 1700 |
| 1691 void FrameView::repaintFixedElementsAfterScrolling() | 1701 void FrameView::repaintFixedElementsAfterScrolling() |
| 1692 { | 1702 { |
| 1693 // For fixed position elements, update widget positions and compositing laye
rs after scrolling, | 1703 // For fixed position elements, update widget positions and compositing laye
rs after scrolling, |
| 1694 // but only if we're not inside of layout. | 1704 // but only if we're not inside of layout. |
| 1695 if (!m_nestedLayoutCount && hasViewportConstrainedObjects()) { | 1705 if (!m_nestedLayoutCount && hasViewportConstrainedObjects()) { |
| 1696 if (RenderView* renderView = this->renderView()) { | 1706 if (RenderView* renderView = this->renderView()) { |
| 1697 renderView->updateWidgetPositions(); | 1707 renderView->updateWidgetPositions(); |
| 1698 renderView->layer()->updateLayerPositionsAfterDocumentScroll(); | 1708 renderView->layer()->updateLayerPositionsAfterDocumentScroll(); |
| (...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3503 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3513 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
| 3504 { | 3514 { |
| 3505 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3515 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
| 3506 if (AXObjectCache* cache = axObjectCache()) { | 3516 if (AXObjectCache* cache = axObjectCache()) { |
| 3507 cache->remove(scrollbar); | 3517 cache->remove(scrollbar); |
| 3508 cache->handleScrollbarUpdate(this); | 3518 cache->handleScrollbarUpdate(this); |
| 3509 } | 3519 } |
| 3510 } | 3520 } |
| 3511 | 3521 |
| 3512 } // namespace WebCore | 3522 } // namespace WebCore |
| OLD | NEW |