Changeset 187178 in webkit
- Timestamp:
- Jul 22, 2015 1:59:49 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r187174 r187178 1 2015-07-21 Simon Fraser <simon.fraser@apple.com> 2 3 Add logging for TiledCoreAnimationDrawingArea resizing 4 https://bugs.webkit.org/show_bug.cgi?id=147180 5 6 Reviewed by Tim Horton. 7 8 Add a "Resize" log channel for WebKit2, and use it to log data in scaleViewToFitDocumentIfNeeded(). 9 10 * Platform/Logging.h: 11 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 12 (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded): 13 1 14 2015-07-22 Sam Weinig <sam@webkit.org> 2 15 -
trunk/Source/WebKit2/Platform/Logging.h
r187135 r187178 51 51 M(Printing) \ 52 52 M(RemoteLayerTree) \ 53 M(Resize) \ 53 54 M(SessionState) \ 54 55 M(StorageAPI) \ -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r187054 r187178 33 33 #import "LayerHostingContext.h" 34 34 #import "LayerTreeContext.h" 35 #import "Logging.h" 35 36 #import "ViewGestureControllerMessages.h" 36 37 #import "WebFrame.h" … … 281 282 return; 282 283 284 LOG(Resize, "TiledCoreAnimationDrawingArea %p scaleViewToFitDocumentIfNeeded", this); 283 285 m_webPage.layoutIfNeeded(); 284 286 … … 288 290 bool documentWidthChanged = m_lastDocumentSizeForScaleToFit.width() != documentWidth; 289 291 bool viewWidthChanged = m_lastViewSizeForScaleToFit.width() != viewWidth; 292 293 LOG(Resize, " documentWidthChanged=%d, viewWidthChanged=%d", documentWidthChanged, viewWidthChanged); 290 294 291 295 if (!documentWidthChanged && !viewWidthChanged) … … 308 312 m_webPage.setFixedLayoutSize(fixedLayoutSize); 309 313 m_webPage.scaleView(viewScale); 310 return; 311 } 314 315 LOG(Resize, " using fixed layout at %dx%d. document width %d unchanged, scaled to %.4f to fit view width %d", fixedLayoutSize.width(), fixedLayoutSize.height(), documentWidth, viewScale, viewWidth); 316 return; 317 } 318 319 320 LOG(Resize, " doing unconstrained layout"); 312 321 313 322 // Lay out at the view size. … … 322 331 323 332 float viewScale = 1; 333 334 LOG(Resize, " unscaled document size %dx%d. need to scale down: %d", documentSize.width(), documentSize.height(), documentWidth && documentWidth < maximumDocumentWidthForScaling && viewWidth < documentWidth); 324 335 325 336 // Avoid scaling down documents that don't fit in a certain width, to allow … … 336 347 IntSize fixedLayoutSize(documentWidth, std::ceil((m_webPage.size().height() - m_webPage.corePage()->topContentInset()) / viewScale)); 337 348 m_webPage.setFixedLayoutSize(fixedLayoutSize); 349 350 LOG(Resize, " using fixed layout at %dx%d. document width %d, scaled to %.4f to fit view width %d", fixedLayoutSize.width(), fixedLayoutSize.height(), documentWidth, viewScale, viewWidth); 338 351 } 339 352
Note: See TracChangeset
for help on using the changeset viewer.