Title: [110403] trunk/Source/WebKit
- Revision
- 110403
- Author
- [email protected]
- Date
- 2012-03-11 18:14:09 -0700 (Sun, 11 Mar 2012)
Log Message
Update how the Web Inspector resources are loaded.
https://bugs.webkit.org/show_bug.cgi?id=80798
rdar://problem/10359959
Reviewed by Brian Weinstein.
Source/WebKit:
* WebKit.xcodeproj/project.pbxproj: Add a framework.
Source/WebKit/mac:
* WebCoreSupport/WebInspectorClient.mm:
(useWebKitWebInspector): Return if we are using the WebCore resources for compatibility
with local and nightly builds.
(WebInspectorFrontendClient::localizedStringsURL): Decide what path to use.
(-[WebInspectorWindowController init]): Ditto.
(-[WebInspectorWindowController window]): Decide if the window is textured or not.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (110402 => 110403)
--- trunk/Source/WebKit/ChangeLog 2012-03-12 00:40:43 UTC (rev 110402)
+++ trunk/Source/WebKit/ChangeLog 2012-03-12 01:14:09 UTC (rev 110403)
@@ -1,3 +1,14 @@
+2012-03-11 Timothy Hatcher <[email protected]>
+
+ Update how the Web Inspector resources are loaded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=80798
+ rdar://problem/10359959
+
+ Reviewed by Brian Weinstein.
+
+ * WebKit.xcodeproj/project.pbxproj: Add a framework.
+
2012-03-06 Raphael Kubo da Costa <[email protected]>
[CMake] Make the removal of transitive library dependencies work with CMake < 2.8.7.
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (110402 => 110403)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2012-03-12 00:40:43 UTC (rev 110402)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2012-03-12 01:14:09 UTC (rev 110403)
@@ -67,6 +67,7 @@
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, ); }; };
1CCFFD130B1F81F2002EE926 /* OldWebAssertions.c in Sources */ = {isa = PBXBuildFile; fileRef = 1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */; };
+ 1CE90729150D5DF0008B4AF7 /* WebInspector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CE90728150D5DF0008B4AF7 /* WebInspector.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
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 */; };
225F881509F97E8A00423A40 /* WebPluginPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 225F881409F97E8A00423A40 /* WebPluginPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -448,6 +449,7 @@
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>"; };
1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = OldWebAssertions.c; sourceTree = "<group>"; };
+ 1CE90728150D5DF0008B4AF7 /* WebInspector.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebInspector.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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; };
225F881409F97E8A00423A40 /* WebPluginPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginPrivate.h; sourceTree = "<group>"; };
@@ -785,6 +787,7 @@
1A20D08B0ED384F20043FA9F /* QuartzCore.framework in Frameworks */,
9398112F0824BF01008DF038 /* Security.framework in Frameworks */,
9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */,
+ 1CE90729150D5DF0008B4AF7 /* WebInspector.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -840,6 +843,7 @@
1A20D08A0ED384F20043FA9F /* QuartzCore.framework */,
830E81E005853AC000AD0891 /* Security.framework */,
F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */,
+ 1CE90728150D5DF0008B4AF7 /* WebInspector.framework */,
);
name = "Frameworks and Libraries";
sourceTree = "<group>";
Modified: trunk/Source/WebKit/mac/ChangeLog (110402 => 110403)
--- trunk/Source/WebKit/mac/ChangeLog 2012-03-12 00:40:43 UTC (rev 110402)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-03-12 01:14:09 UTC (rev 110403)
@@ -1,3 +1,19 @@
+2012-03-11 Timothy Hatcher <[email protected]>
+
+ Update how the Web Inspector resources are loaded.
+
+ https://bugs.webkit.org/show_bug.cgi?id=80798
+ rdar://problem/10359959
+
+ Reviewed by Brian Weinstein.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (useWebKitWebInspector): Return if we are using the WebCore resources for compatibility
+ with local and nightly builds.
+ (WebInspectorFrontendClient::localizedStringsURL): Decide what path to use.
+ (-[WebInspectorWindowController init]): Ditto.
+ (-[WebInspectorWindowController window]): Decide if the window is textured or not.
+
2012-03-09 Jon Lee <[email protected]>
Rename NotificationPresenter to NotificationClient
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (110402 => 110403)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm 2012-03-12 00:40:43 UTC (rev 110402)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm 2012-03-12 01:14:09 UTC (rev 110403)
@@ -160,10 +160,17 @@
setAttachedWindow(attached);
}
+static bool useWebKitWebInspector()
+{
+ return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseWebKitWebInspector"] ||
+ ![[NSBundle bundleWithIdentifier:@"com.apple.WebInspector"] pathForResource:@"Main" ofType:@"html"];
+}
+
String WebInspectorFrontendClient::localizedStringsURL()
{
- NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"localizedStrings" ofType:@"js"];
- if (path)
+ NSBundle *bundle = useWebKitWebInspector() ? [NSBundle bundleWithIdentifier:@"com.apple.WebCore"] : [NSBundle bundleWithIdentifier:@"com.apple.WebInspector"];
+ NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"];
+ if ([path length])
return [[NSURL fileURLWithPath:path] absoluteString];
return String();
}
@@ -258,7 +265,14 @@
[preferences release];
- NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"];
+ NSString *path;
+ if (useWebKitWebInspector())
+ path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"inspector" ofType:@"html" inDirectory:@"inspector"];
+ else
+ path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspector"] pathForResource:@"Main" ofType:@"html"];
+
+ ASSERT([path length]);
+
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL fileURLWithPath:path]];
[[_webView mainFrame] loadRequest:request];
[request release];
@@ -295,19 +309,23 @@
if (window)
return window;
+ bool useTexturedWindow = useWebKitWebInspector();
+
NSUInteger styleMask = (NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask);
- styleMask |= NSTexturedBackgroundWindowMask;
+ if (useTexturedWindow)
+ styleMask |= NSTexturedBackgroundWindowMask;
window = [[NSWindow 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];
+ if (useTexturedWindow) {
+ [window setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge];
+ [window setContentBorderThickness:55. forEdge:NSMaxYEdge];
+ WKNSWindowMakeBottomCornersSquare(window);
+ }
- WKNSWindowMakeBottomCornersSquare(window);
-
[self setWindow:window];
[window release];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes