1 2007-10-01 Eric Seidel <eric@webkit.org>
3 Reviewed by Oliver Hunt.
5 WebArchives do not embed stylesheets referenced by xml-stylesheeet
6 http://bugs.webkit.org/show_bug.cgi?id=15320
8 * DOM/WebDOMOperations.mm:
9 (-[DOMProcessingInstruction _stylesheetURL]): needed to access [[self sheet] href]
10 (-[DOMProcessingInstruction _subresourceURLs]): call and return _stylesheetURL
12 2007-10-01 Eric Seidel <eric@webkit.org>
14 Reviewed by Oliver Hunt.
16 * DOM/WebDOMOperations.mm: added DOMSVGElementImage _subresources implementation
17 (-[DOMNode _URLsFromSelectors:]): now handles DOMSVGAnimatedString return values
18 (-[DOMSVGImageElement _subresourceURLs]): added.
19 * MigrateHeaders.make: copies DOMSVG* headers into WebKit/PrivateHeaders
21 2007-10-01 Oliver Hunt <oliver@apple.com>
25 Enable Experimental SVG features by default when building from Xcode
27 * Configurations/WebKit.xcconfig:
29 === End merge of feature-branch 11-11-2007 ===
31 2007-10-11 Mark Rowe <mrowe@apple.com>
33 Reviewed by Tim Hatcher.
35 Fix for <rdar://problem/5488678>. Disable debugging symbols in production builds for 10.4
36 PowerPC to prevent a huge STABS section from being generated.
38 * Configurations/Base.xcconfig:
40 2007-10-10 Alice Liu <alice.liu@apple.com>
42 Reviewed by Geoff Garen.
44 Fixed <rdar://5464402> Crash when running fast/frames/onload-remove-iframe-crash.html in DRT
45 createFrame() now returns a RefPtr instead of a raw Frame pointer.
46 Making this change improves the way we handle frames on Windows WebKit.
48 * WebCoreSupport/WebFrameLoaderClient.h:
49 * WebCoreSupport/WebFrameLoaderClient.mm:
50 (WebFrameLoaderClient::createFrame):
52 2007-10-04 Beth Dakin <bdakin@apple.com>
54 Reviewed by John Sullivan.
56 Fix for <rdar://problem/5441823> REGRESSION (r25142, Tiger only):
57 Vertical scroll bar not redrawn properly when going back in history
60 This fix if-defs r25142 to be Leopard-only since it causes
61 correctness issues on Tiger and does not seem to have any
62 performance impact on Tiger either.
64 * WebView/WebDynamicScrollBarsView.m:
65 (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
66 (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
68 2007-10-04 Mark Rowe <mrowe@apple.com>
72 Switch to default level of debugging symbols to resolve <rdar://problem/5488678>.
73 The "full" level appears to offer no observable benefits even though the documentation
74 suggests it be used for dead code stripping. This should also decrease link times.
76 * Configurations/Base.xcconfig:
78 2007-10-04 Adele Peterson <adele@apple.com>
82 WebKit part of fix for <rdar://problem/5369017> REGRESSION: Can't tab to webview that doesn't have editable content
84 * WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Pass in the FocusDirection.
86 2007-10-04 Darin Adler <darin@apple.com>
88 * WebView/WebHTMLView.mm: (-[WebHTMLView _updateActiveState]):
89 Removed a bogus comment.
91 2007-10-02 Kevin Decker <kdecker@apple.com>
93 Reviewed by Mark Rowe.
95 Re-added _minimumRequiredSafariBuildNumber. It turns out older version of Safari still rely
96 on this method, so we need to keep it around at least until the next major Safari release.
98 * StringsNotToBeLocalized.txt:
100 (+[WebView _minimumRequiredSafariBuildNumber]):
101 * WebView/WebViewPrivate.h:
103 2007-10-02 Kevin Decker <kdecker@apple.com>
105 Reviewed by John Sullivan.
107 <rdar://problem/5517710>
109 * WebView/WebView.mm: Removed -[WebView _minimumRequiredSafariBuildNumber] because newer
110 versions of Safari no longer use this method. This won't break existing Safaris because
111 they always use a respondsToSelector check before calling this.
113 * WebView/WebViewPrivate.h: Ditto.
115 2007-09-27 John Sullivan <sullivan@apple.com>
119 - fixed <rdar://problem/5408186> REGRESSION (5522-5523.9): Safari leaks every browser window
121 The leak started occurring when we removed the code to clear the delegates and the host window
122 from Safari as part of the fix for 5479443. But it turns out that Safari code was masking a
123 bug here in WebView: setHostWindow:nil needs to be called before setting _private->closed to
124 YES, or it will do nothing at all, causing a world leak due to a circular reference between
125 the window and the WebView.
127 I toyed with a more complex fix, but this is the simplest one that retains the fix for 5479443
128 while otherwise restoring the code order to be as close as possible to what it was before
131 * WebView/WebView.mm:
133 Moved the call that sets _private->closed to YES to be after the code that clears the delegates
134 and the host window. Added a comment about this order.
136 2007-09-27 Kevin Decker <kdecker@apple.com>
138 Rubber stamped by Darin.
140 <rdar://problem/5493093>
142 * WebKit.order: Added.
143 * WebKit.xcodeproj/project.pbxproj: We're changing from using an order file built by
144 another team to using one we actually check into our project repository. Linker settings for
145 Symbol Ordering Flags have been updated accordingly.
147 2007-09-26 Geoffrey Garen <ggaren@apple.com>
149 Reviewed by Adele Peterson.
151 Fixed <rdar://problem/5507476> Promote cache model SPI to API
153 Promoted cache model SPI to API. This was just a move, with some small
154 edits to the documentation (changing 'application' to 'WebView' in
155 some cases, since the interface is now per-WebView).
157 * WebView/WebPreferences.h:
158 * WebView/WebPreferences.m:
159 (-[WebPreferences setCacheModel:]):
160 (-[WebPreferences cacheModel]):
161 * WebView/WebPreferencesPrivate.h:
163 2007-09-24 Timothy Hatcher <timothy@apple.com>
167 <rdar://problem/5498016> Photoshop CS3: Adobe Help Viewer 1.1 crashes in 9A553
169 WebKit started calling the mouseDidMoveOverElement delegate method with a nil dictionary in r14982.
170 We originally intended to call this delegate method sometimes with a nil dictionary, but due to
171 a bug dating back to WebKit 1.0 this delegate was never called with nil! Unfortunately we can't
172 start calling this with nil since it will break Adobe Help Viewer, and possibly other clients.
174 * WebView/WebView.mm:
175 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
177 2007-09-21 Kevin Decker <kdecker@apple.com>
179 * Plugins/WebBaseNetscapePluginView.mm: Build fix.
180 The first argument of aglChoosePixelFormat() has changed from const AGLDevice *gdevs on Tiger to
181 const void *gdevs on Leopard.
183 2007-09-20 Kevin Decker <kdecker@apple.com>
185 Reviewed by Darin Adler.
187 <rdar://problem/5493093>
189 Reduced launch time by lazily linking both the AGL and OpenGL frameworks until they are really needed.
191 * Plugins/WebBaseNetscapePluginView.mm: Soft link all AGL and OpenGL functions used by
192 WebBaseNetscapePluginView.
194 * WebKit.xcodeproj/project.pbxproj: Removed AGL and OpenGL from the project.
196 2007-09-20 John Sullivan <sullivan@apple.com>
198 Build fix for stoooopid old PPC gcc compiler
200 * WebCoreSupport/WebEditorClient.mm:
201 (WebEditorClient::checkSpellingOfString):
202 replace perfectly valid ?: syntax with if/else
204 2007-09-19 John Sullivan <sullivan@apple.com>
206 Reviewed by Darin Adler.
208 - WebKit part of speculative fix for <rdar://problem/5490627>, about crashes constructing a
209 String using the values filled in by checkSpellingOfString()
211 * WebCoreSupport/WebEditorClient.mm:
212 (WebEditorClient::checkSpellingOfString):
213 convert NSNotFound to -1, since WebCore code expects -1 for this purpose. We already do this
214 in checkGrammarOfString.
216 2007-09-19 Kevin Decker <kdecker@apple.com>
218 Reviewed by Darin Adler.
220 <rdar://problem/5491066> soft link Accelerate.framework
222 * Misc/WebGraphicsExtras.c:
223 (WebConvertBGRAToARGB): Improve launch time performance and reduce vsize
224 footprint by soft linking the Accelerate.framework.
225 * WebKit.xcodeproj/project.pbxproj: Remove no longer needed frameworks.
227 2007-09-18 Geoffrey Garen <ggaren@apple.com>
229 Reviewed by Darin Adler.
231 Fixed <rdar://problem/5490204> In some cases, WebKit can make the
232 Foundation disk cache way too big or way too small
234 Use the actual location of the foundation disk cache, rather than
235 the user's home directory, when determining how big to make it.
237 * WebView/WebView.mm:
238 (+[WebView _setCacheModel:]):
240 2007-09-17 Geoffrey Garen <ggaren@apple.com>
242 Reviewed by Darin Adler.
244 Fixed a hang due to an infinite script running in the window's unload
245 event handler, which may be the cause of <rdar://problem/5479443>
246 REGRESSION: Hang due to infinite JS recursion on close @ engadget.com
249 * WebView/WebUIDelegatePrivate.h: Added FIXME.
251 * WebView/WebView.h: Clarified headerdoc ambiguity about when delegate
254 * WebView/WebView.mm:
255 (-[WebView _close]): The fix: don't nil out our delegates until after
256 detaching the FrameLoader, because the act of detaching the FrameLoader
257 might fire important delegate methods, like webViewShouldInterruptJavaScript:.
258 Don't do other tear-down either, because the unload event handler needs
259 to run in a fully constructed page.
261 This change is fairly low risk because niling out our delegates is a
262 very recent, never-shipped feature in WebKit, so it's unlikely that any
263 apps rely on it in a crazy way.
265 2007-09-15 Darin Adler <darin@apple.com>
267 Reviewed by John Sullivan.
269 - fix <rdar://problem/5391540> REGRESSION: Can't drag images from Safari to applications
270 in the dock (Tiger Preview, others in Leopard)
272 * Misc/WebNSPasteboardExtras.mm:
273 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
274 Re-implement code here that has been missing for the last couple of years since we
275 did some image refactoring. Was pretty easy now that we can freely call C++ code
278 2007-09-14 Mark Rowe <mrowe@apple.com>
282 * WebView/WebArchive.m:
283 (-[WebArchive initWithCoder:]): Use @catch(id) rather than @catch(...).
284 * WebView/WebPreferences.m:
285 (-[WebPreferences initWithCoder:]): Ditto.
286 * WebView/WebResource.mm:
287 (-[WebResource initWithCoder:]): Ditto.
288 (-[WebResource _initWithPropertyList:]): Ditto.
290 2007-09-14 Darin Adler <darin@apple.com>
292 Reviewed by Geoff Garen and Tim Hatcher.
294 - fixed <rdar://problem/5482745> initFromCoder: and initWithPropertyList: functions
295 should guard against incorrect types
297 * WebView/WebArchive.m:
298 (isArrayOfClass): Added helper function.
299 (-[WebArchive _initWithPropertyList:]): Tweaked function to remove the need for a
301 (-[WebArchive initWithCoder:]): Added type checking for the main resource,
302 subresources array, and subframe archives array. Also replaced NS_DURING with @try.
303 * WebView/WebPreferences.m: (-[WebPreferences initWithCoder:]): Added type checking
304 for the identifier and the values dictionary, including ensuring that it's a mutable
306 * WebView/WebResource.mm:
307 (-[WebResource initWithCoder:]): Added type checking for all the fields.
308 (-[WebResource _initWithPropertyList:]): Added type checking for the NSURLResponse.
310 * WebKit.exp: Removed accidentally exported internal symbol; I checked and it's not
313 2007-09-13 Darin Adler <darin@apple.com>
317 - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
318 <input> elements with maxlength limit
320 * WebView/WebHTMLView.mm:
321 (-[WebHTMLView _selectionChanged]): Tweaked code a bit.
322 (-[WebHTMLView markedRange]): Simplified logic, since markedTextNSRange works when there's
323 no composition range.
324 (-[WebHTMLView hasMarkedText]): Call directly to Editor instead of bridge.
325 (-[WebHTMLView unmarkText]): Call new confirmComposition to make it clear that this is
326 confirming text, not just unmarking it to discard it.
327 (extractUnderlines): Added. Converts directly from an NSAttributedString to the
328 CompositionUnderline vector that's used by WebCore.
329 (-[WebHTMLView setMarkedText:selectedRange:]): Changed to use the new setComposition.
330 (-[WebHTMLView insertText:]): Changed to use confirmComposition when appropriate, instead
331 of relying on special behavior of Editor::insertText.
332 (-[WebHTMLView _updateSelectionForInputManager]): Rewrote to use getCompositionSelection
333 and confirmCompositionWithoutDisturbingSelection.
335 * WebCoreSupport/WebEditorClient.h:
336 * WebCoreSupport/WebEditorClient.mm:
337 Removed obsolete markedTextAbandoned function.
339 2007-09-12 David Kilzer <ddkilzer@apple.com>
341 Rubber-stamped by Darin and reviewed by Adam.
343 Removed import of unused icon database headers.
345 * WebCoreSupport/WebFrameBridge.mm:
347 2007-09-11 Timothy Hatcher <timothy@apple.com>
351 Remove the unused class_getMethodImplementation function.
353 * Misc/WebNSObjectExtras.h:
355 2007-09-11 Geoffrey Garen <ggaren@apple.com>
357 Reviewed by Oliver Hunt.
359 Fixed CFNetwork version check so it actually works.
361 * Misc/WebKitVersionChecks.h:
362 * WebView/WebView.mm:
363 (+[WebView _setCacheModel:]): Don't use NSVersionOfLinkTimeLibrary because
364 we don't link against CFNetwork directly, so it returns -1. Also, use
365 the proper hex encoding instead of decimal numbers.
367 2007-09-11 Darin Adler <darin@apple.com>
369 - redo fix for <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
371 * WebView/WebView.mm:
373 (-[WebView _cacheResourceLoadDelegateImplementations]): Use getMethod.
374 (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
376 2007-09-11 Darin Adler <darin@apple.com>
378 Rubber-stamped by Dave Harrison.
380 * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
381 Removed wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
383 2007-09-11 Darin Adler <darin@apple.com>
385 Reviewed by Mark Rowe.
387 - fix <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
389 * Misc/WebNSObjectExtras.h:
390 (class_getMethodImplementation): Added.
391 (method_setImplementation): Added.
393 * WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]):
394 * Carbon/HIViewAdapter.m: (+[HIViewAdapter bindHIViewToNSView:nsView:]):
395 Remove old-ObjC code path, since WebNSObjectExtras.h now implements everything we need.
397 * WebView/WebView.mm:
398 (-[WebView _cacheResourceLoadDelegateImplementations]): Don't bother doing a separate
399 respondsToSelector call, since class_getMethodImplementation will return 0 for selectors
400 that we don't respond to. The bug fix is to actually set the cached pointer to 0.
401 Also get rid of the unnecessary use of a macro; instead use the functions from
402 WebNSObjectExtras.h on Tiger and the appropriate function directly on Leopard.
403 (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
405 2007-09-11 Darin Adler <darin@apple.com>
407 Reviewed by Sam, Ollie.
409 * WebView/WebView.mm: (+[WebView _setCacheModel:]): A slightly cleaner 64-bit
410 fix for the NSURLCache capacity code in this file.
412 2007-09-11 Darin Adler <darin@apple.com>
414 Rubber-stamped by Mark Rowe.
416 * Misc/WebNSPasteboardExtras.mm: Fix incorrect strings in my last check-in.
417 The strings I checked in were wrong and were breaking layout tests too.
418 These new ones match what WebKitSystemInterface was returning.
420 2007-09-10 Geoffrey Garen <ggaren@apple.com>
422 Fixed 64-bit build (I think).
424 * WebView/WebView.mm:
425 (max): Added. In 64-bit land, -diskCapacity magically starts returning
426 unsigned long instead of unsigned, so we define a custom max() that's
427 willing to compare unsigned to unsigned long.
429 2007-09-10 Darin Adler <darin@apple.com>
431 Reviewed by Tim Hatcher.
433 - <rdar://problem/5471082> Removing WebURLPboardType from headers broke SPI-using applications
435 Rolled out my fix for bug 4582212 and fixed it in a much simpler way.
437 * Misc/WebNSPasteboardExtras.h:
438 * Misc/WebNSPasteboardExtras.mm:
439 * WebCoreSupport/WebPasteboardHelper.mm:
441 * WebView/WebHTMLView.mm:
442 * WebView/WebView.mm:
443 Rolled out the new PasteboardType functions and changed the PboardType globals to be initialized
444 with constant values.
446 2007-09-10 Timothy Hatcher <timothy@apple.com>
450 Always animate when calling _scrollTo.
452 * WebView/WebFrameView.mm:
453 (-[WebFrameView _scrollVerticallyBy:]):
454 (-[WebFrameView _scrollHorizontallyBy:]):
456 2007-09-08 Brady Eidson <beidson@apple.com>
460 <rdar://problem/5434431> - Asynchronous Icon Database
462 WebKit side of things
463 Mainly, there are Notifications WebKit has to listen for now that tell it when to either call back into WebCore
464 for some purpose or to send the webView:didReceiveIcon: delegate call
466 Many smaller tweaks as well.
468 * Misc/WebIconDatabase.h:
469 * Misc/WebIconDatabase.mm:
471 (-[WebIconDatabase init]):
472 (+[WebIconDatabase delayDatabaseCleanup]): Accessor so clients can prevent the thread from cleaning up the database
473 before they've done all their necessary retaining of icons.
474 (+[WebIconDatabase allowDatabaseCleanup]):
475 (-[WebIconDatabase removeAllIcons]):
476 (-[WebIconDatabase _isEnabled]):
477 (-[WebIconDatabase _sendNotificationForURL:]):
478 (-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
479 (-[WebIconDatabase _databaseDirectory]):
481 (-[ThreadEnabler threadEnablingSelector:]): Quick and dirty class to enabled Cocoa multithreading
482 (+[ThreadEnabler enableThreading]):
483 (importToWebCoreFormat):
484 * Misc/WebIconDatabaseInternal.h: Expose the internal methods of WebIconDatabase that are required by WebIconDatabaseClient
486 * Misc/WebNSNotificationCenterExtras.h: Added. - Great utility class whose design was borrowed from Colloquy
487 that allows the posting of a Cocoa notification on the main thread from *any* thread
488 * Misc/WebNSNotificationCenterExtras.m: Added.
489 (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:]):
490 (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:]):
491 (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]):
492 (+[NSNotificationCenter _postNotificationName:]):
494 * WebCoreSupport/WebFrameLoaderClient.h:
495 * WebCoreSupport/WebFrameLoaderClient.mm:
496 (WebFrameLoaderClient::dispatchDidReceiveIcon): Send the webView:didReceiveIcon: delegate call
497 (WebFrameLoaderClient::registerForIconNotification):
499 * WebCoreSupport/WebIconDatabaseClient.h: Added.
500 * WebCoreSupport/WebIconDatabaseClient.mm: Added.
501 (WebIconDatabaseClient::performImport): Perform the Safari 2 icon import
502 (WebIconDatabaseClient::dispatchDidRemoveAllIcons): Send the NSNotification
503 (WebIconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
505 * WebView/WebView.mm:
506 (-[WebView _receivedIconChangedNotification:]): Check and see if this notification is for this WebView's current URL by
507 calling back into the IconDatabase
508 (-[WebView _registerForIconNotification:]): Support for WebIconDatabaseClient
509 (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Dispatch this delegate call as well as unregister for the notification
510 * WebView/WebViewInternal.h:
512 * WebKit.xcodeproj/project.pbxproj:
514 2007-09-07 Geoffrey Garen <ggaren@apple.com>
516 Suggested by Maciej Stachowiak.
518 Added wKiosk Browser to the browser list. Pretty sweet app.
520 * WebView/WebPreferences.m:
521 (cacheModelForMainBundle):
523 2007-09-07 Geoffrey Garen <ggaren@apple.com>
527 * WebView/WebView.mm:
528 (+[WebView _setCacheModel:]):
530 2007-09-05 Geoffrey Garen <ggaren@apple.com>
532 Reviewed by Darin Adler, Maciej Stachowiak, Mark Rowe, Tim Hatcher.
534 Fixed <rdar://problem/5326009> Make non-browser WebKit clients have no
535 memory cache, or a very tiny one
537 High level explanation:
538 - Added SPI for specifying a cache model on a per-WebView basis.
539 (Hopefully, this will become API soon.) We balance competing
540 cache models simply by using the largest one that pertains at a
543 - Added heuristic for guessing a default cache model in WebViews
544 that don't specify one:
545 1) Default to DocumentViewer for apps linked on or after this
546 WebKit. Default to DocumentBrowser otherwise.
548 2) Assign specific defaults to well-known clients based on
551 3) Grow the default to DocumentBrowser if a navigation takes
554 - As a part of the DocumentBrowser & PrimaryWebBrowser settings:
555 1) Make the Foundation disk cache much much bigger than the
556 default 20MB, if space allows. (This is a hedge against a small
557 WebCore cache in DocumentBrowser mode, but also an all-around
558 win for page load speed.)
560 2) Scaled the Foundation memory cache's capacity with physical
561 RAM, just like we do with other caches. This is a small win on
564 * Misc/WebKitSystemBits.h:
565 * Misc/WebKitSystemBits.m:
566 (WebMemorySize): Renamed from "WebSystemMainMemory."
567 (WebHomeDirectoryFreeSize): Added function to measure the free space
568 on the user's home directory. We use this as a factor in determining
569 the disk cache's cacpacity.
571 * Misc/WebKitVersionChecks.h: Support for linked on or after check.
573 * WebCoreSupport/WebFrameLoaderClient.h:
574 * WebCoreSupport/WebFrameLoaderClient.mm:
575 (WebFrameLoaderClient::didPerformFirstNavigation): Implementation of
578 * WebView/WebPreferenceKeysPrivate.h:
579 * WebView/WebPreferences.m:
580 (cacheModelForMainBundle): Implementation of heuristic rule #2.
581 (-[NSMutableDictionary _web_checkLastReferenceForIdentifier:]): Added
582 notification for when a WebPreferences instance becomes inert. We use
583 this to shrink the cache model back down if possible. Moved this code
584 into a WebPreferences method, since it's not really a feature of
587 * WebView/WebPreferencesPrivate.h: SPI declarations.
589 * WebView/WebView.mm: Replaced manual notification posts with calls to
590 the _postPreferencesChangesNotification convenience method.
592 (-[WebView _preferencesChangedNotification:]): Merged dispersed code
593 for updating preferences-related settings into this one function. This
594 was needed for an earlier version of the patch, even though the
595 current version could probably do without it.
597 (+[WebView _preferencesChangedNotification:]): Added a class-level
598 listener for WebPreferences changes. This listener takes care of
599 modifying the class-level global cache model setting if necessary.
601 (+[WebPreferences standardPreferences]): Removed call to
602 _postPreferencesChangesNotification because the notification already
603 posts when you create the WebPreferences object. (I noticed this
604 inefficiency because my new _preferencesChangedNotification: method was
605 called excessively at startup.)
607 Also Added explicit tracking of WebPreferences clients, so we know when
608 a WebPreferences instance becomes inert:
610 (-[WebPreferences didRemoveFromWebView]):
611 (-[WebPreferences willAddToWebView]):
613 (+[WebView _setCacheModel:]): Translates a cache model into actual
614 settings in various APIs. Caches that have unbounded value grow
615 linearly relative to available space. Caches that have bounded value
616 grow inverse-squaredly relative to available space.
619 2007-09-05 Timothy Hatcher <timothy@apple.com>
623 <rdar://problem/5443883> Uncaught Objective-C exceptions in WebKit clients lead to hard-to-diagnose crashes
625 Changed all the direct delegate calls to use helper functions that have direct access to
626 WebView's delegate objects. These helper methods will catch any ObjC exceptions and call
627 ReportDiscardedDelegateException to log the discarded exception. WebView's that have
628 catchesDelegateExceptions set to NO will not pay the cost of a @try/@catch. The delegate
629 forwarders also have the same behavior.
631 * Misc/WebKitLogging.h:
632 * Misc/WebKitLogging.m:
633 (ReportDiscardedDelegateException):
634 * Plugins/WebBaseNetscapePluginView.mm:
635 (-[WebBaseNetscapePluginView loadPluginRequest:]):
636 * Plugins/WebNullPluginView.mm:
637 (-[WebNullPluginView viewDidMoveToWindow]):
638 * WebCoreSupport/WebChromeClient.mm:
639 (WebChromeClient::createWindow):
640 (WebChromeClient::createModalDialog):
641 (WebChromeClient::runModal):
642 (WebChromeClient::toolbarsVisible):
643 (WebChromeClient::statusbarVisible):
644 (WebChromeClient::addMessageToConsole):
645 (WebChromeClient::canRunBeforeUnloadConfirmPanel):
646 (WebChromeClient::runBeforeUnloadConfirmPanel):
647 (WebChromeClient::runJavaScriptAlert):
648 (WebChromeClient::runJavaScriptConfirm):
649 (WebChromeClient::runJavaScriptPrompt):
650 (WebChromeClient::shouldInterruptJavaScript):
651 (WebChromeClient::setStatusbarText):
652 (WebChromeClient::print):
653 * WebCoreSupport/WebContextMenuClient.mm:
654 (WebContextMenuClient::getCustomMenuFromDefaultItems):
655 (WebContextMenuClient::contextMenuItemSelected):
656 * WebCoreSupport/WebDragClient.mm:
657 (WebDragClient::startDrag):
658 * WebCoreSupport/WebEditorClient.mm:
659 (WebEditorClient::textFieldDidBeginEditing):
660 (WebEditorClient::textFieldDidEndEditing):
661 (WebEditorClient::textDidChangeInTextField):
662 (WebEditorClient::doTextFieldCommandFromEvent):
663 (WebEditorClient::textWillBeDeletedInTextField):
664 (WebEditorClient::textDidChangeInTextArea):
665 * WebCoreSupport/WebFrameBridge.mm:
666 (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
667 * WebCoreSupport/WebFrameLoaderClient.mm:
668 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
669 (WebFrameLoaderClient::assignIdentifierToInitialRequest):
670 (WebFrameLoaderClient::dispatchWillSendRequest):
671 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
672 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
673 (WebFrameLoaderClient::dispatchDidReceiveResponse):
674 (WebFrameLoaderClient::willCacheResponse):
675 (WebFrameLoaderClient::dispatchDidReceiveContentLength):
676 (WebFrameLoaderClient::dispatchDidFinishLoading):
677 (WebFrameLoaderClient::dispatchDidFailLoading):
678 (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
679 (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
680 (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
681 (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
682 (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
683 (WebFrameLoaderClient::dispatchWillClose):
684 (WebFrameLoaderClient::dispatchDidReceiveIcon):
685 (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
686 (WebFrameLoaderClient::dispatchDidReceiveTitle):
687 (WebFrameLoaderClient::dispatchDidCommitLoad):
688 (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
689 (WebFrameLoaderClient::dispatchDidFailLoad):
690 (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
691 (WebFrameLoaderClient::dispatchDidFinishLoad):
692 (WebFrameLoaderClient::dispatchDidFirstLayout):
693 (WebFrameLoaderClient::dispatchCreatePage):
694 (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
695 (WebFrameLoaderClient::dispatchWillSubmitForm):
696 (WebFrameLoaderClient::dispatchDidLoadMainResource):
697 * WebView/WebHTMLView.mm:
698 (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]):
699 (-[WebHTMLView validateUserInterfaceItem:]):
700 * WebView/WebPDFView.mm:
701 (-[WebPDFView validateUserInterfaceItem:]):
702 (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
703 * WebView/WebView.mm:
704 (-[WebView _openNewWindowWithRequest:]):
705 (-[WebView _menuForElement:defaultItems:]):
706 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
707 (-[WebView _cacheResourceLoadDelegateImplementations]):
708 (-[WebView _cacheFrameLoadDelegateImplementations]):
709 (-[WebView _policyDelegateForwarder]):
710 (-[WebView _UIDelegateForwarder]):
711 (-[WebView _editingDelegateForwarder]):
712 (-[WebView _scriptDebugDelegateForwarder]):
713 (-[WebView _setCatchesDelegateExceptions:]):
714 (-[WebView _catchesDelegateExceptions]):
715 (-[_WebSafeForwarder initWithTarget:defaultTarget:]):
716 (-[_WebSafeForwarder forwardInvocation:]):
717 (-[_WebSafeForwarder methodSignatureForSelector:]):
718 (-[WebView _commonInitializationWithFrameName:groupName:]):
719 (-[WebView validateUserInterfaceItem:]):
720 (-[WebView _headerHeight]):
721 (-[WebView _footerHeight]):
722 (-[WebView _drawHeaderInRect:]):
723 (-[WebView _drawFooterInRect:]):
724 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
726 (CallDelegateReturningFloat):
727 (CallDelegateReturningBoolean):
729 (CallUIDelegateReturningFloat):
730 (CallUIDelegateReturningBoolean):
731 (CallFrameLoadDelegate):
732 (CallResourceLoadDelegate):
734 (CallFormDelegateReturningBoolean):
735 * WebView/WebViewInternal.h:
736 * WebView/WebViewPrivate.h:
739 2007-09-04 Timothy Hatcher <timothy@apple.com>
743 <rdar://problem/5452908> NIBs saved in the Pre-10.2 format while Safari 3 installed do not work without Safari 3
745 This happened because we encoded a new field that the old WebKit does not know how to read.
746 And NSCoder throws an exception if initWithCoder finishes while there is still unread data in the archive.
748 The WebViewVersion is now 4 to distinguish that we do not encode/decode allowsUndo.
750 * WebView/WebView.mm:
751 (-[WebView initWithCoder:]): Only try to read allowsUndo if the version is 3.
752 (-[WebView encodeWithCoder:]): No longer encode allowsUndo.
754 2007-09-04 David Hyatt <hyatt@apple.com>
756 Fix for <rdar://problem/5271213>, resizing iChat window is slower than in
757 Tiger. This patch implements a fast scaling mode that can be used by
758 WebViews, e.g., during window resizing.
760 Reviewed by John Sullivan
762 * WebView/WebView.mm:
763 (-[WebView _setUseFastImageScalingMode:]):
764 (-[WebView _inFastImageScalingMode]):
765 * WebView/WebViewPrivate.h:
767 2007-09-04 Darin Adler <darin@apple.com>
771 * WebView/WebView.mm:
772 (-[WebView _loadBackForwardListFromOtherView:]): Added missing null check.
773 (-[WebView _setInitiatedDrag:]): Ditto.
774 (-[WebView _clearUndoRedoOperations]): Ditto.
775 (-[WebView encodeWithCoder:]): Ditto.
776 (-[WebView backForwardList]): Ditto.
777 (-[WebView setMaintainsBackForwardList:]): Ditto.
779 2007-09-04 Tristan O'Tierney <tristan@apple.com>
781 Reviewed by John Sullivan.
783 <rdar://problem/5454935> Can't reply to this message in Mail -- -[DOMRange webArchive] is throwing an exception
785 * WebView/WebArchiver.mm:
786 (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
787 Guard the creation of WebResource by ensuring that the passed in
788 responseURL is never nil.
790 2007-09-03 Mark Rowe <mrowe@apple.com>
792 Reviewed by Tim Hatcher.
794 <rdar://problem/5452164> Production build with in symbols directory has no debug info
796 Enable debug symbol generation on all build configurations. Production builds are stripped
797 of symbols by Xcode during deployment post-processing.
799 * Configurations/Base.xcconfig:
800 * WebKit.xcodeproj/project.pbxproj:
802 2007-09-02 Brady Eidson <beidson@apple.com>
804 Reviewed by John Sullivan and Mark Rowe
806 Groundwork for support for monitoring IconDatabase in-memory statistics
808 * Misc/WebCoreStatistics.h:
809 * Misc/WebCoreStatistics.mm:
810 (+[WebCoreStatistics iconPageURLMappingCount]):
811 (+[WebCoreStatistics iconRetainedPageURLCount]):
812 (+[WebCoreStatistics iconRecordCount]):
813 (+[WebCoreStatistics iconsWithDataCount]):
815 2007-09-01 Oliver Hunt <oliver@apple.com>
819 <rdar://problem/5344848> IME is incorrectly used for key events when on non-editable regions
821 EditorClient::setInputMethodState stub
823 * WebCoreSupport/WebEditorClient.h:
824 * WebCoreSupport/WebEditorClient.mm:
825 (WebEditorClient::setInputMethodState):
827 2007-08-30 Maciej Stachowiak <mjs@apple.com>
831 <rdar://problem/5439953> REGRESSION: Cannot load feeds in widgets in Dashcode due to change in WebKit delegate methods
833 * WebView/WebFrame.mm:
834 (-[WebFrame _attachScriptDebugger]): Don't create the debugger object if the frame has not yet
835 created its script interpreter, to avoid premature dispatch of windowScriptObjectAvailable/Cleared
836 delegate methods. The script debugger will be created in any case when the window object does appear.
838 2007-08-29 Darin Adler <darin@apple.com>
840 Reviewed by Tim Hatcher.
842 - fix <rdar://problem/4582212> WebKit inappropriately adds +initialize to
843 NSPasteboard via a category, prevents AppKit initialize
844 http://bugs.webkit.org/show_bug.cgi?id=9417
846 * Misc/WebNSPasteboardExtras.h: Got rid of the global data objects and replaced
847 them with global functions.
849 * Misc/WebNSPasteboardExtras.mm:
850 (initializePasteboardTypes): Changed the initialize method to be this function.
851 (WebURLPasteboardType): Added, calls the initialize function and then returns
852 the value of the global.
853 (WebURLNamePasteboardType): Ditto.
854 (+[NSPasteboard _web_writableTypesForURL]): Changed to call the new function instead
855 of getting at the global directly.
856 (+[NSPasteboard _web_dragTypesForURL]): Ditto.
857 (-[NSPasteboard _web_writeURL:andTitle:types:]): Ditto.
858 * WebCoreSupport/WebPasteboardHelper.mm:
859 (WebPasteboardHelper::urlFromPasteboard): Ditto.
860 * WebView/WebHTMLView.mm:
861 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
863 * WebView/WebView.mm:
864 (+[WebView initialize]): Added a call to one of the functions to take advantage
865 of the side effect that initializes the globals; this is to help out old versions
867 (+[WebView URLTitleFromPasteboard:]): Changed to call the new function instead
868 of getting at the global directly.
870 * WebKit.exp: Add exports of the new functions.
872 2007-08-29 Adele Peterson <adele@apple.com>
876 Fix for http://bugs.webkit.org/show_bug.cgi?id=15098
877 <rdar://problem/5440319> REGRESSION (9A530-9A534): Double scroll bar on pdfs
879 * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::makeDocumentView):
880 Don't suppress scrollbars before the view creation if we're making the view for a non-html view
882 * WebView/WebFrameViewInternal.h: Make _scrollView return a WebDynamicScrollBarsView since so many clients were relying on it being that type anyway.
883 * WebView/WebFrameView.mm:
884 (-[WebFrameView _setDocumentView:]):
885 (-[WebFrameView _scrollView]):
886 (-[WebFrameView setAllowsScrolling:]):
887 (-[WebFrameView allowsScrolling]):
888 * WebView/WebView.mm:
889 (-[WebView setAlwaysShowVerticalScroller:]):
890 (-[WebView alwaysShowVerticalScroller]):
891 (-[WebView setAlwaysShowHorizontalScroller:]):
892 (-[WebView alwaysShowHorizontalScroller]):
894 2007-08-29 David Hyatt <hyatt@apple.com>
896 The method that was swizzled to fix 5441281 does not exist on Tiger.
897 Tiger has to do a double swizzle instead (of resetCursorRects and NSCursor's
898 set method) in order to roughly achieve the same effect.
902 * WebView/WebHTMLView.mm:
905 (+[WebHTMLViewPrivate initialize]):
907 2007-08-29 Anders Carlsson <andersca@apple.com>
911 * WebCoreSupport/WebFrameBridge.mm:
913 2007-08-29 David Hyatt <hyatt@apple.com>
915 Fix for 5441281, remove our dependency on cursor rects and drag margins
916 in AppKit for a large performance boost on the PLT and iBench.
920 * Plugins/WebBaseNetscapePluginView.h:
921 * Plugins/WebBaseNetscapePluginView.mm:
922 (-[WebBaseNetscapePluginView sendNullEvent]):
923 (-[WebBaseNetscapePluginView mouseEntered:]):
924 (-[WebBaseNetscapePluginView mouseExited:]):
925 (-[WebBaseNetscapePluginView stop]):
926 Clean up cursor setting from Netscape plugins. Don't unconditionally mutate
927 the cursor when a plugin stops.
929 * WebView/WebFrameView.mm:
930 (-[WebFrameView _setDocumentView:]):
931 Suppress the resetting of drag margins while the new document view is being
932 added to the view hierarchy.
934 * WebView/WebHTMLView.mm:
935 (-[NSWindow _web_borderView]):
936 Expose the border view of the NSWindow so that it can be hit tested.
938 (setCursorForMouseLocation):
939 Apply a method swizzle to override the private AppKit method, _setCursorForMouseLocation.
940 We have to do this to suppress the cursor rect invalidation handling from resetting
941 the cursor for no reason.
943 The swizzle will do a hit test and allow the cursor set to occur if the mouse ends up
944 being over a plugin or over a view other than a WebHTMLView.
946 (+[WebHTMLViewPrivate initialize]):
947 The swizzle for setCursorForMouseLocation is set up here.
949 (-[WebHTMLView _frameOrBoundsChanged]):
950 Add a 100ms delay to the fake mouse moved event that fires when the view moves
951 under the mouse (without the mouse moving). This happens on iBench when the
952 pages get scrolled. By adding a delay we ensure that even with the mouse inside
953 the window, we don't experience cursor thrashing when pages are updating and
956 2007-08-28 Anders Carlsson <andersca@apple.com>
960 <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
962 * WebCoreSupport/WebFrameBridge.mm:
963 Use the enum from FrameLoaderTypes.h.
965 * WebCoreSupport/WebFrameLoaderClient.mm:
966 (WebFrameLoaderClient::objectContentType):
967 Return ObjectContentNetscapePlugin and ObjectContentOtherPlugin depending on the plug-in type.
969 2007-08-28 Mark Rowe <mrowe@apple.com>
971 Reviewed by Maciej Stachowiak.
973 Fix fallout from the fix for <rdar://problem/5437983> (Loading history containing 100,000 entries adds 20s to Safari's startup)
974 in r25275. The array of entries for each day was being maintained in the reverse of the order that was expected.
976 * History/WebHistory.mm:
977 (-[WebHistoryPrivate insertItem:forDateKey:]): Maintain the array of entries in descending order.
979 2007-08-28 Mark Rowe <mrowe@apple.com>
981 Fix the buildbot build.
983 * History/WebHistory.mm:
984 (timeIntervalForBeginningOfDay): Explicitly cast to silence compiler warning.
986 2007-08-28 Mark Rowe <mrowe@apple.com>
988 Reviewed by Darin Adler.
990 <rdar://problem/5437983> Loading history containing 100,000 entries adds 20s to Safari's startup
992 Move WebHistoryItemPrivate from using a sorted array of NSCalendarDate's that map to a sorted array of arrays
993 of WebHistoryItem's over to using a HashMap of NSTimeIntervals and arrays of WebHistoryItems. NSTimeInterval
994 uses less memory and is substantially cheaper during comparisons than NSCalendarDate. The use of the HashMap
995 avoids the needs to repeatedly search within an array to locate the array that corresponds to the given days
998 The result of these changes is that loading 100,000 history items drops from around 25s to 1.6s. Loading
999 100 items drops from 0.003s to 0.002s.
1001 * History/WebHistory.mm:
1002 (-[WebHistoryPrivate init]):
1003 (-[WebHistoryPrivate dealloc]):
1004 (timeIntervalForBeginningOfDay): Return the NSTimeInterval representing the beginning of the specified day.
1005 (-[WebHistoryPrivate findKey:forDay:]):
1006 (-[WebHistoryPrivate insertItem:forDateKey:]): Perform a binary search within the day's history items rather than a linear search.
1007 (-[WebHistoryPrivate _removeItemFromDateCaches:]):
1008 (-[WebHistoryPrivate _addItemToDateCaches:]):
1009 (-[WebHistoryPrivate removeAllItems]):
1010 (-[WebHistoryPrivate orderedLastVisitedDays]): Generate and cache the sorted NSArray of NSCalendarDate's exposed in the API.
1011 This cache is invalidated by _removeItemFromDateCaches: and _addItemToDateCaches: when needed.
1012 (-[WebHistoryPrivate orderedItemsLastVisitedOnDay:]):
1013 (-[WebHistoryPrivate arrayRepresentation]):
1014 (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): Use an autorelease pool to keep the
1015 number of live autoreleased objects generated to a reasonable level.
1016 * History/WebHistoryItem.mm:
1017 (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
1018 (-[WebHistoryItem initFromDictionaryRepresentation:]): Use the new HistoryItem constructor that accepts the alternate title
1019 rather than setting it after construction. This prevents a modification notification from being sent for each WebHistoryItem that is loaded.
1020 * History/WebHistoryItemInternal.h:
1021 * History/WebHistoryPrivate.h:
1022 * Misc/WebNSCalendarDateExtras.h: Removed as _webkit_compareDay: is no longer used.
1023 * Misc/WebNSCalendarDateExtras.m: Removed.
1024 * WebKit.xcodeproj/project.pbxproj:
1026 2007-08-28 Anders Carlsson <andersca@apple.com>
1030 <rdar://problem/5298296> XMLHttpRequest readyState 3 & responseText buffer issues
1032 Expose WKSetNSURLRequestShouldContentSniff to WebCore.
1034 * WebCoreSupport/WebSystemInterface.m:
1035 (InitWebCoreSystemInterface):
1037 2007-08-24 Kevin McCullough <kmccullough@apple.com>
1041 <rdar://problem/5437038> 1 credential object leaked for each call to credentialWithUser:password:persistence
1042 - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
1044 * Panels/WebAuthenticationPanel.m:
1045 (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
1046 (-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
1048 2007-08-24 Adele Peterson <adele@apple.com>
1050 Fix by Darin, reviewed by Adele.
1052 Fix for <rdar://problem/5433422> Upon quitting, WebKit loads the WebPlugin shared database and immediately closes it
1054 * Plugins/WebPluginDatabase.h: Added closeSharedDatabase, which won't create a new database if we're just trying to close it.
1055 * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase closeSharedDatabase]): Added.
1056 * WebView/WebView.mm:
1057 (-[WebView _close]): Call closeSharedDatabase.
1058 (+[WebView _applicationWillTerminate]): Call closeSharedDatabase.
1060 2007-08-24 Timothy Hatcher <timothy@apple.com>
1062 Reviewed by John Sullivan.
1064 <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1066 This is a more localized fix for yesterday's change. Now explicitly call _web_layoutIfNeededRecursive inside the
1067 HIWebView Draw() function. Adds a FIXME to explain that we need to do layout before Carbon has decided what regions to draw.
1068 Doing layout in Draw() will potentially cause drawing to happen in two passes, but this has always been a problem in Carbon.
1070 * Carbon/HIWebView.m:
1071 (Draw): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
1072 (SetFocusPart): Fix to work in ObjC++ (now that HIWebView.m is treated as a ObjC++ file.)
1073 * WebView/WebView.mm: Removes the 4 displayIfNeeded methods from yesterday's change.
1074 * WebKit.xcodeproj/project.pbxproj: Force the file type of HIWebView.m to ObjC++ so WebHTMLViewInternal.h can be included.
1076 2007-08-23 Timothy Hatcher <timothy@apple.com>
1078 Reviewed by Dave Hyatt.
1080 <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1082 The Carbon HIWebView was relying on layout happening when displayIfNeededInRect: was called on the WebView.
1083 This would happen on Tiger because _recursiveDisplayRectIfNeededIgnoringOpacity: would always do a layout if needed.
1084 Doing a layout in _recursiveDisplayRectIfNeededIgnoringOpacity was removed in Leopard in favor of viewWillDraw, and
1085 the fact that adding new dirty rects inside _recursiveDisplayRectIfNeededIgnoringOpacity on Leopard will not
1086 cause a drawRect in the same display loop.
1088 So any client on Leopard calling displayIfNeeded* on the WebView would get a layout and any new dirty rects. So
1089 _web_layoutIfNeededRecursive needs to be called on the main frame's WebHTMLView to make sure we layout and
1090 display anything that is really needed.
1092 * WebView/WebHTMLView.mm:
1093 (-[WebHTMLView _layoutIfNeeded]):
1094 (-[WebHTMLView _web_layoutIfNeededRecursive]):
1095 * WebView/WebHTMLViewInternal.h:
1096 * WebView/WebView.mm:
1097 (-[WebView displayIfNeeded]): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
1098 (-[WebView displayIfNeededIgnoringOpacity]): Ditto.
1099 (-[WebView displayIfNeededInRect:]): Ditto.
1100 (-[WebView displayIfNeededInRectIgnoringOpacity:]): Ditto.
1102 2007-08-22 Timothy Hatcher <timothy@apple.com>
1104 Rolling out r25102 for <rdar://problem/5410937> until
1105 <rdar://problem/5429920> is resolved.
1107 * Carbon/CarbonUtils.m:
1110 * Carbon/CarbonWindowAdapter.h:
1111 * Carbon/CarbonWindowAdapter.m:
1112 * Carbon/CarbonWindowContentView.h:
1113 * Carbon/CarbonWindowContentView.m:
1114 * Carbon/CarbonWindowFrame.h:
1115 * Carbon/CarbonWindowFrame.m:
1116 * Carbon/HIViewAdapter.h:
1117 * Carbon/HIViewAdapter.m:
1118 * Carbon/HIWebView.h:
1119 * Carbon/HIWebView.m:
1121 2007-08-20 John Sullivan <sullivan@apple.com>
1123 Reviewed by Adam Roben
1125 WebKit part of fix for:
1126 <rdar://problem/5417777> WebKit focus ring color no longer matches system focus rings
1128 * Misc/WebNSAttributedStringExtras.mm:
1129 now includes <WebCore/ColorMac.h> to account for moved declaration
1130 * WebView/WebFrame.mm:
1133 * WebView/WebViewPrivate.h:
1134 * WebView/WebView.mm:
1135 (+[WebView _setUsesTestModeFocusRingColor:]):
1136 new SPI, calls through to new WebCore function. This is used by DumpRenderTree to make sure the
1137 focus ring color is always the same when performing layout tests, regardless of OS X version.
1138 (+[WebView _usesTestModeFocusRingColor]):
1139 new SPI, calls through to new WebCore function
1141 2007-08-20 Antti Koivisto <antti@apple.com>
1145 Fix <rdar://problem/5378390>
1146 Crash at Range::startContainer() when creating multiple ToDos on the same line
1150 No layout test, this only happens with ObjC API.
1152 * WebView/WebHTMLView.mm:
1153 (-[WebHTMLView _expandSelectionToGranularity:]):
1155 2007-08-20 Maciej Stachowiak <mjs@apple.com>
1157 Not reviewed, fix for crash on launch bug in last patch.
1159 * WebView/WebHTMLView.mm:
1160 (-[WebHTMLView setDataSource:]): Remove an assertion, fix code to work right in the
1161 face of that condition.
1163 2007-08-18 Maciej Stachowiak <mjs@apple.com>
1167 - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
1169 There were three main cuases of extra time due to creating the initial empty document:
1171 1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
1172 2) Parsing the minimal markup for the initial document's contents.
1173 3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
1175 The WebKit part of the fixes addresses 1.
1177 * WebCoreSupport/WebFrameLoaderClient.mm:
1178 (WebFrameLoaderClient::makeDocumentView): When switching from the initial
1179 empty document to the first real document, reuse the WebHTMLView.
1181 It might actually be a significant performance improvement to always
1182 reuse the WebHTMLView, but that is a much riskier change and not
1183 needed to fix the regression right now.
1185 2007-08-17 Maciej Stachowiak <mjs@apple.com>
1189 - WebKit part of fix to scrollbar suppression hack for Leopard
1191 * WebView/WebDynamicScrollBarsView.m:
1192 (-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
1193 when scrollbars are suppressed.
1194 (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
1195 here, when unsuppressing.
1197 2007-08-17 Darin Adler <darin@apple.com>
1201 - fix <rdar://problem/5414518> Use root URL as origin URL when quarantining downloads
1203 * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::setOriginalURLForDownload):
1204 Extract only the scheme and host name and make the originating URL from that.
1206 * WebKit/StringsNotToBeLocalized.txt: Updated for recent changes.
1208 2007-08-17 Timothy Hatcher <timothy@apple.com>
1212 <rdar://problem/5398301> Xcode threw mutation exception while enumerating subviews (GC only)
1214 I was never able to reproduce this exception. But there can be cases where layout will
1215 trigger JavaScript or plugin code that can modify the WebView view hierarchy during a
1216 recursive enumeration of all the subviews.
1218 This patch does two things:
1219 1) Adds a check in debug builds that will LOG when any view is added or removed during layout.
1220 Noting that added views will not recieve layout this round and might paint without first recieving layout.
1222 2) Recursivly builds up an array of descendant WebHTMLViews before calling layout on them.
1223 This matches the behavior of makeObjectsPerformSelector: in the non-GC case (making a copy
1224 before enumerating.)
1226 * WebView/WebHTMLView.mm:
1227 (-[WebHTMLView _web_setPrintingModeRecursive]): Use _web_addDescendantWebHTMLViewsToArray to build up an array
1228 of WebHTMLViews to enumerate.
1229 (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
1230 (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
1231 (-[WebHTMLView _web_layoutIfNeededRecursive]): Ditto.
1232 (-[WebHTMLView _layoutIfNeeded]): Moved to WebHTMLViewFileInternal category.
1233 (-[WebHTMLView didAddSubview:]): LOG in debug builds.
1234 (-[WebHTMLView willRemoveSubview:]): Ditto.
1235 (-[NSView _web_addDescendantWebHTMLViewsToArray:]): Recursivly build an array of descendant WebHTMLViews.
1236 * WebView/WebHTMLViewInternal.h: Added a BOOL in WebHTMLViewPrivate to track subview changes (debug only.)
1238 2007-08-17 Anders Carlsson <andersca@apple.com>
1240 Reviewed by Dave Hyatt.
1242 <rdar://problem/5379040>
1243 REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
1245 Pass the right size when creating the views.
1247 * WebCoreSupport/WebFrameBridge.mm:
1248 (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1249 * WebCoreSupport/WebFrameLoaderClient.h:
1250 * WebCoreSupport/WebFrameLoaderClient.mm:
1251 (WebFrameLoaderClient::createPlugin):
1253 2007-08-13 Geoffrey Garen <ggaren@apple.com>
1255 Reviewed by Dave Hyatt.
1257 WebKit changes to support new cache eviction model in WebCore.
1259 * WebView/WebPreferences.m:
1260 (+[WebPreferences initialize]): Modified to reflect new API in WebCore.
1261 * WebView/WebView.mm:
1262 (+[WebView _initializeCacheSizesIfNecessary]): Slightly increased cache
1263 size on low memory systems to avoid affecting the PLT for now.
1265 2007-08-15 Timothy Hatcher <timothy@apple.com>
1269 <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1271 HIWebViewCreate now just returns a HIViewRef created with HICocoaViewCreate. This eliminates lots of old code and
1272 makes HIWebView a better citizen starting with Leopard. The old code paths are still needed for Tiger, so now
1273 most of the files in the WebKit/Carbon directory are #ifdef BUILDING_ON_TIGER.
1275 The Tiger code is unchanged and dosen't exhibit the invalidation problem when the window resizes.
1277 * Carbon/CarbonUtils.m:
1278 (WebInitForCarbon): #ifdef BUILDING_ON_TIGER portions of this code that is not needed on Leopard.
1279 * Carbon/CarbonWindowAdapter.h: #ifdef BUILDING_ON_TIGER
1280 * Carbon/CarbonWindowAdapter.m: Ditto.
1281 * Carbon/CarbonWindowContentView.h: Ditto.
1282 * Carbon/CarbonWindowContentView.m: Ditto.
1283 * Carbon/CarbonWindowFrame.h: Ditto.
1284 * Carbon/CarbonWindowFrame.m: Ditto.
1285 * Carbon/HIViewAdapter.h: Ditto.
1286 * Carbon/HIViewAdapter.m: Ditto.
1287 * Carbon/HIWebView.h: Consolidate two #ifdef __OBJC__ blocks into one.
1288 * Carbon/HIWebView.m: Implement Leopard specific HIWebViewCreate, HIWebViewCreateWithClass and HIWebViewGetWebView.
1289 (HIWebViewCreate): Call HIWebViewCreateWithClass passing [WebView class].
1290 (HIWebViewCreateWithClass): Call HICocoaViewCreate with an instance of the class passed in.
1291 (HIWebViewGetWebView): Call HICocoaViewGetView.
1293 2007-08-14 Brady Eidson <beidson@apple.com>
1295 Reviewed by Darin, John, Maciej, Oliver, and Tim
1297 <rdar://problem/5394708> - Crash on launch with corrupt icon database
1299 Expose some new SPI to help recover from this case should it happen again
1301 * Misc/WebIconDatabase.mm:
1302 (-[WebIconDatabase init]): Use the new _databaseDirectory to determine where to open the database on disk
1303 (+[WebIconDatabase _checkIntegrityBeforeOpening]): Tell the icon database to check integrity when it opens
1304 (-[WebIconDatabase _databaseDirectory]): Moved the database-directory-determining logic here as it's now used in two places
1305 * Misc/WebIconDatabasePrivate.h: Added _checkIntegrityBeforeOpening SPI for clients to give hints about when the
1306 integrity check should run
1308 2007-08-12 Alexey Proskuryakov <ap@webkit.org>
1312 http://bugs.webkit.org/show_bug.cgi?id=4648
1313 Shockwave unable to load GZip'd text resources when server sends Content-Length header
1315 * Plugins/WebBaseNetscapePluginStream.mm:
1316 (-[WebBaseNetscapePluginStream startStreamWithResponse:]): Don't trust
1317 -[NSURLResponse expectedContentLength] if Content-Encoding is not identity.
1319 2007-08-10 Timothy Hatcher <timothy@apple.com>
1321 Reviewed by Mark Rowe.
1323 <rdar://problem/5403302> HIWebView.h should be #ifdefed out for 64-bit
1325 * Carbon/HIWebView.h: #ifdef out the header in 64-bit. Adds a comment about 32-bit only.
1326 * Carbon/CarbonUtils.h: Ditto.
1328 2007-08-10 Timothy Hatcher <timothy@apple.com>
1332 <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
1334 Disable NPObject use in 64-bit on Mac OS X. Also generate the 64-bit export file.
1336 * Configurations/WebKit.xcconfig: Point to the generated 64-bit export file.
1337 * Plugins/WebBasePluginPackage.h:
1338 * Plugins/npfunctions.h: #ifdef out this header in 64-bit on Mac OS X.
1339 * WebKit.LP64.exp: Removed.
1340 * WebKit.xcodeproj/project.pbxproj: Generate the the 64-bit export file.
1341 * WebKitPrefix.h: Define WTF_USE_NPOBJECT.
1343 2007-08-10 Anders Carlsson <andersca@apple.com>
1347 <rdar://problem/5390568>
1348 REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source
1350 If the identifier is not in the map, just bail out instead of asserting. This is a better fix for
1351 <rdar://problem/5133420> because WebCore shouldn't have to worry about the lifetime of WebKit objects.
1353 * WebView/WebDocumentLoaderMac.mm:
1354 (WebDocumentLoaderMac::decreaseLoadCount):
1356 2007-08-10 Oliver Hunt <oliver@apple.com>
1360 Fixed <rdar://problem/5000470> REGRESSION: ATOK IM: reconvert returns incorrect symbol due to inconsistent range domains in TSM by working around <rdar://problem/5400551> [NSAttributedString(WebKitExtras) _web_attributedStringFromRange:] adds whitespace to the requested range
1362 We truncate the returned string to the expected length.
1364 * WebView/WebHTMLView.mm:
1365 (-[WebHTMLView attributedSubstringFromRange:]):
1367 2007-08-09 Mark Rowe <mrowe@apple.com>
1371 <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before +
1373 * Configurations/Version.xcconfig:
1374 * WebKit.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
1375 Version.xcconfig and Info.plist explicit to Xcode.
1377 2007-08-08 Kevin Decker <kdecker@apple.com>
1379 Reviewed by Anders Carlsson.
1381 Fixed: <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
1383 #ifdef'd out Netscape style plug-ins on 64-bit because Mac OS X doesn't support 64-bit Carbon UI.
1385 * Plugins/WebBaseNetscapePluginStream.h:
1386 * Plugins/WebBaseNetscapePluginStream.mm:
1387 * Plugins/WebBaseNetscapePluginView.h:
1388 * Plugins/WebBaseNetscapePluginView.mm:
1389 (+[WebBaseNetscapePluginView getCarbonEvent:]):
1391 * Plugins/WebBaseNetscapePluginViewInternal.h:
1392 * Plugins/WebBaseNetscapePluginViewPrivate.h:
1393 * Plugins/WebBasePluginPackage.m:
1394 (+[WebBasePluginPackage pluginWithPath:]):
1395 * Plugins/WebNetscapePluginEmbeddedView.h:
1396 * Plugins/WebNetscapePluginEmbeddedView.mm:
1397 * Plugins/WebNetscapePluginPackage.h:
1398 * Plugins/WebNetscapePluginPackage.m:
1399 * Plugins/WebNetscapePluginStream.h:
1400 * Plugins/WebNetscapePluginStream.mm:
1401 * Plugins/WebPluginDatabase.m:
1402 (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
1404 * WebCoreSupport/WebFrameBridge.mm:
1405 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1406 * WebView/WebFrame.mm:
1407 * WebView/WebFramePrivate.h:
1408 * WebView/WebHTMLView.mm:
1409 (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
1410 * WebView/WebHTMLViewInternal.h:
1412 2007-08-07 David Hyatt <hyatt@apple.com>
1414 Fix a botched backout of the Quicktime plugin clipping fix that broke Java. The plugin view should not
1415 be set to autosize with the parent view. Also, cleanup of script objects was removed accidentally as
1420 * Plugins/WebPluginController.mm:
1421 (-[WebPluginController destroyPlugin:]):
1422 (-[WebPluginController destroyAllPlugins]):
1423 * WebCoreSupport/WebFrameBridge.mm:
1424 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
1426 2007-08-03 Brady Eidson <beidson@apple.com>
1430 Fix for http://bugs.webkit.org/show_bug.cgi?id=14824 and <rdar://problem/5372989>
1432 When unregistering a MIMEType, remove it from the WebCore registry unconditionally
1433 When registrying a MIMEType whose view class is WebHTMLView, add it to the WebCore registry
1435 * WebView/WebView.mm:
1436 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
1437 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1438 (+[WebView registerViewClass:representationClass:forMIMEType:]):
1440 2007-08-03 Timothy Hatcher <timothy@apple.com>
1442 Reviewed by Mark Rowe.
1444 Correct the bundle version check to work in Debug and Release builds too.
1446 * WebKit.xcodeproj/project.pbxproj:
1448 2007-08-02 Brady Eidson <beidson@apple.com>
1452 <rdar://problem/5381463> - setMIMETypesShownAsHTML mutates while enumerating
1454 * WebView/WebView.mm:
1455 (+[WebView setMIMETypesShownAsHTML:]): Copy the dictionary before we work with it.
1457 2007-08-02 Alice Liu <alice.liu@apple.com>
1459 Reviewed by Kevin McCullough.
1461 fixed <rdar://problem/5310312> REGRESSION: javascript is mis-escaped at http://labs.zarate.org/passwd causing bookmarklet to break
1463 * Misc/WebNSURLExtras.mm:
1464 (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
1465 (-[NSURL _web_userVisibleString]):
1466 (-[NSURL _web_URLWithLowercasedScheme]):
1467 (-[NSURL _web_dataForURLComponentType:]):
1468 These 4 changes are just casting changes.
1470 (-[NSString _webkit_stringByReplacingValidPercentEscapes]):
1471 This change replaces the call to an NSURL method with a webcore one that doesn't abort the escaping effort once an illegal character is encountered.
1473 2007-08-01 Anders Carlsson <andersca@apple.com>
1477 * Misc/WebNSURLExtras.mm:
1478 (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
1479 (-[NSURL _web_userVisibleString]):
1480 (-[NSURL _web_URLWithLowercasedScheme]):
1481 (-[NSURL _web_dataForURLComponentType:]):
1483 2007-08-01 Alice Liu <alice.liu@apple.com>
1487 Making WebNSURLExtras objc++
1489 * Misc/WebNSURLExtras.m: Removed.
1490 * Misc/WebNSURLExtras.mm: Copied from WebKit/Misc/WebNSURLExtras.m.
1491 * WebKit.xcodeproj/project.pbxproj:
1493 2007-08-01 Darin Adler <darin@apple.com>
1495 Reviewed by Anders Carlsson and Kevin Decker.
1497 - fix <rdar://problem/5377432> Removal of MakeDataExecutable from 64-bit breaks WebKit build
1499 The trick was to ifdef out more of the code that's only needed to support CFM, which exists
1500 only for 32-bit PowerPC.
1502 * Plugins/WebNetscapePluginPackage.h: Define a SUPPORT_CFM symbol in this internal header when
1503 we support CFM. We support it only on 32-bit PowerPC. Only define the isBundle, isCFM, and
1504 connID fields when SUPPORT_CFM is on. Also use ResFileRefNum instead of SInt16.
1505 * Plugins/WebNetscapePluginPackage.m: Only compile the function pointer and transition vector
1506 functions when SUPPORT_CFM is on.
1507 (-[WebNetscapePluginPackage openResourceFile]): Put the non-bundle case inside a SUPPORT_CFM
1508 ifdef, since all non-CFM plug-ins are bundles.
1509 (-[WebNetscapePluginPackage closeResourceFile:]): Ditto.
1510 (-[WebNetscapePluginPackage _initWithPath:]): Use SUPPORT_CFM to compile out the code for
1511 non-bundle and bundle-based CFM plug-ins, and code that sets isBundle and isCFM.
1512 (-[WebNetscapePluginPackage executableType]): Put the CFM case inside SUPPORT_CFM.
1513 (-[WebNetscapePluginPackage load]): Put the non-bundle and CFM cases inside SUPPORT_CFM.
1514 There was a bit of dead code here.
1515 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Put the non-bundle case inside
1518 2007-07-31 Timothy Hatcher <timothy@apple.com>
1520 Reviewed by Oliver and Beth.
1522 <rdar://problem/5211271> ADOBE Leopard 9A410: At the first Launching InDesign after deactivate, EULA page gets blanked.
1524 Check for more Adobe applications that need the frame reload quirk. Also cache the answer
1525 so the version check dosen't happen more than once.
1527 * WebView/WebView.mm:
1528 (-[WebView _needsAdobeFrameReloadingQuirk]):
1529 (-[WebView _updateWebCoreSettingsFromPreferences:]):
1531 2007-07-30 Adele Peterson <adele@apple.com>
1535 Fix for <rdar://problem/5308020> REGRESSION: Command-N with Dvorak-Qwerty keyboard layout stopped working inside web page text fields
1537 * WebView/WebHTMLView.mm: (-[WebHTMLView _handleStyleKeyEquivalent:]):
1538 The input method may have modified the character we get, so don't use charactersIgnoringModifiers to interpret the character we get.
1540 2007-07-30 John Sullivan <sullivan@apple.com>
1544 - fixed <rdar://problem/5216176> Need WebKit SPI to allow clients using embedded WebViews to avoid
1545 clipping ends of some printed pages
1547 This provides Mail, and other clients that print views that embed WebViews, a way to ensure that
1548 the HTML is laid out for printing before pagination occurs.
1550 * WebView/WebHTMLViewPrivate.h:
1551 new SPI method -_layoutForPrinting
1553 * WebView/WebHTMLView.mm:
1554 (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]):
1555 new method, just like existing _web_setPrintingModeRecursive except passes YES for adjustViewSize
1556 (-[WebHTMLView _layoutForPrinting]):
1557 new SPI method, sets printing mode temporarily to adjust the view size for printing
1558 (-[NSView _web_setPrintingModeRecursiveAndAdjustViewSize]):
1559 new helper method to do the recursion
1561 2007-07-30 Adele Peterson <adele@apple.com>
1565 Fix for <rdar://problem/5367919> A crash occurs at WebCore::Frame::isFrameSet() when attempting to print a iframe before it loads at http://www.monster.com/
1567 * WebView/WebHTMLView.mm: (-[WebHTMLView knowsPageRange:]): Nil check for frame.
1569 2007-07-30 Anders Carlsson <andersca@apple.com>
1573 <rdar://problem/5370710>
1574 REGRESSION: After switching from Bookmark view, the Find Banner won't appear while displaying a PDF file
1576 Implement hasHTMLView.
1578 * WebCoreSupport/WebFrameLoaderClient.h:
1579 * WebCoreSupport/WebFrameLoaderClient.mm:
1580 (WebFrameLoaderClient::hasHTMLView):
1582 2007-07-30 Justin Garcia <justin.garcia@apple.com>
1584 Reviewed by Tristan.
1586 <rdar://problem/5098931> Attachments are lost when they are moved into a ToDo after a delete
1588 Mail needs to be asked if it is OK to do the content movement that happens
1589 after a deleting in a situation like this one:
1590 <div contenteditable="plaintext-only">foo</div><div>^bar</div>
1591 so that they can prevent the move or so that they can save content that
1592 will be stripped by the move. This could have been done with shouldInsertNode
1593 and a new WebViewInsertAction for "moves", but WebKit clients like Mail and
1594 DashCode think that a shouldInsert* means that the user pasted something and
1595 perform actions only appropriate for pastes. This change is less risky because
1596 it won't require those clients to change their code.
1598 * DefaultDelegates/WebDefaultEditingDelegate.m:
1599 (-[WebDefaultEditingDelegate webView:shouldMoveRangeAfterDelete:replacingRange:]):
1600 * WebCoreSupport/WebEditorClient.h:
1601 * WebCoreSupport/WebEditorClient.mm:
1602 (WebEditorClient::shouldMoveRangeAfterDelete):
1603 * WebView/WebEditingDelegatePrivate.h:
1605 2007-07-29 Adele Peterson <adele@apple.com>
1609 WebKit part of fix for <rdar://problem/5102522> REGRESSION: Can't tab to webview that doesn't have editable content
1611 * WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Call new setInitialFocus method instead of advanceFocus.
1613 2007-07-27 Darin Adler <darin@apple.com>
1617 * WebKitPrefix.h: Removed the USING_WEBCORE_XXX definitions.
1618 * WebView/WebHTMLView.mm:
1619 (-[WebHTMLView delete:]): Fixed this to use WebCore again; I accidentally revived a dead
1620 code path that didn't work in the last patch!
1621 (-[WebHTMLView deleteToMark:]): Ditto.
1622 (-[WebHTMLView copy:]): Removed the unused side of the ifdef.
1623 (-[WebHTMLView cut:]): Ditto.
1624 (-[WebHTMLView paste:]): Ditto.
1626 2007-07-27 Darin Adler <darin@apple.com>
1628 Reviewed by Tim Hatcher and Oliver Hunt.
1630 - fix <rdar://problem/5355815> webView:doCommandBySelector: isn't getting called for copy:
1632 Added code so that webView:doCommandBySelector: is called for every command.
1634 * WebView/WebHTMLView.mm: Made 44 of the commands use the WEBCORE_COMMAND macro instead
1635 of being handwritten. For all the others, added invocation of COMMAND_PROLOGUE macro at
1636 the start of the command.
1637 (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]): Added.
1638 (-[WebHTMLView callWebCoreCommand:]): Added.
1639 (-[WebHTMLView delete:]): Removed unused code path -- easy to bring back some day, but
1640 we don't need it compiled in.
1641 (-[WebHTMLView deleteBackwardByDecomposingPreviousCharacter:]): Changed so this doesn't
1642 call deleteBackward: any more so we don't call the delegate two times.
1643 (-[WebHTMLView deleteToMark:]): Changed so this doesn't call delete: any more so we don't
1644 call the delegate two times.
1645 (-[WebHTMLView selectToMark:]): Changed so this doesn't call setMark: any more so we don't
1646 call the delegate two times.
1647 (-[WebHTMLView doCommandBySelector:]): Added code to set the private variable
1648 selectorForDoCommandBySelector. This allows callDelegateDoCommandBySelectorIfNeeded to
1649 detect that we've already called the delegate and avoids calling it twice.
1651 * WebView/WebHTMLViewInternal.h: Added the selectorForDoCommandBySelector field.
1653 2007-07-26 Alexey Proskuryakov <ap@webkit.org>
1657 http://bugs.webkit.org/show_bug.cgi?id=14733
1658 Add a logging channel for text input
1659 <rdar://problem/5364667>
1661 * Misc/WebKitLogging.h:
1662 * Misc/WebKitLogging.m:
1663 (WebKitInitializeLoggingChannelsIfNecessary):
1664 * WebView/WebHTMLView.mm:
1665 (-[WebHTMLView validAttributesForMarkedText]):
1666 (-[WebHTMLView textStorage]):
1667 (-[WebHTMLView characterIndexForPoint:]):
1668 (-[WebHTMLView firstRectForCharacterRange:]):
1669 (-[WebHTMLView selectedRange]):
1670 (-[WebHTMLView markedRange]):
1671 (-[WebHTMLView attributedSubstringFromRange:]):
1672 (-[WebHTMLView hasMarkedText]):
1673 (-[WebHTMLView unmarkText]):
1674 (-[WebHTMLView setMarkedText:selectedRange:]):
1675 (-[WebHTMLView doCommandBySelector:]):
1676 (-[WebHTMLView insertText:]):
1678 2007-07-26 Darin Adler <darin@apple.com>
1682 * Misc/WebTypesInternal.h: For use inside the library, use NSInteger and
1683 NSUInteger, just like on Leopard. WebNSInteger and WebNSUInteger are still
1684 present, but they are used in public and private headers only.
1686 * Carbon/CarbonWindowAdapter.m:
1687 * Carbon/CarbonWindowFrame.m:
1688 * DefaultDelegates/WebScriptDebugServer.m:
1689 * History/WebBackForwardList.mm:
1690 * Misc/WebDownload.m:
1691 * Misc/WebSearchableTextView.m:
1692 * Plugins/WebBaseNetscapePluginView.mm:
1693 * WebCoreSupport/WebFrameLoaderClient.mm:
1694 * WebView/WebHTMLView.mm:
1695 * WebView/WebPDFView.mm:
1696 * WebView/WebView.mm:
1697 * WebView/WebViewInternal.h:
1698 Update all implementation files and internal headers to use NSInteger and
1699 NSUInteger rather than WebNSInteger and WebNSUInteger.
1701 2007-07-26 John Sullivan <sullivan@apple.com>
1703 Reviewed by Kevin Decker
1705 - fixed <rdar://problem/5362989> Searching a pdf in some modes shows hilights for all instances
1706 of the word, even those not on the current page
1708 It turns out that there were three different issues here, all contributing to incorrect display
1709 of multiple matches for PDF pages in certain display modes. (1) in non-continuous display modes,
1710 we weren't updating the match rects when the displayed page is changed with page up/down (e.g.);
1711 (2) the mechanism to update the match rects on scrolling was busted except for the first scroll
1712 away from 0,0; (3) the PDFKit API returns selection bounds for non-displayed pages in non-continuous
1713 modes just as if they were the displayed pages. This patch fixes all three issues.
1715 * WebView/WebPDFView.h:
1716 made ivar name even longer
1718 * WebView/WebPDFView.mm:
1719 (-[WebPDFView setPDFDocument:]):
1720 updated for ivar name change
1721 (-[WebPDFView viewDidMoveToWindow]):
1722 observe page-change notifications as well as the others; this is necessary because in the
1723 non-continuous modes the view can be completely updated without any scrolling involved (problem 1)
1724 (-[WebPDFView viewWillMoveToWindow:]):
1725 stop observing page-change notifications
1726 (-[WebPDFView rectsForTextMatches]):
1727 skip any pages that aren't visible; this avoids treating matches on non-displayed non-continous
1728 modes as if they were on the displayed page (problem 3)
1729 (-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
1730 after checking whether scroll position has changed since we last checked it, remember the new
1731 one (d'oh!) (problem 2)
1733 (-[WebPDFView _scaleOrDisplayModeOrPageChanged:]):
1734 renamed to include page changes
1736 (-[WebPDFView _visiblePDFPages]):
1737 new method, returns the set of pages that are at least partly visible
1739 2007-07-24 Oliver Hunt <oliver@apple.com>
1741 Reviewed by Adam and Justin.
1743 <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
1745 editableDOMRangeForPoint:, moveDragCaretToPoint:, and removeDragCaret now call directly into
1746 WebCore without relying on bridge look up through the now removed _bridgeAtPoint:.
1748 * WebKit.xcodeproj/project.pbxproj:
1749 * WebView/WebView.mm:
1750 (-[WebView moveDragCaretToPoint:]):
1751 (-[WebView removeDragCaret]):
1752 (-[WebView editableDOMRangeForPoint:]):
1754 2007-07-24 Kevin Decker <kdecker@apple.com>
1758 <rdar://problem/4699455> REGRESSION (Safari 2->Safari 3): Adobe Reader 7.0.8 plug-in doesn't work
1760 * Plugins/WebNetscapePluginEmbeddedView.h: Added a #define that renames this class to "WebNetscapePluginDocumentView"
1761 This is necessary because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named "WebNetscapePluginDocumentView"
1762 and will not function correctly if it doesn't find a view in the hierarchy without the old class name.
1764 2007-07-24 Mark Rowe <mrowe@apple.com>
1768 <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot
1770 * WebCoreSupport/WebContextMenuClient.mm:
1771 (WebContextMenuClient::contextMenuItemSelected): Release platformItem as we were transferred its ownership by releasePlatformDescription.
1773 2007-07-23 Oliver Hunt <oliver@apple.com>
1777 We have to be able to support insertText: followed by doCommandBySelector: in
1778 order to support the 2- and 3-Set Korean and RuSwitcher IMs at least.
1780 * WebView/WebHTMLView.mm:
1781 (-[WebHTMLView insertText:]):
1783 2007-07-23 Alice Liu <alice.liu@apple.com>
1785 Reverting change 24535 now that a solution has been found that doesn't
1786 involve exposing an interface unnecessarily.
1788 * WebView/WebHTMLView.mm:
1789 * WebView/WebHTMLViewPrivate.h:
1791 2007-07-23 Alice Liu <alice.liu@apple.com>
1793 Reviewed by Oliver Hunt.
1795 Expose [WebHTMLView hasMarkedText] to
1796 fix <rdar://problem/4830074> autocomplete breaks Japanese typing
1798 * WebView/WebHTMLView.mm:
1799 * WebView/WebHTMLViewPrivate.h:
1801 2007-07-22 Darin Adler <darin@apple.com>
1803 * StringsNotToBeLocalized.txt: Updated for recent changes.
1805 2007-07-21 Adam Roben <aroben@apple.com>
1807 Fix REGRESSION: Right-click/control-click broken
1809 http://bugs.webkit.org/show_bug.cgi?id=14658
1810 <rdar://problem/5346830>
1814 * WebCoreSupport/WebContextMenuClient.mm:
1815 (fixMenusToSendToOldClients): Update defaultItemsCount after removing
1816 items from the defaultItems array.
1818 2007-07-20 Oliver Hunt <oliver@apple.com>
1822 <rdar://problem/5319438> REGRESSION: Cannot paste into an active inline input area (14522)
1823 http://bugs.webkit.org/show_bug.cgi?id=14522
1825 AppKit sends noop: to -[WebHTMLView doCommandBySelector:] when an IM does not handle event,
1826 we now check this as it is necessary to work around some IMs that do send messages
1827 (such as insertText: rather than unmarkText: to confirm a composition)
1829 * WebView/WebHTMLView.mm:
1830 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
1831 (-[WebHTMLView doCommandBySelector:]):
1832 * WebView/WebHTMLViewInternal.h:
1834 2007-07-20 Brady Eidson <beidson@apple.com>
1836 Reviewed by Adele and Andersca
1838 <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)
1840 * History/WebBackForwardList.mm:
1841 (-[WebBackForwardList init]): Have a default initializer that uses an empty BackFowardList not associated with a page.
1843 * WebView/WebFrame.mm:
1844 (kit): For clarity's sake, this should return nil, not 0
1846 2007-07-20 Justin Garcia <justin.garcia@apple.com>
1850 <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
1852 * WebCoreSupport/WebEditorClient.h:
1853 * WebCoreSupport/WebEditorClient.mm: Removed the method
1854 for enabling/disabling word selection on right click.
1855 * WebView/WebView.mm: Ditto.
1856 * WebView/WebViewPrivate.h: Removed the getter/setter entirely,
1857 it was in a private Category for Mail, but wasn't used by Mail
1858 on Tiger or Leopard, they apparently implement word selection on
1861 2007-07-20 Timothy Hatcher <timothy@apple.com>
1865 <rdar://problem/5199812> WebView needs to adopt viewWillDraw (moving off of _propagateDirtyRectsToOpaqueAncestors)
1866 <rdar://problem/5017301> REGRESSION: Scroller in Widget Manager splits down the middle while scrolling
1868 On Leopard _propagateDirtyRectsToOpaqueAncestors is no longer called by AppKit. Also marking new dirty rects
1869 underneath _recursiveDisplayRectIfNeededIgnoringOpacity will wait until the next runloop to draw them,
1870 causing rendering to happen in two steps instead of one as WebCore expected.
1872 * WebView/WebHTMLView.mm:
1873 (-[WebHTMLView _topHTMLView]): Move to the file internal category so we can use it in viewWillDraw.
1874 (-[WebHTMLView _isTopHTMLView]): Ditto.
1875 (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]): #ifdef for Tiger only.
1876 (-[WebHTMLView viewWillDraw]): Do a recursive layout if this is the top WebHTMLView.
1877 (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1878 Don't do layout here on Leopard since viewWillDraw handled it.
1879 (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]): Ditto.
1881 2007-07-20 Beth Dakin <bdakin@apple.com>
1883 Reviewed by Tim and Geoff.
1885 Fix for <rdar://problem/5346855> Mail crashes at
1886 WebCore::RenderTableSection:paint + 846 when attempting to display
1887 a HTML based message
1889 After reapplying styles, the RenderView needs layout. However,
1890 layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize used to
1891 return early if the WebHTMLView itself does not need layout.
1892 Because the WebHTMLView is not necessarily in synch with the
1893 RenderTree, returning early here can get us into a bad situation
1894 where we paint before laying out the Render Tree. This patch checks
1895 both the WebHTMLView and the bridge (which checks the RenderView,
1896 etc), so that we do not return early without laying out the Render
1899 Some day, we should phase out WebHTMLView keeping track of
1900 needsLayout at all. But that is a bit beyond the scope of this fix.
1902 * WebView/WebHTMLView.mm:
1903 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1905 2007-07-20 John Sullivan <sullivan@apple.com>
1907 Reviewed by Darin Adler and David Harrison
1909 - fixed <rdar://problem/5307075> REGRESSION: Bottom of some printed pages are truncated
1911 The "avoid orphan" code I added a year ago was causing the page to be imaged to a larger
1912 height (good), but not shrinking everything to compensate (bad). Bad one-year-ago me!
1914 * WebView/WebHTMLViewInternal.h:
1915 added avoidingPrintOrphan boolean
1917 * WebView/WebHTMLView.mm:
1918 (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
1919 clear _private->avoidingPrintOrphan when clearing _private->printing
1920 (-[WebHTMLView _scaleFactorForPrintOperation:]):
1921 take _private->avoidingPrintOrphan into account when computing the scale factor
1922 (-[WebHTMLView knowsPageRange:]):
1923 set _private->avoidingPrintOrphan when we're shrinking to avoid an orphan
1925 2007-07-19 Adam Roben <aroben@apple.com>
1927 Fix <rdar://problem/5344972> REGRESSION: A error dialog occurs when
1928 attempting to ctrl-click in a iChat message window (webview)
1932 * WebCoreSupport/WebContextMenuClient.mm:
1933 (fixMenusToSendToOldClients): Don't check for the Inspect Element item
1934 if we have fewer than 2 items.
1936 2007-07-18 Geoffrey Garen <ggaren@apple.com>
1938 Reviewed by Dave Hyatt.
1940 <rdar://problem/5345099>
1942 Reduced default WebCore cache size from 32 MB to 23 MB on systems below
1943 512 MB RAM. This improves RPRVT usage in the Safari pageout test by
1944 ~10% on a system with 384 MB RAM.
1946 At 23 MB, no extra resources are evicted from the cache during a PLT
1947 run, so this is a safe change PLT-wise. 23 MB is also seems to be a
1948 generous number in real world usage.
1950 * WebView/WebPreferences.m:
1951 (+[WebPreferences initialize]):
1953 2007-07-18 Anders Carlsson <andersca@apple.com>
1957 <rdar://problem/5341133> REGRESSION (Safari 2->Safari 3): DjVu plug-in doesn't load in Safari 3
1959 The DjVu plug-in uses the size of the passed in NPNetscapeFuncs struct to copy it over to a NPNetscapeFuncs struct
1960 whose size was determined when DjVu was compiled. This means that when we add extra functions to the vtable,
1961 DjVu will segfault copying it into the (too small) destination struct.
1963 Fix this by special-casing the DjVu plug-in and setting the NPNetscapeFuncs size to be the same size as what DjVu expects.
1965 * Plugins/WebNetscapePluginPackage.m:
1966 (-[WebNetscapePluginPackage _applyDjVuWorkaround]):
1967 (-[WebNetscapePluginPackage load]):
1969 2007-07-18 Timothy Hatcher <timothy@apple.com>
1973 <rdar://problem/5343767> Should have a way to disable the Web Inspector
1975 Adds a new DisableWebKitDeveloperExtras default that will force the Web Inspector to be disabled.
1976 This overrides the WebKitDeveloperExtras and IncludeDebugMenu default. It also disables
1977 the Web Inspector in Debug builds.
1979 * WebView/WebView.mm:
1980 (+[WebView _developerExtrasEnabled]): Check for the DisableWebKitDeveloperExtras default.
1981 (-[WebView _commonInitializationWithFrameName:groupName:]): Make a new WebInspectorClient when making the Page.
1983 2007-07-18 Anders Carlsson <andersca@apple.com>
1987 * Misc/WebNSAttributedStringExtras.mm:
1989 2007-07-18 Sam Weinig <sam@webkit.org>
1991 Rubber-stamped by Adam Roben.
1993 Update after renaming MimeTypeRegistry to MIMETypeRegistry.
1995 * Misc/WebNSPasteboardExtras.mm:
1996 (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
1997 * WebCoreSupport/WebFrameBridge.mm:
1998 (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
1999 * WebView/WebDataSource.mm:
2000 (-[WebDataSource _documentFragmentWithArchive:]):
2001 * WebView/WebHTMLRepresentation.mm:
2002 (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
2003 (+[WebHTMLRepresentation supportedImageMIMETypes]):
2004 * WebView/WebHTMLView.mm:
2005 (-[WebHTMLView _imageExistsAtPaths:]):
2007 2007-07-18 Tristan O'Tierney <tristan@apple.com>
2009 Reviewed by Maciej Stachowiak.
2011 <rdar://problem/5341334> Alt-clicking a link in Safari does not register original URL info with gatekeeper
2012 <rdar://problem/5342570> REGRESSION: A hang occurs when attempting to open a attached file from a .Mac web mail message
2014 * WebCoreSupport/WebFrameLoaderClient.h:
2015 Added a new method, setOriginalURLForDownload, for both download()
2016 and startDownload() to share.
2018 * WebCoreSupport/WebFrameLoaderClient.mm:
2019 (WebFrameLoaderClient::download):
2020 Moved all the gatekeeper code into setOriginalURLForDownload.
2022 (WebFrameLoaderClient::setOriginalURLForDownload):
2023 Same code that was in download() but moved into a single place for both
2024 startDownload and download to use. Also returned the boolean logic
2025 for detecting _wasUserGesture back to it's previous state, since my prior change
2026 was incorrect. Additionally I found a loop index bug with backListCount and fixed it.
2028 (WebFrameLoaderClient::startDownload):
2029 Calls out to setOriginalURLForDownload after a download is created.
2031 * WebView/WebView.mm:
2032 (-[WebView _downloadURL:]):
2033 Changed to return the WebDownload object created inside _downloadURL
2035 * WebView/WebViewInternal.h:
2036 Changed _downloadURL to return the WebDownload it creates.
2038 2007-07-17 Timothy Hatcher <timothy@apple.com>
2042 <rdar://problem/5336267> loadData:MIMEType:textEncodingName:baseURL: doesn't like relative URLs
2044 Get the absoluteURL from any user supplied NSURL before we pass it down to WebCore.
2046 * WebView/WebFrame.mm:
2047 (-[WebFrame _loadURL:referrer:intoChild:]):
2048 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
2049 * WebView/WebView.mm:
2050 (-[WebView userAgentForURL:]):
2052 2007-07-17 Adam Roben <aroben@apple.com>
2054 Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
2055 http://bugs.webkit.org/show_bug.cgi?id=14324
2057 Only clients linking against new versions of WebKit will see the item.
2058 I've maintained our behavior for old clients of not including the
2059 Inspect Element item in the menu items passed to the UI delegate.
2063 * Misc/WebKitVersionChecks.h: Added a new constant.
2064 * WebCoreSupport/WebContextMenuClient.mm:
2065 (isPreInspectElementTagClient): Added.
2066 (fixMenusToSendToOldClients): Return an array of items that should be
2067 appended to the menu received from the delegate.
2068 (fixMenusReceivedFromOldClients): Append the saved items to the array.
2069 (WebContextMenuClient::getCustomMenuFromDefaultItems): Retain/release
2072 2007-07-17 Adam Roben <aroben@apple.com>
2074 Remove WebContextMenuClient::shouldIncludeInspectElementItem
2078 * WebCoreSupport/WebContextMenuClient.h:
2079 * WebCoreSupport/WebContextMenuClient.mm:
2081 2007-07-17 Adam Roben <aroben@apple.com>
2083 Initialize Settings::developerExtrasEnabled
2087 * WebView/WebView.mm:
2088 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2090 2007-07-17 Geoffrey Garen <ggaren@apple.com>
2094 * WebView/WebFrame.mm:
2095 (-[WebFrame _loadURL:referrer:intoChild:]):
2096 * WebView/WebFramePrivate.h:
2098 2007-07-17 Tristan O'Tierney <tristan@apple.com>
2100 Reviewed by Maciej Stachowiak.
2102 <rdar://problem/5294691> Source of file is misrepresented if downloaded by typing in URL in Safari address bar
2104 * WebCoreSupport/WebFrameLoaderClient.h:
2105 * WebCoreSupport/WebFrameLoaderClient.mm:
2106 (WebFrameLoaderClient::download):
2107 Revised code to check the initial request's referrer before assuming it has a history to check.
2109 2007-07-16 Brady Eidson <beidson@apple.com>
2113 Begin the arduous task of localizing FTP directory listings while removing a global initializer!
2115 * English.lproj/Localizable.strings:
2116 * WebCoreSupport/WebViewFactory.mm:
2117 (-[WebViewFactory unknownFileSizeText]):
2119 2007-07-16 Adam Roben <aroben@apple.com>
2121 Move printing from WebFrameBridge to WebChromeClient
2125 * WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
2126 * WebCoreSupport/WebChromeClient.mm:
2127 (WebChromeClient::print): Moved code from WebFrameBridge.
2128 * WebCoreSupport/WebFrameBridge.mm: Removed -print.
2130 2007-07-16 Darin Adler <darin@apple.com>
2132 * StringsNotToBeLocalized.txt: Update for recent changes.
2134 2007-07-16 John Sullivan <sullivan@apple.com>
2136 Reviewed by Kevin Decker and Darin Adler
2138 - fixed <rdar://problem/5337529> Holes in Find banner overlay on PDF pages are left in wrong place after changing scale
2140 * WebView/WebPDFView.mm:
2141 (-[WebPDFView _scaleOrDisplayModeChanged:]):
2142 tell UI delegate that the entire PDF view has been redrawn
2144 2007-07-14 Brady Eidson <beidson@apple.com>
2146 Reviewed by Sam Weinig
2148 Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser
2150 * WebView/WebPreferenceKeysPrivate.h: Added preference keys for the FTP template location, as well as to force
2151 FTP directory listings, bypassing the policy delegate. This is necessary to test the new feature until browser
2152 policy delegate support is added.
2154 * WebView/WebPreferences.m:
2155 (-[WebPreferences _setFTPDirectoryTemplatePath:]):
2156 (-[WebPreferences _ftpDirectoryTemplatePath]):
2157 (-[WebPreferences _setForceFTPDirectoryListings:]):
2158 (-[WebPreferences _forceFTPDirectoryListings]):
2159 * WebView/WebPreferencesPrivate.h:
2160 * WebView/WebView.mm:
2161 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2163 2007-07-13 Anders Carlsson <andersca@apple.com>
2167 <rdar://problem/5290103> Assert failure when loading page with multipart resource
2169 Don't try to call the delegate method if the resource object doesn't exist in the
2170 identifier map. When a multipart resource has finished loading one part, it is removed from the
2171 web view identifier map.
2173 This is not an ideal fix, a better fix would be to special-case multipart resources and not remove
2174 them when the first part has finished loading. I've filed <rdar://problem/5335034> to track doing that.
2176 * WebCoreSupport/WebFrameLoaderClient.mm:
2177 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2178 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
2179 (WebFrameLoaderClient::dispatchDidReceiveResponse):
2180 (WebFrameLoaderClient::willCacheResponse):
2181 (WebFrameLoaderClient::dispatchDidReceiveContentLength):
2182 (WebFrameLoaderClient::dispatchDidFinishLoading):
2183 (WebFrameLoaderClient::dispatchDidFailLoading):
2185 2007-07-13 Timothy Hatcher <timothy@apple.com>
2187 Reviewed by Oliver Hunt.
2189 <rdar://problem/5333766> Can't include WebEditingDelegatePrivate.h
2191 * WebView/WebEditingDelegatePrivate.h: Changed the include to be a framework include,
2192 so other projects can use this header.
2194 2007-07-12 Anders Carlsson <andersca@apple.com>
2196 Reviewed by Darin and Maciej.
2198 <rdar://problem/5271096> panic after Safari stress test, caused by port leak
2200 Replace uses of -[NSObject performSelector:withObject:afterDelay:] with CFRunLoopTimer. performSelector
2201 causes the target (the WebHTMLView in this case) to be retained until the timer fires. Furthermore, when
2202 running the PLT or iBench, the timers will not fire until the main loop is entered (usually after running all tests).
2204 This means that the timers and ports will not be released until after the test has finished running.
2206 * WebView/WebHTMLView.mm:
2207 (-[WebHTMLViewPrivate dealloc]):
2208 (-[WebHTMLView _cancelUpdateMouseoverTimer]):
2209 (-[WebHTMLView _updateMouseoverWithFakeEvent]):
2210 (-[WebHTMLView _updateMouseoverTimerCallback:]):
2211 (-[WebHTMLView _frameOrBoundsChanged]):
2212 (-[WebHTMLView _updateActiveState]):
2213 (-[WebHTMLView _updateActiveStateTimerCallback:]):
2214 (-[WebHTMLView viewWillMoveToWindow:]):
2215 (-[WebHTMLView viewDidMoveToWindow]):
2216 (-[WebHTMLView mouseDown:]):
2217 (-[WebTextCompleteController dealloc]):
2218 * WebView/WebHTMLViewInternal.h:
2220 2007-07-13 Mark Rowe <mrowe@apple.com>
2224 Build fix. Stub out WebChromeClient::print.
2226 * WebCoreSupport/WebChromeClient.h:
2227 * WebCoreSupport/WebChromeClient.mm:
2228 (WebChromeClient::print):
2230 2007-07-11 Timothy Hatcher <timothy@apple.com>
2234 <rdar://problem/5108789> WEBVIEW: Drawing artifacts when dragging in IB
2236 Interface Builder 3 is relying on KVO notifications for frameOrigin and frameSize,
2237 among other standard NSView keys. Change automaticallyNotifiesObserversForKey to
2238 return NO only for keys WebView manually fires notifications for.
2240 * WebView/WebView.mm:
2241 (+[WebView automaticallyNotifiesObserversForKey:]): Selectivly return NO for keys we manually fire.
2242 (-[WebView _declaredKeys]): Code clean up.
2244 2007-07-10 Antti Koivisto <antti@apple.com>
2248 Fix <rdar://problem/4570550>
2249 Hang in layout/layoutBlock/layoutBlockChildren preparing to print certain Mail messages
2251 When printing from Mail, WebHTMLView is a subview of the view that is actually printed and does not
2252 receive calls that would set it to printing mode. Method adjustPageHeightNew is called repeatedly (for each page) during
2253 printing and it enables printing mode temporarily for each call. This triggers two full style recalcs and layouts
2254 each time making printing at least O(n^2).
2256 Instead of enabling printing mode and resetting it back immediatly do the resetting asynchronously, after
2257 all adjustPageHeightNew calls are done. Normal Safari printing is not affected as adjustPageHeightNew is only
2258 called in case WebHTMLView is embedded in the view that is being printed.
2260 No automatic test possible, requires printing and non-Safari client.
2262 * WebView/WebHTMLView.mm:
2263 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
2265 2007-07-10 Geoffrey Garen <ggaren@apple.com>
2267 Reviewed by Maciej Stachowiak.
2269 - Fixed <rdar://problem/5049509> REGRESSION(10.4.9-9A377a): REAP Suite
2270 installer shows empty modal alert window (hangs) if user cancels during
2271 "installing shared components" phase
2273 Added Adobe installers to the family of apps that need a data load
2276 Added a linked-on-or-after check because this code is no longer
2279 I tested this code on Tiger and Leopard.
2281 * Misc/WebKitVersionChecks.h:
2282 * WebKit.xcodeproj/project.pbxproj:
2283 * WebView/WebDocumentLoaderMac.mm:
2284 (needsDataLoadWorkaround):
2285 (WebDocumentLoaderMac::setDataSource):
2287 2007-07-10 Darin Adler <darin@apple.com>
2291 * WebView/WebHTMLView.mm: Add include of ContextMenu.h.
2293 2007-07-10 Darin Adler <darin@apple.com>
2295 Reviewed by John Sullivan.
2297 - <rdar://problem/5321953> remove workaround for fixed AppKit mouse moved bug
2299 * WebView/WebHTMLView.mm: Put the workaround for bug 3429631 inside an
2300 ifdef BUILDING_ON_TIGER.
2302 2007-07-09 Anders Carlsson <andersca@apple.com>
2306 <rdar://problem/4954319>
2307 Acrobat 7 / Safari crash: CrashTracer: 99 crashes in Safari at
2308 com.apple.WebCore: WebCore::NetscapePlugInStreamLoader::isDone const + 0
2310 Add a new initWithFrameLoader: method to WebNetscapePluginStream which is to be used when
2311 the stream is a "fake" stream for full frame plug-ins.
2313 * Plugins/WebBaseNetscapePluginView.mm:
2314 (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
2315 * Plugins/WebNetscapePluginStream.h:
2316 * Plugins/WebNetscapePluginStream.mm:
2317 (-[WebNetscapePluginStream initWithFrameLoader:]):
2318 (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
2319 (-[WebNetscapePluginStream start]):
2320 (-[WebNetscapePluginStream cancelLoadWithError:]):
2321 (-[WebNetscapePluginStream stop]):
2322 * WebCoreSupport/WebFrameLoaderClient.mm:
2323 (WebFrameLoaderClient::createFrame):
2325 2007-07-09 John Sullivan <sullivan@apple.com>
2329 - fixed <rdar://problem/5320208> WebKit should prevent Time Machine from backing up WebKit clients' icon databases
2331 * Misc/WebIconDatabase.mm:
2332 (-[WebIconDatabase init]):
2333 Re-added the code to exclude the icon database from backups. We now do this at the same time we (try to) import
2334 the old icon database format, which happens only once per icon database's lifetime.
2335 (-[WebIconDatabase _importToWebCoreFormat]):
2336 Assert that we haven't imported yet rather than bailing out. It's now the caller's responsibility to check
2337 whether we've imported yet.
2339 2007-07-08 John Sullivan <sullivan@apple.com>
2341 * Misc/WebIconDatabase.mm:
2342 (-[WebIconDatabase init]):
2343 Removed the code to exclude the icon database from backups. We still want to do this, but in a way
2344 that only runs once ever, instead of once per launch, due to performance concerns.
2346 2007-07-07 Darin Adler <darin@apple.com>
2350 - fix <rdar://problem/5124665> WebCore secondary-thread assertion should use linked-on-or-after check instead of building on Tiger check
2352 * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS.
2354 * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): In first-time initialization block,
2355 check for binaries linked against older versions of WebKit, and set the default thread violation
2356 behavior to LogOnFirstThreadViolation.
2358 * WebView/WebView.mm: (+[WebView initialize]): Improved comments.
2360 2007-07-06 Oliver Hunt <oliver@apple.com>
2364 <rdar://problem/5318756> Need to refactor IM/Marked text code to share logic with windows.
2366 Moved a number of methods from WebHTMLView into WebCore.
2367 Replaced bridge methods with calls directly into WebCore objects.
2369 * WebKit.xcodeproj/project.pbxproj:
2370 * WebView/WebHTMLView.mm:
2371 (-[WebHTMLView setMarkedText:selectedRange:]):
2372 Now calls WebCore object methods directly, rather than calling
2375 2007-07-06 John Sullivan <sullivan@apple.com>
2379 - WebKit part of fix for:
2380 <rdar://problem/5310739> Time Machine shouldn't back up WebKit's icon database files
2382 * Misc/WebIconDatabase.mm:
2383 (-[WebIconDatabase init]):
2384 Use CSBackupSetItemExcluded to tell Time Machine not to back up the icon database file
2386 2007-07-07 Mark Rowe <mrowe@apple.com>
2388 Build fix. Update WebDynamicScrollBarsView.h to include methods added and used in r24060.
2390 * WebView/WebDynamicScrollBarsView.h:
2392 2007-07-05 Timothy Hatcher <timothy@apple.com>
2396 <rdar://problem/5236277> REGRESSION-9A458: SPI for setting scroll bar behavior doesn't work
2398 Calling setHorizontalScrollingMode: calls updateScrollers before returning, this will cause
2399 WebCore to reset the scrolling mode based on the CSS overflow rules. So the setAlwaysShowHorizontalScroller:
2400 and setAlwaysShowVerticalScroller: methods needed a way to lock the scrolling mode before
2401 calling updateScrollers.
2403 * WebView/WebDynamicScrollBarsView.m:
2404 (-[WebDynamicScrollBarsView updateScrollers]):
2405 (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
2406 (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]):
2407 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
2408 (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]):
2409 (-[WebDynamicScrollBarsView setScrollingMode:]):
2410 (-[WebDynamicScrollBarsView setScrollingMode:andLock:]):
2411 * WebView/WebView.mm:
2412 (-[WebView setAlwaysShowVerticalScroller:]):
2413 (-[WebView setAlwaysShowHorizontalScroller:]):
2415 2007-07-06 Mitz Pettel <mitz@webkit.org>
2419 - fix http://bugs.webkit.org/show_bug.cgi?id=10267
2420 Can't scroll page downwards with scroll wheel, when pointer is on top of non-scrolling iframe
2422 * WebView/WebDynamicScrollBarsView.m:
2423 (-[WebDynamicScrollBarsView scrollWheel:]): Override the superclass
2424 implementation to forward the wheel event to the next responder if this view
2425 does not allow scrolling in the event's direction.
2427 2007-07-05 John Sullivan <sullivan@apple.com>
2431 - WebKit part of fix for <rdar://problem/5315033>
2433 * WebView/WebDocumentPrivate.h:
2434 new selectionImageForcingBlackText: method. selectionImageForcingWhiteText: is no longer used and was never
2435 in an official release of WebKit, so it could be removed, except that doing so would cause trouble for people
2436 using nightly WebKit with Safari 3.0 beta. So I left it in, but made it just force black text instead of
2437 white text, which will look different for those nightly WebKit/Safari 3.0 beta people but not break anything.
2439 * Misc/WebSearchableTextView.m:
2440 (-[WebSearchableTextView selectionImageForcingBlackText:]):
2441 new unimplemented protocol method for this obsolete class
2443 * WebView/WebHTMLView.mm:
2444 (-[WebHTMLView selectionImageForcingBlackText:]):
2445 calls through to WebCore the way selectionImageForcingWhiteText: used to
2446 (-[WebHTMLView selectionImageForcingWhiteText:]):
2447 now just calls selectionImageForcingBlackText:, thus not working as you would expect from the name
2449 * WebView/WebPDFView.mm:
2450 (-[WebPDFView selectionImageForcingBlackText:]):
2451 guts of old selectionImageForcingWhiteText:, but with black substituted for white
2452 (-[WebPDFView selectionImageForcingWhiteText:]):
2453 now just calls selectionImageForcingBlackText:, thus not working as you would expect from the name
2455 2007-07-05 Timothy Hatcher <timothy@apple.com>
2459 <rdar://problem/5314993> Shiira 2.1 throws an exception open a new window: -[WebInspector window]: unrecognized selector
2461 Add an empty implementation of this method to prevent Shiira from throwing an exception.
2462 Also log that this method is obsolete and the class will be removed.
2464 * WebInspector/WebInspector.mm:
2465 (-[WebInspector window]):
2467 2007-07-04 Adam Roben <aroben@apple.com>
2469 Move tooltip logic down into WebCore so that it can be shared cross-platform
2473 * WebCoreSupport/WebChromeClient.h:
2474 * WebCoreSupport/WebChromeClient.mm:
2475 (WebChromeClient::setToolTip): Added.
2476 * WebView/WebHTMLView.mm: Removed _resetCachedWebPreferences.
2477 (-[WebHTMLView _updateMouseoverWithEvent:]): Removed tooltip code.
2478 (-[WebHTMLView initWithFrame:]): Removed call to
2479 _resetCachedWebPreferences.
2480 (-[WebHTMLView setDataSource:]): Ditto.
2481 * WebView/WebHTMLViewInternal.h: Removed showsURLsInToolTips ivar.
2482 * WebView/WebHTMLViewPrivate.h: Added declaration for _setTooltip so
2483 that WebChromeClient can call it.
2485 2007-07-04 Adam Roben <aroben@apple.com>
2487 Initialize Settings::showsURLsInToolTips
2491 * WebView/WebView.mm:
2492 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2494 2007-07-04 Adam Roben <aroben@apple.com>
2496 Removed call to mouseDidMoveOverElement now that WebCore handles it
2500 * WebView/WebHTMLView.mm:
2501 (-[WebHTMLView _updateMouseoverWithEvent:]):
2503 2007-07-04 Adam Roben <aroben@apple.com>
2505 Add WebChromeClient::mouseDidMoveOverElement
2507 This is not called yet.
2511 * WebCoreSupport/WebChromeClient.h:
2512 * WebCoreSupport/WebChromeClient.mm:
2514 2007-07-03 Darin Adler <darin@apple.com>
2516 * StringsNotToBeLocalized.txt: Updated for recent changes.
2518 2007-07-03 Timothy Hatcher <timothy@apple.com>
2522 Remove HIWebView in 64-bit.
2524 Also disable a few calls that are now gone in 64-bit and filed these bugs:
2526 <rdar://problem/5311653> WebKit needs to adopt HIGetMousePosition where we used GetGlobalMouse before
2527 <rdar://problem/5311648> WebKit needs to move off of CopyEvent in WebBaseNetscapePluginView
2528 <rdar://problem/5311640> WebKit needs a new solution for HISearchWindowShow on 64-bit
2530 * Carbon/CarbonUtils.m:
2531 * Carbon/CarbonWindowAdapter.m:
2532 * Carbon/CarbonWindowContentView.m:
2533 * Carbon/CarbonWindowFrame.m:
2534 * Carbon/HIViewAdapter.m:
2535 (SetViewNeedsDisplay):
2536 * Carbon/HIWebView.m:
2539 * Configurations/WebKit.xcconfig:
2540 * Plugins/WebBaseNetscapePluginView.mm:
2541 (+[WebBaseNetscapePluginView getCarbonEvent:]):
2543 * WebKit.LP64.exp: Added.
2544 * WebView/WebView.mm:
2545 (-[WebView _searchWithSpotlightFromMenu:]):
2547 2007-07-03 Adam Roben <aroben@apple.com>
2549 Merge the Windows and Mac localized strings and exceptions files
2551 Reviewed by Darin and Anders.
2553 * English.lproj/Localizable.strings: Added Windows strings.
2554 * StringsNotToBeLocalized.txt: Renamed from WebKit/English.lproj/StringsNotToBeLocalized.txt.
2556 2007-07-03 Adele Peterson <adele@apple.com>
2558 Removed printf I accidently left in.
2560 * Misc/WebNSURLExtras.m: (mapHostNames):
2562 2007-07-03 Adele Peterson <adele@apple.com>
2566 Fix for: <rdar://problem/5292988> domain names shouldn't contain ignorable characters
2568 * Misc/WebNSURLExtras.m:
2569 (isLookalikeCharacter): Renamed. Also excludes any non-printable character,
2570 any character considered as whitespace that isn't already converted to a space by ICU, any ignorable character,
2571 and any character excluded in Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
2572 (allCharactersInIDNScriptWhiteList):
2574 2007-07-03 Darin Adler <darin@apple.com>
2578 - fix <rdar://problem/5310848> WebDataSource lifetime problem -- may be cause of the leaks seen on the buildbot
2580 * WebView/WebDataSource.mm:
2581 (-[WebDataSourcePrivate dealloc]): Added a call to the new detachDataSource function.
2582 (-[WebDataSourcePrivate finalize]): Ditto.
2584 * WebView/WebDocumentLoaderMac.h: Added detachDataSource function to be used when the
2585 WebDataSource is deallocated. Added retain/releaseDataSource helper functions to be
2586 used to retain and release the data source object. Replaced the m_hasEverBeenDetached
2587 boolean with a more primitive and hence easier to understand m_isDataSourceRetained boolean.
2589 * WebView/WebDocumentLoaderMac.mm:
2590 (WebDocumentLoaderMac::WebDocumentLoaderMac): Initialize m_isDataSourceRetained to false.
2591 (WebDocumentLoaderMac::setDataSource): Call retainDataSource instead of calling HardRetain
2592 on the dataSource parameter. Also updated a comment.
2593 (WebDocumentLoaderMac::attachToFrame): Call retainDataSource unconditionally rather than
2594 trying to use m_hasEverBeenDetached to decide if a retain is needed. Also got rid of an
2595 assertion that m_loadingResources is empty -- not important any more.
2596 (WebDocumentLoaderMac::detachFromFrame): Call releaseDataSource instead of using
2597 HardRelease, but only if m_loadingResources is empty. If it's non-empty, then we'll
2598 do the releaseDataSource later in decreaseLoadCount.
2599 (WebDocumentLoaderMac::increaseLoadCount): Call retainDataSource unconditionally
2600 rather than calling HardRetain only if the old set of resources was empty.
2601 (WebDocumentLoaderMac::decreaseLoadCount): Call releaseDataSource if m_loadingResources
2602 is empty and we're not attached to a frame. If we are attached to a frame, then
2603 we'll do the releaseDataSource later in detachFromFrame.
2604 (WebDocumentLoaderMac::retainDataSource): Added. Calls CFRetain, but only if the data
2605 source is not already retained (according to the boolean).
2606 (WebDocumentLoaderMac::releaseDataSource): Added. Calls CFRelease, but only if the data
2607 source is currently retained (according to the boolean).
2608 (WebDocumentLoaderMac::detachDataSource): Added. Sets m_dataSource to nil. Since this
2609 is only called from WebDataSource's dealloc and finalize methods, it won't ever be called
2610 when the m_isDataSourceRetained boolean is true.
2612 2007-07-03 Darin Adler <darin@apple.com>
2614 - forgot to check in one file in the fix for <rdar://problem/5307880>
2615 some classes need finalize methods because of non-trivial work done in dealloc methods
2617 * WebView/WebView.mm: (-[WebViewPrivate finalize]): Delete identifierMap so it doesn't leak.
2619 2007-07-03 Anders Carlsson <andersca@apple.com>
2623 * WebView/WebView.mm:
2624 (-[WebView stringByEvaluatingJavaScriptFromString:]):
2625 ASSERT that the value returned isn't nil. It can't be nil when invoked on the main frame.
2627 2007-07-04 Mark Rowe <mrowe@apple.com>
2629 Unreviewed 64-bit build fixes.
2631 * WebCoreSupport/WebInspectorClient.mm: Let the compiler know that WebFrameView is a subclass of NSView.
2632 * WebView/WebDocumentInternal.h: Remove our preprocessor macro once we're done with it.
2633 * WebView/WebHTMLView.mm:
2634 (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Fix argument types.
2636 2007-07-02 Darin Adler <darin@apple.com>
2638 Reviewed by Kevin Decker and Tim Hatcher.
2640 - fix <rdar://problem/5307880> some classes need finalize methods
2641 because of non-trivial work done in dealloc methods
2643 * DefaultDelegates/WebScriptDebugServer.m:
2644 (-[WebScriptDebugServer dealloc]): Added a comment about how this probably won't
2646 * WebInspector/WebNodeHighlight.m:
2647 (-[WebNodeHighlight dealloc]): Ditto.
2649 * WebView/WebDataSource.mm:
2650 (+[WebDataSourcePrivate initialize]): Added. Makes finalize run on main thread.
2651 (-[WebDataSourcePrivate finalize]): Added. Calls deref on the document loader.
2652 * WebView/WebHTMLView.mm:
2653 (+[WebHTMLViewPrivate initialize]): Added. Makes finalize run on main thread.
2654 (-[WebHTMLViewPrivate finalize]): Added. Calls deref on promisedDragTIFFDataSource.
2656 * WebKit.xcodeproj/project.pbxproj: Let Xcode be Xcode.
2658 2007-07-02 Oliver Hunt <oliver@apple.com>
2663 <rdar://problem/5290113> WebKit does not correctly handle replacement ranges from the IM in -[WebHTMLView insertText:]
2664 http://bugs.webkit.org/show_bug.cgi?id=13664
2666 We replicate the logic of -[WebHTMLView setMarkedText:selectedRange:] to handle the Input Method
2667 feeding us a replacement string through insertText: so we can handle IMs that use insertText to
2670 * WebView/WebHTMLView.mm:
2671 (-[WebHTMLView insertText:]):
2673 2007-07-01 Oliver Hunt <oliver@apple.com>
2677 Fix for <rdar://problem/5306210> Some events are still passed to WebCore despite being handled by the IM
2678 http://bugs.webkit.org/show_bug.cgi?id=14457
2680 We have to assume that the IM will consume all events, so we remove the dependency
2681 on -[WebHTMLView hasMarkedText].
2683 * WebView/WebHTMLView.mm:
2684 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
2686 2007-06-29 John Sullivan <sullivan@apple.com>
2688 Reviewed by Oliver Hunt.
2690 - WebKit support for accessing the set of rectangles that encompass the selected text
2692 * WebView/WebDocumentPrivate.h:
2693 added -selectionTextRects to WebDocumentSelection protocol; tweaked comments
2695 * WebView/WebHTMLView.mm:
2696 (-[WebHTMLView _selectionDraggingRect]):
2697 use selectionRect instead of selectionImageRect since they're the same and maybe we can get
2698 rid of selectionImageRect someday
2699 (-[WebHTMLView selectionTextRects]):
2700 added implementation of new protocol method, which calls through to WebCore
2702 * WebView/WebPDFView.mm:
2703 (-[WebPDFView selectionTextRects]):
2704 added simple implementation of new protocol method, which just returns the single selection rect.
2705 PDFKit doesn't support obtaining multiple rects to describe a multi-line selection.
2706 (-[WebPDFView selectionImageForcingWhiteText:]):
2707 use selectionRect instead of selectionImageRect since they're the same and maybe we can get
2708 rid of selectionImageRect someday
2710 * Misc/WebSearchableTextView.m:
2711 (-[WebSearchableTextView selectionTextRects]):
2712 added no-op implementation of new protocol method to this obsolete class
2714 2007-06-28 Timothy Hatcher <timothy@apple.com>
2718 <rdar://problem/5287569> WEBVIEW: Creating a webview in IB 3.0 (v2.0) NIB later crashes Interface Builder 2.5.4 on Tiger
2720 Prevent encoding any of the WebView subviews. The subviews are ignored by -[WebView initWithCoder:] and will be recreated.
2721 The Tiger 2.0 code crashed when the WebView released the subviews in initWithCoder:, so now there are no subviews to release.
2722 This never happened before because the Tiger 2.0 code and IB wouldn't encode a WebView that has a WebHTMLView.
2724 * WebView/WebView.mm:
2725 (-[WebView encodeWithCoder:]):
2727 2007-06-26 John Sullivan <sullivan@apple.com>
2731 - WebKit support for displaying multiple text matches in PDF views (<rdar://problem/4601967>)
2733 * WebView/WebPDFView.h:
2734 new ivars textMatches and lastScrollPosition; now conforms to WebMultipleTextMatches protocol
2736 * WebView/WebPDFView.mm:
2737 (-[WebPDFView dealloc]):
2739 (-[WebPDFView viewDidMoveToWindow]):
2740 start observing bounds changes in the PDF document's enclosing clip view, so we can notice when
2741 scrolling takes place
2742 (-[WebPDFView viewWillMoveToWindow:]):
2743 stop observing bounds changes in the PDF document's enclosing clip view
2744 (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
2745 most of the code here has been moved into the new method _nextMatchFor::::, which this now calls
2746 (-[WebPDFView setMarkedTextMatchesAreHighlighted:]):
2747 implementation of WebMultipleTextMatches protocol method, does nothing useful here because we don't
2748 support inline highlighting of matches in PDF documents
2749 (-[WebPDFView markedTextMatchesAreHighlighted]):
2750 implementation of WebMultipleTextMatches protocol method
2751 (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
2752 implementation of WebMultipleTextMatches protocol method; calls _nextMatchFor:::: in a loop until
2753 entire document is searched or limit is hit; records results by saving PDFSelections in textMatches ivar
2754 (-[WebPDFView unmarkAllTextMatches]):
2755 implementation of WebMultipleTextMatches protocol method; clears saved textMatches
2756 (-[WebPDFView rectsForTextMatches]):
2757 implementation of WebMultipleTextMatches protocol method; converts saved PDFSelections into NSValue
2758 objects that represent NSRects
2759 (-[WebPDFView _clipViewForPDFDocumentView]):
2760 new helper method to find the clip view whose bounds determine the current scroll position
2761 (-[WebPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]):
2762 new helper method, extracted from searchFor:::::
2763 (-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
2764 new notification callback; tells webView's delegate when document has scrolled
2765 (-[WebPDFView _setTextMatches:]):
2766 new helper method, stores value in ivar
2768 2007-06-26 Oliver Hunt <oliver@apple.com>
2772 Hopefully fix remainder of the IME issues on Mac.
2773 We now assume that the IME silently consumes any event given
2774 to it during text composition, and only override this assumption
2775 if the NSTextInput or NSResponder callbacks are made.
2777 This prevents us from treating those events that the IME has
2778 consumed internally (eg. candidate window navigation) as unhandled
2779 events that should be bubbled.
2782 <rdar://problem/5107538> Major problems handling key press event with non-english Input Methods
2783 <rdar://problem/4196249> REGRESSION: Mail: Inputting space (U+0020) with IM deletes subsequent line breaks on Mail.app
2784 <rdar://problem/5015544> REGRESSION: Reverse conversion keyboard command does not work in Safari.
2785 <rdar://problem/5045121> REGRESSION: Inline is confirmed after press left/right arrow keys, happens in Mail but not in TextEdit.
2786 <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
2787 <rdar://problem/5085781> REGRESSION: Active input area lost "selected" highlight
2788 <rdar://problem/5094200> space key pressed to close the associated words candidate window gets inserted as text
2789 <rdar://problem/5228294> Candidate item for character matrix is sometimes skipped
2791 * WebKit.xcodeproj/project.pbxproj:
2792 * WebView/WebHTMLView.mm:
2793 (-[WebHTMLView launchKeyEvent:]):
2794 (-[WebHTMLView keyDown:]):
2795 (-[WebHTMLView keyUp:]):
2796 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
2797 (-[WebHTMLView unmarkText]):
2798 (-[WebHTMLView setMarkedText:selectedRange:]):
2799 (-[WebHTMLView doCommandBySelector:]):
2800 (-[WebHTMLView insertText:]):
2802 2007-06-26 Jim Correia <jim.correia@pobox.com>
2806 Fix http://bugs.webkit.org/show_bug.cgi?id=14411
2807 Bug 14411: WebNetscapePluginPackage overagressively sets CurApRefNum, which affects shipping versions of BBEdit.
2808 <rdar://problem/5297268>
2810 * Plugins/WebNetscapePluginPackage.m:
2811 (+[WebNetscapePluginPackage initialize]): Force the Resource Manager to
2812 lazy initialize, and only set CurApRefNum to the system file if
2813 CurApRefNum is still -1 after that forced lazy initialization.
2815 2007-06-25 Kevin Decker <kdecker@apple.com>
2819 <rdar://problem/5294036> -[WebView customTextEncodingName] API may return empty string instead of nil
2821 * WebView/WebView.mm:
2822 (-[WebView _mainFrameOverrideEncoding]): Addded the nsStringNilIfEmpty() inline to the data being returned because
2823 our API says "The custom text encoding name or nil if no custom text encoding name has been set." I also verified
2824 the standing Tiger WebKit behavior for this method and it does indeed return nil if a custom encoding wasn't set.
2826 2007-06-25 John Sullivan <sullivan@apple.com>
2830 - WebKit part of <rdar://problem/5293820>, needed to support multiple matches in PDFs
2832 * WebView/WebDocumentInternal.h:
2833 Added WebMultipleTextMatches protocol, containing five methods that were formerly implemented in WebHTMLView
2834 * WebView/WebHTMLViewPrivate.h:
2835 Removed declarations for the methods that are now in WebMultipleTextMatches protocol
2837 * WebView/WebHTMLView.mm:
2838 (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
2839 moved this method into the WebDocumentInternalProtocols portion of the file
2840 (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
2842 (-[WebHTMLView markedTextMatchesAreHighlighted]):
2844 (-[WebHTMLView unmarkAllTextMatches]):
2846 (-[WebHTMLView rectsForTextMatches]):
2849 * WebView/WebView.mm:
2850 (-[WebView canMarkAllTextMatches]):
2851 new method, returns YES only if the documentView of every frame implements WebMultipleTextMatches
2852 (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
2853 check for WebMultipleTextMatches protocol instead of checking for WebHTMLView class
2854 (-[WebView unmarkAllTextMatches]):
2856 (-[WebView rectsForTextMatches]):
2859 * WebView/WebViewPrivate.h:
2860 declared new method canMarkAllTextMatches
2862 2007-06-25 John Sullivan <sullivan@apple.com>
2866 Fixed <rdar://problem/5292259> Find on Page doesn't work (throws exception) on page that includes PDF in a subframe
2868 * WebView/WebView.mm:
2869 (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
2870 We were testing whether the view was an HTMLView, but then running code that assumed it was an HTMLView outside of
2871 that test. That's a bad idea.
2873 2007-06-22 Adele Peterson <adele@apple.com>
2875 Reviewed by Geoff and Darin.
2877 Fix for: <rdar://problem/5239236> Other slash characters should not be permitted as part of a domain name
2879 * Misc/WebNSURLExtras.m:
2880 (isSlashOrPeriodLookalike):
2881 (allCharactersInIDNScriptWhiteList):
2883 2007-06-21 Sam Weinig <sam@webkit.org>
2887 Remove empty directories
2889 * WebInspector/webInspector: directory removed.
2890 * WebInspector/webInspector/Images: directory removed
2892 2007-06-21 Justin Garcia <justin.garcia@apple.com>
2896 <rdar://problem/5237524>
2897 REGRESSION: Keyboard commands don't work in a message window until you click inside the message
2899 When you open a message in its own window, Mail creates an empty
2900 WebView, makes that WebView firstResponder and then sets off a
2901 load inside that WebView.
2903 When we're asked to create the empty WebView, we put an empty
2904 WebHTMLView inside it (in r21367 we began creating a document
2905 for empty frames). When Mail makes the WebView first responder
2906 we make that empty WebHTMLView firstResponder. Then when the
2907 load finishes we create a new WebHTMLView and set it as the
2910 Inside _setDocumentView, if the old document view or one of its
2911 descendants was the first responder, we'd makeFirstResponder:nil
2912 so that the window wouldn't be left with a firstResponder that
2913 was no longer inside of it. This change fixes the bug by instead
2914 transferring firstResponder status to the new document view.
2916 We could also fix this by not allowing the WebHTMLView to become
2917 firstResponder when it's in the provisional state mentioned above.
2919 * WebView/WebFrameView.mm:
2920 (-[WebFrameView _setDocumentView:]):
2922 2007-06-21 John Sullivan <sullivan@apple.com>
2926 - fixed <rdar://problem/5268673> REGRESSION: Context menu missing for PDF in frame when there's no selection
2928 This was surprisingly interesting. It turns out that at least for Safari, the method [WebDefaultUIDelegate
2929 webView:contextMenuItemsForElement:defaultMenuItems:] is only exercised from WebPDFView these days. It mimics
2930 some of the code that was moved to WebCore as part of the Great Context Menu Refactoring of 2006, but is
2931 independent of that code. And it was partly broken/incomplete, probably as a result of said refactoring.
2933 * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
2934 (localizedMenuTitleFromAppKit()):
2935 deleted this function since I removed all callers
2936 (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
2937 Handle WebMenuItemTagOpenFrameInNewWindow tag, since code later in this file was relying on it. Added
2938 ASSERT_NOT_REACHED to the default case, since returning nil from this method is bad.
2939 Also, use WebKit versions of menu title strings rather than AppKit versions. We added these strings to WebKit
2940 a while back so we don't need to sneakily find them in AppKit anymore.
2941 (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
2942 make the WebView be the target of the Open Frame in New Window item; previously it was self, but that was
2943 just silly (probably a leftover from some code shuffling when context menus were reimplemented)
2945 * WebView/WebView.mm:
2946 (-[WebView _openFrameInNewWindowFromMenu:]):
2947 new method, used by Open Frame in New Window menu item.
2949 * WebView/WebViewInternal.h:
2950 Declare new method used by menu item. This isn't necessary for compilation, but could prevent the accidental
2951 deletion of the method implementation.
2953 2007-06-20 Mark Rowe <mrowe@apple.com>
2957 Fix http://bugs.webkit.org/show_bug.cgi?id=14255.
2958 Bug 14255: Reproducible crash opening web inspector from debug menu
2960 Reinstate the WebInspector class so WebKit clients that currently depend on it
2961 will build and run correctly.
2963 * WebInspector/WebInspector.h: Added.
2964 * WebInspector/WebInspector.mm: Added.
2965 (+[WebInspector webInspector]):
2966 (-[WebInspector dealloc]):
2967 (-[WebInspector setWebFrame:]):
2968 (-[WebInspector showWindow:]):
2970 * WebKit.xcodeproj/project.pbxproj:
2972 2007-06-20 Adam Roben <aroben@apple.com>
2974 Land the new Inspector.
2976 Co-written with Tim Hatcher.
2978 Reviewed by Anders, Adele, Hyatt, and Sam.
2980 Implement the InspectorClient interface.
2982 * WebCoreSupport/WebInspectorClient.h: Added.
2983 * WebCoreSupport/WebInspectorClient.mm: Added.
2984 (WebInspectorClient::WebInspectorClient):
2985 (WebInspectorClient::inspectorDestroyed):
2986 (WebInspectorClient::createPage):
2987 (WebInspectorClient::showWindow):
2988 (WebInspectorClient::closeWindow):
2989 (WebInspectorClient::attachWindow):
2990 (WebInspectorClient::detachWindow):
2991 (WebInspectorClient::highlight):
2992 (WebInspectorClient::hideHighlight):
2993 (WebInspectorClient::inspectedURLChanged):
2994 (WebInspectorClient::updateWindowTitle):
2995 (-[WebInspectorWindowController init]):
2996 (-[WebInspectorWindowController initWithInspectedWebView:]):
2997 (-[WebInspectorWindowController dealloc]):
2998 (-[WebInspectorWindowController inspectorVisible]):
2999 (-[WebInspectorWindowController webView]):
3000 (-[WebInspectorWindowController window]):
3001 (-[WebInspectorWindowController windowShouldClose:]):
3002 (-[WebInspectorWindowController close]):
3003 (-[WebInspectorWindowController showWindow:]):
3004 (-[WebInspectorWindowController attach]):
3005 (-[WebInspectorWindowController detach]):
3006 (-[WebInspectorWindowController highlightAndScrollToNode:]):
3007 (-[WebInspectorWindowController highlightNode:]):
3008 (-[WebInspectorWindowController hideHighlight]):
3009 (-[WebInspectorWindowController animationDidEnd:]):
3011 Add an easier-to-see highlight.
3013 * Misc/WebNSViewExtras.h:
3014 * Misc/WebNSViewExtras.m:
3015 (-[NSView _web_convertRect:toView:]):
3016 * WebInspector/WebNodeHighlight.h:
3017 * WebInspector/WebNodeHighlight.m:
3018 (-[WebNodeHighlightFadeInAnimation setCurrentProgress:]):
3019 (-[WebNodeHighlight initWithTargetView:]):
3020 (-[WebNodeHighlight setHighlightedNode:]):
3021 (-[WebNodeHighlight highlightedNode]):
3022 (-[WebNodeHighlight dealloc]):
3023 (-[WebNodeHighlight attachHighlight]):
3024 (-[WebNodeHighlight delegate]):
3025 (-[WebNodeHighlight detachHighlight]):
3026 (-[WebNodeHighlight show]):
3027 (-[WebNodeHighlight hide]):
3028 (-[WebNodeHighlight animationDidEnd:]):
3029 (-[WebNodeHighlight ignoresMouseEvents]):
3030 (-[WebNodeHighlight highlightView]):
3031 (-[WebNodeHighlight setDelegate:]):
3032 (-[WebNodeHighlight setHolesNeedUpdateInTargetViewRect:]):
3033 (-[WebNodeHighlight setIgnoresMouseEvents:]):
3034 (-[WebNodeHighlight targetView]):
3035 (-[WebNodeHighlight _computeHighlightWindowFrame]):
3036 (-[WebNodeHighlight _repositionHighlightWindow]):
3037 * WebInspector/WebNodeHighlightView.h:
3038 * WebInspector/WebNodeHighlightView.m:
3039 (-[WebNodeHighlightView initWithWebNodeHighlight:]):
3040 (-[WebNodeHighlightView dealloc]):
3041 (-[WebNodeHighlightView detachFromWebNodeHighlight]):
3042 (-[WebNodeHighlightView drawRect:]):
3043 (-[WebNodeHighlightView webNodeHighlight]):
3044 (-[WebNodeHighlightView fractionFadedIn]):
3045 (-[WebNodeHighlightView setFractionFadedIn:]):
3046 (-[WebNodeHighlightView setHolesNeedUpdateInRect:]):
3047 (-[WebNodeHighlightView _holes]):
3049 WebView changes needed for the new Inspector.
3051 * WebView/WebView.mm: Remove the old _inspectElement method now that
3052 this is handled by WebCore.
3053 (-[WebView _isClosed]): Added.
3054 (-[WebView initWithFrame]): Give each Page an InspectorClient to
3055 enable the Inspector.
3056 * WebView/WebViewPrivate.h:
3058 Updates needed for WebCore changes.
3060 * WebCoreSupport/WebContextMenuClient.h:
3061 * WebCoreSupport/WebContextMenuClient.mm:
3062 * WebCoreSupport/WebViewFactory.mm:
3063 (-[WebViewFactory contextMenuItemTagInspectElement]):
3064 * WebView/WebUIDelegatePrivate.h:
3066 Remove old Inspector code.
3068 * WebCoreSupport/WebFrameLoaderClient.mm:
3069 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
3070 (WebFrameLoaderClient::assignIdentifierToInitialRequest):
3071 (WebFrameLoaderClient::dispatchDidFinishLoading):
3072 * WebInspector/WebInspector.m: Removed.
3073 * WebInspector/WebInspectorPanel.h: Removed.
3074 * WebInspector/WebInspectorPanel.m: Removed.
3075 * WebInspector/webInspector/Images/button.png: Removed.
3076 * WebInspector/webInspector/Images/buttonDivider.png: Removed.
3077 * WebInspector/webInspector/Images/buttonPressed.png: Removed.
3078 * WebInspector/webInspector/Images/close.png: Removed.
3079 * WebInspector/webInspector/Images/closePressed.png: Removed.
3080 * WebInspector/webInspector/Images/downTriangle.png: Removed.
3081 * WebInspector/webInspector/Images/menu.png: Removed.
3082 * WebInspector/webInspector/Images/menuPressed.png: Removed.
3083 * WebInspector/webInspector/Images/popup.png: Removed.
3084 * WebInspector/webInspector/Images/popupPressed.png: Removed.
3085 * WebInspector/webInspector/Images/resize.png: Removed.
3086 * WebInspector/webInspector/Images/rightTriangle.png: Removed.
3087 * WebInspector/webInspector/Images/scrollThumbBottom.png: Removed.
3088 * WebInspector/webInspector/Images/scrollThumbMiddle.png: Removed.
3089 * WebInspector/webInspector/Images/scrollTrackBottom.png: Removed.
3090 * WebInspector/webInspector/Images/upTriangle.png: Removed.
3091 * WebInspector/webInspector/inspector.css: Removed.
3092 * WebInspector/webInspector/inspector.html: Removed.
3093 * WebInspector/webInspector/inspector.js: Removed.
3094 * WebInspector/webInspector/scrollarea.js: Removed.
3095 * WebInspector/webInspector/scrollbar.js: Removed.
3096 * WebInspector/webInspector/utilities.js: Removed.
3097 * WebView/WebFrame.mm:
3098 (-[WebFramePrivate dealloc]):
3099 * WebView/WebFrameInternal.h:
3100 * WebView/WebHTMLView.mm:
3101 (-[WebHTMLView menuForEvent:]):
3106 * WebKit.xcodeproj/project.pbxproj:
3108 2007-06-20 Justin Garcia <justin.garcia@apple.com>
3112 <rdar://problem/5263541> REGRESSION (Safari 3 Beta 1): Pressing Delete doesn't delete an HTML message in Mail
3114 Mail wasn't receiving the keyDown event because WebFrameView was blocking it.
3115 It blocks the event and moves back/forward on Delete/Shift+Delete if the
3116 back/forward list is enabled.
3118 * WebView/WebFrameView.mm:
3119 (-[WebFrameView keyDown:]): Check to see if the BackForwardList is
3120 enabled. It always exists.
3122 2007-06-19 Anders Carlsson <andersca@apple.com>
3124 Reviewed by Kevin Decker.
3126 <rdar://problem/5266289> REGRESSION (Safari 3 Beta 1): Incoming iChat messages are delayed
3128 * WebView/WebDocumentLoaderMac.mm:
3129 (needsAppKitWorkaround):
3130 New function which checks if the frame load delegate belongs to AppKit.
3132 (WebDocumentLoaderMac::setDataSource):
3133 If the frame load delegate belongs to AppKit, set m_deferMainResourceDataLoad to false.
3135 2007-06-19 John Sullivan <sullivan@apple.com>
3137 Reviewed by Tim Hatcher
3139 - fixed <rdar://problem/5272011> Hole for find-on-page match in subframe isn't clipped by frame bounds
3141 * WebView/WebView.mm:
3142 (-[WebView rectsForTextMatches]):
3143 intersect the HTMLView's computed rect with the visible rect for that view
3145 2007-06-19 Jim Correia <jim.correia@pobox.com>
3147 Reviewed by Kevin Decker
3149 * Carbon/HIWebView.m:
3150 (WindowHandler): HIObjectIsOfClass requires non-NULL input on Tiger. Reworked Kevin Decker's patch to remove the conditional compilation for Tiger, yet still avoid crashing BBEdit.
3152 2007-06-18 Sam Weinig <sam@webkit.org>
3158 * WebCoreSupport/WebChromeClient.mm:
3160 2007-06-18 Kevin Decker <kdecker@apple.com>
3162 * Carbon/HIWebView.m:
3163 (WindowHandler): Fixed the Tiger build; ControlKind wasn't defined.
3165 2007-06-18 Kevin Decker <kdecker@apple.com>
3167 Reviewed by Tim Hatcher.
3169 Fixed: <rdar://problem/5276135> With Safari 3 Tiger Beta installed, a crash occurs in BBEdit while mousing down and dragging outside of HTML preview window
3171 * Carbon/HIWebView.m:
3172 (WindowHandler): Because the fix for 5051616 causes Tiger to crash in HIToolbox (but not on Leopard), I reverted back to using GetControlKind
3173 on Tiger only, instead of HIObjectIsOfClass.
3175 2007-06-16 David Hyatt <hyatt@apple.com>
3177 Back out fix for 13972. Quicktime will no longer clip correctly. :(
3178 Too many regressions in Mail caused by inserting an extra view into the
3179 hierarchy. Can revisit later.
3183 * Plugins/WebPluginController.mm:
3184 (-[WebPluginController destroyPlugin:]):
3185 (-[WebPluginController destroyAllPlugins]):
3186 * WebCoreSupport/WebFrameBridge.mm:
3187 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
3188 * WebView/WebHTMLView.mm:
3189 (-[WebHTMLView addSubview:]):
3190 (-[WebHTMLView willRemoveSubview:]):
3192 2007-06-15 Sam Weinig <sam@webkit.org>
3196 Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
3197 Autogenerate JS binding for Rect
3199 - Fix conflicts by using ::Rect instead of Rect.
3201 * Plugins/WebBaseNetscapePluginView.mm:
3202 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3203 (-[WebBaseNetscapePluginView sendEvent:]):
3204 (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
3205 (-[WebBaseNetscapePluginView invalidateRegion:]):
3206 (-[WebBaseNetscapePluginView _printedPluginBitmap]):
3208 2007-06-15 Anders Carlsson <andersca@apple.com>
3212 A better fix for <rdar://problem/5271774>. Only try to access the element if the
3213 view has an associated window. This also works with GC. (Fix suggested by Kevin.)
3215 * Plugins/WebKitPluginContainerView.mm:
3216 (-[WebKitPluginContainerView dealloc]):
3217 (-[WebKitPluginContainerView visibleRect]):
3219 2007-06-15 Anders Carlsson <andersca@apple.com>
3223 <rdar://problem/5271774> REGRESSION: A crash occurs when closing a window that contains a QT movie
3225 In some cases, calling [super dealloc] might end up calling visibleRect, so make sure to
3226 set _element to 0 so we won't send a message to a freed object and crash.
3228 * Plugins/WebKitPluginContainerView.mm:
3229 (-[WebKitPluginContainerView dealloc]):
3230 (-[WebKitPluginContainerView visibleRect]):
3232 2007-06-14 Anders Carlsson <andersca@apple.com>
3236 Call cleanupScriptObjectsForPlugin on the frame after destroying the plug-in.
3238 * Plugins/WebBaseNetscapePluginView.mm:
3239 (-[WebBaseNetscapePluginView _destroyPlugin]):
3240 * Plugins/WebPluginController.mm:
3241 (-[WebPluginController destroyPlugin:]):
3242 (-[WebPluginController destroyAllPlugins]):
3244 2007-06-13 John Sullivan <sullivan@apple.com>
3246 Reviewed by Adele Peterson
3248 - fixed <rdar://problem/5267607> Clicking the "Save to Downloads" button in
3249 PDF overlay too soon results in corrupt file
3251 * WebView/WebPDFView.mm:
3252 (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3253 Just beep if the document isn't available yet, since trying to save it as a file
3254 really isn't a good idea.
3256 2007-06-12 Oliver Hunt <oliver@apple.com>
3260 Use correct size for BITMAPINFOHEADER -- whoops.
3262 * win/WebIconDatabase.cpp:
3264 (WebIconDatabase::getOrCreateDefaultIconBitmap):
3266 2007-06-10 David Hyatt <hyatt@apple.com>
3268 Fix for bug 14037, make sure respondsToSelector does the write thing
3269 when invoked on a WebKit plugin's container view.
3271 Reviewed by Mark Rowe
3273 * Plugins/WebKitPluginContainerView.mm:
3274 (-[WebKitPluginContainerView respondsToSelector:]):
3276 2007-06-08 John Sullivan <sullivan@apple.com>
3278 * WebView/WebViewPrivate.h:
3281 2007-06-07 Justin Garcia <justin.garcia@apple.com>
3283 Reviewed by Tristan.
3285 <rdar://problem/5250997> A crash occurs when selecting Undo Typing for a page that has been closed in tab
3287 * WebView/WebView.mm:
3288 (-[WebView _clearUndoRedoOperations]): Added.
3289 * WebView/WebViewPrivate.h:
3291 2007-06-07 Oliver Hunt <oliver@apple.com>
3293 Reviewed by Sam "The Intern" Weinig.
3295 Don't be overzealous with the input checks, firstRectForCharacterRange
3296 can be determined even when there is not an active editable region.
3298 This unbreaks editing/input/range-for-empty-document which was broken
3299 by aforementioned overzealousness.
3301 * WebView/WebHTMLView.mm:
3302 (-[WebHTMLView firstRectForCharacterRange:]):
3304 2007-06-07 Oliver Hunt <oliver@apple.com>
3308 Add checks to make sure we don't try to create, use
3309 or return invalid ranges to TSM when it calls us despite
3310 not currently being in an editable region.
3312 * WebView/WebHTMLView.mm:
3314 (-[WebHTMLView textStorage]):
3315 (-[WebHTMLView firstRectForCharacterRange:]):
3316 (-[WebHTMLView selectedRange]):
3317 (-[WebHTMLView attributedSubstringFromRange:]):
3319 2007-06-06 David Hyatt <hyatt@apple.com>
3321 Make sure to hand back a script object for webkit plugins (the container
3322 view forwards to its plugin child).
3324 Reviewed by sullivan
3326 * Plugins/WebKitPluginContainerView.h:
3327 * Plugins/WebKitPluginContainerView.mm:
3328 (-[WebKitPluginContainerView objectForWebScript]):
3330 2007-06-06 David Hyatt <hyatt@apple.com>
3332 Fix for bug 13972, quicktime doesn't respect CSS clip and overflow properties.
3333 Make sure that calls to [NSView visibleRect] will do the right thing for both
3334 Netscape plugins and WebKit plugins.
3338 * Plugins/WebBaseNetscapePluginView.mm:
3339 (-[WebBaseNetscapePluginView visibleRect]):
3340 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3341 (-[WebBaseNetscapePluginView isOpaque]):
3342 * Plugins/WebKitPluginContainerView.h: Added.
3343 * Plugins/WebKitPluginContainerView.mm: Added.
3344 (-[WebKitPluginContainerView initWithFrame:DOMElement:]):
3345 (-[WebKitPluginContainerView dealloc]):
3346 (-[WebKitPluginContainerView visibleRect]):
3347 * Plugins/WebPluginController.mm:
3348 (-[WebPluginController destroyAllPlugins]):
3349 * WebCoreSupport/WebFrameBridge.mm:
3350 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
3351 * WebKit.xcodeproj/project.pbxproj:
3352 * WebView/WebHTMLView.mm:
3353 (-[WebHTMLView addSubview:]):
3354 (-[WebHTMLView willRemoveSubview:]):
3356 2007-06-04 Oliver Hunt <oliver@apple.com>
3358 Reviewed by Geoff and Justin.
3360 Fix for <rdar://problem/5246941> Clicking URL field on
3361 Safari causes halt for a minute when using input methods.
3362 and <rdar://problem/5245964> Safari hangs for several
3363 seconds when trying to select text using mouse
3365 This is a by product of the textStorage hack used to fix
3366 rdar://problem/5000470 -- TSM calls textStorage repeatedly
3367 when changing focus, on certain mouse events, etc. If there
3368 is no selection/editable region we repeatedly create an
3369 NSAttributedString from the full document. If the document is
3370 sufficiently long this starts consuming an inordinate amount of
3373 This check should really have been present in the original
3376 * WebKit.xcodeproj/project.pbxproj:
3377 * WebView/WebHTMLView.mm:
3378 (-[WebHTMLView textStorage]):
3380 2007-05-31 David Hyatt <hyatt@apple.com>
3382 Fix for 11768, Flash plugin does not respect clips set by CSS.
3386 * Plugins/WebBaseNetscapePluginView.mm:
3387 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3389 2007-05-30 Mark Rowe <mrowe@apple.com>
3391 Build fixes after r21889.
3393 * ForwardingHeaders/kjs/function.h: Added.
3395 2007-05-29 Mark Rowe <mrowe@apple.com>
3399 64-bit build fix. Ensure that use of WebNSUInteger in headers is matched by WebNSUInteger in implementations.
3401 * DefaultDelegates/WebScriptDebugServer.h:
3402 * DefaultDelegates/WebScriptDebugServer.m:
3403 (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
3404 (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
3405 * DefaultDelegates/WebScriptDebugServerPrivate.h:
3406 * History/WebBackForwardList.mm:
3407 (-[WebBackForwardList setPageCacheSize:]):
3408 (-[WebBackForwardList pageCacheSize]):
3409 * WebView/WebView.mm:
3410 (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
3412 2007-05-26 Darin Adler <darin@apple.com>
3414 Reviewed by Tim Hatcher.
3416 * MigrateHeaders.make: Added dependency on this makefile itself, which is
3417 useful when you change the sed command or other aspect of this file. My build
3418 failed until I made this fix.
3420 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3422 Reviewed by Darin Adler.
3424 Fixed <rdar://problem/5055182> The page cache has no global cap.
3426 The main WebKit changes are:
3427 1. Changed -[WebBackForwardList setPageCacheSize] and -[WebBackForwardList
3428 pageCacheSize] to accomodate the new global page cache model, updating
3429 their documentation.
3431 2. Added -[WebPreferences setShouldUsePageCache] and -[WebPreferences
3432 shouldUsePageCache] as pending public API.
3434 3. Centralized calculation of object cache and page cache sizes inside
3437 Cchanged our old behavior of reading a preference and applying a fudge
3438 factor with a new behavior of just using the preference directly. The
3439 old behavior was confusing and often inappropriate. (For example, if
3440 you set a page cache size of 100, a 256MB machine would somewhat
3441 arbitrarily reduce that number to 98. ???)
3443 * WebView/WebView.mm: Added support for two flags to determine whether
3444 to use the page cache. If either -[WebBackForwardList setPageCacheSize:0]
3445 or -[WebPreferences setShouldUsePageCache:NO] is called, we don't use
3448 2007-05-25 Timothy Hatcher <timothy@apple.com>
3450 Reviewed by Kevin Decker.
3452 <rdar://problem/5219089> Changes for migration of DictionaryServices
3454 * WebView/WebHTMLView.mm:
3455 (-[WebHTMLView _lookUpInDictionaryFromMenu:]): look for the HIDictionaryWindowShow symbol in HIToolbox
3457 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3459 Reviewed by Oliver Hunt.
3461 Fixed global initializer (like you fix a dog).
3463 I'm not sure how our script missed this. I tested, and it generally doesn't
3464 seem to work very well.
3466 * WebView/WebHTMLView.mm: Allocate lazily to avoid the performance hit of
3467 a global initializer.
3468 (promisedDataClient):
3469 (-[WebHTMLViewPrivate dealloc]):
3470 (-[WebHTMLViewPrivate clear]):
3471 (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
3473 2007-05-25 Brady Eidson <beidson@apple.com>
3477 <rdar://problem/5228371> - REGRESSION - Certain mail message bodies display as empty
3479 This is due to http://trac.webkit.org/projects/webkit/changeset/21480 which unintentionally
3480 made applewebdata urls result in check.call(false) instead of check.call(true)
3482 Best place for a fix is to have the FrameLoaderClient::canHandleRequest() call return true, which
3483 really is rooted in WebView
3485 <rdar://problem/5229587> tracks adding a layout test
3487 * WebView/WebView.mm:
3488 (+[WebView _canHandleRequest:]): Return true for applewebdata URLs
3490 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3492 Reviewed by Darin Adler, Tim Hatcher.
3494 "unsigned" => "WebNSUInteger" in public API.
3496 * History/WebBackForwardList.h:
3497 * WebView/WebScriptDebugDelegate.h:
3498 * WebView/WebUIDelegate.h:
3499 * WebView/WebViewPrivate.h:
3501 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3503 Reviewed by Darin Adler.
3505 Moved JavaScriptCore-related pending public API to public API.
3507 * MigrateHeaders.make: Hack to prevent <JavaScriptCore/JSBase.h> from
3508 automatically converting to <WebKit/JSBase.h>
3510 Moved -windowObject and -globalContext
3512 * WebView/WebFramePrivate.h: from here
3513 * WebView/WebFrame.h: to here
3514 * WebView/WebFrame.mm: and out of its temporary category
3516 Moved -didClearWindowObject:forFrame:
3518 * WebView/WebViewPrivate.h: from here
3519 * WebView/WebFrameLoadDelegate.h: to here
3521 2007-05-25 John Sullivan <sullivan@apple.com>
3523 Reviewed by Anders and Tim
3525 - fixed <rdar://problem/5226000> REGRESSION: In Gmail and Mail, a hang occurs when attempting
3526 to grammar/spellcheck a word in a reply
3528 * WebCoreSupport/WebEditorClient.mm:
3529 (WebEditorClient::checkGrammarOfString):
3530 Fixed recently-introduced false assumption that NSNotFound == -1
3532 2007-05-24 dethbakin <bdakin@apple.com>
3536 Fix for <rdar://problem/5023545> QuickBooks Pro 2007:hang/crash
3537 after closing QuickBooks Tutorial Center with Leopard9A377
3539 We can hit a race condition where drawRect will be called after the
3540 WebView has closed. Quickbooks does not properly close the WebView
3541 and set the UIDelegate to nil, so the UIDelegate is stale and we
3542 crash. This is a regression because the code that uses the
3543 UIDelegate in the drawRect code path was only added recently. The
3544 method that the UIDelegate calls into is new -- it does not exist
3545 on Tiger -- so there is no harm in not running this code for
3546 applications linked against older WebKits. Other applications may
3547 run into this same bug so I am not doing a bundle
3548 check...particularly because, as I mentioned, the new UIDelegate
3549 call would not be implemented by older clients anyway.
3551 * Misc/WebKitVersionChecks.h:
3552 * WebView/WebHTMLView.mm:
3553 (-[WebHTMLView drawSingleRect:]):
3555 2007-05-24 Darin Adler <darin@apple.com>
3557 * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
3559 2007-05-24 Oliver Hunt <oliver@apple.com>
3561 Reviewed by Adam, Darin, and Geoff.
3563 Fix for <rdar://problem/5000470> REGRESSION: The IM reconvert
3564 function returns incorrect symbol due to inconsistent range
3567 Text Services Management uses ranges provided by the
3568 NSTextInput API to index into the string return by
3569 -[WebHTMLView string]. As a result some input methods
3570 incorrectly get their candidate text from the beginning
3571 of the document instead of from the input element.
3573 TSM prefers to query -textStorage over -string so as a
3574 workaround we provide an implementation of -textStorage that
3575 returns the content of the current text input. TSM only ever
3576 queries the result of textStorage as an NSAttributedString so
3577 we do not need to implement a fake NSTextStorage class
3579 This should not cause harm to anything else as textStorage is
3580 actually a method on NSTextView, which we clearly are not. TSM
3581 only queries the method because it uses respondsToSelector to
3584 * WebView/WebHTMLView.mm:
3585 (-[WebHTMLView textStorage]):
3588 2007-05-24 David Harrison <harrison@apple.com>
3590 Reviewed by Tim Hatcher.
3592 <rdar://problem/5225343> REGRESSION: With View Source window opened, navigating to a different URL in the browser window results in a crash at WebCore::FrameLoader::frameHasLoaded()
3594 _private->loader->frameLoader() was not being nil checked.
3595 * WebView/WebDataSource.mm:
3596 (-[WebDataSource request]):
3597 Add nil check for _private->loader->frameLoader()
3599 2007-05-23 Anders Carlsson <andersca@apple.com>
3603 <rdar://problem/3663808> Resize large images to fit in the browser window
3605 Add new WebPreferences SPI.
3607 * WebView/WebPreferenceKeysPrivate.h:
3608 * WebView/WebPreferences.m:
3609 (+[WebPreferences initialize]):
3610 (-[WebPreferences enableAutomaticImageResizing]):
3611 (-[WebPreferences setEnableAutomaticImageResizing:]):
3612 * WebView/WebPreferencesPrivate.h:
3613 * WebView/WebView.mm:
3614 (-[WebView _updateWebCoreSettingsFromPreferences:]):
3616 2007-05-23 Sam Weinig <sam@webkit.org>
3620 Patch for http://bugs.webkit.org/show_bug.cgi?id=13830
3621 Auto-generate JS DOM bindings for HTMLDocument and most of the rest
3624 * MigrateHeaders.make: add DOMHTMLDocumentPrivate.h
3625 * WebKit.xcodeproj/project.pbxproj:
3627 2007-05-23 Oliver Hunt <oliver@apple.com>
3631 Fix for <rdar://problem/5223782> REGRESSION: Can't drag and drop a standalone image
3633 The main resource for a standalone image webarchive has the same mimetype as the
3636 * Misc/WebNSPasteboardExtras.mm:
3637 (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
3639 2007-05-22 Sam Weinig <sam@webkit.org>
3643 Patch for http://bugs.webkit.org/show_bug.cgi?id=13833
3644 Add ObjC DOM binding for HTMLMarqeeElement
3646 - Also adds missing DOMHTMLFramePrivate.
3648 * MigrateHeaders.make:
3650 2007-05-22 Darin Adler <darin@apple.com>
3654 * WebInspector/webInspector/treeoutline.js: Use ownerDocument instead of non-standard
3657 2007-05-22 Adele Peterson <adele@apple.com>
3661 Adding some asserts to help detect other cases of <rdar://problem/5171145>
3663 * WebCoreSupport/WebFrameBridge.mm: (-[WebFrameBridge makeFirstResponder:]):
3665 2007-05-22 Brady Eidson <beidson@apple.com>
3667 Reviewed by Kevin (Sarge)
3669 <rdar://problem/5219885> - Crash after closing a inline popup ad at http://news.yahoo.com/
3671 This regressed in http://trac.webkit.org/projects/webkit/changeset/21618
3673 * WebView/WebFrame.mm:
3674 (-[WebFrame dataSource]): Null check the frameloader
3676 2007-05-21 Adele Peterson <adele@apple.com>
3678 Fix by Darin, reviewed by me.
3680 Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
3682 * WebView/WebFrameView.mm: (-[WebFrameView _setDocumentView:]): If the old view is the first responder,
3683 then set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
3685 2007-05-21 Brady Eidson <beidson@apple.com>
3687 Making the importance of my last change more clear
3689 * WebView/WebViewPrivate.h: "Leave for Dashboard, people!"
3691 2007-05-21 Brady Eidson <beidson@apple.com>
3693 Reviewed by Kevin (Sarge)
3695 <rdar://problem/5217124> - Re-add mistakenly removed SPI
3697 * WebView/WebView.mm:
3698 (-[WebView handleAuthenticationForResource:challenge:fromDataSource:]):
3699 * WebView/WebViewPrivate.h:
3701 2007-05-21 Anders Carlsson <andersca@apple.com>
3705 <rdar://problem/5200816> REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
3707 Null check the request.
3709 * WebView/WebView.mm:
3710 (+[WebView _canHandleRequest:]):
3712 2007-05-19 Maciej Stachowiak <mjs@apple.com>
3716 <rdar://problem/5205358> REGRESSION (r21367): All messages appear entirely blank when running Mail off of tip of tree WebKit
3718 The fix is to return nil from [WebFrame dataSource] when it has not loaded anything but the fake
3719 empty initial document. However, WebKit still needs the real data source internally, so I also
3720 added a [WebFrame _dataSource] method that skips this check, and made WebKit use it throughout.
3722 * Misc/WebNSAttributedStringExtras.mm:
3723 (fileWrapperForElement):
3724 * Plugins/WebBaseNetscapePluginView.mm:
3725 (-[WebBaseNetscapePluginView dataSource]):
3726 * Plugins/WebNullPluginView.mm:
3727 (-[WebNullPluginView viewDidMoveToWindow]):
3728 * Plugins/WebPluginController.mm:
3729 (-[WebPluginController URLPolicyCheckReferrer]):
3730 * WebCoreSupport/WebFrameBridge.mm:
3731 (-[WebFrameBridge dataSource]):
3732 (-[WebFrameBridge redirectDataToPlugin:]):
3733 * WebCoreSupport/WebFrameLoaderClient.mm:
3734 (WebFrameLoaderClient::makeDocumentView):
3735 (WebFrameLoaderClient::forceLayoutForNonHTML):
3736 (WebFrameLoaderClient::prepareForDataSourceReplacement):
3737 (WebFrameLoaderClient::canCachePage):
3738 * WebCoreSupport/WebViewFactory.mm:
3739 (-[WebViewFactory bridgeForView:]):
3740 * WebKit.xcodeproj/project.pbxproj:
3741 * WebView/WebArchiver.mm:
3742 (+[WebArchiver archiveFrame:]):
3743 (+[WebArchiver archiveMainResourceForFrame:]):
3744 (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
3745 (+[WebArchiver archiveSelectionInFrame:]):
3746 * WebView/WebFrame.mm:
3747 (-[WebFrame _loadURL:referrer:intoChild:]):
3748 (-[WebFrame _addChild:]):
3749 (-[WebFrame _dataSource]):
3750 (-[WebFrame DOMDocument]):
3751 (-[WebFrame dataSource]):
3752 * WebView/WebFrameInternal.h:
3753 * WebView/WebHTMLView.mm:
3754 (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
3755 * WebView/WebRenderNode.mm:
3756 (-[WebRenderNode initWithWebFrameView:]):
3757 * WebView/WebView.mm:
3758 (-[WebView _mainFrameOverrideEncoding]):
3759 (-[WebView mainFrameURL]):
3760 (-[WebView mainFrameTitle]):
3761 (-[WebView mainFrameIcon]):
3762 (-[WebView validateUserInterfaceItemWithoutDelegate:]):
3763 (-[WebView replaceSelectionWithArchive:]):
3764 (-[WebView _isLoading]):
3765 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
3766 (-[WebView _notifyTextSizeMultiplierChanged]):
3768 2007-05-18 Oliver Hunt <oliver@apple.com>
3772 Fix for http://bugs.webkit.org/show_bug.cgi?id=13782
3773 REGRESSION (r21528-r21533): Failing editing/selection/drag-in-iframe in pixel mode
3775 r21533 made used a DOMElement as the source for promise data, this meant it had to
3776 clear the dragging pasteboard following the drag. In DRT a drag is non-blocking
3777 so this resulted in us prematurely clearing the pasteboard.
3779 This patch avoids this problem by referencing the source CachedImage rather than the
3780 DOMElement, so we don't need to worry about retaining an entire document forever, so
3781 we don't need to clear the dragging pasteboard following the drag.
3783 * Misc/WebNSPasteboardExtras.mm:
3785 Extract the underlying CachedImage from a DOMElement
3786 (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:source:]):
3787 Use a CachedImage instead of a DOMElement
3789 * WebCoreSupport/WebDragClient.mm:
3790 (WebDragClient::startDrag):
3792 * WebKit.xcodeproj/project.pbxproj:
3794 * WebView/WebHTMLView.mm:
3795 (-[WebHTMLViewPrivate dealloc]):
3796 (-[WebHTMLViewPrivate clear]):
3797 (-[WebHTMLView pasteboardChangedOwner:]):
3798 (-[WebHTMLView pasteboard:provideDataForType:]):
3799 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3800 (-[WebHTMLView WebCore::]):
3801 (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
3802 Use CachedImage rather than DOMElement as promised data source
3804 * WebView/WebHTMLViewInternal.h:
3805 * WebView/WebHTMLViewPrivate.h:
3807 2007-05-18 Tristan O'Tierney <tristan@apple.com>
3809 Reviewed by Brady E.
3811 * WebCoreSupport/WebFrameLoaderClient.mm:
3812 (WebFrameLoaderClient::download):
3813 asked the webframeloaderclient for its webview's history and
3814 injected the originated url into the created WebDownload
3816 2007-05-18 John Sullivan <sullivan@apple.com>
3818 Reviewed by Kevin Decker
3820 Improvement to WebKit part of fix for 5201499 based on more modern understanding. (That is,
3821 a couple of hours more modern.)
3823 * WebView/WebUIDelegatePrivate.h:
3824 add showPanel: parameter to just-introduced delegate method webView:saveFrameView:
3826 * WebView/WebPDFView.mm:
3827 (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3828 pass NO for new showPanel: parameter, and update comment
3830 2007-05-18 Maciej Stachowiak <mjs@apple.com>
3834 <rdar://problem/5204792> REGRESSION (r21367): System widgets are drawn with vertical/horizontal scroll bars
3836 No test because the bug requires calling setAllowsScrolling: to reproduce.
3838 * WebView/WebFrameView.mm:
3839 (-[WebFrameView setAllowsScrolling:]): Update the FrameView's scroll state as well as the one
3840 on WebDynamicScrollBarsView, otherwise this setting won't stick if the frame has already loaded
3843 2007-05-18 Geoffrey Garen <ggaren@apple.com>
3845 Fixed spelling error.
3847 * WebView/WebViewPrivate.h:
3849 2007-05-18 John Sullivan <sullivan@apple.com>
3851 Reviewed by Kevin Decker
3853 WebKit part of fix for 5201499 (support for PDFKit UI for saving PDFs to disk)
3855 Also, the PDFKit mechanism for notifying clients about "Open File Externally" was
3856 changed from a notification to a delegate method. The notification was new to
3857 Leopard, so removing it doesn't affect clients in the field.
3859 * WebView/WebUIDelegatePrivate.h:
3860 Declared new UI delegate method webView:saveFrameView:, analogous to the existing
3861 webView:printFrameView:
3863 * WebView/WebPDFView.mm:
3864 removed declaration of _webkit_PDFKitLaunchNotification
3865 (-[WebPDFView viewDidMoveToWindow]):
3866 don't observe _webkit_PDFKitLaunchNotification
3867 (-[WebPDFView viewWillMoveToWindow:]):
3869 (-[WebPDFView PDFViewOpenPDFInNativeApplication:]):
3870 new PDFKit delegate method, replaces our use of _webkit_PDFKitLaunchNotification
3871 (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3872 new PDFKit delegate method, calls through to new WebKit UI delegate method
3874 2007-05-17 Oliver Hunt <oliver@apple.com>
3878 Fix for <rdar://problem/4244861> Safari fails to create image file
3879 after releasing dragged image that has changed on source page
3881 This patch fixes this bug by manually creating an NSFileWrapper from
3882 the TIFF promise data for a drag if it is available. This bypasses
3883 the problem of the required resource no longer being held due to page
3884 loads or other constraints.
3886 We need to leave the old path in place to allow for the case where
3887 the promised data is not available.
3889 * WebCoreSupport/WebDragClient.mm:
3890 (WebDragClient::declareAndWriteDragImage):
3891 Always use the top WebHTMLView as the pasteboard owner, this is
3892 safe as we only use the owner for resolving promised types.
3893 * WebView/WebHTMLView.mm:
3894 (-[WebHTMLView _writeSelectionToPasteboard:]):
3895 (-[WebHTMLView writeSelectionToPasteboard:types:]):
3896 Always use the top WebHTMLView as the pasteboard owner.
3897 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3898 Add path to create NSFileWrapper from promise data.
3900 2007-05-17 Oliver Hunt <oliver@apple.com>
3904 Fix for <rdar://problem/4343832> Trying to drag a large 6.2MB jpeg image
3905 out of Safari is unexpectedly slow (4 copies of image plus RTF document on pasteboard)
3907 This patch causes the construction of the RTF and TIFF data to be delayed until requested.
3909 We delay TIFF construction from a DOMElement as this may require generating TIFF data
3910 from the CachedImage, which is slow. To allow the TIFF data to be created later the
3911 it's necessary to add a reference to the source DOMElement to the view.
3913 * Misc/WebNSPasteboardExtras.h:
3914 * Misc/WebNSPasteboardExtras.mm:
3915 (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
3916 Implements the delayed write of RTF data
3917 (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:source:]):
3918 Set up the pasteboard to allow the data writing to be delayed
3919 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3920 Now we need to pass the WebHTMLView on to _web_writeImage:element:URL:title:archive:types:source:
3921 * WebCoreSupport/WebDragClient.mm:
3922 (WebDragClient::startDrag):
3923 Clear the dragging pasteboard once the drag has ended to ensure we don't hold references
3924 to anything longer than we need to.
3925 (WebDragClient::declareAndWriteDragImage):
3927 * WebView/WebHTMLView.mm:
3928 (-[WebHTMLViewPrivate dealloc]):
3929 (-[WebHTMLViewPrivate clear]):
3930 (-[WebHTMLView pasteboardChangedOwner:]):
3931 Make sure we clear out the DOMElement reference once it is no longer needed
3932 (-[WebHTMLView pasteboard:provideDataForType:]):
3933 Provide delayed data
3934 (-[WebHTMLView _writeSelectionToPasteboard:]):
3935 Make sure we set pasteboard ownership correctly
3936 (-[WebHTMLView promisedDragTIFFDataSource]):
3937 (-[WebHTMLView setPromisedDragTIFFDataSource:]):
3938 (-[WebHTMLView writeSelectionToPasteboard:types:]):
3939 * WebView/WebHTMLViewInternal.h:
3940 * WebView/WebHTMLViewPrivate.h:
3942 * WebView/WebView.mm:
3943 (-[WebView _writeImageForElement:withPasteboardTypes:toPasteboard:]):
3945 2007-05-16 Anders Carlsson <andersca@apple.com>
3949 <rdar://problem/5207156> Hamachi test tool causes assertion in FormCompletionController in Safari
3951 Update for WebCore changes.
3953 * WebView/WebFrame.mm:
3954 (-[WebFrame _loadURL:referrer:intoChild:]):
3956 2007-05-15 Oliver Hunt <oliver@apple.com>
3958 Reviewed by Sam and Geoff.
3960 Removing dead code left behind from drag and drop refactoring.
3962 * WebCoreSupport/WebFrameBridge.mm:
3963 * WebView/WebHTMLView.mm:
3964 * WebView/WebHTMLViewPrivate.h:
3966 2007-05-15 Bruce Q Hammond <bruceq@apple.com>
3970 Correction of previous patch for http://bugs.webkit.org/show_bug.cgi?id=13578
3971 This corrects the sign of the Y-Axis origin adjustment.
3973 * Plugins/WebBaseNetscapePluginView.mm:
3974 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3976 2007-05-15 Geoffrey Garen <ggaren@apple.com>
3978 Reviewed by Maciej Stachowiak.
3980 Patch: fixed <rdar://problem/5198890> .5% performance regression caused
3983 The only code r21307 added that runs during the PLT is a frame load delegate
3984 -respondsToSelector: call inside windowObjectCleared(), so it seems like
3985 our message dispatch overhead for the frame load delegate is significant.
3987 This patch is a straight port of Maciej's fix for the same problem in the
3988 resource load delegate. The solution is simple enough: don't use Objective-C.
3989 Instead, use a special structure that caches which methods the delegate
3990 implements, along with pointers to those methods.
3992 I verified each frame load delegate callback in the debugger, except for
3993 -webView:didFailLoadWithError:forFrame:, which is not implemented by Safari
3996 * WebKit/DefaultDelegates/WebDefaultFrameLoadDelegate.h: Removed.
3997 * WebKit/DefaultDelegates/WebDefaultFrameLoadDelegate.m: Removed.
3999 * WebCoreSupport/WebFrameBridge.mm:
4000 (-[WebFrameBridge windowObjectCleared]): I also removed a misleading
4001 comment here. The JS debugger caches the windowScriptObject, so you do
4002 need to re-create the debugger every time you invalidate the old
4003 WebScriptObject wrapper for the window object and create a new one, or
4004 the debugger will stop working. We could fix this in a number of ways,
4005 but <rdar://problem/4608404> is not the key issue.
4007 2007-05-15 Maciej Stachowiak <mjs@apple.com>
4009 Reviewed by Hyatt and Lars.
4011 - fixed <rdar://problem/5201758> REGRESSION: Stop button enabled and other problems caused by [WebView currentURL] returning non-nil for empty window
4013 * WebView/WebDataSource.mm:
4014 (-[WebDataSource request]): Return nil when we are still showing the initial empty doc
4016 2007-05-14 Geoffrey Garen <ggaren@apple.com>
4018 Reviewed by Darin Adler.
4020 Updated for WebCore move to PageCache singleton. Also removed some WebCore::
4021 prefixes and replaced them with 'using namespace WebCore'.
4023 * History/WebHistoryItem.mm:
4024 (+[WebHistoryItem _releaseAllPendingPageCaches]):
4025 (-[WebWindowWatcher windowWillClose:]):
4027 2007-05-13 Darin Adler <darin@apple.com>
4029 - one more retain/release for a tiny bit more robustness
4031 * WebView/WebPDFView.mm:
4032 (-[WebPDFView _updatePreferences:]): [prefs release]
4033 (-[WebPDFView _updatePreferencesSoon]): [prefs retain]
4035 2007-05-13 Darin Adler <darin@apple.com>
4039 - fix <rdar://problem/5188400> Webkit crashes going back from PDF at perl.org site
4041 * WebView/WebPDFView.h: Replace _updatePreferencesTimer with _willUpdatePreferencesSoon BOOL.
4042 Also remove unneeded @public that gives other classes access to our dataSource member.
4044 * WebView/WebPDFView.mm: Rearrange top of file a bit, remove forward declaration of the
4045 _cancelUpdatePreferencesTimer method.
4046 (-[WebPDFView dealloc]): Removed call to _cancelUpdatePreferencesTimer.
4047 (-[WebPDFView _updatePreferencesNow:]): Added WebPreferences parameter. This sidesteps problems
4048 where the dataSource is no longer present by not looking at the dataSource field at all.
4049 Also removed the call to _cancelUpdatePreferencesTimer, added code to set _willUpdatePreferencesSoon
4050 to NO and added a release to balance a retain I did in _updatePreferencesSoon.
4051 (-[WebPDFView _updatePreferencesSoon]): Changed to use performSelectorAfterDelay instead of
4052 an NSTimer. Pass in the preferences object as a parameter, since we might not be able to get to
4053 the dataSource when the timer fires.
4055 2007-05-10 Geoffrey Garen <ggaren@apple.com>
4057 Reviewed by Darin Adler.
4059 "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness.
4061 2007-05-10 Adele Peterson <adele@apple.com>
4065 WebKit part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
4067 Updated to use selectionRect instead of visibleSelectionRect. selectionRect() now returns the visible rect by default.
4069 * WebView/WebHTMLView.mm:
4070 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
4071 (-[WebHTMLView selectionImageRect]):
4073 2007-05-10 dethbakin <bdakin@apple.com>
4077 Fix for <rdar://problem/5191941> Leopard: Adobe Acrobat 8:
4078 Distiller 8 needs same check fix as 4992521
4080 * WebView/WebView.mm:
4081 (-[WebView _updateWebCoreSettingsFromPreferences:]): Adobe
4082 Distiller needs the same quirk.
4084 2007-05-10 Maciej Stachowiak <mjs@apple.com>
4088 - WebKit part of fix for:
4089 <rdar://problem/5063277> blank screen after login to Citibank Online (accessing document before frame starts loading cancels load)
4090 <rdar://problem/5159541> REGRESSION (r20972): Wall Street Journal pages replaced by advertisements (13465)
4092 The basic approach is to have Frames start out containing an empty document instead of absolutely nothing,
4093 so there is no need to initialize them on demand. Various side effects of that cause both of these bugs.
4095 However, this caused many regressions so I had to fix the fallout.
4097 * WebCoreSupport/WebChromeClient.mm:
4098 (WebChromeClient::takeFocus): Avoid focus cycle problems (can happen in DumpRenderTree
4099 with initial empty document now).
4100 * WebCoreSupport/WebFrameBridge.mm:
4101 (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]): init the frame.
4102 (-[WebFrameBridge determineObjectFromMIMEType:URL:]): return image type when appropriate
4103 * WebView/WebFrame.mm:
4104 (-[WebFrame stopLoading]): use stopForUserCancel().
4105 * WebView/WebFrameView.mm:
4106 (-[WebFrameView _makeDocumentViewForDataSource:]): assume html when no mime type available.
4107 * WebView/WebView.mm:
4108 (-[WebView becomeFirstResponder]): Track whether we are becoming first responder from
4110 (-[WebView _becomingFirstResponderFromOutside]): Return this value.
4111 * WebView/WebViewInternal.h:
4113 2007-05-09 Oliver Hunt <oliver@apple.com>
4117 The previous patch (r21346) broke editing, rolling out
4119 * WebView/WebHTMLView.mm:
4120 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
4121 (-[WebHTMLView doCommandBySelector:]):
4123 2007-05-09 Adele Peterson <adele@apple.com>
4127 Re-applying fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
4128 http://bugs.webkit.org/show_bug.cgi?id=13263
4130 We don't need to call interpretKeyEvents for cmd-key events as
4131 they events will be interpreted by performKeyEquivalent.
4133 * WebView/WebHTMLView.mm:
4134 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
4135 (-[WebHTMLView doCommandBySelector:]):
4137 2007-05-09 Mark Rowe <mrowe@apple.com>
4139 Build fix to keep the buildbot happy.
4141 * Plugins/WebBaseNetsc