WebCore:
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jan 2006 02:42:36 +0000 (02:42 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jan 2006 02:42:36 +0000 (02:42 +0000)
commitbdb470222b5d2db4873b85b8d8895858f624786d
tree24794b6ba5b9352a5b049f835b149f474bfc2478
parenta84cf8ced81afadd0dacbe976f1ea78b737b3d63
WebCore:

        Reviewed by Darin.

        Support for the new DOM Inspector.

        * khtml/ecma/kjs_dom.cpp: exposes scrollIntoViewIfNeeded to JS
        * khtml/ecma/kjs_dom.h:
        * khtml/rendering/RenderText.cpp:
        (RenderText::lineBoxRects): returns text run rects
        * khtml/rendering/RenderText.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::lineBoxRects): returns all child line box rects
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::lineBoxRects): returns an empty list
        * khtml/rendering/render_object.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::scrollIntoViewIfNeeded): scrolls only if needed, bool decides to center to align to nearest edge
        * khtml/xml/dom_elementimpl.h: Ditto
        * kwq/DOM.mm:
        (-[DOMNode boundingBox]): returns the bounding box for a node
        (-[DOMNode lineBoxRects]): returns text runs for a node
        * kwq/DOMCore.h: added missing @protocol DOMEventListener and @class DOMEvent
        * kwq/DOMExtensions.h: removes methods that haven't been API reviewed
        * kwq/DOMPrivate.h: new pending public API added for the Inspector

