https://webkit.org/b/76769
Reviewed by Dan Bernstein.
* Shared/WebPreferencesStore.h: Added InspectorAttachedHeight.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::setAttachedWindowHeight): Call WebPreferencesStore::setInspectorAttachedHeight.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformAttach): Set the height of the inspector's WKView to inspectorAttachedHeight.
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Remove unneeded setNeedsDisplay: calls.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105571
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-21 Timothy Hatcher <timothy@apple.com>
+
+ Make WebKit2 remember the height of the Web Inspector when it is docked.
+
+ https://webkit.org/b/76769
+
+ Reviewed by Dan Bernstein.
+
+ * Shared/WebPreferencesStore.h: Added InspectorAttachedHeight.
+ * UIProcess/WebInspectorProxy.cpp:
+ (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call WebPreferencesStore::setInspectorAttachedHeight.
+ * UIProcess/mac/WebInspectorProxyMac.mm:
+ (WebKit::WebInspectorProxy::platformAttach): Set the height of the inspector's WKView to inspectorAttachedHeight.
+ (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Remove unneeded setNeedsDisplay: calls.
+
2012-01-20 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Division by zero error in QtViewportInteractionEngine::setItemRectVisible
macro(DeviceHeight, deviceHeight, UInt32, uint32_t, 854) \
macro(PDFDisplayMode, pdfDisplayMode, UInt32, uint32_t, 1) \
macro(EditableLinkBehavior, editableLinkBehavior, UInt32, uint32_t, WebCore::EditableLinkNeverLive) \
+ macro(InspectorAttachedHeight, inspectorAttachedHeight, UInt32, uint32_t, 300) \
\
#if PLATFORM(WIN)
void WebInspectorProxy::setAttachedWindowHeight(unsigned height)
{
+ inspectorPageGroup()->preferences()->setInspectorAttachedHeight(height);
platformSetAttachedWindowHeight(height);
}
#import "WebContext.h"
#import "WKInspectorMac.h"
#import "WKViewPrivate.h"
+#import "WebPageGroup.h"
#import "WebPageProxy.h"
+#import "WebPreferences.h"
#import "WebProcessProxy.h"
#import <WebKitSystemInterface.h>
#import <WebCore/InspectorFrontendClientLocal.h>
[m_inspectorView.get() removeFromSuperview];
+ // The inspector view shares the width and the left starting point of the inspected view.
+ NSRect inspectedViewFrame = [inspectedView frame];
+ [m_inspectorView.get() setFrame:NSMakeRect(NSMinX(inspectedViewFrame), 0, NSWidth(inspectedViewFrame), inspectorPageGroup()->preferences()->inspectorAttachedHeight())];
+
[[inspectedView superview] addSubview:m_inspectorView.get() positioned:NSWindowBelow relativeTo:inspectedView];
[m_inspectorWindow.get() orderOut:nil];
[m_inspectorView.get() setFrame:NSMakeRect(NSMinX(inspectedViewFrame), 0.0, NSWidth(inspectedViewFrame), height)];
inspectedViewFrameDidChange();
-
- [m_inspectorView.get() setNeedsDisplay:YES];
- [inspectedView setNeedsDisplay:YES];
}
String WebInspectorProxy::inspectorPageURL() const