Add a layout mode for computing fixed layout size from a minimum size
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 May 2015 23:39:06 +0000 (23:39 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 May 2015 23:39:06 +0000 (23:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144610
<rdar://problem/19790341>

Reviewed by Simon Fraser.

Add a layout mode where WebKit determines the layout size with a set of
(still in flux) heuristics, trying hard to keep the page usable below a
particular client-defined threshold view size.

This can mean that WebKit will start scaling down the page inside the view
to make the whole page fit, using the viewScale mechanism.

* UIProcess/API/C/WKLayoutMode.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h:
Add the new layout mode, and documentation for the two complicated ones.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _setMinimumViewSize:]):
(-[WKWebView _minimumViewSize]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Forward the layoutMode and viewScale parameters to WKView if we have one.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView viewWillStartLiveResize]):
(-[WKView viewDidEndLiveResize]):
(-[WKView setFrameSize:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView disableFrameSizeUpdates]):
(-[WKView enableFrameSizeUpdates]):
(-[WKView frameSizeUpdatesDisabled]):
(-[WKView _layoutMode]):
(-[WKView _setLayoutMode:]):
(-[WKView _setViewScale:]):
(-[WKView _setMinimumViewSize:]):
(-[WKView _minimumViewSize]):
Store the minimum view size, and update the fixed layout size if needed.

