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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 , m_isTransparent(false) | 166 , m_isTransparent(false) |
167 , m_baseBackgroundColor(Color::white) | 167 , m_baseBackgroundColor(Color::white) |
168 , m_mediaType("screen") | 168 , m_mediaType("screen") |
169 , m_overflowStatusDirty(true) | 169 , m_overflowStatusDirty(true) |
170 , m_viewportRenderer(0) | 170 , m_viewportRenderer(0) |
171 , m_wasScrolledByUser(false) | 171 , m_wasScrolledByUser(false) |
172 , m_inProgrammaticScroll(false) | 172 , m_inProgrammaticScroll(false) |
173 , m_safeToPropagateScrollToParent(true) | 173 , m_safeToPropagateScrollToParent(true) |
174 , m_deferredRepaintTimer(this, &FrameView::deferredRepaintTimerFired) | 174 , m_deferredRepaintTimer(this, &FrameView::deferredRepaintTimerFired) |
175 , m_isTrackingRepaints(false) | 175 , m_isTrackingRepaints(false) |
176 , m_shouldUpdateWhileOffscreen(true) | |
177 , m_scrollCorner(0) | 176 , m_scrollCorner(0) |
178 , m_shouldAutoSize(false) | 177 , m_shouldAutoSize(false) |
179 , m_inAutoSize(false) | 178 , m_inAutoSize(false) |
180 , m_didRunAutosize(false) | 179 , m_didRunAutosize(false) |
181 , m_hasSoftwareFilters(false) | 180 , m_hasSoftwareFilters(false) |
182 , m_visibleContentScaleFactor(1) | 181 , m_visibleContentScaleFactor(1) |
183 , m_inputEventsScaleFactorForEmulation(1) | 182 , m_inputEventsScaleFactorForEmulation(1) |
184 , m_partialLayout() | 183 , m_partialLayout() |
185 , m_layoutSizeFixedToFrameSize(true) | 184 , m_layoutSizeFixedToFrameSize(true) |
186 { | 185 { |
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1798 m_repaintRects.append(paintRect); | 1797 m_repaintRects.append(paintRect); |
1799 else | 1798 else |
1800 m_repaintRects[0].unite(paintRect); | 1799 m_repaintRects[0].unite(paintRect); |
1801 m_repaintCount++; | 1800 m_repaintCount++; |
1802 | 1801 |
1803 startDeferredRepaintTimer(delay); | 1802 startDeferredRepaintTimer(delay); |
1804 | 1803 |
1805 return; | 1804 return; |
1806 } | 1805 } |
1807 | 1806 |
1808 if (!shouldUpdate()) | |
1809 return; | |
1810 | |
1811 ScrollView::repaintContentRectangle(r); | 1807 ScrollView::repaintContentRectangle(r); |
1812 } | 1808 } |
1813 | 1809 |
1814 void FrameView::contentsResized() | 1810 void FrameView::contentsResized() |
1815 { | 1811 { |
1816 ScrollView::contentsResized(); | 1812 ScrollView::contentsResized(); |
1817 setNeedsLayout(); | 1813 setNeedsLayout(); |
1818 } | 1814 } |
1819 | 1815 |
1820 void FrameView::scrollbarExistenceDidChange() | 1816 void FrameView::scrollbarExistenceDidChange() |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 void FrameView::flushDeferredRepaints() | 1862 void FrameView::flushDeferredRepaints() |
1867 { | 1863 { |
1868 if (!m_deferredRepaintTimer.isActive()) | 1864 if (!m_deferredRepaintTimer.isActive()) |
1869 return; | 1865 return; |
1870 m_deferredRepaintTimer.stop(); | 1866 m_deferredRepaintTimer.stop(); |
1871 doDeferredRepaints(); | 1867 doDeferredRepaints(); |
1872 } | 1868 } |
1873 | 1869 |
1874 void FrameView::doDeferredRepaints() | 1870 void FrameView::doDeferredRepaints() |
1875 { | 1871 { |
1876 if (!shouldUpdate()) { | |
1877 m_repaintRects.clear(); | |
1878 m_repaintCount = 0; | |
1879 return; | |
1880 } | |
1881 unsigned size = m_repaintRects.size(); | 1872 unsigned size = m_repaintRects.size(); |
1882 for (unsigned i = 0; i < size; i++) { | 1873 for (unsigned i = 0; i < size; i++) { |
1883 ScrollView::repaintContentRectangle(pixelSnappedIntRect(m_repaintRects[i
])); | 1874 ScrollView::repaintContentRectangle(pixelSnappedIntRect(m_repaintRects[i
])); |
1884 } | 1875 } |
1885 m_repaintRects.clear(); | 1876 m_repaintRects.clear(); |
1886 m_repaintCount = 0; | 1877 m_repaintCount = 0; |
1887 | 1878 |
1888 updateDeferredRepaintDelayAfterRepaint(); | 1879 updateDeferredRepaintDelayAfterRepaint(); |
1889 } | 1880 } |
1890 | 1881 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool t
ransparent) | 2104 void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool t
ransparent) |
2114 { | 2105 { |
2115 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext
(m_frame.get())) { | 2106 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext
(m_frame.get())) { |
2116 if (FrameView* view = frame->view()) { | 2107 if (FrameView* view = frame->view()) { |
2117 view->setTransparent(transparent); | 2108 view->setTransparent(transparent); |
2118 view->setBaseBackgroundColor(backgroundColor); | 2109 view->setBaseBackgroundColor(backgroundColor); |
2119 } | 2110 } |
2120 } | 2111 } |
2121 } | 2112 } |
2122 | 2113 |
2123 bool FrameView::shouldUpdateWhileOffscreen() const | |
2124 { | |
2125 return m_shouldUpdateWhileOffscreen; | |
2126 } | |
2127 | |
2128 void FrameView::setShouldUpdateWhileOffscreen(bool shouldUpdateWhileOffscreen) | |
2129 { | |
2130 m_shouldUpdateWhileOffscreen = shouldUpdateWhileOffscreen; | |
2131 } | |
2132 | |
2133 bool FrameView::shouldUpdate() const | |
2134 { | |
2135 if (isOffscreen() && !shouldUpdateWhileOffscreen()) | |
2136 return false; | |
2137 return true; | |
2138 } | |
2139 | |
2140 void FrameView::scrollToAnchor() | 2114 void FrameView::scrollToAnchor() |
2141 { | 2115 { |
2142 RefPtr<Node> anchorNode = m_maintainScrollPositionAnchor; | 2116 RefPtr<Node> anchorNode = m_maintainScrollPositionAnchor; |
2143 if (!anchorNode) | 2117 if (!anchorNode) |
2144 return; | 2118 return; |
2145 | 2119 |
2146 if (!anchorNode->renderer()) | 2120 if (!anchorNode->renderer()) |
2147 return; | 2121 return; |
2148 | 2122 |
2149 LayoutRect rect; | 2123 LayoutRect rect; |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3456 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3430 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3457 { | 3431 { |
3458 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3432 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3459 if (AXObjectCache* cache = axObjectCache()) { | 3433 if (AXObjectCache* cache = axObjectCache()) { |
3460 cache->remove(scrollbar); | 3434 cache->remove(scrollbar); |
3461 cache->handleScrollbarUpdate(this); | 3435 cache->handleScrollbarUpdate(this); |
3462 } | 3436 } |
3463 } | 3437 } |
3464 | 3438 |
3465 } // namespace WebCore | 3439 } // namespace WebCore |
OLD | NEW |