WebKit:

        Reviewed by Darin.

        New DOM Inspector that lives in WebKit and is accessible from any WebView.
        Accessible from a contextual menu when the WebKitEnableInspectElementContextMenuItem default is
        true or you have a development build. Browsing the tree, serialized HTML and CSS rules work.

        To always enable enter the following in the Terminal (change the bundle id to affect other WebKit apps):
        defaults write com.apple.Safari WebKitEnableInspectElementContextMenuItem -bool true

        http://bugzilla.opendarwin.org/show_bug.cgi?id=6571

        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt: reorder of the entries
        * Misc.subproj/WebKitNSStringExtras.h:
        * Misc.subproj/WebKitNSStringExtras.m:
        (-[NSString _webkit_stringByCollapsingWhitespaceCharacters]): collapses consecutive whitespace into a single space
        * WebCoreSupport.subproj/WebFrameBridge.m:
        (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): cleanup
        (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]): call the new UI delegate method
        * WebInspector.subproj: Added.
        * WebInspector.subproj/WebInspector.h: Added.
        * WebInspector.subproj/WebInspector.m: Added.
        (+[WebInspector sharedWebInspector]):
        (-[WebInspector init]):
        (-[WebInspector initWithWebFrame:]):
        (-[WebInspector dealloc]):
        (-[WebInspector window]):
        (-[WebInspector windowDidLoad]):
        (-[WebInspector windowWillClose:]):
        (-[WebInspector showWindow:]):
        (-[WebInspector setWebFrame:]):
        (-[WebInspector webFrame]):
        (-[WebInspector setRootDOMNode:]):
        (-[WebInspector rootDOMNode]):
        (-[WebInspector setFocusedDOMNode:]):
        (-[WebInspector focusedDOMNode]):
        (-[WebInspector setSearchQuery:]):
        (-[WebInspector searchQuery]):
        (-[WebInspector searchResults]):
        (-[WebInspector showOptionsMenu]):
        (-[WebInspector selectNewRoot:]):
        (-[WebInspector resizeTopArea:]):
        (-[WebInspector treeViewScrollTo:]):
        (-[WebInspector treeViewOffsetTop]):
        (-[WebInspector treeViewScrollHeight]):
        (-[WebInspector traverseTreeBackward]):
        (-[WebInspector traverseTreeForward]):
        (-[WebInspector _toggleIgnoreWhitespace:]):
        (-[WebInspector _highlightNode:]):
        (-[WebInspector _nodeHighlightExpired:]):
        (-[WebInspector _focusRootNode:]):
        (-[WebInspector _revealAndSelectNodeInTree:]):
        (-[WebInspector _showSearchResults:]):
        (-[WebInspector _refreshSearch]):
        (-[WebInspector _update]):
        (-[WebInspector _updateRoot]):
        (-[WebInspector _updateTreeScrollbar]):
        (+[WebInspector isSelectorExcludedFromWebScript:]):
        (+[WebInspector webScriptNameForSelector:]):
        (+[WebInspector isKeyExcludedFromWebScript:]):
        (-[WebInspector handleEvent:]):
        (-[WebInspector webView:didFinishLoadForFrame:]):
        (-[WebInspector webView:plugInViewWithArguments:]):
        (-[WebInspector outlineView:numberOfChildrenOfItem:]):
        (-[WebInspector outlineView:isItemExpandable:]):
        (-[WebInspector outlineView:child:ofItem:]):
        (-[WebInspector outlineView:objectValueForTableColumn:byItem:]):
        (-[WebInspector outlineView:willDisplayOutlineCell:forTableColumn:item:]):
        (-[WebInspector outlineViewItemDidCollapse:]):
        (-[WebInspector outlineViewSelectionDidChange:]):
        (-[WebInspectorPrivate dealloc]):
        (-[DOMHTMLElement _addClassName:]): Helper method for the Inspector to append style classes
        (-[DOMHTMLElement _removeClassName:]): Helper method for the Inspector to remove style classes
        (-[DOMNode _contentPreview]):
        (-[DOMNode _isAncestorOfNode:]):
        (-[DOMNode _isDescendantOfNode:]):
        (-[DOMNode _isWhitespace]):
        (-[DOMNode _lengthOfChildNodesIgnoringWhitespace]):
        (-[DOMNode _childNodeAtIndexIgnoringWhitespace:]):
        (-[DOMNode _nextSiblingSkippingWhitespace]):
        (-[DOMNode _previousSiblingSkippingWhitespace]):
        (-[DOMNode _firstChildSkippingWhitespace]):
        (-[DOMNode _lastChildSkippingWhitespace]):
        (-[DOMNode _firstAncestorCommonWithNode:]):
        (-[DOMNode _traverseNextNodeStayingWithin:]):
        (-[DOMNode _traverseNextNodeSkippingWhitespaceStayingWithin:]):
        (-[DOMNode _traversePreviousNode]):
        (-[DOMNode _traversePreviousNodeSkippingWhitespace]):
        (-[DOMNode _nodeTypeName]):
        (-[DOMNode _shortDisplayName]):
        (-[DOMNode _displayName]):
        * WebInspector.subproj/WebInspectorInternal.h: Added.
        * WebInspector.subproj/WebInspectorOutlineView.h: Added.
        * WebInspector.subproj/WebInspectorOutlineView.m: Added.
        (-[WebInspectorOutlineView isOpaque]):
        (-[WebInspectorOutlineView _highlightColorForCell:]):
        (-[WebInspectorOutlineView _highlightRow:clipRect:]):
        (-[WebInspectorOutlineView drawBackgroundInClipRect:]):
        * WebInspector.subproj/WebInspectorPanel.h: Added.
        * WebInspector.subproj/WebInspectorPanel.m: Added.
        (-[WebInspectorPanel canBecomeKeyWindow]):
        (-[WebInspectorPanel canBecomeMainWindow]):
        (-[WebInspectorPanel moveWindow:]):
        (-[WebInspectorPanel resizeWindow:]):
        (-[WebInspectorPanel sendEvent:]):
        * WebInspector.subproj/WebNodeHighlight.h: Added.
        * WebInspector.subproj/WebNodeHighlight.m: Added.
        (-[WebNodeHighlight initWithBounds:andRects:forView:]):
        (-[WebNodeHighlight dealloc]):
        (-[WebNodeHighlight fractionComplete]):
        (-[WebNodeHighlight expire]):
        (-[WebNodeHighlight redraw:]):
        * WebInspector.subproj/WebNodeHighlightView.h: Added.
        * WebInspector.subproj/WebNodeHighlightView.m: Added.
        (-[WebNodeHighlightView roundedRect:withRadius:]):
        (-[WebNodeHighlightView initWithHighlight:andRects:forView:]):
        (-[WebNodeHighlightView dealloc]):
        (-[WebNodeHighlightView isOpaque]):
        (-[WebNodeHighlightView drawRect:]):
        * WebInspector.subproj/webInspector: Added.
        * WebInspector.subproj/webInspector/Images: Added.
        * WebInspector.subproj/webInspector/Images/close.png: Added.
        * WebInspector.subproj/webInspector/Images/closePressed.png: Added.
        * WebInspector.subproj/webInspector/Images/downTriangle.png: Added.
        * WebInspector.subproj/webInspector/Images/menu.png: Added.
        * WebInspector.subproj/webInspector/Images/menuPressed.png: Added.
        * WebInspector.subproj/webInspector/Images/popupFill.png: Added.
        * WebInspector.subproj/webInspector/Images/popupFillPressed.png: Added.
        * WebInspector.subproj/webInspector/Images/popupLeft.png: Added.
        * WebInspector.subproj/webInspector/Images/popupLeftPressed.png: Added.
        * WebInspector.subproj/webInspector/Images/popupRight.png: Added.
        * WebInspector.subproj/webInspector/Images/popupRightPressed.png: Added.
        * WebInspector.subproj/webInspector/Images/rightTriangle.png: Added.
        * WebInspector.subproj/webInspector/Images/scrollThumbBottom.png: Added.
        * WebInspector.subproj/webInspector/Images/scrollThumbMiddle.png: Added.
        * WebInspector.subproj/webInspector/Images/scrollThumbTop.png: Added.
        * WebInspector.subproj/webInspector/Images/scrollTrackBottom.png: Added.
        * WebInspector.subproj/webInspector/Images/scrollTrackMiddle.png: Added.
        * WebInspector.subproj/webInspector/Images/scrollTrackTop.png: Added.
        * WebInspector.subproj/webInspector/Images/squareButtonRight.png: Added.
        * WebInspector.subproj/webInspector/Images/squareButtonRightPressed.png: Added.
        * WebInspector.subproj/webInspector/Images/upTriangle.png: Added.
        * WebInspector.subproj/webInspector/inspector.css: Added.
        * WebInspector.subproj/webInspector/inspector.html: Added.
        * WebInspector.subproj/webInspector/inspector.js: Added.
        * WebKit.xcodeproj/project.pbxproj: Adds Web Inspector files
        * WebView.subproj/WebUIDelegatePrivate.h: new UI delegate method to supply a replacement view for plugins
        * WebView.subproj/WebView.m:
        (-[WebView _menuForElement:defaultItems:]): Add a new context menu item for inspecting
        (-[WebView _inspectElement:]): Context menu item target for inspecting

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
59 files changed:
WebCore/ChangeLog
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_dom.h
WebCore/khtml/rendering/RenderText.cpp
WebCore/khtml/rendering/RenderText.h
WebCore/khtml/rendering/render_container.cpp
WebCore/khtml/rendering/render_container.h
WebCore/khtml/rendering/render_object.cpp
WebCore/khtml/rendering/render_object.h
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/khtml/xml/dom_elementimpl.h
WebCore/kwq/DOM.mm
WebCore/kwq/DOMCore.h
WebCore/kwq/DOMExtensions.h
WebCore/kwq/DOMPrivate.h
WebKit/ChangeLog
WebKit/English.lproj/Localizable.strings
WebKit/English.lproj/StringsNotToBeLocalized.txt
WebKit/Misc.subproj/WebKitNSStringExtras.h
WebKit/Misc.subproj/WebKitNSStringExtras.m
WebKit/WebCoreSupport.subproj/WebFrameBridge.m
WebKit/WebInspector.subproj/WebInspector.h [new file with mode: 0644]
WebKit/WebInspector.subproj/WebInspector.m [new file with mode: 0644]
WebKit/WebInspector.subproj/WebInspectorInternal.h [new file with mode: 0644]
WebKit/WebInspector.subproj/WebInspectorOutlineView.h [new file with mode: 0644]
WebKit/WebInspector.subproj/WebInspectorOutlineView.m [new file with mode: 0644]
WebKit/WebInspector.subproj/WebInspectorPanel.h [new file with mode: 0644]
WebKit/WebInspector.subproj/WebInspectorPanel.m [new file with mode: 0644]
WebKit/WebInspector.subproj/WebNodeHighlight.h [new file with mode: 0644]
WebKit/WebInspector.subproj/WebNodeHighlight.m [new file with mode: 0644]
WebKit/WebInspector.subproj/WebNodeHighlightView.h [new file with mode: 0644]
WebKit/WebInspector.subproj/WebNodeHighlightView.m [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/close.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/closePressed.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/downTriangle.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/menu.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/menuPressed.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/popupFill.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/popupFillPressed.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/popupLeft.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/popupLeftPressed.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/popupRight.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/popupRightPressed.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/rightTriangle.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/scrollThumbBottom.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/scrollThumbMiddle.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/scrollThumbTop.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/scrollTrackBottom.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/scrollTrackMiddle.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/scrollTrackTop.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/squareButtonRight.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/squareButtonRightPressed.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/Images/upTriangle.png [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/inspector.css [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/inspector.html [new file with mode: 0644]
WebKit/WebInspector.subproj/webInspector/inspector.js [new file with mode: 0644]
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView.subproj/WebUIDelegatePrivate.h
WebKit/WebView.subproj/WebView.m