(-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
(-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
(-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.

* UIProcess/API/mac/WKViewInternal.h:

* UIProcess/mac/WKViewLayoutStrategy.h: Added.
* UIProcess/mac/WKViewLayoutStrategy.mm: Added.
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
(-[WKViewLayoutStrategy initWithPage:view:mode:]):
(-[WKViewLayoutStrategy willDestroyView:]):
(-[WKViewLayoutStrategy layoutMode]):
(-[WKViewLayoutStrategy updateLayout]):
(-[WKViewLayoutStrategy disableFrameSizeUpdates]):
(-[WKViewLayoutStrategy enableFrameSizeUpdates]):
(-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
(-[WKViewLayoutStrategy didChangeViewScale]):
(-[WKViewLayoutStrategy didChangeMinimumViewSize]):
(-[WKViewLayoutStrategy willStartLiveResize]):
(-[WKViewLayoutStrategy didEndLiveResize]):
(-[WKViewLayoutStrategy didChangeFrameSize]):
(-[WKViewLayoutStrategy willChangeLayoutStrategy]):
(-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewViewSizeLayoutStrategy updateLayout]):
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewFixedSizeLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.

(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
While in live resize with the new layout mode, disable frame size updates.
The new layout mode will do a live scale during part of the resize, and
we don't always want to send the new view size to the Web process.

(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
While in the new layout mode, maintain the viewScale as the minimum of the
scale required to fit the current view frame size inside the minimumViewSize.
If no scaling is required, carry on as usual, pushing the new view frame size
to the DrawingArea and on to the Web process.
If scaling is required, apply a transform to the view in the UI process,
until the live resize completes, in which case we send a fenced viewScale
adjustment to the Web process (so that the tiles paint at the new viewScale
synchronized with the removal of the transform in the UI process).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleViewFenced):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::addFence):
(WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::addFence):
Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
TiledCoreAnimationDrawingArea's CAContext.

Add the ability to send updateGeometry out-of-band, so that
we can send it synchronously inside the message along with the CA fence.
We have to both change the viewScale and updateGeometry simultaneously
in the same CA commit that we install the fence into, in order to ensure
that there is no flash.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.

* MiniBrowser/mac/BrowserWindow.xib:
* MiniBrowser/mac/BrowserWindowController.h:
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController toggleUseMinimumViewSize:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController toggleUseMinimumViewSize:]):
Add a optional toolbar item to toggle a minimum view size of 1024x0.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/mac/LayerHostingContext.h
Source/WebKit2/Platform/mac/LayerHostingContext.mm
Source/WebKit2/UIProcess/API/C/WKLayoutMode.h
Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/_WKLayoutMode.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.h [new file with mode: 0644]
Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.mm [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
Tools/ChangeLog
Tools/MiniBrowser/mac/BrowserWindow.xib
Tools/MiniBrowser/mac/BrowserWindowController.h
Tools/MiniBrowser/mac/WK1BrowserWindowController.m
Tools/MiniBrowser/mac/WK2BrowserWindowController.m

index 6941d82c97f230063a5630a15c143e81acefe4e0..afdfef4f6840ad31dfaa6c4794abfcc2fdd4088d 100644 (file)
@@ -1,3 +1,14 @@
+2015-05-05  Timothy Horton  <timothy_horton@apple.com>
+
+        Add a layout mode for computing fixed layout size from a minimum size
+        https://bugs.webkit.org/show_bug.cgi?id=144610
+        <rdar://problem/19790341>
+
+        Reviewed by Simon Fraser.
+
+        * platform/spi/cocoa/QuartzCoreSPI.h:
+        Add some SPI.
+
 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
 
         iOS] Scroll snap points trigger reentrant layout
index ea3d91d225ad3a26d89e1f622b4d9942ea155298..624879139790d68bd645ae6073e9b4a63fd5552f 100644 (file)
@@ -66,6 +66,7 @@ extern "C" {
 - (void)invalidate;
 - (mach_port_t)createFencePort;
 - (void)setFencePort:(mach_port_t)port;
+- (void)setFencePort:(mach_port_t)port commitHandler:(void(^)(void))block;
 @property (readonly) uint32_t contextId;
 @property (strong) CALayer *layer;
 @property CGColorSpaceRef colorSpace;
index d7f633683673574970f9ee7bffcd762ed89dd016..47eb362696cbd9403782dfb7e65a0c95df426f30 100644 (file)
@@ -1,3 +1,124 @@
+2015-05-05  Timothy Horton  <timothy_horton@apple.com>
+
+        Add a layout mode for computing fixed layout size from a minimum size
+        https://bugs.webkit.org/show_bug.cgi?id=144610
+        <rdar://problem/19790341>
+
+        Reviewed by Simon Fraser.
+
+        Add a layout mode where WebKit determines the layout size with a set of
+        (still in flux) heuristics, trying hard to keep the page usable below a
+        particular client-defined threshold view size.
+
+        This can mean that WebKit will start scaling down the page inside the view
+        to make the whole page fit, using the viewScale mechanism.
+
+        * UIProcess/API/C/WKLayoutMode.h:
+        * UIProcess/API/Cocoa/_WKLayoutMode.h:
+        Add the new layout mode, and documentation for the two complicated ones.
+        
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _layoutMode]):
+        (-[WKWebView _setLayoutMode:]):
+        (-[WKWebView _setViewScale:]):
+        (-[WKWebView _setMinimumViewSize:]):
+        (-[WKWebView _minimumViewSize]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        Forward the layoutMode and viewScale parameters to WKView if we have one.
+
+        * UIProcess/API/Cocoa/WKViewPrivate.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView dealloc]):
+        (-[WKView viewWillStartLiveResize]):
+        (-[WKView viewDidEndLiveResize]):
+        (-[WKView setFrameSize:]):
+        (-[WKView initWithFrame:processPool:configuration:webView:]):
+        (-[WKView disableFrameSizeUpdates]):
+        (-[WKView enableFrameSizeUpdates]):
+        (-[WKView frameSizeUpdatesDisabled]):
+        (-[WKView _layoutMode]):
+        (-[WKView _setLayoutMode:]):
+        (-[WKView _setViewScale:]):
+        (-[WKView _setMinimumViewSize:]):
+        (-[WKView _minimumViewSize]):
+        Store the minimum view size, and update the fixed layout size if needed.
+
+        (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
+        (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
+        (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
+        Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
+        bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
+
+        * UIProcess/API/mac/WKViewInternal.h:
+
+        * UIProcess/mac/WKViewLayoutStrategy.h: Added.
+        * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
+        (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
+        (-[WKViewLayoutStrategy initWithPage:view:mode:]):
+        (-[WKViewLayoutStrategy willDestroyView:]):
+        (-[WKViewLayoutStrategy layoutMode]):
+        (-[WKViewLayoutStrategy updateLayout]):
+        (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
+        (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
+        (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
+        (-[WKViewLayoutStrategy didChangeViewScale]):
+        (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
+        (-[WKViewLayoutStrategy willStartLiveResize]):
+        (-[WKViewLayoutStrategy didEndLiveResize]):
+        (-[WKViewLayoutStrategy didChangeFrameSize]):
+        (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
+        (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
+        (-[WKViewViewSizeLayoutStrategy updateLayout]):
+        (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
+        (-[WKViewFixedSizeLayoutStrategy updateLayout]):
+        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
+        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
+        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
+        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
+        Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
+
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
+        While in live resize with the new layout mode, disable frame size updates.
+        The new layout mode will do a live scale during part of the resize, and
+        we don't always want to send the new view size to the Web process.
+
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
+        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
+        While in the new layout mode, maintain the viewScale as the minimum of the
+        scale required to fit the current view frame size inside the minimumViewSize.
+        If no scaling is required, carry on as usual, pushing the new view frame size
+        to the DrawingArea and on to the Web process.
+        If scaling is required, apply a transform to the view in the UI process,
+        until the live resize completes, in which case we send a fenced viewScale
+        adjustment to the Web process (so that the tiles paint at the new viewScale
+        synchronized with the removal of the transform in the UI process).
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::scaleViewFenced):
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::addFence):
+        (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::addFence):
+        Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
+        TiledCoreAnimationDrawingArea's CAContext.
+
+        Add the ability to send updateGeometry out-of-band, so that
+        we can send it synchronously inside the message along with the CA fence.
+        We have to both change the viewScale and updateGeometry simultaneously
+        in the same CA commit that we install the fence into, in order to ensure
+        that there is no flash.
+
 2015-05-05  Alex Christensen  <achristensen@webkit.org>
 
         [Content Extensions] Release input NSString when finished copying it.
index 35e1c8e9e997d126cfbc000b195ecc06f4da00f9..054b9816179beaf9a90450bac4a745905a150357 100644 (file)
@@ -62,9 +62,8 @@ public:
     void setColorSpace(CGColorSpaceRef);
     CGColorSpaceRef colorSpace() const;
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+    // This only works on iOS and OS 10.10+
     void setFencePort(mach_port_t);
-#endif
 
 private:
     LayerHostingMode m_layerHostingMode;
index f277d38560089449e944edeacfac69895e3cdf45..cd94236d680fa1e4c165e5efce7003cf9e1dddce 100644 (file)
@@ -102,11 +102,13 @@ CGColorSpaceRef LayerHostingContext::colorSpace() const
     return [m_context colorSpace];
 }
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
 void LayerHostingContext::setFencePort(mach_port_t fencePort)
 {
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     [m_context setFencePort:fencePort];
-}
+#else
+    ASSERT_NOT_REACHED();
 #endif
+}
 
 } // namespace WebKit
index 6d66a8a140382b8b4ec7bb945ed9ae5bafb1d2d8..6b6a26fdde6b51c9c60939df543b458f7c04ed8f 100644 (file)
@@ -35,7 +35,8 @@ extern "C" {
 enum {
     kWKLayoutModeViewSize,
     kWKLayoutModeFixedSize,
-    kWKLayoutModeDynamicSizeComputedFromViewScale
+    kWKLayoutModeDynamicSizeComputedFromViewScale,
+    kWKLayoutModeDynamicSizeWithMinimumViewSize
 };
 typedef uint32_t WKLayoutMode;
 
index f9bc034077d8c4a3e9c1be35c9ab5ebb225fe0e0..9264f4ff2bf1e93d2b3d69997e18926d0fce0d4e 100644 (file)
 @property (nonatomic, setter=_setTotalHeightOfBanners:) CGFloat _totalHeightOfBanners;
 
 @property (nonatomic, setter=_setLayoutMode:) WKLayoutMode _layoutMode;
+// For use with _layoutMode = kWKLayoutModeFixedSize:
 @property (nonatomic, setter=_setFixedLayoutSize:) CGSize _fixedLayoutSize;
+// For use with _layoutMode = kWKLayoutModeDynamicSizeWithMinimumViewSize:
+@property (nonatomic, setter=_setMinimumViewSize:) CGSize _minimumViewSize;
 
 @property (nonatomic, setter=_setViewScale:) CGFloat _viewScale;
 
index 536132f7d7f36d0518201a3260dd1ec4d4e3028b..c8b040baa9ad2df1e54cf0d0920f89f84761da07 100644 (file)
@@ -47,6 +47,7 @@
 #import "WKBrowsingContextHandleInternal.h"
 #import "WKErrorInternal.h"
 #import "WKHistoryDelegatePrivate.h"
+#import "WKLayoutMode.h"
 #import "WKNSData.h"
 #import "WKNSURLExtras.h"
 #import "WKNavigationDelegate.h"
@@ -2290,22 +2291,45 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
 
 - (_WKLayoutMode)_layoutMode
 {
-    if (_page->useFixedLayout()) {
 #if PLATFORM(MAC)
-        if ([_wkView _automaticallyComputesFixedLayoutSizeFromViewScale])
-            return _WKLayoutModeDynamicSizeComputedFromViewScale;
-#endif
+    switch ([_wkView _layoutMode]) {
+    case kWKLayoutModeFixedSize:
         return _WKLayoutModeFixedSize;
+    case kWKLayoutModeDynamicSizeComputedFromViewScale:
+        return _WKLayoutModeDynamicSizeComputedFromViewScale;
+    case kWKLayoutModeDynamicSizeWithMinimumViewSize:
+        return _WKLayoutModeDynamicSizeWithMinimumViewSize;
+    case kWKLayoutModeViewSize:
+    default:
+        return _WKLayoutModeViewSize;
     }
-    return _WKLayoutModeViewSize;
+#else
+    return _page->useFixedLayout() ? _WKLayoutModeFixedSize : _WKLayoutModeViewSize;
+#endif
 }
 
 - (void)_setLayoutMode:(_WKLayoutMode)layoutMode
 {
-    _page->setUseFixedLayout(layoutMode == _WKLayoutModeFixedSize || layoutMode == _WKLayoutModeDynamicSizeComputedFromViewScale);
-
 #if PLATFORM(MAC)
-    [_wkView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:(layoutMode == _WKLayoutModeDynamicSizeComputedFromViewScale)];
+    WKLayoutMode wkViewLayoutMode;
+    switch (layoutMode) {
+    case _WKLayoutModeFixedSize:
+        wkViewLayoutMode = kWKLayoutModeFixedSize;
+        break;
+    case _WKLayoutModeDynamicSizeComputedFromViewScale:
+        wkViewLayoutMode = kWKLayoutModeDynamicSizeComputedFromViewScale;
+        break;
+    case _WKLayoutModeDynamicSizeWithMinimumViewSize:
+        wkViewLayoutMode = kWKLayoutModeDynamicSizeWithMinimumViewSize;
+        break;
+    case _WKLayoutModeViewSize:
+    default:
+        wkViewLayoutMode = kWKLayoutModeViewSize;
+        break;
+    }
+    [_wkView _setLayoutMode:wkViewLayoutMode];
+#else
+    _page->setUseFixedLayout(layoutMode == _WKLayoutModeFixedSize || layoutMode == _WKLayoutModeDynamicSizeComputedFromViewScale);
 #endif
 }
 
@@ -2326,14 +2350,29 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
 
 - (void)_setViewScale:(CGFloat)viewScale
 {
+#if PLATFORM(MAC)
+    [_wkView _setViewScale:viewScale];
+#else
     if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale))
         [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"];
 
     _page->scaleView(viewScale);
+#endif
+}
+
+- (void)_setMinimumViewSize:(CGSize)minimumViewSize
+{
+#if PLATFORM(MAC)
+    [_wkView _setMinimumViewSize:minimumViewSize];
+#endif
+}
 
+- (CGSize)_minimumViewSize
+{
 #if PLATFORM(MAC)
-    if ([_wkView _automaticallyComputesFixedLayoutSizeFromViewScale])
-        [_wkView _updateAutomaticallyComputedFixedLayoutSize];
+    return [_wkView _minimumViewSize];
+#else
+    return CGSizeZero;
 #endif
 }
 
index 121fbd031562c9a77ee33222686d9cb1851e6c15..a768e0a6b20ec6a11f08e420def1e702c4a3e9f7 100644 (file)
@@ -93,7 +93,10 @@ typedef NS_ENUM(NSInteger, _WKPaginationMode) {
 - (void)_close;
 
 @property (nonatomic, setter=_setLayoutMode:) _WKLayoutMode _layoutMode;
+// For use with _layoutMode = _WKLayoutModeFixedSize:
 @property (nonatomic, setter=_setFixedLayoutSize:) CGSize _fixedLayoutSize;
+// For use with _layoutMode = _WKLayoutModeDynamicSizeWithMinimumViewSize:
+@property (nonatomic, setter=_setMinimumViewSize:) CGSize _minimumViewSize;
 
 @property (nonatomic, setter=_setViewScale:) CGFloat _viewScale;
 
index eec6aba44d18987e96884a5b9916596ecdcd8cf8..d9c158bd6022a0952382bef083f06bb8a82c8388 100644 (file)
 typedef NS_ENUM(NSUInteger, _WKLayoutMode) {
     _WKLayoutModeViewSize,
     _WKLayoutModeFixedSize,
-    _WKLayoutModeDynamicSizeComputedFromViewScale
+
+    // Lay out the view with its frame scaled by the inverse viewScale.
+    _WKLayoutModeDynamicSizeComputedFromViewScale,
+
+    // Lay out the view at a heuristically-determined size based on the minimum view size.
+    _WKLayoutModeDynamicSizeWithMinimumViewSize
+
 } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
 #endif
index d686326e9a8416ccc457c7621f8d8344c5b66f4d..0ac34e5dd3c7a47097bb05063ece175da988caff 100644 (file)
@@ -65,6 +65,7 @@
 #import "WKStringCF.h"
 #import "WKTextInputWindowController.h"
 #import "WKViewInternal.h"
+#import "WKViewLayoutStrategy.h"
 #import "WKViewPrivate.h"
 #import "WKWebView.h"
 #import "WebBackForwardList.h"
@@ -240,7 +241,6 @@ struct WKViewInterpretKeyEventsParameters {
 
     NSRect _windowBottomCornerIntersectionRect;
     
-    unsigned _frameSizeUpdatesDisabledCount;
     BOOL _shouldDeferViewInWindowChanges;
     NSWindow *_targetWindowForMovePreparation;
 
@@ -268,7 +268,9 @@ struct WKViewInterpretKeyEventsParameters {
     BOOL _ignoresNonWheelEvents;
     BOOL _ignoresAllEvents;
     BOOL _allowsBackForwardNavigationGestures;
-    BOOL _automaticallyComputesFixedLayoutSizeFromViewScale;
+
+    RetainPtr<WKViewLayoutStrategy> _layoutStrategy;
+    CGSize _minimumViewSize;
 
     RetainPtr<CALayer> _rootLayer;
 
@@ -386,6 +388,7 @@ struct WKViewInterpretKeyEventsParameters {
     [_data->_actionMenuController willDestroyView:self];
     [_data->_immediateActionController willDestroyView:self];
 #endif
+    [_data->_layoutStrategy willDestroyView:self];
 
     _data->_page->close();
 
@@ -514,11 +517,15 @@ struct WKViewInterpretKeyEventsParameters {
 - (void)viewWillStartLiveResize
 {
     _data->_page->viewWillStartLiveResize();
+
+    [_data->_layoutStrategy willStartLiveResize];
 }
 
 - (void)viewDidEndLiveResize
 {
     _data->_page->viewWillEndLiveResize();
+
+    [_data->_layoutStrategy didEndLiveResize];
 }
 
 - (BOOL)isFlipped
@@ -554,20 +561,7 @@ struct WKViewInterpretKeyEventsParameters {
 {
     [super setFrameSize:size];
 
-    if (![self frameSizeUpdatesDisabled]) {
-        if (_data->_clipsToVisibleRect)
-            [self _updateViewExposedRect];
-        [self _setDrawingAreaSize:size];
-        if (_data->_automaticallyComputesFixedLayoutSizeFromViewScale)
-            [self _updateAutomaticallyComputedFixedLayoutSize];
-    }
-}
-
-- (void)_updateAutomaticallyComputedFixedLayoutSize
-{
-    ASSERT(_data->_automaticallyComputesFixedLayoutSizeFromViewScale);
-    CGFloat inverseScale = 1 / _data->_page->viewScaleFactor();
-    [self _setFixedLayoutSize:CGSizeMake(self.frame.size.width * inverseScale, self.frame.size.height * inverseScale)];
+    [_data->_layoutStrategy didChangeFrameSize];
 }
 
 - (void)_updateWindowAndViewFrames
@@ -3824,6 +3818,8 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
     _data->_needsViewFrameInWindowCoordinates = _data->_page->preferences().pluginsEnabled();
 
+    _data->_layoutStrategy = [WKViewLayoutStrategy layoutStrategyWithPage:*_data->_page view:self mode:kWKLayoutModeViewSize];
+
     [self _registerDraggedTypes];
 
     self.wantsLayer = YES;
@@ -4002,24 +3998,6 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
 
-- (void)_setAutomaticallyComputesFixedLayoutSizeFromViewScale:(BOOL)automaticallyComputesFixedLayoutSizeFromViewScale
-{
-    if (_data->_automaticallyComputesFixedLayoutSizeFromViewScale == automaticallyComputesFixedLayoutSizeFromViewScale)
-        return;
-
-    _data->_automaticallyComputesFixedLayoutSizeFromViewScale = automaticallyComputesFixedLayoutSizeFromViewScale;
-
-    if (!_data->_automaticallyComputesFixedLayoutSizeFromViewScale)
-        return;
-
-    [self _updateAutomaticallyComputedFixedLayoutSize];
-}
-
-- (BOOL)_automaticallyComputesFixedLayoutSizeFromViewScale
-{
-    return _data->_automaticallyComputesFixedLayoutSizeFromViewScale;
-}
-
 @end
 
 @implementation WKView (Private)
@@ -4122,24 +4100,17 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
 - (void)disableFrameSizeUpdates
 {
-    _data->_frameSizeUpdatesDisabledCount++;
+    [_data->_layoutStrategy disableFrameSizeUpdates];
 }
 
 - (void)enableFrameSizeUpdates
 {
-    if (!_data->_frameSizeUpdatesDisabledCount)
-        return;
-    
-    if (!(--_data->_frameSizeUpdatesDisabledCount)) {
-        if (_data->_clipsToVisibleRect)
-            [self _updateViewExposedRect];
-        [self _setDrawingAreaSize:[self frame].size];
-    }
+    [_data->_layoutStrategy enableFrameSizeUpdates];
 }
 
 - (BOOL)frameSizeUpdatesDisabled
 {
-    return _data->_frameSizeUpdatesDisabledCount > 0;
+    return [_data->_layoutStrategy frameSizeUpdatesDisabled];
 }
 
 + (void)hideWordDefinitionWindow
@@ -4376,23 +4347,16 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
 - (WKLayoutMode)_layoutMode
 {
-    if (_data->_page->useFixedLayout()) {
-#if PLATFORM(MAC)
-        if (_data->_automaticallyComputesFixedLayoutSizeFromViewScale)
-            return kWKLayoutModeDynamicSizeComputedFromViewScale;
-#endif
-        return kWKLayoutModeFixedSize;
-    }
-    return kWKLayoutModeViewSize;
+    return [_data->_layoutStrategy layoutMode];
 }
 
 - (void)_setLayoutMode:(WKLayoutMode)layoutMode
 {
-    _data->_page->setUseFixedLayout(layoutMode == kWKLayoutModeFixedSize || layoutMode == kWKLayoutModeDynamicSizeComputedFromViewScale);
+    if (layoutMode == [_data->_layoutStrategy layoutMode])
+        return;
 
-#if PLATFORM(MAC)
-    self._automaticallyComputesFixedLayoutSizeFromViewScale = (layoutMode == kWKLayoutModeDynamicSizeComputedFromViewScale);
-#endif
+    [_data->_layoutStrategy willChangeLayoutStrategy];
+    _data->_layoutStrategy = [WKViewLayoutStrategy layoutStrategyWithPage:*_data->_page view:self mode:layoutMode];
 }
 
 - (CGSize)_fixedLayoutSize
@@ -4416,7 +4380,18 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
         [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"];
 
     _data->_page->scaleView(viewScale);
-    [self _updateAutomaticallyComputedFixedLayoutSize];
+    [_data->_layoutStrategy didChangeViewScale];
+}
+
+- (void)_setMinimumViewSize:(CGSize)minimumViewSize
+{
+    _data->_minimumViewSize = minimumViewSize;
+    [_data->_layoutStrategy didChangeMinimumViewSize];
+}
+
+- (CGSize)_minimumViewSize
+{
+    return _data->_minimumViewSize;
 }
 
 - (void)_dispatchSetTopContentInset
index 1935fc18074d725ec10e50e435a751254e2b427d..bde41c4562fa24688ca3dec8f7b9f5e2eb15b4d6 100644 (file)
@@ -148,7 +148,9 @@ struct WebPageConfiguration;
 
 @property (readonly) NSWindow *_targetWindowForMovePreparation;
 
-@property (nonatomic, setter=_setAutomaticallyComputesFixedLayoutSizeFromViewScale:) BOOL _automaticallyComputesFixedLayoutSizeFromViewScale;
-- (void)_updateAutomaticallyComputedFixedLayoutSize;
+// For WKViewLayoutStrategy and subclasses:
+- (void)_setDrawingAreaSize:(NSSize)size;
+- (void)_updateViewExposedRect;
+- (CALayer *)_rootLayer;
 
 @end
index a1a6d263b1aff0a0a03df08c9cffa8fadc48e553..c5bcde47abfbfae3b21730b022392c821c389dbd 100644 (file)
@@ -91,6 +91,8 @@ public:
 
     virtual void hideContentUntilNextUpdate() { ASSERT_NOT_REACHED(); }
 
+    virtual void willSendUpdateGeometry() { }
+
 protected:
     explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy&);
 
index c887901533392e02281ee8e1ffdc51eee041c193..535576fae6b4475432b2f065b451b717b047c2d2 100644 (file)
@@ -2247,6 +2247,19 @@ void WebPageProxy::scaleView(double scale)
     m_process->send(Messages::WebPage::ScaleView(scale), m_pageID);
 }
 
+#if PLATFORM(COCOA)
+void WebPageProxy::scaleViewAndUpdateGeometryFenced(double scale, IntSize viewSize, const MachSendRight& fencePort)
+{
+    if (!isValid())
+        return;
+
+    m_viewScaleFactor = scale;
+    if (m_drawingArea)
+        m_drawingArea->willSendUpdateGeometry();
+    m_process->send(Messages::WebPage::ScaleViewAndUpdateGeometryFenced(scale, viewSize, fencePort), m_pageID);
+}
+#endif
+
 void WebPageProxy::setIntrinsicDeviceScaleFactor(float scaleFactor)
 {
     if (m_intrinsicDeviceScaleFactor == scaleFactor)
index fa5777386316b9e85bb7178abb03ad46060a3b7f..8d91c90c5d9c6f3143418e055adafe08f85a2848 100644 (file)
@@ -645,6 +645,9 @@ public:
     double pageScaleFactor() const;
     double viewScaleFactor() const { return m_viewScaleFactor; }
     void scaleView(double scale);
+#if PLATFORM(COCOA)
+    void scaleViewAndUpdateGeometryFenced(double scale, WebCore::IntSize viewSize, const WebCore::MachSendRight& fencePort);
+#endif
 
     float deviceScaleFactor() const;
     void setIntrinsicDeviceScaleFactor(float);
index a155ae9c064322b1b0a15d464a5965cd35dd3c42..40016c4155fdb2e4dc99ecdd09957d3f7e48aeaf 100644 (file)
@@ -93,7 +93,6 @@ private:
     bool m_isWaitingForDidUpdateGeometry;
 
     WebCore::IntSize m_lastSentSize;
-    WebCore::IntSize m_lastSentLayerPosition;
 
     std::unique_ptr<RemoteLayerTreeHost> m_debugIndicatorLayerTreeHost;
     RetainPtr<CALayer> m_tileMapHostLayer;
index 8fd844fee5d3ccbc907a0b42f4deadfe1c5727fa..75c249b40d5c9a35a69a742870e4868fb683c708 100644 (file)
@@ -155,7 +155,7 @@ void RemoteLayerTreeDrawingAreaProxy::didUpdateGeometry()
 
     // If the WKView was resized while we were waiting for a DidUpdateGeometry reply from the web process,
     // we need to resend the new size here.
-    if (m_lastSentSize != m_size || m_lastSentLayerPosition != m_layerPosition)
+    if (m_lastSentSize != m_size)
         sendUpdateGeometry();
 }
 
@@ -174,8 +174,7 @@ FloatRect RemoteLayerTreeDrawingAreaProxy::scaledExposedRect() const
 void RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry()
 {
     m_lastSentSize = m_size;
-    m_lastSentLayerPosition = m_layerPosition;
-    m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition), m_webPageProxy.pageID());
+    m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, IntSize(), false), m_webPageProxy.pageID());
     m_isWaitingForDidUpdateGeometry = true;
 }
 
index 0cf011edc3963bd2bae8156c0edf7cc32ffc11e2..e1d2b216f489dd079366c35acf7d28b315413ded 100644 (file)
@@ -54,6 +54,8 @@ private:
 
     virtual void waitForDidUpdateViewState() override;
 
+    virtual void willSendUpdateGeometry() override;
+
     // Message handlers.
     virtual void didUpdateGeometry() override;
     virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&) override;
@@ -65,7 +67,6 @@ private:
 
     // The last size we sent to the web process.
     WebCore::IntSize m_lastSentSize;
-    WebCore::IntSize m_lastSentLayerPosition;
 
     // The last minimum layout size we sent to the web process.
     WebCore::IntSize m_lastSentMinimumLayoutSize;
index 6e37ad339bf139a4a037913e63c7d08058c2e586..674a946275c2989acba61e7493120dc1ccef4ca5 100644 (file)
@@ -123,7 +123,7 @@ void TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry()
 
     // If the WKView was resized while we were waiting for a DidUpdateGeometry reply from the web process,
     // we need to resend the new size here.
-    if (m_lastSentSize != m_size || m_lastSentLayerPosition != m_layerPosition || m_lastSentMinimumLayoutSize != minimumLayoutSize)
+    if (m_lastSentSize != m_size || m_lastSentMinimumLayoutSize != minimumLayoutSize)
         sendUpdateGeometry();
 }
 
@@ -139,17 +139,21 @@ void TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange(const Int
         m_webPageProxy.intrinsicContentSizeDidChange(newIntrinsicContentSize);
 }
 
-void TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry()
+void TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry()
 {
-    ASSERT(!m_isWaitingForDidUpdateGeometry);
-
     m_lastSentMinimumLayoutSize = m_webPageProxy.minimumLayoutSize();
     m_lastSentSize = m_size;
-    m_lastSentLayerPosition = m_layerPosition;
-    m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition), m_webPageProxy.pageID());
     m_isWaitingForDidUpdateGeometry = true;
 }
 
+void TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry()
+{
+    ASSERT(!m_isWaitingForDidUpdateGeometry);
+
+    willSendUpdateGeometry();
+    m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, IntSize(), true), m_webPageProxy.pageID());
+}
+
 void TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom(double scale, FloatPoint origin)
 {
     m_webPageProxy.process().send(Messages::DrawingArea::AdjustTransientZoom(scale, origin), m_webPageProxy.pageID());
diff --git a/Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.h b/Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.h
new file mode 100644 (file)
index 0000000..e99d9fe
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKViewLayoutStrategy_h
+#define WKViewLayoutStrategy_h
+
+#if PLATFORM(MAC)
+
+#import "WKLayoutMode.h"
+
+namespace WebKit {
+class WebPageProxy;
+}
+
+@class WKView;
+
+@interface WKViewLayoutStrategy : NSObject {
+@package
+    WebKit::WebPageProxy *_page;
+    WKView *_wkView;
+
+    WKLayoutMode _layoutMode;
+    unsigned _frameSizeUpdatesDisabledCount;
+}
+
++ (instancetype)layoutStrategyWithPage:(WebKit::WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode;
+
+- (void)willDestroyView:(WKView *)view;
+
+- (void)enableFrameSizeUpdates;
+- (void)disableFrameSizeUpdates;
+- (BOOL)frameSizeUpdatesDisabled;
+
+- (void)didChangeViewScale;
+- (void)didChangeMinimumViewSize;
+- (void)willStartLiveResize;
+- (void)didEndLiveResize;
+- (void)didChangeFrameSize;
+- (void)willChangeLayoutStrategy;
+
+@property (nonatomic, readonly) WKLayoutMode layoutMode;
+
+@end
+
+#endif // PLATFORM(MAC)
+
+#endif // WKViewLayoutStrategy_h
diff --git a/Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.mm b/Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.mm
new file mode 100644 (file)
index 0000000..a695b88
--- /dev/null
@@ -0,0 +1,340 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "WKViewLayoutStrategy.h"
+
+#if PLATFORM(MAC)
+
+#import "WKViewInternal.h"
+#import "WebPageProxy.h"
+#import <WebCore/MachSendRight.h>
+#import <WebCore/QuartzCoreSPI.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+@interface WKViewViewSizeLayoutStrategy : WKViewLayoutStrategy
+@end
+
+@interface WKViewFixedSizeLayoutStrategy : WKViewLayoutStrategy
+@end
+
+@interface WKViewDynamicSizeComputedFromViewScaleLayoutStrategy : WKViewLayoutStrategy
+@end
+
+@interface WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy : WKViewLayoutStrategy
+@end
+
+@implementation WKViewLayoutStrategy
+
++ (instancetype)layoutStrategyWithPage:(WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode
+{
+    WKViewLayoutStrategy *strategy;
+
+    switch (mode) {
+    case kWKLayoutModeFixedSize:
+        strategy = [[WKViewFixedSizeLayoutStrategy alloc] initWithPage:page view:wkView mode:mode];
+        break;
+    case kWKLayoutModeDynamicSizeComputedFromViewScale:
+        strategy = [[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy alloc] initWithPage:page view:wkView mode:mode];
+        break;
+    case kWKLayoutModeDynamicSizeWithMinimumViewSize:
+        strategy = [[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy alloc] initWithPage:page view:wkView mode:mode];
+        break;
+    case kWKLayoutModeViewSize:
+    default:
+        strategy = [[WKViewViewSizeLayoutStrategy alloc] initWithPage:page view:wkView mode:mode];
+        break;
+    }
+
+    [strategy updateLayout];
+
+    return [strategy autorelease];
+}
+
+- (instancetype)initWithPage:(WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode
+{
+    self = [super init];
+
+    if (!self)
+        return nil;
+
+    _page = &page;
+    _wkView = wkView;
+    _layoutMode = mode;
+
+    return self;
+}
+
+- (void)willDestroyView:(WKView *)view
+{
+    _page = nullptr;
+    _wkView = nil;
+}
+
+- (WKLayoutMode)layoutMode
+{
+    return _layoutMode;
+}
+
+- (void)updateLayout
+{
+}
+
+- (void)disableFrameSizeUpdates
+{
+    _frameSizeUpdatesDisabledCount++;
+}
+
+- (void)enableFrameSizeUpdates
+{
+    if (!_frameSizeUpdatesDisabledCount)
+        return;
+
+    if (!(--_frameSizeUpdatesDisabledCount))
+        [self didChangeFrameSize];
+}
+
+- (BOOL)frameSizeUpdatesDisabled
+{
+    return _frameSizeUpdatesDisabledCount > 0;
+}
+
+- (void)didChangeViewScale
+{
+}
+
+- (void)didChangeMinimumViewSize
+{
+}
+
+- (void)willStartLiveResize
+{
+}
+
+- (void)didEndLiveResize
+{
+}
+
+- (void)didChangeFrameSize
+{
+    if ([self frameSizeUpdatesDisabled])
+        return;
+
+    if (_wkView.shouldClipToVisibleRect)
+        [_wkView _updateViewExposedRect];
+    [_wkView _setDrawingAreaSize:_wkView.frame.size];
+}
+
+- (void)willChangeLayoutStrategy
+{
+}
+
+@end
+
+@implementation WKViewViewSizeLayoutStrategy
+
+- (instancetype)initWithPage:(WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode
+{
+    self = [super initWithPage:page view:wkView mode:mode];
+
+    if (!self)
+        return nil;
+
+    page.setUseFixedLayout(false);
+
+    return self;
+}
+
+- (void)updateLayout
+{
+}
+
+@end
+
+@implementation WKViewFixedSizeLayoutStrategy
+
+- (instancetype)initWithPage:(WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode
+{
+    self = [super initWithPage:page view:wkView mode:mode];
+
+    if (!self)
+        return nil;
+
+    page.setUseFixedLayout(true);
+
+    return self;
+}
+
+- (void)updateLayout
+{
+}
+
+@end
+
+@implementation WKViewDynamicSizeComputedFromViewScaleLayoutStrategy
+
+- (instancetype)initWithPage:(WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode
+{
+    self = [super initWithPage:page view:wkView mode:mode];
+
+    if (!self)
+        return nil;
+
+    page.setUseFixedLayout(true);
+
+    return self;
+}
+
+- (void)updateLayout
+{
+    CGFloat inverseScale = 1 / _page->viewScaleFactor();
+    [_wkView _setFixedLayoutSize:CGSizeMake(_wkView.frame.size.width * inverseScale, _wkView.frame.size.height * inverseScale)];
+}
+
+- (void)didChangeViewScale
+{
+    [super didChangeViewScale];
+
+    [self updateLayout];
+}
+
+- (void)didChangeFrameSize
+{
+    [super didChangeFrameSize];
+
+    if ([_wkView frameSizeUpdatesDisabled])
+        return;
+
+    [self updateLayout];
+}
+
+@end
+
+@implementation WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy
+
+- (instancetype)initWithPage:(WebPageProxy&)page view:(WKView *)wkView mode:(WKLayoutMode)mode
+{
+    self = [super initWithPage:page view:wkView mode:mode];
+
+    if (!self)
+        return nil;
+
+    page.setUseFixedLayout(true);
+
+    return self;
+}
+
+- (void)updateLayout
+{
+    CGFloat scale = 1;
+
+    CGFloat minimumViewWidth = _wkView._minimumViewSize.width;
+    CGFloat minimumViewHeight = _wkView._minimumViewSize.height;
+
+    CGFloat fixedLayoutWidth = _wkView.frame.size.width;
+    CGFloat fixedLayoutHeight = _wkView.frame.size.height;
+
+    if (CGRectIsEmpty(_wkView.frame))
+        return;
+
+    if (_wkView.frame.size.width < minimumViewWidth) {
+        scale = _wkView.frame.size.width / minimumViewWidth;
+        fixedLayoutWidth = minimumViewWidth;
+    }
+
+    if (_wkView.frame.size.height < minimumViewHeight) {
+        scale = std::min(_wkView.frame.size.height / minimumViewHeight, scale);
+        fixedLayoutWidth = minimumViewHeight;
+    }
+
+    // Send frame size updates if we're the only ones disabling them,
+    // if we're not scaling down. That way, everything will behave like a normal
+    // resize except in the critical section.
+    if ([_wkView inLiveResize] && scale == 1 && _frameSizeUpdatesDisabledCount == 1) {
+        if (_wkView.shouldClipToVisibleRect)
+            [_wkView _updateViewExposedRect];
+        [_wkView _setDrawingAreaSize:[_wkView frame].size];
+    }
+
+    _page->setFixedLayoutSize(IntSize(fixedLayoutWidth, fixedLayoutHeight));
+
+    if ([_wkView inLiveResize]) {
+        float topContentInset = _page->topContentInset();
+
+        CGFloat relativeScale = scale / _page->viewScaleFactor();
+
+        CATransform3D transform = CATransform3DMakeTranslation(0, topContentInset - (topContentInset * relativeScale), 0);
+        transform = CATransform3DScale(transform, relativeScale, relativeScale, 1);
+
+        _wkView._rootLayer.transform = transform;
+    } else if (scale != _page->viewScaleFactor()) {
+        CAContext *context = [_wkView.layer context];
+        MachSendRight fencePort = MachSendRight::adopt([context createFencePort]);
+        _page->scaleViewAndUpdateGeometryFenced(scale, IntSize(_wkView.frame.size), fencePort);
+        [context setFencePort:fencePort.sendRight() commitHandler:^{
+            _wkView._rootLayer.transform = CATransform3DIdentity;
+        }];
+    }
+}
+
+- (void)didChangeMinimumViewSize
+{
+    [super didChangeMinimumViewSize];
+
+    [self updateLayout];
+}
+
+- (void)willStartLiveResize
+{
+    [super willStartLiveResize];
+
+    [_wkView disableFrameSizeUpdates];
+}
+
+- (void)didEndLiveResize
+{
+    [super didEndLiveResize];
+
+    [self updateLayout];
+    [_wkView enableFrameSizeUpdates];
+}
+
+- (void)didChangeFrameSize
+{
+    [super didChangeFrameSize];
+
+    [self updateLayout];
+}
+
+- (void)willChangeLayoutStrategy
+{
+    _wkView._rootLayer.transform = CATransform3DIdentity;
+}
+
+@end
+
+#endif // PLATFORM(MAC)
index 294151cfb7f2c8c8cf4a1595e58529e7faa47bff..748177428c6cb1f6e39ac27b80b2191825bc87f7 100644 (file)
                2D125C5F1857EA05003BA3CB /* ViewGestureControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D125C5D1857EA05003BA3CB /* ViewGestureControllerMac.mm */; };
                2D1B5D5D185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D1B5D5B185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp */; };
                2D1B5D5E185869C8006C6596 /* ViewGestureControllerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D1B5D5C185869C8006C6596 /* ViewGestureControllerMessages.h */; };
+               2D28A4971AF965A100F190C9 /* WKViewLayoutStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D28A4951AF965A100F190C9 /* WKViewLayoutStrategy.h */; };
+               2D28A4981AF965A200F190C9 /* WKViewLayoutStrategy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D28A4961AF965A100F190C9 /* WKViewLayoutStrategy.mm */; };
                2D28F3E41885CCC1004B9EAE /* WebChromeClientIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D28F3E01885CCC1004B9EAE /* WebChromeClientIOS.mm */; };
                2D28F3E51885CCC1004B9EAE /* WebDatabaseManagerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D28F3E11885CCC1004B9EAE /* WebDatabaseManagerIOS.mm */; };
                2D28F3E61885CCC1004B9EAE /* WebEditorClientIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D28F3E21885CCC1004B9EAE /* WebEditorClientIOS.mm */; };
                2D1B5D5A18586599006C6596 /* ViewGestureController.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = ViewGestureController.messages.in; sourceTree = "<group>"; };
                2D1B5D5B185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewGestureControllerMessageReceiver.cpp; sourceTree = "<group>"; };
                2D1B5D5C185869C8006C6596 /* ViewGestureControllerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureControllerMessages.h; sourceTree = "<group>"; };
+               2D28A4951AF965A100F190C9 /* WKViewLayoutStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKViewLayoutStrategy.h; sourceTree = "<group>"; };
+               2D28A4961AF965A100F190C9 /* WKViewLayoutStrategy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKViewLayoutStrategy.mm; sourceTree = "<group>"; };
                2D28F3E01885CCC1004B9EAE /* WebChromeClientIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebChromeClientIOS.mm; path = ios/WebChromeClientIOS.mm; sourceTree = "<group>"; };
                2D28F3E11885CCC1004B9EAE /* WebDatabaseManagerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebDatabaseManagerIOS.mm; path = ios/WebDatabaseManagerIOS.mm; sourceTree = "<group>"; };
                2D28F3E21885CCC1004B9EAE /* WebEditorClientIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebEditorClientIOS.mm; path = ios/WebEditorClientIOS.mm; sourceTree = "<group>"; };
                                513E462C1AD837560016234A /* WKSharingServicePickerDelegate.mm */,
                                0FCB4E5E18BBE3D9000FCFC9 /* WKTextInputWindowController.h */,
                                0FCB4E5F18BBE3D9000FCFC9 /* WKTextInputWindowController.mm */,
+                               2D28A4951AF965A100F190C9 /* WKViewLayoutStrategy.h */,
+                               2D28A4961AF965A100F190C9 /* WKViewLayoutStrategy.mm */,
                        );
                        path = mac;
                        sourceTree = "<group>";
                                BC646C1D11DD399F006455B0 /* WKBackForwardListItemRef.h in Headers */,
                                528C37C1195CBB1A00D8B9CC /* WKBackForwardListPrivate.h in Headers */,
                                BC646C1B11DD399F006455B0 /* WKBackForwardListRef.h in Headers */,
+                               2D28A4971AF965A100F190C9 /* WKViewLayoutStrategy.h in Headers */,
                                BCDDB317124EBD130048D13C /* WKBase.h in Headers */,
                                7CD5EBBB1746A83E000C1C45 /* WKBaseMac.h in Headers */,
                                BCBAAC73144E619E0053F82F /* WKBrowsingContextController.h in Headers */,
                                51AD35731AD2F3940057B38E /* WebHitTestResult.mm in Sources */,
                                511B24AA132E097200065A0C /* WebIconDatabase.cpp in Sources */,
                                51834592134532E90092B696 /* WebIconDatabaseClient.cpp in Sources */,
+                               2D28A4981AF965A200F190C9 /* WKViewLayoutStrategy.mm in Sources */,
                                51D02F64132EC5B900BEAA96 /* WebIconDatabaseMessageReceiver.cpp in Sources */,
                                511B24A6132E095700065A0C /* WebIconDatabaseProxy.cpp in Sources */,
                                51D02F6B132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp in Sources */,
