Title: [134471] trunk/Source
- Revision
- 134471
- Author
- [email protected]
- Date
- 2012-11-13 13:10:37 -0800 (Tue, 13 Nov 2012)
Log Message
Adjust the Web Inspector window title frame if needed to prevent it from intersecting the dock button.
https://bugs.webkit.org/show_bug.cgi?id=102073
Reviewed by Joseph Pecoraro.
Source/WebKit/mac:
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindow _customTitleFrame]): Added. Adjust the title frame.
Source/WebKit2:
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorWindow _customTitleFrame]): Added. Adjust the title frame.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (134470 => 134471)
--- trunk/Source/WebKit/mac/ChangeLog 2012-11-13 21:04:25 UTC (rev 134470)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-11-13 21:10:37 UTC (rev 134471)
@@ -1,3 +1,14 @@
+2012-11-13 Timothy Hatcher <[email protected]>
+
+ Adjust the Web Inspector window title frame if needed to prevent it from intersecting the dock button.
+
+ https://bugs.webkit.org/show_bug.cgi?id=102073
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindow _customTitleFrame]): Added. Adjust the title frame.
+
2012-11-12 Simon Fraser <[email protected]>
Build fix after r134346 and 134347.
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (134470 => 134471)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm 2012-11-13 21:04:25 UTC (rev 134470)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm 2012-11-13 21:10:37 UTC (rev 134471)
@@ -56,6 +56,7 @@
@interface NSWindow (AppKitDetails)
- (NSCursor *)_cursorForResizeDirection:(NSInteger)direction;
+- (NSRect)_customTitleFrame;
@end
@interface WebInspectorWindow : NSWindow {
@@ -75,6 +76,16 @@
return [super _cursorForResizeDirection:direction];
}
+- (NSRect)_customTitleFrame
+{
+ // Adjust the title frame if needed to prevent it from intersecting the dock button.
+ NSRect titleFrame = [super _customTitleFrame];
+ NSRect dockButtonFrame = _dockButton.get().frame;
+ if (NSMaxX(titleFrame) > NSMinX(dockButtonFrame) - dockButtonMargin)
+ titleFrame.size.width -= (NSMaxX(titleFrame) - NSMinX(dockButtonFrame)) + dockButtonMargin;
+ return titleFrame;
+}
+
@end
@interface WebInspectorWindowController : NSWindowController <NSWindowDelegate> {
Modified: trunk/Source/WebKit2/ChangeLog (134470 => 134471)
--- trunk/Source/WebKit2/ChangeLog 2012-11-13 21:04:25 UTC (rev 134470)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-13 21:10:37 UTC (rev 134471)
@@ -1,3 +1,14 @@
+2012-11-13 Timothy Hatcher <[email protected]>
+
+ Adjust the Web Inspector window title frame if needed to prevent it from intersecting the dock button.
+
+ https://bugs.webkit.org/show_bug.cgi?id=102073
+
+ Reviewed by Joseph Pecoraro.
+
+ * UIProcess/mac/WebInspectorProxyMac.mm:
+ (-[WKWebInspectorWindow _customTitleFrame]): Added. Adjust the title frame.
+
2012-11-13 Anders Carlsson <[email protected]>
Store layer positions and sizes in the transaction
Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (134470 => 134471)
--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm 2012-11-13 21:04:25 UTC (rev 134470)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm 2012-11-13 21:10:37 UTC (rev 134471)
@@ -127,6 +127,7 @@
@interface NSWindow (AppKitDetails)
- (NSCursor *)_cursorForResizeDirection:(NSInteger)direction;
+- (NSRect)_customTitleFrame;
@end
@interface WKWebInspectorWindow : NSWindow {
@@ -146,6 +147,16 @@
return [super _cursorForResizeDirection:direction];
}
+- (NSRect)_customTitleFrame
+{
+ // Adjust the title frame if needed to prevent it from intersecting the dock button.
+ NSRect titleFrame = [super _customTitleFrame];
+ NSRect dockButtonFrame = _dockButton.get().frame;
+ if (NSMaxX(titleFrame) > NSMinX(dockButtonFrame) - dockButtonMargin)
+ titleFrame.size.width -= (NSMaxX(titleFrame) - NSMinX(dockButtonFrame)) + dockButtonMargin;
+ return titleFrame;
+}
+
@end
namespace WebKit {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes