Title: [134347] trunk/Source/WebKit
Revision
134347
Author
[email protected]
Date
2012-11-12 20:05:18 -0800 (Mon, 12 Nov 2012)

Log Message

Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).

https://bugs.webkit.org/show_bug.cgi?id=102025

Reviewed by Joseph Pecoraro.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Added Dock.pdf.

Source/WebKit/mac:

* Resources/Dock.pdf: Added.
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindow _cursorForResizeDirection:]): Added.
(WebInspectorClient::didResizeMainFrame): Call attachAvailabilityChanged instead.
(WebInspectorFrontendClient::attachAvailabilityChanged): Added.
(-[WebInspectorWindowController window]): Create the dock button and add it.
(-[WebInspectorWindowController attachWindow:]): Added.
(-[WebInspectorWindowController attach]): Call setAttachedWindow.
(-[WebInspectorWindowController detach]): Ditto.
(-[WebInspectorWindowController setDockingUnavailable:]): Added. Update hidden state of the dock button.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (134346 => 134347)


--- trunk/Source/WebKit/ChangeLog	2012-11-13 04:05:09 UTC (rev 134346)
+++ trunk/Source/WebKit/ChangeLog	2012-11-13 04:05:18 UTC (rev 134347)
@@ -1,3 +1,13 @@
+2012-11-12  Timothy Hatcher  <[email protected]>
+
+        Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).
+
+        https://bugs.webkit.org/show_bug.cgi?id=102025
+
+        Reviewed by Joseph Pecoraro.
+
+        * WebKit.xcodeproj/project.pbxproj: Added Dock.pdf.
+
 2012-11-08  Laszlo Gombos  <[email protected]>
 
         [EFL] Remove non-variable options from the build system

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (134346 => 134347)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2012-11-13 04:05:09 UTC (rev 134346)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2012-11-13 04:05:18 UTC (rev 134347)
@@ -64,6 +64,7 @@
 		1C68F672095B5FC100C2984E /* WebNodeHighlightView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F666095B5FC100C2984E /* WebNodeHighlightView.mm */; };
 		1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C7B0C650EB2464D00A28502 /* WebInspectorClientCF.cpp */; };
 		1C8CB07A0AE9830C00B1F6E9 /* WebEditingDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8CB0790AE9830C00B1F6E9 /* WebEditingDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1C9F5EFC1651CDF700C480F8 /* Dock.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 1C9F5EFB1651CDF700C480F8 /* Dock.pdf */; };
 		1CCFFD130B1F81F2002EE926 /* OldWebAssertions.c in Sources */ = {isa = PBXBuildFile; fileRef = 1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */; };
 		224100F3091818D900D2D266 /* WebPluginsPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 224100F2091818D900D2D266 /* WebPluginsPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		224100F90918190100D2D266 /* WebPluginsPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = 224100F80918190100D2D266 /* WebPluginsPrivate.m */; };
@@ -438,6 +439,7 @@
 		1C904FD30BA9DD0F0081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
 		1C904FD40BA9DD0F0081E9D0 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
 		1C904FD50BA9DD0F0081E9D0 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
+		1C9F5EFB1651CDF700C480F8 /* Dock.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = Dock.pdf; sourceTree = "<group>"; };
 		1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = OldWebAssertions.c; sourceTree = "<group>"; };
 		224100F2091818D900D2D266 /* WebPluginsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		224100F80918190100D2D266 /* WebPluginsPrivate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebPluginsPrivate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -831,6 +833,7 @@
 		089C1665FE841158C02AAC07 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				1C9F5EFB1651CDF700C480F8 /* Dock.pdf */,
 				9325FBDC07D829AE00159862 /* IDNScriptWhiteList.txt */,
 				939811320824BF01008DF038 /* Info.plist */,
 				F5B67130023EDF8901C1A525 /* url_icon.tiff */,