index 9949dba51f84be4267986fdad8edd457844503b1..cd4a13839945fc8ddf73f13804bf5f1d56250587 100644 (file)
@@ -50,6 +50,7 @@ class Frame;
 class FrameView;
 class GraphicsLayer;
 class GraphicsLayerFactory;
+class MachSendRight;
 }
 
 namespace WebKit {
@@ -90,6 +91,7 @@ public:
     virtual WebCore::FloatRect exposedRect() const = 0;
     virtual void acceleratedAnimationDidStart(uint64_t /*layerID*/, const String& /*key*/, double /*startTime*/) { }
     virtual void acceleratedAnimationDidEnd(uint64_t /*layerID*/, const String& /*key*/) { }
+    virtual void addFence(const WebCore::MachSendRight&) { }
 #endif
 #if PLATFORM(IOS)
     virtual void setExposedContentRect(const WebCore::FloatRect&) = 0;
@@ -124,6 +126,11 @@ public:
 
     virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) { }
 
+#if PLATFORM(COCOA)
+    // Used by TiledCoreAnimationDrawingArea.
+    virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition, bool flushSynchronously) { }
+#endif
+
 protected:
     DrawingArea(DrawingAreaType, WebPage&);
 
@@ -146,7 +153,6 @@ private:
 
 #if PLATFORM(COCOA)
     // Used by TiledCoreAnimationDrawingArea.
-    virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition) { }
     virtual void setDeviceScaleFactor(float) { }
     virtual void setColorSpace(const ColorSpaceData&) { }
 
index 9844e7cad892cf9cce6f1081da35736c4b6aeb07..5f665fef4eb69a8ea7d7124c1909153aef52a743 100644 (file)
@@ -26,7 +26,7 @@ messages -> DrawingArea {
 
 #if PLATFORM(COCOA)
     // Used by TiledCoreAnimationDrawingArea.
-    UpdateGeometry(WebCore::IntSize viewSize, WebCore::IntSize layerPosition)
+    UpdateGeometry(WebCore::IntSize viewSize, WebCore::IntSize layerPosition, bool flushSynchronously)
     SetDeviceScaleFactor(float deviceScaleFactor)
     SetColorSpace(struct WebKit::ColorSpaceData colorSpace)
     SetExposedRect(WebCore::FloatRect exposedRect)
index ee1238e6aafff7499e9775b02f67f11208b52660..ef47e87b49c252b60e51cb41b030b11b28f76fb1 100644 (file)
@@ -1447,6 +1447,16 @@ void WebPage::scaleView(double scale)
     scalePage(pageScale, scrollPositionAtNewScale);
 }
 
+
+#if PLATFORM(COCOA)
+void WebPage::scaleViewAndUpdateGeometryFenced(double scale, IntSize viewSize, const MachSendRight& fencePort)
+{
+    scaleView(scale);
+    m_drawingArea->updateGeometry(viewSize, IntSize(), false);
+    m_drawingArea->addFence(fencePort);
+}
+#endif
+
 void WebPage::setDeviceScaleFactor(float scaleFactor)
 {
     if (scaleFactor == m_page->deviceScaleFactor())
index c5e9a4ceb599fe98078139c48c8256528c181fa7..97ab964bc5d15cc969bf0663cb36b27dc7197860 100644 (file)
@@ -361,6 +361,9 @@ public:
     double totalScaleFactor() const;
     double viewScaleFactor() const { return m_viewScaleFactor; }
     void scaleView(double scale);
+#if PLATFORM(COCOA)
+    void scaleViewAndUpdateGeometryFenced(double scale, WebCore::IntSize viewSize, const WebCore::MachSendRight& fencePort);
+#endif
 
     void setUseFixedLayout(bool);
     bool useFixedLayout() const { return m_useFixedLayout; }
index b38ba016a6ea6d62ebc28f30a5b78940d069199e..c9ff2058aa8cb76f197583f46599a5fa1ee8d517 100644 (file)
@@ -199,6 +199,9 @@ messages -> WebPage LegacyReceiver {
     ScalePage(double scale, WebCore::IntPoint origin)
     ScalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates)
     ScaleView(double scale)
+#if PLATFORM(COCOA)
+    ScaleViewAndUpdateGeometryFenced(double scale, WebCore::IntSize viewSize, WebCore::MachSendRight fencePort)
+#endif
 
     SetUseFixedLayout(bool fixed)
     SetFixedLayoutSize(WebCore::IntSize size)
index e407fec8a31e83224bf266ae381422973eed8e28..870d5e3e2465b54f854481e5868fbc5bd0c1afcd 100644 (file)
@@ -61,7 +61,7 @@ private:
     virtual void setNeedsDisplay() override;
     virtual void setNeedsDisplayInRect(const WebCore::IntRect&) override;
     virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) override;
