Changeset 39217 in webkit
- Timestamp:
- Dec 11, 2008 1:56:07 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r39213 r39217 1 2008-12-11 Cameron Zwarich <zwarich@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Bug 21256: REGRESSION (r36906): horizontally repeating image leaves ghosts when vertical scrolling 6 <https://bugs.webkit.org/show_bug.cgi?id=21256> 7 <rdar://problem/6362978> 8 9 The ScrollView refactoring in r36906 caused the ScrollView and the 10 platform widget to disagree about whether optimizing scrolling via 11 blitting is allowed. The easiest way to fix this is to make ScrollView 12 simply ask the platform widget whether this is safe on platforms that 13 are affected. 14 15 It is not possible to write a layout test for this bug because it 16 involves the back/forward cache. 17 18 * platform/ScrollView.cpp: 19 (WebCore::ScrollView::ScrollView): 20 (WebCore::ScrollView::setCanBlitOnScroll): 21 (WebCore::ScrollView::canBlitOnScroll): 22 (WebCore::ScrollView::platformSetCanBlitOnScroll): 23 (WebCore::ScrollView::platformCanBlitOnScroll): 24 * platform/ScrollView.h: 25 * platform/mac/ScrollViewMac.mm: 26 (WebCore::ScrollView::platformSetCanBlitOnScroll): 27 (WebCore::ScrollView::platformCanBlitOnScroll): 28 * platform/wx/ScrollViewWx.cpp: 29 (WebCore::ScrollView::platformSetCanBlitOnScroll): 30 (WebCore::ScrollView::platformCanBlitOnScroll): 31 1 32 2008-12-11 Brent Fulgham <bfulgham@gmail.com> 2 33 -
trunk/WebCore/platform/ScrollView.cpp
r39201 r39217 51 51 platformInit(); 52 52 if (platformWidget()) 53 platformSetCanBlitOnScroll( );53 platformSetCanBlitOnScroll(true); 54 54 } 55 55 … … 148 148 void ScrollView::setCanBlitOnScroll(bool b) 149 149 { 150 if (m_canBlitOnScroll == b) 151 return; 150 if (platformWidget()) { 151 platformSetCanBlitOnScroll(b); 152 return; 153 } 154 152 155 m_canBlitOnScroll = b; 153 if (platformWidget()) 154 platformSetCanBlitOnScroll(); 156 } 157 158 bool ScrollView::canBlitOnScroll() const 159 { 160 if (platformWidget()) 161 return platformCanBlitOnScroll(); 162 163 return m_canBlitOnScroll; 155 164 } 156 165 … … 778 787 779 788 #if !PLATFORM(MAC) 780 void ScrollView::platformSetCanBlitOnScroll()781 {782 }783 784 789 void ScrollView::platformSetScrollbarsSuppressed(bool repaintOnUnsuppress) 785 790 { … … 796 801 } 797 802 803 void ScrollView::platformSetCanBlitOnScroll(bool) 804 { 805 } 806 807 bool ScrollView::platformCanBlitOnScroll() const 808 { 809 return false; 810 } 811 798 812 IntRect ScrollView::platformVisibleContentRect(bool) const 799 813 { -
trunk/WebCore/platform/ScrollView.h
r39201 r39217 106 106 // where it would cause rendering glitches (such as with fixed backgrounds or when the view is partially transparent). 107 107 void setCanBlitOnScroll(bool); 108 bool canBlitOnScroll() const { return m_canBlitOnScroll; }108 bool canBlitOnScroll() const; 109 109 110 110 // The visible content rect has a location that is the scrolled offset of the document. The width and height are the viewport width … … 233 233 234 234 HashSet<Widget*> m_children; 235 236 // This bool is unused on Mac OS because we directly ask the platform widget 237 // whether it is safe to blit on scroll. 235 238 bool m_canBlitOnScroll; 239 236 240 IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared. 237 241 IntSize m_contentsSize; … … 257 261 void platformSetScrollbarModes(); 258 262 void platformScrollbarModes(ScrollbarMode& horizontal, ScrollbarMode& vertical) const; 259 void platformSetCanBlitOnScroll(); 263 void platformSetCanBlitOnScroll(bool); 264 bool platformCanBlitOnScroll() const; 260 265 IntRect platformVisibleContentRect(bool includeScrollbars) const; 261 266 IntSize platformContentsSize() const; -
trunk/WebCore/platform/mac/ScrollViewMac.mm
r37244 r39217 93 93 END_BLOCK_OBJC_EXCEPTIONS; 94 94 } 95 96 void ScrollView::platformSetCanBlitOnScroll() 97 { 98 BEGIN_BLOCK_OBJC_EXCEPTIONS; 99 [[scrollView() contentView] setCopiesOnScroll:canBlitOnScroll()]; 100 END_BLOCK_OBJC_EXCEPTIONS; 95 96 void ScrollView::platformSetCanBlitOnScroll(bool canBlitOnScroll) 97 { 98 BEGIN_BLOCK_OBJC_EXCEPTIONS; 99 [[scrollView() contentView] setCopiesOnScroll:canBlitOnScroll]; 100 END_BLOCK_OBJC_EXCEPTIONS; 101 } 102 103 bool ScrollView::platformCanBlitOnScroll() const 104 { 105 return [[scrollView() contentView] copiesOnScroll]; 101 106 } 102 107 -
trunk/WebCore/platform/wx/ScrollViewWx.cpp
r37667 r39217 307 307 } 308 308 309 void ScrollView::platformSetCanBlitOnScroll(bool canBlitOnScroll) 310 { 311 m_canBlitOnScroll = canBlitOnScroll; 312 } 313 314 bool ScrollView::platformCanBlitOnScroll() const 315 { 316 return m_canBlitOnScroll; 317 } 318 309 319 // used for subframes support 310 320 void ScrollView::platformAddChild(Widget* widget)
Note: See TracChangeset
for help on using the changeset viewer.