Changeset 161087 in webkit
- Timestamp:
- Dec 26, 2013 7:04:22 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r161077 r161087 1 2013-12-26 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 [WK2][CoordinatedGraphics] Removing duplicate scale information from WebVIew.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=126243 5 6 Reviewed by Benjamin Poulain. 7 8 The scale factor of the WebView must reflect the same information present in 9 WebPageProxy. 10 Previously, in WebView.cpp, there was a m_contentScaleFactor member, which adds 11 information duplication and needs to be synchronizing with pageScaleFactor in 12 WebPageProxy. We can avoid this by just making WebView access and set WebPageProxy's 13 pageScaleFactor directly. 14 15 * UIProcess/CoordinatedGraphics/WebView.cpp: 16 (WebKit::WebView::WebView): 17 (WebKit::WebView::setContentScaleFactor): 18 (WebKit::WebView::transformToScene): 19 (WebKit::WebView::visibleContentsSize): 20 * UIProcess/CoordinatedGraphics/WebView.h: 21 (WebKit::WebView::contentScaleFactor): 22 1 23 2013-12-25 Commit Queue <commit-queue@webkit.org> 2 24 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
r160833 r161087 49 49 : m_focused(false) 50 50 , m_visible(false) 51 , m_contentScaleFactor(1.0)52 51 , m_opacity(1.0) 53 52 { … … 78 77 } 79 78 79 void WebView::setContentScaleFactor(float scaleFactor) 80 { 81 m_page->scalePage(scaleFactor, roundedIntPoint(contentPosition())); 82 updateViewportSize(); 83 } 84 80 85 void WebView::setActive(bool active) 81 86 { … … 239 244 { 240 245 FloatPoint position = -m_contentPosition; 241 float effectiveScale = m_contentScaleFactor* m_page->deviceScaleFactor();246 float effectiveScale = contentScaleFactor() * m_page->deviceScaleFactor(); 242 247 position.scale(effectiveScale, effectiveScale); 243 248 … … 279 284 { 280 285 FloatSize visibleContentsSize(dipSize()); 281 visibleContentsSize.scale(1 / m_contentScaleFactor);286 visibleContentsSize.scale(1 / contentScaleFactor()); 282 287 283 288 return visibleContentsSize; -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h
r160392 r161087 71 71 void setVisible(bool); 72 72 73 void setContentScaleFactor(float scaleFactor) { m_contentScaleFactor = scaleFactor; }74 float contentScaleFactor() const { return m_ contentScaleFactor; }73 void setContentScaleFactor(float); 74 float contentScaleFactor() const { return m_page->pageScaleFactor(); } 75 75 76 76 void setContentPosition(const WebCore::FloatPoint& position) { m_contentPosition = position; } … … 214 214 bool m_focused; 215 215 bool m_visible; 216 float m_contentScaleFactor;217 216 double m_opacity; 218 217 WebCore::FloatPoint m_contentPosition; // Position in UI units.
Note: See TracChangeset
for help on using the changeset viewer.