Changeset 17396 in webkit
- Timestamp:
- Oct 27, 2006 10:08:17 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r17395 r17396 1 2006-10-27 Maciej Stachowiak <mjs@apple.com> 2 3 Reviewed by John & Adam. 4 5 - assorted speedups to fix perf regression from fixing correctness regression 6 7 * WebCore.exp: exported new methods. 8 * WebCore.xcodeproj/project.pbxproj: Added CachedResourceMac.mm 9 * bridge/mac/WebCoreFrameBridge.h: 10 * bridge/mac/WebCoreFrameBridge.mm: 11 * loader/CachedResource.cpp: Removed now obsolete getCFURL. 12 * loader/CachedResource.h: 13 * loader/mac/CachedResourceMac.mm: Added. 14 (WebCore::CachedResource::getNSURLRequest): New method; the NSURLRequest is 15 now cached in the CachedObject. 16 * loader/mac/FrameLoader.h: 17 * loader/mac/FrameLoader.mm: 18 (WebCore::FrameLoader::loadedResourceFromMemoryCache): New method - lets 19 the WebKit side do faster dispatch for clients that implement the fast path delegate. 20 * loader/mac/LoaderFunctionsMac.mm: 21 (WebCore::CheckCacheObjectStatus): Instead of calling several FrameLoader methods, 22 just call loadedResourceFromMemoryCache. 23 * loader/mac/WebFrameLoaderClient.h: 24 1 25 2006-10-27 Oliver Hunt <oliver@apple.com> 2 26 … … 58 82 (WebCore::enclosingDeletableElement): 59 83 (WebCore::DeleteButtonController::respondToChangedSelection): 84 85 2006-10-27 John Sullivan <sullivan@apple.com> 86 87 Reviewed by Anders 88 89 * WebCore.exp: 90 exported symbol for FrameMac->advanceToNextSpelling() 91 92 * bridge/mac/WebCoreFrameBridge.h: 93 * bridge/mac/WebCoreFrameBridge.mm: 94 removed advanceToNextMisspelling callers. Clients in WebKit must now call FrameMac directly. 95 96 2006-10-27 Justin Garcia <justin.garcia@apple.com> 97 98 Reviewed by harrison 99 100 <http://bugs.webkit.org/show_bug.cgi?id=11423> 101 REGRESSION: First newline missing from textarea's value 102 103 The regression is that foo, return, bar in a textarea serializes as 'foobar'. 104 105 Before my change in r17223, return (an InsertLineBreak) would insert a '\n' 106 (the line break) then a br to prevent the '\n' from collapsing, since the 107 insertion is being done at the end of a block (the textarea's shadow div). Then, 108 inserting "bar" would displace the br, and "foo\nbar" would serialize as "foo\nbar". 109 After my change in r17223, InsertLineBreak would insert a br then a '\n' (reversed 110 the order). Then inserting "bar" would displace the '\n' and "foo"<br>"bar" would 111 serialize as "foobar" because when serializing RenderTextControl intentionally asks 112 textContent to not convert brs to newlines. It seems to think that the only brs in 113 the shadow div will be placeholders or collapsed. 114 115 We could remove this assumption, but, for consistancy's sake, I changed InsertLineBreak 116 to insert two '\n's when at the end of a block in white-space:pre text. This alone 117 would have fixed the bug, but introduced a new one, because foo, return, bar would 118 produce "foo\nbar\n" which would serialize as "foo\nbar\n" (even though the second 119 '\n' is collapsed, because of 9661). So, then I changed placeholder displacement to 120 displace a '\n' if it's acting as a placeholder. A "placeholder" is now defined as 121 a br or '\n' that will collapse (become superfluous) when content is inserted just 122 before it. 123 124 * editing/CompositeEditCommand.cpp: 125 (WebCore::CompositeEditCommand::removePlaceholderAt): Renamed. Remove 126 a br or '\n' if content inserted just before it will cause it to collapse. 127 * editing/CompositeEditCommand.h: 128 * editing/InsertLineBreakCommand.cpp: 129 (WebCore::InsertLineBreakCommand::doApply): Insert the same type of node 130 to prevent a collapse as was used for the line break. Fixed comments. 131 * editing/InsertTextCommand.cpp: 132 (WebCore::InsertTextCommand::input): Call the renamed function. 133 134 2006-10-27 Geoffrey Garen <ggaren@apple.com> 135 136 Reviewed by Brady. 137 138 Fixed semantic inaccuracy in String::operator NSString *(), where a NULL 139 String became an empty NSString *, instead of nil. This will become important 140 as we start using this conversion more. 141 142 Added work-around for AppKit crash that semantic accuracy revealed. 143 144 No testcase because I don't think there's a way to reflect this change 145 in a webpage yet. 146 147 * platform/PlatformString.h: 148 (WebCore::String::operator NSString*): 149 * platform/mac/TextFieldMac.mm: 150 (-[NSSearchFieldCell _addStringToRecentSearches:]): 151 152 2006-10-27 David Harrison <harrison@apple.com> 153 154 Reviewed by Maciej, 155 156 <rdar://problem/4003820> Expose blockquotes in AXAttributedStringForTextMarkerRange 157 158 * bridge/mac/WebCoreAXObject.mm: 159 (blockquoteLevel): 160 Calculate and return the blockquote level of the element. 161 162 (AXAttributeStringSetBlockquoteLevel): 163 Add, if non-zero, or clear the block quote level attribute. 164 165 (AXAttributedStringAppendText): 166 Send AXAttributeStringSetBlockquoteLevel. 167 168 2006-10-27 Darin Adler <darin@apple.com> 169 170 - fix one error in the Qt build 171 172 * platform/qt/GraphicsContextQt.cpp: 173 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): 174 Updated. 175 176 2006-10-27 Darin Adler <darin@apple.com> 177 178 Reviewed by Maciej. 179 180 * WebCore.exp: Export more symbols needed by WebKit. 181 182 2006-10-26 Geoffrey Garen <ggaren@apple.com> 183 184 Reviewed by the Baroness Esmeralda Von Scratch N' Purr XIV. 185 186 Fixed layout test crash. Oops. 187 188 * loader/mac/WebDocumentLoader.mm: 189 (WebCore::canonicalizedTitle): 190 191 2006-10-26 John Sullivan <sullivan@apple.com> 192 193 Reviewed by Brady 194 195 - fixed <rdar://problem/4806064> Repro crash in FrameMac::loadRequest following iTunes music store link from salon.com 196 197 This restores some of the nil-handling that was implicit before some of the code was converted from 198 Objective-C to C++. 199 200 * bridge/mac/FrameMac.mm: 201 (WebCore::FrameMac::loadRequest): 202 handle nil FrameMac 203 204 * bridge/mac/WebCoreFrameBridge.mm: 205 (-[WebCoreFrameBridge canTargetLoadInFrame:]): 206 handle nil Frame 207 208 2006-10-26 Geoffrey Garen <ggaren@apple.com> 209 210 Reviewed by Darin, Maciej. 211 212 Removed many uses of NSString *. 213 Moved a few methods from WebCoreFrameBridge to FrameLoader, replacing 214 stringByCollapsingNonPrintingCharacters with a c++ equivalent. 215 216 PLT says no performance regression. 217 218 * WebCore.exp: 219 * bridge/mac/WebCoreFrameBridge.mm: 220 (-[WebCoreFrameBridge receivedData:textEncodingName:]): 221 * loader/mac/FrameLoader.h: 222 * loader/mac/FrameLoader.mm: 223 (WebCore::FrameLoader::setupForReplaceByMIMEType): 224 (WebCore::FrameLoader::load): 225 (WebCore::FrameLoader::canShowMIMEType): 226 (WebCore::FrameLoader::representationExistsForURLScheme): 227 (WebCore::FrameLoader::generatedMIMETypeForURLScheme): 228 (WebCore::FrameLoader::checkContentPolicy): 229 (WebCore::FrameLoader::reloadAllowingStaleData): 230 (WebCore::FrameLoader::invalidatePendingPolicyDecision): 231 (WebCore::FrameLoader::checkNewWindowPolicy): 232 (WebCore::FrameLoader::continueAfterNewWindowPolicy): 233 (WebCore::FrameLoader::transitionToCommitted): 234 (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy): 235 (WebCore::FrameLoader::post): 236 * loader/mac/WebDocumentLoader.h: 237 * loader/mac/WebDocumentLoader.mm: 238 (WebCore::DocumentLoader::doesProgressiveLoad): 239 (WebCore::DocumentLoader::setupForReplaceByMIMEType): 240 (WebCore::DocumentLoader::title): 241 (WebCore::DocumentLoader::setOverrideEncoding): 242 (WebCore::DocumentLoader::overrideEncoding): 243 (WebCore::DocumentLoader::setTitle): 244 * loader/mac/WebFrameLoaderClient.h: 245 * loader/mac/WebMainResourceLoader.mm: 246 (WebCore::MainResourceLoader::continueAfterContentPolicy): 247 248 2006-10-26 Timothy Hatcher <timothy@apple.com> 249 250 Reviewed by Adam. 251 252 <rdar://problem/4796941> Table deletion outline is misplaced at nytimes.com 253 254 The main table at nytimes.com has a fixed width of 874px, but the table ends 255 up overflowing to 963px. We now use overflowWidth() and overflowHeight() to correct 256 this. The other bug was a missing top and left of 0px on the container element, 257 causing the deletion UI to sometimes be offset below the table. 258 259 Now check for the element's renderer at the beginning of show() and 260 return early if it is null. 261 262 * editing/DeleteButtonController.cpp: 263 (WebCore::DeleteButtonController::updateOutlineStyle): 264 (WebCore::DeleteButtonController::show): 265 266 2006-10-26 Anders Carlsson <acarlsson@apple.com> 267 268 Build fix. 269 270 * html/CanvasRenderingContext2D.cpp: 271 Include MathExtras.h 272 273 2006-10-26 John Sullivan <sullivan@apple.com> 274 275 Reviewed by Anders. 276 277 Some changes to support new grammar checking code in WebKit. 278 279 * WebCore.exp: 280 added mangled symbol for Document->removeMarkers() so I can call it from WebKit 281 282 * WebCore.xcodeproj/project.pbxproj: 283 Made Document.h and DocumentMarker.h private so I can include them from WebKit. 284 Made HTMLCollection.h private because Document.h uses it. 285 286 * bridge/mac/WebCoreFrameBridge.h: 287 * bridge/mac/WebCoreFrameBridge.mm: 288 removed unmarkAllMisspellings(); WebKit now calls through to the Document directly 289 290 2006-10-26 Anders Carlsson <acarlsson@apple.com> 291 292 Reviewed by Brady. 293 294 Add reverseFind to String and use it instead of findRev. 295 Use CString instead of DeprecatedCString in one place. 296 297 * html/HTMLFormElement.cpp: 298 (WebCore::HTMLFormElement::formData): 299 * ksvg2/svg/SVGURIReference.cpp: 300 (WebCore::SVGURIReference::getTarget): 301 * loader/Decoder.cpp: 302 (WebCore::Decoder::checkForCSSCharset): 303 * platform/PlatformString.h: 304 (WebCore::String::reverseFind): 305 * platform/StringImpl.cpp: 306 (WebCore::StringImpl::reverseFind): 307 * platform/StringImpl.h: 308 309 2006-10-26 John Sullivan <sullivan@apple.com> 310 311 Reviewed by Darin 312 313 More plumbing for grammar checking. Still no grammars is checked. 314 315 * dom/DocumentMarker.h: 316 (WebCore::DocumentMarker::): 317 added Grammar to enum of marker types; removed explicit enum values; removed unnecessary "enum" 318 319 * platform/GraphicsContext.h: 320 renamed method drawLineForMisspelling to drawLineForMisspellingOrBadGrammar; 321 now takes a bool parameter for whether it represents bad grammar or a misspelling 322 323 * platform/mac/GraphicsContextMac.mm: 324 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): 325 Renamed from drawLineForMisspelling; uses green dot instead of red dot for grammar case. Changed 326 an existing "assert" to "ASSERT". 327 328 * rendering/InlineTextBox.h: 329 renamed function paintSpellingMarker to paintSpellingOrGrammarMarker; 330 331 * rendering/InlineTextBox.cpp: 332 (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): 333 Renamed from paintSpellingMarker; now takes a bool parameter for whether it represents 334 bad grammar or a misspelling 335 (WebCore::InlineTextBox::paintAllMarkersOfType): 336 now handles markers of type Grammar 337 338 === Safari-521.29 === 339 340 2006-10-26 Sam Weinig <sam.weinig@gmail.com> 341 342 Reviewed by Mitz. 343 344 Fix for http://bugs.webkit.org/show_bug.cgi?id=11424 345 Cleanup rendering code 346 347 - Assorted code cleanup. 348 349 * rendering/AutoTableLayout.cpp: 350 * rendering/AutoTableLayout.h: 351 (WebCore::AutoTableLayout::totalPercent): 352 * rendering/CounterListItem.h: 353 * rendering/CounterNode.cpp: 354 * rendering/CounterNode.h: 355 (WebCore::CounterNode::~CounterNode): 356 (WebCore::CounterNode::isReset): 357 * rendering/CounterResetNode.cpp: 358 * rendering/CounterResetNode.h: 359 * rendering/DataRef.h: 360 (WebCore::DataRef::DataRef): 361 * rendering/DeprecatedRenderSelect.h: 362 * rendering/DeprecatedSlider.cpp: 363 * rendering/DeprecatedSlider.h: 364 * rendering/EllipsisBox.cpp: 365 * rendering/EllipsisBox.h: 366 (WebCore::EllipsisBox::EllipsisBox): 367 * rendering/FixedTableLayout.cpp: 368 * rendering/FixedTableLayout.h: 369 * rendering/GapRects.h: 370 * rendering/InlineBox.cpp: 371 * rendering/InlineBox.h: 372 (WebCore::InlineBox::InlineBox): 373 (WebCore::InlineBox::setConstructed): 374 (WebCore::InlineBox::clearTruncation): 375 (WebCore::InlineBox::markDirty): 376 * rendering/InlineFlowBox.cpp: 377 * rendering/InlineFlowBox.h: 378 (WebCore::InlineFlowBox::InlineFlowBox): 379 (WebCore::InlineFlowBox::setConstructed): 380 (WebCore::InlineFlowBox::setEdges): 381 (WebCore::InlineFlowBox::setVerticalOverflowPositions): 382 (WebCore::InlineFlowBox::setVerticalSelectionPositions): 383 * rendering/InlineRunBox.h: 384 (WebCore::InlineRunBox::paintBackgroundAndBorder): 385 (WebCore::InlineRunBox::paintDecorations): 386 * rendering/InlineTextBox.cpp: 387 * rendering/InlineTextBox.h: 388 (WebCore::InlineTextBox::InlineTextBox): 389 (WebCore::InlineTextBox::end): 390 (WebCore::InlineTextBox::textObject): 391 * rendering/Length.h: 392 (WebCore::Length::Length): 393 * rendering/ListMarkerBox.cpp: 394 * rendering/ListMarkerBox.h: 395 * rendering/RenderPartObject.h: 396 * rendering/RootInlineBox.cpp: 397 * rendering/RootInlineBox.h: 398 * rendering/SVGInlineFlowBox.cpp: 399 * rendering/SVGInlineFlowBox.h: 400 (WebCore::SVGInlineFlowBox::SVGInlineFlowBox): 401 * rendering/SVGRootInlineBox.cpp: 402 * rendering/SVGRootInlineBox.h: 403 (WebCore::SVGRootInlineBox::SVGRootInlineBox): 404 * rendering/TableLayout.h: 405 (WebCore::TableLayout::TableLayout): 406 (WebCore::TableLayout::~TableLayout): 407 * rendering/bidi.h: 408 (WebCore::BidiStatus::BidiStatus): 409 (WebCore::BidiRun::BidiRun): 410 * rendering/break_lines.h: 411 412 2006-10-26 Justin Garcia <justin.garcia@apple.com> 413 414 Reviewed by john 415 416 <http://bugs.webkit.org/show_bug.cgi?id=11329> 417 Gmail Editor: Can't remove styling applied to selection after clicking "Remove Formatting" toolbar icon. 418 419 * editing/Editor.cpp: 420 (WebCore::Editor::removeFormattingAndStyle): Moved from JSEditor. 421 Wrapped the plain text fragment in a style span with the document 422 default style so that it will appear unstyled regardless of where 423 it is inserted. Could have also inserted the plain text fragment 424 and then applied the document default style to it, but there is not 425 yet any redundant style prevention in ApplyStyleCommand, so this 426 is cleaner. 427 * editing/Editor.h: 428 * editing/JSEditor.cpp: 429 430 2006-10-26 Oliver Hunt <oliver@apple.com> 431 432 Reviewed by Anders. 433 Fixes <rdar://problem/4800518> -- needed to update existing 434 canvas path elements when transforms are performed on the 435 context. 436 437 * html/CanvasRenderingContext2D.cpp: 438 (WebCore::CanvasRenderingContext2D::scale): 439 (WebCore::CanvasRenderingContext2D::rotate): 440 (WebCore::CanvasRenderingContext2D::translate): 441 442 2006-10-26 Nikolas Zimmermann <zimmermann@kde.org> 443 444 Reviewed by Darin. 445 446 Fix Qt/Linux build. 447 448 * platform/network/qt/ResourceLoaderManager.cpp: 449 (WebCore::ResourceLoaderManager::slotData): 450 (WebCore::ResourceLoaderManager::slotMimetype): 451 (WebCore::ResourceLoaderManager::remove): 452 (WebCore::ResourceLoaderManager::add): 453 * platform/network/qt/ResourceLoaderQt.cpp: 454 (WebCore::ResourceLoader::receivedResponse): 455 * platform/qt/FrameQtClient.cpp: 456 (WebCore::FrameQtClientDefault::openURL): 457 * platform/qt/LoaderFunctionsQt.cpp: 458 (WebCore::ServeSynchronousRequest): 459 460 2006-10-26 Adam Roben <aroben@apple.com> 461 462 Reviewed by Adele. 463 464 Fix: <rdar://problem/3951815> add "type-to-select" feature for list 465 boxes (<select> elements) 466 467 This also adds type-ahead find for closed menulists (popups). 468 469 * WebCore.xcodeproj/project.pbxproj: Version wars. 470 * html/HTMLSelectElement.h: Add new instance variables for type-ahead 471 find. 472 * html/HTMLSelectElement.cpp: 473 (WebCore::HTMLSelectElement::HTMLSelectElement): Initialize new 474 instance variables. 475 (WebCore::HTMLSelectElement::defaultEventHandler): Perform type-ahead 476 find on printable character presses. 477 (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Remove 478 redundant check that the listIndex has changed (setSelectedIndex does 479 this for us), and fix indentation. 480 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Change an if 481 to an else-if. 482 (WebCore::stripLeadingWhiteSpace): Helper function for typeAheadFind() 483 to strip leading whitespace (including non-breaking spaces) from a 484 string. 485 (WebCore::HTMLSelectElement::typeAheadFind): New method to perform 486 type-ahead find. 487 * platform/PopupMenu.h: Added new updateFromElement() method to be 488 called from RenderMenuList::updateFromElement(). 489 * platform/mac/PopupMenuMac.mm: 490 (WebCore::PopupMenu::updateFromElement): While we are using 491 NSPopUpButtonCell for our popups, this method can stay empty. 492 * rendering/RenderListBox.cpp: 493 (WebCore::RenderListBox::updateFromElement): Scroll to reveal the first 494 selected element. 495 * rendering/RenderMenuList.cpp: 496 (WebCore::RenderMenuList::updateFromElement): Tell the popup to update 497 if it's visible. 498 499 2006-10-26 Darin Adler <darin@apple.com> 500 501 Reviewed by Anders. 502 503 - fix http://bugs.webkit.org/show_bug.cgi?id=11360 504 editing/pasteboard/copy-paste-bidi intermittently fails due to disappearance of anonymous RenderBlock 505 506 * editing/ReplaceSelectionCommand.cpp: 507 (WebCore::ReplaceSelectionCommand::removeRedundantStyles): 508 Use two vectors instead of a hash map: more efficient, deterministic. There was no 509 reason to use a hash table. 510 511 2006-10-26 Maciej Stachowiak <mjs@apple.com> 512 513 Reviewed by Anders. 514 515 - .5% speed improvement by avoiding excess CFURLRef allocation 516 517 * loader/CachedResource.cpp: 518 (WebCore::CachedResource::getCFURL): New method. For Mac only (for now), cache the CFURL 519 here for later reuse. 520 * loader/CachedResource.h: 521 * loader/mac/LoaderFunctionsMac.mm: 522 (WebCore::CheckCacheObjectStatus): Use the cached CFURL, don't make a whole new one. 523 524 2006-10-25 Darin Adler <darin@apple.com> 525 526 Reviewed by Anders. 527 528 - removed 55 methods from WebCoreFrameBridge 529 - changed callers to use Frame directly instead 530 - put FrameLoaderTypes.h types into the WebCore namespace 531 - first steps to get FrameLoader.h ready for cross-platform duty 532 533 * WebCore.exp: 534 * WebCore.xcodeproj/project.pbxproj: 535 * bridge/mac/BrowserExtensionMac.mm: 536 (WebCore::BrowserExtensionMac::createNewWindow): 537 * bridge/mac/FrameMac.h: 538 * bridge/mac/FrameMac.mm: 539 (WebCore::FrameMac::loadRequest): 540 (WebCore::FrameMac::startRedirectionTimer): 541 (WebCore::FrameMac::stopRedirectionTimer): 542 (WebCore::FrameMac::passSubframeEventToSubframe): 543 (WebCore::FrameMac::handledOnloadEvents): 544 (WebCore::FrameMac::isLoadTypeReload): 545 * bridge/mac/WebCoreFrameBridge.h: 546 * bridge/mac/WebCoreFrameBridge.mm: 547 (-[WebCoreFrameBridge executionContextForView:]): 548 (updateRenderingForBindings): 549 (-[WebCoreFrameBridge canTargetLoadInFrame:]): 550 (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]): 551 (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): 552 (-[WebCoreFrameBridge installInFrame:]): 553 (-[WebCoreFrameBridge numPendingOrLoadingRequests]): 554 (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): 555 (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]): 556 (-[WebCoreFrameBridge dragOperationForDraggingInfo:]): 557 (stringByCollapsingNonPrintingCharacters): 558 (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]): 559 (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]): 560 (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): 561 * loader/FrameLoaderTypes.h: 562 * loader/mac/FrameLoader.h: 563 * loader/mac/FrameLoader.mm: 564 (WebCore::FrameLoader::FrameLoader): 565 (WebCore::FrameLoader::setupForReplace): 566 (WebCore::FrameLoader::load): 567 (WebCore::FrameLoader::activeDocumentLoader): 568 (WebCore::FrameLoader::state): 569 (WebCore::FrameLoader::setState): 570 (WebCore::FrameLoader::clearProvisionalLoad): 571 (WebCore::FrameLoader::markLoadComplete): 572 (WebCore::FrameLoader::commitProvisionalLoad): 573 (WebCore::FrameLoader::receivedMainResourceError): 574 (WebCore::FrameLoader::handleFallbackContent): 575 (WebCore::FrameLoader::isLoadingMainFrame): 576 (WebCore::FrameLoader::continueAfterNewWindowPolicy): 577 (WebCore::FrameLoader::continueAfterNavigationPolicy): 578 (WebCore::FrameLoader::continueAfterWillSubmitForm): 579 (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy): 580 (WebCore::FrameLoader::transitionToCommitted): 581 (WebCore::FrameLoader::checkLoadCompleteForThisFrame): 582 (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy): 583 (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]): 584 (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]): 585 (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]): 586 * loader/mac/ImageDocumentMac.mm: 587 (WebCore::finishImageLoad): 588 * loader/mac/WebDocumentLoader.mm: 589 (WebCore::DocumentLoader::isLoadingInAPISense): 590 * loader/mac/WebMainResourceLoader.h: 591 * loader/mac/WebMainResourceLoader.mm: 592 (WebCore::MainResourceLoader::continueAfterContentPolicy): 593 (-[WebCoreMainResourceLoaderAsPolicyDelegate continueAfterContentPolicy:]): 594 * loader/mac/WebSubresourceLoader.mm: 595 (-[WebCoreSubresourceHandle initWithLoader:]): 596 * platform/mac/ListBoxMac.mm: 597 (-[WebCoreTableView keyDown:]): 598 (-[WebCoreTableView keyUp:]): 599 * platform/mac/WebCoreTextField.mm: 600 (-[WebCoreTextFieldController textView:shouldHandleEvent:]): 601 602 2006-10-25 Steve Falkenburg <sfalken@apple.com> 603 604 Reviewed by Darin. 605 606 Printing fixes 607 608 * page/Frame.cpp: 609 (WebCore::Frame::adjustPageHeight): 610 * page/Frame.h: 611 (WebCore::Frame::setupRootForPrinting): 612 (WebCore::Frame::computePageRects): 613 614 2006-10-25 Anders Carlsson <acarlsson@apple.com> 615 616 Reviewed by Geoff. 617 618 <rdar://problem/4799088> 619 REGRESSION: Translation widget fails to convert data and reports a "Data unavailable" error. 620 621 * loader/mac/WebSubresourceLoader.h: 622 * loader/mac/WebSubresourceLoader.mm: 623 (-[WebCoreSubresourceHandle initWithLoader:]): 624 Set the HTTP method before the HTTP body. 625 626 2006-10-25 Geoffrey Garen <ggaren@apple.com> 627 628 Reviewed by Adam. 629 630 Renamed WebFrameLoader to FrameLoader, to match class name. 631 632 * WebCore.xcodeproj/project.pbxproj: 633 * bridge/mac/FrameMac.mm: 634 * bridge/mac/WebCoreFrameBridge.mm: 635 * loader/mac/FrameLoader.mm: Added. 636 * loader/mac/IconLoaderMac.mm: 637 * loader/mac/WebDocumentLoader.mm: 638 * loader/mac/WebFrameLoader.h: Removed. 639 * loader/mac/WebFrameLoader.mm: Removed. 640 * loader/mac/WebLoader.mm: 641 * loader/mac/WebMainResourceLoader.mm: 642 * loader/mac/WebNetscapePlugInStreamLoader.mm: 643 * loader/mac/WebSubresourceLoader.mm: 644 645 2006-10-25 Darin Adler <darin@apple.com> 646 647 - fix full builds 648 649 * WebCore.xcodeproj/project.pbxproj: Mark bridge/mac/WebCoreResourceLoader.h as private. 650 651 2006-10-25 David Smith <catfish.man@gmail.com> 652 653 Reviewed by Mitz. 654 655 Fixed REGRESSION (r17280): Repro crash when clicking a link with target="_blank" 656 http://bugs.webkit.org/show_bug.cgi?id=11411 657 658 * bridge/mac/WebCoreFrameBridge.mm: 659 (-[WebCoreFrameBridge canTargetLoadInFrame:]): Check that the target has a frame before using it. 660 661 2006-10-25 Maciej Stachowiak <mjs@apple.com> 662 663 Rubber stamped by Mitz. 664 665 - moved some files that are essentially part of the ResourceLoader implementation to platform/network/mac 666 667 * WebCore.xcodeproj/project.pbxproj: 668 * bridge/mac/WebCoreResourceLoader.h: Moved to platform/network/mac. 669 * bridge/mac/WebCoreResourceLoaderImp.h: Moved to platform/network/mac. 670 * bridge/mac/WebCoreResourceLoaderImp.mm: Moved to platform/network/mac. 671 672 2006-10-25 Maciej Stachowiak <mjs@apple.com> 673 674 Rubber stamped by Mark. 675 676 - remove no longer existing symbol that was breaking linking 677 678 * WebCore.exp: 679 680 2006-10-25 Maciej Stachowiak <mjs@apple.com> 681 682 Reviewed by Mitz. 683 684 - fixed "REGRESSION: Activity window doesn't always list all files until refresh" 685 http://bugs.webkit.org/show_bug.cgi?id=11212 686 687 I couldn't figure out how to write a test case. 688 689 * bindings/js/kjs_window.cpp: 690 (KJS::Window::clear): Avoid crashing if already detached. 691 * bridge/mac/FrameMac.h: 692 * bridge/mac/FrameMac.mm: 693 (WebCore::FrameMac::clear): Change prototype to make this a proper 694 overload for Frame::clear once again(!). 60 695 61 696 2006-10-27 John Sullivan <sullivan@apple.com> -
trunk/WebCore/WebCore.exp
r17393 r17396 138 138 __ZN7WebCore11FrameLoader17actionInformationENS_13FrameLoadTypeEbP7NSEventP5NSURL 139 139 __ZN7WebCore11FrameLoader17actionInformationENS_14NavigationTypeEP7NSEventP5NSURL 140 __ZN7WebCore11FrameLoader19requestFromDelegateEP12NSURLRequestRP11objc_objectRP7NSError 140 141 __ZN7WebCore11FrameLoader21addPlugInStreamLoaderEPNS_17WebResourceLoaderE 141 142 __ZN7WebCore11FrameLoader21commitProvisionalLoadEP12NSDictionary … … 146 147 __ZN7WebCore11FrameLoader24removePlugInStreamLoaderEPNS_17WebResourceLoaderE 147 148 __ZN7WebCore11FrameLoader25provisionalDocumentLoaderEv 149 __ZN7WebCore11FrameLoader29sendRemainingDelegateMessagesEP11objc_objectP13NSURLResponsejP7NSError 148 150 __ZN7WebCore11FrameLoader4loadEP12NSURLRequest 149 151 __ZN7WebCore11FrameLoader4loadEP12NSURLRequestP12NSDictionaryNS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r17390 r17396 283 283 654EC611097778F500DAB52C /* WebCoreFrameBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */; settings = {ATTRIBUTES = (Private, ); }; }; 284 284 654EC612097778F500DAB52C /* WebCoreFrameBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */; }; 285 654F68880AF1B7C50065BDD6 /* CachedResourceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */; }; 285 286 6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B693099DF0270090D781 /* CDATASection.cpp */; }; 286 287 6550B69E099DF0270090D781 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B694099DF0270090D781 /* CDATASection.h */; }; … … 3177 3178 654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreFrameBridge.h; sourceTree = "<group>"; }; 3178 3179 654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFrameBridge.mm; sourceTree = "<group>"; }; 3180 654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = CachedResourceMac.mm; sourceTree = "<group>"; }; 3179 3181 6550B693099DF0270090D781 /* CDATASection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDATASection.cpp; sourceTree = "<group>"; }; 3180 3182 6550B694099DF0270090D781 /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = "<group>"; }; … … 7502 7504 children = ( 7503 7505 93A1EAA70A563508006960A0 /* ImageDocumentMac.h */, 7506 654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */, 7504 7507 93A1EA9F0A5634C9006960A0 /* ImageDocumentMac.mm */, 7505 7508 F587850302DE375901EA4122 /* LoaderFunctionsMac.mm */, … … 11700 11703 853CA9EC0AEEC63C002372DC /* RenderForeignObject.cpp in Sources */, 11701 11704 853CA9F00AEEC657002372DC /* RenderPath.cpp in Sources */, 11705 654F68880AF1B7C50065BDD6 /* CachedResourceMac.mm in Sources */, 11702 11706 655A81BC0AEF67D4000975F0 /* WebCoreResourceLoaderImp.mm in Sources */, 11703 11707 ); -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.h
r17393 r17396 185 185 @interface WebCoreFrameBridge : NSObject 186 186 { 187 @public 187 188 WebCoreFrameMac* m_frame; 188 189 … … 405 406 - (void)frameDetached; 406 407 - (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName; 407 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data;408 408 - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalNSURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode; 409 409 -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.mm
r17393 r17396 2154 2154 } 2155 2155 2156 - (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data2157 {2158 if (!m_frame)2159 return;2160 2161 // FIXME: If the WebKit client changes or cancels the request, WebCore does not respect this and continues the load.2162 NSURLRequest *request = [[NSURLRequest alloc] initWithURL:URL];2163 NSError *error;2164 id identifier;2165 m_frame->loader()->requestFromDelegate(request, identifier, error);2166 m_frame->loader()->sendRemainingDelegateMessages(identifier, response, [data length], error);2167 [request release];2168 }2169 2170 2156 - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode 2171 2157 { -
trunk/WebCore/loader/CachedResource.cpp
r17300 r17396 166 166 } 167 167 168 #if PLATFORM(MAC)169 CFURLRef CachedResource::getCFURL()170 {171 if (!m_cfURL) {172 m_cfURL = KURL(url().deprecatedString()).createCFURL();173 CFRelease(m_cfURL.get());174 }175 176 return m_cfURL.get();177 168 } 178 #endif179 180 } -
trunk/WebCore/loader/CachedResource.h
r17300 r17396 38 38 #if PLATFORM(MAC) 39 39 #include "RetainPtr.h" 40 41 #ifdef __OBJC__ 42 @class NSURLRequest; 43 #else 44 class NSURLRequest; 40 45 #endif 46 47 #endif // PLATFORM(MAC) 41 48 42 49 namespace WebCore { … … 133 140 134 141 #if PLATFORM(MAC) 135 CFURLRef getCFURL();142 NSURLRequest* getNSURLRequest(); 136 143 #endif 137 144 … … 146 153 147 154 #if PLATFORM(MAC) 148 RetainPtr< CFURLRef> m_cfURL;155 RetainPtr<NSURLRequest> m_nsURLRequest; 149 156 #endif 150 157 -
trunk/WebCore/loader/mac/FrameLoader.h
r17393 r17396 222 222 NSURLRequest *requestFromDelegate(NSURLRequest *, id& identifier, NSError *& error); 223 223 void post(NSURL *, const String& referrer, const String& target, NSArray *postData, const String& contentType, NSEvent *, Element* form, NSDictionary *formValues); 224 void loadedResourceFromMemoryCache(NSURLRequest *request, NSURLResponse *response, int length); 224 225 225 226 void checkLoadComplete(); -
trunk/WebCore/loader/mac/FrameLoader.mm
r17393 r17396 1624 1624 } 1625 1625 1626 void FrameLoader::loadedResourceFromMemoryCache(NSURLRequest *request, NSURLResponse *response, int length) 1627 { 1628 if (m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, response, length)) 1629 return; 1630 1631 id identifier; 1632 NSError *error; 1633 requestFromDelegate(request, identifier, error); 1634 sendRemainingDelegateMessages(identifier, response, length, error); 1635 } 1636 1626 1637 void FrameLoader::post(NSURL *URL, const String& referrer, const String& target, NSArray *postData, 1627 1638 const String& contentType, NSEvent *event, Element* form, NSDictionary *formValues) -
trunk/WebCore/loader/mac/LoaderFunctionsMac.mm
r17393 r17396 36 36 #import "FormData.h" 37 37 #import "FormDataMac.h" 38 #import "FrameLoader.h" 38 39 #import "WebCoreResourceLoaderImp.h" 39 40 #import "Logging.h" … … 158 159 FrameMac *frame = static_cast<FrameMac *>(loader->frame()); 159 160 160 if ( frame && !frame->haveToldBridgeAboutLoad(cachedObject->url())) {161 WebCoreFrameBridge *bridge = frame->bridge();161 if (!frame || frame->haveToldBridgeAboutLoad(cachedObject->url())) 162 return; 162 163 163 BEGIN_BLOCK_OBJC_EXCEPTIONS;164 [bridge objectLoadedFromCacheWithURL:(NSURL *)cachedObject->getCFURL()165 response:(NSURLResponse *)cachedObject->response()166 data:(NSData *)cachedObject->allData()];167 END_BLOCK_OBJC_EXCEPTIONS;168 169 frame->didTellBridgeAboutLoad(cachedObject->url());170 }164 NSURLRequest *request = cachedObject->getNSURLRequest(); 165 NSURLResponse *response = cachedObject->response(); 166 NSData *data = cachedObject->allData(); 167 168 // FIXME: If the WebKit client changes or cancels the request, WebCore does not respect this and continues the load. 169 frame->loader()->loadedResourceFromMemoryCache(request, response, [data length]); 170 171 frame->didTellBridgeAboutLoad(cachedObject->url()); 171 172 } 172 173 -
trunk/WebCore/loader/mac/WebFrameLoaderClient.h
r17352 r17396 96 96 virtual void dispatchDidFinishLoading(DocumentLoader*, id identifier) = 0; 97 97 virtual void dispatchDidFailLoading(DocumentLoader*, id identifier, NSError *) = 0; 98 virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, NSURLRequest *, NSURLResponse *, int length) = 0; 98 99 99 100 virtual void dispatchDidHandleOnloadEvents() = 0; -
trunk/WebKit/ChangeLog
r17393 r17396 1 2006-10-27 Maciej Stachowiak <mjs@apple.com> 2 3 Reviewed by John & Adam. 4 5 - various performance improvements for resource delegate dispatch. 6 7 - avoid any ObjC messaging when fetching the WebView 8 - avoid ObjC calls to WebView to get resource load delegate and impl cache 9 - cache actual method pointers, not just the fact that the method is present 10 - added a new SPI resource load delegate method which allows clients to get 11 just one message in case of synchronously loading from memory cache; if this 12 is implemented you don't get the normal delegate calls in that case. 13 - various other minor tweaks 14 15 * WebCoreSupport/WebFrameBridge.h: 16 * WebCoreSupport/WebFrameLoaderClient.h: 17 * WebCoreSupport/WebFrameLoaderClient.mm: 18 (getWebView): 19 (WebFrameLoaderClient::hasBackForwardList): 20 (WebFrameLoaderClient::resetBackForwardList): 21 (WebFrameLoaderClient::privateBrowsingEnabled): 22 (WebFrameLoaderClient::updateHistoryForStandardLoad): 23 (WebFrameLoaderClient::resetAfterLoadError): 24 (WebFrameLoaderClient::download): 25 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): 26 (WebFrameLoaderClient::dispatchIdentifierForInitialRequest): 27 (WebFrameLoaderClient::dispatchWillSendRequest): 28 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): 29 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): 30 (WebFrameLoaderClient::dispatchDidReceiveResponse): 31 (WebFrameLoaderClient::dispatchDidReceiveContentLength): 32 (WebFrameLoaderClient::dispatchDidFinishLoading): 33 (WebFrameLoaderClient::dispatchDidFailLoading): 34 (WebFrameLoaderClient::dispatchDidHandleOnloadEvents): 35 (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): 36 (WebFrameLoaderClient::dispatchDidCancelClientRedirect): 37 (WebFrameLoaderClient::dispatchWillPerformClientRedirect): 38 (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): 39 (WebFrameLoaderClient::dispatchWillClose): 40 (WebFrameLoaderClient::dispatchDidReceiveIcon): 41 (WebFrameLoaderClient::dispatchDidStartProvisionalLoad): 42 (WebFrameLoaderClient::dispatchDidReceiveTitle): 43 (WebFrameLoaderClient::dispatchDidCommitLoad): 44 (WebFrameLoaderClient::dispatchDidFailProvisionalLoad): 45 (WebFrameLoaderClient::dispatchDidFailLoad): 46 (WebFrameLoaderClient::dispatchDidFinishLoad): 47 (WebFrameLoaderClient::dispatchDidFirstLayout): 48 (WebFrameLoaderClient::dispatchCreatePage): 49 (WebFrameLoaderClient::dispatchShow): 50 (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): 51 (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): 52 (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): 53 (WebFrameLoaderClient::dispatchUnableToImplementPolicy): 54 (WebFrameLoaderClient::dispatchWillSubmitForm): 55 (WebFrameLoaderClient::dispatchDidLoadMainResource): 56 (WebFrameLoaderClient::progressStarted): 57 (WebFrameLoaderClient::progressCompleted): 58 (WebFrameLoaderClient::incrementProgress): 59 (WebFrameLoaderClient::completeProgress): 60 (WebFrameLoaderClient::setMainFrameDocumentReady): 61 (WebFrameLoaderClient::startDownload): 62 (WebFrameLoaderClient::willChangeTitle): 63 (WebFrameLoaderClient::didChangeTitle): 64 (WebFrameLoaderClient::mainFrameURL): 65 (WebFrameLoaderClient::frameLoadCompleted): 66 * WebCoreSupport/WebPageBridge.h: 67 * WebKit.xcodeproj/project.pbxproj: 68 * WebView/WebFrame.mm: 69 (frame): 70 (core): 71 (kit): 72 (getWebView): 73 (-[WebFrame _addBackForwardItemClippedAtTarget:]): 74 (-[WebFrame _canCachePage]): 75 (-[WebFrame _purgePageCache]): 76 (-[WebFrame _loadItem:withLoadType:]): 77 (-[WebFrame _goToItem:withLoadType:]): 78 (-[WebFrame _updateBackground]): 79 (-[WebFrame _clearSelectionInOtherFrames]): 80 (-[WebFrame _isMainFrame]): 81 (-[WebFrame webView]): 82 * WebView/WebResourceLoadDelegatePrivate.h: Added. 83 * WebView/WebView.mm: 84 (-[WebView _cacheResourceLoadDelegateImplementations]): 85 (WebViewGetResourceLoadDelegate): 86 (WebViewGetResourceLoadDelegateImplementations): 87 * WebView/WebViewInternal.h: 88 * WebView/WebViewPrivate.h: 89 90 2006-10-27 John Sullivan <sullivan@apple.com> 91 92 Reviewed by Anders 93 94 - fixed http://bugs.webkit.org/show_bug.cgi?id=11439 95 REGRESSION: Another page loading crash 96 97 * WebView/WebFrame.mm: 98 (-[WebFrame _createItem:]): 99 Handle nil documentLoader the way we did before ObjC->C++ changes 100 101 2006-10-27 John Sullivan <sullivan@apple.com> 102 103 Reviewed by Anders 104 105 * WebView/WebHTMLView.m: 106 (-[NSArray checkSpelling:]): 107 call advanceToNextMisspelling directly on FrameMac, bypassing bridge 108 (-[NSArray showGuessPanel:]): 109 ditto 110 111 2006-10-27 Darin Adler <darin@apple.com> 112 113 - build fix 114 115 * WebCoreSupport/WebFrameLoaderClient.mm: Corrected header file name. 116 117 2006-10-27 Darin Adler <darin@apple.com> 118 119 Reviewed by Maciej. 120 121 - moved methods that are there just to be called by the frame loader client into the client 122 in an attempt to get back some of the speed we lost yesterday 123 124 * DefaultDelegates/WebDefaultResourceLoadDelegate.m: 125 (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]): 126 (-[WebDefaultResourceLoadDelegate webView:resource:didCancelAuthenticationChallenge:fromDataSource:]): 127 * WebCoreSupport/WebFrameLoaderClient.h: 128 * WebCoreSupport/WebFrameLoaderClient.mm: 129 (dataSource): 130 (decisionListener): 131 (WebFrameLoaderClient::WebFrameLoaderClient): 132 (WebFrameLoaderClient::hasWebView): 133 (WebFrameLoaderClient::hasFrameView): 134 (WebFrameLoaderClient::hasBackForwardList): 135 (WebFrameLoaderClient::resetBackForwardList): 136 (WebFrameLoaderClient::provisionalItemIsTarget): 137 (WebFrameLoaderClient::loadProvisionalItemFromPageCache): 138 (WebFrameLoaderClient::invalidateCurrentItemPageCache): 139 (WebFrameLoaderClient::privateBrowsingEnabled): 140 (WebFrameLoaderClient::makeDocumentView): 141 (WebFrameLoaderClient::makeRepresentation): 142 (WebFrameLoaderClient::setDocumentViewFromPageCache): 143 (WebFrameLoaderClient::forceLayout): 144 (WebFrameLoaderClient::forceLayoutForNonHTML): 145 (WebFrameLoaderClient::updateHistoryForCommit): 146 (WebFrameLoaderClient::updateHistoryForBackForwardNavigation): 147 (WebFrameLoaderClient::updateHistoryForReload): 148 (WebFrameLoaderClient::updateHistoryForStandardLoad): 149 (WebFrameLoaderClient::updateHistoryForInternalLoad): 150 (WebFrameLoaderClient::updateHistoryAfterClientRedirect): 151 (WebFrameLoaderClient::setCopiesOnScroll): 152 (WebFrameLoaderClient::tokenForLoadErrorReset): 153 (WebFrameLoaderClient::resetAfterLoadError): 154 (WebFrameLoaderClient::doNotResetAfterLoadError): 155 (WebFrameLoaderClient::detachedFromParent1): 156 (WebFrameLoaderClient::detachedFromParent2): 157 (WebFrameLoaderClient::detachedFromParent3): 158 (WebFrameLoaderClient::detachedFromParent4): 159 (WebFrameLoaderClient::loadedFromPageCache): 160 (WebFrameLoaderClient::download): 161 (WebFrameLoaderClient::dispatchIdentifierForInitialRequest): 162 (WebFrameLoaderClient::dispatchWillSendRequest): 163 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): 164 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): 165 (WebFrameLoaderClient::dispatchDidReceiveResponse): 166 (WebFrameLoaderClient::dispatchDidReceiveContentLength): 167 (WebFrameLoaderClient::dispatchDidFinishLoading): 168 (WebFrameLoaderClient::dispatchDidFailLoading): 169 (WebFrameLoaderClient::dispatchDidHandleOnloadEvents): 170 (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): 171 (WebFrameLoaderClient::dispatchDidCancelClientRedirect): 172 (WebFrameLoaderClient::dispatchWillPerformClientRedirect): 173 (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): 174 (WebFrameLoaderClient::dispatchWillClose): 175 (WebFrameLoaderClient::dispatchDidReceiveIcon): 176 (WebFrameLoaderClient::dispatchDidStartProvisionalLoad): 177 (WebFrameLoaderClient::dispatchDidReceiveTitle): 178 (WebFrameLoaderClient::dispatchDidCommitLoad): 179 (WebFrameLoaderClient::dispatchDidFailProvisionalLoad): 180 (WebFrameLoaderClient::dispatchDidFailLoad): 181 (WebFrameLoaderClient::dispatchDidFinishLoad): 182 (WebFrameLoaderClient::dispatchDidFirstLayout): 183 (WebFrameLoaderClient::dispatchCreatePage): 184 (WebFrameLoaderClient::dispatchShow): 185 (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): 186 (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): 187 (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): 188 (WebFrameLoaderClient::dispatchUnableToImplementPolicy): 189 (WebFrameLoaderClient::dispatchWillSubmitForm): 190 (WebFrameLoaderClient::dispatchDidLoadMainResource): 191 (WebFrameLoaderClient::clearLoadingFromPageCache): 192 (WebFrameLoaderClient::isLoadingFromPageCache): 193 (WebFrameLoaderClient::revertToProvisionalState): 194 (WebFrameLoaderClient::setMainDocumentError): 195 (WebFrameLoaderClient::clearUnarchivingState): 196 (WebFrameLoaderClient::progressStarted): 197 (WebFrameLoaderClient::progressCompleted): 198 (WebFrameLoaderClient::incrementProgress): 199 (WebFrameLoaderClient::completeProgress): 200 (WebFrameLoaderClient::setMainFrameDocumentReady): 201 (WebFrameLoaderClient::startDownload): 202 (WebFrameLoaderClient::willChangeTitle): 203 (WebFrameLoaderClient::didChangeTitle): 204 (WebFrameLoaderClient::committedLoad): 205 (WebFrameLoaderClient::finishedLoading): 206 (WebFrameLoaderClient::finalSetupForReplace): 207 (WebFrameLoaderClient::cancelledError): 208 (WebFrameLoaderClient::cannotShowURLError): 209 (WebFrameLoaderClient::interruptForPolicyChangeError): 210 (WebFrameLoaderClient::cannotShowMIMETypeError): 211 (WebFrameLoaderClient::fileDoesNotExistError): 212 (WebFrameLoaderClient::shouldFallBack): 213 (WebFrameLoaderClient::mainFrameURL): 214 (WebFrameLoaderClient::setDefersCallbacks): 215 (WebFrameLoaderClient::willUseArchive): 216 (WebFrameLoaderClient::isArchiveLoadPending): 217 (WebFrameLoaderClient::cancelPendingArchiveLoad): 218 (WebFrameLoaderClient::clearArchivedResources): 219 (WebFrameLoaderClient::canHandleRequest): 220 (WebFrameLoaderClient::canShowMIMEType): 221 (WebFrameLoaderClient::representationExistsForURLScheme): 222 (WebFrameLoaderClient::generatedMIMETypeForURLScheme): 223 (WebFrameLoaderClient::elementForEvent): 224 (WebFrameLoaderClient::createPolicyDecider): 225 (WebFrameLoaderClient::frameLoadCompleted): 226 (WebFrameLoaderClient::restoreScrollPositionAndViewState): 227 (WebFrameLoaderClient::provisionalLoadStarted): 228 (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent): 229 (WebFrameLoaderClient::addHistoryItemForFragmentScroll): 230 (WebFrameLoaderClient::didFinishLoad): 231 (WebFrameLoaderClient::prepareForDataSourceReplacement): 232 (WebFrameLoaderClient::createDocumentLoader): 233 (WebFrameLoaderClient::setTitle): 234 (WebFrameLoaderClient::canUseArchivedResource): 235 (WebFrameLoaderClient::deliverArchivedResourcesAfterDelay): 236 (WebFrameLoaderClient::deliverArchivedResources): 237 (WebFrameLoaderClient::createPageCache): 238 * WebView/WebFrame.mm: 239 (-[NSView setWebFrame:]): 240 (-[WebFrame _createItem:]): 241 (-[WebFrame _loadItem:withLoadType:]): 242 (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]): 243 (-[WebFrame _loadURL:referrer:intoChild:]): 244 (-[WebFrame _saveScrollPositionAndViewStateToItem:]): 245 (-[WebFrame _hasSelection]): 246 (-[WebFrame _clearSelection]): 247 (-[WebFrame _setProvisionalItem:]): 248 (-[WebFrame _setPreviousItem:]): 249 (-[WebFrame _setCurrentItem:]): 250 (-[WebFrame loadArchive:]): 251 * WebView/WebFrameInternal.h: 252 * WebView/WebHTMLView.m: 253 (-[WebHTMLView _topHTMLView]): 254 * WebView/WebHTMLViewPrivate.h: 255 256 2006-10-26 Geoffrey Garen <ggaren@apple.com> 257 258 Reviewed by Darin, Maciej. 259 260 Removed many uses of NSString * from WebCore. 261 262 Changed a few files to ObjC++ for compatiblity with new WebCore methods 263 taking WebCore::Strings as arguments. 264 265 Added a static_cast to make the c++ compiler happy. 266 267 2006-10-26 John Sullivan <sullivan@apple.com> 268 269 Reviewed by Anders 270 271 * WebView/WebFrame.mm: 272 now includes <WebCore/Document.h> and <WebCore/DocumentMarker.h> 273 (-[WebFrame _unmarkAllBadGrammar]): 274 filled in guts 275 (-[WebFrame _unmarkAllMisspellings]): 276 rewrote to call Document directly, bypassing bridge 277 278 2006-10-26 John Sullivan <sullivan@apple.com> 279 280 * English.lproj/WebViewEditingContextMenu.nib/info.nib: 281 * English.lproj/WebViewEditingContextMenu.nib/objects.nib: 282 283 Changed "Spelling" to "Spelling and Grammar" in context menu for post-Tiger. 284 285 === Safari-521.29 === 286 287 2006-10-26 John Sullivan <sullivan@apple.com> 288 289 No review, just two localized string changes. 290 291 * WebView/WebHTMLView.m: 292 (-[NSArray validateUserInterfaceItem:]): 293 changed "Show/Hide Spelling" to "Show/Hide Spelling and Grammar" post-Tiger to match framework change 294 295 * English.lproj/Localizable.strings: 296 updated for these changes 297 298 2006-10-25 Darin Adler <darin@apple.com> 299 300 Reviewed by Anders. 301 302 - removed 55 methods from WebCoreFrameBridge 303 - changed callers to use Frame directly instead 304 - put FrameLoaderTypes.h types into the WebCore namespace 305 - first steps to get FrameLoader.h ready for cross-platform duty 306 307 * DefaultDelegates/WebDefaultContextMenuDelegate.m: 308 (-[WebDefaultUIDelegate openNewWindowWithURL:element:]): 309 * Plugins/WebBaseNetscapePluginView.mm: 310 (-[WebBaseNetscapePluginView requestWithURLCString:]): 311 (-[WebBaseNetscapePluginView loadPluginRequest:]): 312 (-[WebBaseNetscapePluginView getVariable:value:]): 313 * Plugins/WebNetscapePluginEmbeddedView.m: 314 (-[WebNetscapePluginEmbeddedView didStart]): 315 * Plugins/WebNetscapePluginStream.mm: 316 * Plugins/WebPluginContainerCheck.m: 317 (-[WebPluginContainerCheck _continueWithPolicy:]): 318 (-[WebPluginContainerCheck _isForbiddenFileLoad]): 319 * WebCoreSupport/WebEditorClient.mm: 320 (WebEditorClient::shouldDeleteRange): 321 (WebEditorClient::shouldShowDeleteInterface): 322 * WebCoreSupport/WebFrameBridge.mm: 323 (-[WebFrameBridge webView]): 324 (-[WebFrameBridge finishInitializingWithFrameName:view:]): 325 (-[WebFrameBridge createWindowWithURL:]): 326 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]): 327 (-[WebFrameBridge windowObjectCleared]): 328 (-[WebFrameBridge createModalDialogWithURL:]): 329 * WebCoreSupport/WebFrameLoaderClient.mm: 330 (WebFrameLoaderClient::dispatchCreatePage): 331 (WebFrameLoaderClient::dispatchWillSubmitForm): 332 * WebKit.xcodeproj/project.pbxproj: 333 * WebView/WebArchiver.m: 334 (+[WebArchiver archiveSelectionInFrame:]): 335 * WebView/WebDataSource.mm: 336 (-[WebDataSource _documentFragmentWithImageResource:]): 337 (-[WebDataSource _imageElementWithImageResource:]): 338 * WebView/WebEditingDelegatePrivate.h: 339 * WebView/WebFrame.mm: 340 (core): 341 (kit): 342 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): 343 (-[WebFrame _canCachePage]): 344 (-[WebFrame _childFramesMatchItem:]): 345 (-[WebFrame _URLsMatchItem:]): 346 (-[WebFrame _loadItem:withLoadType:]): 347 (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]): 348 (-[WebFrame _viewWillMoveToHostWindow:]): 349 (-[WebFrame _viewDidMoveToHostWindow]): 350 (-[WebFrame _addChild:]): 351 (-[WebFrame _saveDocumentAndScrollState]): 352 (-[WebFrame _numPendingOrLoadingRequests:]): 353 (-[WebFrame _reloadForPluginChanges]): 354 (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): 355 (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): 356 (-[WebFrame _initWithWebFrameView:webView:coreFrame:]): 357 (-[WebFrame _documentViews]): 358 (-[WebFrame _updateBackground]): 359 (-[WebFrame _unmarkAllMisspellings]): 360 (-[WebFrame _hasSelection]): 361 (-[WebFrame _atMostOneFrameHasSelection]): 362 (-[WebFrame _findFrameWithSelection]): 363 (-[WebFrame _frameLoader]): 364 (-[WebFrame _isDescendantOfFrame:]): 365 (-[WebFrame _setShouldCreateRenderers:]): 366 (-[WebFrame _bodyBackgroundColor]): 367 (-[WebFrame init]): 368 (-[WebFrame initWithName:webFrameView:webView:]): 369 (-[WebFrame dealloc]): 370 (-[WebFrame finalize]): 371 (-[WebFrame name]): 372 (-[WebFrame webView]): 373 (-[WebFrame DOMDocument]): 374 (-[WebFrame frameElement]): 375 (-[WebFrame findFrameNamed:]): 376 (-[WebFrame parentFrame]): 377 (-[WebFrame childFrames]): 378 (-[WebFrame _invalidateCurrentItemPageCache]): 379 (-[WebFrame _dispatchCreateWebViewWithRequest:]): 380 (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]): 381 (-[WebFrame _prepareForDataSourceReplacement]): 382 (-[WebFrame _provisionalLoadStarted]): 383 * WebView/WebFrameInternal.h: 384 * WebView/WebHTMLRepresentation.m: 385 (-[WebHTMLRepresentation DOMDocument]): 386 (-[WebHTMLRepresentation attributedText]): 387 * WebView/WebHTMLView.m: 388 (-[WebHTMLView _documentRange]): 389 (-[WebHTMLView _documentFragmentWithPaths:]): 390 (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]): 391 (-[WebHTMLView _selectedRange]): 392 (-[WebHTMLView _updateMouseoverWithEvent:]): 393 (-[WebHTMLView _canEditRichly]): 394 (-[WebHTMLView _hasSelection]): 395 (-[WebHTMLView _hasSelectionOrInsertionPoint]): 396 (-[WebHTMLView _hasInsertionPoint]): 397 (-[WebHTMLView _isEditable]): 398 (-[WebHTMLView _isSelectionInPasswordField]): 399 (-[WebHTMLView _lookUpInDictionaryFromMenu:]): 400 (-[WebHTMLView _selectionDraggingImage]): 401 (-[WebHTMLView _canIncreaseSelectionListLevel]): 402 (-[WebHTMLView _canDecreaseSelectionListLevel]): 403 (-[WebHTMLView _updateActiveState]): 404 (-[NSArray readSelectionFromPasteboard:]): 405 (-[NSArray validateUserInterfaceItem:]): 406 (-[NSArray maintainsInactiveSelection]): 407 (-[NSArray menuForEvent:]): 408 (-[NSArray scrollWheel:]): 409 (-[NSArray acceptsFirstMouse:]): 410 (-[NSArray shouldDelayWindowOrderingForEvent:]): 411 (-[NSArray mouseDown:]): 412 (-[NSArray mouseDragged:]): 413 (-[NSArray mouseUp:]): 414 (-[NSArray keyDown:]): 415 (-[NSArray keyUp:]): 416 (-[NSArray centerSelectionInVisibleArea:]): 417 (-[NSArray _selectionStartFontAttributesAsRTF]): 418 (-[NSArray _emptyStyle]): 419 (-[NSArray performKeyEquivalent:]): 420 (-[NSArray indent:]): 421 (-[NSArray outdent:]): 422 (-[WebHTMLView cut:]): 423 (-[WebHTMLView paste:]): 424 (-[WebHTMLView _selectRangeInMarkedText:]): 425 (-[WebTextCompleteController doCompletion]): 426 (-[WebHTMLView selectionRect]): 427 (-[WebHTMLView selectionImageForcingWhiteText:]): 428 (-[WebHTMLView selectionImageRect]): 429 (-[WebHTMLView attributedString]): 430 (-[WebHTMLView _isMoveDrag]): 431 (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): 432 * WebView/WebPolicyDelegate.mm: 433 (-[WebPolicyDecisionListener _usePolicy:]): 434 (-[WebPolicyDecisionListener use]): 435 (-[WebPolicyDecisionListener ignore]): 436 (-[WebPolicyDecisionListener download]): 437 (-[WebPolicyDecisionListener continue]): 438 * WebView/WebScriptDebugDelegate.m: 439 (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]): 440 (-[WebScriptCallFrame globalObject]): 441 * WebView/WebView.mm: 442 (-[WebView _attachScriptDebuggerToAllFrames]): 443 (-[WebView _detachScriptDebuggerFromAllFrames]): 444 (-[WebView windowScriptObject]): 445 (incrementFrame): 446 (-[WebView searchFor:direction:caseSensitive:wrap:]): 447 (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]): 448 (-[WebView removeDragCaret]): 449 (-[WebView setScriptDebugDelegate:]): 450 (-[WebView scriptDebugDelegate]): 451 (-[WebView shouldClose]): 452 (-[WebView selectedDOMRange]): 453 (-[WebView styleDeclarationWithText:]): 454 455 2006-10-25 Geoffrey Garen <ggaren@apple.com> 456 457 Reviewed by Adam. 458 459 Renamed WebFrameLoader to FrameLoader, to match class name. 460 461 * Plugins/WebBaseNetscapePluginView.mm: 462 * Plugins/WebNetscapePluginStream.mm: 463 * Plugins/WebPluginController.mm: 464 * WebCoreSupport/WebFrameBridge.mm: 465 * WebView/WebDataSource.mm: 466 * WebView/WebFrame.mm: 467 * WebView/WebPDFView.mm: 468 * WebView/WebPolicyDelegate.mm: 469 * WebView/WebView.mm: 470 471 2006-10-25 Mark Rowe <bdash@webkit.org> 472 473 Reviewed by Anders. 474 475 Build fix for the Buildbot. 476 477 * WebView/WebHTMLView.m: 478 (-[NSArray _addToStyle:fontA:fontB:]): Explicit cast. 479 480 2006-10-25 Maciej Stachowiak <mjs@apple.com> 481 482 Reviewed by Anders. 483 484 <rdar://problem/4785575> REGRESSION: form resubmission warning occurs twice, then Safari crashes in autorelease pool 485 <rdar://problem/4799383> REGRESSION: Crash occurs when dismissing the "Would you like to save this password" sheet 486 487 * WebView/WebPolicyDeciderMac.m: 488 (-[WebPolicyDeciderMac dealloc]): release the listener, don't dealloc it 489 490 2006-10-24 Anders Carlsson <acarlsson@apple.com> 491 492 Reviewed by Darin. 493 494 * WebKitPrefix.h: 495 Include FastMalloc.h from C++ code. 496 497 2006-10-24 Darin Adler <darin@apple.com> 498 499 Reviewed by Anders. 500 501 - converted WebFrameLoaderClient to C++ 502 - renamed frame->frameLoader() function to frame->loader() 503 - renamed [bridge impl] to [bridge _frame] 504 - removed some bridge methods 505 506 * Plugins/WebNetscapePluginStream.mm: 507 * WebCoreSupport/WebEditorClient.mm: 508 * WebCoreSupport/WebFrameLoaderClient.h: Added. 509 (WebFrameLoaderClient::webFrame): 510 * WebCoreSupport/WebFrameLoaderClient.mm: Added. 511 (WebFrameLoaderClient::detachFrameLoader): 512 (WebFrameLoaderClient::hasWebView): 513 (WebFrameLoaderClient::hasFrameView): 514 (WebFrameLoaderClient::hasBackForwardList): 515 (WebFrameLoaderClient::resetBackForwardList): 516 (WebFrameLoaderClient::provisionalItemIsTarget): 517 (WebFrameLoaderClient::loadProvisionalItemFromPageCache): 518 (WebFrameLoaderClient::invalidateCurrentItemPageCache): 519 (WebFrameLoaderClient::privateBrowsingEnabled): 520 (WebFrameLoaderClient::makeDocumentView): 521 (WebFrameLoaderClient::makeRepresentation): 522 (WebFrameLoaderClient::setDocumentViewFromPageCache): 523 (WebFrameLoaderClient::forceLayout): 524 (WebFrameLoaderClient::forceLayoutForNonHTML): 525 (WebFrameLoaderClient::updateHistoryForCommit): 526 (WebFrameLoaderClient::updateHistoryForBackForwardNavigation): 527 (WebFrameLoaderClient::updateHistoryForReload): 528 (WebFrameLoaderClient::updateHistoryForStandardLoad): 529 (WebFrameLoaderClient::updateHistoryForInternalLoad): 530 (WebFrameLoaderClient::updateHistoryAfterClientRedirect): 531 (WebFrameLoaderClient::setCopiesOnScroll): 532 (WebFrameLoaderClient::tokenForLoadErrorReset): 533 (WebFrameLoaderClient::resetAfterLoadError): 534 (WebFrameLoaderClient::doNotResetAfterLoadError): 535 (WebFrameLoaderClient::detachedFromParent1): 536 (WebFrameLoaderClient::detachedFromParent2): 537 (WebFrameLoaderClient::detachedFromParent3): 538 (WebFrameLoaderClient::detachedFromParent4): 539 (WebFrameLoaderClient::loadedFromPageCache): 540 (WebFrameLoaderClient::download): 541 (WebFrameLoaderClient::dispatchIdentifierForInitialRequest): 542 (WebFrameLoaderClient::dispatchWillSendRequest): 543 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): 544 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): 545 (WebFrameLoaderClient::dispatchDidReceiveResponse): 546 (WebFrameLoaderClient::dispatchDidReceiveContentLength): 547 (WebFrameLoaderClient::dispatchDidFinishLoading): 548 (WebFrameLoaderClient::dispatchDidFailLoading): 549 (WebFrameLoaderClient::dispatchDidHandleOnloadEvents): 550 (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): 551 (WebFrameLoaderClient::dispatchDidCancelClientRedirect): 552 (WebFrameLoaderClient::dispatchWillPerformClientRedirect): 553 (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): 554 (WebFrameLoaderClient::dispatchWillClose): 555 (WebFrameLoaderClient::dispatchDidReceiveIcon): 556 (WebFrameLoaderClient::dispatchDidStartProvisionalLoad): 557 (WebFrameLoaderClient::dispatchDidReceiveTitle): 558 (WebFrameLoaderClient::dispatchDidCommitLoad): 559 (WebFrameLoaderClient::dispatchDidFailProvisionalLoad): 560 (WebFrameLoaderClient::dispatchDidFailLoad): 561 (WebFrameLoaderClient::dispatchDidFinishLoad): 562 (WebFrameLoaderClient::dispatchDidFirstLayout): 563 (WebFrameLoaderClient::dispatchCreatePage): 564 (WebFrameLoaderClient::dispatchShow): 565 (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): 566 (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): 567 (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): 568 (WebFrameLoaderClient::dispatchUnableToImplementPolicy): 569 (WebFrameLoaderClient::dispatchWillSubmitForm): 570 (WebFrameLoaderClient::dispatchDidLoadMainResource): 571 (WebFrameLoaderClient::clearLoadingFromPageCache): 572 (WebFrameLoaderClient::isLoadingFromPageCache): 573 (WebFrameLoaderClient::revertToProvisionalState): 574 (WebFrameLoaderClient::setMainDocumentError): 575 (WebFrameLoaderClient::clearUnarchivingState): 576 (WebFrameLoaderClient::progressStarted): 577 (WebFrameLoaderClient::progressCompleted): 578 (WebFrameLoaderClient::incrementProgress): 579 (WebFrameLoaderClient::completeProgress): 580 (WebFrameLoaderClient::setMainFrameDocumentReady): 581 (WebFrameLoaderClient::startDownload): 582 (WebFrameLoaderClient::willChangeTitle): 583 (WebFrameLoaderClient::didChangeTitle): 584 (WebFrameLoaderClient::committedLoad): 585 (WebFrameLoaderClient::finishedLoading): 586 (WebFrameLoaderClient::finalSetupForReplace): 587 (WebFrameLoaderClient::cancelledError): 588 (WebFrameLoaderClient::cannotShowURLError): 589 (WebFrameLoaderClient::interruptForPolicyChangeError): 590 (WebFrameLoaderClient::cannotShowMIMETypeError): 591 (WebFrameLoaderClient::fileDoesNotExistError): 592 (WebFrameLoaderClient::shouldFallBack): 593 (WebFrameLoaderClient::mainFrameURL): 594 (WebFrameLoaderClient::setDefersCallbacks): 595 (WebFrameLoaderClient::willUseArchive): 596 (WebFrameLoaderClient::isArchiveLoadPending): 597 (WebFrameLoaderClient::cancelPendingArchiveLoad): 598 (WebFrameLoaderClient::clearArchivedResources): 599 (WebFrameLoaderClient::canHandleRequest): 600 (WebFrameLoaderClient::canShowMIMEType): 601 (WebFrameLoaderClient::representationExistsForURLScheme): 602 (WebFrameLoaderClient::generatedMIMETypeForURLScheme): 603 (WebFrameLoaderClient::elementForEvent): 604 (WebFrameLoaderClient::createPolicyDecider): 605 (WebFrameLoaderClient::frameLoadCompleted): 606 (WebFrameLoaderClient::restoreScrollPositionAndViewState): 607 (WebFrameLoaderClient::provisionalLoadStarted): 608 (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent): 609 (WebFrameLoaderClient::addHistoryItemForFragmentScroll): 610 (WebFrameLoaderClient::didFinishLoad): 611 (WebFrameLoaderClient::prepareForDataSourceReplacement): 612 (WebFrameLoaderClient::createDocumentLoader): 613 (WebFrameLoaderClient::setTitle): 614 * WebKit.xcodeproj/project.pbxproj: 615 * WebView/WebDataSource.mm: 616 (-[WebDataSource webFrame]): 617 * WebView/WebFrame.mm: 618 (frame): 619 (-[WebFrame _loadItem:withLoadType:]): 620 (-[WebFrame _reloadForPluginChanges]): 621 (-[WebFrame _initWithWebFrameView:webView:bridge:]): 622 (-[WebFrame _frameLoader]): 623 (-[WebFrame provisionalDataSource]): 624 (-[WebFrame dataSource]): 625 (-[WebFrame parentFrame]): 626 (-[WebFrame _provisionalLoadStarted]): 627 * WebView/WebFrameInternal.h: 628 * WebView/WebHTMLRepresentation.m: 629 (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): 630 * WebView/WebHTMLView.m: 631 (-[WebHTMLView _lookUpInDictionaryFromMenu:]): 632 (-[NSArray validateUserInterfaceItem:]): 633 (-[NSArray scrollWheel:]): 634 (-[NSArray acceptsFirstMouse:]): 635 (-[NSArray shouldDelayWindowOrderingForEvent:]): 636 (-[NSArray _selectionStartFontAttributesAsRTF]): 637 (-[NSArray changeBaseWritingDirection:]): 638 (-[NSArray indent:]): 639 (-[NSArray outdent:]): 640 (-[WebHTMLView copy:]): 641 (-[WebHTMLView cut:]): 642 (-[WebHTMLView paste:]): 643 * WebView/WebView.mm: 644 (-[WebView _dashboardRegions]): 645 (-[WebView setProhibitsMainFrameScrolling:]): 646 (-[WebView _setInViewSourceMode:]): 647 (-[WebView _inViewSourceMode]): 648 (-[WebView setEditable:]): 649 1 650 2006-10-27 Geoffrey Garen <ggaren@apple.com> 2 651 -
trunk/WebKit/WebCoreSupport/WebFrameBridge.h
r17238 r17396 37 37 @interface WebFrameBridge : WebCoreFrameBridge <WebCoreFrameBridge> 38 38 { 39 @public 39 40 WebFrame *_frame; 40 41 -
trunk/WebKit/WebCoreSupport/WebFrameLoaderClient.h
r17365 r17396 133 133 virtual void setMainDocumentError(WebCore::DocumentLoader*, NSError *); 134 134 virtual void clearUnarchivingState(WebCore::DocumentLoader*); 135 virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, NSURLRequest *, NSURLResponse *, int length); 135 136 136 137 virtual void progressStarted(); -
trunk/WebKit/WebCoreSupport/WebFrameLoaderClient.mm
r17366 r17396 49 49 #import "WebKitNSStringExtras.h" 50 50 #import "WebNSURLExtras.h" 51 #import "WebPageBridge.h" 51 52 #import "WebPanelAuthenticationHandler.h" 52 53 #import "WebPolicyDeciderMac.h" 53 54 #import "WebPolicyDelegatePrivate.h" 54 55 #import "WebPreferences.h" 56 #import "WebResourceLoadDelegate.h" 55 57 #import "WebResourcePrivate.h" 56 #import "WebResourceLoadDelegate.h"57 58 #import "WebScriptDebugServerPrivate.h" 58 59 #import "WebUIDelegate.h" 59 60 #import "WebViewInternal.h" 60 61 #import <WebCore/FrameLoader.h> 62 #import <WebCore/FrameLoaderTypes.h> 61 63 #import <WebCore/FrameMac.h> 62 64 #import <WebCore/FrameTree.h> 65 #import <WebCore/Page.h> 63 66 #import <WebCore/PlatformString.h> 64 67 #import <WebCore/WebCoreFrameBridge.h> … … 66 69 #import <WebCore/WebDocumentLoader.h> 67 70 #import <WebCore/WebLoader.h> 71 #import <WebKit/DOMElement.h> 72 #import <WebKit/WebDefaultResourceLoadDelegate.h> 73 #import <WebKit/WebDocumentLoaderMac.h> 74 #import <WebKit/WebResourceLoadDelegate.h> 75 #import <WebKit/WebViewInternal.h> 68 76 #import <WebKitSystemInterface.h> 69 77 #import <wtf/PassRefPtr.h> 70 78 71 79 using namespace WebCore; 80 81 static inline WebView* getWebView(DocumentLoader* loader) 82 { 83 return ((WebPageBridge *)loader->frameLoader()->frame()->page()->bridge())->_webView; 84 } 85 86 static inline WebView *getWebView(WebFrame *webFrame) 87 { 88 Frame* coreFrame = core(webFrame); 89 return coreFrame ? ((WebPageBridge *)coreFrame->page()->bridge())->_webView : nil; 90 } 72 91 73 92 static inline WebDataSource *dataSource(DocumentLoader* loader) … … 104 123 bool WebFrameLoaderClient::hasBackForwardList() const 105 124 { 106 return [ [m_webFrame.get() webView]backForwardList] != nil;125 return [getWebView(m_webFrame.get()) backForwardList] != nil; 107 126 } 108 127 … … 111 130 // Note this doesn't verify the current load type as a b/f operation because it is called from 112 131 // a subframe in the case of a delegate bailing out of the nav before it even gets to provisional state. 113 WebFrame *mainFrame = [ [m_webFrame.get() webView]mainFrame];132 WebFrame *mainFrame = [getWebView(m_webFrame.get()) mainFrame]; 114 133 WebHistoryItem *resetItem = mainFrame->_private->currentItem; 115 134 if (resetItem) 116 [[ [m_webFrame.get() webView]backForwardList] goToItem:resetItem];135 [[getWebView(m_webFrame.get()) backForwardList] goToItem:resetItem]; 117 136 } 118 137 … … 146 165 bool WebFrameLoaderClient::privateBrowsingEnabled() const 147 166 { 148 return [[ [m_webFrame.get() webView]preferences] privateBrowsingEnabled];167 return [[getWebView(m_webFrame.get()) preferences] privateBrowsingEnabled]; 149 168 } 150 169 … … 253 272 NSURL *URL = [dataSource _URLForHistory]; 254 273 if (URL && ![URL _web_isEmpty]) { 255 ASSERT( [m_webFrame.get() webView]);256 if (![[ [m_webFrame.get() webView]preferences] privateBrowsingEnabled]) {274 ASSERT(getWebView(m_webFrame.get())); 275 if (![[getWebView(m_webFrame.get()) preferences] privateBrowsingEnabled]) { 257 276 WebHistoryItem *entry = [[WebHistory optionalSharedHistory] addItemForURL:URL]; 258 277 if ([dataSource pageTitle]) … … 326 345 if (!item) 327 346 return; 328 [[ [m_webFrame.get() webView]backForwardList] goToItem:item];347 [[getWebView(m_webFrame.get()) backForwardList] goToItem:item]; 329 348 [item release]; 330 349 } … … 373 392 request:request 374 393 response:response 375 delegate:[ [m_webFrame.get() webView]downloadDelegate]394 delegate:[getWebView(m_webFrame.get()) downloadDelegate] 376 395 proxy:proxy]; 377 396 } 378 397 398 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, NSURLRequest *request, NSURLResponse *response, int length) 399 { 400 WebView *webView = getWebView(loader); 401 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 402 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 403 404 if (!implementations.delegateImplementsDidLoadResourceFromMemoryCache) 405 return false; 406 407 implementations.didLoadResourceFromMemoryCacheFunc(resourceLoadDelegate, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), webView, request, response, length, dataSource(loader)); 408 return true; 409 } 410 379 411 id WebFrameLoaderClient::dispatchIdentifierForInitialRequest(DocumentLoader* loader, NSURLRequest *request) 380 412 { 381 WebView *webView = [m_webFrame.get() webView]; 382 id resourceLoadDelegate = [webView resourceLoadDelegate]; 383 384 if ([webView _resourceLoadDelegateImplementations].delegateImplementsIdentifierForRequest) 385 return [resourceLoadDelegate webView:webView identifierForInitialRequest:request fromDataSource:dataSource(loader)]; 413 WebView *webView = getWebView(loader); 414 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 415 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 416 417 if (implementations.delegateImplementsIdentifierForRequest) 418 return implementations.identifierForRequestFunc(resourceLoadDelegate, @selector(webView:identifierForInitialRequest:fromDataSource:), webView, request, dataSource(loader)); 419 386 420 return [[[NSObject alloc] init] autorelease]; 387 421 } … … 390 424 NSURLRequest *request, NSURLResponse *redirectResponse) 391 425 { 392 WebView *webView = [m_webFrame.get() webView]; 393 id resourceLoadDelegate = [webView resourceLoadDelegate]; 394 395 if ([webView _resourceLoadDelegateImplementations].delegateImplementsWillSendRequest) 396 return [resourceLoadDelegate webView:webView resource:identifier willSendRequest:request redirectResponse:redirectResponse fromDataSource:dataSource(loader)]; 426 WebView *webView = getWebView(loader); 427 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 428 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 429 430 if (implementations.delegateImplementsWillSendRequest) 431 return implementations.willSendRequestFunc(resourceLoadDelegate, @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:), webView, identifier, request, redirectResponse, dataSource(loader)); 397 432 398 433 return request; … … 402 437 NSURLAuthenticationChallenge *challenge) 403 438 { 404 WebView *webView = [m_webFrame.get() webView];439 WebView *webView = getWebView(m_webFrame.get()); 405 440 id resourceLoadDelegate = [webView resourceLoadDelegate]; 406 407 if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveAuthenticationChallenge) { 441 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 442 443 if (implementations.delegateImplementsDidReceiveAuthenticationChallenge) { 408 444 [resourceLoadDelegate webView:webView resource:identifier didReceiveAuthenticationChallenge:challenge fromDataSource:dataSource(loader)]; 409 445 return; … … 417 453 NSURLAuthenticationChallenge *challenge) 418 454 { 419 WebView *webView = [m_webFrame.get() webView];455 WebView *webView = getWebView(m_webFrame.get()); 420 456 id resourceLoadDelegate = [webView resourceLoadDelegate]; 421 422 if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidCancelAuthenticationChallenge) { 457 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 458 459 if (implementations.delegateImplementsDidCancelAuthenticationChallenge) { 423 460 [resourceLoadDelegate webView:webView resource:identifier didCancelAuthenticationChallenge:challenge fromDataSource:dataSource(loader)]; 424 461 return; … … 430 467 void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader* loader, id identifier, NSURLResponse *response) 431 468 { 432 WebView *webView = [m_webFrame.get() webView]; 433 434 if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveResponse) 435 [[webView resourceLoadDelegate] webView:webView resource:identifier didReceiveResponse:response fromDataSource:dataSource(loader)]; 469 WebView *webView = getWebView(loader); 470 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 471 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 472 473 if (implementations.delegateImplementsDidReceiveResponse) 474 implementations.didReceiveResponseFunc(resourceLoadDelegate, @selector(webView:resource:didReceiveResponse:fromDataSource:), webView, identifier, response, dataSource(loader)); 436 475 } 437 476 438 477 void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loader, id identifier, int lengthReceived) 439 478 { 440 WebView *webView = [m_webFrame.get() webView]; 441 442 if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveContentLength) 443 [[webView resourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInteger)lengthReceived fromDataSource:dataSource(loader)]; 479 WebView *webView = getWebView(loader); 480 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 481 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 482 483 if (implementations.delegateImplementsDidReceiveContentLength) 484 implementations.didReceiveContentLengthFunc(resourceLoadDelegate, @selector(webView:resource:didReceiveContentLength:fromDataSource:), webView, identifier, (WebNSUInteger)lengthReceived, dataSource(loader)); 444 485 } 445 486 446 487 void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader, id identifier) 447 488 { 448 WebView *webView = [m_webFrame.get() webView]; 489 WebView *webView = getWebView(loader); 490 id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView); 491 WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView); 449 492 450 if ( [webView _resourceLoadDelegateImplementations].delegateImplementsDidFinishLoadingFromDataSource)451 [[webView resourceLoadDelegate] webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource(loader)];493 if (implementations.delegateImplementsDidFinishLoadingFromDataSource) 494 implementations.didFinishLoadingFromDataSourceFunc(resourceLoadDelegate, @selector(webView:resource:didFinishLoadingFromDataSource:), webView, identifier, dataSource(loader)); 452 495 } 453 496 454 497 void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, id identifier, NSError *error) 455 498 { 456 WebView *webView = [m_webFrame.get() webView];499 WebView *webView = getWebView(m_webFrame.get()); 457 500 [[webView _resourceLoadDelegateForwarder] webView:webView resource:identifier didFailLoadingWithError:error fromDataSource:dataSource(loader)]; 458 501 } … … 460 503 void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() 461 504 { 462 WebView *webView = [m_webFrame.get() webView];505 WebView *webView = getWebView(m_webFrame.get()); 463 506 [[webView _frameLoadDelegateForwarder] webView:webView didHandleOnloadEventsForFrame:m_webFrame.get()]; 464 507 } … … 466 509 void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() 467 510 { 468 WebView *webView = [m_webFrame.get() webView];511 WebView *webView = getWebView(m_webFrame.get()); 469 512 [[webView _frameLoadDelegateForwarder] webView:webView 470 513 didReceiveServerRedirectForProvisionalLoadForFrame:m_webFrame.get()]; … … 473 516 void WebFrameLoaderClient::dispatchDidCancelClientRedirect() 474 517 { 475 WebView *webView = [m_webFrame.get() webView];518 WebView *webView = getWebView(m_webFrame.get()); 476 519 [[webView _frameLoadDelegateForwarder] webView:webView didCancelClientRedirectForFrame:m_webFrame.get()]; 477 520 } … … 479 522 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(NSURL *URL, NSTimeInterval delay, NSDate *fireDate) 480 523 { 481 WebView *webView = [m_webFrame.get() webView];524 WebView *webView = getWebView(m_webFrame.get()); 482 525 [[webView _frameLoadDelegateForwarder] webView:webView 483 526 willPerformClientRedirectToURL:URL … … 489 532 void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() 490 533 { 491 WebView *webView = [m_webFrame.get() webView];534 WebView *webView = getWebView(m_webFrame.get()); 492 535 [[webView _frameLoadDelegateForwarder] webView:webView didChangeLocationWithinPageForFrame:m_webFrame.get()]; 493 536 } … … 495 538 void WebFrameLoaderClient::dispatchWillClose() 496 539 { 497 WebView *webView = [m_webFrame.get() webView];540 WebView *webView = getWebView(m_webFrame.get()); 498 541 [[webView _frameLoadDelegateForwarder] webView:webView willCloseFrame:m_webFrame.get()]; 499 542 } … … 501 544 void WebFrameLoaderClient::dispatchDidReceiveIcon(NSImage *icon) 502 545 { 503 WebView *webView = [m_webFrame.get() webView];546 WebView *webView = getWebView(m_webFrame.get()); 504 547 ASSERT([m_webFrame.get() _isMainFrame]); 505 548 [webView _willChangeValueForKey:_WebMainFrameIconKey]; … … 510 553 void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() 511 554 { 512 WebView *webView = [m_webFrame.get() webView];555 WebView *webView = getWebView(m_webFrame.get()); 513 556 [webView _didStartProvisionalLoadForFrame:m_webFrame.get()]; 514 557 [[webView _frameLoadDelegateForwarder] webView:webView didStartProvisionalLoadForFrame:m_webFrame.get()]; … … 517 560 void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) 518 561 { 519 WebView *webView = [m_webFrame.get() webView];562 WebView *webView = getWebView(m_webFrame.get()); 520 563 [[webView _frameLoadDelegateForwarder] webView:webView didReceiveTitle:title forFrame:m_webFrame.get()]; 521 564 } … … 526 569 ASSERT([m_webFrame->_private->webFrameView documentView] != nil); 527 570 528 WebView *webView = [m_webFrame.get() webView];571 WebView *webView = getWebView(m_webFrame.get()); 529 572 [webView _didCommitLoadForFrame:m_webFrame.get()]; 530 573 [[webView _frameLoadDelegateForwarder] webView:webView didCommitLoadForFrame:m_webFrame.get()]; … … 533 576 void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(NSError *error) 534 577 { 535 WebView *webView = [m_webFrame.get() webView];578 WebView *webView = getWebView(m_webFrame.get()); 536 579 [webView _didFailProvisionalLoadWithError:error forFrame:m_webFrame.get()]; 537 580 [[webView _frameLoadDelegateForwarder] webView:webView didFailProvisionalLoadWithError:error forFrame:m_webFrame.get()]; … … 541 584 void WebFrameLoaderClient::dispatchDidFailLoad(NSError *error) 542 585 { 543 WebView *webView = [m_webFrame.get() webView];586 WebView *webView = getWebView(m_webFrame.get()); 544 587 [webView _didFailLoadWithError:error forFrame:m_webFrame.get()]; 545 588 [[webView _frameLoadDelegateForwarder] webView:webView didFailLoadWithError:error forFrame:m_webFrame.get()]; … … 549 592 void WebFrameLoaderClient::dispatchDidFinishLoad() 550 593 { 551 WebView *webView = [m_webFrame.get() webView];594 WebView *webView = getWebView(m_webFrame.get()); 552 595 [webView _didFinishLoadForFrame:m_webFrame.get()]; 553 596 [[webView _frameLoadDelegateForwarder] webView:webView didFinishLoadForFrame:m_webFrame.get()]; … … 557 600 void WebFrameLoaderClient::dispatchDidFirstLayout() 558 601 { 559 WebView *webView = [m_webFrame.get() webView];602 WebView *webView = getWebView(m_webFrame.get()); 560 603 [[webView _frameLoadDelegateForwarder] webView:webView didFirstLayoutInFrame:m_webFrame.get()]; 561 604 } … … 563 606 Frame* WebFrameLoaderClient::dispatchCreatePage(NSURLRequest *request) 564 607 { 565 WebView *currentWebView = [m_webFrame.get() webView];608 WebView *currentWebView = getWebView(m_webFrame.get()); 566 609 id wd = [currentWebView UIDelegate]; 567 610 if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)]) … … 572 615 void WebFrameLoaderClient::dispatchShow() 573 616 { 574 WebView *webView = [m_webFrame.get() webView];617 WebView *webView = getWebView(m_webFrame.get()); 575 618 [[webView _UIDelegateForwarder] webViewShow:webView]; 576 619 } … … 578 621 void WebFrameLoaderClient::dispatchDecidePolicyForMIMEType(WebPolicyDecider *decider, const String& MIMEType, NSURLRequest *request) 579 622 { 580 WebView *webView = [m_webFrame.get() webView];623 WebView *webView = getWebView(m_webFrame.get()); 581 624 582 625 [[webView _policyDelegateForwarder] webView:webView decidePolicyForMIMEType:MIMEType request:request frame:m_webFrame.get() decisionListener:decisionListener(decider)]; … … 585 628 void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(WebPolicyDecider *decider, NSDictionary *action, NSURLRequest *request, const String& frameName) 586 629 { 587 WebView *webView = [m_webFrame.get() webView];630 WebView *webView = getWebView(m_webFrame.get()); 588 631 [[webView _policyDelegateForwarder] webView:webView 589 632 decidePolicyForNewWindowAction:action … … 596 639 NSURLRequest *request) 597 640 { 598 WebView *webView = [m_webFrame.get() webView];641 WebView *webView = getWebView(m_webFrame.get()); 599 642 [[webView _policyDelegateForwarder] webView:webView 600 643 decidePolicyForNavigationAction:action … … 606 649 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(NSError *error) 607 650 { 608 WebView *webView = [m_webFrame.get() webView];651 WebView *webView = getWebView(m_webFrame.get()); 609 652 [[webView _policyDelegateForwarder] webView:webView unableToImplementPolicyWithError:error frame:m_webFrame.get()]; 610 653 } … … 613 656 Element* form, NSDictionary *values) 614 657 { 615 [[ [m_webFrame.get() webView]_formDelegate] frame:m_webFrame.get() sourceFrame:kit(sourceFrame) willSubmitForm:kit(form) withValues:values submissionListener:decisionListener(decider)];658 [[getWebView(m_webFrame.get()) _formDelegate] frame:m_webFrame.get() sourceFrame:kit(sourceFrame) willSubmitForm:kit(form) withValues:values submissionListener:decisionListener(decider)]; 616 659 } 617 660 … … 619 662 { 620 663 if ([WebScriptDebugServer listenerCount]) 621 [[WebScriptDebugServer sharedScriptDebugServer] webView: [m_webFrame.get() webView]664 [[WebScriptDebugServer sharedScriptDebugServer] webView:getWebView(m_webFrame.get()) 622 665 didLoadMainResourceForDataSource:dataSource(loader)]; 623 666 } … … 650 693 void WebFrameLoaderClient::progressStarted() 651 694 { 652 [ [m_webFrame.get() webView]_progressStarted:m_webFrame.get()];695 [getWebView(m_webFrame.get()) _progressStarted:m_webFrame.get()]; 653 696 } 654 697 655 698 void WebFrameLoaderClient::progressCompleted() 656 699 { 657 [ [m_webFrame.get() webView]_progressCompleted:m_webFrame.get()];700 [getWebView(m_webFrame.get()) _progressCompleted:m_webFrame.get()]; 658 701 } 659 702 660 703 void WebFrameLoaderClient::incrementProgress(id identifier, NSURLResponse *response) 661 704 { 662 [ [m_webFrame.get() webView]_incrementProgressForIdentifier:identifier response:response];705 [getWebView(m_webFrame.get()) _incrementProgressForIdentifier:identifier response:response]; 663 706 } 664 707 665 708 void WebFrameLoaderClient::incrementProgress(id identifier, NSData *data) 666 709 { 667 [ [m_webFrame.get() webView]_incrementProgressForIdentifier:identifier data:data];710 [getWebView(m_webFrame.get()) _incrementProgressForIdentifier:identifier data:data]; 668 711 } 669 712 670 713 void WebFrameLoaderClient::completeProgress(id identifier) 671 714 { 672 [ [m_webFrame.get() webView]_completeProgressForIdentifier:identifier];715 [getWebView(m_webFrame.get()) _completeProgressForIdentifier:identifier]; 673 716 } 674 717 675 718 void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready) 676 719 { 677 [ [m_webFrame.get() webView]setMainFrameDocumentReady:ready];720 [getWebView(m_webFrame.get()) setMainFrameDocumentReady:ready]; 678 721 } 679 722 … … 681 724 { 682 725 // FIXME: Should download full request. 683 [ [m_webFrame.get() webView]_downloadURL:[request URL]];726 [getWebView(m_webFrame.get()) _downloadURL:[request URL]]; 684 727 } 685 728 … … 687 730 { 688 731 // FIXME: Should do this only in main frame case, right? 689 [ [m_webFrame.get() webView]_willChangeValueForKey:_WebMainFrameTitleKey];732 [getWebView(m_webFrame.get()) _willChangeValueForKey:_WebMainFrameTitleKey]; 690 733 } 691 734 … … 693 736 { 694 737 // FIXME: Should do this only in main frame case, right? 695 [ [m_webFrame.get() webView]_didChangeValueForKey:_WebMainFrameTitleKey];738 [getWebView(m_webFrame.get()) _didChangeValueForKey:_WebMainFrameTitleKey]; 696 739 } 697 740 … … 746 789 NSURL *WebFrameLoaderClient::mainFrameURL() 747 790 { 748 return [[[ [m_webFrame.get() webView]mainFrame] dataSource] _URL];791 return [[[getWebView(m_webFrame.get()) mainFrame] dataSource] _URL]; 749 792 } 750 793 … … 849 892 // didn't do any data loading on the past transaction. Make sure to clear these out. 850 893 NSScrollView *sv = [m_webFrame->_private->webFrameView _scrollView]; 851 if ([ [m_webFrame.get() webView]drawsBackground])894 if ([getWebView(m_webFrame.get()) drawsBackground]) 852 895 [sv setDrawsBackground:YES]; 853 896 [m_webFrame.get() _setPreviousItem:nil]; -
trunk/WebKit/WebCoreSupport/WebPageBridge.h
r13090 r17396 34 34 @interface WebPageBridge : WebCorePageBridge <WebCorePageBridge> 35 35 { 36 @public 36 37 WebView *_webView; 37 38 } -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r17390 r17396 49 49 6550B7C7099EFAE90090D781 /* WebArchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B7C5099EFAE90090D781 /* WebArchiver.h */; }; 50 50 6550B7C8099EFAE90090D781 /* WebArchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6550B7C6099EFAE90090D781 /* WebArchiver.m */; }; 51 656D333E0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 51 52 658A40960A14853B005E6987 /* WebDataSourceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 658A40950A14853B005E6987 /* WebDataSourceInternal.h */; }; 52 53 658BA6FC0ADB39DE00AEB387 /* WebPolicyDeciderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 658BA6FA0ADB39DE00AEB387 /* WebPolicyDeciderMac.h */; }; … … 371 372 6550B7C5099EFAE90090D781 /* WebArchiver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebArchiver.h; sourceTree = "<group>"; }; 372 373 6550B7C6099EFAE90090D781 /* WebArchiver.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = WebArchiver.m; sourceTree = "<group>"; }; 374 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadDelegatePrivate.h; sourceTree = "<group>"; }; 373 375 6578F5DE045F817400000128 /* WebDownload.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDownload.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 374 376 6578F5DF045F817400000128 /* WebDownload.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDownload.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 834 836 isa = PBXGroup; 835 837 children = ( 838 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */, 836 839 F52CA6BD02DF9D0F018635CA /* HTML */, 837 840 51E94C0706C02CA300A9B09E /* PDF */, … … 1192 1195 4BF99F900AE050BC00815C2B /* WebEditorClient.h in Headers */, 1193 1196 1CA57D620AED6A470009BDD0 /* WebGraphicsExtras.h in Headers */, 1197 656D333E0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h in Headers */, 1194 1198 931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */, 1195 1199 ); -
trunk/WebKit/WebView/WebFrame.mm
r17393 r17396 48 48 #import "WebNSURLExtras.h" 49 49 #import "WebNSURLRequestExtras.h" 50 #import "WebPageBridge.h" 51 #import "WebPolicyDelegatePrivate.h" 52 #import "WebNetscapePluginEmbeddedView.h" 53 #import "WebNullPluginView.h" 54 #import "WebPlugin.h" 55 #import "WebPluginController.h" 56 #import "WebPolicyDeciderMac.h" 50 57 #import "WebPolicyDelegatePrivate.h" 51 58 #import "WebPreferencesPrivate.h" … … 143 150 @end 144 151 152 Element* core(DOMElement *element) 153 { 154 return [element _element]; 155 } 156 157 DOMElement *kit(Element* element) 158 { 159 return [DOMElement _elementWith:element]; 160 } 161 162 Document* core(DOMDocument *document) 163 { 164 return [document _document]; 165 } 166 167 DOMDocument *kit(Document* document) 168 { 169 return [DOMDocument _documentWith:document]; 170 } 171 172 HTMLElement* core(DOMHTMLElement *element) 173 { 174 return [element _HTMLElement]; 175 } 176 177 DOMHTMLElement *kit(HTMLElement *element) 178 { 179 return [DOMHTMLElement _HTMLElementWith:element]; 180 } 181 182 Range* core(DOMRange *range) 183 { 184 return [range _range]; 185 } 186 187 DOMRange *kit(Range* range) 188 { 189 return [DOMRange _rangeWith:range]; 190 } 191 192 @implementation WebFrame (WebInternal) 193 194 145 195 static inline WebFrame *frame(WebCoreFrameBridge *bridge) 146 196 { 147 return [(WebFrameBridge *)bridge webFrame];197 return ((WebFrameBridge *)bridge)->_frame; 148 198 } 149 199 150 200 FrameMac* core(WebFrame *frame) 151 201 { 152 return [[frame _bridge] _frame]; 202 if (!frame) 203 return 0; 204 205 return frame->_private->bridge->m_frame; 153 206 } 154 207 155 208 WebFrame *kit(Frame* frame) 156 209 { 157 return frame ? [(WebFrameBridge *)Mac(frame)->bridge() webFrame] : nil; 158 } 159 160 Element* core(DOMElement *element) 161 { 162 return [element _element]; 163 } 164 165 DOMElement *kit(Element* element) 166 { 167 return [DOMElement _elementWith:element]; 168 } 169 170 Document* core(DOMDocument *document) 171 { 172 return [document _document]; 173 } 174 175 DOMDocument *kit(Document* document) 176 { 177 return [DOMDocument _documentWith:document]; 178 } 179 180 HTMLElement* core(DOMHTMLElement *element) 181 { 182 return [element _HTMLElement]; 183 } 184 185 DOMHTMLElement *kit(HTMLElement *element) 186 { 187 return [DOMHTMLElement _HTMLElementWith:element]; 188 } 189 190 Range* core(DOMRange *range) 191 { 192 return [range _range]; 193 } 194 195 DOMRange *kit(Range* range) 196 { 197 return [DOMRange _rangeWith:range]; 198 } 199 200 @implementation WebFrame (WebInternal) 210 return frame ? ((WebFrameBridge *)Mac(frame)->bridge())->_frame : nil; 211 } 212 213 static inline WebView *getWebView(WebFrame *webFrame) 214 { 215 Frame* coreFrame = core(webFrame); 216 return coreFrame ? ((WebPageBridge *)coreFrame->page()->bridge())->_webView : nil; 217 } 201 218 202 219 - (NSURLRequest *)_webDataRequestForData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)URL unreachableURL:(NSURL *)unreachableURL … … 216 233 { 217 234 if ([[self dataSource] _URLForHistory] != nil) { 218 WebHistoryItem *bfItem = [[ [self webView]mainFrame] _createItemTreeWithTargetFrame:self clippedAtTarget:doClip];235 WebHistoryItem *bfItem = [[getWebView(self) mainFrame] _createItemTreeWithTargetFrame:self clippedAtTarget:doClip]; 219 236 LOG (BackForward, "for frame %@, adding item %@\n", [self name], bfItem); 220 [[ [self webView]backForwardList] addItem:bfItem];237 [[getWebView(self) backForwardList] addItem:bfItem]; 221 238 } 222 239 } … … 298 315 - (BOOL)_canCachePage 299 316 { 300 return [[ [self webView]backForwardList] _usesPageCache] && core(self)->canCachePage();317 return [[getWebView(self) backForwardList] _usesPageCache] && core(self)->canCachePage(); 301 318 } 302 319 … … 304 321 { 305 322 // This method implements the rule for purging the page cache. 306 unsigned sizeLimit = [[ [self webView]backForwardList] pageCacheSize];323 unsigned sizeLimit = [[getWebView(self) backForwardList] pageCacheSize]; 307 324 unsigned pagesCached = 0; 308 WebBackForwardList *backForwardList = [ [self webView]backForwardList];325 WebBackForwardList *backForwardList = [getWebView(self) backForwardList]; 309 326 NSArray *backList = [backForwardList backListWithLimit: 999999]; 310 327 WebHistoryItem *oldestNonSnapbackItem = nil; … … 420 437 [self _frameLoader]->documentLoader()->replaceRequestURLForAnchorScroll(itemURL); 421 438 422 [[ [self webView] _frameLoadDelegateForwarder] webView:[self webView]439 [[getWebView(self) _frameLoadDelegateForwarder] webView:getWebView(self) 423 440 didChangeLocationWithinPageForFrame:self]; 424 441 [_private->internalLoadDelegate webFrame:self didFinishLoadWithError:nil]; … … 437 454 NSDate *cacheDate = [pageCache objectForKey: WebPageCacheEntryDateKey]; 438 455 NSTimeInterval delta = [[NSDate date] timeIntervalSinceDate: cacheDate]; 439 if (delta <= [[ [self webView]preferences] _backForwardCacheExpirationInterval]) {456 if (delta <= [[getWebView(self) preferences] _backForwardCacheExpirationInterval]) { 440 457 newDataSource = [pageCache objectForKey: WebPageCacheDataSourceKey]; 441 458 [self _frameLoader]->load([newDataSource _documentLoader], loadType, 0); 442 459 inPageCache = YES; 443 460 } else { 444 LOG (PageCache, "Not restoring page from back/forward cache because cache entry has expired, %@ (%3.5f > %3.5f seconds)\n", [_private->provisionalItem URL], delta, [[ [self webView]preferences] _backForwardCacheExpirationInterval]);461 LOG (PageCache, "Not restoring page from back/forward cache because cache entry has expired, %@ (%3.5f > %3.5f seconds)\n", [_private->provisionalItem URL], delta, [[getWebView(self) preferences] _backForwardCacheExpirationInterval]); 445 462 [item setHasPageCache: NO]; 446 463 } … … 568 585 // Ultimately, history item navigations should go through the policy delegate. That's covered in: 569 586 // <rdar://problem/3979539> back/forward cache navigations should consult policy delegate 570 if ([[ [self webView] _policyDelegateForwarder] webView:[self webView]shouldGoToHistoryItem:item]) {571 WebBackForwardList *backForwardList = [ [self webView]backForwardList];587 if ([[getWebView(self) _policyDelegateForwarder] webView:getWebView(self) shouldGoToHistoryItem:item]) { 588 WebBackForwardList *backForwardList = [getWebView(self) backForwardList]; 572 589 WebHistoryItem *currItem = [backForwardList currentItem]; 573 590 // Set the BF cursor before commit, which lets the user quickly click back/forward again. … … 809 826 - (void)_updateBackground 810 827 { 811 BOOL drawsBackground = [ [self webView]drawsBackground];812 NSColor *backgroundColor = [ [self webView]backgroundColor];828 BOOL drawsBackground = [getWebView(self) drawsBackground]; 829 NSColor *backgroundColor = [getWebView(self) backgroundColor]; 813 830 814 831 Frame* coreFrame = core(self); … … 920 937 // responder. It would be nicer to just notice first responder changes here instead, but there's no 921 938 // notification sent when the first responder changes in general (Radar 2573089). 922 WebFrame *frameWithSelection = [[ [self webView]mainFrame] _findFrameWithSelection];939 WebFrame *frameWithSelection = [[getWebView(self) mainFrame] _findFrameWithSelection]; 923 940 if (frameWithSelection != self) 924 941 [frameWithSelection _clearSelection]; 925 942 926 943 // While we're in the general area of selection and frames, check that there is only one now. 927 ASSERT([[ [self webView]mainFrame] _atMostOneFrameHasSelection]);944 ASSERT([[getWebView(self) mainFrame] _atMostOneFrameHasSelection]); 928 945 } 929 946 … … 958 975 - (BOOL)_isMainFrame 959 976 { 960 return self == [[self webView] mainFrame]; 977 Frame* coreFrame = core(self); 978 if (!coreFrame) 979 return NO; 980 return coreFrame == coreFrame->page()->mainFrame() ; 961 981 } 962 982 … … 1098 1118 - (WebView *)webView 1099 1119 { 1100 Frame* coreFrame = core(self); 1101 return coreFrame ? [coreFrame->page()->bridge() webView] : nil; 1120 return getWebView(self); 1102 1121 } 1103 1122 -
trunk/WebKit/WebView/WebView.mm
r17299 r17396 929 929 WebResourceDelegateImplementationCache *cache = &_private->resourceLoadDelegateImplementations; 930 930 id delegate = [self resourceLoadDelegate]; 931 Class delegateClass = [delegate class]; 931 932 932 933 cache->delegateImplementsDidCancelAuthenticationChallenge = [delegate respondsToSelector:@selector(webView:resource:didCancelAuthenticationChallenge:fromDataSource:)]; … … 937 938 cache->delegateImplementsWillSendRequest = [delegate respondsToSelector:@selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:)]; 938 939 cache->delegateImplementsIdentifierForRequest = [delegate respondsToSelector:@selector(webView:identifierForInitialRequest:fromDataSource:)]; 939 } 940 941 - (WebResourceDelegateImplementationCache)_resourceLoadDelegateImplementations 942 { 943 return _private->resourceLoadDelegateImplementations; 940 cache->delegateImplementsDidLoadResourceFromMemoryCache = [delegate respondsToSelector:@selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:)]; 941 942 if (cache->delegateImplementsDidCancelAuthenticationChallenge) 943 cache->didCancelAuthenticationChallengeFunc = (WebDidCancelAuthenticationChallengeFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:))->method_imp; 944 if (cache->delegateImplementsDidReceiveAuthenticationChallenge) 945 cache->didReceiveAuthenticationChallengeFunc = (WebDidReceiveAuthenticationChallengeFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:))->method_imp; 946 if (cache->delegateImplementsDidFinishLoadingFromDataSource) 947 cache->didFinishLoadingFromDataSourceFunc = (WebDidFinishLoadingFromDataSourceFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didFinishLoadingFromDataSource:))->method_imp; 948 if (cache->delegateImplementsDidReceiveContentLength) 949 cache->didReceiveContentLengthFunc = (WebDidReceiveContentLengthFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveContentLength:fromDataSource:))->method_imp; 950 if (cache->delegateImplementsDidReceiveResponse) 951 cache->didReceiveResponseFunc = (WebDidReceiveResponseFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveResponse:fromDataSource:))->method_imp; 952 if (cache->delegateImplementsWillSendRequest) 953 cache->willSendRequestFunc = (WebWillSendRequestFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:))->method_imp; 954 if (cache->delegateImplementsIdentifierForRequest) 955 cache->identifierForRequestFunc = (WebIdentifierForRequestFunc)class_getInstanceMethod(delegateClass, @selector(webView:identifierForInitialRequest:fromDataSource:))->method_imp; 956 if (cache->delegateImplementsDidLoadResourceFromMemoryCache) 957 cache->didLoadResourceFromMemoryCacheFunc = (WebDidLoadResourceFromMemoryCacheFunc)class_getInstanceMethod(delegateClass, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:))->method_imp; 958 } 959 960 id WebViewGetResourceLoadDelegate(WebView *webView) 961 { 962 return webView->_private->resourceProgressDelegate; 963 } 964 965 WebResourceDelegateImplementationCache WebViewGetResourceLoadDelegateImplementations(WebView *webView) 966 { 967 return webView->_private->resourceLoadDelegateImplementations; 944 968 } 945 969 … … 2031 2055 return _private->resourceProgressDelegate; 2032 2056 } 2033 2034 2057 2035 2058 - (void)setDownloadDelegate: delegate -
trunk/WebKit/WebView/WebViewInternal.h
r16752 r17396 52 52 @end 53 53 54 id WebViewGetResourceLoadDelegate(WebView *webView); 55 WebResourceDelegateImplementationCache WebViewGetResourceLoadDelegateImplementations(WebView *webView); 56 54 57 @interface WebView (WebViewMiscInternal) 55 58 - (BOOL)defersCallbacks; … … 59 62 - (id)_UIDelegateForwarder; 60 63 - (id)_resourceLoadDelegateForwarder; 61 - (WebResourceDelegateImplementationCache)_resourceLoadDelegateImplementations;62 64 - (id)_frameLoadDelegateForwarder; 63 65 - (id)_editingDelegateForwarder; -
trunk/WebKit/WebView/WebViewPrivate.h
r17255 r17396 30 30 #import <WebKit/WebFramePrivate.h> 31 31 32 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 33 #define WebNSInteger int 34 #else 35 #define WebNSInteger NSInteger 36 #endif 37 32 38 @class NSError; 33 39 @class WebFrame; … … 36 42 37 43 @protocol WebFormDelegate; 44 45 46 47 typedef void (*WebDidCancelAuthenticationChallengeFunc)(id, SEL, WebView *, id, NSURLAuthenticationChallenge *, WebDataSource *); 48 typedef void (*WebDidReceiveAuthenticationChallengeFunc)(id, SEL, WebView *, id, NSURLAuthenticationChallenge *, WebDataSource *); 49 typedef id (*WebIdentifierForRequestFunc)(id, SEL, WebView *, NSURLRequest *, WebDataSource *); 50 typedef NSURLRequest *(*WebWillSendRequestFunc)(id, SEL, WebView *, id, NSURLRequest *, NSURLResponse *, WebDataSource *); 51 typedef void (*WebDidReceiveResponseFunc)(id, SEL, WebView *, id, NSURLResponse *, WebDataSource *); 52 typedef void (*WebDidReceiveContentLengthFunc)(id, SEL, WebView *, id, WebNSInteger, WebDataSource *); 53 typedef void (*WebDidFinishLoadingFromDataSourceFunc)(id, SEL, WebView *, id, WebDataSource *); 54 typedef void (*WebDidLoadResourceFromMemoryCacheFunc)(id, SEL, WebView *, NSURLRequest *, NSURLResponse *, WebNSInteger, WebDataSource *); 38 55 39 56 typedef struct _WebResourceDelegateImplementationCache { … … 45 62 uint delegateImplementsWillSendRequest:1; 46 63 uint delegateImplementsIdentifierForRequest:1; 64 uint delegateImplementsDidLoadResourceFromMemoryCache:1; 65 66 WebDidCancelAuthenticationChallengeFunc didCancelAuthenticationChallengeFunc; 67 WebDidReceiveAuthenticationChallengeFunc didReceiveAuthenticationChallengeFunc; 68 WebIdentifierForRequestFunc identifierForRequestFunc; 69 WebWillSendRequestFunc willSendRequestFunc; 70 WebDidReceiveResponseFunc didReceiveResponseFunc; 71 WebDidReceiveContentLengthFunc didReceiveContentLengthFunc; 72 WebDidFinishLoadingFromDataSourceFunc didFinishLoadingFromDataSourceFunc; 73 WebDidLoadResourceFromMemoryCacheFunc didLoadResourceFromMemoryCacheFunc; 47 74 } WebResourceDelegateImplementationCache; 48 75 … … 334 361 - (void)webView:(WebView *)sender didHandleOnloadEventsForFrame:(WebFrame *)frame; 335 362 @end 363 364 #undef WebNSInteger
Note: See TracChangeset
for help on using the changeset viewer.