Changeset 170953 in webkit
- Timestamp:
- Jul 9, 2014, 10:06:30 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r170949 r170953 1 2014-07-09 Benjamin Poulain <bpoulain@apple.com> 2 3 [iOS][WK2] Disable text quantization while actively changing the page's scale factor 4 https://bugs.webkit.org/show_bug.cgi?id=134781 5 6 Reviewed by Tim Horton and Myles C. Maxfield. 7 8 Query the chrome client to setup quantization on each layers. 9 10 * page/ChromeClient.h: 11 (WebCore::ChromeClient::hasStablePageScaleFactor): 12 * platform/graphics/mac/FontMac.mm: 13 (WebCore::Font::drawGlyphs): 14 * rendering/RenderLayer.cpp: 15 (WebCore::RenderLayer::setupFontSubpixelQuantization): 16 1 17 2014-07-09 peavo@outlook.com <peavo@outlook.com> 2 18 -
trunk/Source/WebCore/page/ChromeClient.h
r170557 r170953 288 288 289 289 virtual bool shouldPaintEntireContents() const { return false; } 290 virtual bool hasStablePageScaleFactor() const { return true; } 290 291 291 292 // Allows ports to customize the type of graphics layers created by this page. -
trunk/Source/WebCore/platform/graphics/mac/FontMac.mm
r170947 r170953 304 304 #if PLATFORM(IOS) 305 305 CGContextSetFontSize(cgContext, 1); 306 CGContextSetShouldSubpixelQuantizeFonts(cgContext, context->shouldSubpixelQuantizeFonts()); 306 307 #else 307 308 wkSetCGFontRenderingMode(cgContext, drawFont, context->shouldSubpixelQuantizeFonts()); -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r170944 r170953 3756 3756 // things on the scrolling thread. 3757 3757 bool contentsScrollByPainting = (renderer().hasOverflowClip() && !usesCompositedScrolling()) || (renderer().frame().ownerElement()); 3758 if (scrollingOnMainThread || contentsScrollByPainting) { 3758 bool isZooming = false; 3759 if (Page* page = renderer().frame().page()) 3760 isZooming = !page->chrome().client().hasStablePageScaleFactor(); 3761 if (scrollingOnMainThread || contentsScrollByPainting || isZooming) { 3759 3762 didQuantizeFonts = context->shouldSubpixelQuantizeFonts(); 3760 3763 context->setShouldSubpixelQuantizeFonts(false); -
trunk/Source/WebKit2/ChangeLog
r170952 r170953 1 2014-07-09 Benjamin Poulain <bpoulain@apple.com> 2 3 [iOS][WK2] Disable text quantization while actively changing the page's scale factor 4 https://bugs.webkit.org/show_bug.cgi?id=134781 5 6 Reviewed by Tim Horton and Myles C. Maxfield. 7 8 While zooming a page, text quantization causes glyphs to "move" in order to get to the closest 9 boundary for the current scale factor. 10 11 We do not want this to happen while dynamically changing the scale factor because the effect 12 is visible. To avoid this, we disable text quantization if the page's scale factor changes 13 in response to a non-stable contentRect update. 14 15 * WebProcess/WebCoreSupport/WebChromeClient.h: 16 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: 17 (WebKit::WebChromeClient::hasStablePageScaleFactor): 18 * WebProcess/WebPage/WebPage.cpp: 19 (WebKit::WebPage::WebPage): 20 * WebProcess/WebPage/WebPage.h: 21 (WebKit::WebPage::hasStablePageScaleFactor): 22 * WebProcess/WebPage/ios/WebPageIOS.mm: 23 (WebKit::WebPage::updateVisibleContentRects): 24 1 25 2014-07-09 Joseph Pecoraro <pecoraro@apple.com> 2 26 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r170557 r170953 171 171 virtual void didStartOverflowScroll() override; 172 172 virtual void didEndOverflowScroll() override; 173 virtual bool hasStablePageScaleFactor() const override; 173 174 174 175 // FIXME: See <rdar://problem/5975559> -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm
r170557 r170953 101 101 } 102 102 103 bool WebChromeClient::hasStablePageScaleFactor() const 104 { 105 return m_page->hasStablePageScaleFactor(); 106 } 107 103 108 void WebChromeClient::suppressFormNotifications() 104 109 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r170902 r170953 299 299 , m_scaleWasSetByUIProcess(false) 300 300 , m_userHasChangedPageScaleFactor(false) 301 , m_hasStablePageScaleFactor(true) 301 302 , m_userIsInteracting(false) 302 303 , m_hasPendingBlurNotification(false) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r170782 r170953 465 465 double maximumPageScaleFactor() const; 466 466 bool allowsUserScaling() const; 467 bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; } 467 468 468 469 void handleTap(const WebCore::IntPoint&); … … 1227 1228 bool m_scaleWasSetByUIProcess; 1228 1229 bool m_userHasChangedPageScaleFactor; 1230 bool m_hasStablePageScaleFactor; 1229 1231 bool m_userIsInteracting; 1230 1232 bool m_hasPendingBlurNotification; -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r170774 r170953 2448 2448 IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredRect().location()); 2449 2449 2450 if (!m_hasStablePageScaleFactor && visibleContentRectUpdateInfo.inStableState()) 2451 m_hasStablePageScaleFactor = true; 2452 2450 2453 float floatBoundedScale = boundedScale; 2451 2454 bool hasSetPageScale = false; 2452 2455 if (floatBoundedScale != currentScale) { 2453 2456 m_scaleWasSetByUIProcess = true; 2457 m_hasStablePageScaleFactor = visibleContentRectUpdateInfo.inStableState(); 2454 2458 2455 2459 m_dynamicSizeUpdateHistory.clear();
Note:
See TracChangeset
for help on using the changeset viewer.