Changeset 150764 in webkit
- Timestamp:
- May 27, 2013 9:52:10 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r150763 r150764 1 2013-05-27 Marcelo Lira <marcelo.lira@openbossa.org> 2 3 [WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize() 4 https://bugs.webkit.org/show_bug.cgi?id=116688 5 6 Reviewed by Noam Rosenthal. 7 8 Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect() 9 must be calculated including the page scale factor and avoid crossing the 10 boundaries of the page contents size. In other words the DrawingArea 11 must know the actual dimensions of what it being drawn. If the 12 DrawingArea thinks the visible rectangle is bigger than it is, the 13 contents will be drawn pixelated and blurry. 14 15 * UIProcess/CoordinatedGraphics/WebView.cpp: 16 (WebKit::WebView::didChangeContentsSize): 17 (WebKit::WebView::updateViewportSize): 18 (WebKit::WebView::visibleContentsSize): 19 (WebKit): 20 * UIProcess/CoordinatedGraphics/WebView.h: 21 (WebKit::WebView::contentsSize): 22 (WebView): 23 1 24 2013-05-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 25 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
r150024 r150764 187 187 void WebView::didChangeContentsSize(const WebCore::IntSize& size) 188 188 { 189 m_contentsSize = size; 189 190 m_client.didChangeContentsSize(this, size); 190 191 } … … 225 226 // Web Process expects sizes in UI units, and not raw device units. 226 227 drawingArea->setSize(roundedIntSize(dipSize()), IntSize(), IntSize()); 227 drawingArea->setVisibleContentsRect(FloatRect(contentPosition(), dipSize()), FloatPoint()); 228 FloatRect visibleContentsRect(contentPosition(), visibleContentsSize()); 229 visibleContentsRect.intersect(FloatRect(FloatPoint(), contentsSize())); 230 drawingArea->setVisibleContentsRect(visibleContentsRect, FloatPoint()); 228 231 } 229 232 } … … 235 238 236 239 return dipSize; 240 } 241 242 WebCore::FloatSize WebView::visibleContentsSize() const 243 { 244 FloatSize visibleContentsSize(dipSize()); 245 visibleContentsSize.scale(1 / m_contentScaleFactor); 246 247 return visibleContentsSize; 237 248 } 238 249 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h
r150012 r150764 98 98 99 99 void didChangeContentsSize(const WebCore::IntSize&); 100 const WebCore::IntSize& contentsSize() const { return m_contentsSize; } 101 WebCore::FloatSize visibleContentsSize() const; 100 102 101 103 // FIXME: Should become private when Web Events creation is moved to WebView. … … 196 198 double m_opacity; 197 199 WebCore::FloatPoint m_contentPosition; // Position in UI units. 200 WebCore::IntSize m_contentsSize; 198 201 }; 199 202
Note: See TracChangeset
for help on using the changeset viewer.