Reviewed by Adam Roben.
Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
http://bugs.webkit.org/show_bug.cgi?id=16137
On Leopard the toolbar background will be transparent, to allow the
window background to show through the transparent WebView. The
search results divs needed to move inside the "main" div, so they
would be clipped and not show where the toolbar is.
* page/InspectorController.cpp:
(WebCore::platform): Return a string for which platform we are.
(WebCore::InspectorController::windowScriptObjectAvailable):
Define the platform function on the JavaScript class.
* page/inspector/Panel.js: Add panels to the panels div.
* page/inspector/inspector.css: On the Leopard platform make
the toolbar background transparent so the window background shows.
* page/inspector/inspector.html: Add a panels div and move search
result divs inside the main div.
* page/inspector/inspector.js: Tweak the resize code to acount for
the search results divs moving inside the main div.
WebKit/mac:
Reviewed by Adam Roben.
Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
http://bugs.webkit.org/show_bug.cgi?id=16137
Create the Web Inspector window with the textured style. Set the content border
thickness for the top of the window or the height of the toolbar. Also make the
window's bottom corners square, since a normal textured window normally has
rounded bottom corners.
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController window]):
WebKitLibraries:
Reviewed by Adam Roben.
Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
http://bugs.webkit.org/show_bug.cgi?id=16137
Add a new function to make bottom window corners square for textured windows.
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceTiger.a:
* libWebKitSystemInterfaceLeopard.a:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28039
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
+ http://bugs.webkit.org/show_bug.cgi?id=16137
+
+ On Leopard the toolbar background will be transparent, to allow the
+ window background to show through the transparent WebView. The
+ search results divs needed to move inside the "main" div, so they
+ would be clipped and not show where the toolbar is.
+
+ * page/InspectorController.cpp:
+ (WebCore::platform): Return a string for which platform we are.
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ Define the platform function on the JavaScript class.
+ * page/inspector/Panel.js: Add panels to the panels div.
+ * page/inspector/inspector.css: On the Leopard platform make
+ the toolbar background transparent so the window background shows.
+ * page/inspector/inspector.html: Add a panels div and move search
+ result divs inside the main div.
+ * page/inspector/inspector.js: Tweak the resize code to acount for
+ the search results divs moving inside the main div.
+
2007-11-25 Rodney Dawes <dobey@wayofthemonkey.com>
Reviewed by Maciej Stachowiak.
#include "kjs_window.h"
#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/JSLock.h>
+#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
namespace WebCore {
return urlValue;
}
+static JSValueRef platform(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments[]*/, JSValueRef* /*exception*/)
+{
+#if PLATFORM(MAC)
+#ifdef BUILDING_ON_TIGER
+ static const String platform = "mac-tiger";
+#else
+ static const String platform = "mac-leopard";
+#endif
+#elif PLATFORM(WIN_OS)
+ static const String platform = "windows";
+#elif PLATFORM(QT)
+ static const String platform = "qt";
+#elif PLATFORM(GTK)
+ static const String platform = "gtk";
+#elif PLATFORM(WX)
+ static const String platform = "wx";
+#else
+ static const String platform = "unknown";
+#endif
+
+ JSRetainPtr<JSStringRef> platformString(Adopt, JSStringCreateWithCharacters(platform.characters(), platform.length()));
+ JSValueRef platformValue = JSValueMakeString(ctx, platformString.get());
+
+ return platformValue;
+}
+
InspectorController::InspectorController(Page* page, InspectorClient* client)
: m_inspectedPage(page)
, m_client(client)
#endif
{ "inspectedWindow", inspectedWindow, kJSPropertyAttributeNone },
{ "localizedStringsURL", localizedStrings, kJSPropertyAttributeNone },
+ { "platform", platform, kJSPropertyAttributeNone },
{ 0, 0, 0 }
};
attach: function()
{
- document.getElementById("main").appendChild(this.element);
+ document.getElementById("panels").appendChild(this.element);
},
detach: function()
left: 0;
right: 0;
height: 28px;
- background: rgb(245, 245, 250);
+ background-color: rgb(245, 245, 250);
background-image: url(Images/toolbarBackground.png);
background-repeat: repeat-x;
background-position: top;
-webkit-background-size: auto 135%;
}
+.platform-mac-leopard #toolbar {
+ background: transparent !important;
+}
+
body.inactive #toolbar {
background-image: url(Images/toolbarBackgroundInactive.png);
border-bottom: 1px solid rgb(64%, 64%, 64%);
#searchResults {
position: absolute;
- top: -73px;
- left: 200px;
+ top: -100px;
+ left: 0;
right: 0;
height: 100px;
z-index: -1;
border-bottom: 1px solid rgb(180, 180, 180);
overflow-y: auto;
overflow-x: hidden;
+ -webkit-box-sizing: border-box;
}
.search-results-section {
z-index: -100;
}
+#panels {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: hidden;
+ z-index: -100;
+}
+
.panel {
display: none;
overflow: hidden;
#searchResultsResizer {
position: absolute;
height: 5px;
- left: 200px;
+ left: 0;
right: 0;
cursor: row-resize;
}
</div>
<div id="sidebarResizer" class="sidebar-resizer-vertical sidebar-resizer-vertical-left"></div>
</div>
- <div id="searchResults" class="focusable"></div>
- <div id="searchResultsResizer" style="display: none"></div>
- <div id="main" class="focusable blurred"></div>
+ <div id="main" class="focusable blurred">
+ <div id="searchResults" class="focusable hidden"></div>
+ <div id="searchResultsResizer" class="hidden"></div>
+ <div id="panels"></div>
+ </div>
</body>
</html>
maxInlineTextChildLength: 80,
maxTextSearchResultLength: 80,
showInheritedComputedStyleProperties: false,
- showMissingLocalizedStrings: false,
- toolbarHeight: 28
+ showMissingLocalizedStrings: false
}
var WebInspector = {
var searchResultsResizer = document.getElementById("searchResultsResizer");
if (x) {
- searchResultsResizer.style.display = null;
+ resultsContainer.removeStyleClass("hidden");
+ searchResultsResizer.removeStyleClass("hidden");
+
var animations = [
- {element: resultsContainer, end: {top: Preferences.toolbarHeight}},
- {element: searchResultsResizer, end: {top: WebInspector.searchResultsHeight + Preferences.toolbarHeight - 2}},
- {element: document.getElementById("main"), end: {top: WebInspector.searchResultsHeight + Preferences.toolbarHeight + 1}}
+ {element: resultsContainer, end: {top: 0}},
+ {element: searchResultsResizer, end: {top: WebInspector.searchResultsHeight - 3}},
+ {element: document.getElementById("panels"), end: {top: WebInspector.searchResultsHeight}}
];
+
WebInspector.animateStyle(animations, 250);
} else {
- searchResultsResizer.style.display = "none";
+ searchResultsResizer.addStyleClass("hidden");
+
var animations = [
- {element: resultsContainer, end: {top: Preferences.toolbarHeight - WebInspector.searchResultsHeight - 1}},
+ {element: resultsContainer, end: {top: -WebInspector.searchResultsHeight}},
{element: searchResultsResizer, end: {top: 0}},
- {element: document.getElementById("main"), end: {top: Preferences.toolbarHeight}}
+ {element: document.getElementById("panels"), end: {top: 0}}
];
- WebInspector.animateStyle(animations, 250, function() { resultsContainer.removeChildren(); delete this.searchResultsTree; });
+
+ var animationFinished = function()
+ {
+ resultsContainer.addStyleClass("hidden");
+ resultsContainer.removeChildren();
+ delete this.searchResultsTree;
+ };
+
+ WebInspector.animateStyle(animations, 250, animationFinished);
}
}
}
WebInspector.loaded = function()
{
+ document.body.addStyleClass("platform-" + InspectorController.platform());
+
this.fileOutline = new TreeOutline(document.getElementById("list"));
this.fileOutline.expandTreeElementsWhenArrowing = true;
document.getElementById("sidebarResizer").style.left = (newWidth - 3) + "px";
document.getElementById("main").style.left = newWidth + "px";
document.getElementById("toolbarButtons").style.left = newWidth + "px";
- document.getElementById("searchResults").style.left = newWidth + "px";
- document.getElementById("searchResultsResizer").style.left = newWidth + "px";
if (WebInspector.currentPanel && WebInspector.currentPanel.resize)
WebInspector.currentPanel.resize();
{
var searchResults = document.getElementById("searchResults");
if (searchResults.dragging == true) {
- var y = event.clientY;
+ var y = event.clientY - document.getElementById("main").offsetTop;
var newHeight = Number.constrain(y, 100, window.innerHeight - 100);
if (y == newHeight)
searchResults.dragLastY = y;
- WebInspector.searchResultsHeight = newHeight - Preferences.toolbarHeight;
+ WebInspector.searchResultsHeight = newHeight;
searchResults.style.height = WebInspector.searchResultsHeight + "px";
- document.getElementById("main").style.top = (newHeight + 1) + "px";
- document.getElementById("searchResultsResizer").style.top = (newHeight - 2) + "px";
+ document.getElementById("panels").style.top = newHeight + "px";
+ document.getElementById("searchResultsResizer").style.top = (newHeight - 3) + "px";
event.preventDefault();
}
}
+2007-11-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
+ http://bugs.webkit.org/show_bug.cgi?id=16137
+
+ Create the Web Inspector window with the textured style. Set the content border
+ thickness for the top of the window or the height of the toolbar. Also make the
+ window's bottom corners square, since a normal textured window normally has
+ rounded bottom corners.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController window]):
+
2007-11-24 Mark Rowe <mrowe@apple.com>
Tiger build fix.
#import "WebLocalizableStrings.h"
#import "WebNodeHighlight.h"
#import "WebPreferences.h"
+#import "WebTypesInternal.h"
#import "WebView.h"
#import "WebViewInternal.h"
#import "WebViewPrivate.h"
#import <WebKit/DOMCore.h>
#import <WebKit/DOMExtensions.h>
+#import <WebKitSystemInterface.h>
+
using namespace WebCore;
@interface WebInspectorWindowController : NSWindowController {
if (window)
return window;
- window = [[NSWindow alloc] initWithContentRect:NSMakeRect(60.0, 200.0, 750.0, 650.0)
- styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask) backing:NSBackingStoreBuffered defer:YES];
+ NSUInteger styleMask = (NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask);
+
+#ifndef BUILDING_ON_TIGER
+ styleMask |= NSTexturedBackgroundWindowMask;
+#endif
+
+ window = [[NSWindow alloc] initWithContentRect:NSMakeRect(60.0, 200.0, 750.0, 650.0) styleMask:styleMask backing:NSBackingStoreBuffered defer:YES];
[window setDelegate:self];
[window setMinSize:NSMakeSize(400.0, 400.0)];
+#ifndef BUILDING_ON_TIGER
+ [window setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge];
+ [window setContentBorderThickness:40. forEdge:NSMaxYEdge];
+
+ WKNSWindowMakeBottomCornersSquare(window);
+#endif
+
[self setWindow:window];
[window release];
+2007-11-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
+ http://bugs.webkit.org/show_bug.cgi?id=16137
+
+ Add a new function to make bottom window corners square for textured windows.
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceTiger.a:
+ * libWebKitSystemInterfaceLeopard.a:
+
2007-11-23 Adam Roben <aroben@apple.com>
Add wkSetPatternPhaseInUserSpace to WebKitSystemInterface on Windows
CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
+void WKNSWindowMakeBottomCornersSquare(NSWindow *);
+
BOOL WKSupportsMultipartXMixedReplace(NSMutableURLRequest *request);
NSString* WKPathFromFont(NSFont *font);