@@ -1701,6 +1704,7 @@
 				939810B70824BF01008DF038 /* url_icon.tiff in Resources */,
 				939810B50824BF01008DF038 /* WebAuthenticationPanel.nib in Resources */,
 				5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib in Resources */,
+				1C9F5EFC1651CDF700C480F8 /* Dock.pdf in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/WebKit/mac/ChangeLog (134346 => 134347)


--- trunk/Source/WebKit/mac/ChangeLog	2012-11-13 04:05:09 UTC (rev 134346)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-11-13 04:05:18 UTC (rev 134347)
@@ -1,3 +1,23 @@
+2012-11-12  Timothy Hatcher  <[email protected]>
+
+        Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).
+
+        https://bugs.webkit.org/show_bug.cgi?id=102025
+
+        Reviewed by Joseph Pecoraro.
+
+        * Resources/Dock.pdf: Added.
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+        (-[WebInspectorWindow _cursorForResizeDirection:]): Added.
+        (WebInspectorClient::didResizeMainFrame): Call attachAvailabilityChanged instead.
+        (WebInspectorFrontendClient::attachAvailabilityChanged): Added.
+        (-[WebInspectorWindowController window]): Create the dock button and add it.
+        (-[WebInspectorWindowController attachWindow:]): Added.
+        (-[WebInspectorWindowController attach]): Call setAttachedWindow.
+        (-[WebInspectorWindowController detach]): Ditto.
+        (-[WebInspectorWindowController setDockingUnavailable:]): Added. Update hidden state of the dock button.
+
 2012-11-08  Timothy Hatcher  <[email protected]>
 
         Always use a textured window for the Web Inspector.

Added: trunk/Source/WebKit/mac/Resources/Dock.pdf (0 => 134347)


--- trunk/Source/WebKit/mac/Resources/Dock.pdf	                        (rev 0)
+++ trunk/Source/WebKit/mac/Resources/Dock.pdf	2012-11-13 04:05:18 UTC (rev 134347)
@@ -0,0 +1,88 @@
+%PDF-1.3
+%\xC4\xE5\xF2\xE5\xEB\xA7\xF3\xA0\xD0\xC4\xC6
+4 0 obj
+<< /Length 5 0 R /Filter /FlateDecode >>
+stream
+xU\x901n\xC40{\xBD\x82u
+\x85\x94II\xAC\xEF\xF7A\\x8A\x83\xFFdI\xE4\xE4v\xC1\xB5w\xB8+=\xE9NO\xE2\xDA\xE9\x8B\xDEo\xA7\xD0:\x89\xF39\xB5\xCAlӜD\xE9\x9BD\xAA\xBBb\xC4\xFB 9\xAAp\xF3T\xF1-\xA4\xB8\x95\x98_\xC6ֽ\x8C"i\xFA\xE0β	\x84m\x80\xE9
+-\x8C\x94˞\xA5O\xB6\xC3\xC0\xEC\xB5\xEB\xEFW\xB3\x80\xD3\xA5\xB6\xF3\xA2Ohw;|\xD2\xC4\xD1ZU\xB5n\xD1hTS\xE7f92{k-j%\xC1c\xCC\xF2H\xA1z\xD8쁚\xF5\x8E\x80ke\xF8q&f\xC5\xFF\xB8+\xA9f\xB0CH\xD8\xD4؇a.\xD1"vɿq@\xB2\x87\xF5\xBCo\xE0HS\xB4{m
+\xE0\xFF\xCA\xC7\xDDӵZ\xCB
+endstream
+endobj
+5 0 obj
+227
+endobj
+2 0 obj
+<< /Type /Page /Parent 3 0 R /Resources 6 0 R /Contents 4 0 R /MediaBox [0 0 14 14]
+>>
+endobj
+6 0 obj
+<< /ProcSet [ /PDF ] /ColorSpace << /Cs1 7 0 R >> >>
+endobj
+8 0 obj
+<< /Length 9 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >>
+stream
+x\xAD\x96gTT\xD7\xC7Ͻ\xD3m`\xE80\xF4\xDE;H\xEFMz\x95a\xE8e\x84\xA1#*"\xC1DP	U\xC1\xA8\xD4XQD	
+X\xD0\x94,\x80\x8Aʻk\x99\xAC\xB7^\xBE\xBD\xBD\xD6>\xE7w\xCE\xDE\xF7\xB4\xFD\xE1\xFE 91\xE3a>X)loGz`P07H\x80@\xCC\xE4DkOO7\xF0\xAF\xB62 n\xF0\x81w\xADM\xFB\xDF\xFE\xF0\x88d&\x90'Of& |aMf";\xE1?\x96OOID\xC6#,\xC8F\x88\xB0\x97\xA36Y\x9B\xCBa\x9Bl\xB7\x91\xE3\xEBm\x8B\xE4\x80'3\xEC(\x88\xE1\xC8<=\x8D\x85\xACC\xCCCX\x9B\xC3B\x98\xBB\x973\x9A\x81ĉVOH؅0\x89\x8E\xB0r\xD8?։\xFA3a\xDF\xD7d0\xA2\xBE\xF3\xE6]\x90/\x91\x8D\xEDb\x92\xE3\x99\x83\xFFg\x93\x9F\x8A\xBC׆q_\x9D\xC1\xF2\xF3Az\xC4%\x80-\xD8\xE2g:pCFv\xA4Dd w\xC0vWb&;&*:\x85n\x8DT)B\x9D\xEE\xCCbj\xAA\xD3u\xB5ut\xB7\xE6\xDC\xDE\x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La\xA6
+\x9E\xF1=+{.\xF1\xBC\xF6w\x95\xDF\xDB8\x86\x9C\xAB\xD3v\xD3C/|^<\x9Daμ\xFE#\xF9\x8F/\xB3y/)/\xCB\xE6\xA4\xE7\x9A\xE6u\xE7\xAF,8,\x8C\xBC\xDA\xF6j\xF6u\xE2\xEB\xB5\xC5\xFC?\xF9\xFF\xACz\xA3\xFC\xE6\xF2_V
+-.;e\xBF]W\xF4^\xF4}\xC3\xFD}˞\xCB\xCFWV\xD6V>\x8A~l\xFCd\xFCi\xE0s\xC0繵\xF4/\xB8/\xE5_U\xBE\xF6|s\xFD6\xB5\x9E\xB0\xBE\x9E\xC8`36\xB4
+i\xE1\xC8H\xDE5@	B\xB4\xC3\xA2\xB9x65\xD9F\xB4\xA9#\xE6*\xAEs\xED\xBFxS\xB7mDh\xB0\xC0/\xB7^N#\xAE\x800\xE9\xB9r\xD2\xD7
+\xC0zz\xDF\x99\xE1Zr\xA4\x9E\xEE@d6"M>\xAE\xAF\xBF\x97\xD7\xC0W\xF6\xFA\xFAک\xF5\xF5\xAFu\xA0Л\xB4\xA9\xB9\xD9X>\xCE\xF0pip\xB8(\x87\xDB\xFF\xD3\xFE\xBB\xB8\xA2
+endstream
+endobj
+9 0 obj
+2561
+endobj
+7 0 obj
+[ /ICCBased 8 0 R ]
+endobj
+3 0 obj
+<< /Type /Pages /MediaBox [0 0 14 14] /Count 1 /Kids [ 2 0 R ] >>
+endobj
+10 0 obj
+<< /Type /Catalog /Pages 3 0 R >>
+endobj
+11 0 obj
+(Mac OS X 10.8.2 Quartz PDFContext)
+endobj
+12 0 obj
+(D:20121113023024Z00'00')
+endobj
+1 0 obj
+<< /Producer 11 0 R /CreationDate 12 0 R /ModDate 12 0 R >>
+endobj
+xref
+0 13
+0000000000 65535 f 
+0000003454 00000 n 
+0000000342 00000 n 
+0000003229 00000 n 
+0000000022 00000 n 
+0000000323 00000 n 
+0000000444 00000 n 
+0000003194 00000 n 
+0000000512 00000 n 
+0000003174 00000 n 
+0000003310 00000 n 
+0000003360 00000 n 
+0000003412 00000 n 
+trailer
+<< /Size 13 /Root 10 0 R /Info 1 0 R /ID [ <72f7d5baa035dddcbdcfff169ed9325c>
+<72f7d5baa035dddcbdcfff169ed9325c> ] >>
+startxref
+3529
+%%EOF

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h (134346 => 134347)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h	2012-11-13 04:05:09 UTC (rev 134346)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h	2012-11-13 04:05:18 UTC (rev 134347)
@@ -90,6 +90,8 @@
 public:
     WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*, PassOwnPtr<Settings>);
 
+    void attachAvailabilityChanged(bool);
+
     virtual void frontendLoaded();
 
     virtual String localizedStringsURL();

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (134346 => 134347)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm	2012-11-13 04:05:09 UTC (rev 134346)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm	2012-11-13 04:05:18 UTC (rev 134347)
@@ -49,11 +49,38 @@
 
 SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL(WebInspector, PrivateFrameworks, A)
 
+// The margin from the top and right of the dock button (same as the full screen button).
+static const CGFloat dockButtonMargin = 3;
+
 using namespace WebCore;
 
+@interface NSWindow (AppKitDetails)
+- (NSCursor *)_cursorForResizeDirection:(NSInteger)direction;
+@end
+
+@interface WebInspectorWindow : NSWindow {
+@public
+    RetainPtr<NSButton> _dockButton;
+}
+@end
+
+@implementation WebInspectorWindow
+
+- (NSCursor *)_cursorForResizeDirection:(NSInteger)direction
+{
+    // Don't show a resize cursor for the northeast (top right) direction if the dock button is visible.
+    // This matches what happens when the full screen button is visible.
+    if (direction == 1 && ![_dockButton isHidden])
+        return nil;
+    return [super _cursorForResizeDirection:direction];
+}
+
+@end
+
 @interface WebInspectorWindowController : NSWindowController <NSWindowDelegate> {
 @private
     RetainPtr<WebView> _inspectedWebView;
+    RetainPtr<NSButton> _dockButton;
     WebView *_webView;
     WebInspectorFrontendClient* _frontendClient;
     WebInspectorClient* _inspectorClient;
@@ -72,6 +99,7 @@
 - (void)setInspectorClient:(WebInspectorClient*)inspectorClient;
 - (WebInspectorClient*)inspectorClient;
 - (void)setAttachedWindowHeight:(unsigned)height;
+- (void)setDockingUnavailable:(BOOL)unavailable;
 - (void)destroyInspectorView:(bool)notifyInspectorController;
 @end
 
@@ -120,7 +148,7 @@
 void WebInspectorClient::didResizeMainFrame(Frame*)
 {
     if (m_frontendClient)
-        m_frontendClient->setDockingUnavailable(!m_frontendClient->canAttachWindow());
+        m_frontendClient->attachAvailabilityChanged(m_frontendClient->canAttachWindow());
 }
 
 void WebInspectorClient::highlight()
@@ -147,6 +175,12 @@
     [windowController setFrontendClient:this];
 }
 
+void WebInspectorFrontendClient::attachAvailabilityChanged(bool available)
+{
+    setDockingUnavailable(!available);
+    [m_windowController.get() setDockingUnavailable:!available];
+}
+
 void WebInspectorFrontendClient::frontendLoaded()
 {
     [m_windowController.get() showWindow:nil];
@@ -332,18 +366,57 @@
 
 - (NSWindow *)window
 {
-    NSWindow *window = [super window];
+    WebInspectorWindow *window = (WebInspectorWindow *)[super window];
     if (window)
         return window;
 
     NSUInteger styleMask = (NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask | NSTexturedBackgroundWindowMask);
-    window = [[NSWindow alloc] initWithContentRect:NSMakeRect(60.0, 200.0, 750.0, 650.0) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO];
+    window = [[WebInspectorWindow alloc] initWithContentRect:NSMakeRect(60.0, 200.0, 750.0, 650.0) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO];
     [window setDelegate:self];
     [window setMinSize:NSMakeSize(400.0, 400.0)];
     [window setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge];
     [window setContentBorderThickness:55. forEdge:NSMaxYEdge];
     WKNSWindowMakeBottomCornersSquare(window);
 
+    // Create a full screen button so we can turn it into a dock button.
+    _dockButton = [NSWindow standardWindowButton:NSWindowFullScreenButton forStyleMask:styleMask];
+    _dockButton.get().target = self;
+    _dockButton.get().action = ""
+
+    // Store the dock button on the window too so it can check its visibility.
+    window->_dockButton = _dockButton;
+
+    // Get the dock image and make it a template so the button cell effects will apply.
+    NSImage *dockImage = [[NSBundle bundleForClass:[self class]] imageForResource:@"Dock"];
+    [dockImage setTemplate:YES];
+
+    // Set the dock image on the button cell.
+    NSCell *dockButtonCell = _dockButton.get().cell;
+    dockButtonCell.image = dockImage;
+
+    // Get the frame view, the superview of the content view, and its frame.
+    // This will be the superview of the dock button too.
+    NSView *contentView = window.contentView;
+    NSView *frameView = contentView.superview;
+    NSRect frameViewBounds = frameView.bounds;
+    NSSize dockButtonSize = _dockButton.get().frame.size;
+
+    ASSERT(!frameView.flipped);
+
+    // Position the dock button in the corner to match where the full screen button is normally.
+    NSPoint dockButtonOrigin;
+    dockButtonOrigin.x = NSMaxX(frameViewBounds) - dockButtonSize.width - dockButtonMargin;
+    dockButtonOrigin.y = NSMaxY(frameViewBounds) - dockButtonSize.height - dockButtonMargin;
+    _dockButton.get().frameOrigin = dockButtonOrigin;
+
+    // Set the autoresizing mask to keep the dock button pinned to the top right corner.
+    _dockButton.get().autoresizingMask = NSViewMinXMargin | NSViewMinYMargin;
+
+    [frameView addSubview:_dockButton.get()];
+
+    // Hide the dock button if we can't attach.
+    _dockButton.get().hidden = !_frontendClient->canAttachWindow();
+
     [self setWindow:window];
     [window release];
 
@@ -388,6 +461,11 @@
         [super close];
 }
 
+- (IBAction)attachWindow:(id)sender
+{
+    _frontendClient->attachWindow();
+}
+
 - (IBAction)showWindow:(id)sender
 {
     if (_visible) {
@@ -435,6 +513,7 @@
         return;
 
     _inspectorClient->setInspectorStartsAttached(true);
+    _frontendClient->setAttachedWindow(true);
 
     [self close];
     [self showWindow:nil];
@@ -446,6 +525,7 @@
         return;
 
     _inspectorClient->setInspectorStartsAttached(false);
+    _frontendClient->setAttachedWindow(false);
 
     [self close];
     [self showWindow:nil];
@@ -489,6 +569,11 @@
     [frameView setFrame:frameViewRect];
 }
 
+- (void)setDockingUnavailable:(BOOL)unavailable
+{
+    _dockButton.get().hidden = unavailable;
+}
+
 - (void)destroyInspectorView:(bool)notifyInspectorController
 {
     [[_inspectedWebView.get() inspector] releaseFrontend];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to