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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 // Calls resumeScheduledEvents() | 866 // Calls resumeScheduledEvents() |
867 performPostLayoutTasks(); | 867 performPostLayoutTasks(); |
868 m_inSynchronousPostLayout = false; | 868 m_inSynchronousPostLayout = false; |
869 } | 869 } |
870 | 870 |
871 if (!m_postLayoutTasksTimer.isActive() && (needsLayout() || m_inSynchronousP
ostLayout)) { | 871 if (!m_postLayoutTasksTimer.isActive() && (needsLayout() || m_inSynchronousP
ostLayout)) { |
872 // If we need layout or are already in a synchronous call to postLayoutT
asks(), | 872 // If we need layout or are already in a synchronous call to postLayoutT
asks(), |
873 // defer widget updates and event dispatch until after we return. postLa
youtTasks() | 873 // defer widget updates and event dispatch until after we return. postLa
youtTasks() |
874 // can make us need to update again, and we can get stuck in a nasty cyc
le unless | 874 // can make us need to update again, and we can get stuck in a nasty cyc
le unless |
875 // we call it through the timer here. | 875 // we call it through the timer here. |
876 m_postLayoutTasksTimer.startOneShot(0, FROM_HERE); | 876 m_postLayoutTasksTimer.startOneShot(0, BLINK_FROM_HERE); |
877 if (needsLayout()) | 877 if (needsLayout()) |
878 layout(); | 878 layout(); |
879 } | 879 } |
880 } | 880 } |
881 | 881 |
882 void FrameView::layout() | 882 void FrameView::layout() |
883 { | 883 { |
884 // We should never layout a Document which is not in a LocalFrame. | 884 // We should never layout a Document which is not in a LocalFrame. |
885 ASSERT(m_frame); | 885 ASSERT(m_frame); |
886 ASSERT(m_frame->view() == this); | 886 ASSERT(m_frame->view() == this); |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 | 1513 |
1514 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); | 1514 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); |
1515 | 1515 |
1516 if (LayoutView* layoutView = document->layoutView()) { | 1516 if (LayoutView* layoutView = document->layoutView()) { |
1517 if (layoutView->usesCompositing()) | 1517 if (layoutView->usesCompositing()) |
1518 layoutView->compositor()->frameViewDidScroll(); | 1518 layoutView->compositor()->frameViewDidScroll(); |
1519 } | 1519 } |
1520 | 1520 |
1521 if (m_didScrollTimer.isActive()) | 1521 if (m_didScrollTimer.isActive()) |
1522 m_didScrollTimer.stop(); | 1522 m_didScrollTimer.stop(); |
1523 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, FROM_H
ERE); | 1523 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); |
1524 | 1524 |
1525 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 1525 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
1526 cache->handleScrollPositionChanged(this); | 1526 cache->handleScrollPositionChanged(this); |
1527 | 1527 |
1528 layoutView()->clearHitTestCache(); | 1528 layoutView()->clearHitTestCache(); |
1529 frame().loader().saveScrollState(); | 1529 frame().loader().saveScrollState(); |
1530 } | 1530 } |
1531 | 1531 |
1532 void FrameView::didScrollTimerFired(Timer<FrameView>*) | 1532 void FrameView::didScrollTimerFired(Timer<FrameView>*) |
1533 { | 1533 { |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 performPostLayoutTasks(); | 1908 performPostLayoutTasks(); |
1909 if (m_updateWidgetsTimer.isActive()) | 1909 if (m_updateWidgetsTimer.isActive()) |
1910 updateWidgetsTimerFired(0); | 1910 updateWidgetsTimerFired(0); |
1911 } | 1911 } |
1912 | 1912 |
1913 void FrameView::scheduleUpdateWidgetsIfNecessary() | 1913 void FrameView::scheduleUpdateWidgetsIfNecessary() |
1914 { | 1914 { |
1915 ASSERT(!isInPerformLayout()); | 1915 ASSERT(!isInPerformLayout()); |
1916 if (m_updateWidgetsTimer.isActive() || m_partUpdateSet.isEmpty()) | 1916 if (m_updateWidgetsTimer.isActive() || m_partUpdateSet.isEmpty()) |
1917 return; | 1917 return; |
1918 m_updateWidgetsTimer.startOneShot(0, FROM_HERE); | 1918 m_updateWidgetsTimer.startOneShot(0, BLINK_FROM_HERE); |
1919 } | 1919 } |
1920 | 1920 |
1921 void FrameView::performPostLayoutTasks() | 1921 void FrameView::performPostLayoutTasks() |
1922 { | 1922 { |
1923 // FIXME: We can reach here, even when the page is not active! | 1923 // FIXME: We can reach here, even when the page is not active! |
1924 // http/tests/inspector/elements/html-link-import.html and many other | 1924 // http/tests/inspector/elements/html-link-import.html and many other |
1925 // tests hit that case. | 1925 // tests hit that case. |
1926 // We should ASSERT(isActive()); or at least return early if we can! | 1926 // We should ASSERT(isActive()); or at least return early if we can! |
1927 ASSERT(!isInPerformLayout()); // Always before or after performLayout(), par
t of the highest-level layout() call. | 1927 ASSERT(!isInPerformLayout()); // Always before or after performLayout(), par
t of the highest-level layout() call. |
1928 TRACE_EVENT0("blink,benchmark", "FrameView::performPostLayoutTasks"); | 1928 TRACE_EVENT0("blink,benchmark", "FrameView::performPostLayoutTasks"); |
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3935 | 3935 |
3936 if (!graphicsLayer) | 3936 if (!graphicsLayer) |
3937 return; | 3937 return; |
3938 | 3938 |
3939 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), paintInvalidationContainer, viewRect); | 3939 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), paintInvalidationContainer, viewRect); |
3940 | 3940 |
3941 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3941 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3942 } | 3942 } |
3943 | 3943 |
3944 } // namespace blink | 3944 } // namespace blink |
OLD | NEW |