-    virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition) override;
+    virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition, bool flushSynchronously) override;
 
     virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() override;
     virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
index 9ed17aa4a3b717208e55cf502c9b43dae921fddc..2fdf8867958ee2e27ce476a4b8289a2d81f24b1c 100644 (file)
@@ -152,7 +152,7 @@ void RemoteLayerTreeDrawingArea::setRootCompositingLayer(GraphicsLayer* rootLaye
     scheduleCompositingLayerFlush();
 }
 
-void RemoteLayerTreeDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition)
+void RemoteLayerTreeDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition, bool flushSynchronously)
 {
     m_viewSize = viewSize;
     m_webPage.setSize(viewSize);
index ec6824c5829ebdc6ba313842fde2ccf517b08996..019e0fe3101676161a025174ea12274e8dbc16cb 100644 (file)
@@ -90,12 +90,13 @@ private:
     virtual bool flushLayers() override;
 
     // Message handlers.
-    virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition) override;
+    virtual void updateGeometry(const WebCore::IntSize& viewSize, const WebCore::IntSize& layerPosition, bool flushSynchronously) override;
     virtual void setDeviceScaleFactor(float) override;
     void suspendPainting();
     void resumePainting();
     void setLayerHostingMode(LayerHostingMode) override;
     virtual void setColorSpace(const ColorSpaceData&) override;
+    virtual void addFence(const WebCore::MachSendRight&) override;
 
     virtual void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override;
     virtual void commitTransientZoom(double scale, WebCore::FloatPoint origin) override;
index 5538a3873650afff8c25de8a3e490d33fc38c1bb..35e09296fdd10643eae1138a26f5e2c3539e7b92 100644 (file)
@@ -43,6 +43,7 @@
 #import <WebCore/FrameView.h>
 #import <WebCore/GraphicsContext.h>
 #import <WebCore/GraphicsLayerCA.h>
+#import <WebCore/MachSendRight.h>
 #import <WebCore/MainFrame.h>
 #import <WebCore/Page.h>
 #import <WebCore/PlatformCAAnimationMac.h>
@@ -408,7 +409,7 @@ void TiledCoreAnimationDrawingArea::updateScrolledExposedRect()
     frameView->setExposedRect(m_scrolledExposedRect);
 }
 
-void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition)
+void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition, bool flushSynchronously)
 {
     m_inUpdateGeometry = true;
 
@@ -439,9 +440,11 @@ void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, cons
     [m_hostingLayer setFrame:CGRectMake(layerPosition.width(), layerPosition.height(), viewSize.width(), viewSize.height())];
 
     [CATransaction commit];
-    
-    [CATransaction flush];
-    [CATransaction synchronize];
+
+    if (flushSynchronously) {
+        [CATransaction flush];
+        [CATransaction synchronize];
+    }
 
     m_webPage.send(Messages::DrawingAreaProxy::DidUpdateGeometry());
 
@@ -738,6 +741,11 @@ void TiledCoreAnimationDrawingArea::applyTransientZoomToPage(double scale, Float
     flushLayers();
 }
 
+void TiledCoreAnimationDrawingArea::addFence(const MachSendRight& fencePort)
+{
+    m_layerHostingContext->setFencePort(fencePort.sendRight());
+}
+
 } // namespace WebKit
 
 #endif // !PLATFORM(IOS)
index 4d857fcdcf9149f72ebbef673038c76fa72cfaea..0f53680c911569ad37840e8c7a8880dfe2fe7457 100644 (file)
@@ -1,3 +1,19 @@
+2015-05-05  Timothy Horton  <timothy_horton@apple.com>
+
+        Add a layout mode for computing fixed layout size from a minimum size
+        https://bugs.webkit.org/show_bug.cgi?id=144610
+        <rdar://problem/19790341>
+
+        Reviewed by Simon Fraser.
+
+        * MiniBrowser/mac/BrowserWindow.xib:
+        * MiniBrowser/mac/BrowserWindowController.h:
+        * MiniBrowser/mac/WK1BrowserWindowController.m:
+        (-[WK1BrowserWindowController toggleUseMinimumViewSize:]):
+        * MiniBrowser/mac/WK2BrowserWindowController.m:
+        (-[WK2BrowserWindowController toggleUseMinimumViewSize:]):
+        Add a optional toolbar item to toggle a minimum view size of 1024x0.
+
 2015-05-05  Alex Christensen  <achristensen@webkit.org>
 
         [Content Extensions] Release input NSString when finished copying it.
index 5984fe5d4581bee38d2b40f1b4dfd19c0c2ca0ec..b3afc785f2b897032884f36c8df4ffb36ec39fc4 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
-       <data>
-               <int key="IBDocument.SystemTarget">1060</int>
-               <string key="IBDocument.SystemVersion">10H545</string>
-               <string key="IBDocument.InterfaceBuilderVersion">820</string>
-               <string key="IBDocument.AppKitVersion">1038.35</string>
-               <string key="IBDocument.HIToolboxVersion">461.00</string>
-               <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
-                       <string key="NS.object.0">820</string>
-               </object>
-               <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <integer value="9"/>
-                       <integer value="71"/>
-               </object>
-               <object class="NSArray" key="IBDocument.PluginDependencies">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-               </object>
-               <object class="NSMutableDictionary" key="IBDocument.Metadata">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="NSArray" key="dict.sortedKeys" id="0">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                       </object>
-                       <object class="NSMutableArray" key="dict.values">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                       </object>
-               </object>
-               <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="NSCustomObject" id="1001">
-                               <string key="NSClassName">BrowserWindowController</string>
-                       </object>
-                       <object class="NSCustomObject" id="1003">
-                               <string key="NSClassName">FirstResponder</string>
-                       </object>
-                       <object class="NSCustomObject" id="1004">
-                               <string key="NSClassName">NSApplication</string>
-                       </object>
-                       <object class="NSWindowTemplate" id="1005">
-                               <int key="NSWindowStyleMask">4111</int>
-                               <int key="NSWindowBacking">2</int>
-                               <string key="NSWindowRect">{{517, 330}, {776, 608}}</string>
-                               <int key="NSWTFlags">544735232</int>
-                               <string key="NSWindowTitle">Window</string>
-                               <string key="NSWindowClass">NSWindow</string>
-                               <object class="NSToolbar" key="NSViewClass" id="726585754">
-                                       <object class="NSMutableString" key="NSToolbarIdentifier">
-                                               <characters key="NS.bytes">994A0CB1-7575-4F39-A65B-7165AB1E8015</characters>
-                                       </object>
-                                       <nil key="NSToolbarDelegate"/>
-                                       <bool key="NSToolbarPrefersToBeShown">YES</bool>
-                                       <bool key="NSToolbarShowsBaselineSeparator">YES</bool>
-                                       <bool key="NSToolbarAllowsUserCustomization">YES</bool>
-                                       <bool key="NSToolbarAutosavesConfiguration">NO</bool>
-                                       <int key="NSToolbarDisplayMode">2</int>
-                                       <int key="NSToolbarSizeMode">1</int>
-                                       <object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</string>
-                                                       <string>6BDC61B7-F1A8-425A-A212-9CAC59C56385</string>
-                                                       <string>73DE9F4B-73E2-4036-A134-2D9E029DA980</string>
-                                                       <string>88C16109-D40F-4682-BCE4-CBEE2EDE32D2</string>
-                                                       <string>E1A9D32A-59E3-467B-9ABA-A95780416E69</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="NSToolbarItem" id="16289946">
-                                                               <object class="NSMutableString" key="NSToolbarItemIdentifier">
-                                                                       <characters key="NS.bytes">255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</characters>
-                                                               </object>
-                                                               <string key="NSToolbarItemLabel">Location</string>
-                                                               <string key="NSToolbarItemPaletteLabel">Location</string>
-                                                               <nil key="NSToolbarItemToolTip"/>
-                                                               <object class="NSTextField" key="NSToolbarItemView" id="690456651">
-                                                                       <nil key="NSNextResponder"/>
-                                                                       <int key="NSvFlags">266</int>
-                                                                       <string key="NSFrame">{{0, 14}, {565, 22}}</string>
-                                                                       <int key="NSViewLayerContentsRedrawPolicy">2</int>
-                                                                       <bool key="NSEnabled">YES</bool>
-                                                                       <object class="NSTextFieldCell" key="NSCell" id="1023147716">
-                                                                               <int key="NSCellFlags">-1804468671</int>
-                                                                               <int key="NSCellFlags2">268436480</int>
-                                                                               <string key="NSContents"/>
-                                                                               <object class="NSFont" key="NSSupport" id="1064395332">
-                                                                                       <string key="NSName">LucidaGrande</string>
-                                                                                       <double key="NSSize">13</double>
-                                                                                       <int key="NSfFlags">1044</int>
-                                                                               </object>
-                                                                               <reference key="NSControlView" ref="690456651"/>
-                                                                               <bool key="NSDrawsBackground">YES</bool>
-                                                                               <object class="NSColor" key="NSBackgroundColor" id="1032961300">
-                                                                                       <int key="NSColorSpace">6</int>
-                                                                                       <string key="NSCatalogName">System</string>
-                                                                                       <string key="NSColorName">textBackgroundColor</string>
-                                                                                       <object class="NSColor" key="NSColor">
-                                                                                               <int key="NSColorSpace">3</int>
-                                                                                               <bytes key="NSWhite">MQA</bytes>
-                                                                                       </object>
-                                                                               </object>
-                                                                               <object class="NSColor" key="NSTextColor">
-                                                                                       <int key="NSColorSpace">6</int>
-                                                                                       <string key="NSCatalogName">System</string>
-                                                                                       <string key="NSColorName">textColor</string>
-                                                                                       <object class="NSColor" key="NSColor" id="365730878">
-                                                                                               <int key="NSColorSpace">3</int>
-                                                                                               <bytes key="NSWhite">MAA</bytes>
-                                                                                       </object>
-                                                                               </object>
-                                                                       </object>
-                                                               </object>
-                                                               <nil key="NSToolbarItemImage"/>
-                                                               <nil key="NSToolbarItemTarget"/>
-                                                               <nil key="NSToolbarItemAction"/>
-                                                               <string key="NSToolbarItemMinSize">{200, 22}</string>
-                                                               <string key="NSToolbarItemMaxSize">{800, 22}</string>
-                                                               <bool key="NSToolbarItemEnabled">YES</bool>
-                                                               <bool key="NSToolbarItemAutovalidates">YES</bool>
-                                                               <int key="NSToolbarItemTag">0</int>
-                                                               <bool key="NSToolbarIsUserRemovable">YES</bool>
-                                                               <int key="NSToolbarItemVisibilityPriority">0</int>
-                                                       </object>
-                                                       <object class="NSToolbarItem" id="457655522">
-                                                               <object class="NSMutableString" key="NSToolbarItemIdentifier">
-                                                                       <characters key="NS.bytes">6BDC61B7-F1A8-425A-A212-9CAC59C56385</characters>
-                                                               </object>
-                                                               <string key="NSToolbarItemLabel">Progress</string>
-                                                               <string key="NSToolbarItemPaletteLabel">Progress</string>
-                                                               <nil key="NSToolbarItemToolTip"/>
-                                                               <object class="NSProgressIndicator" key="NSToolbarItemView" id="128750774">
-                                                                       <nil key="NSNextResponder"/>
-                                                                       <int key="NSvFlags">1289</int>
-                                                                       <object class="NSPSMatrix" key="NSDrawMatrix"/>
-                                                                       <string key="NSFrame">{{19, 14}, {16, 16}}</string>
-                                                                       <int key="NSpiFlags">28936</int>
-                                                                       <double key="NSMaxValue">1</double>
-                                                               </object>
-                                                               <nil key="NSToolbarItemImage"/>
-                                                               <nil key="NSToolbarItemTarget"/>
-                                                               <nil key="NSToolbarItemAction"/>
-                                                               <string key="NSToolbarItemMinSize">{16, 16}</string>
-                                                               <string key="NSToolbarItemMaxSize">{16, 16}</string>
-                                                               <bool key="NSToolbarItemEnabled">YES</bool>
-                                                               <bool key="NSToolbarItemAutovalidates">YES</bool>
-                                                               <int key="NSToolbarItemTag">-1</int>
-                                                               <bool key="NSToolbarIsUserRemovable">YES</bool>
-                                                               <int key="NSToolbarItemVisibilityPriority">0</int>
-                                                       </object>
-                                                       <object class="NSToolbarItem" id="332491395">
-                                                               <object class="NSMutableString" key="NSToolbarItemIdentifier">
-                                                                       <characters key="NS.bytes">73DE9F4B-73E2-4036-A134-2D9E029DA980</characters>
-                                                               </object>
-                                                               <string key="NSToolbarItemLabel">Go Back</string>
-                                                               <string key="NSToolbarItemPaletteLabel">Go Back</string>
-                                                               <nil key="NSToolbarItemToolTip"/>
-                                                               <object class="NSButton" key="NSToolbarItemView" id="777930419">
-                                                                       <nil key="NSNextResponder"/>
-                                                                       <int key="NSvFlags">268</int>
-                                                                       <string key="NSFrame">{{9, 14}, {32, 25}}</string>
-                                                                       <bool key="NSEnabled">YES</bool>
-                                                                       <object class="NSButtonCell" key="NSCell" id="663899880">
-                                                                               <int key="NSCellFlags">-2080244224</int>
-                                                                               <int key="NSCellFlags2">134217728</int>
-                                                                               <string key="NSContents"/>
-                                                                               <reference key="NSSupport" ref="1064395332"/>
-                                                                               <reference key="NSControlView" ref="777930419"/>
-                                                                               <int key="NSButtonFlags">-2033434369</int>
-                                                                               <int key="NSButtonFlags2">163</int>
-                                                                               <object class="NSCustomResource" key="NSNormalImage" id="206098440">
-                                                                                       <string key="NSClassName">NSImage</string>
-                                                                                       <string key="NSResourceName">NSGoLeftTemplate</string>
-                                                                               </object>
-                                                                               <string key="NSAlternateContents"/>
-                                                                               <string key="NSKeyEquivalent"/>
-                                                                               <int key="NSPeriodicDelay">400</int>
-                                                                               <int key="NSPeriodicInterval">75</int>
-                                                                       </object>
-                                                               </object>
-                                                               <reference key="NSToolbarItemImage" ref="206098440"/>
-                                                               <nil key="NSToolbarItemTarget"/>
-                                                               <nil key="NSToolbarItemAction"/>
-                                                               <string key="NSToolbarItemMinSize">{32, 25}</string>
-                                                               <string key="NSToolbarItemMaxSize">{32, 25}</string>
-                                                               <bool key="NSToolbarItemEnabled">YES</bool>
-                                                               <bool key="NSToolbarItemAutovalidates">YES</bool>
-                                                               <int key="NSToolbarItemTag">0</int>
-                                                               <bool key="NSToolbarIsUserRemovable">YES</bool>
-                                                               <int key="NSToolbarItemVisibilityPriority">0</int>
-                                                       </object>
-                                                       <object class="NSToolbarItem" id="818723416">
-                                                               <object class="NSMutableString" key="NSToolbarItemIdentifier">
-                                                                       <characters key="NS.bytes">88C16109-D40F-4682-BCE4-CBEE2EDE32D2</characters>
-                                                               </object>
-                                                               <string key="NSToolbarItemLabel">Refresh</string>
-                                                               <string key="NSToolbarItemPaletteLabel">Refresh</string>
-                                                               <nil key="NSToolbarItemToolTip"/>
-                                                               <object class="NSButton" key="NSToolbarItemView" id="35464578">
-                                                                       <nil key="NSNextResponder"/>
-                                                                       <int key="NSvFlags">268</int>
-                                                                       <string key="NSFrame">{{10, 14}, {29, 25}}</string>
-                                                                       <bool key="NSEnabled">YES</bool>
-                                                                       <object class="NSButtonCell" key="NSCell" id="366486485">
-                                                                               <int key="NSCellFlags">-2080244224</int>
-                                                                               <int key="NSCellFlags2">134217728</int>
-                                                                               <string key="NSContents"/>
-                                                                               <reference key="NSSupport" ref="1064395332"/>
-                                                                               <reference key="NSControlView" ref="35464578"/>
-                                                                               <int key="NSButtonFlags">-2033434369</int>
-                                                                               <int key="NSButtonFlags2">163</int>
-                                                                               <object class="NSCustomResource" key="NSNormalImage" id="443763357">
-                                                                                       <string key="NSClassName">NSImage</string>
-                                                                                       <string key="NSResourceName">NSRefreshTemplate</string>
-                                                                               </object>
-                                                                               <string key="NSAlternateContents"/>
-                                                                               <string key="NSKeyEquivalent"/>
-                                                                               <int key="NSPeriodicDelay">400</int>
-                                                                               <int key="NSPeriodicInterval">75</int>
-                                                                       </object>
-                                                               </object>
-                                                               <reference key="NSToolbarItemImage" ref="443763357"/>
-                                                               <nil key="NSToolbarItemTarget"/>
-                                                               <nil key="NSToolbarItemAction"/>
-                                                               <string key="NSToolbarItemMinSize">{29, 25}</string>
-                                                               <string key="NSToolbarItemMaxSize">{29, 25}</string>
-                                                               <bool key="NSToolbarItemEnabled">YES</bool>
-                                                               <bool key="NSToolbarItemAutovalidates">YES</bool>
-                                                               <int key="NSToolbarItemTag">0</int>
-                                                               <bool key="NSToolbarIsUserRemovable">YES</bool>
-                                                               <int key="NSToolbarItemVisibilityPriority">0</int>
-                                                       </object>
-                                                       <object class="NSToolbarItem" id="928383107">
-                                                               <object class="NSMutableString" key="NSToolbarItemIdentifier">
-                                                                       <characters key="NS.bytes">E1A9D32A-59E3-467B-9ABA-A95780416E69</characters>
-                                                               </object>
-                                                               <string key="NSToolbarItemLabel">Go Forward</string>
-                                                               <string key="NSToolbarItemPaletteLabel">Go Forward</string>
-                                                               <nil key="NSToolbarItemToolTip"/>
-                                                               <object class="NSButton" key="NSToolbarItemView" id="95415629">
-                                                                       <nil key="NSNextResponder"/>
-                                                                       <int key="NSvFlags">268</int>
-                                                                       <string key="NSFrame">{{19, 14}, {32, 25}}</string>
-                                                                       <bool key="NSEnabled">YES</bool>
-                                                                       <object class="NSButtonCell" key="NSCell" id="767612038">
-                                                                               <int key="NSCellFlags">-2080244224</int>
-                                                                               <int key="NSCellFlags2">134217728</int>
-                                                                               <string key="NSContents"/>
-                                                                               <reference key="NSSupport" ref="1064395332"/>
-                                                                               <reference key="NSControlView" ref="95415629"/>
-                                                                               <int key="NSButtonFlags">-2033434369</int>
-                                                                               <int key="NSButtonFlags2">163</int>
-                                                                               <object class="NSCustomResource" key="NSNormalImage" id="163672266">
-                                                                                       <string key="NSClassName">NSImage</string>
-                                                                                       <string key="NSResourceName">NSGoRightTemplate</string>
-                                                                               </object>
-                                                                               <string key="NSAlternateContents"/>
-                                                                               <string key="NSKeyEquivalent"/>
-                                                                               <int key="NSPeriodicDelay">400</int>
-                                                                               <int key="NSPeriodicInterval">75</int>
-                                                                       </object>
-                                                               </object>
-                                                               <reference key="NSToolbarItemImage" ref="163672266"/>
-                                                               <nil key="NSToolbarItemTarget"/>
-                                                               <nil key="NSToolbarItemAction"/>
-                                                               <string key="NSToolbarItemMinSize">{32, 25}</string>
-                                                               <string key="NSToolbarItemMaxSize">{32, 25}</string>
-                                                               <bool key="NSToolbarItemEnabled">YES</bool>
-                                                               <bool key="NSToolbarItemAutovalidates">YES</bool>
-                                                               <int key="NSToolbarItemTag">0</int>
-                                                               <bool key="NSToolbarIsUserRemovable">YES</bool>
-                                                               <int key="NSToolbarItemVisibilityPriority">0</int>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="NSArray" key="NSToolbarIBAllowedItems">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <reference ref="332491395"/>
-                                               <reference ref="928383107"/>
-                                               <reference ref="818723416"/>
-                                               <reference ref="457655522"/>
-                                               <reference ref="16289946"/>
-                                       </object>
-                                       <object class="NSMutableArray" key="NSToolbarIBDefaultItems">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <reference ref="332491395"/>
-                                               <reference ref="928383107"/>
-                                               <reference ref="818723416"/>
-                                               <reference ref="16289946"/>
-                                               <reference ref="457655522"/>
-                                       </object>
-                                       <object class="NSMutableArray" key="NSToolbarIBSelectableItems">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                       </object>
-                               </object>
-                               <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
-                               <object class="NSView" key="NSWindowView" id="1006">
-                                       <reference key="NSNextResponder"/>
-                                       <int key="NSvFlags">256</int>
-                                       <object class="NSMutableArray" key="NSSubviews">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSCustomView" id="877383975">
-                                                       <reference key="NSNextResponder" ref="1006"/>
-                                                       <int key="NSvFlags">274</int>
-                                                       <string key="NSFrameSize">{776, 608}</string>
-                                                       <reference key="NSSuperview" ref="1006"/>
-                                                       <int key="NSViewLayerContentsRedrawPolicy">2</int>
-                                                       <string key="NSClassName">NSView</string>
-                                               </object>
-                                       </object>
-                                       <string key="NSFrameSize">{776, 608}</string>
-                                       <reference key="NSSuperview"/>
-                                       <int key="NSViewLayerContentsRedrawPolicy">2</int>
-                               </object>
-                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
-                               <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
-                               <string key="NSFrameAutosaveName">Main Window</string>
-                       </object>
-                       <object class="NSWindowTemplate" id="833876351">
-                               <int key="NSWindowStyleMask">147</int>
-                               <int key="NSWindowBacking">2</int>
-                               <string key="NSWindowRect">{{230, 479}, {452, 62}}</string>
-                               <int key="NSWTFlags">-461897728</int>
-                               <string key="NSWindowTitle">Find</string>
-                               <string key="NSWindowClass">NSPanel</string>
-                               <nil key="NSViewClass"/>
-                               <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
-                               <object class="NSView" key="NSWindowView" id="585866018">
-                                       <reference key="NSNextResponder"/>
-                                       <int key="NSvFlags">256</int>
-                                       <object class="NSMutableArray" key="NSSubviews">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSSearchField" id="841639270">
-                                                       <reference key="NSNextResponder" ref="585866018"/>
-                                                       <int key="NSvFlags">268</int>
-                                                       <string key="NSFrame">{{20, 20}, {412, 22}}</string>
-                                                       <reference key="NSSuperview" ref="585866018"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSSearchFieldCell" key="NSCell" id="41426839">
-                                                               <int key="NSCellFlags">343014976</int>
-                                                               <int key="NSCellFlags2">268436544</int>
-                                                               <string key="NSContents"/>
-                                                               <reference key="NSSupport" ref="1064395332"/>
-                                                               <reference key="NSControlView" ref="841639270"/>
-                                                               <bool key="NSDrawsBackground">YES</bool>
-                                                               <int key="NSTextBezelStyle">1</int>
-                                                               <reference key="NSBackgroundColor" ref="1032961300"/>
-                                                               <object class="NSColor" key="NSTextColor">
-                                                                       <int key="NSColorSpace">6</int>
-                                                                       <string key="NSCatalogName">System</string>
-                                                                       <string key="NSColorName">controlTextColor</string>
-                                                                       <reference key="NSColor" ref="365730878"/>
-                                                               </object>
-                                                               <object class="NSButtonCell" key="NSSearchButtonCell">
-                                                                       <int key="NSCellFlags">130560</int>
-                                                                       <int key="NSCellFlags2">0</int>
-                                                                       <string key="NSContents">search</string>
-                                                                       <reference key="NSControlView" ref="841639270"/>
-                                                                       <string key="NSAction">_searchFieldSearch:</string>
-                                                                       <reference key="NSTarget" ref="41426839"/>
-                                                                       <int key="NSButtonFlags">138690815</int>
-                                                                       <int key="NSButtonFlags2">0</int>
-                                                                       <string key="NSKeyEquivalent"/>
-                                                                       <int key="NSPeriodicDelay">400</int>
-                                                                       <int key="NSPeriodicInterval">75</int>
-                                                               </object>
-                                                               <object class="NSButtonCell" key="NSCancelButtonCell">
-                                                                       <int key="NSCellFlags">130560</int>
-                                                                       <int key="NSCellFlags2">0</int>
-                                                                       <string key="NSContents">clear</string>
-                                                                       <object class="NSMutableArray" key="NSAccessibilityOverriddenAttributes">
-                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                               <object class="NSMutableDictionary">
-                                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                                       <object class="NSArray" key="dict.sortedKeys">
-                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                                               <string>AXDescription</string>
-                                                                                               <string>NSAccessibilityEncodedAttributesValueType</string>
-                                                                                       </object>
-                                                                                       <object class="NSMutableArray" key="dict.values">
-                                                                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                                                                               <string>cancel</string>
-                                                                                               <integer value="1"/>
-                                                                                       </object>
-                                                                               </object>
-                                                                       </object>
-                                                                       <reference key="NSControlView" ref="841639270"/>
-                                                                       <string key="NSAction">_searchFieldCancel:</string>
-                                                                       <reference key="NSTarget" ref="41426839"/>
-                                                                       <int key="NSButtonFlags">138690815</int>
-                                                                       <int key="NSButtonFlags2">0</int>
-                                                                       <string key="NSKeyEquivalent"/>
-                                                                       <int key="NSPeriodicDelay">400</int>
-                                                                       <int key="NSPeriodicInterval">75</int>
-                                                               </object>
-                                                               <int key="NSMaximumRecents">255</int>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <string key="NSFrameSize">{452, 62}</string>
-                                       <reference key="NSSuperview"/>
-                               </object>
-                               <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
-                               <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
-                       </object>
-               </object>
-               <object class="IBObjectContainer" key="IBDocument.Objects">
-                       <object class="NSMutableArray" key="connectionRecords">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">window</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="1005"/>
-                                       </object>
-                                       <int key="connectionID">3</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">delegate</string>
-                                               <reference key="source" ref="1005"/>
-                                               <reference key="destination" ref="1001"/>
-                                       </object>
-                                       <int key="connectionID">4</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">urlText</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="690456651"/>
-                                       </object>
-                                       <int key="connectionID">32</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">progressIndicator</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="128750774"/>
-                                       </object>
-                                       <int key="connectionID">33</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">reloadButton</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="35464578"/>
-                                       </object>
-                                       <int key="connectionID">34</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">reload:</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="35464578"/>
-                                       </object>
-                                       <int key="connectionID">35</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">fetch:</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="690456651"/>
-                                       </object>
-                                       <int key="connectionID">36</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">containerView</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="877383975"/>
-                                       </object>
-                                       <int key="connectionID">37</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">backButton</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="777930419"/>
-                                       </object>
-                                       <int key="connectionID">46</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">forwardButton</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="95415629"/>
-                                       </object>
-                                       <int key="connectionID">47</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">goBack:</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="332491395"/>
-                                       </object>
-                                       <int key="connectionID">61</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">goForward:</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="928383107"/>
-                                       </object>
-                                       <int key="connectionID">62</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">toolbar</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="726585754"/>
-                                       </object>
-                                       <int key="connectionID">67</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">find:</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="841639270"/>
-                                       </object>
-                                       <int key="connectionID">76</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">findPanelWindow</string>
-                                               <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="833876351"/>
-                                       </object>
-                                       <int key="connectionID">77</int>
-                               </object>
-                       </object>
-                       <object class="IBMutableOrderedSet" key="objectRecords">
-                               <object class="NSArray" key="orderedObjects">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">0</int>
-                                               <reference key="object" ref="0"/>
-                                               <reference key="children" ref="1000"/>
-                                               <nil key="parent"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-2</int>
-                                               <reference key="object" ref="1001"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">File's Owner</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-1</int>
-                                               <reference key="object" ref="1003"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">First Responder</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">-3</int>
-                                               <reference key="object" ref="1004"/>
-                                               <reference key="parent" ref="0"/>
-                                               <string key="objectName">Application</string>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">1</int>
-                                               <reference key="object" ref="1005"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="1006"/>
-                                                       <reference ref="726585754"/>
-                                               </object>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">2</int>
-                                               <reference key="object" ref="1006"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="877383975"/>
-                                               </object>
-                                               <reference key="parent" ref="1005"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">9</int>
-                                               <reference key="object" ref="877383975"/>
-                                               <reference key="parent" ref="1006"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">48</int>
-                                               <reference key="object" ref="726585754"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="332491395"/>
-                                                       <reference ref="928383107"/>
-                                                       <reference ref="818723416"/>
-                                                       <reference ref="16289946"/>
-                                                       <reference ref="457655522"/>
-                                               </object>
-                                               <reference key="parent" ref="1005"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">56</int>
-                                               <reference key="object" ref="332491395"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="777930419"/>
-                                               </object>
-                                               <reference key="parent" ref="726585754"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">40</int>
-                                               <reference key="object" ref="777930419"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="663899880"/>
-                                               </object>
-                                               <reference key="parent" ref="332491395"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">41</int>
-                                               <reference key="object" ref="663899880"/>
-                                               <reference key="parent" ref="777930419"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">57</int>
-                                               <reference key="object" ref="928383107"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="95415629"/>
-                                               </object>
-                                               <reference key="parent" ref="726585754"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">42</int>
-                                               <reference key="object" ref="95415629"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="767612038"/>
-                                               </object>
-                                               <reference key="parent" ref="928383107"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">43</int>
-                                               <reference key="object" ref="767612038"/>
-                                               <reference key="parent" ref="95415629"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">58</int>
-                                               <reference key="object" ref="818723416"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="35464578"/>
-                                               </object>
-                                               <reference key="parent" ref="726585754"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">23</int>
-                                               <reference key="object" ref="35464578"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="366486485"/>
-                                               </object>
-                                               <reference key="parent" ref="818723416"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">24</int>
-                                               <reference key="object" ref="366486485"/>
-                                               <reference key="parent" ref="35464578"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">59</int>
-                                               <reference key="object" ref="16289946"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="690456651"/>
-                                               </object>
-                                               <reference key="parent" ref="726585754"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">10</int>
-                                               <reference key="object" ref="690456651"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="1023147716"/>
-                                               </object>
-                                               <reference key="parent" ref="16289946"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">11</int>
-                                               <reference key="object" ref="1023147716"/>
-                                               <reference key="parent" ref="690456651"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">60</int>
-                                               <reference key="object" ref="457655522"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="128750774"/>
-                                               </object>
-                                               <reference key="parent" ref="726585754"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">21</int>
-                                               <reference key="object" ref="128750774"/>
-                                               <reference key="parent" ref="457655522"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">70</int>
-                                               <reference key="object" ref="833876351"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="585866018"/>
-                                               </object>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">71</int>
-                                               <reference key="object" ref="585866018"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="841639270"/>
-                                               </object>
-                                               <reference key="parent" ref="833876351"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">74</int>
-                                               <reference key="object" ref="841639270"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="41426839"/>
-                                               </object>
-                                               <reference key="parent" ref="585866018"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">75</int>
-                                               <reference key="object" ref="41426839"/>
-                                               <reference key="parent" ref="841639270"/>
-                                       </object>
-                               </object>
-                       </object>
-                       <object class="NSMutableDictionary" key="flattenedProperties">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="NSArray" key="dict.sortedKeys">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <string>1.IBEditorWindowLastContentRect</string>
-                                       <string>1.IBPluginDependency</string>
-                                       <string>1.IBWindowTemplateEditedContentRect</string>
-                                       <string>1.NSWindowTemplate.visibleAtLaunch</string>
-                                       <string>1.WindowOrigin</string>
-                                       <string>1.editorWindowContentRectSynchronizationRect</string>
-                                       <string>10.IBPluginDependency</string>
-                                       <string>11.IBPluginDependency</string>
-                                       <string>2.IBPluginDependency</string>
-                                       <string>21.IBPluginDependency</string>
-                                       <string>21.IBViewIntegration.shadowBlurRadius</string>
-                                       <string>21.IBViewIntegration.shadowColor</string>
-                                       <string>21.IBViewIntegration.shadowOffsetHeight</string>
-                                       <string>21.IBViewIntegration.shadowOffsetWidth</string>
-                                       <string>23.IBPluginDependency</string>
-                                       <string>24.IBPluginDependency</string>
-                                       <string>40.IBPluginDependency</string>
-                                       <string>41.IBPluginDependency</string>
-                                       <string>42.IBPluginDependency</string>
-                                       <string>43.IBPluginDependency</string>
-                                       <string>48.IBEditorWindowLastContentRect</string>
-                                       <string>48.IBPluginDependency</string>
-                                       <string>56.CustomClassName</string>
-                                       <string>57.CustomClassName</string>
-                                       <string>58.CustomClassName</string>
-                                       <string>70.IBEditorWindowLastContentRect</string>
-                                       <string>70.IBPluginDependency</string>
-                                       <string>70.IBWindowTemplateEditedContentRect</string>
-                                       <string>70.NSWindowTemplate.visibleAtLaunch</string>
-                                       <string>71.IBPluginDependency</string>
-                                       <string>74.IBPluginDependency</string>
-                                       <string>75.IBPluginDependency</string>
-                                       <string>9.IBPluginDependency</string>
-                                       <string>9.IBViewBoundsToFrameTransform</string>
-                               </object>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                       <string>{{404, 157}, {776, 608}}</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>{{404, 157}, {776, 608}}</string>
-                                       <integer value="1"/>
-                                       <string>{196, 240}</string>
-                                       <string>{{202, 428}, {480, 270}}</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <real value="0.0"/>
-                                       <reference ref="365730878"/>
-                                       <real value="0.0"/>
-                                       <real value="0.0"/>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>{{422, 781}, {616, 0}}</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>MBToolbarItem</string>
-                                       <string>MBToolbarItem</string>
-                                       <string>MBToolbarItem</string>
-                                       <string>{{558, 468}, {452, 62}}</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>{{558, 468}, {452, 62}}</string>
-                                       <boolean value="NO"/>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <object class="NSAffineTransform"/>
-                               </object>
-                       </object>
-                       <object class="NSMutableDictionary" key="unlocalizedProperties">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <reference key="dict.sortedKeys" ref="0"/>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                               </object>
-                       </object>
-                       <nil key="activeLocalization"/>
-                       <object class="NSMutableDictionary" key="localizations">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <reference key="dict.sortedKeys" ref="0"/>
-                               <object class="NSMutableArray" key="dict.values">
-                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                               </object>
-                       </object>
-                       <nil key="sourceID"/>
-                       <int key="maxID">77</int>
-               </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes">
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">BrowserWindowController</string>
-                                       <string key="superclassName">NSWindowController</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>dumpSourceToConsole:</string>
-                                                       <string>fetch:</string>
-                                                       <string>find:</string>
-                                                       <string>forceRepaint:</string>
-                                                       <string>goBack:</string>
-                                                       <string>goForward:</string>
-                                                       <string>reload:</string>
-                                                       <string>removeReinsertWebView:</string>
-                                                       <string>resetZoom:</string>
-                                                       <string>showHideWebView:</string>
-                                                       <string>toggleZoomMode:</string>
-                                                       <string>zoomIn:</string>
-                                                       <string>zoomOut:</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>dumpSourceToConsole:</string>
-                                                       <string>fetch:</string>
-                                                       <string>find:</string>
-                                                       <string>forceRepaint:</string>
-                                                       <string>goBack:</string>
-                                                       <string>goForward:</string>
-                                                       <string>reload:</string>
-                                                       <string>removeReinsertWebView:</string>
-                                                       <string>resetZoom:</string>
-                                                       <string>showHideWebView:</string>
-                                                       <string>toggleZoomMode:</string>
-                                                       <string>zoomIn:</string>
-                                                       <string>zoomOut:</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">dumpSourceToConsole:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">fetch:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">find:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">forceRepaint:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">goBack:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">goForward:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">reload:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">removeReinsertWebView:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">resetZoom:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">showHideWebView:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">toggleZoomMode:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">zoomIn:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">zoomOut:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>backButton</string>
-                                                       <string>containerView</string>
-                                                       <string>findPanelWindow</string>
-                                                       <string>forwardButton</string>
-                                                       <string>progressIndicator</string>
-                                                       <string>reloadButton</string>
-                                                       <string>toolbar</string>
-                                                       <string>urlText</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>NSButton</string>
-                                                       <string>NSView</string>
-                                                       <string>NSWindow</string>
-                                                       <string>NSButton</string>
-                                                       <string>NSProgressIndicator</string>
-                                                       <string>NSButton</string>
-                                                       <string>NSToolbar</string>
-                                                       <string>NSTextField</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>backButton</string>
-                                                       <string>containerView</string>
-                                                       <string>findPanelWindow</string>
-                                                       <string>forwardButton</string>
-                                                       <string>progressIndicator</string>
-                                                       <string>reloadButton</string>
-                                                       <string>toolbar</string>
-                                                       <string>urlText</string>
-                                               </object>
-                                               <object class="NSMutableArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">backButton</string>
-                                                               <string key="candidateClassName">NSButton</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">containerView</string>
-                                                               <string key="candidateClassName">NSView</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">findPanelWindow</string>
-                                                               <string key="candidateClassName">NSWindow</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">forwardButton</string>
-                                                               <string key="candidateClassName">NSButton</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">progressIndicator</string>
-                                                               <string key="candidateClassName">NSProgressIndicator</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">reloadButton</string>
-                                                               <string key="candidateClassName">NSButton</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">toolbar</string>
-                                                               <string key="candidateClassName">NSToolbar</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">urlText</string>
-                                                               <string key="candidateClassName">NSTextField</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">mac/BrowserWindowController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">BrowserWindowController</string>
-                                       <string key="superclassName">NSWindowController</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBUserSource</string>
-                                               <string key="minorKey"/>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">MBToolbarItem</string>
-                                       <string key="superclassName">NSToolbarItem</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">MBToolbarItem.h</string>
-                                       </object>
-                               </object>
-                       </object>
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSActionCell</string>
-                                       <string key="superclassName">NSCell</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSApplication</string>
-                                       <string key="superclassName">NSResponder</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="558771426">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSApplication</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="344596456">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSApplication</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="428409299">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSApplication</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSApplication</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSApplication</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSButton</string>
-                                       <string key="superclassName">NSControl</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSButton.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSButtonCell</string>
-                                       <string key="superclassName">NSActionCell</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSCell</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSControl</string>
-                                       <string key="superclassName">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="297186634">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSFormatter</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSMenu</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="808053469">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="558771426"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="344596456"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="428409299"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="297186634"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSFontManager.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="808053469"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="335804019">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier" id="555757547">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSArchiver.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSPanel</string>
-                                       <string key="superclassName">NSWindow</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSPanel.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSProgressIndicator</string>
-                                       <string key="superclassName">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSProgressIndicator.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSResponder</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSInterfaceStyle.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSResponder</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSResponder.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSSearchField</string>
-                                       <string key="superclassName">NSTextField</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSSearchField.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSSearchFieldCell</string>
-                                       <string key="superclassName">NSTextFieldCell</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSSearchFieldCell.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSTextField</string>
-                                       <string key="superclassName">NSControl</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSTextField.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSTextFieldCell</string>
-                                       <string key="superclassName">NSActionCell</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSTextFieldCell.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSToolbar</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSToolbarItem</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <reference key="sourceIdentifier" ref="335804019"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSClipView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSView</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSRulerView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSView</string>
-                                       <string key="superclassName">NSResponder</string>
-                                       <reference key="sourceIdentifier" ref="555757547"/>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSWindow</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSDrawer.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSWindow</string>
-                                       <string key="superclassName">NSResponder</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSWindow.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSWindow</string>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSWindowScripting.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NSWindowController</string>
-                                       <string key="superclassName">NSResponder</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <string key="NS.key.0">showWindow:</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <string key="NS.key.0">showWindow:</string>
-                                               <object class="IBActionInfo" key="NS.object.0">
-                                                       <string key="name">showWindow:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBFrameworkSource</string>
-                                               <string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string>
-                                       </object>
-                               </object>
-                       </object>
-               </object>
-               <int key="IBDocument.localizationMode">0</int>
-               <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
-               <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
-                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
-                       <integer value="3000" key="NS.object.0"/>
-               </object>
-               <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-               <string key="IBDocument.LastKnownRelativeProjectPath">../MiniBrowser.xcodeproj</string>
-               <int key="IBDocument.defaultPropertyAccessControl">3</int>
-               <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-                       <bool key="EncodedWithXMLCoder">YES</bool>
-                       <object class="NSArray" key="dict.sortedKeys">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <string>NSGoLeftTemplate</string>
-                               <string>NSGoRightTemplate</string>
-                               <string>NSRefreshTemplate</string>
-                       </object>
-                       <object class="NSMutableArray" key="dict.values">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <string>{9, 9}</string>
-                               <string>{9, 9}</string>
-                               <string>{10, 12}</string>
-                       </object>
-               </object>
-       </data>
-</archive>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8068.4" systemVersion="14D136" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8068.4"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="BrowserWindowController">
+            <connections>
+                <outlet property="backButton" destination="40" id="46"/>
+                <outlet property="containerView" destination="9" id="37"/>
+                <outlet property="findPanelWindow" destination="70" id="77"/>
+                <outlet property="forwardButton" destination="42" id="47"/>
+                <outlet property="progressIndicator" destination="21" id="33"/>
+                <outlet property="reloadButton" destination="23" id="34"/>
+                <outlet property="toggleUseMinimumViewSizeButton" destination="82" id="FTZ-YK-Ae5"/>
+                <outlet property="toolbar" destination="48" id="67"/>
+                <outlet property="urlText" destination="10" id="32"/>
+                <outlet property="window" destination="1" id="3"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" frameAutosaveName="Main Window" animationBehavior="default" id="1">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" unifiedTitleAndToolbar="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="517" y="330" width="776" height="608"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
+            <view key="contentView" id="2">
+                <rect key="frame" x="0.0" y="0.0" width="776" height="608"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <customView id="9">
+                        <rect key="frame" x="0.0" y="0.0" width="776" height="608"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    </customView>
+                </subviews>
+            </view>
+            <toolbar key="toolbar" implicitIdentifier="994A0CB1-7575-4F39-A65B-7165AB1E8015" autosavesConfiguration="NO" displayMode="iconOnly" sizeMode="regular" id="48">
+                <allowedToolbarItems>
+                    <toolbarItem implicitItemIdentifier="73DE9F4B-73E2-4036-A134-2D9E029DA980" label="Go Back" paletteLabel="Go Back" image="NSGoLeftTemplate" id="56" customClass="MBToolbarItem">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="32" height="25"/>
+                        <size key="maxSize" width="32" height="25"/>
+                        <button key="view" verticalHuggingPriority="750" id="40">
+                            <rect key="frame" x="11" y="14" width="32" height="25"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSGoLeftTemplate" imagePosition="overlaps" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="41">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                        </button>
+                        <connections>
+                            <action selector="goBack:" target="-2" id="61"/>
+                        </connections>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="E1A9D32A-59E3-467B-9ABA-A95780416E69" label="Go Forward" paletteLabel="Go Forward" image="NSGoRightTemplate" id="57" customClass="MBToolbarItem">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="32" height="25"/>
+                        <size key="maxSize" width="32" height="25"/>
+                        <button key="view" verticalHuggingPriority="750" id="42">
+                            <rect key="frame" x="19" y="14" width="32" height="25"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSGoRightTemplate" imagePosition="overlaps" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="43">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                        </button>
+                        <connections>
+                            <action selector="goForward:" target="-2" id="62"/>
+                        </connections>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="88C16109-D40F-4682-BCE4-CBEE2EDE32D2" label="Refresh" paletteLabel="Refresh" image="NSRefreshTemplate" id="58" customClass="MBToolbarItem">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="29" height="25"/>
+                        <size key="maxSize" width="29" height="25"/>
+                        <button key="view" verticalHuggingPriority="750" id="23">
+                            <rect key="frame" x="10" y="14" width="29" height="25"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSRefreshTemplate" imagePosition="overlaps" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="24">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="reload:" target="-2" id="35"/>
+                            </connections>
+                        </button>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="76DCF2B0-1DDE-47D2-9212-705E6E310CCE" label="Use Minimum View Size" paletteLabel="Use Minimum View Size" image="NSEnterFullScreenTemplate" id="81" customClass="MBToolbarItem">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="29" height="25"/>
+                        <size key="maxSize" width="29" height="25"/>
+                        <button key="view" verticalHuggingPriority="750" id="82">
+                            <rect key="frame" x="19" y="14" width="29" height="25"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSEnterFullScreenTemplate" imagePosition="overlaps" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="83">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                        </button>
+                        <connections>
+                            <action selector="toggleUseMinimumViewSize:" target="-2" id="gZA-yS-7L4"/>
+                        </connections>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="6BDC61B7-F1A8-425A-A212-9CAC59C56385" label="Progress" paletteLabel="Progress" tag="-1" id="60">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="16" height="16"/>
+                        <size key="maxSize" width="16" height="16"/>
+                        <progressIndicator key="view" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="1" displayedWhenStopped="NO" bezeled="NO" controlSize="small" style="spinning" id="21">
+                            <rect key="frame" x="19" y="14" width="16" height="16"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+                        </progressIndicator>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB" label="Location" paletteLabel="Location" id="59">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="200" height="22"/>
+                        <size key="maxSize" width="800" height="22"/>
+                        <textField key="view" verticalHuggingPriority="750" id="10">
+                            <rect key="frame" x="0.0" y="14" width="565" height="22"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="11">
+                                <font key="font" metaFont="system"/>
+                                <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                            <connections>
+                                <action selector="fetch:" target="-2" id="36"/>
+                            </connections>
+                        </textField>
+                    </toolbarItem>
+                </allowedToolbarItems>
+                <defaultToolbarItems>
+                    <toolbarItem reference="56"/>
+                    <toolbarItem reference="57"/>
+                    <toolbarItem reference="58"/>
+                    <toolbarItem reference="81"/>
+                    <toolbarItem reference="59"/>
+                    <toolbarItem reference="60"/>
+                </defaultToolbarItems>
+            </toolbar>
+            <connections>
+                <outlet property="delegate" destination="-2" id="4"/>
+            </connections>
+        </window>
+        <window title="Find" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="70" customClass="NSPanel">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" utility="YES" nonactivatingPanel="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="230" y="479" width="452" height="62"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
+            <view key="contentView" id="71">
+                <rect key="frame" x="0.0" y="0.0" width="452" height="62"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <searchField verticalHuggingPriority="750" id="74">
+                        <rect key="frame" x="20" y="20" width="412" height="22"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" usesSingleLineMode="YES" bezelStyle="round" id="75">
+                            <font key="font" metaFont="system"/>
+                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </searchFieldCell>
+                        <connections>
+                            <action selector="find:" target="-2" id="76"/>
+                        </connections>
+                    </searchField>
+                </subviews>
+            </view>
+        </window>
+    </objects>
+    <resources>
+        <image name="NSEnterFullScreenTemplate" width="15" height="15"/>
+        <image name="NSGoLeftTemplate" width="9" height="12"/>
+        <image name="NSGoRightTemplate" width="9" height="12"/>
+        <image name="NSRefreshTemplate" width="11" height="15"/>
+    </resources>
+</document>
index 4bcde808816739ce810252c9dce7196efa457dfb..ad8502fd607dd3431457dd4b21fac486e4437917 100644 (file)
@@ -47,6 +47,8 @@
 
 - (IBAction)setScale:(id)sender;
 
+- (IBAction)toggleUseMinimumViewSize:(id)sender;
+
 - (IBAction)dumpSourceToConsole:(id)sender;
 - (IBAction)find:(id)sender;
 
@@ -62,6 +64,7 @@
     IBOutlet NSToolbar *toolbar;
     IBOutlet NSTextField *urlText;
     IBOutlet NSView *containerView;
+    IBOutlet NSButton *toggleUseMinimumViewSizeButton;
     
     IBOutlet NSWindow *findPanelWindow;
 
index 9f06f665913514d5bf528c597c52ba11b22844f1..d05ee95c3ebbcadfc4805d77ca8d3a695b4da0e2 100644 (file)
     _zoomTextOnly = !_zoomTextOnly;
 }
 
+- (IBAction)toggleUseMinimumViewSize:(id)sender
+{
+
+}
+
 - (IBAction)find:(id)sender
 {
 }
index 208b32dc243ad8e59a08bc7507cfb627a2d835dd..53b9723577ebdf83ce10fd5f4c6f3586523f8066 100644 (file)
@@ -47,6 +47,8 @@ static void* keyValueObservingContext = &keyValueObservingContext;
     WKWebView *_webView;
     BOOL _zoomTextOnly;
     BOOL _isPrivateBrowsingWindow;
+
+    BOOL _useMinimumViewSize;
 }
 
 - (void)awakeFromNib
@@ -235,6 +237,14 @@ static CGFloat viewScaleForMenuItemTag(NSInteger tag)
     return _zoomTextOnly ? (_webView._textZoomFactor != 1) : (_webView._pageZoomFactor != 1);
 }
 
+- (IBAction)toggleUseMinimumViewSize:(id)sender
+{
+    _useMinimumViewSize = !_useMinimumViewSize;
+    toggleUseMinimumViewSizeButton.image = _useMinimumViewSize ? [NSImage imageNamed:@"NSExitFullScreenTemplate"] : [NSImage imageNamed:@"NSEnterFullScreenTemplate"];
+    [_webView _setMinimumViewSize:CGSizeMake(1024, 0)];
+    [_webView _setLayoutMode:_useMinimumViewSize ? _WKLayoutModeDynamicSizeWithMinimumViewSize : _WKLayoutModeViewSize];
+}
+
 - (IBAction)dumpSourceToConsole:(id)sender
 {
 }