Title: [141003] trunk/Source/WebKit2
- Revision
- 141003
- Author
- [email protected]
- Date
- 2013-01-28 13:36:49 -0800 (Mon, 28 Jan 2013)
Log Message
[wk2] WKView's intrinsicContentSize should only report a flexible width if the content width is less than the minimum width
https://bugs.webkit.org/show_bug.cgi?id=108056
Reviewed by Simon Fraser.
We're currently reporting a flexible width if the intrinsic
content size is less than *or equal* to the minimum layout
width. This is wrong and causes ping-ponging between flexible
and inflexible width in cases where autolayout fits our
view to exactly the intrinsic content size. It should be strictly
less than instead.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setIntrinsicContentSize:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (141002 => 141003)
--- trunk/Source/WebKit2/ChangeLog 2013-01-28 21:36:13 UTC (rev 141002)
+++ trunk/Source/WebKit2/ChangeLog 2013-01-28 21:36:49 UTC (rev 141003)
@@ -1,3 +1,20 @@
+2013-01-28 Tim Horton <[email protected]>
+
+ [wk2] WKView's intrinsicContentSize should only report a flexible width if the content width is less than the minimum width
+ https://bugs.webkit.org/show_bug.cgi?id=108056
+
+ Reviewed by Simon Fraser.
+
+ We're currently reporting a flexible width if the intrinsic
+ content size is less than *or equal* to the minimum layout
+ width. This is wrong and causes ping-ponging between flexible
+ and inflexible width in cases where autolayout fits our
+ view to exactly the intrinsic content size. It should be strictly
+ less than instead.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView _setIntrinsicContentSize:]):
+
2013-01-28 Anders Carlsson <[email protected]>
Add StorageStrategy member functions to WebKit2
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (141002 => 141003)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-01-28 21:36:13 UTC (rev 141002)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-01-28 21:36:49 UTC (rev 141003)
@@ -2857,12 +2857,12 @@
- (void)_setIntrinsicContentSize:(NSSize)intrinsicContentSize
{
- // If the intrinsic content size is the same as the minimum layout width, the content flowed to fit,
- // so we can report that that dimension is flexible. If not, we need to report our greater intrinsic width
+ // If the intrinsic content size is less than the minimum layout width, the content flowed to fit,
+ // so we can report that that dimension is flexible. If not, we need to report our intrinsic width
// so that autolayout will know to provide space for us.
NSSize intrinsicContentSizeAcknowledgingFlexibleWidth = intrinsicContentSize;
- if (intrinsicContentSize.width <= _data->_page->minimumLayoutWidth())
+ if (intrinsicContentSize.width < _data->_page->minimumLayoutWidth())
intrinsicContentSizeAcknowledgingFlexibleWidth.width = NSViewNoInstrinsicMetric;
_data->_intrinsicContentSize = intrinsicContentSizeAcknowledgingFlexibleWidth;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes