Changeset 162590 in webkit
- Timestamp:
- Jan 22, 2014 9:04:43 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r162584 r162590 1 2014-01-22 Benjamin Poulain <bpoulain@apple.com> 2 3 Add a minimalistic SPI to control the layout size outside of WKView 4 https://bugs.webkit.org/show_bug.cgi?id=127403 5 6 Reviewed by Sam Weinig. 7 8 The API lets a client of WKView force the layout size. Once the size 9 is set this way, default update is disabled and the client needs to 10 update the size systematically as needed. This is done to avoid double 11 layout or flickering. 12 13 * UIProcess/API/Cocoa/WKViewPrivate.h: 14 * UIProcess/API/ios/WKViewIOS.mm: 15 (-[WKView _frameOrBoundsChanged]): 16 (-[WKView overrideMinimumLayoutSize:]): 17 1 18 2014-01-22 Jinwoo Song <jinwoo7.song@samsung.com> 2 19 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
r160692 r162590 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 41 41 #endif 42 42 43 #if !TARGET_OS_IPHONE 43 #if TARGET_OS_IPHONE 44 45 @property (nonatomic) CGSize minimumLayoutSizeOverride; 46 47 #else 44 48 45 49 - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef; -
trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm
r162121 r162590 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 50 50 BOOL _userHasChangedPageScale; 51 51 RetainPtr<_UIWebViewportHandler> _viewportHandler; 52 BOOL _hasStaticMinimumLayoutSize; 52 53 } 53 54 … … 258 259 { 259 260 CGRect bounds = [self bounds]; 260 [_viewportHandler update:^{ 261 [_viewportHandler setAvailableViewSize:bounds.size]; 262 }]; 261 if (!_hasStaticMinimumLayoutSize) { 262 [_viewportHandler update:^{ 263 [_viewportHandler setAvailableViewSize:bounds.size]; 264 }]; 265 } 263 266 [_scrollView setFrame:bounds]; 264 267 [_contentView setMinimumSize:bounds.size]; … … 299 302 } 300 303 304 - (CGSize)minimumLayoutSizeOverride 305 { 306 ASSERT(_hasStaticMinimumLayoutSize); 307 return [_viewportHandler availableViewSize]; 308 } 309 310 - (void)setMinimumLayoutSizeOverride:(CGSize)minimumLayoutSizeOverride 311 { 312 _hasStaticMinimumLayoutSize = YES; 313 [_viewportHandler update:^{ 314 [_viewportHandler setAvailableViewSize:minimumLayoutSizeOverride]; 315 }]; 316 } 317 301 318 @end
Note: See TracChangeset
for help on using the changeset viewer.