Changeset 51636 in webkit
- Timestamp:
- Dec 3, 2009 6:25:50 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51633 r51636 1 2009-12-03 Rafael Antognolli <antognolli@profusion.mobi>, Kenneth Christiansen <kenneth@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 repaint events from outside the viewport aren't received 6 https://bugs.webkit.org/show_bug.cgi?id=32081 7 8 When using a tiled backing store for painting, you need to receive 9 event from outside the viewport. Setting the viewport to the size 10 of the contents is not an option if you want to make use of WebCore's 11 infrastructure for drawing scrollbars etc. 12 13 A new property, paintsEntireContents, has been introduced for the 14 above use-case. It is settable, as tiling will be optional for Qt, 15 and for the not yet upstreamed EFL port, there will be two different 16 views, where only one of them are tiled. 17 18 No change in behavior, so no new tests added. 19 20 * page/FrameView.cpp: 21 (WebCore::FrameView::repaintContentRectangle): 22 * platform/ScrollView.cpp: 23 (WebCore::ScrollView::ScrollView): 24 (WebCore::ScrollView::setPaintsEntireContents): 25 (WebCore::ScrollView::wheelEvent): 26 * platform/ScrollView.h: 27 (WebCore::ScrollView::paintsEntireContents): 28 1 29 2009-11-23 Jeremy Moskovich <jeremy@chromium.org> 2 30 -
trunk/WebCore/page/FrameView.cpp
r51492 r51636 950 950 double delay = adjustedDeferredRepaintDelay(); 951 951 if ((m_deferringRepaints || m_deferredRepaintTimer.isActive() || delay) && !immediate) { 952 IntRect visibleContent = visibleContentRect(); 953 visibleContent.intersect(r); 954 if (visibleContent.isEmpty()) 952 IntRect paintRect = r; 953 if (!paintsEntireContents()) 954 paintRect.intersect(visibleContentRect()); 955 if (paintRect.isEmpty()) 955 956 return; 956 957 if (m_repaintCount == cRepaintRectUnionThreshold) { … … 962 963 } 963 964 if (m_repaintCount < cRepaintRectUnionThreshold) 964 m_repaintRects.append( visibleContent);965 m_repaintRects.append(paintRect); 965 966 else 966 m_repaintRects[0].unite( visibleContent);967 m_repaintRects[0].unite(paintRect); 967 968 m_repaintCount++; 968 969 -
trunk/WebCore/platform/ScrollView.cpp
r51212 r51636 50 50 , m_drawPanScrollIcon(false) 51 51 , m_useFixedLayout(false) 52 , m_paintsEntireContents(false) 52 53 { 53 54 platformInit(); … … 167 168 168 169 return m_canBlitOnScroll; 170 } 171 172 void ScrollView::setPaintsEntireContents(bool paintsEntireContents) 173 { 174 m_paintsEntireContents = paintsEntireContents; 169 175 } 170 176 … … 708 714 void ScrollView::repaintContentRectangle(const IntRect& rect, bool now) 709 715 { 710 IntRect visibleContent = visibleContentRect(); 711 visibleContent.intersect(rect); 712 if (visibleContent.isEmpty()) 716 IntRect paintRect = rect; 717 if (!paintsEntireContents()) 718 paintRect.intersect(visibleContentRect()); 719 if (paintRect.isEmpty()) 713 720 return; 714 721 715 722 if (platformWidget()) { 716 platformRepaintContentRectangle( visibleContent, now);723 platformRepaintContentRectangle(paintRect, now); 717 724 return; 718 725 } 719 726 720 727 if (hostWindow()) 721 hostWindow()->repaint(contentsToWindow( visibleContent), true, now);728 hostWindow()->repaint(contentsToWindow(paintRect), true, now); 722 729 } 723 730 -
trunk/WebCore/platform/ScrollView.h
r50665 r51636 93 93 bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } 94 94 95 // By default you only receive paint events for the area that is visible. In the case of using a 96 // tiled backing store, this method can be set, so that the view paints the entire contents. 97 bool paintsEntireContents() const { return m_paintsEntireContents; } 98 void setPaintsEntireContents(bool); 99 95 100 // Overridden by FrameView to create custom CSS scrollbars if applicable. 96 101 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); … … 272 277 bool m_drawPanScrollIcon; 273 278 bool m_useFixedLayout; 279 280 bool m_paintsEntireContents; 274 281 275 282 void init();
Note: See TracChangeset
for help on using the changeset viewer.