Changeset 28039 in webkit
- Timestamp:
- Nov 26, 2007 9:17:50 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r28029 r28039 1 2007-11-26 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title 6 http://bugs.webkit.org/show_bug.cgi?id=16137 7 8 On Leopard the toolbar background will be transparent, to allow the 9 window background to show through the transparent WebView. The 10 search results divs needed to move inside the "main" div, so they 11 would be clipped and not show where the toolbar is. 12 13 * page/InspectorController.cpp: 14 (WebCore::platform): Return a string for which platform we are. 15 (WebCore::InspectorController::windowScriptObjectAvailable): 16 Define the platform function on the JavaScript class. 17 * page/inspector/Panel.js: Add panels to the panels div. 18 * page/inspector/inspector.css: On the Leopard platform make 19 the toolbar background transparent so the window background shows. 20 * page/inspector/inspector.html: Add a panels div and move search 21 result divs inside the main div. 22 * page/inspector/inspector.js: Tweak the resize code to acount for 23 the search results divs moving inside the main div. 24 1 25 2007-11-25 Rodney Dawes <dobey@wayofthemonkey.com> 2 26 -
trunk/WebCore/page/InspectorController.cpp
r27937 r28039 62 62 #include <JavaScriptCore/APICast.h> 63 63 #include <JavaScriptCore/JSLock.h> 64 #include <JavaScriptCore/JSRetainPtr.h> 64 65 #include <JavaScriptCore/JSStringRef.h> 65 66 … … 544 545 } 545 546 547 static JSValueRef platform(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments[]*/, JSValueRef* /*exception*/) 548 { 549 #if PLATFORM(MAC) 550 #ifdef BUILDING_ON_TIGER 551 static const String platform = "mac-tiger"; 552 #else 553 static const String platform = "mac-leopard"; 554 #endif 555 #elif PLATFORM(WIN_OS) 556 static const String platform = "windows"; 557 #elif PLATFORM(QT) 558 static const String platform = "qt"; 559 #elif PLATFORM(GTK) 560 static const String platform = "gtk"; 561 #elif PLATFORM(WX) 562 static const String platform = "wx"; 563 #else 564 static const String platform = "unknown"; 565 #endif 566 567 JSRetainPtr<JSStringRef> platformString(Adopt, JSStringCreateWithCharacters(platform.characters(), platform.length())); 568 JSValueRef platformValue = JSValueMakeString(ctx, platformString.get()); 569 570 return platformValue; 571 } 572 546 573 InspectorController::InspectorController(Page* page, InspectorClient* client) 547 574 : m_inspectedPage(page) … … 735 762 { "inspectedWindow", inspectedWindow, kJSPropertyAttributeNone }, 736 763 { "localizedStringsURL", localizedStrings, kJSPropertyAttributeNone }, 764 { "platform", platform, kJSPropertyAttributeNone }, 737 765 { 0, 0, 0 } 738 766 }; -
trunk/WebCore/page/inspector/Panel.js
r27893 r28039 117 117 attach: function() 118 118 { 119 document.getElementById(" main").appendChild(this.element);119 document.getElementById("panels").appendChild(this.element); 120 120 }, 121 121 -
trunk/WebCore/page/inspector/inspector.css
r27979 r28039 59 59 right: 0; 60 60 height: 28px; 61 background : rgb(245, 245, 250);61 background-color: rgb(245, 245, 250); 62 62 background-image: url(Images/toolbarBackground.png); 63 63 background-repeat: repeat-x; … … 67 67 -webkit-box-sizing: border-box; 68 68 -webkit-background-size: auto 135%; 69 } 70 71 .platform-mac-leopard #toolbar { 72 background: transparent !important; 69 73 } 70 74 … … 238 242 #searchResults { 239 243 position: absolute; 240 top: - 73px;241 left: 200px;244 top: -100px; 245 left: 0; 242 246 right: 0; 243 247 height: 100px; … … 247 251 overflow-y: auto; 248 252 overflow-x: hidden; 253 -webkit-box-sizing: border-box; 249 254 } 250 255 … … 669 674 } 670 675 676 #panels { 677 position: absolute; 678 top: 0; 679 left: 0; 680 right: 0; 681 bottom: 0; 682 overflow: hidden; 683 z-index: -100; 684 } 685 671 686 .panel { 672 687 display: none; … … 2000 2015 position: absolute; 2001 2016 height: 5px; 2002 left: 200px;2017 left: 0; 2003 2018 right: 0; 2004 2019 cursor: row-resize; -
trunk/WebCore/page/inspector/inspector.html
r28002 r28039 67 67 <div id="sidebarResizer" class="sidebar-resizer-vertical sidebar-resizer-vertical-left"></div> 68 68 </div> 69 <div id="searchResults" class="focusable"></div> 70 <div id="searchResultsResizer" style="display: none"></div> 71 <div id="main" class="focusable blurred"></div> 69 <div id="main" class="focusable blurred"> 70 <div id="searchResults" class="focusable hidden"></div> 71 <div id="searchResultsResizer" class="hidden"></div> 72 <div id="panels"></div> 73 </div> 72 74 </body> 73 75 </html> -
trunk/WebCore/page/inspector/inspector.js
r28004 r28039 34 34 maxTextSearchResultLength: 80, 35 35 showInheritedComputedStyleProperties: false, 36 showMissingLocalizedStrings: false, 37 toolbarHeight: 28 36 showMissingLocalizedStrings: false 38 37 } 39 38 … … 192 191 193 192 if (x) { 194 searchResultsResizer.style.display = null; 193 resultsContainer.removeStyleClass("hidden"); 194 searchResultsResizer.removeStyleClass("hidden"); 195 195 196 var animations = [ 196 {element: resultsContainer, end: {top: Preferences.toolbarHeight}},197 {element: searchResultsResizer, end: {top: WebInspector.searchResultsHeight + Preferences.toolbarHeight - 2}},198 {element: document.getElementById(" main"), end: {top: WebInspector.searchResultsHeight + Preferences.toolbarHeight + 1}}197 {element: resultsContainer, end: {top: 0}}, 198 {element: searchResultsResizer, end: {top: WebInspector.searchResultsHeight - 3}}, 199 {element: document.getElementById("panels"), end: {top: WebInspector.searchResultsHeight}} 199 200 ]; 201 200 202 WebInspector.animateStyle(animations, 250); 201 203 } else { 202 searchResultsResizer.style.display = "none"; 204 searchResultsResizer.addStyleClass("hidden"); 205 203 206 var animations = [ 204 {element: resultsContainer, end: {top: Preferences.toolbarHeight - WebInspector.searchResultsHeight - 1}},207 {element: resultsContainer, end: {top: -WebInspector.searchResultsHeight}}, 205 208 {element: searchResultsResizer, end: {top: 0}}, 206 {element: document.getElementById(" main"), end: {top: Preferences.toolbarHeight}}209 {element: document.getElementById("panels"), end: {top: 0}} 207 210 ]; 208 WebInspector.animateStyle(animations, 250, function() { resultsContainer.removeChildren(); delete this.searchResultsTree; }); 211 212 var animationFinished = function() 213 { 214 resultsContainer.addStyleClass("hidden"); 215 resultsContainer.removeChildren(); 216 delete this.searchResultsTree; 217 }; 218 219 WebInspector.animateStyle(animations, 250, animationFinished); 209 220 } 210 221 } … … 213 224 WebInspector.loaded = function() 214 225 { 226 document.body.addStyleClass("platform-" + InspectorController.platform()); 227 215 228 this.fileOutline = new TreeOutline(document.getElementById("list")); 216 229 this.fileOutline.expandTreeElementsWhenArrowing = true; … … 555 568 document.getElementById("main").style.left = newWidth + "px"; 556 569 document.getElementById("toolbarButtons").style.left = newWidth + "px"; 557 document.getElementById("searchResults").style.left = newWidth + "px";558 document.getElementById("searchResultsResizer").style.left = newWidth + "px";559 570 560 571 if (WebInspector.currentPanel && WebInspector.currentPanel.resize) … … 579 590 var searchResults = document.getElementById("searchResults"); 580 591 if (searchResults.dragging == true) { 581 var y = event.clientY ;592 var y = event.clientY - document.getElementById("main").offsetTop; 582 593 var newHeight = Number.constrain(y, 100, window.innerHeight - 100); 583 594 … … 585 596 searchResults.dragLastY = y; 586 597 587 WebInspector.searchResultsHeight = newHeight - Preferences.toolbarHeight;598 WebInspector.searchResultsHeight = newHeight; 588 599 searchResults.style.height = WebInspector.searchResultsHeight + "px"; 589 document.getElementById(" main").style.top = (newHeight + 1)+ "px";590 document.getElementById("searchResultsResizer").style.top = (newHeight - 2) + "px";600 document.getElementById("panels").style.top = newHeight + "px"; 601 document.getElementById("searchResultsResizer").style.top = (newHeight - 3) + "px"; 591 602 event.preventDefault(); 592 603 } -
trunk/WebKit/mac/ChangeLog
r28007 r28039 1 2007-11-26 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title 6 http://bugs.webkit.org/show_bug.cgi?id=16137 7 8 Create the Web Inspector window with the textured style. Set the content border 9 thickness for the top of the window or the height of the toolbar. Also make the 10 window's bottom corners square, since a normal textured window normally has 11 rounded bottom corners. 12 13 * WebCoreSupport/WebInspectorClient.mm: 14 (-[WebInspectorWindowController window]): 15 1 16 2007-11-24 Mark Rowe <mrowe@apple.com> 2 17 -
trunk/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
r27883 r28039 34 34 #import "WebNodeHighlight.h" 35 35 #import "WebPreferences.h" 36 #import "WebTypesInternal.h" 36 37 #import "WebView.h" 37 38 #import "WebViewInternal.h" … … 45 46 #import <WebKit/DOMCore.h> 46 47 #import <WebKit/DOMExtensions.h> 48 49 #import <WebKitSystemInterface.h> 47 50 48 51 using namespace WebCore; … … 219 222 return window; 220 223 221 window = [[NSWindow alloc] initWithContentRect:NSMakeRect(60.0, 200.0, 750.0, 650.0) 222 styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask) backing:NSBackingStoreBuffered defer:YES]; 224 NSUInteger styleMask = (NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask); 225 226 #ifndef BUILDING_ON_TIGER 227 styleMask |= NSTexturedBackgroundWindowMask; 228 #endif 229 230 window = [[NSWindow alloc] initWithContentRect:NSMakeRect(60.0, 200.0, 750.0, 650.0) styleMask:styleMask backing:NSBackingStoreBuffered defer:YES]; 223 231 [window setDelegate:self]; 224 232 [window setMinSize:NSMakeSize(400.0, 400.0)]; 233 234 #ifndef BUILDING_ON_TIGER 235 [window setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge]; 236 [window setContentBorderThickness:40. forEdge:NSMaxYEdge]; 237 238 WKNSWindowMakeBottomCornersSquare(window); 239 #endif 225 240 226 241 [self setWindow:window]; -
trunk/WebKitLibraries/ChangeLog
r28005 r28039 1 2007-11-26 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title 6 http://bugs.webkit.org/show_bug.cgi?id=16137 7 8 Add a new function to make bottom window corners square for textured windows. 9 10 * WebKitSystemInterface.h: 11 * libWebKitSystemInterfaceTiger.a: 12 * libWebKitSystemInterfaceLeopard.a: 13 1 14 2007-11-23 Adam Roben <aroben@apple.com> 2 15 -
trunk/WebKitLibraries/WebKitSystemInterface.h
r27386 r28039 149 149 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef); 150 150 151 void WKNSWindowMakeBottomCornersSquare(NSWindow *); 152 151 153 BOOL WKSupportsMultipartXMixedReplace(NSMutableURLRequest *request); 152 154 NSString* WKPathFromFont(NSFont *font);
Note: See TracChangeset
for help on using the changeset viewer.