Changeset 23677 in webkit
- Timestamp:
- Jun 20, 2007 6:37:24 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 98 added
- 51 deleted
- 58 edited
- 4 copied
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r23676 r23677 1 2007-06-20 Adam Roben <aroben@apple.com> 2 3 Land the new Inspector. 4 5 Co-written with Tim Hatcher. 6 7 Reviewed by Anders, Adele, Hyatt, and Sam. 8 9 No regression tests possible. 10 11 Add a new InspectorController that is in charge of the Inspector. It 12 has an InspectorClient that controls the Inspector's window and node 13 highlight. 14 15 * page/InspectorClient.h: Added. 16 (WebCore::InspectorClient::~InspectorClient): 17 * page/InspectorController.cpp: Added. 18 (WebCore::ConsoleMessage::ConsoleMessage): 19 (WebCore::InspectorResource::): Represents a single resource that the 20 Inspector knows about. 21 (WebCore::InspectorResource::InspectorResource): 22 (WebCore::InspectorResource::~InspectorResource): 23 (WebCore::InspectorResource::type): 24 (WebCore::InspectorResource::setScriptObject): 25 (WebCore::addSourceToFrame): Callback available from JS. 26 (WebCore::getResourceDocumentNode): Ditto. 27 (WebCore::highlightDOMNode): Ditto. 28 (WebCore::hideDOMNodeHighlight): Ditto. 29 (WebCore::loaded): Ditto. 30 (WebCore::unloading): Ditto. 31 (WebCore::attach): Ditto. 32 (WebCore::detach): Ditto. 33 (WebCore::log): Ditto. 34 (WebCore::search): Ditto. 35 (WebCore::inspectedWindow): Ditto. 36 (WebCore::InspectorController::InspectorController): 37 (WebCore::InspectorController::~InspectorController): 38 (WebCore::InspectorController::inspect): Called by 39 ContextMenuController to inspect a node. 40 (WebCore::InspectorController::focusNode): 41 (WebCore::InspectorController::highlight): 42 (WebCore::InspectorController::hideHighlight): 43 (WebCore::InspectorController::windowVisible): 44 (WebCore::InspectorController::setWindowVisible): 45 (WebCore::InspectorController::addMessageToConsole): 46 (WebCore::InspectorController::attachWindow): 47 (WebCore::InspectorController::detachWindow): 48 (WebCore::InspectorController::windowScriptObjectAvailable): 49 (WebCore::InspectorController::scriptObjectReady): 50 (WebCore::InspectorController::windowUnloading): 51 (WebCore::addHeaders): Static helper function. 52 (WebCore::objectForRequest): Ditto. 53 (WebCore::objectForResponse): Ditto. 54 (WebCore::InspectorController::addScriptResource): 55 (WebCore::InspectorController::addAndUpdateScriptResource): 56 (WebCore::InspectorController::removeScriptResource): 57 (WebCore::InspectorController::updateScriptResource): 58 (WebCore::InspectorController::populateScriptResources): 59 (WebCore::InspectorController::addScriptConsoleMessage): 60 (WebCore::callClearFunction): Static helper function. 61 (WebCore::InspectorController::clearScriptResources): 62 (WebCore::InspectorController::clearScriptConsoleMessages): 63 (WebCore::InspectorController::clearNetworkTimeline): 64 (WebCore::InspectorController::pruneResources): 65 (WebCore::InspectorController::didCommitLoad): Callback from 66 FrameLoader. 67 (WebCore::InspectorController::frameDetachedFromParent): Ditto. 68 (WebCore::InspectorController::addResource): Ditto. 69 (WebCore::InspectorController::removeResource): Ditto. 70 (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto. 71 (WebCore::InspectorController::identifierForInitialRequest): Ditto. 72 (WebCore::InspectorController::willSendRequest): Ditto. 73 (WebCore::InspectorController::didReceiveResponse): Ditto. 74 (WebCore::InspectorController::didReceiveContentLength): Ditto. 75 (WebCore::InspectorController::didFinishLoading): Ditto. 76 (WebCore::InspectorController::didFailLoading): Ditto. 77 * page/InspectorController.h: Added. 78 (WebCore::InspectorController::inspectedPage): 79 (WebCore::InspectorController::scriptContext): 80 (WebCore::InspectorController::setScriptContext): 81 (WebCore::InspectorController::resources): 82 (WebCore::InspectorController::removeAllResources): 83 84 Add the JavaScript that defines most of the behavior of the Inspector. 85 86 * page/inspector/ConsolePanel.js: Added. 87 * page/inspector/NetworkPanel.js: Added. 88 * page/inspector/Resource.js: Added. 89 * page/inspector/ResourceCategory.js: Added. 90 * page/inspector/ResourcePanel.js: Added. 91 * page/inspector/inspector.js: Added. 92 * page/inspector/treeoutline.js: Renamed from WebKit/WebInspector/webInspector/treeoutline.js. 93 * page/inspector/utilities.js: Added. 94 95 Add the Inspector's CSS and HTML. 96 97 * page/inspector/inspector.css: Added. 98 * page/inspector/inspector.html: Added. 99 100 Hang the InspectorController off of Page. We only create an 101 InspectorController if an InspectorClient is given to the Page. 102 103 * page/Page.cpp: 104 (WebCore::Page::Page): 105 * page/Page.h: 106 (WebCore::Page::inspectorController): 107 108 Use FrameLoader to notify the InspectorController of resource loads. 109 110 * loader/FrameLoader.cpp: 111 (WebCore::FrameLoader::begin): 112 (WebCore::FrameLoader::transitionToCommitted): 113 (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): 114 (WebCore::FrameLoader::detachFromParent): 115 (WebCore::FrameLoader::assignIdentifierToInitialRequest): 116 (WebCore::FrameLoader::willSendRequest): 117 (WebCore::FrameLoader::didReceiveResponse): 118 (WebCore::FrameLoader::didReceiveData): 119 (WebCore::FrameLoader::sendRemainingDelegateMessages): 120 (WebCore::FrameLoader::requestFromDelegate): 121 (WebCore::FrameLoader::didFinishLoad): 122 (WebCore::FrameLoader::dispatchWindowObjectAvailable): 123 (WebCore::FrameLoader::dispatchDidCommitLoad): 124 (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): 125 (WebCore::FrameLoader::dispatchWillSendRequest): 126 (WebCore::FrameLoader::dispatchDidReceiveResponse): 127 (WebCore::FrameLoader::dispatchDidReceiveContentLength): 128 (WebCore::FrameLoader::dispatchDidFinishLoading): 129 (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): 130 * loader/FrameLoader.h: 131 132 Send console messages to the InspectorController. 133 134 * page/Chrome.cpp: 135 (WebCore::Chrome::addMessageToConsole): Send all console messages to 136 the InspectorController. 137 * page/Chrome.h: Add a new MessageLevel and MessageSource that are 138 used in the Inspector JS. 139 140 Report HTML errors when the Inspector window is open. 141 We don't report errors when the window is closed because we don't want 142 to slow down the HTMLTokenizer. 143 144 * html/HTMLDocument.cpp: 145 (WebCore::HTMLDocument::createTokenizer): 146 * html/HTMLParser.cpp: 147 (WebCore::HTMLParser::HTMLParser): 148 * html/HTMLParser.h: 149 * html/HTMLTokenizer.cpp: 150 (WebCore::HTMLTokenizer::HTMLTokenizer): 151 * html/HTMLTokenizer.h: 152 153 Append the "Inspect Element" context menu item after passing the 154 context menu to the ContextMenuClient. This work used to be done in 155 WebKit. 156 157 * page/ContextMenuClient.h: 158 * page/ContextMenuController.cpp: 159 (WebCore::ContextMenuController::handleContextMenuEvent): Add the 160 "Inspect Element" item. 161 (WebCore::ContextMenuController::contextMenuItemSelected): Handle the 162 "Inspect Element" item. 163 * platform/ContextMenu.cpp: 164 (WebCore::ContextMenu::addInspectElementItem): 165 (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for "Inspect 166 Element" item. 167 * platform/ContextMenu.h: 168 * platform/ContextMenuItem.h: 169 (WebCore::): Add ContextMenuItemTagInspectElement. 170 * platform/graphics/svg/SVGImageEmptyClients.h: 171 * page/mac/WebCoreViewFactory.h: Add the "Inspect Element" localized 172 string. 173 * platform/LocalizedStrings.h: Ditto. 174 * platform/mac/LocalizedStringsMac.mm: 175 (WebCore::contextMenuItemTagInspectElement): Ditto. 176 177 Miscellaneous changes: 178 179 * css/view-source.css: Add message bubble styles. 180 * loader/DocumentLoader.h: Add a frame getter. 181 * platform/win/ScrollViewWin.cpp: 182 (WebCore::ScrollView::updateScrollbars): Respect 183 Frame::prohibitsScrolling. 184 185 Add new images needed for the Inspector. 186 187 * page/inspector/Images/attachedShadow.png: Added. 188 * page/inspector/Images/bottomShadow.png: Added. 189 * page/inspector/Images/breadcrumbBackground.png: Added. 190 * page/inspector/Images/checker.png: Added. 191 * page/inspector/Images/console.png: Added. 192 * page/inspector/Images/darkShadow.png: Added. 193 * page/inspector/Images/disclosureDownPressed.png: Added. 194 * page/inspector/Images/disclosureRightDown.png: Added. 195 * page/inspector/Images/disclosureRightPressed.png: Added. 196 * page/inspector/Images/document.png: Added. 197 * page/inspector/Images/domViewButton.png: Added. 198 * page/inspector/Images/domViewButtonSelected.png: Added. 199 * page/inspector/Images/downTriangle.png: Added. 200 * page/inspector/Images/errorIcon.png: Added. 201 * page/inspector/Images/errorMediumIcon.png: Added. 202 * page/inspector/Images/folder.png: Added. 203 * page/inspector/Images/goArrow.png: Added. 204 * page/inspector/Images/gradient.png: Added. 205 * page/inspector/Images/gradientHighlight.png: Added. 206 * page/inspector/Images/gradientHighlightBottom.png: Added. 207 * page/inspector/Images/hideStatusWidget.png: Added. 208 * page/inspector/Images/hideStatusWidgetPressed.png: Added. 209 * page/inspector/Images/network.png: Added. 210 * page/inspector/Images/paneBottomGrow.png: Added. 211 * page/inspector/Images/paneBottomGrowActive.png: Added. 212 * page/inspector/Images/paneGrowHandleLine.png: Added. 213 * page/inspector/Images/paneHeader.png: Added. 214 * page/inspector/Images/paneHeaderActive.png: Added. 215 * page/inspector/Images/plainDocument.png: Added. 216 * page/inspector/Images/popupArrows.png: Added. 217 * page/inspector/Images/rightTriangle.png: Added. 218 * page/inspector/Images/segment.png: Added. 219 * page/inspector/Images/segmentEnd.png: Added. 220 * page/inspector/Images/segmentHover.png: Added. 221 * page/inspector/Images/segmentHoverEnd.png: Added. 222 * page/inspector/Images/segmentSelected.png: Added. 223 * page/inspector/Images/segmentSelectedEnd.png: Added. 224 * page/inspector/Images/showStatusWidget.png: Added. 225 * page/inspector/Images/showStatusWidgetPressed.png: Added. 226 * page/inspector/Images/sidbarItemBackground.png: Added. 227 * page/inspector/Images/sidebarActionWidget.png: Added. 228 * page/inspector/Images/sidebarActionWidgetPressed.png: Added. 229 * page/inspector/Images/sidebarAttachWidget.png: Added. 230 * page/inspector/Images/sidebarAttachWidgetPressed.png: Added. 231 * page/inspector/Images/sidebarDetachWidget.png: Added. 232 * page/inspector/Images/sidebarDetachWidgetPressed.png: Added. 233 * page/inspector/Images/sidebarResizeWidget.png: Added. 234 * page/inspector/Images/sidebarSelection.png: Added. 235 * page/inspector/Images/sidebarSelectionBlurred.png: Added. 236 * page/inspector/Images/sidebarSelectionBlurredTall.png: Added. 237 * page/inspector/Images/sidebarSelectionGray.png: Added. 238 * page/inspector/Images/sidebarSelectionGrayTall.png: Added. 239 * page/inspector/Images/sidebarSelectionTall.png: Added. 240 * page/inspector/Images/sidebarStatusAreaBackground.png: Added. 241 * page/inspector/Images/sourceViewButton.png: Added. 242 * page/inspector/Images/sourceViewButtonSelected.png: Added. 243 * page/inspector/Images/splitviewDimple.png: Added. 244 * page/inspector/Images/splitviewDividerBackground.png: Added. 245 * page/inspector/Images/tab.png: Added. 246 * page/inspector/Images/tabSelected.png: Added. 247 * page/inspector/Images/timelinePillBlue.png: Added. 248 * page/inspector/Images/timelinePillGray.png: Added. 249 * page/inspector/Images/timelinePillGreen.png: Added. 250 * page/inspector/Images/timelinePillOrange.png: Added. 251 * page/inspector/Images/timelinePillPurple.png: Added. 252 * page/inspector/Images/timelinePillRed.png: Added. 253 * page/inspector/Images/timelinePillYellow.png: Added. 254 * page/inspector/Images/tipBalloon.png: Added. 255 * page/inspector/Images/tipBalloonBottom.png: Added. 256 * page/inspector/Images/tipIcon.png: Added. 257 * page/inspector/Images/tipIconPressed.png: Added. 258 * page/inspector/Images/toggleDown.png: Added. 259 * page/inspector/Images/toggleUp.png: Added. 260 * page/inspector/Images/toolbarBackground.png: Added. 261 * page/inspector/Images/toolbarBackgroundInactive.png: Added. 262 * page/inspector/Images/toolbarButton.png: Added. 263 * page/inspector/Images/toolbarButtonInactive.png: Added. 264 * page/inspector/Images/toolbarButtonPressed.png: Added. 265 * page/inspector/Images/toolbarButtonPressedInactive.png: Added. 266 * page/inspector/Images/toolbarSplitButtonDivider.png: Added. 267 * page/inspector/Images/toolbarSplitButtonDividerInactive.png: Added. 268 * page/inspector/Images/treeDownTriangleBlack.png: Added. 269 * page/inspector/Images/treeDownTriangleWhite.png: Added. 270 * page/inspector/Images/treeLeftTriangleBlack.png: Added. 271 * page/inspector/Images/treeRightTriangleBlack.png: Added. 272 * page/inspector/Images/treeRightTriangleWhite.png: Added. 273 * page/inspector/Images/warningIcon.png: Added. 274 * page/inspector/Images/warningMediumIcon.png: Added. 275 * page/inspector/Images/warningsErrors.png: Added. 276 277 Build-fu: 278 279 * WebCore.exp: Added new symbols. 280 * WebCore.xcodeproj/project.pbxproj: Added new source files and 281 resources. 282 * WebCore.vcproj/WebCore.vcproj: Ditto, and copy the resources to 283 $WebKitOutputDir. 284 285 Windows build fixes: 286 287 * history/HistoryItem.h: ResourceRequest is a struct. 288 * loader/FrameLoaderClient.h: Ditto. 289 1 290 2007-06-20 Mitz Pettel <mitz@webkit.org> 2 291 -
trunk/WebCore/WebCore.exp
r23536 r23677 134 134 __ZN7WebCore10EventNames12keydownEventE 135 135 __ZN7WebCore10MouseEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowEiiiiibbbbtPNS_15EventTargetNodeEPNS_9ClipboardEb 136 __ZN7WebCore10StringImpl11computeHashEPKtj 136 137 __ZN7WebCore10StringImpl7replaceEtt 137 138 __ZN7WebCore10StringImplD1Ev … … 229 230 __ZN7WebCore12SharedBuffer10wrapNSDataEP6NSData 230 231 __ZN7WebCore12SharedBuffer12createNSDataEv 232 __ZN7WebCore12TextEncodingC1ERKNS_6StringE 231 233 __ZN7WebCore12iconDatabaseEv 232 234 __ZN7WebCore13HitTestResultC1ERKS0_ … … 301 303 __ZN7WebCore16NavigationActionC1Ev 302 304 __ZN7WebCore18PlatformMouseEventC1EP7NSEvent 305 __ZN7WebCore19InspectorController16setWindowVisibleEb 303 306 __ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEbRi 304 307 __ZN7WebCore19SelectionController5clearEv … … 318 321 __ZN7WebCore21ContextMenuController16clearContextMenuEv 319 322 __ZN7WebCore21PlatformKeyboardEventC1EP7NSEventb 323 __ZN7WebCore21WindowsLatin1EncodingEv 320 324 __ZN7WebCore21findEventWithKeyStateEPNS_5EventE 321 325 __ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE … … 337 341 __ZN7WebCore4Page15backForwardListEv 338 342 __ZN7WebCore4Page16setDefersLoadingEb 343 __ZN7WebCore4Page18setInspectorClientEPNS_15InspectorClientE 339 344 __ZN7WebCore4Page23clearUndoRedoOperationsEv 340 345 __ZN7WebCore4Page6goBackEv … … 487 492 __ZN7WebCore9TimerBaseD2Ev 488 493 __ZN7WebCore9pageCacheEv 494 __ZN7WebCoreeqERKNS_15ResourceRequestES2_ 489 495 __ZN7WebCoreeqERKNS_4KURLES2_ 490 496 __ZNK7WebCore10StringImplcvP8NSStringEv … … 525 531 __ZNK7WebCore12EventHandler20currentKeyboardEventEv 526 532 __ZNK7WebCore12RenderObject25backslashAsCurrencySymbolEv 533 __ZNK7WebCore12SharedBuffer4dataEv 534 __ZNK7WebCore12SharedBuffer4sizeEv 535 __ZNK7WebCore12TextEncoding6decodeEPKcm 527 536 __ZNK7WebCore13HitTestResult10isLiveLinkEv 528 537 __ZNK7WebCore13HitTestResult10isSelectedEv … … 540 549 __ZNK7WebCore13ResourceErrorcvP7NSErrorEv 541 550 __ZNK7WebCore14DocumentLoader10isStoppingEv 551 __ZNK7WebCore14DocumentLoader10requestURLEv 542 552 __ZNK7WebCore14DocumentLoader11frameLoaderEv 543 553 __ZNK7WebCore14DocumentLoader11isCommittedEv … … 559 569 __ZNK7WebCore15ProgressTracker17estimatedProgressEv 560 570 __ZNK7WebCore15ResourceRequest12nsURLRequestEv 571 __ZNK7WebCore15ResourceRequest16httpHeaderFieldsEv 561 572 __ZNK7WebCore15ResourceRequest3urlEv 562 573 __ZNK7WebCore15ResourceRequest7isEmptyEv … … 566 577 __ZNK7WebCore16DeprecatedString8endsWithERKS0_ 567 578 __ZNK7WebCore16ResourceResponse13nsURLResponseEv 579 __ZNK7WebCore16ResourceResponse14httpStatusCodeEv 580 __ZNK7WebCore16ResourceResponse16httpHeaderFieldsEv 581 __ZNK7WebCore16ResourceResponse16textEncodingNameEv 582 __ZNK7WebCore16ResourceResponse17suggestedFilenameEv 583 __ZNK7WebCore16ResourceResponse21expectedContentLengthEv 568 584 __ZNK7WebCore16ResourceResponse3urlEv 585 __ZNK7WebCore16ResourceResponse8mimeTypeEv 569 586 __ZNK7WebCore19SelectionController17isInPasswordFieldEv 570 587 __ZNK7WebCore26NetscapePlugInStreamLoader6isDoneEv 571 588 __ZNK7WebCore4Font11primaryFontEv 589 __ZNK7WebCore4KURL17lastPathComponentEv 572 590 __ZNK7WebCore4KURL4hostEv 591 __ZNK7WebCore4KURL4pathEv 573 592 __ZNK7WebCore4KURL8getNSURLEv 574 593 __ZNK7WebCore5Frame10isFrameSetEv … … 606 625 __ZNK7WebCore6Editor8canPasteEv 607 626 __ZNK7WebCore6Editor9canDeleteEv 627 __ZNK7WebCore6String10charactersEv 608 628 __ZNK7WebCore6String16deprecatedStringEv 609 629 __ZNK7WebCore6String6lengthEv -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r23584 r23677 86 86 <Tool 87 87 Name="VCPostBuildEventTool" 88 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"
 "88 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

mkdir 2>NUL "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
xcopy /y /d /s "$(ProjectDir)\..\page\inspector\*" "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
" 89 89 /> 90 90 </Configuration> … … 157 157 <Tool 158 158 Name="VCPostBuildEventTool" 159 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"
 "159 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

mkdir 2>NUL "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
xcopy /y /d /s "$(ProjectDir)\..\page\inspector\*" "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
" 160 160 /> 161 161 </Configuration> … … 230 230 <Tool 231 231 Name="VCPostBuildEventTool" 232 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"
 "232 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

mkdir 2>NUL "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
xcopy /y /d /s "$(ProjectDir)\..\page\inspector\*" "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
" 233 233 /> 234 234 </Configuration> … … 2487 2487 </File> 2488 2488 <File 2489 RelativePath="..\page\InspectorClient.h" 2490 > 2491 </File> 2492 <File 2493 RelativePath="..\page\InspectorController.cpp" 2494 > 2495 </File> 2496 <File 2497 RelativePath="..\page\InspectorController.h" 2498 > 2499 </File> 2500 <File 2489 2501 RelativePath="..\page\MouseEventWithHitTestResults.cpp" 2490 2502 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r23584 r23677 30 30 0668E18B0ADD9624004128E0 /* PopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 0668E1890ADD9624004128E0 /* PopupMenu.h */; }; 31 31 0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */; }; 32 06693DBA0BFBA2F400216072 /* InspectorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 06693DB70BFBA2F400216072 /* InspectorClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 33 06693DBB0BFBA2F400216072 /* InspectorController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06693DB80BFBA2F400216072 /* InspectorController.cpp */; }; 34 06693DBC0BFBA2F400216072 /* InspectorController.h in Headers */ = {isa = PBXBuildFile; fileRef = 06693DB90BFBA2F400216072 /* InspectorController.h */; settings = {ATTRIBUTES = (Private, ); }; }; 35 06693F7B0BFBC91700216072 /* inspector in Resources */ = {isa = PBXBuildFile; fileRef = 06693F450BFBC91600216072 /* inspector */; }; 32 36 066C772B0AB603B700238CC4 /* FileChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772A0AB603B700238CC4 /* FileChooser.h */; }; 33 37 066C772D0AB603D200238CC4 /* FileChooserMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 066C772C0AB603D200238CC4 /* FileChooserMac.mm */; }; … … 66 70 14D824080AF93AEB0004F057 /* ChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D824060AF93AEB0004F057 /* ChromeClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 67 71 14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DC0D3509FED073007B0235 /* JSNode.cpp */; }; 68 14DC0D3809FED073007B0235 /* JSNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DC0D3609FED073007B0235 /* JSNode.h */; };72 14DC0D3809FED073007B0235 /* JSNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DC0D3609FED073007B0235 /* JSNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 69 73 14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; }; 70 74 14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; }; … … 1523 1527 93B70D6609EB0C7C009D8468 /* kjs_css.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4A09EB0C7C009D8468 /* kjs_css.h */; }; 1524 1528 93B70D6709EB0C7C009D8468 /* kjs_dom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4B09EB0C7C009D8468 /* kjs_dom.cpp */; }; 1525 93B70D6809EB0C7C009D8468 /* kjs_dom.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4C09EB0C7C009D8468 /* kjs_dom.h */; };1529 93B70D6809EB0C7C009D8468 /* kjs_dom.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4C09EB0C7C009D8468 /* kjs_dom.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1526 1530 93B70D6909EB0C7C009D8468 /* kjs_events.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4D09EB0C7C009D8468 /* kjs_events.cpp */; }; 1527 1531 93B70D6A09EB0C7C009D8468 /* kjs_events.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4E09EB0C7C009D8468 /* kjs_events.h */; }; … … 1794 1798 A8185F3F09765766005826D9 /* DocumentFragment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8185F3709765765005826D9 /* DocumentFragment.cpp */; }; 1795 1799 A8185F4009765766005826D9 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3809765765005826D9 /* Document.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1796 A818721B0977D3C0005826D9 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872100977D3C0005826D9 /* NodeList.h */; };1800 A818721B0977D3C0005826D9 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872100977D3C0005826D9 /* NodeList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1797 1801 A818721C0977D3C0005826D9 /* ContainerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872110977D3C0005826D9 /* ContainerNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1798 1802 A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872130977D3C0005826D9 /* NameNodeList.h */; }; … … 2846 2850 BCB16C280979C3BD00467741 /* CachedXSLStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C0F0979C3BD00467741 /* CachedXSLStyleSheet.h */; }; 2847 2851 BCB16C290979C3BD00467741 /* DocLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C100979C3BD00467741 /* DocLoader.cpp */; }; 2848 BCB16C2A0979C3BD00467741 /* DocLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C110979C3BD00467741 /* DocLoader.h */; };2852 BCB16C2A0979C3BD00467741 /* DocLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C110979C3BD00467741 /* DocLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2849 2853 BCB16C2C0979C3BD00467741 /* loader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C130979C3BD00467741 /* loader.cpp */; }; 2850 2854 BCB16C2D0979C3BD00467741 /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C140979C3BD00467741 /* loader.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3216 3220 0668E1890ADD9624004128E0 /* PopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PopupMenu.h; sourceTree = "<group>"; }; 3217 3221 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PopupMenuMac.mm; sourceTree = "<group>"; }; 3222 06693DB70BFBA2F400216072 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; }; 3223 06693DB80BFBA2F400216072 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = "<group>"; }; 3224 06693DB90BFBA2F400216072 /* InspectorController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InspectorController.h; sourceTree = "<group>"; }; 3225 06693F450BFBC91600216072 /* inspector */ = {isa = PBXFileReference; lastKnownFileType = folder; path = inspector; sourceTree = "<group>"; }; 3218 3226 066C772A0AB603B700238CC4 /* FileChooser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileChooser.h; sourceTree = "<group>"; }; 3219 3227 066C772C0AB603D200238CC4 /* FileChooserMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FileChooserMac.mm; sourceTree = "<group>"; }; … … 7233 7241 isa = PBXGroup; 7234 7242 children = ( 7243 06693F450BFBC91600216072 /* inspector */, 7235 7244 93C09A820B064F05005ABD4D /* mac */, 7236 7245 8538F0000AD71770006A81D1 /* AbstractView.idl */, … … 7264 7273 65CBFEF70974F607001DAC25 /* FrameView.cpp */, 7265 7274 65CBFEF80974F607001DAC25 /* FrameView.h */, 7275 06693DB70BFBA2F400216072 /* InspectorClient.h */, 7276 06693DB80BFBA2F400216072 /* InspectorController.cpp */, 7277 06693DB90BFBA2F400216072 /* InspectorController.h */, 7266 7278 BC94D1500C275C8B006BC617 /* History.cpp */, 7267 7279 BC94D1510C275C8B006BC617 /* History.h */, … … 11566 11578 37919C1D0BF3762800956998 /* ShapeArabic.h in Headers */, 11567 11579 BC588AF00BFA6CF900EE679E /* HTMLParserErrorCodes.h in Headers */, 11580 06693DBA0BFBA2F400216072 /* InspectorClient.h in Headers */, 11581 06693DBC0BFBA2F400216072 /* InspectorController.h in Headers */, 11568 11582 BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */, 11569 11583 BC06ED070BFD5BAE00856E9D /* JSHTMLTableSectionElement.h in Headers */, … … 11648 11662 isa = PBXProject; 11649 11663 buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */; 11664 compatibilityVersion = "Xcode 2.4"; 11650 11665 hasScannedForEncodings = 1; 11651 11666 knownRegions = ( … … 11721 11736 464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */, 11722 11737 464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */, 11738 06693F7B0BFBC91700216072 /* inspector in Resources */, 11723 11739 BC491B4F0C023E2D009D6316 /* HTMLMarqueeElement.idl in Resources */, 11724 11740 1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */, … … 12989 13005 37919C190BF375DD00956998 /* ShapeArabic.c in Sources */, 12990 13006 BC588B4B0BFA723C00EE679E /* HTMLParserErrorCodes.cpp in Sources */, 13007 06693DBB0BFBA2F400216072 /* InspectorController.cpp in Sources */, 12991 13008 BCA169A20BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp in Sources */, 12992 13009 BC06ED060BFD5BAE00856E9D /* JSHTMLTableSectionElement.cpp in Sources */, -
trunk/WebCore/css/view-source.css
r21630 r23677 88 88 } 89 89 90 /*91 90 .webkit-html-external-link { 91 text-decoration: none; 92 92 } 93 93 94 .webkit-html-external-link:hover { 95 text-decoration: underline; 96 } 97 98 /* 94 99 .webkit-html-resource-link { 95 100 } … … 107 112 rgb(136, 18, 128); 108 113 } 114 115 .webkit-html-message-bubble { 116 -webkit-box-shadow: black 0px 2px 5px; 117 -webkit-border-radius: 9px; 118 -webkit-border-fit: lines; 119 font-size: 9px; 120 font-family: Lucida Grande; 121 font-weight: bold; 122 margin: 6px 25px; 123 padding: 0 7px 1px; 124 } 125 126 .webkit-html-warning-message { 127 background-color: rgb(100%, 62%, 42%); 128 border: 2px solid rgb(100%, 52%, 21%); 129 } 130 131 .webkit-html-error-message { 132 background-color: rgb(100%, 42%, 42%); 133 border: 2px solid rgb(100%, 31%, 31%); 134 } 135 136 .webkit-html-message-line { 137 padding-left: 23px; 138 text-indent: -20px; 139 } 140 141 .webkit-html-message-icon { 142 position: relative; 143 top: 2px; 144 margin: 0 4px; 145 } -
trunk/WebCore/history/HistoryItem.h
r21793 r23677 48 48 class Image; 49 49 class KURL; 50 classResourceRequest;50 struct ResourceRequest; 51 51 52 52 class HistoryItem; -
trunk/WebCore/html/HTMLDocument.cpp
r21681 r23677 68 68 #include "HTMLNames.h" 69 69 #include "HTMLTokenizer.h" 70 #include "InspectorController.h" 70 71 #include "KURL.h" 72 #include "Page.h" 71 73 #include "cssstyleselector.h" 72 74 … … 283 285 Tokenizer *HTMLDocument::createTokenizer() 284 286 { 285 return new HTMLTokenizer(this); 287 bool reportErrors = false; 288 if (Page* page = m_frame->page()) 289 if (InspectorController* controller = page->inspectorController()) 290 reportErrors = controller->windowVisible(); 291 292 return new HTMLTokenizer(this, reportErrors); 286 293 } 287 294 -
trunk/WebCore/html/HTMLParser.cpp
r21864 r23677 110 110 */ 111 111 112 HTMLParser::HTMLParser(HTMLDocument* doc )112 HTMLParser::HTMLParser(HTMLDocument* doc, bool reportErrors) 113 113 : document(doc) 114 114 , current(doc) … … 120 120 , haveFrameSet(false) 121 121 , m_isParsingFragment(false) 122 , m_reportErrors( false)122 , m_reportErrors(reportErrors) 123 123 , inStrayTableContent(0) 124 124 { -
trunk/WebCore/html/HTMLParser.h
r21726 r23677 49 49 class HTMLParser : Noncopyable { 50 50 public: 51 HTMLParser(HTMLDocument* );51 HTMLParser(HTMLDocument*, bool reportErrors); 52 52 HTMLParser(DocumentFragment*); 53 53 virtual ~HTMLParser(); -
trunk/WebCore/html/HTMLTokenizer.cpp
r21749 r23677 142 142 // ---------------------------------------------------------------------------- 143 143 144 HTMLTokenizer::HTMLTokenizer(HTMLDocument* doc )144 HTMLTokenizer::HTMLTokenizer(HTMLDocument* doc, bool reportErrors) 145 145 : Tokenizer() 146 146 , buffer(0) … … 153 153 , m_timer(this, &HTMLTokenizer::timerFired) 154 154 , m_doc(doc) 155 , parser(new HTMLParser(doc ))155 , parser(new HTMLParser(doc, reportErrors)) 156 156 , inWrite(false) 157 157 , m_fragment(false) -
trunk/WebCore/html/HTMLTokenizer.h
r21746 r23677 88 88 class HTMLTokenizer : public Tokenizer, public CachedResourceClient { 89 89 public: 90 HTMLTokenizer(HTMLDocument* );90 HTMLTokenizer(HTMLDocument*, bool reportErrors); 91 91 HTMLTokenizer(HTMLViewSourceDocument*); 92 92 HTMLTokenizer(DocumentFragment*); -
trunk/WebCore/loader/DocumentLoader.h
r23627 r23677 62 62 63 63 void setFrame(Frame*); 64 Frame* frame() const { return m_frame; } 65 64 66 virtual void attachToFrame(); 65 67 virtual void detachFromFrame(); -
trunk/WebCore/loader/FrameLoader.cpp
r23577 r23677 61 61 #include "IconDatabase.h" 62 62 #include "IconLoader.h" 63 #include "InspectorController.h" 63 64 #include "Logging.h" 64 65 #include "MainResourceLoader.h" … … 841 842 { 842 843 clear(); 843 partClearedInBegin();844 dispatchWindowObjectAvailable(); 844 845 845 846 m_needsClear = true; … … 2470 2471 m_committedFirstRealDocumentLoad = true; 2471 2472 2472 m_client->dispatchDidCommitLoad();2473 dispatchDidCommitLoad(); 2473 2474 2474 2475 // If we have a title let the WebView know about it. … … 2824 2825 2825 2826 unsigned long identifier = m_frame->page()->progress()->createUniqueIdentifier(); 2826 m_client->assignIdentifierToInitialRequest(identifier, m_provisionalDocumentLoader.get(), m_provisionalDocumentLoader->originalRequest());2827 dispatchAssignIdentifierToInitialRequest(identifier, m_provisionalDocumentLoader.get(), m_provisionalDocumentLoader->originalRequest()); 2827 2828 2828 2829 if (!m_provisionalDocumentLoader->startLoadingMainResource(identifier)) … … 2986 2987 saveScrollPositionAndViewStateToItem(currentHistoryItem()); 2987 2988 detachChildren(); 2989 2990 if (m_frame->page()) { 2991 if (InspectorController* inspector = m_frame->page()->inspectorController()) 2992 inspector->frameDetachedFromParent(m_frame); 2993 } 2994 2988 2995 m_client->detachedFromParent2(); 2989 2996 setDocumentLoader(0); … … 3132 3139 void FrameLoader::assignIdentifierToInitialRequest(unsigned long identifier, const ResourceRequest& clientRequest) 3133 3140 { 3134 return m_client->assignIdentifierToInitialRequest(identifier, activeDocumentLoader(), clientRequest);3141 return dispatchAssignIdentifierToInitialRequest(identifier, activeDocumentLoader(), clientRequest); 3135 3142 } 3136 3143 … … 3138 3145 { 3139 3146 applyUserAgent(clientRequest); 3140 m_client->dispatchWillSendRequest(loader->documentLoader(), loader->identifier(), clientRequest, redirectResponse);3147 dispatchWillSendRequest(loader->documentLoader(), loader->identifier(), clientRequest, redirectResponse); 3141 3148 } 3142 3149 … … 3147 3154 if (m_frame->page()) 3148 3155 m_frame->page()->progress()->incrementProgress(loader->identifier(), r); 3149 m_client->dispatchDidReceiveResponse(loader->documentLoader(), loader->identifier(), r);3156 dispatchDidReceiveResponse(loader->documentLoader(), loader->identifier(), r); 3150 3157 } 3151 3158 … … 3154 3161 if (m_frame->page()) 3155 3162 m_frame->page()->progress()->incrementProgress(loader->identifier(), data, length); 3156 m_client->dispatchDidReceiveContentLength(loader->documentLoader(), loader->identifier(), lengthReceived);3163 dispatchDidReceiveContentLength(loader->documentLoader(), loader->identifier(), lengthReceived); 3157 3164 } 3158 3165 … … 3469 3476 { 3470 3477 if (!response.isNull()) 3471 m_client->dispatchDidReceiveResponse(m_documentLoader.get(), identifier, response);3478 dispatchDidReceiveResponse(m_documentLoader.get(), identifier, response); 3472 3479 3473 3480 if (length > 0) 3474 m_client->dispatchDidReceiveContentLength(m_documentLoader.get(), identifier, length);3481 dispatchDidReceiveContentLength(m_documentLoader.get(), identifier, length); 3475 3482 3476 3483 if (error.isNull()) 3477 m_client->dispatchDidFinishLoading(m_documentLoader.get(), identifier);3484 dispatchDidFinishLoading(m_documentLoader.get(), identifier); 3478 3485 else 3479 3486 m_client->dispatchDidFailLoading(m_documentLoader.get(), identifier, error); … … 3485 3492 3486 3493 identifier = m_frame->page()->progress()->createUniqueIdentifier(); 3487 m_client->assignIdentifierToInitialRequest(identifier, m_documentLoader.get(), request);3494 dispatchAssignIdentifierToInitialRequest(identifier, m_documentLoader.get(), request); 3488 3495 3489 3496 ResourceRequest newRequest(request); 3490 m_client->dispatchWillSendRequest(m_documentLoader.get(), identifier, newRequest, ResourceResponse());3497 dispatchWillSendRequest(m_documentLoader.get(), identifier, newRequest, ResourceResponse()); 3491 3498 3492 3499 if (newRequest.isNull()) … … 3500 3507 void FrameLoader::loadedResourceFromMemoryCache(const ResourceRequest& request, const ResourceResponse& response, int length) 3501 3508 { 3502 if ( m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, response, length))3509 if (dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, response, length)) 3503 3510 return; 3504 3511 … … 4202 4209 if (m_frame->page()) 4203 4210 m_frame->page()->progress()->completeProgress(loader->identifier()); 4204 m_client->dispatchDidFinishLoading(loader->documentLoader(), loader->identifier());4211 dispatchDidFinishLoading(loader->documentLoader(), loader->identifier()); 4205 4212 } 4206 4213 … … 4318 4325 } 4319 4326 4320 void FrameLoader:: partClearedInBegin()4327 void FrameLoader::dispatchWindowObjectAvailable() 4321 4328 { 4322 4329 Settings* settings = m_frame->settings(); 4323 if (settings && settings->isJavaScriptEnabled()) 4330 if (settings && settings->isJavaScriptEnabled()) { 4324 4331 m_client->windowObjectCleared(); 4332 4333 if (InspectorController* inspector = m_frame->page()->parentInspectorController()) 4334 inspector->windowScriptObjectAvailable(); 4335 } 4325 4336 } 4326 4337 … … 4405 4416 String scheme = url.left(loc); 4406 4417 return localSchemes().contains(scheme); 4418 } 4419 4420 void FrameLoader::dispatchDidCommitLoad() 4421 { 4422 m_client->dispatchDidCommitLoad(); 4423 4424 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4425 inspector->didCommitLoad(m_documentLoader.get()); 4426 } 4427 4428 void FrameLoader::dispatchAssignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request) 4429 { 4430 m_client->assignIdentifierToInitialRequest(identifier, loader, request); 4431 4432 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4433 inspector->identifierForInitialRequest(identifier, loader, request); 4434 } 4435 4436 void FrameLoader::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse) 4437 { 4438 m_client->dispatchWillSendRequest(loader, identifier, request, redirectResponse); 4439 4440 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4441 inspector->willSendRequest(loader, identifier, request, redirectResponse); 4442 } 4443 4444 void FrameLoader::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r) 4445 { 4446 m_client->dispatchDidReceiveResponse(loader, identifier, r); 4447 4448 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4449 inspector->didReceiveResponse(loader, identifier, r); 4450 } 4451 4452 void FrameLoader::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int length) 4453 { 4454 m_client->dispatchDidReceiveContentLength(loader, identifier, length); 4455 4456 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4457 inspector->didReceiveContentLength(loader, identifier, length); 4458 } 4459 4460 void FrameLoader::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier) 4461 { 4462 m_client->dispatchDidFinishLoading(loader, identifier); 4463 4464 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4465 inspector->didFinishLoading(loader, identifier); 4466 } 4467 4468 bool FrameLoader::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, const ResourceRequest& request, const ResourceResponse& response, int length) 4469 { 4470 bool result = m_client->dispatchDidLoadResourceFromMemoryCache(loader, request, response, length); 4471 4472 if (InspectorController* inspector = m_frame->page()->inspectorController()) 4473 inspector->didLoadResourceFromMemoryCache(loader, request, response, length); 4474 4475 return result; 4407 4476 } 4408 4477 -
trunk/WebCore/loader/FrameLoader.h
r21793 r23677 335 335 Widget* createJavaAppletWidget(const IntSize&, Element*, const HashMap<String, String>& args); 336 336 337 void partClearedInBegin();337 void dispatchWindowObjectAvailable(); 338 338 void restoreDocumentState(); 339 339 … … 552 552 #endif 553 553 554 void dispatchDidCommitLoad(); 555 void dispatchAssignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&); 556 void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse); 557 void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&); 558 void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int length); 559 void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier); 560 bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length); 561 554 562 Frame* m_frame; 555 563 FrameLoaderClient* m_client; -
trunk/WebCore/loader/FrameLoaderClient.h
r21793 r23677 59 59 class ResourceHandle; 60 60 class ResourceLoader; 61 class ResourceRequest;62 61 class ResourceResponse; 63 62 class SharedBuffer; … … 65 64 class String; 66 65 class Widget; 66 67 struct ResourceRequest; 67 68 68 69 typedef void (FrameLoader::*FramePolicyFunction)(PolicyAction); -
trunk/WebCore/page/Chrome.cpp
r23510 r23677 26 26 #include "FloatRect.h" 27 27 #include "Frame.h" 28 #include "InspectorController.h" 28 29 #include "Page.h" 29 30 #include "ResourceHandle.h" … … 185 186 if (source == JSMessageSource && level == ErrorMessageLevel) 186 187 m_client->addMessageToConsole(message, lineNumber, sourceID); 188 189 if (InspectorController* inspector = m_page->inspectorController()) 190 inspector->addMessageToConsole(source, level, message, lineNumber, sourceID); 187 191 } 188 192 -
trunk/WebCore/page/Chrome.h
r21706 r23677 48 48 XMLMessageSource, 49 49 JSMessageSource, 50 CSSMessageSource 50 CSSMessageSource, 51 OtherMessageSource 51 52 }; 52 53 53 54 enum MessageLevel { 55 TipMessageLevel, 54 56 LogMessageLevel, 55 57 WarningMessageLevel, -
trunk/WebCore/page/ContextMenuClient.h
r19764 r23677 50 50 virtual void speak(const String&) = 0; 51 51 virtual void stopSpeaking() = 0; 52 virtual bool shouldIncludeInspectElementItem() = 0; 52 53 53 54 #if PLATFORM(MAC) -
trunk/WebCore/page/ContextMenuController.cpp
r21081 r23677 43 43 #include "HitTestRequest.h" 44 44 #include "HitTestResult.h" 45 #include "InspectorController.h" 45 46 #include "KURL.h" 46 47 #include "MouseEvent.h" … … 94 95 PlatformMenuDescription customMenu = m_client->getCustomMenuFromDefaultItems(m_contextMenu.get()); 95 96 m_contextMenu->setPlatformDescription(customMenu); 97 if (m_client->shouldIncludeInspectElementItem()) 98 m_contextMenu->addInspectElementItem(); 96 99 event->setDefaultHandled(); 97 100 } … … 270 273 break; 271 274 #endif 275 case ContextMenuItemTagInspectElement: 276 if (InspectorController* inspector = frame->page()->inspectorController()) 277 inspector->inspect(result.innerNonSharedNode()); 278 break; 272 279 default: 273 280 break; -
trunk/WebCore/page/InspectorClient.h
r23676 r23677 1 1 /* 2 * Copyright (C) 200 6, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i nclude <WebCore/ContextMenuClient.h>27 # include <wtf/Forward.h>26 #ifndef InspectorClient_h 27 #define InspectorClient_h 28 28 29 29 namespace WebCore { 30 class String;31 }32 class WebView;33 30 34 class WebContextMenuClient : public WebCore::ContextMenuClient { 31 class Node; 32 class Page; 33 class String; 34 35 class InspectorClient { 35 36 public: 36 WebContextMenuClient(WebView*);37 virtual ~InspectorClient() { } 37 38 38 virtual void contextMenuDestroyed();39 virtual void inspectorDestroyed() = 0; 39 40 40 virtual HMENU getCustomMenuFromDefaultItems(WebCore::ContextMenu*); 41 virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*); 42 43 virtual void downloadURL(const WebCore::KURL&); 44 virtual void searchWithGoogle(const WebCore::Frame*); 45 virtual void lookUpInDictionary(WebCore::Frame*); 46 virtual void speak(const WebCore::String&); 47 virtual void stopSpeaking(); 41 virtual Page* createPage() = 0; 48 42 49 private: 50 WebView* m_webView; 43 virtual void showWindow() = 0; 44 virtual void closeWindow() = 0; 45 46 virtual void attachWindow() = 0; 47 virtual void detachWindow() = 0; 48 49 virtual void highlight(Node*) = 0; 50 virtual void hideHighlight() = 0; 51 52 virtual void inspectedURLChanged(const String& newURL) = 0; 51 53 }; 54 55 } // namespace WebCore 56 57 #endif // !defined(InspectorClient_h) -
trunk/WebCore/page/Page.cpp
r22065 r23677 34 34 #include "FrameView.h" 35 35 #include "HistoryItem.h" 36 #include "InspectorController.h" 36 37 #include "ProgressTracker.h" 37 38 #include "RenderWidget.h" … … 64 65 , m_tabKeyCyclesThroughElements(true) 65 66 , m_defersLoading(false) 67 , m_parentInspectorController(0) 66 68 { 67 69 if (!allPages) { … … 202 204 } 203 205 206 void Page::setInspectorClient(InspectorClient* client) 207 { 208 m_inspectorController.set(new InspectorController(this, client)); 209 } 210 204 211 } // namespace WebCore -
trunk/WebCore/page/Page.h
r22065 r23677 45 45 class FocusController; 46 46 class Frame; 47 class InspectorClient; 48 class InspectorController; 47 49 class Node; 48 50 class ProgressTracker; … … 88 90 FocusController* focusController() const { return m_focusController.get(); } 89 91 ContextMenuController* contextMenuController() const { return m_contextMenuController.get(); } 92 InspectorController* inspectorController() const { return m_inspectorController.get(); } 90 93 Settings* settings() const { return m_settings.get(); } 91 94 ProgressTracker* progress() const { return m_progress.get(); } 95 96 void setInspectorClient(InspectorClient*); 97 98 void setParentInspectorController(InspectorController* controller) { m_parentInspectorController = controller; } 99 InspectorController* parentInspectorController() const { return m_parentInspectorController; } 92 100 93 101 void setTabKeyCyclesThroughElements(bool b) { m_tabKeyCyclesThroughElements = b; } … … 113 121 OwnPtr<FocusController> m_focusController; 114 122 OwnPtr<ContextMenuController> m_contextMenuController; 123 OwnPtr<InspectorController> m_inspectorController; 115 124 OwnPtr<Settings> m_settings; 116 125 OwnPtr<ProgressTracker> m_progress; … … 128 137 bool m_defersLoading; 129 138 139 InspectorController* m_parentInspectorController; 140 130 141 #if PLATFORM(WIN) 131 142 static HINSTANCE s_instanceHandle; -
trunk/WebCore/page/inspector/treeoutline.js
r23676 r23677 53 53 lastChild.nextSibling = child; 54 54 child.previousSibling = lastChild; 55 } else { 56 child.previousSibling = null; 57 child.nextSibling = null; 55 58 } 56 59 … … 61 64 child.treeOutline._rememberTreeElement(child); 62 65 66 var current = child.children[0]; 67 while (current) { 68 current.treeOutline = this.treeOutline; 69 current.treeOutline._rememberTreeElement(current); 70 current = current.traverseNextTreeElement(false, child, true); 71 } 72 63 73 if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined) 64 74 child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier]; 65 75 66 if (this.expanded || this.root) 67 child._attach(); 76 if (!this._childrenListNode) { 77 this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol"); 78 this._childrenListNode.parentTreeElement = this; 79 this._childrenListNode.addStyleClass("children"); 80 if (this.hidden) 81 this._childrenListNode.addStyleClass("hidden"); 82 } 83 84 child._attach(); 85 } 86 87 TreeOutline._insertChild = function(child, index) 88 { 89 if (!child) 90 throw("child can't be undefined or null"); 91 92 var previousChild = (index > 0 ? this.children[index - 1] : null); 93 if (previousChild) { 94 previousChild.nextSibling = child; 95 child.previousSibling = previousChild; 96 } else { 97 child.previousSibling = null; 98 } 99 100 var nextChild = this.children[index]; 101 if (nextChild) { 102 nextChild.previousSibling = child; 103 child.nextSibling = nextChild; 104 } else { 105 child.nextSibling = null; 106 } 107 108 this.children.splice(index, 0, child); 109 this.hasChildren = true; 110 child.parent = this; 111 child.treeOutline = this.treeOutline; 112 child.treeOutline._rememberTreeElement(child); 113 114 var current = child.children[0]; 115 while (current) { 116 current.treeOutline = this.treeOutline; 117 current.treeOutline._rememberTreeElement(current); 118 current = current.traverseNextTreeElement(false, child, true); 119 } 120 121 if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined) 122 child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier]; 123 124 if (!this._childrenListNode) { 125 this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol"); 126 this._childrenListNode.parentTreeElement = this; 127 this._childrenListNode.addStyleClass("children"); 128 if (this.hidden) 129 this._childrenListNode.addStyleClass("hidden"); 130 } 131 132 child._attach(); 68 133 } 69 134 … … 111 176 112 177 this.children = []; 178 179 if (this._childrenListNode) 180 this._childrenListNode.offsetTop; // force layout 113 181 } 114 182 … … 131 199 child._detach(); 132 200 child.children = []; 133 child.hasChildren = false;134 201 child.treeOutline = null; 135 202 child.parent = null; … … 170 237 } 171 238 172 TreeOutline.prototype.findTreeElement = function(representedObject )173 { 174 if (!representedObject || !representedObject.__treeElementIdentifier)239 TreeOutline.prototype.findTreeElement = function(representedObject, isAncestor, getParent) 240 { 241 if (!representedObject) 175 242 return null; 176 243 177 var elements = this._knownTreeElements[representedObject.__treeElementIdentifier]; 178 if (!elements) 244 if ("__treeElementIdentifier" in representedObject) { 245 var elements = this._knownTreeElements[representedObject.__treeElementIdentifier]; 246 if (!elements) 247 return null; 248 249 for (var i = 0; i < elements.length; ++i) 250 if (elements[i].representedObject === representedObject) 251 return elements[i]; 252 } 253 254 if (!isAncestor || !(isAncestor instanceof Function) || !getParent || !(getParent instanceof Function)) 179 255 return null; 180 256 181 for (var i = 0; i < elements.length; ++i) 182 if (elements[i].representedObject === representedObject) 183 return elements[i]; 184 185 return null; 257 var item; 258 var found = false; 259 for (var i = 0; i < this.children.length; ++i) { 260 item = this.children[i]; 261 if (item.representedObject === representedObject || isAncestor(item.representedObject, representedObject)) { 262 found = true; 263 break; 264 } 265 } 266 267 if (!found) 268 return null; 269 270 var ancestors = []; 271 var currentObject = representedObject; 272 while (currentObject) { 273 ancestors.unshift(currentObject); 274 if (currentObject === item.representedObject) 275 break; 276 currentObject = getParent(currentObject); 277 } 278 279 for (var i = 0; i < ancestors.length; ++i) { 280 item = this.findTreeElement(ancestors[i]); 281 if (ancestors[i] !== representedObject && item.onpopulate) 282 item.onpopulate(item); 283 } 284 285 return item; 186 286 } 187 287 … … 189 289 { 190 290 if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey) 191 return ;291 return false; 192 292 193 293 var handled = false; … … 195 295 if (event.keyIdentifier === "Up" && !event.altKey) { 196 296 nextSelectedElement = this.selectedTreeElement.traversePreviousTreeElement(true); 197 handled = true; 297 while (nextSelectedElement && !nextSelectedElement.selectable) 298 nextSelectedElement = nextSelectedElement.traversePreviousTreeElement(false); 299 handled = nextSelectedElement ? true : false; 198 300 } else if (event.keyIdentifier === "Down" && !event.altKey) { 199 301 nextSelectedElement = this.selectedTreeElement.traverseNextTreeElement(true); 200 handled = true; 302 while (nextSelectedElement && !nextSelectedElement.selectable) 303 nextSelectedElement = nextSelectedElement.traverseNextTreeElement(false); 304 handled = nextSelectedElement ? true : false; 201 305 } else if (event.keyIdentifier === "Left") { 202 306 if (this.selectedTreeElement.expanded) { … … 207 311 handled = true; 208 312 } else if (this.selectedTreeElement.parent && !this.selectedTreeElement.parent.root) { 209 nextSelectedElement = this.selectedTreeElement.parent;210 313 handled = true; 314 if (this.selectedTreeElement.parent.selectable) { 315 nextSelectedElement = this.selectedTreeElement.parent; 316 handled = nextSelectedElement ? true : false; 317 } else if (this.selectedTreeElement.parent) 318 this.selectedTreeElement.parent.collapse(); 211 319 } 212 320 } else if (event.keyIdentifier === "Right") { 213 if (this.selectedTreeElement.hasChildren) { 214 if (event.altKey) 215 this.selectedTreeElement.expandRecursively(); 216 else 217 this.selectedTreeElement.expand(); 321 if (!this.selectedTreeElement.revealed()) { 322 this.selectedTreeElement.reveal(); 218 323 handled = true; 324 } else if (this.selectedTreeElement.hasChildren) { 325 handled = true; 326 if (this.selectedTreeElement.expanded) { 327 nextSelectedElement = this.selectedTreeElement.children[0]; 328 handled = nextSelectedElement ? true : false; 329 } else { 330 if (event.altKey) 331 this.selectedTreeElement.expandRecursively(); 332 else 333 this.selectedTreeElement.expand(); 334 } 219 335 } 336 } 337 338 if (nextSelectedElement) { 339 nextSelectedElement.reveal(); 340 nextSelectedElement.select(); 220 341 } 221 342 … … 225 346 } 226 347 227 if (nextSelectedElement) { 228 nextSelectedElement.reveal(); 229 nextSelectedElement.select(); 230 } 348 return handled; 231 349 } 232 350 … … 252 370 253 371 TreeOutline.prototype.appendChild = TreeOutline._appendChild; 372 TreeOutline.prototype.insertChild = TreeOutline._insertChild; 254 373 TreeOutline.prototype.removeChild = TreeOutline._removeChild; 255 374 TreeOutline.prototype.removeChildren = TreeOutline._removeChildren; … … 258 377 function TreeElement(title, representedObject, hasChildren) 259 378 { 260 this. title = title;379 this._title = title; 261 380 this.representedObject = representedObject; 262 381 … … 268 387 } 269 388 389 this._hidden = false; 270 390 this.expanded = false; 271 391 this.selected = false; 392 this.selectable = true; 272 393 this.hasChildren = hasChildren; 273 394 this.children = []; … … 286 407 } 287 408 288 TreeElement.prototype.updateTitle = function(title) 289 { 290 this.title = title; 291 if (this._listItemNode) 292 this._listItemNode.innerHTML = title; 409 TreeElement.prototype = { 410 get title() { 411 return this._title; 412 }, 413 414 set title(x) { 415 this._title = x; 416 if (this._listItemNode) 417 this._listItemNode.innerHTML = x; 418 }, 419 420 get tooltip() { 421 return this._tooltip; 422 }, 423 424 set tooltip(x) { 425 this._tooltip = x; 426 if (this._listItemNode) 427 this._listItemNode.title = x ? x : ""; 428 }, 429 430 get hidden() { 431 return this._hidden; 432 }, 433 434 set hidden(x) { 435 if (this._hidden === x) 436 return; 437 438 this._hidden = x; 439 440 if (x) { 441 if (this._listItemNode) 442 this._listItemNode.addStyleClass("hidden"); 443 if (this._childrenListNode) 444 this._childrenListNode.addStyleClass("hidden"); 445 } else { 446 if (this._listItemNode) 447 this._listItemNode.removeStyleClass("hidden"); 448 if (this._childrenListNode) 449 this._childrenListNode.removeStyleClass("hidden"); 450 } 451 } 293 452 } 294 453 295 454 TreeElement.prototype.appendChild = TreeOutline._appendChild; 455 TreeElement.prototype.insertChild = TreeOutline._insertChild; 296 456 TreeElement.prototype.removeChild = TreeOutline._removeChild; 297 457 TreeElement.prototype.removeChildren = TreeOutline._removeChildren; … … 306 466 this._listItemNode = this.treeOutline._childrenListNode.ownerDocument.createElement("li"); 307 467 this._listItemNode.treeElement = this; 308 this._listItemNode.innerHTML = this.title; 309 468 this._listItemNode.innerHTML = this._title; 469 this._listItemNode.title = this._tooltip ? this._tooltip : ""; 470 471 if (this.hidden) 472 this._listItemNode.addStyleClass("hidden"); 310 473 if (this.hasChildren) 311 474 this._listItemNode.addStyleClass("parent"); … … 320 483 } 321 484 322 this.parent._childrenListNode. appendChild(this._listItemNode);485 this.parent._childrenListNode.insertBefore(this._listItemNode, (this.nextSibling ? this.nextSibling._listItemNode : null)); 323 486 if (this._childrenListNode) 324 this.parent._childrenListNode.appendChild(this._childrenListNode); 325 else if (this.hasChildren && this.expanded) 487 this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling); 488 if (this.selected) 489 this.select(); 490 if (this.expanded) 326 491 this.expand(); 327 492 } … … 338 503 { 339 504 var element = event.currentTarget; 340 if (!element || !element.treeElement )505 if (!element || !element.treeElement || !element.treeElement.selectable) 341 506 return; 342 507 … … 413 578 this._childrenListNode.parentNode.removeChild(this._childrenListNode); 414 579 415 if (this.refreshChildren)416 this.children = [];417 418 580 this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol"); 419 581 this._childrenListNode.parentTreeElement = this; 420 582 this._childrenListNode.addStyleClass("children"); 583 584 if (this.hidden) 585 this._childrenListNode.addStyleClass("hidden"); 421 586 422 587 if (this.onpopulate) … … 429 594 430 595 delete this.refreshChildren; 431 432 if (this._listItemNode) 433 this._listItemNode.parentNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling); 434 } 435 436 if (this._listItemNode) 596 } 597 598 if (this._listItemNode) { 437 599 this._listItemNode.addStyleClass("expanded"); 600 if (this._childrenListNode.parentNode != this._listItemNode.parentNode) 601 this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling); 602 } 603 438 604 if (this._childrenListNode) 439 605 this._childrenListNode.addStyleClass("expanded"); … … 481 647 } 482 648 483 TreeElement.prototype.select = function( )484 { 485 if (!this.treeOutline )649 TreeElement.prototype.select = function(supressOnSelect) 650 { 651 if (!this.treeOutline || !this.selectable || this.selected) 486 652 return; 487 653 488 if (this.treeOutline.selectedTreeElement) { 489 this.treeOutline.selectedTreeElement.selected = false; 490 if (this.treeOutline.selectedTreeElement._listItemNode) 491 this.treeOutline.selectedTreeElement._listItemNode.removeStyleClass("selected"); 492 } 654 if (this.treeOutline.selectedTreeElement) 655 this.treeOutline.selectedTreeElement.deselect(); 493 656 494 657 this.selected = true; … … 497 660 this._listItemNode.addStyleClass("selected"); 498 661 499 if (this.onselect )662 if (this.onselect && !supressOnSelect) 500 663 this.onselect(this); 501 664 } 502 665 503 TreeElement.prototype.deselect = function( )504 { 505 if (!this.treeOutline || this.treeOutline.selectedTreeElement !== this )666 TreeElement.prototype.deselect = function(supressOnDeselect) 667 { 668 if (!this.treeOutline || this.treeOutline.selectedTreeElement !== this || !this.selected) 506 669 return; 507 670 … … 511 674 this._listItemNode.removeStyleClass("selected"); 512 675 513 if (this.ondeselect )676 if (this.ondeselect && !supressOnDeselect) 514 677 this.ondeselect(this); 515 678 } -
trunk/WebCore/page/mac/WebCoreViewFactory.h
r19919 r23677 90 90 - (NSString *)contextMenuItemTagLeftToRight; 91 91 - (NSString *)contextMenuItemTagRightToLeft; 92 - (NSString *)contextMenuItemTagInspectElement; 92 93 93 94 - (NSString *)searchMenuNoRecentSearchesText; -
trunk/WebCore/platform/ContextMenu.cpp
r21237 r23677 378 378 } 379 379 380 void ContextMenu::addInspectElementItem() 381 { 382 Node* node = m_hitTestResult.innerNonSharedNode(); 383 if (!node) 384 return; 385 386 Frame* frame = node->document()->frame(); 387 if (!frame) 388 return; 389 390 if (!frame->page()->inspectorController()) 391 return; 392 393 ContextMenuItem InspectElementItem(ActionType, ContextMenuItemTagInspectElement, contextMenuItemTagInspectElement()); 394 // FIXME: Need to only add this if the developer tools preference is set 395 appendItem(*separatorItem()); 396 appendItem(InspectElementItem); 397 } 398 380 399 static bool triStateToBool(Frame::TriState state) 381 400 { … … 517 536 case ContextMenuItemTagPDFSinglePageScrolling: 518 537 case ContextMenuItemTagPDFFacingPagesScrolling: 538 case ContextMenuItemTagInspectElement: 519 539 case ContextMenuItemBaseApplicationTag: 520 540 break; -
trunk/WebCore/platform/ContextMenu.h
r20475 r23677 52 52 53 53 void populate(); 54 void addInspectElementItem(); 54 55 void checkOrEnableIfNeeded(ContextMenuItem&) const; 55 56 -
trunk/WebCore/platform/ContextMenuItem.h
r20862 r23677 120 120 ContextMenuItemTagPDFSinglePageScrolling, 121 121 ContextMenuItemTagPDFFacingPagesScrolling, 122 ContextMenuItemTagInspectElement, 122 123 ContextMenuItemBaseApplicationTag = 10000 123 124 }; -
trunk/WebCore/platform/LocalizedStrings.h
r19919 r23677 82 82 String contextMenuItemTagStopSpeaking(); 83 83 #endif 84 String contextMenuItemTagInspectElement(); 84 85 85 86 String searchMenuNoRecentSearchesText(); -
trunk/WebCore/platform/graphics/svg/SVGImageEmptyClients.h
r21793 r23677 370 370 virtual void speak(const String&) { } 371 371 virtual void stopSpeaking() { } 372 372 virtual bool shouldIncludeInspectElementItem() { return false; } 373 373 374 #if PLATFORM(MAC) 374 375 virtual void searchWithSpotlight() { } -
trunk/WebCore/platform/mac/LocalizedStringsMac.mm
r19919 r23677 425 425 } 426 426 427 String contextMenuItemTagInspectElement() 428 { 429 BEGIN_BLOCK_OBJC_EXCEPTIONS; 430 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagInspectElement]; 431 END_BLOCK_OBJC_EXCEPTIONS; 432 return String(); 433 } 434 427 435 String searchMenuNoRecentSearchesText() 428 436 { -
trunk/WebCore/platform/win/ScrollViewWin.cpp
r23462 r23677 425 425 if (m_data->m_inUpdateScrollbars) 426 426 return; 427 428 // FIXME: This code is here so we don't have to fork FrameView.h/.cpp. 429 // In the end, FrameView should just merge with ScrollView. 430 if (static_cast<const FrameView*>(this)->frame()->prohibitsScrolling()) 431 return; 427 432 428 433 m_data->m_inUpdateScrollbars = true; -
trunk/WebKit/ChangeLog
r23654 r23677 1 2007-06-20 Adam Roben <aroben@apple.com> 2 3 Land the new Inspector. 4 5 Co-written with Tim Hatcher. 6 7 Reviewed by Anders, Adele, Hyatt, and Sam. 8 9 Implement the InspectorClient interface. 10 11 * WebCoreSupport/WebInspectorClient.h: Added. 12 * WebCoreSupport/WebInspectorClient.mm: Added. 13 (WebInspectorClient::WebInspectorClient): 14 (WebInspectorClient::inspectorDestroyed): 15 (WebInspectorClient::createPage): 16 (WebInspectorClient::showWindow): 17 (WebInspectorClient::closeWindow): 18 (WebInspectorClient::attachWindow): 19 (WebInspectorClient::detachWindow): 20 (WebInspectorClient::highlight): 21 (WebInspectorClient::hideHighlight): 22 (WebInspectorClient::inspectedURLChanged): 23 (WebInspectorClient::updateWindowTitle): 24 (-[WebInspectorWindowController init]): 25 (-[WebInspectorWindowController initWithInspectedWebView:]): 26 (-[WebInspectorWindowController dealloc]): 27 (-[WebInspectorWindowController inspectorVisible]): 28 (-[WebInspectorWindowController webView]): 29 (-[WebInspectorWindowController window]): 30 (-[WebInspectorWindowController windowShouldClose:]): 31 (-[WebInspectorWindowController close]): 32 (-[WebInspectorWindowController showWindow:]): 33 (-[WebInspectorWindowController attach]): 34 (-[WebInspectorWindowController detach]): 35 (-[WebInspectorWindowController highlightAndScrollToNode:]): 36 (-[WebInspectorWindowController highlightNode:]): 37 (-[WebInspectorWindowController hideHighlight]): 38 (-[WebInspectorWindowController animationDidEnd:]): 39 40 Add an easier-to-see highlight. 41 42 * Misc/WebNSViewExtras.h: 43 * Misc/WebNSViewExtras.m: 44 (-[NSView _web_convertRect:toView:]): 45 * WebInspector/WebNodeHighlight.h: 46 * WebInspector/WebNodeHighlight.m: 47 (-[WebNodeHighlightFadeInAnimation setCurrentProgress:]): 48 (-[WebNodeHighlight initWithTargetView:]): 49 (-[WebNodeHighlight setHighlightedNode:]): 50 (-[WebNodeHighlight highlightedNode]): 51 (-[WebNodeHighlight dealloc]): 52 (-[WebNodeHighlight attachHighlight]): 53 (-[WebNodeHighlight delegate]): 54 (-[WebNodeHighlight detachHighlight]): 55 (-[WebNodeHighlight show]): 56 (-[WebNodeHighlight hide]): 57 (-[WebNodeHighlight animationDidEnd:]): 58 (-[WebNodeHighlight ignoresMouseEvents]): 59 (-[WebNodeHighlight highlightView]): 60 (-[WebNodeHighlight setDelegate:]): 61 (-[WebNodeHighlight setHolesNeedUpdateInTargetViewRect:]): 62 (-[WebNodeHighlight setIgnoresMouseEvents:]): 63 (-[WebNodeHighlight targetView]): 64 (-[WebNodeHighlight _computeHighlightWindowFrame]): 65 (-[WebNodeHighlight _repositionHighlightWindow]): 66 * WebInspector/WebNodeHighlightView.h: 67 * WebInspector/WebNodeHighlightView.m: 68 (-[WebNodeHighlightView initWithWebNodeHighlight:]): 69 (-[WebNodeHighlightView dealloc]): 70 (-[WebNodeHighlightView detachFromWebNodeHighlight]): 71 (-[WebNodeHighlightView drawRect:]): 72 (-[WebNodeHighlightView webNodeHighlight]): 73 (-[WebNodeHighlightView fractionFadedIn]): 74 (-[WebNodeHighlightView setFractionFadedIn:]): 75 (-[WebNodeHighlightView setHolesNeedUpdateInRect:]): 76 (-[WebNodeHighlightView _holes]): 77 78 WebView changes needed for the new Inspector. 79 80 * WebView/WebView.mm: Remove the old _inspectElement method now that 81 this is handled by WebCore. 82 (-[WebView _isClosed]): Added. 83 (-[WebView initWithFrame]): Give each Page an InspectorClient to 84 enable the Inspector. 85 * WebView/WebViewPrivate.h: 86 87 Updates needed for WebCore changes. 88 89 * WebCoreSupport/WebContextMenuClient.h: 90 * WebCoreSupport/WebContextMenuClient.mm: 91 * WebCoreSupport/WebViewFactory.mm: 92 (-[WebViewFactory contextMenuItemTagInspectElement]): 93 * WebView/WebUIDelegatePrivate.h: 94 95 Remove old Inspector code. 96 97 * WebCoreSupport/WebFrameLoaderClient.mm: 98 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): 99 (WebFrameLoaderClient::assignIdentifierToInitialRequest): 100 (WebFrameLoaderClient::dispatchDidFinishLoading): 101 * WebInspector/WebInspector.m: Removed. 102 * WebInspector/WebInspectorPanel.h: Removed. 103 * WebInspector/WebInspectorPanel.m: Removed. 104 * WebInspector/webInspector/Images/button.png: Removed. 105 * WebInspector/webInspector/Images/buttonDivider.png: Removed. 106 * WebInspector/webInspector/Images/buttonPressed.png: Removed. 107 * WebInspector/webInspector/Images/close.png: Removed. 108 * WebInspector/webInspector/Images/closePressed.png: Removed. 109 * WebInspector/webInspector/Images/downTriangle.png: Removed. 110 * WebInspector/webInspector/Images/menu.png: Removed. 111 * WebInspector/webInspector/Images/menuPressed.png: Removed. 112 * WebInspector/webInspector/Images/popup.png: Removed. 113 * WebInspector/webInspector/Images/popupPressed.png: Removed. 114 * WebInspector/webInspector/Images/resize.png: Removed. 115 * WebInspector/webInspector/Images/rightTriangle.png: Removed. 116 * WebInspector/webInspector/Images/scrollThumbBottom.png: Removed. 117 * WebInspector/webInspector/Images/scrollThumbMiddle.png: Removed. 118 * WebInspector/webInspector/Images/scrollTrackBottom.png: Removed. 119 * WebInspector/webInspector/Images/upTriangle.png: Removed. 120 * WebInspector/webInspector/inspector.css: Removed. 121 * WebInspector/webInspector/inspector.html: Removed. 122 * WebInspector/webInspector/inspector.js: Removed. 123 * WebInspector/webInspector/scrollarea.js: Removed. 124 * WebInspector/webInspector/scrollbar.js: Removed. 125 * WebInspector/webInspector/utilities.js: Removed. 126 * WebView/WebFrame.mm: 127 (-[WebFramePrivate dealloc]): 128 * WebView/WebFrameInternal.h: 129 * WebView/WebHTMLView.mm: 130 (-[WebHTMLView menuForEvent:]): 131 132 Build-fu: 133 134 * WebKit.exp: 135 * WebKit.xcodeproj/project.pbxproj: 136 1 137 2007-06-20 Justin Garcia <justin.garcia@apple.com> 2 138 -
trunk/WebKit/Misc/WebNSViewExtras.h
r17269 r23677 69 69 - (BOOL)_web_firstResponderIsSelfOrDescendantView; 70 70 71 - (NSRect)_web_convertRect:(NSRect)aRect toView:(NSView *)aView; 72 71 73 @end -
trunk/WebKit/Misc/WebNSViewExtras.m
r17269 r23677 227 227 } 228 228 229 - (NSRect)_web_convertRect:(NSRect)aRect toView:(NSView *)aView 230 { 231 // Converting to this view's window; let -convertRect:toView: handle it 232 if (aView == nil) 233 return [self convertRect:aRect toView:nil]; 234 235 // This view must be in a window. Do whatever weird thing -convertRect:toView: does in this situation. 236 NSWindow *thisWindow = [self window]; 237 if (!thisWindow) 238 return [self convertRect:aRect toView:aView]; 239 240 // The other view must be in a window, too. 241 NSWindow *otherWindow = [aView window]; 242 if (!otherWindow) 243 return [self convertRect:aRect toView:aView]; 244 245 // Convert to this window's coordinates 246 NSRect convertedRect = [self convertRect:aRect toView:nil]; 247 248 // Convert to screen coordinates 249 convertedRect.origin = [thisWindow convertBaseToScreen:convertedRect.origin]; 250 251 // Convert to other window's coordinates 252 convertedRect.origin = [otherWindow convertScreenToBase:convertedRect.origin]; 253 254 // Convert to other view's coordinates 255 convertedRect = [aView convertRect:convertedRect fromView:nil]; 256 257 return convertedRect; 258 } 259 229 260 @end -
trunk/WebKit/WebCoreSupport/WebContextMenuClient.h
r19764 r23677 48 48 virtual void stopSpeaking(); 49 49 virtual void searchWithSpotlight(); 50 virtual bool shouldIncludeInspectElementItem(); 50 51 51 52 WebView *webView() { return m_webView; } -
trunk/WebKit/WebCoreSupport/WebContextMenuClient.mm
r21240 r23677 289 289 [NSApp stopSpeaking]; 290 290 } 291 292 bool WebContextMenuClient::shouldIncludeInspectElementItem() 293 { 294 return [WebView _developerExtrasEnabled]; 295 } -
trunk/WebKit/WebCoreSupport/WebFrameLoaderClient.mm
r21793 r23677 225 225 void WebFrameLoaderClient::detachedFromParent2() 226 226 { 227 [m_webFrame->_private->inspectors makeObjectsPerformSelector:@selector(_webFrameDetached:) withObject:m_webFrame.get()];228 227 [m_webFrame->_private->webFrameView _setWebFrame:nil]; // needed for now to be compatible w/ old behavior 229 228 } … … 273 272 { 274 273 WebView *webView = getWebView(m_webFrame.get()); 274 275 275 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 276 276 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 277 278 277 if (!implementations.delegateImplementsDidLoadResourceFromMemoryCache) 279 278 return false; … … 297 296 shouldRelease = YES; 298 297 } 298 299 299 [webView _addObject:object forIdentifier:identifier]; 300 300 301 if (shouldRelease) 301 302 [object release]; … … 384 385 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 385 386 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 386 387 387 388 if (implementations.delegateImplementsDidFinishLoadingFromDataSource) 388 389 implementations.didFinishLoadingFromDataSourceFunc(resourceLoadDelegate, @selector(webView:resource:didFinishLoadingFromDataSource:), webView, [webView _objectForIdentifier:identifier], dataSource(loader)); -
trunk/WebKit/WebCoreSupport/WebInspectorClient.h
r23676 r23677 27 27 */ 28 28 29 // This header contains WebInspector declarations that can be used anywhere in the Web Kit, but are neither SPI nor API. 29 #import <WebCore/InspectorClient.h> 30 #import <WebCore/PlatformString.h> 30 31 31 #import <Foundation/NSObject.h> 32 #import <WebKit/WebInspector.h> 33 #import <WebKit/DOMNode.h> 32 #import <wtf/RetainPtr.h> 34 33 35 @class DOMHTMLDocument;34 @class WebInspectorWindowController; 36 35 @class WebView; 37 @class WebFrame;38 @class WebNodeHighlight;39 36 40 @interface WebInspectorPrivate : NSObject 41 { 42 @public 43 WebView *webView; 44 WebFrame *inspectedWebFrame; 45 WebNodeHighlight *currentHighlight; 46 #ifndef NDEBUG 47 NSMutableDictionary *debugFileMap; 48 #endif 49 BOOL webViewLoaded; 50 BOOL preventHighlight; 51 } 52 @end 37 class WebInspectorClient : public WebCore::InspectorClient { 38 public: 39 WebInspectorClient(WebView *); 53 40 54 @interface WebInspector (WebInspectorPrivate) 55 - (void)_highlightNode:(DOMNode *)node; 56 - (void)_updateSystemColors; 57 @end 41 virtual void inspectorDestroyed(); 42 43 virtual WebCore::Page* createPage(); 44 45 virtual void showWindow(); 46 virtual void closeWindow(); 47 48 virtual void attachWindow(); 49 virtual void detachWindow(); 50 51 virtual void highlight(WebCore::Node*); 52 virtual void hideHighlight(); 53 virtual void inspectedURLChanged(const WebCore::String& newURL); 54 55 private: 56 void updateWindowTitle() const; 57 58 WebView *m_webView; 59 RetainPtr<WebInspectorWindowController> m_windowController; 60 WebCore::String m_inspectedURL; 61 }; -
trunk/WebKit/WebCoreSupport/WebViewFactory.mm
r21618 r23677 382 382 } 383 383 384 - (NSString *)contextMenuItemTagInspectElement 385 { 386 return UI_STRING("Inspect Element", "Inspect Element context menu item"); 387 } 388 384 389 - (BOOL)objectIsTextMarker:(id)object 385 390 { -
trunk/WebKit/WebInspector/WebNodeHighlight.h
r13128 r23677 1 1 /* 2 * Copyright (C) 200 6 Apple Computer,Inc. All rights reserved.2 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 29 29 @class WebNodeHighlightView; 30 @class DOMNode; 30 31 31 extern NSString *WebNodeHighlightExpiredNotification; 32 @interface WebNodeHighlight : NSObject { 33 NSView *_targetView; 34 NSWindow *_highlightWindow; 35 WebNodeHighlightView *_highlightView; 36 NSAnimation *_fadeInAnimation; 37 DOMNode *_highlightNode; 38 id _delegate; 39 } 40 - (id)initWithTargetView:(NSView *)targetView; 32 41 33 @interface WebNodeHighlight : NSObject 34 { 35 NSWindow *_webNodeHighlightWindow; 36 WebNodeHighlightView *_webNodeHighlightView; 37 NSTimer *_timer; 38 CFAbsoluteTime _startTime; 39 CFTimeInterval _duration; 40 } 41 - (id)initWithBounds:(NSRect)bounds andRects:(NSArray *)rects forView:(NSView *)view; 42 - (double)fractionComplete; 43 - (void)expire; 42 - (void)setDelegate:(id)delegate; 43 - (id)delegate; 44 45 - (void)attachHighlight; 46 - (void)detachHighlight; 47 48 - (void)show; 49 - (void)hide; 50 51 - (NSView *)targetView; 52 - (WebNodeHighlightView *)highlightView; 53 54 - (void)setHighlightedNode:(DOMNode *)node; 55 - (DOMNode *)highlightedNode; 56 57 // Controls whether mouse events are ignored (passed to underlying view). By default mouse events are ignored. 58 - (BOOL)ignoresMouseEvents; 59 - (void)setIgnoresMouseEvents:(BOOL)newValue; 60 61 - (void)setHolesNeedUpdateInTargetViewRect:(NSRect)rect; 44 62 @end 63 64 @interface NSObject (WebNodeHighlightDelegate) 65 - (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight; 66 - (void)willDetachWebNodeHighlight:(WebNodeHighlight *)highlight; 67 @end -
trunk/WebKit/WebInspector/WebNodeHighlight.m
r18445 r23677 1 1 /* 2 * Copyright (C) 200 6 Apple Computer,Inc. All rights reserved.2 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 */ 28 28 29 #import <mach/mach_time.h>29 #import "WebNodeHighlight.h" 30 30 #import "WebNodeHighlightView.h" 31 #import "WebNodeHighlight.h" 32 33 NSString *WebNodeHighlightExpiredNotification = @"WebNodeHighlightExpiredNotification"; 31 #import "WebNSViewExtras.h" 32 33 #import <JavaScriptCore/Assertions.h> 34 35 #define FADE_ANIMATION_DURATION 0.2 36 37 @interface WebNodeHighlightFadeInAnimation : NSAnimation 38 @end 39 40 @interface WebNodeHighlight (FileInternal) 41 - (NSRect)_computeHighlightWindowFrame; 42 - (void)_repositionHighlightWindow; 43 - (void)_animateFadeIn:(WebNodeHighlightFadeInAnimation *)animation; 44 @end 45 46 @implementation WebNodeHighlightFadeInAnimation 47 48 - (void)setCurrentProgress:(NSAnimationProgress)progress 49 { 50 [super setCurrentProgress:progress]; 51 [(WebNodeHighlight *)[self delegate] _animateFadeIn:self]; 52 } 53 54 @end 34 55 35 56 @implementation WebNodeHighlight 36 - (id)initWithBounds:(NSRect)bounds andRects:(NSArray *)rects forView:(NSView *)view 37 { 38 if (![self init]) 57 58 - (id)initWithTargetView:(NSView *)targetView 59 { 60 self = [super init]; 61 if (!self) 39 62 return nil; 40 63 41 _startTime = 0.0; 42 _duration = 3.0; 43 44 if ([[[NSApplication sharedApplication] currentEvent] modifierFlags] & NSShiftKeyMask) 45 _duration = 6.0; 46 47 if (!rects) 48 rects = [NSArray arrayWithObject:[NSValue valueWithRect:bounds]]; 49 50 _webNodeHighlightView = [[WebNodeHighlightView alloc] initWithHighlight:self andRects:rects forView:view]; 51 if (!_webNodeHighlightView) { 52 [self release]; 53 return nil; 64 _targetView = [targetView retain]; 65 66 int styleMask = NSBorderlessWindowMask; 67 NSRect contentRect = [NSWindow contentRectForFrameRect:[self _computeHighlightWindowFrame] styleMask:styleMask]; 68 _highlightWindow = [[NSWindow alloc] initWithContentRect:contentRect styleMask:styleMask backing:NSBackingStoreBuffered defer:NO]; 69 [_highlightWindow setBackgroundColor:[NSColor clearColor]]; 70 [_highlightWindow setOpaque:NO]; 71 [_highlightWindow setIgnoresMouseEvents:YES]; 72 [_highlightWindow setReleasedWhenClosed:NO]; 73 74 _highlightView = [[WebNodeHighlightView alloc] initWithWebNodeHighlight:self]; 75 [_highlightView setFractionFadedIn:0.0]; 76 [_highlightWindow setContentView:_highlightView]; 77 [_highlightView release]; 78 79 return self; 80 } 81 82 - (void)setHighlightedNode:(DOMNode *)node 83 { 84 id old = _highlightNode; 85 _highlightNode = [node retain]; 86 [old release]; 87 } 88 89 - (DOMNode *)highlightedNode 90 { 91 return _highlightNode; 92 } 93 94 - (void)dealloc 95 { 96 [self detachHighlight]; 97 98 ASSERT(!_highlightWindow); 99 ASSERT(!_targetView); 100 101 [_fadeInAnimation setDelegate:nil]; 102 [_fadeInAnimation stopAnimation]; 103 [_fadeInAnimation release]; 104 105 [_highlightNode release]; 106 107 [super dealloc]; 108 } 109 110 - (void)attachHighlight 111 { 112 ASSERT(_targetView); 113 ASSERT([_targetView window]); 114 ASSERT(_highlightWindow); 115 116 // Disable screen updates so the highlight moves in sync with the view. 117 [[_targetView window] disableScreenUpdatesUntilFlush]; 118 [[_targetView window] addChildWindow:_highlightWindow ordered:NSWindowAbove]; 119 120 // Observe both frame-changed and bounds-changed notifications because either one could leave 121 // the highlight incorrectly positioned with respect to the target view. We need to do this for 122 // the entire superview hierarchy to handle scrolling, bars coming and going, etc. 123 // (without making concrete assumptions about the view hierarchy). 124 NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 125 for (NSView *v = _targetView; v; v = [v superview]) { 126 [notificationCenter addObserver:self selector:@selector(_repositionHighlightWindow) name:NSViewFrameDidChangeNotification object:v]; 127 [notificationCenter addObserver:self selector:@selector(_repositionHighlightWindow) name:NSViewBoundsDidChangeNotification object:v]; 54 128 } 55 129 56 // adjust size and position for rect padding that the view adds 57 bounds.origin.y -= 3.0f; 58 bounds.origin.x -= 3.0f; 59 bounds.size = [_webNodeHighlightView frame].size; 60 61 NSRect windowBounds = [view convertRect:bounds toView:nil]; 62 windowBounds.origin = [[view window] convertBaseToScreen:windowBounds.origin]; // adjust for screen coords 63 64 _webNodeHighlightWindow = [[NSWindow alloc] initWithContentRect:windowBounds styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; 65 [_webNodeHighlightWindow setBackgroundColor:[NSColor clearColor]]; 66 [_webNodeHighlightWindow setOpaque:NO]; 67 [_webNodeHighlightWindow setHasShadow:NO]; 68 [_webNodeHighlightWindow setIgnoresMouseEvents:YES]; 69 [_webNodeHighlightWindow setReleasedWhenClosed:YES]; 70 [_webNodeHighlightWindow setContentView:_webNodeHighlightView]; 71 [_webNodeHighlightView release]; 72 73 [[view window] addChildWindow:_webNodeHighlightWindow ordered:NSWindowAbove]; 74 75 // 30 frames per second time interval will play well with the CPU and still look smooth 76 _timer = [[NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(redraw:) userInfo:nil repeats:YES] retain]; 77 78 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expire) name:NSViewBoundsDidChangeNotification object:view]; 79 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expire) name:NSViewBoundsDidChangeNotification object:[view superview]]; 80 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expire) name:NSWindowDidResizeNotification object:[view window]]; 81 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expire) name:NSWindowWillCloseNotification object:[view window]]; 82 83 return self; 84 } 85 86 - (void)dealloc 87 { 88 [[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewBoundsDidChangeNotification object:nil]; 89 [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidResizeNotification object:nil]; 90 [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:nil]; 91 92 [_timer invalidate]; 93 [_timer release]; 94 95 [super dealloc]; 96 } 97 98 - (double)fractionComplete 99 { 100 if (_startTime == 0.0) 101 _startTime = CFAbsoluteTimeGetCurrent(); 102 103 return ((CFAbsoluteTimeGetCurrent() - _startTime) / _duration); 104 } 105 106 - (void)expire 107 { 108 if (![_timer isValid]) // make sure it has not been expired already (loop prevention) 130 if (_delegate && [_delegate respondsToSelector:@selector(didAttachWebNodeHighlight:)]) 131 [_delegate didAttachWebNodeHighlight:self]; 132 } 133 134 - (id)delegate 135 { 136 return _delegate; 137 } 138 139 - (void)detachHighlight 140 { 141 if (!_highlightWindow) { 142 ASSERT(!_targetView); 109 143 return; 110 111 [_timer invalidate]; 112 [_timer release]; 113 _timer = nil; 114 115 // remove this observation before closing the window (more loop prevention) 116 [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:nil]; 117 [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidResizeNotification object:nil]; 118 119 [[_webNodeHighlightWindow parentWindow] removeChildWindow:_webNodeHighlightWindow]; 120 [_webNodeHighlightWindow close]; 121 _webNodeHighlightWindow = nil; 122 123 [[NSNotificationCenter defaultCenter] postNotificationName:WebNodeHighlightExpiredNotification object:self userInfo:nil]; 124 } 125 126 - (void)redraw:(NSTimer *)timer 127 { 128 [_webNodeHighlightView setNeedsDisplay:YES]; 129 130 if (_startTime == 0.0) 131 _startTime = CFAbsoluteTimeGetCurrent(); 132 133 if ((CFAbsoluteTimeGetCurrent() - _startTime) > _duration) 134 [self expire]; 135 } 136 @end 144 } 145 146 if (_delegate && [_delegate respondsToSelector:@selector(willDetachWebNodeHighlight:)]) 147 [_delegate willDetachWebNodeHighlight:self]; 148 149 // FIXME: is this necessary while detaching? Should test. 150 [[_targetView window] disableScreenUpdatesUntilFlush]; 151 152 NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 153 [notificationCenter removeObserver:self name:NSViewFrameDidChangeNotification object:nil]; 154 [notificationCenter removeObserver:self name:NSViewBoundsDidChangeNotification object:nil]; 155 156 [[_highlightWindow parentWindow] removeChildWindow:_highlightWindow]; 157 158 [_highlightWindow release]; 159 _highlightWindow = nil; 160 161 [_targetView release]; 162 _targetView = nil; 163 164 // We didn't retain _highlightView, but we do need to tell it to forget about us, so it doesn't 165 // try to send our delegate messages after we've been dealloc'ed, e.g. 166 [_highlightView detachFromWebNodeHighlight]; 167 _highlightView = nil; 168 } 169 170 - (void)show 171 { 172 ASSERT(!_fadeInAnimation); 173 if (_fadeInAnimation || [_highlightView fractionFadedIn] == 1.0) 174 return; 175 176 _fadeInAnimation = [[WebNodeHighlightFadeInAnimation alloc] initWithDuration:FADE_ANIMATION_DURATION animationCurve:NSAnimationEaseInOut]; 177 [_fadeInAnimation setAnimationBlockingMode:NSAnimationNonblocking]; 178 [_fadeInAnimation setDelegate:self]; 179 [_fadeInAnimation startAnimation]; 180 } 181 182 - (void)hide 183 { 184 [_highlightView setFractionFadedIn:0.0]; 185 } 186 187 - (void)animationDidEnd:(NSAnimation *)animation 188 { 189 ASSERT(animation == _fadeInAnimation); 190 [_fadeInAnimation release]; 191 _fadeInAnimation = nil; 192 } 193 194 - (BOOL)ignoresMouseEvents 195 { 196 ASSERT(_highlightWindow); 197 return [_highlightWindow ignoresMouseEvents]; 198 } 199 200 - (WebNodeHighlightView *)highlightView 201 { 202 return _highlightView; 203 } 204 205 - (void)setDelegate:(id)delegate 206 { 207 // The delegate is not retained, as usual in Cocoa. 208 _delegate = delegate; 209 } 210 211 - (void)setHolesNeedUpdateInTargetViewRect:(NSRect)rect 212 { 213 ASSERT(_targetView); 214 215 [_highlightView setHolesNeedUpdateInRect:[_targetView _web_convertRect:rect toView:_highlightView]]; 216 217 // Redraw highlight view immediately so it updates in sync with the target view 218 // if we called disableScreenUpdatesUntilFlush on the target view earlier. This 219 // is especially visible when resizing the window. 220 [_highlightView displayIfNeeded]; 221 } 222 223 - (void)setIgnoresMouseEvents:(BOOL)newValue 224 { 225 ASSERT(_highlightWindow); 226 [_highlightWindow setIgnoresMouseEvents:newValue]; 227 } 228 229 - (NSView *)targetView 230 { 231 return _targetView; 232 } 233 234 @end 235 236 @implementation WebNodeHighlight (FileInternal) 237 238 - (NSRect)_computeHighlightWindowFrame 239 { 240 ASSERT(_targetView); 241 ASSERT([_targetView window]); 242 243 NSRect highlightWindowFrame = [_targetView convertRect:[_targetView visibleRect] toView:nil]; 244 highlightWindowFrame.origin = [[_targetView window] convertBaseToScreen:highlightWindowFrame.origin]; 245 246 return highlightWindowFrame; 247 } 248 249 - (void)_repositionHighlightWindow 250 { 251 ASSERT([_targetView window]); 252 253 // Disable screen updates so the highlight moves in sync with the view. 254 [[_targetView window] disableScreenUpdatesUntilFlush]; 255 256 [_highlightWindow setFrame:[self _computeHighlightWindowFrame] display:YES]; 257 } 258 259 - (void)_animateFadeIn:(WebNodeHighlightFadeInAnimation *)animation 260 { 261 [_highlightView setFractionFadedIn:[animation currentValue]]; 262 } 263 264 @end -
trunk/WebKit/WebInspector/WebNodeHighlightView.h
r13090 r23677 29 29 @class WebNodeHighlight; 30 30 31 @interface WebNodeHighlightView : NSView 32 { 33 WebNodeHighlight *_highlight; 34 NSImage *_highlightRingImage; 31 @interface WebNodeHighlightView : NSView { 32 WebNodeHighlight *_webNodeHighlight; 33 float _fractionFadedIn; 35 34 } 36 - (id)initWithHighlight:(WebNodeHighlight *)hightlight andRects:(NSArray *)rects forView:(NSView *)view; 35 - (id)initWithWebNodeHighlight:(WebNodeHighlight *)webNodeHighlight; 36 37 - (WebNodeHighlight *)webNodeHighlight; 38 - (void)detachFromWebNodeHighlight; 39 40 // Value between 0.0 (completely faded out of view) and 1.0 (completely faded into view) that represents 41 // the progress of the fading animation. 42 - (float)fractionFadedIn; 43 - (void)setFractionFadedIn:(float)alpha; 44 45 - (void)setHolesNeedUpdateInRect:(NSRect)rect; 37 46 @end -
trunk/WebKit/WebInspector/WebNodeHighlightView.m
r21091 r23677 27 27 */ 28 28 29 #import "WebNodeHighlightView.h" 29 30 #import "WebNodeHighlight.h" 30 #import "WebNodeHighlightView.h" 31 #import <WebKitSystemInterface.h> 31 #import "WebNSViewExtras.h" 32 33 #import <WebKit/DOMCore.h> 34 #import <WebKit/DOMExtensions.h> 35 36 #import <JavaScriptCore/Assertions.h> 37 38 #define OVERLAY_MAX_ALPHA 0.7 39 #define OVERLAY_WHITE_VALUE 0.1 40 41 #define WHITE_FRAME_THICKNESS 1.0 42 43 @interface WebNodeHighlightView (FileInternal) 44 - (NSArray *)_holes; 45 @end 32 46 33 47 @implementation WebNodeHighlightView 34 - (NSBezierPath *)roundedRect:(NSRect)rect withRadius:(float)radius 48 49 - (id)initWithWebNodeHighlight:(WebNodeHighlight *)webNodeHighlight 35 50 { 36 NSBezierPath *path = [[NSBezierPath alloc] init]; 37 38 NSRect irect = NSInsetRect(rect, radius, radius); 39 [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(irect), NSMinY(irect)) radius:radius startAngle:180.0f endAngle:270.0f]; 40 [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(irect), NSMinY(irect)) radius:radius startAngle:270.0f endAngle:360.0f]; 41 [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(irect), NSMaxY(irect)) radius:radius startAngle:0.0f endAngle:90.0f]; 42 [path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(irect), NSMaxY(irect)) radius:radius startAngle:90.0f endAngle:180.0f]; 43 [path closePath]; 44 45 return [path autorelease]; 46 } 47 48 - (id)initWithHighlight:(WebNodeHighlight *)highlight andRects:(NSArray *)rects forView:(NSView *)view 49 { 50 if (![self init]) 51 self = [self initWithFrame:NSZeroRect]; 52 if (!self) 51 53 return nil; 52 54 53 _highlight = highlight; // don't retain, would cause a circular retain 54 55 NSRect visibleRect = [view visibleRect]; 56 57 NSRect rect = NSZeroRect; 58 NSBezierPath *path = nil; 59 NSBezierPath *straightPath = nil; 60 61 if([rects count] == 1) { 62 NSValue *value = (NSValue *)[rects objectAtIndex:0]; 63 rect = NSInsetRect([value rectValue], -1.0f, -1.0f); 64 rect = NSIntersectionRect(rect, visibleRect); 65 if (!NSIsEmptyRect(rect)) 66 path = [[self roundedRect:rect withRadius:3.0f] retain]; 67 68 // shift everything to the corner 69 NSAffineTransform *transform = [[NSAffineTransform alloc] init]; 70 [transform translateXBy:(NSMinX(rect) * -1.0f) + 2.5f yBy:(NSMinY(rect) * -1.0f) + 2.5f]; 71 [path transformUsingAffineTransform:transform]; 72 [straightPath transformUsingAffineTransform:transform]; 73 [transform release]; 74 } else if ([rects count] > 1) { 75 path = [[NSBezierPath alloc] init]; 76 straightPath = [path copy]; 77 78 // roundedRect: returns an autoreleased path, so release them soon with a pool 79 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 80 81 NSEnumerator *enumerator = [rects objectEnumerator]; 82 NSValue *value = nil; 83 while ((value = [enumerator nextObject])) { 84 rect = NSIntersectionRect([value rectValue], visibleRect); 85 if (!NSIsEmptyRect(rect)) { 86 [straightPath appendBezierPathWithRect:rect]; 87 [path appendBezierPath:[self roundedRect:rect withRadius:3.0f]]; 88 } 89 } 90 91 [pool drain]; 92 93 rect = [path bounds]; 94 95 [straightPath setWindingRule:NSNonZeroWindingRule]; 96 [straightPath setLineJoinStyle:NSRoundLineJoinStyle]; 97 [straightPath setLineCapStyle:NSRoundLineCapStyle]; 98 99 // multiple rects we get from WebCore need flipped to show up correctly 100 NSAffineTransform *transform = [[NSAffineTransform alloc] init]; 101 [transform scaleXBy:1.0f yBy:-1.0f]; 102 [path transformUsingAffineTransform:transform]; 103 [straightPath transformUsingAffineTransform:transform]; 104 [transform release]; 105 106 // shift everything to the corner 107 transform = [[NSAffineTransform alloc] init]; 108 [transform translateXBy:(NSMinX(rect) * -1.0f) + 2.5f yBy:NSMaxY(rect) + 2.5f]; 109 [path transformUsingAffineTransform:transform]; 110 [straightPath transformUsingAffineTransform:transform]; 111 [transform release]; 112 } 113 114 if (!path || [path isEmpty]) { 115 [self release]; 116 return nil; 117 } 118 119 [path setWindingRule:NSNonZeroWindingRule]; 120 [path setLineJoinStyle:NSRoundLineJoinStyle]; 121 [path setLineCapStyle:NSRoundLineCapStyle]; 122 123 // make the drawing area larger for the focus ring blur 124 rect = [path bounds]; 125 rect.size.width += 5.0f; 126 rect.size.height += 5.0f; 127 [self setFrameSize:rect.size]; 128 129 // draw into an image 130 _highlightRingImage = [[NSImage alloc] initWithSize:rect.size]; 131 [_highlightRingImage lockFocus]; 132 [NSGraphicsContext saveGraphicsState]; 133 134 if (straightPath) { 135 [[NSColor redColor] set]; 136 [path setLineWidth:4.0f]; 137 [path stroke]; 138 139 // clear the center to eliminate thick inner strokes for overlapping rects 140 [[NSGraphicsContext currentContext] setCompositingOperation:NSCompositeClear]; 141 [path fill]; 142 143 // stroke the straight line path with a light color to show any inner rects 144 [[NSGraphicsContext currentContext] setCompositingOperation:NSCompositeDestinationOver]; 145 [[[NSColor redColor] colorWithAlphaComponent:0.6f] set]; 146 [straightPath setLineWidth:1.0f]; 147 [straightPath stroke]; 148 } else { 149 [[NSColor redColor] set]; 150 [path setLineWidth:2.0f]; 151 [path stroke]; 152 } 153 154 [NSGraphicsContext restoreGraphicsState]; 155 [_highlightRingImage unlockFocus]; 156 157 [path release]; 158 [straightPath release]; 55 _webNodeHighlight = [webNodeHighlight retain]; 159 56 160 57 return self; … … 163 60 - (void)dealloc 164 61 { 165 [ _highlightRingImage release];62 [self detachFromWebNodeHighlight]; 166 63 [super dealloc]; 167 64 } 168 65 169 - ( BOOL)isOpaque66 - (void)detachFromWebNodeHighlight 170 67 { 171 return NO; 68 [_webNodeHighlight release]; 69 _webNodeHighlight = nil; 172 70 } 173 71 174 - (void)drawRect:(NSRect)rect 72 - (void)drawRect:(NSRect)rect 175 73 { 176 double alpha = 1.0 - [_highlight fractionComplete]; 177 if (alpha > 1.0) 178 alpha = 1.0; 179 else if (alpha < 0.0) 180 alpha = 0.0; 74 [NSGraphicsContext saveGraphicsState]; 181 75 182 [_highlightRingImage drawInRect:rect fromRect:rect operation:NSCompositeCopy fraction:(float)alpha]; 76 // draw translucent gray fill, out of which we will cut holes 77 [[NSColor colorWithCalibratedWhite:OVERLAY_WHITE_VALUE alpha:(_fractionFadedIn * OVERLAY_MAX_ALPHA)] set]; 78 NSRectFill(rect); 79 80 // determine set of holes 81 NSArray *holes = [self _holes]; 82 int holeCount = [holes count]; 83 int holeIndex; 84 85 // Draw white frames around holes in first pass, so they will be erased in 86 // places where holes overlap or abut. 87 [[NSColor colorWithCalibratedWhite:1.0 alpha:_fractionFadedIn] set]; 88 89 // white frame is just outside of the hole that the delegate returned 90 for (holeIndex = 0; holeIndex < holeCount; ++holeIndex) { 91 NSRect hole = [[holes objectAtIndex:holeIndex] rectValue]; 92 hole = NSInsetRect(hole, -WHITE_FRAME_THICKNESS, -WHITE_FRAME_THICKNESS); 93 NSRectFill(hole); 94 } 95 96 [[NSColor clearColor] set]; 97 98 // Erase holes in second pass. 99 for (holeIndex = 0; holeIndex < holeCount; ++holeIndex) 100 NSRectFill([[holes objectAtIndex:holeIndex] rectValue]); 101 102 [NSGraphicsContext restoreGraphicsState]; 183 103 } 104 105 - (WebNodeHighlight *)webNodeHighlight 106 { 107 return _webNodeHighlight; 108 } 109 110 - (float)fractionFadedIn 111 { 112 return _fractionFadedIn; 113 } 114 115 - (void)setFractionFadedIn:(float)fraction 116 { 117 ASSERT_ARG(fraction, fraction >= 0.0 && fraction <= 1.0); 118 119 if (_fractionFadedIn == fraction) 120 return; 121 122 _fractionFadedIn = fraction; 123 [self setNeedsDisplay:YES]; 124 } 125 126 - (void)setHolesNeedUpdateInRect:(NSRect)rect 127 { 128 // Redisplay a slightly larger rect to account for white border around holes 129 rect = NSInsetRect(rect, -1 * WHITE_FRAME_THICKNESS, 130 -1 * WHITE_FRAME_THICKNESS); 131 132 [self setNeedsDisplayInRect:rect]; 133 } 134 184 135 @end 136 137 @implementation WebNodeHighlightView (FileInternal) 138 139 - (NSArray *)_holes 140 { 141 DOMNode *node = [_webNodeHighlight highlightedNode]; 142 143 // FIXME: node view needs to be the correct frame document view, it isn't always the main frame 144 NSView *nodeView = [_webNodeHighlight targetView]; 145 146 NSArray *lineBoxRects = nil; 147 if ([node isKindOfClass:[DOMElement class]]) { 148 DOMCSSStyleDeclaration *style = [[node ownerDocument] getComputedStyle:(DOMElement *)node pseudoElement:@""]; 149 if ([[style getPropertyValue:@"display"] isEqualToString:@"inline"]) 150 lineBoxRects = [node lineBoxRects]; 151 } else if ([node isKindOfClass:[DOMText class]]) { 152 #if ENABLE(SVG) 153 if (![[node parentNode] isKindOfClass:NSClassFromString(@"DOMSVGElement")]) 154 #endif 155 lineBoxRects = [node lineBoxRects]; 156 } 157 158 if (![lineBoxRects count]) { 159 NSRect boundingBox = [nodeView _web_convertRect:[node boundingBox] toView:self]; 160 return [NSArray arrayWithObject:[NSValue valueWithRect:boundingBox]]; 161 } 162 163 NSMutableArray *rects = [[NSMutableArray alloc] initWithCapacity:[lineBoxRects count]]; 164 165 unsigned lineBoxRectCount = [lineBoxRects count]; 166 for (unsigned lineBoxRectIndex = 0; lineBoxRectIndex < lineBoxRectCount; ++lineBoxRectIndex) { 167 NSRect r = [[lineBoxRects objectAtIndex:lineBoxRectIndex] rectValue]; 168 NSRect overlayViewRect = [nodeView _web_convertRect:r toView:self]; 169 [rects addObject:[NSValue valueWithRect:overlayViewRect]]; 170 } 171 172 return [rects autorelease]; 173 } 174 175 @end -
trunk/WebKit/WebKit.exp
r21073 r23677 17 17 .objc_class_name_WebHistoryItem 18 18 .objc_class_name_WebIconDatabase 19 .objc_class_name_WebInspector20 19 .objc_class_name_WebJavaScriptTextInputPanel 21 20 .objc_class_name_WebKeyGenerator -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r23627 r23677 10 10 065AD5A30B0C32C7005A2B1D /* WebContextMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 065AD5A10B0C32C7005A2B1D /* WebContextMenuClient.h */; }; 11 11 065AD5A40B0C32C7005A2B1D /* WebContextMenuClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 065AD5A20B0C32C7005A2B1D /* WebContextMenuClient.mm */; }; 12 06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 06693DDA0BFBA85200216072 /* WebInspectorClient.h */; }; 13 06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06693DDB0BFBA85200216072 /* WebInspectorClient.mm */; }; 12 14 14D8252F0AF955090004F057 /* WebChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D8252D0AF955090004F057 /* WebChromeClient.h */; }; 13 15 14D825300AF955090004F057 /* WebChromeClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 14D8252E0AF955090004F057 /* WebChromeClient.mm */; }; … … 17 19 1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0D40850AC1C8F40009C113 /* WebKitVersionChecks.h */; }; 18 20 1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C0D40860AC1C8F40009C113 /* WebKitVersionChecks.m */; }; 19 1C68F667095B5FC100C2984E /* webInspector in Resources */ = {isa = PBXBuildFile; fileRef = 1C68F640095B5FC100C2984E /* webInspector */; };20 1C68F668095B5FC100C2984E /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F65C095B5FC100C2984E /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };21 1C68F669095B5FC100C2984E /* WebInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F65D095B5FC100C2984E /* WebInspector.m */; };22 1C68F66A095B5FC100C2984E /* WebInspectorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F65E095B5FC100C2984E /* WebInspectorInternal.h */; };23 1C68F66D095B5FC100C2984E /* WebInspectorPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F661095B5FC100C2984E /* WebInspectorPanel.h */; };24 1C68F66E095B5FC100C2984E /* WebInspectorPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F662095B5FC100C2984E /* WebInspectorPanel.m */; };25 21 1C68F66F095B5FC100C2984E /* WebNodeHighlight.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C68F663095B5FC100C2984E /* WebNodeHighlight.h */; }; 26 22 1C68F670095B5FC100C2984E /* WebNodeHighlight.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F664095B5FC100C2984E /* WebNodeHighlight.m */; }; … … 311 307 065AD5A10B0C32C7005A2B1D /* WebContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebContextMenuClient.h; sourceTree = "<group>"; }; 312 308 065AD5A20B0C32C7005A2B1D /* WebContextMenuClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMenuClient.mm; sourceTree = "<group>"; }; 309 06693DDA0BFBA85200216072 /* WebInspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebInspectorClient.h; sourceTree = "<group>"; }; 310 06693DDB0BFBA85200216072 /* WebInspectorClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorClient.mm; sourceTree = "<group>"; }; 313 311 14D8252D0AF955090004F057 /* WebChromeClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebChromeClient.h; sourceTree = "<group>"; }; 314 312 14D8252E0AF955090004F057 /* WebChromeClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebChromeClient.mm; sourceTree = "<group>"; }; … … 318 316 1C0D40850AC1C8F40009C113 /* WebKitVersionChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitVersionChecks.h; sourceTree = "<group>"; }; 319 317 1C0D40860AC1C8F40009C113 /* WebKitVersionChecks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitVersionChecks.m; sourceTree = "<group>"; }; 320 1C68F640095B5FC100C2984E /* webInspector */ = {isa = PBXFileReference; lastKnownFileType = folder; name = webInspector; path = WebInspector/webInspector; sourceTree = SOURCE_ROOT; };321 1C68F65C095B5FC100C2984E /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };322 1C68F65D095B5FC100C2984E /* WebInspector.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebInspector.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };323 1C68F65E095B5FC100C2984E /* WebInspectorInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };324 1C68F661095B5FC100C2984E /* WebInspectorPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorPanel.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };325 1C68F662095B5FC100C2984E /* WebInspectorPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebInspectorPanel.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };326 318 1C68F663095B5FC100C2984E /* WebNodeHighlight.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNodeHighlight.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; wrapsLines = 0; }; 327 319 1C68F664095B5FC100C2984E /* WebNodeHighlight.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNodeHighlight.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 697 689 isa = PBXGroup; 698 690 children = ( 699 1C68F640095B5FC100C2984E /* webInspector */,700 1C68F65C095B5FC100C2984E /* WebInspector.h */,701 1C68F65D095B5FC100C2984E /* WebInspector.m */,702 1C68F65E095B5FC100C2984E /* WebInspectorInternal.h */,703 1C68F661095B5FC100C2984E /* WebInspectorPanel.h */,704 1C68F662095B5FC100C2984E /* WebInspectorPanel.m */,705 691 1C68F663095B5FC100C2984E /* WebNodeHighlight.h */, 706 692 1C68F664095B5FC100C2984E /* WebNodeHighlight.m */, … … 910 896 F52CA6BD02DF9D0F018635CA /* HTML */, 911 897 51E94C0706C02CA300A9B09E /* PDF */, 912 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */,913 898 8373435A0624EE0D00F3B289 /* WebArchive.h */, 914 899 6550B7C5099EFAE90090D781 /* WebArchiver.h */, … … 943 928 84311AF105EAB12B0088EDA4 /* WebResourcePrivate.h */, 944 929 513D422E034CF55A00CA2ACD /* WebResourceLoadDelegate.h */, 930 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */, 945 931 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */, 946 932 7E6FEF0708985A7200C44C3F /* WebScriptDebugDelegatePrivate.h */, … … 1030 1016 931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */, 1031 1017 9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */, 1018 06693DDA0BFBA85200216072 /* WebInspectorClient.h */, 1019 06693DDB0BFBA85200216072 /* WebInspectorClient.mm */, 1032 1020 9345D4EA0365C5B2008635CE /* WebJavaScriptTextInputPanel.h */, 1033 1021 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */, … … 1253 1241 ABDDF20D08EB0DDC001E1241 /* WebDownloadInternal.h in Headers */, 1254 1242 224100F3091818D900D2D266 /* WebPluginsPrivate.h in Headers */, 1255 1C68F668095B5FC100C2984E /* WebInspector.h in Headers */,1256 1C68F66A095B5FC100C2984E /* WebInspectorInternal.h in Headers */,1257 1C68F66D095B5FC100C2984E /* WebInspectorPanel.h in Headers */,1258 1243 1C68F66F095B5FC100C2984E /* WebNodeHighlight.h in Headers */, 1259 1244 1C68F671095B5FC100C2984E /* WebNodeHighlightView.h in Headers */, … … 1287 1272 EDE983800BCDF5FE00FDAE28 /* WebNSArrayExtras.h in Headers */, 1288 1273 5DE92FEF0BD7017E0059A5FD /* WebAssertions.h in Headers */, 1274 06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */, 1289 1275 BCDFA8F90C10B6F500D3A10C /* WebKitPluginContainerView.h in Headers */, 1290 1276 ); … … 1357 1343 939810B90824BF01008DF038 /* WebViewEditingContextMenu.nib in Resources */, 1358 1344 939810BA0824BF01008DF038 /* IDNScriptWhiteList.txt in Resources */, 1359 1C68F667095B5FC100C2984E /* webInspector in Resources */,1360 1345 EDD6132C0AED9990000B75CA /* WebViewEditingContextMenuOld.nib in Resources */, 1361 1346 ); … … 1511 1496 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */, 1512 1497 224100F90918190100D2D266 /* WebPluginsPrivate.m in Sources */, 1513 1C68F669095B5FC100C2984E /* WebInspector.m in Sources */,1514 1C68F66E095B5FC100C2984E /* WebInspectorPanel.m in Sources */,1515 1498 1C68F670095B5FC100C2984E /* WebNodeHighlight.m in Sources */, 1516 1499 1C68F672095B5FC100C2984E /* WebNodeHighlightView.m in Sources */, … … 1533 1516 A7D3C5BD0B5773C5002CA450 /* WebPasteboardHelper.mm in Sources */, 1534 1517 EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */, 1518 06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */, 1535 1519 BCDFA9130C10B93E00D3A10C /* WebKitPluginContainerView.mm in Sources */, 1536 1520 ); -
trunk/WebKit/WebView/WebFrame.mm
r21793 r23677 138 138 139 139 [scriptDebugger release]; 140 141 [inspectors release];142 140 143 141 [super dealloc]; … … 539 537 } 540 538 541 - (void)_addInspector:(WebInspector *)inspector542 {543 if (!_private->inspectors)544 _private->inspectors = [[NSMutableSet alloc] init];545 ASSERT(![_private->inspectors containsObject:inspector]);546 [_private->inspectors addObject:inspector];547 }548 549 - (void)_removeInspector:(WebInspector *)inspector550 {551 ASSERT([_private->inspectors containsObject:inspector]);552 [_private->inspectors removeObject:inspector];553 }554 555 539 - (FrameLoader*)_frameLoader 556 540 { -
trunk/WebKit/WebView/WebFrameInternal.h
r21618 r23677 41 41 @class DOMNode; 42 42 @class DOMRange; 43 @class WebInspector;44 43 @class WebFrameView; 45 44 @class WebFrameBridge; … … 104 103 WebScriptDebugger *scriptDebugger; 105 104 id internalLoadDelegate; 106 107 NSMutableSet *inspectors;108 105 } 109 106 @end … … 134 131 135 132 - (BOOL)_isMainFrame; 136 137 - (void)_addInspector:(WebInspector *)inspector;138 - (void)_removeInspector:(WebInspector *)inspector;139 133 140 134 #ifdef __cplusplus -
trunk/WebKit/WebView/WebHTMLView.mm
r23559 r23677 2558 2558 } 2559 2559 2560 // Add the Inspect Element menu item if the preference is set or if this is a debug build2561 if ([WebView _developerExtrasEnabled]) {2562 if (!menu)2563 menu = [[[NSMenu alloc] init] autorelease];2564 else if ([menu numberOfItems])2565 [menu addItem:[NSMenuItem separatorItem]];2566 NSMenuItem *inspectorItem = [[NSMenuItem alloc] init];2567 [inspectorItem setAction:@selector(_inspectElement:)];2568 [inspectorItem setTitle:UI_STRING("Inspect Element", "Inspect Element context menu item")];2569 [inspectorItem setRepresentedObject:[[[WebElementDictionary alloc] initWithHitTestResult:2570 coreMenu->hitTestResult()] autorelease]];2571 [menu addItem:inspectorItem];2572 [inspectorItem release];2573 }2574 2575 2560 return menu; 2576 2561 } -
trunk/WebKit/WebView/WebUIDelegatePrivate.h
r21576 r23677 64 64 WebMenuItemPDFSinglePageScrolling, 65 65 WebMenuItemPDFFacingPagesScrolling, 66 WebMenuItemTagInspectElement, 66 67 WebMenuItemTagBaseApplication = 10000 67 68 }; -
trunk/WebKit/WebView/WebView.mm
r23586 r23677 59 59 #import "WebHistoryItemInternal.h" 60 60 #import "WebIconDatabase.h" 61 #import "WebInspector .h"61 #import "WebInspectorClient.h" 62 62 #import "WebKitErrors.h" 63 63 #import "WebKitLogging.h" … … 276 276 id scriptDebugDelegate; 277 277 id scriptDebugDelegateForwarder; 278 278 279 279 BOOL allowsUndo; 280 280 … … 449 449 [preferences release]; 450 450 [hostWindow release]; 451 451 452 452 [policyDelegateForwarder release]; 453 453 [UIDelegateForwarder release]; … … 644 644 { 645 645 return WKGetPreferredExtensionForMIMEType(type); 646 } 647 648 - (BOOL)_isClosed 649 { 650 if (!_private || _private->closed) 651 return YES; 652 return NO; 646 653 } 647 654 … … 1191 1198 [self _willChangeValueForKey: _WebMainFrameURLKey]; 1192 1199 } 1200 1193 1201 [NSApp setWindowsNeedUpdate:YES]; 1194 1202 } … … 1196 1204 - (void)_didCommitLoadForFrame:(WebFrame *)frame 1197 1205 { 1198 if (frame == [self mainFrame]) {1206 if (frame == [self mainFrame]) 1199 1207 [self _didChangeValueForKey: _WebMainFrameURLKey]; 1200 }1201 1208 [NSApp setWindowsNeedUpdate:YES]; 1202 1209 } … … 1752 1759 1753 1760 _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self)); 1761 if ([WebView _developerExtrasEnabled]) 1762 _private->page->setInspectorClient(new WebInspectorClient(self)); 1754 1763 [[[WebFrameBridge alloc] initMainFrameWithPage:_private->page frameName:frameName frameView:frameView] release]; 1755 1764 … … 2027 2036 } 2028 2037 2029 2030 2038 - resourceLoadDelegate 2031 2039 { … … 2569 2577 { 2570 2578 return _private->drawsBackground; 2571 }2572 2573 - (void)_inspectElement:(id)sender2574 {2575 NSDictionary *element = [sender representedObject];2576 WebFrame *frame = [element objectForKey:WebElementFrameKey];2577 DOMNode *node = [element objectForKey:WebElementDOMNodeKey];2578 if (!node || !frame)2579 return;2580 2581 if ([node nodeType] != DOM_ELEMENT_NODE || [node nodeType] != DOM_DOCUMENT_NODE)2582 node = [node parentNode];2583 2584 WebInspector *inspector = [WebInspector sharedWebInspector];2585 [inspector setWebFrame:frame];2586 [inspector setFocusedDOMNode:node];2587 2588 node = [node parentNode];2589 node = [node parentNode];2590 if (node) // set the root node to something relatively close to the focused node2591 [inspector setRootDOMNode:node];2592 2593 [inspector showWindow:nil];2594 2579 } 2595 2580 -
trunk/WebKit/WebView/WebViewPrivate.h
r22074 r23677 289 289 - (id<WebFormDelegate>)_formDelegate; 290 290 291 - (BOOL)_isClosed; 291 292 - (void)_close; 292 293 -
trunk/WebKit/win/ChangeLog
r23623 r23677 1 2007-06-20 Adam Roben <aroben@apple.com> 2 3 Land the new Inspector. 4 5 Co-written with Tim Hatcher. 6 7 Reviewed by Anders, Adele, Hyatt, and Sam. 8 9 Implement the InspectorClient interface. 10 11 * WebInspectorClient.cpp: Added. 12 (WebInspectorClient::WebInspectorClient): 13 (WebInspectorClient::~WebInspectorClient): 14 (WebInspectorClient::inspectorDestroyed): 15 (WebInspectorClient::createPage): 16 (WebInspectorClient::showWindow): 17 (WebInspectorClient::closeWindow): 18 (WebInspectorClient::windowVisible): 19 (WebInspectorClient::attachWindow): 20 (WebInspectorClient::detachWindow): 21 (WebInspectorClient::highlight): 22 (WebInspectorClient::hideHighlight): 23 (WebInspectorClient::inspectedURLChanged): 24 (WebInspectorClient::updateWindowTitle): 25 (WebInspectorClient::onSize): 26 (WebInspectorClient::onClose): 27 (WebInspectorClient::onWebViewWindowPosChanging): 28 (WebInspectorWndProc): 29 (SubclassedWebViewWndProc): 30 (registerWindowClass): 31 * WebInspectorClient.h: Added. 32 33 Add an easier-to-see highlight. 34 35 * WebNodeHighlight.cpp: Added. 36 (WebNodeHighlight::WebNodeHighlight): 37 (WebNodeHighlight::~WebNodeHighlight): 38 (WebNodeHighlight::highlight): 39 (WebNodeHighlight::hide): 40 (WebNodeHighlight::visible): 41 (WebNodeHighlight::updateWindow): 42 (WebNodeHighlight::removeSubclass): 43 (registerOverlayClass): 44 (OverlayWndProc): 45 (SubclassedWndProc): 46 * WebNodeHighlight.h: Added. 47 48 WebView changes needed for the new Inspector. 49 50 * WebView.cpp: Removed old inspectElement method now that this is 51 handled by WebCore. 52 (WebView::WebView): 53 (WebView::close): 54 (WebView::performContextMenuAction): Removed handling of the Inspect 55 Element context menu item. 56 (WebView::initWithFrame): Give each Page an InspectorClient to enable 57 the Inspector. 58 (WebView::setProhibitsMainFrameScrolling): Added. 59 * WebView.h: 60 61 Updates needed for WebCore changes. 62 63 * Interfaces/IWebUIDelegate.idl: 64 * WebContextMenuClient.cpp: 65 (WebContextMenuClient::getCustomMenuFromDefaultItems): 66 * WebContextMenuClient.h: 67 * WebCoreLocalizedStrings.cpp: 68 69 Remove old Inspector code. 70 71 * WebFrame.cpp: 72 * WebFrame.h: 73 * WebInspector/WebInspector.cpp: Removed. 74 * WebInspector/WebInspector.h: Removed. 75 * WebInspector/webInspector/Images/button.png: Removed. 76 * WebInspector/webInspector/Images/buttonDivider.png: Removed. 77 * WebInspector/webInspector/Images/buttonPressed.png: Removed. 78 * WebInspector/webInspector/Images/close.png: Removed. 79 * WebInspector/webInspector/Images/closePressed.png: Removed. 80 * WebInspector/webInspector/Images/downTriangle.png: Removed. 81 * WebInspector/webInspector/Images/menu.png: Removed. 82 * WebInspector/webInspector/Images/menuPressed.png: Removed. 83 * WebInspector/webInspector/Images/popup.png: Removed. 84 * WebInspector/webInspector/Images/popupPressed.png: Removed. 85 * WebInspector/webInspector/Images/resize.png: Removed. 86 * WebInspector/webInspector/Images/rightTriangle.png: Removed. 87 * WebInspector/webInspector/Images/scrollThumbBottom.png: Removed. 88 * WebInspector/webInspector/Images/scrollThumbMiddle.png: Removed. 89 * WebInspector/webInspector/Images/scrollTrackMiddle.png: Removed. 90 * WebInspector/webInspector/Images/upTriangle.png: Removed. 91 * WebInspector/webInspector/inspector.css: Removed. 92 * WebInspector/webInspector/inspector.html: Removed. 93 * WebInspector/webInspector/inspector.js: Removed. 94 * WebInspector/webInspector/scrollarea.js: Removed. 95 * WebInspector/webInspector/scrollbar.js: Removed. 96 * WebInspector/webInspector/treeoutline.js: Removed. 97 * WebInspector/webInspector/utilities.js: Removed. 98 99 Build-fu: 100 101 * WebKit.vcproj/WebKit.vcproj: 102 1 103 2007-06-19 Dave Hyatt <hyatt@apple.com> 2 104 -
trunk/WebKit/win/Interfaces/IWebUIDelegate.idl
r23357 r23677 123 123 WebMenuItemTagPDFSinglePageScrolling, 124 124 WebMenuItemTagPDFFacingPagesScrolling, 125 // WebMenuItemTagInspectElement is only known to WebKit 126 WebMenuItemTagInspectElement=9999, 125 WebMenuItemTagInspectElement, 127 126 WebMenuItemBaseApplicationTag=10000 128 127 } WebMenuItemTag; -
trunk/WebKit/win/WebContextMenuClient.cpp
r23457 r23677 59 59 COMPtr<IWebUIDelegate> uiDelegate; 60 60 if (FAILED(m_webView->uiDelegate(&uiDelegate))) 61 return 0;61 return menu->platformDescription(); 62 62 63 63 ASSERT(uiDelegate); … … 68 68 // FIXME: We need to decide whether to do the default before calling this delegate method 69 69 if (FAILED(uiDelegate->contextMenuItemsForElement(m_webView, propertyBag.get(), (OLE_HANDLE)(ULONG64)menu->platformDescription(), (OLE_HANDLE*)&newMenu))) 70 newMenu = menu->platformDescription(); 71 72 // FIXME: Only do this if m_webView->developerExtrasEnabled() 73 if (::GetMenuItemCount(newMenu) > 0) { 74 MENUITEMINFO separator = {0}; 75 separator.cbSize = sizeof(separator); 76 separator.fMask = MIIM_FTYPE; 77 separator.fType = MFT_SEPARATOR; 78 ::InsertMenuItem(newMenu, (UINT)-1, TRUE, &separator); 79 } 80 81 MENUITEMINFO info = {0}; 82 info.cbSize = sizeof(info); 83 info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; 84 info.fType = MFT_STRING; 85 info.dwTypeData = _tcsdup(LPCTSTR_UI_STRING("Inspect Element", "Inspect Element context menu item")); 86 info.wID = WebMenuItemTagInspectElement; 87 88 ::InsertMenuItem(newMenu, (UINT)-1, TRUE, &info); 70 return menu->platformDescription(); 89 71 90 72 return newMenu; … … 154 136 notImplemented(); 155 137 } 138 139 bool WebContextMenuClient::shouldIncludeInspectElementItem() 140 { 141 notImplemented(); 142 return true; 143 } -
trunk/WebKit/win/WebContextMenuClient.h
r23455 r23677 46 46 virtual void speak(const WebCore::String&); 47 47 virtual void stopSpeaking(); 48 virtual bool shouldIncludeInspectElementItem(); 48 49 49 50 private: -
trunk/WebKit/win/WebCoreLocalizedStrings.cpp
r23376 r23677 72 72 String WebCore::contextMenuItemTagRightToLeft() { return String(LPCTSTR_UI_STRING("Right to Left", "Right to Left context menu item")); } 73 73 String WebCore::contextMenuItemTagShowSpellingPanel(bool show) { return String(show ? LPCTSTR_UI_STRING("Show Spelling and Grammar", "menu item title") : LPCTSTR_UI_STRING("Hide Spelling and Grammar", "menu item title")); } 74 String WebCore::contextMenuItemTagInspectElement() { return String(LPCTSTR_UI_STRING("Inspect Element", "Inspect Element context menu item")); } 74 75 String WebCore::searchMenuNoRecentSearchesText() { return String(LPCTSTR_UI_STRING("No recent searches", "Label for only item in menu that appears when clicking on the search field image, when no searches have been performed")); } 75 76 String WebCore::searchMenuRecentSearchesText() { return String(LPCTSTR_UI_STRING("Recent Searches", "label for first item in the menu that appears when clicking on the search field image, used as embedded menu title")); } -
trunk/WebKit/win/WebFrame.cpp
r23423 r23677 2101 2101 } 2102 2102 2103 bool WebFrame::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int )2103 bool WebFrame::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int /*length*/) 2104 2104 { 2105 2105 notImplemented(); … … 2537 2537 } 2538 2538 2539 void WebFrame::addInspector(WebInspector*)2540 {2541 notImplemented();2542 }2543 2544 void WebFrame::removeInspector(WebInspector*)2545 {2546 notImplemented();2547 }2548 2549 2539 HRESULT STDMETHODCALLTYPE WebFrame::isFrameSet( 2550 2540 /* [retval][out] */ BOOL* result) -
trunk/WebKit/win/WebFrame.h
r23411 r23677 62 62 class WebFramePolicyListener; 63 63 class WebHistory; 64 class WebInspector;65 64 class WebView; 66 65 … … 322 321 void invalidate(); 323 322 void receivedData(const char*, int, const WebCore::String&); 324 void addInspector(WebInspector*);325 void removeInspector(WebInspector*);326 323 void unmarkAllMisspellings(); 327 324 void unmarkAllBadGrammar(); -
trunk/WebKit/win/WebInspectorClient.h
r23676 r23677 27 27 */ 28 28 29 // This header contains WebInspector declarations that can be used anywhere in the Web Kit, but are neither SPI nor API. 29 #ifndef WebInspectorClient_h 30 #define WebInspectorClient_h 30 31 31 #import <Foundation/NSObject.h> 32 #import <WebKit/WebInspector.h> 33 #import <WebKit/DOMNode.h> 32 #include <WebCore/COMPtr.h> 33 #include <WebCore/InspectorClient.h> 34 #include <WebCore/PlatformString.h> 35 #include <wtf/OwnPtr.h> 36 #include <windows.h> 34 37 35 @class DOMHTMLDocument; 36 @class WebView; 37 @class WebFrame; 38 @class WebNodeHighlight; 38 class WebNodeHighlight; 39 class WebView; 39 40 40 @interface WebInspectorPrivate : NSObject 41 { 42 @public 43 WebView *webView; 44 WebFrame *inspectedWebFrame; 45 WebNodeHighlight *currentHighlight; 46 #ifndef NDEBUG 47 NSMutableDictionary *debugFileMap; 48 #endif 49 BOOL webViewLoaded; 50 BOOL preventHighlight; 51 } 52 @end 41 class WebInspectorClient : public WebCore::InspectorClient { 42 public: 43 WebInspectorClient(WebView*); 53 44 54 @interface WebInspector (WebInspectorPrivate) 55 - (void)_highlightNode:(DOMNode *)node; 56 - (void)_updateSystemColors; 57 @end 45 // InspectorClient 46 virtual void inspectorDestroyed(); 47 48 virtual WebCore::Page* createPage(); 49 virtual void showWindow(); 50 virtual void closeWindow(); 51 virtual bool windowVisible(); 52 53 virtual void attachWindow(); 54 virtual void detachWindow(); 55 56 virtual void highlight(WebCore::Node*); 57 virtual void hideHighlight(); 58 59 virtual void inspectedURLChanged(const WebCore::String& newURL); 60 61 private: 62 ~WebInspectorClient(); 63 64 void updateWindowTitle(); 65 66 LRESULT onSize(WPARAM, LPARAM); 67 LRESULT onClose(WPARAM, LPARAM); 68 69 void onWebViewWindowPosChanging(WPARAM, LPARAM); 70 71 WebView* m_inspectedWebView; 72 HWND m_inspectedWebViewHwnd; 73 HWND m_hwnd; 74 COMPtr<WebView> m_webView; 75 HWND m_webViewHwnd; 76 WNDPROC m_originalWebViewWndProc; 77 78 bool m_attached; 79 80 OwnPtr<WebNodeHighlight> m_highlight; 81 82 WebCore::String m_inspectedURL; 83 84 static friend LRESULT CALLBACK WebInspectorWndProc(HWND, UINT, WPARAM, LPARAM); 85 static friend LRESULT CALLBACK SubclassedWebViewWndProc(HWND, UINT, WPARAM, LPARAM); 86 }; 87 88 #endif // !defined(WebInspectorClient_h) -
trunk/WebKit/win/WebKit.vcproj/WebKit.vcproj
r23463 r23677 104 104 <Tool 105 105 Name="VCPostBuildEventTool" 106 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\ webInspector\Images"
xcopy /y /d "$(ProjectDir)..\WebInspector\webInspector\*" "$(OutDir)\$(ProjectName).resources\webInspector"
xcopy /y /d "$(ProjectDir)..\WebInspector\webInspector\Images\*" "$(OutDir)\$(ProjectName).resources\webInspector\Images"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"107 106 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
" 107 /> 108 108 </Configuration> 109 109 <Configuration … … 195 195 <Tool 196 196 Name="VCPostBuildEventTool" 197 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\ webInspector\Images"
xcopy /y /d "$(ProjectDir)..\WebInspector\webInspector\*" "$(OutDir)\$(ProjectName).resources\webInspector"
xcopy /y /d "$(ProjectDir)..\WebInspector\webInspector\Images\*" "$(OutDir)\$(ProjectName).resources\webInspector\Images"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"197 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
" 198 198 /> 199 199 </Configuration> … … 286 286 <Tool 287 287 Name="VCPostBuildEventTool" 288 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\ webInspector\Images"
xcopy /y /d "$(ProjectDir)..\WebInspector\webInspector\*" "$(OutDir)\$(ProjectName).resources\webInspector"
xcopy /y /d "$(ProjectDir)..\WebInspector\webInspector\Images\*" "$(OutDir)\$(ProjectName).resources\webInspector\Images"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"288 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
" 289 289 /> 290 290 </Configuration> … … 307 307 </File> 308 308 <File 309 RelativePath="..\WebInspectorClient.cpp" 310 > 311 </File> 312 <File 309 313 RelativePath="..\WebKitClassFactory.cpp" 310 314 > … … 312 316 <File 313 317 RelativePath="..\WebKitDLL.cpp" 318 > 319 </File> 320 <File 321 RelativePath="..\WebNodeHighlight.cpp" 314 322 > 315 323 </File> … … 445 453 </File> 446 454 <File 455 RelativePath="..\WebInspectorClient.h" 456 > 457 </File> 458 <File 447 459 RelativePath="..\WebJavaScriptCollector.h" 448 460 > … … 478 490 <File 479 491 RelativePath="..\WebMutableURLRequest.h" 492 > 493 </File> 494 <File 495 RelativePath="..\WebNodeHighlight.h" 480 496 > 481 497 </File> … … 742 758 <File 743 759 RelativePath="$(WebKitOutputDir)\include\JavaScriptCore\JavaScriptCore\JSStringRefCF.h" 744 >745 </File>746 </Filter>747 <Filter748 Name="WebInspector"749 >750 <File751 RelativePath="..\WebInspector\WebInspector.cpp"752 >753 </File>754 <File755 RelativePath="..\WebInspector\WebInspector.h"756 760 > 757 761 </File> -
trunk/WebKit/win/WebNodeHighlight.h
r23676 r23677 1 1 /* 2 * Copyright (C) 200 6 Apple Computer,Inc. All rights reserved.2 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 */ 28 28 29 #import <AppKit/NSWindowController.h> 29 #ifndef WebNodeHighlight_h 30 #define WebNodeHighlight_h 30 31 31 @class WebFrame; 32 @class WebInspectorPrivate; 33 @class DOMNode; 32 #pragma warning(push, 0) 33 #include <WebCore/IntRect.h> 34 #pragma warning(pop) 34 35 35 @interface WebInspector : NSWindowController 36 { 37 @private 38 WebInspectorPrivate *_private; 39 } 40 + (WebInspector *)sharedWebInspector; 36 #include <windows.h> 41 37 42 - (id)initWithWebFrame:(WebFrame *)webFrame; 38 class WebNodeHighlight { 39 public: 40 WebNodeHighlight(HWND webView); 41 ~WebNodeHighlight(); 43 42 44 - (void)setWebFrame:(WebFrame *)webFrame;45 - (WebFrame *)webFrame;43 void highlight(const WebCore::IntRect&); 44 void hide(); 46 45 47 - (void)setRootDOMNode:(DOMNode *)node;48 - (DOMNode *)rootDOMNode;46 void updateWindow(); 47 bool visible() const; 49 48 50 - (void)setFocusedDOMNode:(DOMNode *)node; 51 - (DOMNode *)focusedDOMNode; 52 @end 49 private: 50 void removeSubclass(); 51 52 HWND m_webView; 53 HWND m_subclassedWindow; 54 HWND m_overlay; 55 56 WebCore::IntRect m_rect; 57 58 WNDPROC m_originalWndProc; 59 60 friend static LRESULT CALLBACK OverlayWndProc(HWND, UINT, WPARAM, LPARAM); 61 friend static LRESULT CALLBACK SubclassedWndProc(HWND, UINT, WPARAM, LPARAM); 62 }; 63 64 #endif // !defined(WebNodeHighlight_h) -
trunk/WebKit/win/WebView.cpp
r23623 r23677 39 39 #include "WebContextMenuClient.h" 40 40 #include "WebDragClient.h" 41 #include "WebInspector /WebInspector.h"41 #include "WebInspectorClient.h" 42 42 #include "WebKit.h" 43 43 #include "WebKitStatisticsPrivate.h" … … 132 132 , m_hasSpellCheckerDocumentTag(false) 133 133 , m_smartInsertDeleteEnabled(false) 134 , m_didClose(false) 134 135 { 135 136 KJS::Collector::registerAsMainThread(); … … 179 180 void WebView::close() 180 181 { 182 if (m_didClose) 183 return; 184 185 m_didClose = true; 186 181 187 IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); 182 188 COMPtr<IWebPreferences> prefs; … … 734 740 ContextMenu* menu = m_page->contextMenuController()->contextMenu(); 735 741 ASSERT(menu); 736 if (wParam == WebMenuItemTagInspectElement) { 737 inspectElement(menu->hitTestResult()); 738 return; 739 } 742 740 743 ContextMenuItem* item = menu->itemWithAction((ContextMenuAction)wParam); 741 744 m_page->contextMenuController()->contextMenuItemSelected(item); 742 745 delete item; 743 }744 745 void WebView::inspectElement(const HitTestResult& hitTestResult)746 {747 Node* node = hitTestResult.innerNonSharedNode();748 if (!node)749 return;750 751 WebFrame* frame = kit(node->document()->frame());752 if (!frame)753 return;754 755 if (node->nodeType() != Node::ELEMENT_NODE || node->nodeType() != Node::DOCUMENT_NODE)756 node = node->parentNode();757 758 COMPtr<IDOMNode> domNode;759 domNode.adoptRef(DOMNode::createInstance(node));760 761 WebInspector* inspector = WebInspector::sharedWebInspector();762 inspector->setWebFrame(frame);763 inspector->setFocusedDOMNode(domNode.get());764 765 if (node)766 node = node->parentNode();767 if (node)768 node = node->parentNode();769 if (node) {770 COMPtr<IDOMNode> domNode;771 domNode.adoptRef(DOMNode::createInstance(node));772 inspector->setRootDOMNode(domNode.get());773 }774 775 inspector->show();776 746 } 777 747 … … 1747 1717 1748 1718 m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this)); 1719 // FIXME: make this read a preference like the Mac's WebKitDeveloperExtras or when Safari's IncludeDebugMenu is set 1720 if (true) 1721 m_page->setInspectorClient(new WebInspectorClient(this)); 1749 1722 // FIXME: 4931464 - When we do cache pages on Windows this needs to be removed so the "should I cache this page?" check 1750 1723 // in FrameLoader::provisionalLoadStarted() doesn't always fail … … 3560 3533 } 3561 3534 3535 void WebView::setProhibitsMainFrameScrolling(bool b) 3536 { 3537 m_page->mainFrame()->setProhibitsScrolling(b); 3538 } 3539 3562 3540 class EnumTextMatches : public IEnumTextMatches 3563 3541 { -
trunk/WebKit/win/WebView.h
r23563 r23677 35 35 36 36 #include <WebCore/IntRect.h> 37 #include <wtf/OwnPtr.h> 37 38 38 39 class WebFrame; 39 40 class WebBackForwardList; 41 class WebInspectorClient; 40 42 41 43 WebCore::Page* core(IWebView*); … … 613 615 bool onUninitMenuPopup(WPARAM, LPARAM); 614 616 void performContextMenuAction(WPARAM, LPARAM); 615 void inspectElement(const WebCore::HitTestResult&);616 617 bool mouseWheel(WPARAM, LPARAM, bool isHorizontal); 617 618 bool execCommand(WPARAM wParam, LPARAM lParam); … … 632 633 void closeWindow(); 633 634 void close(); 635 bool didClose() const { return m_didClose; } 636 void setProhibitsMainFrameScrolling(bool = true); 634 637 635 638 HRESULT registerDragDrop(); … … 694 697 bool m_hasSpellCheckerDocumentTag; 695 698 bool m_smartInsertDeleteEnabled; 699 bool m_didClose; 696 700 697 701 static bool s_allowSiteSpecificHacks;
Note: See TracChangeset
for help on using the changeset viewer.