1 2007-10-01 Eric Seidel <eric@webkit.org>
3 Reviewed by Oliver Hunt.
5 SVG Subresources will not be saved when creating WebArchives
6 http://bugs.webkit.org/show_bug.cgi?id=15280
8 Implement _subresourceURLs methods for more SVGElement types
9 more such methods will be needed as we add support for other
10 external references (such as use, mpath, tref, etc.)
12 * DOM/WebDOMOperations.mm:
13 (-[DOMSVGScriptElement _subresourceURLs]): added.
14 (-[DOMSVGCursorElement _subresourceURLs]): added.
15 (-[DOMSVGFEImageElement _subresourceURLs]): added.
17 2007-10-01 Eric Seidel <eric@webkit.org>
19 Reviewed by Oliver Hunt.
21 WebArchives do not embed stylesheets referenced by xml-stylesheeet
22 http://bugs.webkit.org/show_bug.cgi?id=15320
24 * DOM/WebDOMOperations.mm:
25 (-[DOMProcessingInstruction _stylesheetURL]): needed to access [[self sheet] href]
26 (-[DOMProcessingInstruction _subresourceURLs]): call and return _stylesheetURL
28 2007-10-01 Eric Seidel <eric@webkit.org>
30 Reviewed by Oliver Hunt.
32 * DOM/WebDOMOperations.mm: added DOMSVGElementImage _subresources implementation
33 (-[DOMNode _URLsFromSelectors:]): now handles DOMSVGAnimatedString return values
34 (-[DOMSVGImageElement _subresourceURLs]): added.
35 * MigrateHeaders.make: copies DOMSVG* headers into WebKit/PrivateHeaders
37 2007-10-01 Oliver Hunt <oliver@apple.com>
41 Enable Experimental SVG features by default when building from Xcode
43 * Configurations/WebKit.xcconfig:
45 === End merge of feature-branch 11-11-2007 ===
47 2007-10-11 Mark Rowe <mrowe@apple.com>
49 Reviewed by Tim Hatcher.
51 Fix for <rdar://problem/5488678>. Disable debugging symbols in production builds for 10.4
52 PowerPC to prevent a huge STABS section from being generated.
54 * Configurations/Base.xcconfig:
56 2007-10-10 Alice Liu <alice.liu@apple.com>
58 Reviewed by Geoff Garen.
60 Fixed <rdar://5464402> Crash when running fast/frames/onload-remove-iframe-crash.html in DRT
61 createFrame() now returns a RefPtr instead of a raw Frame pointer.
62 Making this change improves the way we handle frames on Windows WebKit.
64 * WebCoreSupport/WebFrameLoaderClient.h:
65 * WebCoreSupport/WebFrameLoaderClient.mm:
66 (WebFrameLoaderClient::createFrame):
68 2007-10-04 Beth Dakin <bdakin@apple.com>
70 Reviewed by John Sullivan.
72 Fix for <rdar://problem/5441823> REGRESSION (r25142, Tiger only):
73 Vertical scroll bar not redrawn properly when going back in history
76 This fix if-defs r25142 to be Leopard-only since it causes
77 correctness issues on Tiger and does not seem to have any
78 performance impact on Tiger either.
80 * WebView/WebDynamicScrollBarsView.m:
81 (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
82 (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
84 2007-10-04 Mark Rowe <mrowe@apple.com>
88 Switch to default level of debugging symbols to resolve <rdar://problem/5488678>.
89 The "full" level appears to offer no observable benefits even though the documentation
90 suggests it be used for dead code stripping. This should also decrease link times.
92 * Configurations/Base.xcconfig:
94 2007-10-04 Adele Peterson <adele@apple.com>
98 WebKit part of fix for <rdar://problem/5369017> REGRESSION: Can't tab to webview that doesn't have editable content
100 * WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Pass in the FocusDirection.
102 2007-10-04 Darin Adler <darin@apple.com>
104 * WebView/WebHTMLView.mm: (-[WebHTMLView _updateActiveState]):
105 Removed a bogus comment.
107 2007-10-02 Kevin Decker <kdecker@apple.com>
109 Reviewed by Mark Rowe.
111 Re-added _minimumRequiredSafariBuildNumber. It turns out older version of Safari still rely
112 on this method, so we need to keep it around at least until the next major Safari release.
114 * StringsNotToBeLocalized.txt:
115 * WebView/WebView.mm:
116 (+[WebView _minimumRequiredSafariBuildNumber]):
117 * WebView/WebViewPrivate.h:
119 2007-10-02 Kevin Decker <kdecker@apple.com>
121 Reviewed by John Sullivan.
123 <rdar://problem/5517710>
125 * WebView/WebView.mm: Removed -[WebView _minimumRequiredSafariBuildNumber] because newer
126 versions of Safari no longer use this method. This won't break existing Safaris because
127 they always use a respondsToSelector check before calling this.
129 * WebView/WebViewPrivate.h: Ditto.
131 2007-09-27 John Sullivan <sullivan@apple.com>
135 - fixed <rdar://problem/5408186> REGRESSION (5522-5523.9): Safari leaks every browser window
137 The leak started occurring when we removed the code to clear the delegates and the host window
138 from Safari as part of the fix for 5479443. But it turns out that Safari code was masking a
139 bug here in WebView: setHostWindow:nil needs to be called before setting _private->closed to
140 YES, or it will do nothing at all, causing a world leak due to a circular reference between
141 the window and the WebView.
143 I toyed with a more complex fix, but this is the simplest one that retains the fix for 5479443
144 while otherwise restoring the code order to be as close as possible to what it was before
147 * WebView/WebView.mm:
149 Moved the call that sets _private->closed to YES to be after the code that clears the delegates
150 and the host window. Added a comment about this order.
152 2007-09-27 Kevin Decker <kdecker@apple.com>
154 Rubber stamped by Darin.
156 <rdar://problem/5493093>
158 * WebKit.order: Added.
159 * WebKit.xcodeproj/project.pbxproj: We're changing from using an order file built by
160 another team to using one we actually check into our project repository. Linker settings for
161 Symbol Ordering Flags have been updated accordingly.
163 2007-09-26 Geoffrey Garen <ggaren@apple.com>
165 Reviewed by Adele Peterson.
167 Fixed <rdar://problem/5507476> Promote cache model SPI to API
169 Promoted cache model SPI to API. This was just a move, with some small
170 edits to the documentation (changing 'application' to 'WebView' in
171 some cases, since the interface is now per-WebView).
173 * WebView/WebPreferences.h:
174 * WebView/WebPreferences.m:
175 (-[WebPreferences setCacheModel:]):
176 (-[WebPreferences cacheModel]):
177 * WebView/WebPreferencesPrivate.h:
179 2007-09-24 Timothy Hatcher <timothy@apple.com>
183 <rdar://problem/5498016> Photoshop CS3: Adobe Help Viewer 1.1 crashes in 9A553
185 WebKit started calling the mouseDidMoveOverElement delegate method with a nil dictionary in r14982.
186 We originally intended to call this delegate method sometimes with a nil dictionary, but due to
187 a bug dating back to WebKit 1.0 this delegate was never called with nil! Unfortunately we can't
188 start calling this with nil since it will break Adobe Help Viewer, and possibly other clients.
190 * WebView/WebView.mm:
191 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
193 2007-09-21 Kevin Decker <kdecker@apple.com>
195 * Plugins/WebBaseNetscapePluginView.mm: Build fix.
196 The first argument of aglChoosePixelFormat() has changed from const AGLDevice *gdevs on Tiger to
197 const void *gdevs on Leopard.
199 2007-09-20 Kevin Decker <kdecker@apple.com>
201 Reviewed by Darin Adler.
203 <rdar://problem/5493093>
205 Reduced launch time by lazily linking both the AGL and OpenGL frameworks until they are really needed.
207 * Plugins/WebBaseNetscapePluginView.mm: Soft link all AGL and OpenGL functions used by
208 WebBaseNetscapePluginView.
210 * WebKit.xcodeproj/project.pbxproj: Removed AGL and OpenGL from the project.
212 2007-09-20 John Sullivan <sullivan@apple.com>
214 Build fix for stoooopid old PPC gcc compiler
216 * WebCoreSupport/WebEditorClient.mm:
217 (WebEditorClient::checkSpellingOfString):
218 replace perfectly valid ?: syntax with if/else
220 2007-09-19 John Sullivan <sullivan@apple.com>
222 Reviewed by Darin Adler.
224 - WebKit part of speculative fix for <rdar://problem/5490627>, about crashes constructing a
225 String using the values filled in by checkSpellingOfString()
227 * WebCoreSupport/WebEditorClient.mm:
228 (WebEditorClient::checkSpellingOfString):
229 convert NSNotFound to -1, since WebCore code expects -1 for this purpose. We already do this
230 in checkGrammarOfString.
232 2007-09-19 Kevin Decker <kdecker@apple.com>
234 Reviewed by Darin Adler.
236 <rdar://problem/5491066> soft link Accelerate.framework
238 * Misc/WebGraphicsExtras.c:
239 (WebConvertBGRAToARGB): Improve launch time performance and reduce vsize
240 footprint by soft linking the Accelerate.framework.
241 * WebKit.xcodeproj/project.pbxproj: Remove no longer needed frameworks.
243 2007-09-18 Geoffrey Garen <ggaren@apple.com>
245 Reviewed by Darin Adler.
247 Fixed <rdar://problem/5490204> In some cases, WebKit can make the
248 Foundation disk cache way too big or way too small
250 Use the actual location of the foundation disk cache, rather than
251 the user's home directory, when determining how big to make it.
253 * WebView/WebView.mm:
254 (+[WebView _setCacheModel:]):
256 2007-09-17 Geoffrey Garen <ggaren@apple.com>
258 Reviewed by Darin Adler.
260 Fixed a hang due to an infinite script running in the window's unload
261 event handler, which may be the cause of <rdar://problem/5479443>
262 REGRESSION: Hang due to infinite JS recursion on close @ engadget.com
265 * WebView/WebUIDelegatePrivate.h: Added FIXME.
267 * WebView/WebView.h: Clarified headerdoc ambiguity about when delegate
270 * WebView/WebView.mm:
271 (-[WebView _close]): The fix: don't nil out our delegates until after
272 detaching the FrameLoader, because the act of detaching the FrameLoader
273 might fire important delegate methods, like webViewShouldInterruptJavaScript:.
274 Don't do other tear-down either, because the unload event handler needs
275 to run in a fully constructed page.
277 This change is fairly low risk because niling out our delegates is a
278 very recent, never-shipped feature in WebKit, so it's unlikely that any
279 apps rely on it in a crazy way.
281 2007-09-15 Darin Adler <darin@apple.com>
283 Reviewed by John Sullivan.
285 - fix <rdar://problem/5391540> REGRESSION: Can't drag images from Safari to applications
286 in the dock (Tiger Preview, others in Leopard)
288 * Misc/WebNSPasteboardExtras.mm:
289 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
290 Re-implement code here that has been missing for the last couple of years since we
291 did some image refactoring. Was pretty easy now that we can freely call C++ code
294 2007-09-14 Mark Rowe <mrowe@apple.com>
298 * WebView/WebArchive.m:
299 (-[WebArchive initWithCoder:]): Use @catch(id) rather than @catch(...).
300 * WebView/WebPreferences.m:
301 (-[WebPreferences initWithCoder:]): Ditto.
302 * WebView/WebResource.mm:
303 (-[WebResource initWithCoder:]): Ditto.
304 (-[WebResource _initWithPropertyList:]): Ditto.
306 2007-09-14 Darin Adler <darin@apple.com>
308 Reviewed by Geoff Garen and Tim Hatcher.
310 - fixed <rdar://problem/5482745> initFromCoder: and initWithPropertyList: functions
311 should guard against incorrect types
313 * WebView/WebArchive.m:
314 (isArrayOfClass): Added helper function.
315 (-[WebArchive _initWithPropertyList:]): Tweaked function to remove the need for a
317 (-[WebArchive initWithCoder:]): Added type checking for the main resource,
318 subresources array, and subframe archives array. Also replaced NS_DURING with @try.
319 * WebView/WebPreferences.m: (-[WebPreferences initWithCoder:]): Added type checking
320 for the identifier and the values dictionary, including ensuring that it's a mutable
322 * WebView/WebResource.mm:
323 (-[WebResource initWithCoder:]): Added type checking for all the fields.
324 (-[WebResource _initWithPropertyList:]): Added type checking for the NSURLResponse.
326 * WebKit.exp: Removed accidentally exported internal symbol; I checked and it's not
329 2007-09-13 Darin Adler <darin@apple.com>
333 - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
334 <input> elements with maxlength limit
336 * WebView/WebHTMLView.mm:
337 (-[WebHTMLView _selectionChanged]): Tweaked code a bit.
338 (-[WebHTMLView markedRange]): Simplified logic, since markedTextNSRange works when there's
339 no composition range.
340 (-[WebHTMLView hasMarkedText]): Call directly to Editor instead of bridge.
341 (-[WebHTMLView unmarkText]): Call new confirmComposition to make it clear that this is
342 confirming text, not just unmarking it to discard it.
343 (extractUnderlines): Added. Converts directly from an NSAttributedString to the
344 CompositionUnderline vector that's used by WebCore.
345 (-[WebHTMLView setMarkedText:selectedRange:]): Changed to use the new setComposition.
346 (-[WebHTMLView insertText:]): Changed to use confirmComposition when appropriate, instead
347 of relying on special behavior of Editor::insertText.
348 (-[WebHTMLView _updateSelectionForInputManager]): Rewrote to use getCompositionSelection
349 and confirmCompositionWithoutDisturbingSelection.
351 * WebCoreSupport/WebEditorClient.h:
352 * WebCoreSupport/WebEditorClient.mm:
353 Removed obsolete markedTextAbandoned function.
355 2007-09-12 David Kilzer <ddkilzer@apple.com>
357 Rubber-stamped by Darin and reviewed by Adam.
359 Removed import of unused icon database headers.
361 * WebCoreSupport/WebFrameBridge.mm:
363 2007-09-11 Timothy Hatcher <timothy@apple.com>
367 Remove the unused class_getMethodImplementation function.
369 * Misc/WebNSObjectExtras.h:
371 2007-09-11 Geoffrey Garen <ggaren@apple.com>
373 Reviewed by Oliver Hunt.
375 Fixed CFNetwork version check so it actually works.
377 * Misc/WebKitVersionChecks.h:
378 * WebView/WebView.mm:
379 (+[WebView _setCacheModel:]): Don't use NSVersionOfLinkTimeLibrary because
380 we don't link against CFNetwork directly, so it returns -1. Also, use
381 the proper hex encoding instead of decimal numbers.
383 2007-09-11 Darin Adler <darin@apple.com>
385 - redo fix for <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
387 * WebView/WebView.mm:
389 (-[WebView _cacheResourceLoadDelegateImplementations]): Use getMethod.
390 (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
392 2007-09-11 Darin Adler <darin@apple.com>
394 Rubber-stamped by Dave Harrison.
396 * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
397 Removed wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
399 2007-09-11 Darin Adler <darin@apple.com>
401 Reviewed by Mark Rowe.
403 - fix <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
405 * Misc/WebNSObjectExtras.h:
406 (class_getMethodImplementation): Added.
407 (method_setImplementation): Added.
409 * WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]):
410 * Carbon/HIViewAdapter.m: (+[HIViewAdapter bindHIViewToNSView:nsView:]):
411 Remove old-ObjC code path, since WebNSObjectExtras.h now implements everything we need.
413 * WebView/WebView.mm:
414 (-[WebView _cacheResourceLoadDelegateImplementations]): Don't bother doing a separate
415 respondsToSelector call, since class_getMethodImplementation will return 0 for selectors
416 that we don't respond to. The bug fix is to actually set the cached pointer to 0.
417 Also get rid of the unnecessary use of a macro; instead use the functions from
418 WebNSObjectExtras.h on Tiger and the appropriate function directly on Leopard.
419 (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
421 2007-09-11 Darin Adler <darin@apple.com>
423 Reviewed by Sam, Ollie.
425 * WebView/WebView.mm: (+[WebView _setCacheModel:]): A slightly cleaner 64-bit
426 fix for the NSURLCache capacity code in this file.
428 2007-09-11 Darin Adler <darin@apple.com>
430 Rubber-stamped by Mark Rowe.
432 * Misc/WebNSPasteboardExtras.mm: Fix incorrect strings in my last check-in.
433 The strings I checked in were wrong and were breaking layout tests too.
434 These new ones match what WebKitSystemInterface was returning.
436 2007-09-10 Geoffrey Garen <ggaren@apple.com>
438 Fixed 64-bit build (I think).
440 * WebView/WebView.mm:
441 (max): Added. In 64-bit land, -diskCapacity magically starts returning
442 unsigned long instead of unsigned, so we define a custom max() that's
443 willing to compare unsigned to unsigned long.
445 2007-09-10 Darin Adler <darin@apple.com>
447 Reviewed by Tim Hatcher.
449 - <rdar://problem/5471082> Removing WebURLPboardType from headers broke SPI-using applications
451 Rolled out my fix for bug 4582212 and fixed it in a much simpler way.
453 * Misc/WebNSPasteboardExtras.h:
454 * Misc/WebNSPasteboardExtras.mm:
455 * WebCoreSupport/WebPasteboardHelper.mm:
457 * WebView/WebHTMLView.mm:
458 * WebView/WebView.mm:
459 Rolled out the new PasteboardType functions and changed the PboardType globals to be initialized
460 with constant values.
462 2007-09-10 Timothy Hatcher <timothy@apple.com>
466 Always animate when calling _scrollTo.
468 * WebView/WebFrameView.mm:
469 (-[WebFrameView _scrollVerticallyBy:]):
470 (-[WebFrameView _scrollHorizontallyBy:]):
472 2007-09-08 Brady Eidson <beidson@apple.com>
476 <rdar://problem/5434431> - Asynchronous Icon Database
478 WebKit side of things
479 Mainly, there are Notifications WebKit has to listen for now that tell it when to either call back into WebCore
480 for some purpose or to send the webView:didReceiveIcon: delegate call
482 Many smaller tweaks as well.
484 * Misc/WebIconDatabase.h:
485 * Misc/WebIconDatabase.mm:
487 (-[WebIconDatabase init]):
488 (+[WebIconDatabase delayDatabaseCleanup]): Accessor so clients can prevent the thread from cleaning up the database
489 before they've done all their necessary retaining of icons.
490 (+[WebIconDatabase allowDatabaseCleanup]):
491 (-[WebIconDatabase removeAllIcons]):
492 (-[WebIconDatabase _isEnabled]):
493 (-[WebIconDatabase _sendNotificationForURL:]):
494 (-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
495 (-[WebIconDatabase _databaseDirectory]):
497 (-[ThreadEnabler threadEnablingSelector:]): Quick and dirty class to enabled Cocoa multithreading
498 (+[ThreadEnabler enableThreading]):
499 (importToWebCoreFormat):
500 * Misc/WebIconDatabaseInternal.h: Expose the internal methods of WebIconDatabase that are required by WebIconDatabaseClient
502 * Misc/WebNSNotificationCenterExtras.h: Added. - Great utility class whose design was borrowed from Colloquy
503 that allows the posting of a Cocoa notification on the main thread from *any* thread
504 * Misc/WebNSNotificationCenterExtras.m: Added.
505 (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:]):
506 (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:]):
507 (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]):
508 (+[NSNotificationCenter _postNotificationName:]):
510 * WebCoreSupport/WebFrameLoaderClient.h:
511 * WebCoreSupport/WebFrameLoaderClient.mm:
512 (WebFrameLoaderClient::dispatchDidReceiveIcon): Send the webView:didReceiveIcon: delegate call
513 (WebFrameLoaderClient::registerForIconNotification):
515 * WebCoreSupport/WebIconDatabaseClient.h: Added.
516 * WebCoreSupport/WebIconDatabaseClient.mm: Added.
517 (WebIconDatabaseClient::performImport): Perform the Safari 2 icon import
518 (WebIconDatabaseClient::dispatchDidRemoveAllIcons): Send the NSNotification
519 (WebIconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
521 * WebView/WebView.mm:
522 (-[WebView _receivedIconChangedNotification:]): Check and see if this notification is for this WebView's current URL by
523 calling back into the IconDatabase
524 (-[WebView _registerForIconNotification:]): Support for WebIconDatabaseClient
525 (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Dispatch this delegate call as well as unregister for the notification
526 * WebView/WebViewInternal.h:
528 * WebKit.xcodeproj/project.pbxproj:
530 2007-09-07 Geoffrey Garen <ggaren@apple.com>
532 Suggested by Maciej Stachowiak.
534 Added wKiosk Browser to the browser list. Pretty sweet app.
536 * WebView/WebPreferences.m:
537 (cacheModelForMainBundle):
539 2007-09-07 Geoffrey Garen <ggaren@apple.com>
543 * WebView/WebView.mm:
544 (+[WebView _setCacheModel:]):
546 2007-09-05 Geoffrey Garen <ggaren@apple.com>
548 Reviewed by Darin Adler, Maciej Stachowiak, Mark Rowe, Tim Hatcher.
550 Fixed <rdar://problem/5326009> Make non-browser WebKit clients have no
551 memory cache, or a very tiny one
553 High level explanation:
554 - Added SPI for specifying a cache model on a per-WebView basis.
555 (Hopefully, this will become API soon.) We balance competing
556 cache models simply by using the largest one that pertains at a
559 - Added heuristic for guessing a default cache model in WebViews
560 that don't specify one:
561 1) Default to DocumentViewer for apps linked on or after this
562 WebKit. Default to DocumentBrowser otherwise.
564 2) Assign specific defaults to well-known clients based on
567 3) Grow the default to DocumentBrowser if a navigation takes
570 - As a part of the DocumentBrowser & PrimaryWebBrowser settings:
571 1) Make the Foundation disk cache much much bigger than the
572 default 20MB, if space allows. (This is a hedge against a small
573 WebCore cache in DocumentBrowser mode, but also an all-around
574 win for page load speed.)
576 2) Scaled the Foundation memory cache's capacity with physical
577 RAM, just like we do with other caches. This is a small win on
580 * Misc/WebKitSystemBits.h:
581 * Misc/WebKitSystemBits.m:
582 (WebMemorySize): Renamed from "WebSystemMainMemory."
583 (WebHomeDirectoryFreeSize): Added function to measure the free space
584 on the user's home directory. We use this as a factor in determining
585 the disk cache's cacpacity.
587 * Misc/WebKitVersionChecks.h: Support for linked on or after check.
589 * WebCoreSupport/WebFrameLoaderClient.h:
590 * WebCoreSupport/WebFrameLoaderClient.mm:
591 (WebFrameLoaderClient::didPerformFirstNavigation): Implementation of
594 * WebView/WebPreferenceKeysPrivate.h:
595 * WebView/WebPreferences.m:
596 (cacheModelForMainBundle): Implementation of heuristic rule #2.
597 (-[NSMutableDictionary _web_checkLastReferenceForIdentifier:]): Added
598 notification for when a WebPreferences instance becomes inert. We use
599 this to shrink the cache model back down if possible. Moved this code
600 into a WebPreferences method, since it's not really a feature of
603 * WebView/WebPreferencesPrivate.h: SPI declarations.
605 * WebView/WebView.mm: Replaced manual notification posts with calls to
606 the _postPreferencesChangesNotification convenience method.
608 (-[WebView _preferencesChangedNotification:]): Merged dispersed code
609 for updating preferences-related settings into this one function. This
610 was needed for an earlier version of the patch, even though the
611 current version could probably do without it.
613 (+[WebView _preferencesChangedNotification:]): Added a class-level
614 listener for WebPreferences changes. This listener takes care of
615 modifying the class-level global cache model setting if necessary.
617 (+[WebPreferences standardPreferences]): Removed call to
618 _postPreferencesChangesNotification because the notification already
619 posts when you create the WebPreferences object. (I noticed this
620 inefficiency because my new _preferencesChangedNotification: method was
621 called excessively at startup.)
623 Also Added explicit tracking of WebPreferences clients, so we know when
624 a WebPreferences instance becomes inert:
626 (-[WebPreferences didRemoveFromWebView]):
627 (-[WebPreferences willAddToWebView]):
629 (+[WebView _setCacheModel:]): Translates a cache model into actual
630 settings in various APIs. Caches that have unbounded value grow
631 linearly relative to available space. Caches that have bounded value
632 grow inverse-squaredly relative to available space.
635 2007-09-05 Timothy Hatcher <timothy@apple.com>
639 <rdar://problem/5443883> Uncaught Objective-C exceptions in WebKit clients lead to hard-to-diagnose crashes
641 Changed all the direct delegate calls to use helper functions that have direct access to
642 WebView's delegate objects. These helper methods will catch any ObjC exceptions and call
643 ReportDiscardedDelegateException to log the discarded exception. WebView's that have
644 catchesDelegateExceptions set to NO will not pay the cost of a @try/@catch. The delegate
645 forwarders also have the same behavior.
647 * Misc/WebKitLogging.h:
648 * Misc/WebKitLogging.m:
649 (ReportDiscardedDelegateException):
650 * Plugins/WebBaseNetscapePluginView.mm:
651 (-[WebBaseNetscapePluginView loadPluginRequest:]):
652 * Plugins/WebNullPluginView.mm:
653 (-[WebNullPluginView viewDidMoveToWindow]):
654 * WebCoreSupport/WebChromeClient.mm:
655 (WebChromeClient::createWindow):
656 (WebChromeClient::createModalDialog):
657 (WebChromeClient::runModal):
658 (WebChromeClient::toolbarsVisible):
659 (WebChromeClient::statusbarVisible):
660 (WebChromeClient::addMessageToConsole):
661 (WebChromeClient::canRunBeforeUnloadConfirmPanel):
662 (WebChromeClient::runBeforeUnloadConfirmPanel):
663 (WebChromeClient::runJavaScriptAlert):
664 (WebChromeClient::runJavaScriptConfirm):
665 (WebChromeClient::runJavaScriptPrompt):
666 (WebChromeClient::shouldInterruptJavaScript):
667 (WebChromeClient::setStatusbarText):
668 (WebChromeClient::print):
669 * WebCoreSupport/WebContextMenuClient.mm:
670 (WebContextMenuClient::getCustomMenuFromDefaultItems):
671 (WebContextMenuClient::contextMenuItemSelected):
672 * WebCoreSupport/WebDragClient.mm:
673 (WebDragClient::startDrag):
674 * WebCoreSupport/WebEditorClient.mm:
675 (WebEditorClient::textFieldDidBeginEditing):
676 (WebEditorClient::textFieldDidEndEditing):
677 (WebEditorClient::textDidChangeInTextField):
678 (WebEditorClient::doTextFieldCommandFromEvent):
679 (WebEditorClient::textWillBeDeletedInTextField):
680 (WebEditorClient::textDidChangeInTextArea):
681 * WebCoreSupport/WebFrameBridge.mm:
682 (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
683 * WebCoreSupport/WebFrameLoaderClient.mm:
684 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
685 (WebFrameLoaderClient::assignIdentifierToInitialRequest):
686 (WebFrameLoaderClient::dispatchWillSendRequest):
687 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
688 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
689 (WebFrameLoaderClient::dispatchDidReceiveResponse):
690 (WebFrameLoaderClient::willCacheResponse):
691 (WebFrameLoaderClient::dispatchDidReceiveContentLength):
692 (WebFrameLoaderClient::dispatchDidFinishLoading):
693 (WebFrameLoaderClient::dispatchDidFailLoading):
694 (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
695 (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
696 (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
697 (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
698 (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
699 (WebFrameLoaderClient::dispatchWillClose):
700 (WebFrameLoaderClient::dispatchDidReceiveIcon):
701 (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
702 (WebFrameLoaderClient::dispatchDidReceiveTitle):
703 (WebFrameLoaderClient::dispatchDidCommitLoad):
704 (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
705 (WebFrameLoaderClient::dispatchDidFailLoad):
706 (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
707 (WebFrameLoaderClient::dispatchDidFinishLoad):
708 (WebFrameLoaderClient::dispatchDidFirstLayout):
709 (WebFrameLoaderClient::dispatchCreatePage):
710 (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
711 (WebFrameLoaderClient::dispatchWillSubmitForm):
712 (WebFrameLoaderClient::dispatchDidLoadMainResource):
713 * WebView/WebHTMLView.mm:
714 (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]):
715 (-[WebHTMLView validateUserInterfaceItem:]):
716 * WebView/WebPDFView.mm:
717 (-[WebPDFView validateUserInterfaceItem:]):
718 (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
719 * WebView/WebView.mm:
720 (-[WebView _openNewWindowWithRequest:]):
721 (-[WebView _menuForElement:defaultItems:]):
722 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
723 (-[WebView _cacheResourceLoadDelegateImplementations]):
724 (-[WebView _cacheFrameLoadDelegateImplementations]):
725 (-[WebView _policyDelegateForwarder]):
726 (-[WebView _UIDelegateForwarder]):
727 (-[WebView _editingDelegateForwarder]):
728 (-[WebView _scriptDebugDelegateForwarder]):
729 (-[WebView _setCatchesDelegateExceptions:]):
730 (-[WebView _catchesDelegateExceptions]):
731 (-[_WebSafeForwarder initWithTarget:defaultTarget:]):
732 (-[_WebSafeForwarder forwardInvocation:]):
733 (-[_WebSafeForwarder methodSignatureForSelector:]):
734 (-[WebView _commonInitializationWithFrameName:groupName:]):
735 (-[WebView validateUserInterfaceItem:]):
736 (-[WebView _headerHeight]):
737 (-[WebView _footerHeight]):
738 (-[WebView _drawHeaderInRect:]):
739 (-[WebView _drawFooterInRect:]):
740 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
742 (CallDelegateReturningFloat):
743 (CallDelegateReturningBoolean):
745 (CallUIDelegateReturningFloat):
746 (CallUIDelegateReturningBoolean):
747 (CallFrameLoadDelegate):
748 (CallResourceLoadDelegate):
750 (CallFormDelegateReturningBoolean):
751 * WebView/WebViewInternal.h:
752 * WebView/WebViewPrivate.h:
755 2007-09-04 Timothy Hatcher <timothy@apple.com>
759 <rdar://problem/5452908> NIBs saved in the Pre-10.2 format while Safari 3 installed do not work without Safari 3
761 This happened because we encoded a new field that the old WebKit does not know how to read.
762 And NSCoder throws an exception if initWithCoder finishes while there is still unread data in the archive.
764 The WebViewVersion is now 4 to distinguish that we do not encode/decode allowsUndo.
766 * WebView/WebView.mm:
767 (-[WebView initWithCoder:]): Only try to read allowsUndo if the version is 3.
768 (-[WebView encodeWithCoder:]): No longer encode allowsUndo.
770 2007-09-04 David Hyatt <hyatt@apple.com>
772 Fix for <rdar://problem/5271213>, resizing iChat window is slower than in
773 Tiger. This patch implements a fast scaling mode that can be used by
774 WebViews, e.g., during window resizing.
776 Reviewed by John Sullivan
778 * WebView/WebView.mm:
779 (-[WebView _setUseFastImageScalingMode:]):
780 (-[WebView _inFastImageScalingMode]):
781 * WebView/WebViewPrivate.h:
783 2007-09-04 Darin Adler <darin@apple.com>
787 * WebView/WebView.mm:
788 (-[WebView _loadBackForwardListFromOtherView:]): Added missing null check.
789 (-[WebView _setInitiatedDrag:]): Ditto.
790 (-[WebView _clearUndoRedoOperations]): Ditto.
791 (-[WebView encodeWithCoder:]): Ditto.
792 (-[WebView backForwardList]): Ditto.
793 (-[WebView setMaintainsBackForwardList:]): Ditto.
795 2007-09-04 Tristan O'Tierney <tristan@apple.com>
797 Reviewed by John Sullivan.
799 <rdar://problem/5454935> Can't reply to this message in Mail -- -[DOMRange webArchive] is throwing an exception
801 * WebView/WebArchiver.mm:
802 (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
803 Guard the creation of WebResource by ensuring that the passed in
804 responseURL is never nil.
806 2007-09-03 Mark Rowe <mrowe@apple.com>
808 Reviewed by Tim Hatcher.
810 <rdar://problem/5452164> Production build with in symbols directory has no debug info
812 Enable debug symbol generation on all build configurations. Production builds are stripped
813 of symbols by Xcode during deployment post-processing.
815 * Configurations/Base.xcconfig:
816 * WebKit.xcodeproj/project.pbxproj:
818 2007-09-02 Brady Eidson <beidson@apple.com>
820 Reviewed by John Sullivan and Mark Rowe
822 Groundwork for support for monitoring IconDatabase in-memory statistics
824 * Misc/WebCoreStatistics.h:
825 * Misc/WebCoreStatistics.mm:
826 (+[WebCoreStatistics iconPageURLMappingCount]):
827 (+[WebCoreStatistics iconRetainedPageURLCount]):
828 (+[WebCoreStatistics iconRecordCount]):
829 (+[WebCoreStatistics iconsWithDataCount]):
831 2007-09-01 Oliver Hunt <oliver@apple.com>
835 <rdar://problem/5344848> IME is incorrectly used for key events when on non-editable regions
837 EditorClient::setInputMethodState stub
839 * WebCoreSupport/WebEditorClient.h:
840 * WebCoreSupport/WebEditorClient.mm:
841 (WebEditorClient::setInputMethodState):
843 2007-08-30 Maciej Stachowiak <mjs@apple.com>
847 <rdar://problem/5439953> REGRESSION: Cannot load feeds in widgets in Dashcode due to change in WebKit delegate methods
849 * WebView/WebFrame.mm:
850 (-[WebFrame _attachScriptDebugger]): Don't create the debugger object if the frame has not yet
851 created its script interpreter, to avoid premature dispatch of windowScriptObjectAvailable/Cleared
852 delegate methods. The script debugger will be created in any case when the window object does appear.
854 2007-08-29 Darin Adler <darin@apple.com>
856 Reviewed by Tim Hatcher.
858 - fix <rdar://problem/4582212> WebKit inappropriately adds +initialize to
859 NSPasteboard via a category, prevents AppKit initialize
860 http://bugs.webkit.org/show_bug.cgi?id=9417
862 * Misc/WebNSPasteboardExtras.h: Got rid of the global data objects and replaced
863 them with global functions.
865 * Misc/WebNSPasteboardExtras.mm:
866 (initializePasteboardTypes): Changed the initialize method to be this function.
867 (WebURLPasteboardType): Added, calls the initialize function and then returns
868 the value of the global.
869 (WebURLNamePasteboardType): Ditto.
870 (+[NSPasteboard _web_writableTypesForURL]): Changed to call the new function instead
871 of getting at the global directly.
872 (+[NSPasteboard _web_dragTypesForURL]): Ditto.
873 (-[NSPasteboard _web_writeURL:andTitle:types:]): Ditto.
874 * WebCoreSupport/WebPasteboardHelper.mm:
875 (WebPasteboardHelper::urlFromPasteboard): Ditto.
876 * WebView/WebHTMLView.mm:
877 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
879 * WebView/WebView.mm:
880 (+[WebView initialize]): Added a call to one of the functions to take advantage
881 of the side effect that initializes the globals; this is to help out old versions
883 (+[WebView URLTitleFromPasteboard:]): Changed to call the new function instead
884 of getting at the global directly.
886 * WebKit.exp: Add exports of the new functions.
888 2007-08-29 Adele Peterson <adele@apple.com>
892 Fix for http://bugs.webkit.org/show_bug.cgi?id=15098
893 <rdar://problem/5440319> REGRESSION (9A530-9A534): Double scroll bar on pdfs
895 * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::makeDocumentView):
896 Don't suppress scrollbars before the view creation if we're making the view for a non-html view
898 * WebView/WebFrameViewInternal.h: Make _scrollView return a WebDynamicScrollBarsView since so many clients were relying on it being that type anyway.
899 * WebView/WebFrameView.mm:
900 (-[WebFrameView _setDocumentView:]):
901 (-[WebFrameView _scrollView]):
902 (-[WebFrameView setAllowsScrolling:]):
903 (-[WebFrameView allowsScrolling]):
904 * WebView/WebView.mm:
905 (-[WebView setAlwaysShowVerticalScroller:]):
906 (-[WebView alwaysShowVerticalScroller]):
907 (-[WebView setAlwaysShowHorizontalScroller:]):
908 (-[WebView alwaysShowHorizontalScroller]):
910 2007-08-29 David Hyatt <hyatt@apple.com>
912 The method that was swizzled to fix 5441281 does not exist on Tiger.
913 Tiger has to do a double swizzle instead (of resetCursorRects and NSCursor's
914 set method) in order to roughly achieve the same effect.
918 * WebView/WebHTMLView.mm:
921 (+[WebHTMLViewPrivate initialize]):
923 2007-08-29 Anders Carlsson <andersca@apple.com>
927 * WebCoreSupport/WebFrameBridge.mm:
929 2007-08-29 David Hyatt <hyatt@apple.com>
931 Fix for 5441281, remove our dependency on cursor rects and drag margins
932 in AppKit for a large performance boost on the PLT and iBench.
936 * Plugins/WebBaseNetscapePluginView.h:
937 * Plugins/WebBaseNetscapePluginView.mm:
938 (-[WebBaseNetscapePluginView sendNullEvent]):
939 (-[WebBaseNetscapePluginView mouseEntered:]):
940 (-[WebBaseNetscapePluginView mouseExited:]):
941 (-[WebBaseNetscapePluginView stop]):
942 Clean up cursor setting from Netscape plugins. Don't unconditionally mutate
943 the cursor when a plugin stops.
945 * WebView/WebFrameView.mm:
946 (-[WebFrameView _setDocumentView:]):
947 Suppress the resetting of drag margins while the new document view is being
948 added to the view hierarchy.
950 * WebView/WebHTMLView.mm:
951 (-[NSWindow _web_borderView]):
952 Expose the border view of the NSWindow so that it can be hit tested.
954 (setCursorForMouseLocation):
955 Apply a method swizzle to override the private AppKit method, _setCursorForMouseLocation.
956 We have to do this to suppress the cursor rect invalidation handling from resetting
957 the cursor for no reason.
959 The swizzle will do a hit test and allow the cursor set to occur if the mouse ends up
960 being over a plugin or over a view other than a WebHTMLView.
962 (+[WebHTMLViewPrivate initialize]):
963 The swizzle for setCursorForMouseLocation is set up here.
965 (-[WebHTMLView _frameOrBoundsChanged]):
966 Add a 100ms delay to the fake mouse moved event that fires when the view moves
967 under the mouse (without the mouse moving). This happens on iBench when the
968 pages get scrolled. By adding a delay we ensure that even with the mouse inside
969 the window, we don't experience cursor thrashing when pages are updating and
972 2007-08-28 Anders Carlsson <andersca@apple.com>
976 <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
978 * WebCoreSupport/WebFrameBridge.mm:
979 Use the enum from FrameLoaderTypes.h.
981 * WebCoreSupport/WebFrameLoaderClient.mm:
982 (WebFrameLoaderClient::objectContentType):
983 Return ObjectContentNetscapePlugin and ObjectContentOtherPlugin depending on the plug-in type.
985 2007-08-28 Mark Rowe <mrowe@apple.com>
987 Reviewed by Maciej Stachowiak.
989 Fix fallout from the fix for <rdar://problem/5437983> (Loading history containing 100,000 entries adds 20s to Safari's startup)
990 in r25275. The array of entries for each day was being maintained in the reverse of the order that was expected.
992 * History/WebHistory.mm:
993 (-[WebHistoryPrivate insertItem:forDateKey:]): Maintain the array of entries in descending order.
995 2007-08-28 Mark Rowe <mrowe@apple.com>
997 Fix the buildbot build.
999 * History/WebHistory.mm:
1000 (timeIntervalForBeginningOfDay): Explicitly cast to silence compiler warning.
1002 2007-08-28 Mark Rowe <mrowe@apple.com>
1004 Reviewed by Darin Adler.
1006 <rdar://problem/5437983> Loading history containing 100,000 entries adds 20s to Safari's startup
1008 Move WebHistoryItemPrivate from using a sorted array of NSCalendarDate's that map to a sorted array of arrays
1009 of WebHistoryItem's over to using a HashMap of NSTimeIntervals and arrays of WebHistoryItems. NSTimeInterval
1010 uses less memory and is substantially cheaper during comparisons than NSCalendarDate. The use of the HashMap
1011 avoids the needs to repeatedly search within an array to locate the array that corresponds to the given days
1014 The result of these changes is that loading 100,000 history items drops from around 25s to 1.6s. Loading
1015 100 items drops from 0.003s to 0.002s.
1017 * History/WebHistory.mm:
1018 (-[WebHistoryPrivate init]):
1019 (-[WebHistoryPrivate dealloc]):
1020 (timeIntervalForBeginningOfDay): Return the NSTimeInterval representing the beginning of the specified day.
1021 (-[WebHistoryPrivate findKey:forDay:]):
1022 (-[WebHistoryPrivate insertItem:forDateKey:]): Perform a binary search within the day's history items rather than a linear search.
1023 (-[WebHistoryPrivate _removeItemFromDateCaches:]):
1024 (-[WebHistoryPrivate _addItemToDateCaches:]):
1025 (-[WebHistoryPrivate removeAllItems]):
1026 (-[WebHistoryPrivate orderedLastVisitedDays]): Generate and cache the sorted NSArray of NSCalendarDate's exposed in the API.
1027 This cache is invalidated by _removeItemFromDateCaches: and _addItemToDateCaches: when needed.
1028 (-[WebHistoryPrivate orderedItemsLastVisitedOnDay:]):
1029 (-[WebHistoryPrivate arrayRepresentation]):
1030 (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): Use an autorelease pool to keep the
1031 number of live autoreleased objects generated to a reasonable level.
1032 * History/WebHistoryItem.mm:
1033 (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
1034 (-[WebHistoryItem initFromDictionaryRepresentation:]): Use the new HistoryItem constructor that accepts the alternate title
1035 rather than setting it after construction. This prevents a modification notification from being sent for each WebHistoryItem that is loaded.
1036 * History/WebHistoryItemInternal.h:
1037 * History/WebHistoryPrivate.h:
1038 * Misc/WebNSCalendarDateExtras.h: Removed as _webkit_compareDay: is no longer used.
1039 * Misc/WebNSCalendarDateExtras.m: Removed.
1040 * WebKit.xcodeproj/project.pbxproj:
1042 2007-08-28 Anders Carlsson <andersca@apple.com>
1046 <rdar://problem/5298296> XMLHttpRequest readyState 3 & responseText buffer issues
1048 Expose WKSetNSURLRequestShouldContentSniff to WebCore.
1050 * WebCoreSupport/WebSystemInterface.m:
1051 (InitWebCoreSystemInterface):
1053 2007-08-24 Kevin McCullough <kmccullough@apple.com>
1057 <rdar://problem/5437038> 1 credential object leaked for each call to credentialWithUser:password:persistence
1058 - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
1060 * Panels/WebAuthenticationPanel.m:
1061 (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
1062 (-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
1064 2007-08-24 Adele Peterson <adele@apple.com>
1066 Fix by Darin, reviewed by Adele.
1068 Fix for <rdar://problem/5433422> Upon quitting, WebKit loads the WebPlugin shared database and immediately closes it
1070 * Plugins/WebPluginDatabase.h: Added closeSharedDatabase, which won't create a new database if we're just trying to close it.
1071 * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase closeSharedDatabase]): Added.
1072 * WebView/WebView.mm:
1073 (-[WebView _close]): Call closeSharedDatabase.
1074 (+[WebView _applicationWillTerminate]): Call closeSharedDatabase.
1076 2007-08-24 Timothy Hatcher <timothy@apple.com>
1078 Reviewed by John Sullivan.
1080 <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1082 This is a more localized fix for yesterday's change. Now explicitly call _web_layoutIfNeededRecursive inside the
1083 HIWebView Draw() function. Adds a FIXME to explain that we need to do layout before Carbon has decided what regions to draw.
1084 Doing layout in Draw() will potentially cause drawing to happen in two passes, but this has always been a problem in Carbon.
1086 * Carbon/HIWebView.m:
1087 (Draw): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
1088 (SetFocusPart): Fix to work in ObjC++ (now that HIWebView.m is treated as a ObjC++ file.)
1089 * WebView/WebView.mm: Removes the 4 displayIfNeeded methods from yesterday's change.
1090 * WebKit.xcodeproj/project.pbxproj: Force the file type of HIWebView.m to ObjC++ so WebHTMLViewInternal.h can be included.
1092 2007-08-23 Timothy Hatcher <timothy@apple.com>
1094 Reviewed by Dave Hyatt.
1096 <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1098 The Carbon HIWebView was relying on layout happening when displayIfNeededInRect: was called on the WebView.
1099 This would happen on Tiger because _recursiveDisplayRectIfNeededIgnoringOpacity: would always do a layout if needed.
1100 Doing a layout in _recursiveDisplayRectIfNeededIgnoringOpacity was removed in Leopard in favor of viewWillDraw, and
1101 the fact that adding new dirty rects inside _recursiveDisplayRectIfNeededIgnoringOpacity on Leopard will not
1102 cause a drawRect in the same display loop.
1104 So any client on Leopard calling displayIfNeeded* on the WebView would get a layout and any new dirty rects. So
1105 _web_layoutIfNeededRecursive needs to be called on the main frame's WebHTMLView to make sure we layout and
1106 display anything that is really needed.
1108 * WebView/WebHTMLView.mm:
1109 (-[WebHTMLView _layoutIfNeeded]):
1110 (-[WebHTMLView _web_layoutIfNeededRecursive]):
1111 * WebView/WebHTMLViewInternal.h:
1112 * WebView/WebView.mm:
1113 (-[WebView displayIfNeeded]): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
1114 (-[WebView displayIfNeededIgnoringOpacity]): Ditto.
1115 (-[WebView displayIfNeededInRect:]): Ditto.
1116 (-[WebView displayIfNeededInRectIgnoringOpacity:]): Ditto.
1118 2007-08-22 Timothy Hatcher <timothy@apple.com>
1120 Rolling out r25102 for <rdar://problem/5410937> until
1121 <rdar://problem/5429920> is resolved.
1123 * Carbon/CarbonUtils.m:
1126 * Carbon/CarbonWindowAdapter.h:
1127 * Carbon/CarbonWindowAdapter.m:
1128 * Carbon/CarbonWindowContentView.h:
1129 * Carbon/CarbonWindowContentView.m:
1130 * Carbon/CarbonWindowFrame.h:
1131 * Carbon/CarbonWindowFrame.m:
1132 * Carbon/HIViewAdapter.h:
1133 * Carbon/HIViewAdapter.m:
1134 * Carbon/HIWebView.h:
1135 * Carbon/HIWebView.m:
1137 2007-08-20 John Sullivan <sullivan@apple.com>
1139 Reviewed by Adam Roben
1141 WebKit part of fix for:
1142 <rdar://problem/5417777> WebKit focus ring color no longer matches system focus rings
1144 * Misc/WebNSAttributedStringExtras.mm:
1145 now includes <WebCore/ColorMac.h> to account for moved declaration
1146 * WebView/WebFrame.mm:
1149 * WebView/WebViewPrivate.h:
1150 * WebView/WebView.mm:
1151 (+[WebView _setUsesTestModeFocusRingColor:]):
1152 new SPI, calls through to new WebCore function. This is used by DumpRenderTree to make sure the
1153 focus ring color is always the same when performing layout tests, regardless of OS X version.
1154 (+[WebView _usesTestModeFocusRingColor]):
1155 new SPI, calls through to new WebCore function
1157 2007-08-20 Antti Koivisto <antti@apple.com>
1161 Fix <rdar://problem/5378390>
1162 Crash at Range::startContainer() when creating multiple ToDos on the same line
1166 No layout test, this only happens with ObjC API.
1168 * WebView/WebHTMLView.mm:
1169 (-[WebHTMLView _expandSelectionToGranularity:]):
1171 2007-08-20 Maciej Stachowiak <mjs@apple.com>
1173 Not reviewed, fix for crash on launch bug in last patch.
1175 * WebView/WebHTMLView.mm:
1176 (-[WebHTMLView setDataSource:]): Remove an assertion, fix code to work right in the
1177 face of that condition.
1179 2007-08-18 Maciej Stachowiak <mjs@apple.com>
1183 - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
1185 There were three main cuases of extra time due to creating the initial empty document:
1187 1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
1188 2) Parsing the minimal markup for the initial document's contents.
1189 3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
1191 The WebKit part of the fixes addresses 1.
1193 * WebCoreSupport/WebFrameLoaderClient.mm:
1194 (WebFrameLoaderClient::makeDocumentView): When switching from the initial
1195 empty document to the first real document, reuse the WebHTMLView.
1197 It might actually be a significant performance improvement to always
1198 reuse the WebHTMLView, but that is a much riskier change and not
1199 needed to fix the regression right now.
1201 2007-08-17 Maciej Stachowiak <mjs@apple.com>
1205 - WebKit part of fix to scrollbar suppression hack for Leopard
1207 * WebView/WebDynamicScrollBarsView.m:
1208 (-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
1209 when scrollbars are suppressed.
1210 (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
1211 here, when unsuppressing.
1213 2007-08-17 Darin Adler <darin@apple.com>
1217 - fix <rdar://problem/5414518> Use root URL as origin URL when quarantining downloads
1219 * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::setOriginalURLForDownload):
1220 Extract only the scheme and host name and make the originating URL from that.
1222 * WebKit/StringsNotToBeLocalized.txt: Updated for recent changes.
1224 2007-08-17 Timothy Hatcher <timothy@apple.com>
1228 <rdar://problem/5398301> Xcode threw mutation exception while enumerating subviews (GC only)
1230 I was never able to reproduce this exception. But there can be cases where layout will
1231 trigger JavaScript or plugin code that can modify the WebView view hierarchy during a
1232 recursive enumeration of all the subviews.
1234 This patch does two things:
1235 1) Adds a check in debug builds that will LOG when any view is added or removed during layout.
1236 Noting that added views will not recieve layout this round and might paint without first recieving layout.
1238 2) Recursivly builds up an array of descendant WebHTMLViews before calling layout on them.
1239 This matches the behavior of makeObjectsPerformSelector: in the non-GC case (making a copy
1240 before enumerating.)
1242 * WebView/WebHTMLView.mm:
1243 (-[WebHTMLView _web_setPrintingModeRecursive]): Use _web_addDescendantWebHTMLViewsToArray to build up an array
1244 of WebHTMLViews to enumerate.
1245 (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
1246 (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
1247 (-[WebHTMLView _web_layoutIfNeededRecursive]): Ditto.
1248 (-[WebHTMLView _layoutIfNeeded]): Moved to WebHTMLViewFileInternal category.
1249 (-[WebHTMLView didAddSubview:]): LOG in debug builds.
1250 (-[WebHTMLView willRemoveSubview:]): Ditto.
1251 (-[NSView _web_addDescendantWebHTMLViewsToArray:]): Recursivly build an array of descendant WebHTMLViews.
1252 * WebView/WebHTMLViewInternal.h: Added a BOOL in WebHTMLViewPrivate to track subview changes (debug only.)
1254 2007-08-17 Anders Carlsson <andersca@apple.com>
1256 Reviewed by Dave Hyatt.
1258 <rdar://problem/5379040>
1259 REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
1261 Pass the right size when creating the views.
1263 * WebCoreSupport/WebFrameBridge.mm:
1264 (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1265 * WebCoreSupport/WebFrameLoaderClient.h:
1266 * WebCoreSupport/WebFrameLoaderClient.mm:
1267 (WebFrameLoaderClient::createPlugin):
1269 2007-08-13 Geoffrey Garen <ggaren@apple.com>
1271 Reviewed by Dave Hyatt.
1273 WebKit changes to support new cache eviction model in WebCore.
1275 * WebView/WebPreferences.m:
1276 (+[WebPreferences initialize]): Modified to reflect new API in WebCore.
1277 * WebView/WebView.mm:
1278 (+[WebView _initializeCacheSizesIfNecessary]): Slightly increased cache
1279 size on low memory systems to avoid affecting the PLT for now.
1281 2007-08-15 Timothy Hatcher <timothy@apple.com>
1285 <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
1287 HIWebViewCreate now just returns a HIViewRef created with HICocoaViewCreate. This eliminates lots of old code and
1288 makes HIWebView a better citizen starting with Leopard. The old code paths are still needed for Tiger, so now
1289 most of the files in the WebKit/Carbon directory are #ifdef BUILDING_ON_TIGER.
1291 The Tiger code is unchanged and dosen't exhibit the invalidation problem when the window resizes.
1293 * Carbon/CarbonUtils.m:
1294 (WebInitForCarbon): #ifdef BUILDING_ON_TIGER portions of this code that is not needed on Leopard.
1295 * Carbon/CarbonWindowAdapter.h: #ifdef BUILDING_ON_TIGER
1296 * Carbon/CarbonWindowAdapter.m: Ditto.
1297 * Carbon/CarbonWindowContentView.h: Ditto.
1298 * Carbon/CarbonWindowContentView.m: Ditto.
1299 * Carbon/CarbonWindowFrame.h: Ditto.
1300 * Carbon/CarbonWindowFrame.m: Ditto.
1301 * Carbon/HIViewAdapter.h: Ditto.
1302 * Carbon/HIViewAdapter.m: Ditto.
1303 * Carbon/HIWebView.h: Consolidate two #ifdef __OBJC__ blocks into one.
1304 * Carbon/HIWebView.m: Implement Leopard specific HIWebViewCreate, HIWebViewCreateWithClass and HIWebViewGetWebView.
1305 (HIWebViewCreate): Call HIWebViewCreateWithClass passing [WebView class].
1306 (HIWebViewCreateWithClass): Call HICocoaViewCreate with an instance of the class passed in.
1307 (HIWebViewGetWebView): Call HICocoaViewGetView.
1309 2007-08-14 Brady Eidson <beidson@apple.com>
1311 Reviewed by Darin, John, Maciej, Oliver, and Tim
1313 <rdar://problem/5394708> - Crash on launch with corrupt icon database
1315 Expose some new SPI to help recover from this case should it happen again
1317 * Misc/WebIconDatabase.mm:
1318 (-[WebIconDatabase init]): Use the new _databaseDirectory to determine where to open the database on disk
1319 (+[WebIconDatabase _checkIntegrityBeforeOpening]): Tell the icon database to check integrity when it opens
1320 (-[WebIconDatabase _databaseDirectory]): Moved the database-directory-determining logic here as it's now used in two places
1321 * Misc/WebIconDatabasePrivate.h: Added _checkIntegrityBeforeOpening SPI for clients to give hints about when the
1322 integrity check should run
1324 2007-08-12 Alexey Proskuryakov <ap@webkit.org>
1328 http://bugs.webkit.org/show_bug.cgi?id=4648
1329 Shockwave unable to load GZip'd text resources when server sends Content-Length header
1331 * Plugins/WebBaseNetscapePluginStream.mm:
1332 (-[WebBaseNetscapePluginStream startStreamWithResponse:]): Don't trust
1333 -[NSURLResponse expectedContentLength] if Content-Encoding is not identity.
1335 2007-08-10 Timothy Hatcher <timothy@apple.com>
1337 Reviewed by Mark Rowe.
1339 <rdar://problem/5403302> HIWebView.h should be #ifdefed out for 64-bit
1341 * Carbon/HIWebView.h: #ifdef out the header in 64-bit. Adds a comment about 32-bit only.
1342 * Carbon/CarbonUtils.h: Ditto.
1344 2007-08-10 Timothy Hatcher <timothy@apple.com>
1348 <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
1350 Disable NPObject use in 64-bit on Mac OS X. Also generate the 64-bit export file.
1352 * Configurations/WebKit.xcconfig: Point to the generated 64-bit export file.
1353 * Plugins/WebBasePluginPackage.h:
1354 * Plugins/npfunctions.h: #ifdef out this header in 64-bit on Mac OS X.
1355 * WebKit.LP64.exp: Removed.
1356 * WebKit.xcodeproj/project.pbxproj: Generate the the 64-bit export file.
1357 * WebKitPrefix.h: Define WTF_USE_NPOBJECT.
1359 2007-08-10 Anders Carlsson <andersca@apple.com>
1363 <rdar://problem/5390568>
1364 REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source
1366 If the identifier is not in the map, just bail out instead of asserting. This is a better fix for
1367 <rdar://problem/5133420> because WebCore shouldn't have to worry about the lifetime of WebKit objects.
1369 * WebView/WebDocumentLoaderMac.mm:
1370 (WebDocumentLoaderMac::decreaseLoadCount):
1372 2007-08-10 Oliver Hunt <oliver@apple.com>
1376 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
1378 We truncate the returned string to the expected length.
1380 * WebView/WebHTMLView.mm:
1381 (-[WebHTMLView attributedSubstringFromRange:]):
1383 2007-08-09 Mark Rowe <mrowe@apple.com>
1387 <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before +
1389 * Configurations/Version.xcconfig:
1390 * WebKit.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
1391 Version.xcconfig and Info.plist explicit to Xcode.
1393 2007-08-08 Kevin Decker <kdecker@apple.com>
1395 Reviewed by Anders Carlsson.
1397 Fixed: <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
1399 #ifdef'd out Netscape style plug-ins on 64-bit because Mac OS X doesn't support 64-bit Carbon UI.
1401 * Plugins/WebBaseNetscapePluginStream.h:
1402 * Plugins/WebBaseNetscapePluginStream.mm:
1403 * Plugins/WebBaseNetscapePluginView.h:
1404 * Plugins/WebBaseNetscapePluginView.mm:
1405 (+[WebBaseNetscapePluginView getCarbonEvent:]):
1407 * Plugins/WebBaseNetscapePluginViewInternal.h:
1408 * Plugins/WebBaseNetscapePluginViewPrivate.h:
1409 * Plugins/WebBasePluginPackage.m:
1410 (+[WebBasePluginPackage pluginWithPath:]):
1411 * Plugins/WebNetscapePluginEmbeddedView.h:
1412 * Plugins/WebNetscapePluginEmbeddedView.mm:
1413 * Plugins/WebNetscapePluginPackage.h:
1414 * Plugins/WebNetscapePluginPackage.m:
1415 * Plugins/WebNetscapePluginStream.h:
1416 * Plugins/WebNetscapePluginStream.mm:
1417 * Plugins/WebPluginDatabase.m:
1418 (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
1420 * WebCoreSupport/WebFrameBridge.mm:
1421 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
1422 * WebView/WebFrame.mm:
1423 * WebView/WebFramePrivate.h:
1424 * WebView/WebHTMLView.mm:
1425 (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
1426 * WebView/WebHTMLViewInternal.h:
1428 2007-08-07 David Hyatt <hyatt@apple.com>
1430 Fix a botched backout of the Quicktime plugin clipping fix that broke Java. The plugin view should not
1431 be set to autosize with the parent view. Also, cleanup of script objects was removed accidentally as
1436 * Plugins/WebPluginController.mm:
1437 (-[WebPluginController destroyPlugin:]):
1438 (-[WebPluginController destroyAllPlugins]):
1439 * WebCoreSupport/WebFrameBridge.mm:
1440 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
1442 2007-08-03 Brady Eidson <beidson@apple.com>
1446 Fix for http://bugs.webkit.org/show_bug.cgi?id=14824 and <rdar://problem/5372989>
1448 When unregistering a MIMEType, remove it from the WebCore registry unconditionally
1449 When registrying a MIMEType whose view class is WebHTMLView, add it to the WebCore registry
1451 * WebView/WebView.mm:
1452 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
1453 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
1454 (+[WebView registerViewClass:representationClass:forMIMEType:]):
1456 2007-08-03 Timothy Hatcher <timothy@apple.com>
1458 Reviewed by Mark Rowe.
1460 Correct the bundle version check to work in Debug and Release builds too.
1462 * WebKit.xcodeproj/project.pbxproj:
1464 2007-08-02 Brady Eidson <beidson@apple.com>
1468 <rdar://problem/5381463> - setMIMETypesShownAsHTML mutates while enumerating
1470 * WebView/WebView.mm:
1471 (+[WebView setMIMETypesShownAsHTML:]): Copy the dictionary before we work with it.
1473 2007-08-02 Alice Liu <alice.liu@apple.com>
1475 Reviewed by Kevin McCullough.
1477 fixed <rdar://problem/5310312> REGRESSION: javascript is mis-escaped at http://labs.zarate.org/passwd causing bookmarklet to break
1479 * Misc/WebNSURLExtras.mm:
1480 (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
1481 (-[NSURL _web_userVisibleString]):
1482 (-[NSURL _web_URLWithLowercasedScheme]):
1483 (-[NSURL _web_dataForURLComponentType:]):
1484 These 4 changes are just casting changes.
1486 (-[NSString _webkit_stringByReplacingValidPercentEscapes]):
1487 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.
1489 2007-08-01 Anders Carlsson <andersca@apple.com>
1493 * Misc/WebNSURLExtras.mm:
1494 (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
1495 (-[NSURL _web_userVisibleString]):
1496 (-[NSURL _web_URLWithLowercasedScheme]):
1497 (-[NSURL _web_dataForURLComponentType:]):
1499 2007-08-01 Alice Liu <alice.liu@apple.com>
1503 Making WebNSURLExtras objc++
1505 * Misc/WebNSURLExtras.m: Removed.
1506 * Misc/WebNSURLExtras.mm: Copied from WebKit/Misc/WebNSURLExtras.m.
1507 * WebKit.xcodeproj/project.pbxproj:
1509 2007-08-01 Darin Adler <darin@apple.com>
1511 Reviewed by Anders Carlsson and Kevin Decker.
1513 - fix <rdar://problem/5377432> Removal of MakeDataExecutable from 64-bit breaks WebKit build
1515 The trick was to ifdef out more of the code that's only needed to support CFM, which exists
1516 only for 32-bit PowerPC.
1518 * Plugins/WebNetscapePluginPackage.h: Define a SUPPORT_CFM symbol in this internal header when
1519 we support CFM. We support it only on 32-bit PowerPC. Only define the isBundle, isCFM, and
1520 connID fields when SUPPORT_CFM is on. Also use ResFileRefNum instead of SInt16.
1521 * Plugins/WebNetscapePluginPackage.m: Only compile the function pointer and transition vector
1522 functions when SUPPORT_CFM is on.
1523 (-[WebNetscapePluginPackage openResourceFile]): Put the non-bundle case inside a SUPPORT_CFM
1524 ifdef, since all non-CFM plug-ins are bundles.
1525 (-[WebNetscapePluginPackage closeResourceFile:]): Ditto.
1526 (-[WebNetscapePluginPackage _initWithPath:]): Use SUPPORT_CFM to compile out the code for
1527 non-bundle and bundle-based CFM plug-ins, and code that sets isBundle and isCFM.
1528 (-[WebNetscapePluginPackage executableType]): Put the CFM case inside SUPPORT_CFM.
1529 (-[WebNetscapePluginPackage load]): Put the non-bundle and CFM cases inside SUPPORT_CFM.
1530 There was a bit of dead code here.
1531 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Put the non-bundle case inside
1534 2007-07-31 Timothy Hatcher <timothy@apple.com>
1536 Reviewed by Oliver and Beth.
1538 <rdar://problem/5211271> ADOBE Leopard 9A410: At the first Launching InDesign after deactivate, EULA page gets blanked.
1540 Check for more Adobe applications that need the frame reload quirk. Also cache the answer
1541 so the version check dosen't happen more than once.
1543 * WebView/WebView.mm:
1544 (-[WebView _needsAdobeFrameReloadingQuirk]):
1545 (-[WebView _updateWebCoreSettingsFromPreferences:]):
1547 2007-07-30 Adele Peterson <adele@apple.com>
1551 Fix for <rdar://problem/5308020> REGRESSION: Command-N with Dvorak-Qwerty keyboard layout stopped working inside web page text fields
1553 * WebView/WebHTMLView.mm: (-[WebHTMLView _handleStyleKeyEquivalent:]):
1554 The input method may have modified the character we get, so don't use charactersIgnoringModifiers to interpret the character we get.
1556 2007-07-30 John Sullivan <sullivan@apple.com>
1560 - fixed <rdar://problem/5216176> Need WebKit SPI to allow clients using embedded WebViews to avoid
1561 clipping ends of some printed pages
1563 This provides Mail, and other clients that print views that embed WebViews, a way to ensure that
1564 the HTML is laid out for printing before pagination occurs.
1566 * WebView/WebHTMLViewPrivate.h:
1567 new SPI method -_layoutForPrinting
1569 * WebView/WebHTMLView.mm:
1570 (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]):
1571 new method, just like existing _web_setPrintingModeRecursive except passes YES for adjustViewSize
1572 (-[WebHTMLView _layoutForPrinting]):
1573 new SPI method, sets printing mode temporarily to adjust the view size for printing
1574 (-[NSView _web_setPrintingModeRecursiveAndAdjustViewSize]):
1575 new helper method to do the recursion
1577 2007-07-30 Adele Peterson <adele@apple.com>
1581 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/
1583 * WebView/WebHTMLView.mm: (-[WebHTMLView knowsPageRange:]): Nil check for frame.
1585 2007-07-30 Anders Carlsson <andersca@apple.com>
1589 <rdar://problem/5370710>
1590 REGRESSION: After switching from Bookmark view, the Find Banner won't appear while displaying a PDF file
1592 Implement hasHTMLView.
1594 * WebCoreSupport/WebFrameLoaderClient.h:
1595 * WebCoreSupport/WebFrameLoaderClient.mm:
1596 (WebFrameLoaderClient::hasHTMLView):
1598 2007-07-30 Justin Garcia <justin.garcia@apple.com>
1600 Reviewed by Tristan.
1602 <rdar://problem/5098931> Attachments are lost when they are moved into a ToDo after a delete
1604 Mail needs to be asked if it is OK to do the content movement that happens
1605 after a deleting in a situation like this one:
1606 <div contenteditable="plaintext-only">foo</div><div>^bar</div>
1607 so that they can prevent the move or so that they can save content that
1608 will be stripped by the move. This could have been done with shouldInsertNode
1609 and a new WebViewInsertAction for "moves", but WebKit clients like Mail and
1610 DashCode think that a shouldInsert* means that the user pasted something and
1611 perform actions only appropriate for pastes. This change is less risky because
1612 it won't require those clients to change their code.
1614 * DefaultDelegates/WebDefaultEditingDelegate.m:
1615 (-[WebDefaultEditingDelegate webView:shouldMoveRangeAfterDelete:replacingRange:]):
1616 * WebCoreSupport/WebEditorClient.h:
1617 * WebCoreSupport/WebEditorClient.mm:
1618 (WebEditorClient::shouldMoveRangeAfterDelete):
1619 * WebView/WebEditingDelegatePrivate.h:
1621 2007-07-29 Adele Peterson <adele@apple.com>
1625 WebKit part of fix for <rdar://problem/5102522> REGRESSION: Can't tab to webview that doesn't have editable content
1627 * WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Call new setInitialFocus method instead of advanceFocus.
1629 2007-07-27 Darin Adler <darin@apple.com>
1633 * WebKitPrefix.h: Removed the USING_WEBCORE_XXX definitions.
1634 * WebView/WebHTMLView.mm:
1635 (-[WebHTMLView delete:]): Fixed this to use WebCore again; I accidentally revived a dead
1636 code path that didn't work in the last patch!
1637 (-[WebHTMLView deleteToMark:]): Ditto.
1638 (-[WebHTMLView copy:]): Removed the unused side of the ifdef.
1639 (-[WebHTMLView cut:]): Ditto.
1640 (-[WebHTMLView paste:]): Ditto.
1642 2007-07-27 Darin Adler <darin@apple.com>
1644 Reviewed by Tim Hatcher and Oliver Hunt.
1646 - fix <rdar://problem/5355815> webView:doCommandBySelector: isn't getting called for copy:
1648 Added code so that webView:doCommandBySelector: is called for every command.
1650 * WebView/WebHTMLView.mm: Made 44 of the commands use the WEBCORE_COMMAND macro instead
1651 of being handwritten. For all the others, added invocation of COMMAND_PROLOGUE macro at
1652 the start of the command.
1653 (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]): Added.
1654 (-[WebHTMLView callWebCoreCommand:]): Added.
1655 (-[WebHTMLView delete:]): Removed unused code path -- easy to bring back some day, but
1656 we don't need it compiled in.
1657 (-[WebHTMLView deleteBackwardByDecomposingPreviousCharacter:]): Changed so this doesn't
1658 call deleteBackward: any more so we don't call the delegate two times.
1659 (-[WebHTMLView deleteToMark:]): Changed so this doesn't call delete: any more so we don't
1660 call the delegate two times.
1661 (-[WebHTMLView selectToMark:]): Changed so this doesn't call setMark: any more so we don't
1662 call the delegate two times.
1663 (-[WebHTMLView doCommandBySelector:]): Added code to set the private variable
1664 selectorForDoCommandBySelector. This allows callDelegateDoCommandBySelectorIfNeeded to
1665 detect that we've already called the delegate and avoids calling it twice.
1667 * WebView/WebHTMLViewInternal.h: Added the selectorForDoCommandBySelector field.
1669 2007-07-26 Alexey Proskuryakov <ap@webkit.org>
1673 http://bugs.webkit.org/show_bug.cgi?id=14733
1674 Add a logging channel for text input
1675 <rdar://problem/5364667>
1677 * Misc/WebKitLogging.h:
1678 * Misc/WebKitLogging.m:
1679 (WebKitInitializeLoggingChannelsIfNecessary):
1680 * WebView/WebHTMLView.mm:
1681 (-[WebHTMLView validAttributesForMarkedText]):
1682 (-[WebHTMLView textStorage]):
1683 (-[WebHTMLView characterIndexForPoint:]):
1684 (-[WebHTMLView firstRectForCharacterRange:]):
1685 (-[WebHTMLView selectedRange]):
1686 (-[WebHTMLView markedRange]):
1687 (-[WebHTMLView attributedSubstringFromRange:]):
1688 (-[WebHTMLView hasMarkedText]):
1689 (-[WebHTMLView unmarkText]):
1690 (-[WebHTMLView setMarkedText:selectedRange:]):
1691 (-[WebHTMLView doCommandBySelector:]):
1692 (-[WebHTMLView insertText:]):
1694 2007-07-26 Darin Adler <darin@apple.com>
1698 * Misc/WebTypesInternal.h: For use inside the library, use NSInteger and
1699 NSUInteger, just like on Leopard. WebNSInteger and WebNSUInteger are still
1700 present, but they are used in public and private headers only.
1702 * Carbon/CarbonWindowAdapter.m:
1703 * Carbon/CarbonWindowFrame.m:
1704 * DefaultDelegates/WebScriptDebugServer.m:
1705 * History/WebBackForwardList.mm:
1706 * Misc/WebDownload.m:
1707 * Misc/WebSearchableTextView.m:
1708 * Plugins/WebBaseNetscapePluginView.mm:
1709 * WebCoreSupport/WebFrameLoaderClient.mm:
1710 * WebView/WebHTMLView.mm:
1711 * WebView/WebPDFView.mm:
1712 * WebView/WebView.mm:
1713 * WebView/WebViewInternal.h:
1714 Update all implementation files and internal headers to use NSInteger and
1715 NSUInteger rather than WebNSInteger and WebNSUInteger.
1717 2007-07-26 John Sullivan <sullivan@apple.com>
1719 Reviewed by Kevin Decker
1721 - fixed <rdar://problem/5362989> Searching a pdf in some modes shows hilights for all instances
1722 of the word, even those not on the current page
1724 It turns out that there were three different issues here, all contributing to incorrect display
1725 of multiple matches for PDF pages in certain display modes. (1) in non-continuous display modes,
1726 we weren't updating the match rects when the displayed page is changed with page up/down (e.g.);
1727 (2) the mechanism to update the match rects on scrolling was busted except for the first scroll
1728 away from 0,0; (3) the PDFKit API returns selection bounds for non-displayed pages in non-continuous
1729 modes just as if they were the displayed pages. This patch fixes all three issues.
1731 * WebView/WebPDFView.h:
1732 made ivar name even longer
1734 * WebView/WebPDFView.mm:
1735 (-[WebPDFView setPDFDocument:]):
1736 updated for ivar name change
1737 (-[WebPDFView viewDidMoveToWindow]):
1738 observe page-change notifications as well as the others; this is necessary because in the
1739 non-continuous modes the view can be completely updated without any scrolling involved (problem 1)
1740 (-[WebPDFView viewWillMoveToWindow:]):
1741 stop observing page-change notifications
1742 (-[WebPDFView rectsForTextMatches]):
1743 skip any pages that aren't visible; this avoids treating matches on non-displayed non-continous
1744 modes as if they were on the displayed page (problem 3)
1745 (-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
1746 after checking whether scroll position has changed since we last checked it, remember the new
1747 one (d'oh!) (problem 2)
1749 (-[WebPDFView _scaleOrDisplayModeOrPageChanged:]):
1750 renamed to include page changes
1752 (-[WebPDFView _visiblePDFPages]):
1753 new method, returns the set of pages that are at least partly visible
1755 2007-07-24 Oliver Hunt <oliver@apple.com>
1757 Reviewed by Adam and Justin.
1759 <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
1761 editableDOMRangeForPoint:, moveDragCaretToPoint:, and removeDragCaret now call directly into
1762 WebCore without relying on bridge look up through the now removed _bridgeAtPoint:.
1764 * WebKit.xcodeproj/project.pbxproj:
1765 * WebView/WebView.mm:
1766 (-[WebView moveDragCaretToPoint:]):
1767 (-[WebView removeDragCaret]):
1768 (-[WebView editableDOMRangeForPoint:]):
1770 2007-07-24 Kevin Decker <kdecker@apple.com>
1774 <rdar://problem/4699455> REGRESSION (Safari 2->Safari 3): Adobe Reader 7.0.8 plug-in doesn't work
1776 * Plugins/WebNetscapePluginEmbeddedView.h: Added a #define that renames this class to "WebNetscapePluginDocumentView"
1777 This is necessary because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named "WebNetscapePluginDocumentView"
1778 and will not function correctly if it doesn't find a view in the hierarchy without the old class name.
1780 2007-07-24 Mark Rowe <mrowe@apple.com>
1784 <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot
1786 * WebCoreSupport/WebContextMenuClient.mm:
1787 (WebContextMenuClient::contextMenuItemSelected): Release platformItem as we were transferred its ownership by releasePlatformDescription.
1789 2007-07-23 Oliver Hunt <oliver@apple.com>
1793 We have to be able to support insertText: followed by doCommandBySelector: in
1794 order to support the 2- and 3-Set Korean and RuSwitcher IMs at least.
1796 * WebView/WebHTMLView.mm:
1797 (-[WebHTMLView insertText:]):
1799 2007-07-23 Alice Liu <alice.liu@apple.com>
1801 Reverting change 24535 now that a solution has been found that doesn't
1802 involve exposing an interface unnecessarily.
1804 * WebView/WebHTMLView.mm:
1805 * WebView/WebHTMLViewPrivate.h:
1807 2007-07-23 Alice Liu <alice.liu@apple.com>
1809 Reviewed by Oliver Hunt.
1811 Expose [WebHTMLView hasMarkedText] to
1812 fix <rdar://problem/4830074> autocomplete breaks Japanese typing
1814 * WebView/WebHTMLView.mm:
1815 * WebView/WebHTMLViewPrivate.h:
1817 2007-07-22 Darin Adler <darin@apple.com>
1819 * StringsNotToBeLocalized.txt: Updated for recent changes.
1821 2007-07-21 Adam Roben <aroben@apple.com>
1823 Fix REGRESSION: Right-click/control-click broken
1825 http://bugs.webkit.org/show_bug.cgi?id=14658
1826 <rdar://problem/5346830>
1830 * WebCoreSupport/WebContextMenuClient.mm:
1831 (fixMenusToSendToOldClients): Update defaultItemsCount after removing
1832 items from the defaultItems array.
1834 2007-07-20 Oliver Hunt <oliver@apple.com>
1838 <rdar://problem/5319438> REGRESSION: Cannot paste into an active inline input area (14522)
1839 http://bugs.webkit.org/show_bug.cgi?id=14522
1841 AppKit sends noop: to -[WebHTMLView doCommandBySelector:] when an IM does not handle event,
1842 we now check this as it is necessary to work around some IMs that do send messages
1843 (such as insertText: rather than unmarkText: to confirm a composition)
1845 * WebView/WebHTMLView.mm:
1846 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
1847 (-[WebHTMLView doCommandBySelector:]):
1848 * WebView/WebHTMLViewInternal.h:
1850 2007-07-20 Brady Eidson <beidson@apple.com>
1852 Reviewed by Adele and Andersca
1854 <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)
1856 * History/WebBackForwardList.mm:
1857 (-[WebBackForwardList init]): Have a default initializer that uses an empty BackFowardList not associated with a page.
1859 * WebView/WebFrame.mm:
1860 (kit): For clarity's sake, this should return nil, not 0
1862 2007-07-20 Justin Garcia <justin.garcia@apple.com>
1866 <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
1868 * WebCoreSupport/WebEditorClient.h:
1869 * WebCoreSupport/WebEditorClient.mm: Removed the method
1870 for enabling/disabling word selection on right click.
1871 * WebView/WebView.mm: Ditto.
1872 * WebView/WebViewPrivate.h: Removed the getter/setter entirely,
1873 it was in a private Category for Mail, but wasn't used by Mail
1874 on Tiger or Leopard, they apparently implement word selection on
1877 2007-07-20 Timothy Hatcher <timothy@apple.com>
1881 <rdar://problem/5199812> WebView needs to adopt viewWillDraw (moving off of _propagateDirtyRectsToOpaqueAncestors)
1882 <rdar://problem/5017301> REGRESSION: Scroller in Widget Manager splits down the middle while scrolling
1884 On Leopard _propagateDirtyRectsToOpaqueAncestors is no longer called by AppKit. Also marking new dirty rects
1885 underneath _recursiveDisplayRectIfNeededIgnoringOpacity will wait until the next runloop to draw them,
1886 causing rendering to happen in two steps instead of one as WebCore expected.
1888 * WebView/WebHTMLView.mm:
1889 (-[WebHTMLView _topHTMLView]): Move to the file internal category so we can use it in viewWillDraw.
1890 (-[WebHTMLView _isTopHTMLView]): Ditto.
1891 (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]): #ifdef for Tiger only.
1892 (-[WebHTMLView viewWillDraw]): Do a recursive layout if this is the top WebHTMLView.
1893 (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1894 Don't do layout here on Leopard since viewWillDraw handled it.
1895 (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]): Ditto.
1897 2007-07-20 Beth Dakin <bdakin@apple.com>
1899 Reviewed by Tim and Geoff.
1901 Fix for <rdar://problem/5346855> Mail crashes at
1902 WebCore::RenderTableSection:paint + 846 when attempting to display
1903 a HTML based message
1905 After reapplying styles, the RenderView needs layout. However,
1906 layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize used to
1907 return early if the WebHTMLView itself does not need layout.
1908 Because the WebHTMLView is not necessarily in synch with the
1909 RenderTree, returning early here can get us into a bad situation
1910 where we paint before laying out the Render Tree. This patch checks
1911 both the WebHTMLView and the bridge (which checks the RenderView,
1912 etc), so that we do not return early without laying out the Render
1915 Some day, we should phase out WebHTMLView keeping track of
1916 needsLayout at all. But that is a bit beyond the scope of this fix.
1918 * WebView/WebHTMLView.mm:
1919 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1921 2007-07-20 John Sullivan <sullivan@apple.com>
1923 Reviewed by Darin Adler and David Harrison
1925 - fixed <rdar://problem/5307075> REGRESSION: Bottom of some printed pages are truncated
1927 The "avoid orphan" code I added a year ago was causing the page to be imaged to a larger
1928 height (good), but not shrinking everything to compensate (bad). Bad one-year-ago me!
1930 * WebView/WebHTMLViewInternal.h:
1931 added avoidingPrintOrphan boolean
1933 * WebView/WebHTMLView.mm:
1934 (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
1935 clear _private->avoidingPrintOrphan when clearing _private->printing
1936 (-[WebHTMLView _scaleFactorForPrintOperation:]):
1937 take _private->avoidingPrintOrphan into account when computing the scale factor
1938 (-[WebHTMLView knowsPageRange:]):
1939 set _private->avoidingPrintOrphan when we're shrinking to avoid an orphan
1941 2007-07-19 Adam Roben <aroben@apple.com>
1943 Fix <rdar://problem/5344972> REGRESSION: A error dialog occurs when
1944 attempting to ctrl-click in a iChat message window (webview)
1948 * WebCoreSupport/WebContextMenuClient.mm:
1949 (fixMenusToSendToOldClients): Don't check for the Inspect Element item
1950 if we have fewer than 2 items.
1952 2007-07-18 Geoffrey Garen <ggaren@apple.com>
1954 Reviewed by Dave Hyatt.
1956 <rdar://problem/5345099>
1958 Reduced default WebCore cache size from 32 MB to 23 MB on systems below
1959 512 MB RAM. This improves RPRVT usage in the Safari pageout test by
1960 ~10% on a system with 384 MB RAM.
1962 At 23 MB, no extra resources are evicted from the cache during a PLT
1963 run, so this is a safe change PLT-wise. 23 MB is also seems to be a
1964 generous number in real world usage.
1966 * WebView/WebPreferences.m:
1967 (+[WebPreferences initialize]):
1969 2007-07-18 Anders Carlsson <andersca@apple.com>
1973 <rdar://problem/5341133> REGRESSION (Safari 2->Safari 3): DjVu plug-in doesn't load in Safari 3
1975 The DjVu plug-in uses the size of the passed in NPNetscapeFuncs struct to copy it over to a NPNetscapeFuncs struct
1976 whose size was determined when DjVu was compiled. This means that when we add extra functions to the vtable,
1977 DjVu will segfault copying it into the (too small) destination struct.
1979 Fix this by special-casing the DjVu plug-in and setting the NPNetscapeFuncs size to be the same size as what DjVu expects.
1981 * Plugins/WebNetscapePluginPackage.m:
1982 (-[WebNetscapePluginPackage _applyDjVuWorkaround]):
1983 (-[WebNetscapePluginPackage load]):
1985 2007-07-18 Timothy Hatcher <timothy@apple.com>
1989 <rdar://problem/5343767> Should have a way to disable the Web Inspector
1991 Adds a new DisableWebKitDeveloperExtras default that will force the Web Inspector to be disabled.
1992 This overrides the WebKitDeveloperExtras and IncludeDebugMenu default. It also disables
1993 the Web Inspector in Debug builds.
1995 * WebView/WebView.mm:
1996 (+[WebView _developerExtrasEnabled]): Check for the DisableWebKitDeveloperExtras default.
1997 (-[WebView _commonInitializationWithFrameName:groupName:]): Make a new WebInspectorClient when making the Page.
1999 2007-07-18 Anders Carlsson <andersca@apple.com>
2003 * Misc/WebNSAttributedStringExtras.mm:
2005 2007-07-18 Sam Weinig <sam@webkit.org>
2007 Rubber-stamped by Adam Roben.
2009 Update after renaming MimeTypeRegistry to MIMETypeRegistry.
2011 * Misc/WebNSPasteboardExtras.mm:
2012 (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
2013 * WebCoreSupport/WebFrameBridge.mm:
2014 (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
2015 * WebView/WebDataSource.mm:
2016 (-[WebDataSource _documentFragmentWithArchive:]):
2017 * WebView/WebHTMLRepresentation.mm:
2018 (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
2019 (+[WebHTMLRepresentation supportedImageMIMETypes]):
2020 * WebView/WebHTMLView.mm:
2021 (-[WebHTMLView _imageExistsAtPaths:]):
2023 2007-07-18 Tristan O'Tierney <tristan@apple.com>
2025 Reviewed by Maciej Stachowiak.
2027 <rdar://problem/5341334> Alt-clicking a link in Safari does not register original URL info with gatekeeper
2028 <rdar://problem/5342570> REGRESSION: A hang occurs when attempting to open a attached file from a .Mac web mail message
2030 * WebCoreSupport/WebFrameLoaderClient.h:
2031 Added a new method, setOriginalURLForDownload, for both download()
2032 and startDownload() to share.
2034 * WebCoreSupport/WebFrameLoaderClient.mm:
2035 (WebFrameLoaderClient::download):
2036 Moved all the gatekeeper code into setOriginalURLForDownload.
2038 (WebFrameLoaderClient::setOriginalURLForDownload):
2039 Same code that was in download() but moved into a single place for both
2040 startDownload and download to use. Also returned the boolean logic
2041 for detecting _wasUserGesture back to it's previous state, since my prior change
2042 was incorrect. Additionally I found a loop index bug with backListCount and fixed it.
2044 (WebFrameLoaderClient::startDownload):
2045 Calls out to setOriginalURLForDownload after a download is created.
2047 * WebView/WebView.mm:
2048 (-[WebView _downloadURL:]):
2049 Changed to return the WebDownload object created inside _downloadURL
2051 * WebView/WebViewInternal.h:
2052 Changed _downloadURL to return the WebDownload it creates.
2054 2007-07-17 Timothy Hatcher <timothy@apple.com>
2058 <rdar://problem/5336267> loadData:MIMEType:textEncodingName:baseURL: doesn't like relative URLs
2060 Get the absoluteURL from any user supplied NSURL before we pass it down to WebCore.
2062 * WebView/WebFrame.mm:
2063 (-[WebFrame _loadURL:referrer:intoChild:]):
2064 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
2065 * WebView/WebView.mm:
2066 (-[WebView userAgentForURL:]):
2068 2007-07-17 Adam Roben <aroben@apple.com>
2070 Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
2071 http://bugs.webkit.org/show_bug.cgi?id=14324
2073 Only clients linking against new versions of WebKit will see the item.
2074 I've maintained our behavior for old clients of not including the
2075 Inspect Element item in the menu items passed to the UI delegate.
2079 * Misc/WebKitVersionChecks.h: Added a new constant.
2080 * WebCoreSupport/WebContextMenuClient.mm:
2081 (isPreInspectElementTagClient): Added.
2082 (fixMenusToSendToOldClients): Return an array of items that should be
2083 appended to the menu received from the delegate.
2084 (fixMenusReceivedFromOldClients): Append the saved items to the array.
2085 (WebContextMenuClient::getCustomMenuFromDefaultItems): Retain/release
2088 2007-07-17 Adam Roben <aroben@apple.com>
2090 Remove WebContextMenuClient::shouldIncludeInspectElementItem
2094 * WebCoreSupport/WebContextMenuClient.h:
2095 * WebCoreSupport/WebContextMenuClient.mm:
2097 2007-07-17 Adam Roben <aroben@apple.com>
2099 Initialize Settings::developerExtrasEnabled
2103 * WebView/WebView.mm:
2104 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2106 2007-07-17 Geoffrey Garen <ggaren@apple.com>
2110 * WebView/WebFrame.mm:
2111 (-[WebFrame _loadURL:referrer:intoChild:]):
2112 * WebView/WebFramePrivate.h:
2114 2007-07-17 Tristan O'Tierney <tristan@apple.com>
2116 Reviewed by Maciej Stachowiak.
2118 <rdar://problem/5294691> Source of file is misrepresented if downloaded by typing in URL in Safari address bar
2120 * WebCoreSupport/WebFrameLoaderClient.h:
2121 * WebCoreSupport/WebFrameLoaderClient.mm:
2122 (WebFrameLoaderClient::download):
2123 Revised code to check the initial request's referrer before assuming it has a history to check.
2125 2007-07-16 Brady Eidson <beidson@apple.com>
2129 Begin the arduous task of localizing FTP directory listings while removing a global initializer!
2131 * English.lproj/Localizable.strings:
2132 * WebCoreSupport/WebViewFactory.mm:
2133 (-[WebViewFactory unknownFileSizeText]):
2135 2007-07-16 Adam Roben <aroben@apple.com>
2137 Move printing from WebFrameBridge to WebChromeClient
2141 * WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
2142 * WebCoreSupport/WebChromeClient.mm:
2143 (WebChromeClient::print): Moved code from WebFrameBridge.
2144 * WebCoreSupport/WebFrameBridge.mm: Removed -print.
2146 2007-07-16 Darin Adler <darin@apple.com>
2148 * StringsNotToBeLocalized.txt: Update for recent changes.
2150 2007-07-16 John Sullivan <sullivan@apple.com>
2152 Reviewed by Kevin Decker and Darin Adler
2154 - fixed <rdar://problem/5337529> Holes in Find banner overlay on PDF pages are left in wrong place after changing scale
2156 * WebView/WebPDFView.mm:
2157 (-[WebPDFView _scaleOrDisplayModeChanged:]):
2158 tell UI delegate that the entire PDF view has been redrawn
2160 2007-07-14 Brady Eidson <beidson@apple.com>
2162 Reviewed by Sam Weinig
2164 Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser
2166 * WebView/WebPreferenceKeysPrivate.h: Added preference keys for the FTP template location, as well as to force
2167 FTP directory listings, bypassing the policy delegate. This is necessary to test the new feature until browser
2168 policy delegate support is added.
2170 * WebView/WebPreferences.m:
2171 (-[WebPreferences _setFTPDirectoryTemplatePath:]):
2172 (-[WebPreferences _ftpDirectoryTemplatePath]):
2173 (-[WebPreferences _setForceFTPDirectoryListings:]):
2174 (-[WebPreferences _forceFTPDirectoryListings]):
2175 * WebView/WebPreferencesPrivate.h:
2176 * WebView/WebView.mm:
2177 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2179 2007-07-13 Anders Carlsson <andersca@apple.com>
2183 <rdar://problem/5290103> Assert failure when loading page with multipart resource
2185 Don't try to call the delegate method if the resource object doesn't exist in the
2186 identifier map. When a multipart resource has finished loading one part, it is removed from the
2187 web view identifier map.
2189 This is not an ideal fix, a better fix would be to special-case multipart resources and not remove
2190 them when the first part has finished loading. I've filed <rdar://problem/5335034> to track doing that.
2192 * WebCoreSupport/WebFrameLoaderClient.mm:
2193 (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2194 (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
2195 (WebFrameLoaderClient::dispatchDidReceiveResponse):
2196 (WebFrameLoaderClient::willCacheResponse):
2197 (WebFrameLoaderClient::dispatchDidReceiveContentLength):
2198 (WebFrameLoaderClient::dispatchDidFinishLoading):
2199 (WebFrameLoaderClient::dispatchDidFailLoading):
2201 2007-07-13 Timothy Hatcher <timothy@apple.com>
2203 Reviewed by Oliver Hunt.
2205 <rdar://problem/5333766> Can't include WebEditingDelegatePrivate.h
2207 * WebView/WebEditingDelegatePrivate.h: Changed the include to be a framework include,
2208 so other projects can use this header.
2210 2007-07-12 Anders Carlsson <andersca@apple.com>
2212 Reviewed by Darin and Maciej.
2214 <rdar://problem/5271096> panic after Safari stress test, caused by port leak
2216 Replace uses of -[NSObject performSelector:withObject:afterDelay:] with CFRunLoopTimer. performSelector
2217 causes the target (the WebHTMLView in this case) to be retained until the timer fires. Furthermore, when
2218 running the PLT or iBench, the timers will not fire until the main loop is entered (usually after running all tests).
2220 This means that the timers and ports will not be released until after the test has finished running.
2222 * WebView/WebHTMLView.mm:
2223 (-[WebHTMLViewPrivate dealloc]):
2224 (-[WebHTMLView _cancelUpdateMouseoverTimer]):
2225 (-[WebHTMLView _updateMouseoverWithFakeEvent]):
2226 (-[WebHTMLView _updateMouseoverTimerCallback:]):
2227 (-[WebHTMLView _frameOrBoundsChanged]):
2228 (-[WebHTMLView _updateActiveState]):
2229 (-[WebHTMLView _updateActiveStateTimerCallback:]):
2230 (-[WebHTMLView viewWillMoveToWindow:]):
2231 (-[WebHTMLView viewDidMoveToWindow]):
2232 (-[WebHTMLView mouseDown:]):
2233 (-[WebTextCompleteController dealloc]):
2234 * WebView/WebHTMLViewInternal.h:
2236 2007-07-13 Mark Rowe <mrowe@apple.com>
2240 Build fix. Stub out WebChromeClient::print.
2242 * WebCoreSupport/WebChromeClient.h:
2243 * WebCoreSupport/WebChromeClient.mm:
2244 (WebChromeClient::print):
2246 2007-07-11 Timothy Hatcher <timothy@apple.com>
2250 <rdar://problem/5108789> WEBVIEW: Drawing artifacts when dragging in IB
2252 Interface Builder 3 is relying on KVO notifications for frameOrigin and frameSize,
2253 among other standard NSView keys. Change automaticallyNotifiesObserversForKey to
2254 return NO only for keys WebView manually fires notifications for.
2256 * WebView/WebView.mm:
2257 (+[WebView automaticallyNotifiesObserversForKey:]): Selectivly return NO for keys we manually fire.
2258 (-[WebView _declaredKeys]): Code clean up.
2260 2007-07-10 Antti Koivisto <antti@apple.com>
2264 Fix <rdar://problem/4570550>
2265 Hang in layout/layoutBlock/layoutBlockChildren preparing to print certain Mail messages
2267 When printing from Mail, WebHTMLView is a subview of the view that is actually printed and does not
2268 receive calls that would set it to printing mode. Method adjustPageHeightNew is called repeatedly (for each page) during
2269 printing and it enables printing mode temporarily for each call. This triggers two full style recalcs and layouts
2270 each time making printing at least O(n^2).
2272 Instead of enabling printing mode and resetting it back immediatly do the resetting asynchronously, after
2273 all adjustPageHeightNew calls are done. Normal Safari printing is not affected as adjustPageHeightNew is only
2274 called in case WebHTMLView is embedded in the view that is being printed.
2276 No automatic test possible, requires printing and non-Safari client.
2278 * WebView/WebHTMLView.mm:
2279 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
2281 2007-07-10 Geoffrey Garen <ggaren@apple.com>
2283 Reviewed by Maciej Stachowiak.
2285 - Fixed <rdar://problem/5049509> REGRESSION(10.4.9-9A377a): REAP Suite
2286 installer shows empty modal alert window (hangs) if user cancels during
2287 "installing shared components" phase
2289 Added Adobe installers to the family of apps that need a data load
2292 Added a linked-on-or-after check because this code is no longer
2295 I tested this code on Tiger and Leopard.
2297 * Misc/WebKitVersionChecks.h:
2298 * WebKit.xcodeproj/project.pbxproj:
2299 * WebView/WebDocumentLoaderMac.mm:
2300 (needsDataLoadWorkaround):
2301 (WebDocumentLoaderMac::setDataSource):
2303 2007-07-10 Darin Adler <darin@apple.com>
2307 * WebView/WebHTMLView.mm: Add include of ContextMenu.h.
2309 2007-07-10 Darin Adler <darin@apple.com>
2311 Reviewed by John Sullivan.
2313 - <rdar://problem/5321953> remove workaround for fixed AppKit mouse moved bug
2315 * WebView/WebHTMLView.mm: Put the workaround for bug 3429631 inside an
2316 ifdef BUILDING_ON_TIGER.
2318 2007-07-09 Anders Carlsson <andersca@apple.com>
2322 <rdar://problem/4954319>
2323 Acrobat 7 / Safari crash: CrashTracer: 99 crashes in Safari at
2324 com.apple.WebCore: WebCore::NetscapePlugInStreamLoader::isDone const + 0
2326 Add a new initWithFrameLoader: method to WebNetscapePluginStream which is to be used when
2327 the stream is a "fake" stream for full frame plug-ins.
2329 * Plugins/WebBaseNetscapePluginView.mm:
2330 (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
2331 * Plugins/WebNetscapePluginStream.h:
2332 * Plugins/WebNetscapePluginStream.mm:
2333 (-[WebNetscapePluginStream initWithFrameLoader:]):
2334 (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
2335 (-[WebNetscapePluginStream start]):
2336 (-[WebNetscapePluginStream cancelLoadWithError:]):
2337 (-[WebNetscapePluginStream stop]):
2338 * WebCoreSupport/WebFrameLoaderClient.mm:
2339 (WebFrameLoaderClient::createFrame):
2341 2007-07-09 John Sullivan <sullivan@apple.com>
2345 - fixed <rdar://problem/5320208> WebKit should prevent Time Machine from backing up WebKit clients' icon databases
2347 * Misc/WebIconDatabase.mm:
2348 (-[WebIconDatabase init]):
2349 Re-added the code to exclude the icon database from backups. We now do this at the same time we (try to) import
2350 the old icon database format, which happens only once per icon database's lifetime.
2351 (-[WebIconDatabase _importToWebCoreFormat]):
2352 Assert that we haven't imported yet rather than bailing out. It's now the caller's responsibility to check
2353 whether we've imported yet.
2355 2007-07-08 John Sullivan <sullivan@apple.com>
2357 * Misc/WebIconDatabase.mm:
2358 (-[WebIconDatabase init]):
2359 Removed the code to exclude the icon database from backups. We still want to do this, but in a way
2360 that only runs once ever, instead of once per launch, due to performance concerns.
2362 2007-07-07 Darin Adler <darin@apple.com>
2366 - fix <rdar://problem/5124665> WebCore secondary-thread assertion should use linked-on-or-after check instead of building on Tiger check
2368 * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITH_MAIN_THREAD_EXCEPTIONS.
2370 * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): In first-time initialization block,
2371 check for binaries linked against older versions of WebKit, and set the default thread violation
2372 behavior to LogOnFirstThreadViolation.
2374 * WebView/WebView.mm: (+[WebView initialize]): Improved comments.
2376 2007-07-06 Oliver Hunt <oliver@apple.com>
2380 <rdar://problem/5318756> Need to refactor IM/Marked text code to share logic with windows.
2382 Moved a number of methods from WebHTMLView into WebCore.
2383 Replaced bridge methods with calls directly into WebCore objects.
2385 * WebKit.xcodeproj/project.pbxproj:
2386 * WebView/WebHTMLView.mm:
2387 (-[WebHTMLView setMarkedText:selectedRange:]):
2388 Now calls WebCore object methods directly, rather than calling
2391 2007-07-06 John Sullivan <sullivan@apple.com>
2395 - WebKit part of fix for:
2396 <rdar://problem/5310739> Time Machine shouldn't back up WebKit's icon database files
2398 * Misc/WebIconDatabase.mm:
2399 (-[WebIconDatabase init]):
2400 Use CSBackupSetItemExcluded to tell Time Machine not to back up the icon database file
2402 2007-07-07 Mark Rowe <mrowe@apple.com>
2404 Build fix. Update WebDynamicScrollBarsView.h to include methods added and used in r24060.
2406 * WebView/WebDynamicScrollBarsView.h:
2408 2007-07-05 Timothy Hatcher <timothy@apple.com>
2412 <rdar://problem/5236277> REGRESSION-9A458: SPI for setting scroll bar behavior doesn't work
2414 Calling setHorizontalScrollingMode: calls updateScrollers before returning, this will cause
2415 WebCore to reset the scrolling mode based on the CSS overflow rules. So the setAlwaysShowHorizontalScroller:
2416 and setAlwaysShowVerticalScroller: methods needed a way to lock the scrolling mode before
2417 calling updateScrollers.
2419 * WebView/WebDynamicScrollBarsView.m:
2420 (-[WebDynamicScrollBarsView updateScrollers]):
2421 (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
2422 (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]):
2423 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
2424 (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]):
2425 (-[WebDynamicScrollBarsView setScrollingMode:]):
2426 (-[WebDynamicScrollBarsView setScrollingMode:andLock:]):
2427 * WebView/WebView.mm:
2428 (-[WebView setAlwaysShowVerticalScroller:]):
2429 (-[WebView setAlwaysShowHorizontalScroller:]):
2431 2007-07-06 Mitz Pettel <mitz@webkit.org>
2435 - fix http://bugs.webkit.org/show_bug.cgi?id=10267
2436 Can't scroll page downwards with scroll wheel, when pointer is on top of non-scrolling iframe
2438 * WebView/WebDynamicScrollBarsView.m:
2439 (-[WebDynamicScrollBarsView scrollWheel:]): Override the superclass
2440 implementation to forward the wheel event to the next responder if this view
2441 does not allow scrolling in the event's direction.
2443 2007-07-05 John Sullivan <sullivan@apple.com>
2447 - WebKit part of fix for <rdar://problem/5315033>
2449 * WebView/WebDocumentPrivate.h:
2450 new selectionImageForcingBlackText: method. selectionImageForcingWhiteText: is no longer used and was never
2451 in an official release of WebKit, so it could be removed, except that doing so would cause trouble for people
2452 using nightly WebKit with Safari 3.0 beta. So I left it in, but made it just force black text instead of
2453 white text, which will look different for those nightly WebKit/Safari 3.0 beta people but not break anything.
2455 * Misc/WebSearchableTextView.m:
2456 (-[WebSearchableTextView selectionImageForcingBlackText:]):
2457 new unimplemented protocol method for this obsolete class
2459 * WebView/WebHTMLView.mm:
2460 (-[WebHTMLView selectionImageForcingBlackText:]):
2461 calls through to WebCore the way selectionImageForcingWhiteText: used to
2462 (-[WebHTMLView selectionImageForcingWhiteText:]):
2463 now just calls selectionImageForcingBlackText:, thus not working as you would expect from the name
2465 * WebView/WebPDFView.mm:
2466 (-[WebPDFView selectionImageForcingBlackText:]):
2467 guts of old selectionImageForcingWhiteText:, but with black substituted for white
2468 (-[WebPDFView selectionImageForcingWhiteText:]):
2469 now just calls selectionImageForcingBlackText:, thus not working as you would expect from the name
2471 2007-07-05 Timothy Hatcher <timothy@apple.com>
2475 <rdar://problem/5314993> Shiira 2.1 throws an exception open a new window: -[WebInspector window]: unrecognized selector
2477 Add an empty implementation of this method to prevent Shiira from throwing an exception.
2478 Also log that this method is obsolete and the class will be removed.
2480 * WebInspector/WebInspector.mm:
2481 (-[WebInspector window]):
2483 2007-07-04 Adam Roben <aroben@apple.com>
2485 Move tooltip logic down into WebCore so that it can be shared cross-platform
2489 * WebCoreSupport/WebChromeClient.h:
2490 * WebCoreSupport/WebChromeClient.mm:
2491 (WebChromeClient::setToolTip): Added.
2492 * WebView/WebHTMLView.mm: Removed _resetCachedWebPreferences.
2493 (-[WebHTMLView _updateMouseoverWithEvent:]): Removed tooltip code.
2494 (-[WebHTMLView initWithFrame:]): Removed call to
2495 _resetCachedWebPreferences.
2496 (-[WebHTMLView setDataSource:]): Ditto.
2497 * WebView/WebHTMLViewInternal.h: Removed showsURLsInToolTips ivar.
2498 * WebView/WebHTMLViewPrivate.h: Added declaration for _setTooltip so
2499 that WebChromeClient can call it.
2501 2007-07-04 Adam Roben <aroben@apple.com>
2503 Initialize Settings::showsURLsInToolTips
2507 * WebView/WebView.mm:
2508 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2510 2007-07-04 Adam Roben <aroben@apple.com>
2512 Removed call to mouseDidMoveOverElement now that WebCore handles it
2516 * WebView/WebHTMLView.mm:
2517 (-[WebHTMLView _updateMouseoverWithEvent:]):
2519 2007-07-04 Adam Roben <aroben@apple.com>
2521 Add WebChromeClient::mouseDidMoveOverElement
2523 This is not called yet.
2527 * WebCoreSupport/WebChromeClient.h:
2528 * WebCoreSupport/WebChromeClient.mm:
2530 2007-07-03 Darin Adler <darin@apple.com>
2532 * StringsNotToBeLocalized.txt: Updated for recent changes.
2534 2007-07-03 Timothy Hatcher <timothy@apple.com>
2538 Remove HIWebView in 64-bit.
2540 Also disable a few calls that are now gone in 64-bit and filed these bugs:
2542 <rdar://problem/5311653> WebKit needs to adopt HIGetMousePosition where we used GetGlobalMouse before
2543 <rdar://problem/5311648> WebKit needs to move off of CopyEvent in WebBaseNetscapePluginView
2544 <rdar://problem/5311640> WebKit needs a new solution for HISearchWindowShow on 64-bit
2546 * Carbon/CarbonUtils.m:
2547 * Carbon/CarbonWindowAdapter.m:
2548 * Carbon/CarbonWindowContentView.m:
2549 * Carbon/CarbonWindowFrame.m:
2550 * Carbon/HIViewAdapter.m:
2551 (SetViewNeedsDisplay):
2552 * Carbon/HIWebView.m:
2555 * Configurations/WebKit.xcconfig:
2556 * Plugins/WebBaseNetscapePluginView.mm:
2557 (+[WebBaseNetscapePluginView getCarbonEvent:]):
2559 * WebKit.LP64.exp: Added.
2560 * WebView/WebView.mm:
2561 (-[WebView _searchWithSpotlightFromMenu:]):
2563 2007-07-03 Adam Roben <aroben@apple.com>
2565 Merge the Windows and Mac localized strings and exceptions files
2567 Reviewed by Darin and Anders.
2569 * English.lproj/Localizable.strings: Added Windows strings.
2570 * StringsNotToBeLocalized.txt: Renamed from WebKit/English.lproj/StringsNotToBeLocalized.txt.
2572 2007-07-03 Adele Peterson <adele@apple.com>
2574 Removed printf I accidently left in.
2576 * Misc/WebNSURLExtras.m: (mapHostNames):
2578 2007-07-03 Adele Peterson <adele@apple.com>
2582 Fix for: <rdar://problem/5292988> domain names shouldn't contain ignorable characters
2584 * Misc/WebNSURLExtras.m:
2585 (isLookalikeCharacter): Renamed. Also excludes any non-printable character,
2586 any character considered as whitespace that isn't already converted to a space by ICU, any ignorable character,
2587 and any character excluded in Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
2588 (allCharactersInIDNScriptWhiteList):
2590 2007-07-03 Darin Adler <darin@apple.com>
2594 - fix <rdar://problem/5310848> WebDataSource lifetime problem -- may be cause of the leaks seen on the buildbot
2596 * WebView/WebDataSource.mm:
2597 (-[WebDataSourcePrivate dealloc]): Added a call to the new detachDataSource function.
2598 (-[WebDataSourcePrivate finalize]): Ditto.
2600 * WebView/WebDocumentLoaderMac.h: Added detachDataSource function to be used when the
2601 WebDataSource is deallocated. Added retain/releaseDataSource helper functions to be
2602 used to retain and release the data source object. Replaced the m_hasEverBeenDetached
2603 boolean with a more primitive and hence easier to understand m_isDataSourceRetained boolean.
2605 * WebView/WebDocumentLoaderMac.mm:
2606 (WebDocumentLoaderMac::WebDocumentLoaderMac): Initialize m_isDataSourceRetained to false.
2607 (WebDocumentLoaderMac::setDataSource): Call retainDataSource instead of calling HardRetain
2608 on the dataSource parameter. Also updated a comment.
2609 (WebDocumentLoaderMac::attachToFrame): Call retainDataSource unconditionally rather than
2610 trying to use m_hasEverBeenDetached to decide if a retain is needed. Also got rid of an
2611 assertion that m_loadingResources is empty -- not important any more.
2612 (WebDocumentLoaderMac::detachFromFrame): Call releaseDataSource instead of using
2613 HardRelease, but only if m_loadingResources is empty. If it's non-empty, then we'll
2614 do the releaseDataSource later in decreaseLoadCount.
2615 (WebDocumentLoaderMac::increaseLoadCount): Call retainDataSource unconditionally
2616 rather than calling HardRetain only if the old set of resources was empty.
2617 (WebDocumentLoaderMac::decreaseLoadCount): Call releaseDataSource if m_loadingResources
2618 is empty and we're not attached to a frame. If we are attached to a frame, then
2619 we'll do the releaseDataSource later in detachFromFrame.
2620 (WebDocumentLoaderMac::retainDataSource): Added. Calls CFRetain, but only if the data
2621 source is not already retained (according to the boolean).
2622 (WebDocumentLoaderMac::releaseDataSource): Added. Calls CFRelease, but only if the data
2623 source is currently retained (according to the boolean).
2624 (WebDocumentLoaderMac::detachDataSource): Added. Sets m_dataSource to nil. Since this
2625 is only called from WebDataSource's dealloc and finalize methods, it won't ever be called
2626 when the m_isDataSourceRetained boolean is true.
2628 2007-07-03 Darin Adler <darin@apple.com>
2630 - forgot to check in one file in the fix for <rdar://problem/5307880>
2631 some classes need finalize methods because of non-trivial work done in dealloc methods
2633 * WebView/WebView.mm: (-[WebViewPrivate finalize]): Delete identifierMap so it doesn't leak.
2635 2007-07-03 Anders Carlsson <andersca@apple.com>
2639 * WebView/WebView.mm:
2640 (-[WebView stringByEvaluatingJavaScriptFromString:]):
2641 ASSERT that the value returned isn't nil. It can't be nil when invoked on the main frame.
2643 2007-07-04 Mark Rowe <mrowe@apple.com>
2645 Unreviewed 64-bit build fixes.
2647 * WebCoreSupport/WebInspectorClient.mm: Let the compiler know that WebFrameView is a subclass of NSView.
2648 * WebView/WebDocumentInternal.h: Remove our preprocessor macro once we're done with it.
2649 * WebView/WebHTMLView.mm:
2650 (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Fix argument types.
2652 2007-07-02 Darin Adler <darin@apple.com>
2654 Reviewed by Kevin Decker and Tim Hatcher.
2656 - fix <rdar://problem/5307880> some classes need finalize methods
2657 because of non-trivial work done in dealloc methods
2659 * DefaultDelegates/WebScriptDebugServer.m:
2660 (-[WebScriptDebugServer dealloc]): Added a comment about how this probably won't
2662 * WebInspector/WebNodeHighlight.m:
2663 (-[WebNodeHighlight dealloc]): Ditto.
2665 * WebView/WebDataSource.mm:
2666 (+[WebDataSourcePrivate initialize]): Added. Makes finalize run on main thread.
2667 (-[WebDataSourcePrivate finalize]): Added. Calls deref on the document loader.
2668 * WebView/WebHTMLView.mm:
2669 (+[WebHTMLViewPrivate initialize]): Added. Makes finalize run on main thread.
2670 (-[WebHTMLViewPrivate finalize]): Added. Calls deref on promisedDragTIFFDataSource.
2672 * WebKit.xcodeproj/project.pbxproj: Let Xcode be Xcode.
2674 2007-07-02 Oliver Hunt <oliver@apple.com>
2679 <rdar://problem/5290113> WebKit does not correctly handle replacement ranges from the IM in -[WebHTMLView insertText:]
2680 http://bugs.webkit.org/show_bug.cgi?id=13664
2682 We replicate the logic of -[WebHTMLView setMarkedText:selectedRange:] to handle the Input Method
2683 feeding us a replacement string through insertText: so we can handle IMs that use insertText to
2686 * WebView/WebHTMLView.mm:
2687 (-[WebHTMLView insertText:]):
2689 2007-07-01 Oliver Hunt <oliver@apple.com>
2693 Fix for <rdar://problem/5306210> Some events are still passed to WebCore despite being handled by the IM
2694 http://bugs.webkit.org/show_bug.cgi?id=14457
2696 We have to assume that the IM will consume all events, so we remove the dependency
2697 on -[WebHTMLView hasMarkedText].
2699 * WebView/WebHTMLView.mm:
2700 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
2702 2007-06-29 John Sullivan <sullivan@apple.com>
2704 Reviewed by Oliver Hunt.
2706 - WebKit support for accessing the set of rectangles that encompass the selected text
2708 * WebView/WebDocumentPrivate.h:
2709 added -selectionTextRects to WebDocumentSelection protocol; tweaked comments
2711 * WebView/WebHTMLView.mm:
2712 (-[WebHTMLView _selectionDraggingRect]):
2713 use selectionRect instead of selectionImageRect since they're the same and maybe we can get
2714 rid of selectionImageRect someday
2715 (-[WebHTMLView selectionTextRects]):
2716 added implementation of new protocol method, which calls through to WebCore
2718 * WebView/WebPDFView.mm:
2719 (-[WebPDFView selectionTextRects]):
2720 added simple implementation of new protocol method, which just returns the single selection rect.
2721 PDFKit doesn't support obtaining multiple rects to describe a multi-line selection.
2722 (-[WebPDFView selectionImageForcingWhiteText:]):
2723 use selectionRect instead of selectionImageRect since they're the same and maybe we can get
2724 rid of selectionImageRect someday
2726 * Misc/WebSearchableTextView.m:
2727 (-[WebSearchableTextView selectionTextRects]):
2728 added no-op implementation of new protocol method to this obsolete class
2730 2007-06-28 Timothy Hatcher <timothy@apple.com>
2734 <rdar://problem/5287569> WEBVIEW: Creating a webview in IB 3.0 (v2.0) NIB later crashes Interface Builder 2.5.4 on Tiger
2736 Prevent encoding any of the WebView subviews. The subviews are ignored by -[WebView initWithCoder:] and will be recreated.
2737 The Tiger 2.0 code crashed when the WebView released the subviews in initWithCoder:, so now there are no subviews to release.
2738 This never happened before because the Tiger 2.0 code and IB wouldn't encode a WebView that has a WebHTMLView.
2740 * WebView/WebView.mm:
2741 (-[WebView encodeWithCoder:]):
2743 2007-06-26 John Sullivan <sullivan@apple.com>
2747 - WebKit support for displaying multiple text matches in PDF views (<rdar://problem/4601967>)
2749 * WebView/WebPDFView.h:
2750 new ivars textMatches and lastScrollPosition; now conforms to WebMultipleTextMatches protocol
2752 * WebView/WebPDFView.mm:
2753 (-[WebPDFView dealloc]):
2755 (-[WebPDFView viewDidMoveToWindow]):
2756 start observing bounds changes in the PDF document's enclosing clip view, so we can notice when
2757 scrolling takes place
2758 (-[WebPDFView viewWillMoveToWindow:]):
2759 stop observing bounds changes in the PDF document's enclosing clip view
2760 (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
2761 most of the code here has been moved into the new method _nextMatchFor::::, which this now calls
2762 (-[WebPDFView setMarkedTextMatchesAreHighlighted:]):
2763 implementation of WebMultipleTextMatches protocol method, does nothing useful here because we don't
2764 support inline highlighting of matches in PDF documents
2765 (-[WebPDFView markedTextMatchesAreHighlighted]):
2766 implementation of WebMultipleTextMatches protocol method
2767 (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
2768 implementation of WebMultipleTextMatches protocol method; calls _nextMatchFor:::: in a loop until
2769 entire document is searched or limit is hit; records results by saving PDFSelections in textMatches ivar
2770 (-[WebPDFView unmarkAllTextMatches]):
2771 implementation of WebMultipleTextMatches protocol method; clears saved textMatches
2772 (-[WebPDFView rectsForTextMatches]):
2773 implementation of WebMultipleTextMatches protocol method; converts saved PDFSelections into NSValue
2774 objects that represent NSRects
2775 (-[WebPDFView _clipViewForPDFDocumentView]):
2776 new helper method to find the clip view whose bounds determine the current scroll position
2777 (-[WebPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]):
2778 new helper method, extracted from searchFor:::::
2779 (-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
2780 new notification callback; tells webView's delegate when document has scrolled
2781 (-[WebPDFView _setTextMatches:]):
2782 new helper method, stores value in ivar
2784 2007-06-26 Oliver Hunt <oliver@apple.com>
2788 Hopefully fix remainder of the IME issues on Mac.
2789 We now assume that the IME silently consumes any event given
2790 to it during text composition, and only override this assumption
2791 if the NSTextInput or NSResponder callbacks are made.
2793 This prevents us from treating those events that the IME has
2794 consumed internally (eg. candidate window navigation) as unhandled
2795 events that should be bubbled.
2798 <rdar://problem/5107538> Major problems handling key press event with non-english Input Methods
2799 <rdar://problem/4196249> REGRESSION: Mail: Inputting space (U+0020) with IM deletes subsequent line breaks on Mail.app
2800 <rdar://problem/5015544> REGRESSION: Reverse conversion keyboard command does not work in Safari.
2801 <rdar://problem/5045121> REGRESSION: Inline is confirmed after press left/right arrow keys, happens in Mail but not in TextEdit.
2802 <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
2803 <rdar://problem/5085781> REGRESSION: Active input area lost "selected" highlight
2804 <rdar://problem/5094200> space key pressed to close the associated words candidate window gets inserted as text
2805 <rdar://problem/5228294> Candidate item for character matrix is sometimes skipped
2807 * WebKit.xcodeproj/project.pbxproj:
2808 * WebView/WebHTMLView.mm:
2809 (-[WebHTMLView launchKeyEvent:]):
2810 (-[WebHTMLView keyDown:]):
2811 (-[WebHTMLView keyUp:]):
2812 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
2813 (-[WebHTMLView unmarkText]):
2814 (-[WebHTMLView setMarkedText:selectedRange:]):
2815 (-[WebHTMLView doCommandBySelector:]):
2816 (-[WebHTMLView insertText:]):
2818 2007-06-26 Jim Correia <jim.correia@pobox.com>
2822 Fix http://bugs.webkit.org/show_bug.cgi?id=14411
2823 Bug 14411: WebNetscapePluginPackage overagressively sets CurApRefNum, which affects shipping versions of BBEdit.
2824 <rdar://problem/5297268>
2826 * Plugins/WebNetscapePluginPackage.m:
2827 (+[WebNetscapePluginPackage initialize]): Force the Resource Manager to
2828 lazy initialize, and only set CurApRefNum to the system file if
2829 CurApRefNum is still -1 after that forced lazy initialization.
2831 2007-06-25 Kevin Decker <kdecker@apple.com>
2835 <rdar://problem/5294036> -[WebView customTextEncodingName] API may return empty string instead of nil
2837 * WebView/WebView.mm:
2838 (-[WebView _mainFrameOverrideEncoding]): Addded the nsStringNilIfEmpty() inline to the data being returned because
2839 our API says "The custom text encoding name or nil if no custom text encoding name has been set." I also verified
2840 the standing Tiger WebKit behavior for this method and it does indeed return nil if a custom encoding wasn't set.
2842 2007-06-25 John Sullivan <sullivan@apple.com>
2846 - WebKit part of <rdar://problem/5293820>, needed to support multiple matches in PDFs
2848 * WebView/WebDocumentInternal.h:
2849 Added WebMultipleTextMatches protocol, containing five methods that were formerly implemented in WebHTMLView
2850 * WebView/WebHTMLViewPrivate.h:
2851 Removed declarations for the methods that are now in WebMultipleTextMatches protocol
2853 * WebView/WebHTMLView.mm:
2854 (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
2855 moved this method into the WebDocumentInternalProtocols portion of the file
2856 (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
2858 (-[WebHTMLView markedTextMatchesAreHighlighted]):
2860 (-[WebHTMLView unmarkAllTextMatches]):
2862 (-[WebHTMLView rectsForTextMatches]):
2865 * WebView/WebView.mm:
2866 (-[WebView canMarkAllTextMatches]):
2867 new method, returns YES only if the documentView of every frame implements WebMultipleTextMatches
2868 (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
2869 check for WebMultipleTextMatches protocol instead of checking for WebHTMLView class
2870 (-[WebView unmarkAllTextMatches]):
2872 (-[WebView rectsForTextMatches]):
2875 * WebView/WebViewPrivate.h:
2876 declared new method canMarkAllTextMatches
2878 2007-06-25 John Sullivan <sullivan@apple.com>
2882 Fixed <rdar://problem/5292259> Find on Page doesn't work (throws exception) on page that includes PDF in a subframe
2884 * WebView/WebView.mm:
2885 (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
2886 We were testing whether the view was an HTMLView, but then running code that assumed it was an HTMLView outside of
2887 that test. That's a bad idea.
2889 2007-06-22 Adele Peterson <adele@apple.com>
2891 Reviewed by Geoff and Darin.
2893 Fix for: <rdar://problem/5239236> Other slash characters should not be permitted as part of a domain name
2895 * Misc/WebNSURLExtras.m:
2896 (isSlashOrPeriodLookalike):
2897 (allCharactersInIDNScriptWhiteList):
2899 2007-06-21 Sam Weinig <sam@webkit.org>
2903 Remove empty directories
2905 * WebInspector/webInspector: directory removed.
2906 * WebInspector/webInspector/Images: directory removed
2908 2007-06-21 Justin Garcia <justin.garcia@apple.com>
2912 <rdar://problem/5237524>
2913 REGRESSION: Keyboard commands don't work in a message window until you click inside the message
2915 When you open a message in its own window, Mail creates an empty
2916 WebView, makes that WebView firstResponder and then sets off a
2917 load inside that WebView.
2919 When we're asked to create the empty WebView, we put an empty
2920 WebHTMLView inside it (in r21367 we began creating a document
2921 for empty frames). When Mail makes the WebView first responder
2922 we make that empty WebHTMLView firstResponder. Then when the
2923 load finishes we create a new WebHTMLView and set it as the
2926 Inside _setDocumentView, if the old document view or one of its
2927 descendants was the first responder, we'd makeFirstResponder:nil
2928 so that the window wouldn't be left with a firstResponder that
2929 was no longer inside of it. This change fixes the bug by instead
2930 transferring firstResponder status to the new document view.
2932 We could also fix this by not allowing the WebHTMLView to become
2933 firstResponder when it's in the provisional state mentioned above.
2935 * WebView/WebFrameView.mm:
2936 (-[WebFrameView _setDocumentView:]):
2938 2007-06-21 John Sullivan <sullivan@apple.com>
2942 - fixed <rdar://problem/5268673> REGRESSION: Context menu missing for PDF in frame when there's no selection
2944 This was surprisingly interesting. It turns out that at least for Safari, the method [WebDefaultUIDelegate
2945 webView:contextMenuItemsForElement:defaultMenuItems:] is only exercised from WebPDFView these days. It mimics
2946 some of the code that was moved to WebCore as part of the Great Context Menu Refactoring of 2006, but is
2947 independent of that code. And it was partly broken/incomplete, probably as a result of said refactoring.
2949 * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
2950 (localizedMenuTitleFromAppKit()):
2951 deleted this function since I removed all callers
2952 (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
2953 Handle WebMenuItemTagOpenFrameInNewWindow tag, since code later in this file was relying on it. Added
2954 ASSERT_NOT_REACHED to the default case, since returning nil from this method is bad.
2955 Also, use WebKit versions of menu title strings rather than AppKit versions. We added these strings to WebKit
2956 a while back so we don't need to sneakily find them in AppKit anymore.
2957 (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
2958 make the WebView be the target of the Open Frame in New Window item; previously it was self, but that was
2959 just silly (probably a leftover from some code shuffling when context menus were reimplemented)
2961 * WebView/WebView.mm:
2962 (-[WebView _openFrameInNewWindowFromMenu:]):
2963 new method, used by Open Frame in New Window menu item.
2965 * WebView/WebViewInternal.h:
2966 Declare new method used by menu item. This isn't necessary for compilation, but could prevent the accidental
2967 deletion of the method implementation.
2969 2007-06-20 Mark Rowe <mrowe@apple.com>
2973 Fix http://bugs.webkit.org/show_bug.cgi?id=14255.
2974 Bug 14255: Reproducible crash opening web inspector from debug menu
2976 Reinstate the WebInspector class so WebKit clients that currently depend on it
2977 will build and run correctly.
2979 * WebInspector/WebInspector.h: Added.
2980 * WebInspector/WebInspector.mm: Added.
2981 (+[WebInspector webInspector]):
2982 (-[WebInspector dealloc]):
2983 (-[WebInspector setWebFrame:]):
2984 (-[WebInspector showWindow:]):
2986 * WebKit.xcodeproj/project.pbxproj:
2988 2007-06-20 Adam Roben <aroben@apple.com>
2990 Land the new Inspector.
2992 Co-written with Tim Hatcher.
2994 Reviewed by Anders, Adele, Hyatt, and Sam.
2996 Implement the InspectorClient interface.
2998 * WebCoreSupport/WebInspectorClient.h: Added.
2999 * WebCoreSupport/WebInspectorClient.mm: Added.
3000 (WebInspectorClient::WebInspectorClient):
3001 (WebInspectorClient::inspectorDestroyed):
3002 (WebInspectorClient::createPage):
3003 (WebInspectorClient::showWindow):
3004 (WebInspectorClient::closeWindow):
3005 (WebInspectorClient::attachWindow):
3006 (WebInspectorClient::detachWindow):
3007 (WebInspectorClient::highlight):
3008 (WebInspectorClient::hideHighlight):
3009 (WebInspectorClient::inspectedURLChanged):
3010 (WebInspectorClient::updateWindowTitle):
3011 (-[WebInspectorWindowController init]):
3012 (-[WebInspectorWindowController initWithInspectedWebView:]):
3013 (-[WebInspectorWindowController dealloc]):
3014 (-[WebInspectorWindowController inspectorVisible]):
3015 (-[WebInspectorWindowController webView]):
3016 (-[WebInspectorWindowController window]):
3017 (-[WebInspectorWindowController windowShouldClose:]):
3018 (-[WebInspectorWindowController close]):
3019 (-[WebInspectorWindowController showWindow:]):
3020 (-[WebInspectorWindowController attach]):
3021 (-[WebInspectorWindowController detach]):
3022 (-[WebInspectorWindowController highlightAndScrollToNode:]):
3023 (-[WebInspectorWindowController highlightNode:]):
3024 (-[WebInspectorWindowController hideHighlight]):
3025 (-[WebInspectorWindowController animationDidEnd:]):
3027 Add an easier-to-see highlight.
3029 * Misc/WebNSViewExtras.h:
3030 * Misc/WebNSViewExtras.m:
3031 (-[NSView _web_convertRect:toView:]):
3032 * WebInspector/WebNodeHighlight.h:
3033 * WebInspector/WebNodeHighlight.m:
3034 (-[WebNodeHighlightFadeInAnimation setCurrentProgress:]):
3035 (-[WebNodeHighlight initWithTargetView:]):
3036 (-[WebNodeHighlight setHighlightedNode:]):
3037 (-[WebNodeHighlight highlightedNode]):
3038 (-[WebNodeHighlight dealloc]):
3039 (-[WebNodeHighlight attachHighlight]):
3040 (-[WebNodeHighlight delegate]):
3041 (-[WebNodeHighlight detachHighlight]):
3042 (-[WebNodeHighlight show]):
3043 (-[WebNodeHighlight hide]):
3044 (-[WebNodeHighlight animationDidEnd:]):
3045 (-[WebNodeHighlight ignoresMouseEvents]):
3046 (-[WebNodeHighlight highlightView]):
3047 (-[WebNodeHighlight setDelegate:]):
3048 (-[WebNodeHighlight setHolesNeedUpdateInTargetViewRect:]):
3049 (-[WebNodeHighlight setIgnoresMouseEvents:]):
3050 (-[WebNodeHighlight targetView]):
3051 (-[WebNodeHighlight _computeHighlightWindowFrame]):
3052 (-[WebNodeHighlight _repositionHighlightWindow]):
3053 * WebInspector/WebNodeHighlightView.h:
3054 * WebInspector/WebNodeHighlightView.m:
3055 (-[WebNodeHighlightView initWithWebNodeHighlight:]):
3056 (-[WebNodeHighlightView dealloc]):
3057 (-[WebNodeHighlightView detachFromWebNodeHighlight]):
3058 (-[WebNodeHighlightView drawRect:]):
3059 (-[WebNodeHighlightView webNodeHighlight]):
3060 (-[WebNodeHighlightView fractionFadedIn]):
3061 (-[WebNodeHighlightView setFractionFadedIn:]):
3062 (-[WebNodeHighlightView setHolesNeedUpdateInRect:]):
3063 (-[WebNodeHighlightView _holes]):
3065 WebView changes needed for the new Inspector.
3067 * WebView/WebView.mm: Remove the old _inspectElement method now that
3068 this is handled by WebCore.
3069 (-[WebView _isClosed]): Added.
3070 (-[WebView initWithFrame]): Give each Page an InspectorClient to
3071 enable the Inspector.
3072 * WebView/WebViewPrivate.h:
3074 Updates needed for WebCore changes.
3076 * WebCoreSupport/WebContextMenuClient.h:
3077 * WebCoreSupport/WebContextMenuClient.mm:
3078 * WebCoreSupport/WebViewFactory.mm:
3079 (-[WebViewFactory contextMenuItemTagInspectElement]):
3080 * WebView/WebUIDelegatePrivate.h:
3082 Remove old Inspector code.
3084 * WebCoreSupport/WebFrameLoaderClient.mm:
3085 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
3086 (WebFrameLoaderClient::assignIdentifierToInitialRequest):
3087 (WebFrameLoaderClient::dispatchDidFinishLoading):
3088 * WebInspector/WebInspector.m: Removed.
3089 * WebInspector/WebInspectorPanel.h: Removed.
3090 * WebInspector/WebInspectorPanel.m: Removed.
3091 * WebInspector/webInspector/Images/button.png: Removed.
3092 * WebInspector/webInspector/Images/buttonDivider.png: Removed.
3093 * WebInspector/webInspector/Images/buttonPressed.png: Removed.
3094 * WebInspector/webInspector/Images/close.png: Removed.
3095 * WebInspector/webInspector/Images/closePressed.png: Removed.
3096 * WebInspector/webInspector/Images/downTriangle.png: Removed.
3097 * WebInspector/webInspector/Images/menu.png: Removed.
3098 * WebInspector/webInspector/Images/menuPressed.png: Removed.
3099 * WebInspector/webInspector/Images/popup.png: Removed.
3100 * WebInspector/webInspector/Images/popupPressed.png: Removed.
3101 * WebInspector/webInspector/Images/resize.png: Removed.
3102 * WebInspector/webInspector/Images/rightTriangle.png: Removed.
3103 * WebInspector/webInspector/Images/scrollThumbBottom.png: Removed.
3104 * WebInspector/webInspector/Images/scrollThumbMiddle.png: Removed.
3105 * WebInspector/webInspector/Images/scrollTrackBottom.png: Removed.
3106 * WebInspector/webInspector/Images/upTriangle.png: Removed.
3107 * WebInspector/webInspector/inspector.css: Removed.
3108 * WebInspector/webInspector/inspector.html: Removed.
3109 * WebInspector/webInspector/inspector.js: Removed.
3110 * WebInspector/webInspector/scrollarea.js: Removed.
3111 * WebInspector/webInspector/scrollbar.js: Removed.
3112 * WebInspector/webInspector/utilities.js: Removed.
3113 * WebView/WebFrame.mm:
3114 (-[WebFramePrivate dealloc]):
3115 * WebView/WebFrameInternal.h:
3116 * WebView/WebHTMLView.mm:
3117 (-[WebHTMLView menuForEvent:]):
3122 * WebKit.xcodeproj/project.pbxproj:
3124 2007-06-20 Justin Garcia <justin.garcia@apple.com>
3128 <rdar://problem/5263541> REGRESSION (Safari 3 Beta 1): Pressing Delete doesn't delete an HTML message in Mail
3130 Mail wasn't receiving the keyDown event because WebFrameView was blocking it.
3131 It blocks the event and moves back/forward on Delete/Shift+Delete if the
3132 back/forward list is enabled.
3134 * WebView/WebFrameView.mm:
3135 (-[WebFrameView keyDown:]): Check to see if the BackForwardList is
3136 enabled. It always exists.
3138 2007-06-19 Anders Carlsson <andersca@apple.com>
3140 Reviewed by Kevin Decker.
3142 <rdar://problem/5266289> REGRESSION (Safari 3 Beta 1): Incoming iChat messages are delayed
3144 * WebView/WebDocumentLoaderMac.mm:
3145 (needsAppKitWorkaround):
3146 New function which checks if the frame load delegate belongs to AppKit.
3148 (WebDocumentLoaderMac::setDataSource):
3149 If the frame load delegate belongs to AppKit, set m_deferMainResourceDataLoad to false.
3151 2007-06-19 John Sullivan <sullivan@apple.com>
3153 Reviewed by Tim Hatcher
3155 - fixed <rdar://problem/5272011> Hole for find-on-page match in subframe isn't clipped by frame bounds
3157 * WebView/WebView.mm:
3158 (-[WebView rectsForTextMatches]):
3159 intersect the HTMLView's computed rect with the visible rect for that view
3161 2007-06-19 Jim Correia <jim.correia@pobox.com>
3163 Reviewed by Kevin Decker
3165 * Carbon/HIWebView.m:
3166 (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.
3168 2007-06-18 Sam Weinig <sam@webkit.org>
3174 * WebCoreSupport/WebChromeClient.mm:
3176 2007-06-18 Kevin Decker <kdecker@apple.com>
3178 * Carbon/HIWebView.m:
3179 (WindowHandler): Fixed the Tiger build; ControlKind wasn't defined.
3181 2007-06-18 Kevin Decker <kdecker@apple.com>
3183 Reviewed by Tim Hatcher.
3185 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
3187 * Carbon/HIWebView.m:
3188 (WindowHandler): Because the fix for 5051616 causes Tiger to crash in HIToolbox (but not on Leopard), I reverted back to using GetControlKind
3189 on Tiger only, instead of HIObjectIsOfClass.
3191 2007-06-16 David Hyatt <hyatt@apple.com>
3193 Back out fix for 13972. Quicktime will no longer clip correctly. :(
3194 Too many regressions in Mail caused by inserting an extra view into the
3195 hierarchy. Can revisit later.
3199 * Plugins/WebPluginController.mm:
3200 (-[WebPluginController destroyPlugin:]):
3201 (-[WebPluginController destroyAllPlugins]):
3202 * WebCoreSupport/WebFrameBridge.mm:
3203 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
3204 * WebView/WebHTMLView.mm:
3205 (-[WebHTMLView addSubview:]):
3206 (-[WebHTMLView willRemoveSubview:]):
3208 2007-06-15 Sam Weinig <sam@webkit.org>
3212 Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
3213 Autogenerate JS binding for Rect
3215 - Fix conflicts by using ::Rect instead of Rect.
3217 * Plugins/WebBaseNetscapePluginView.mm:
3218 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3219 (-[WebBaseNetscapePluginView sendEvent:]):
3220 (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
3221 (-[WebBaseNetscapePluginView invalidateRegion:]):
3222 (-[WebBaseNetscapePluginView _printedPluginBitmap]):
3224 2007-06-15 Anders Carlsson <andersca@apple.com>
3228 A better fix for <rdar://problem/5271774>. Only try to access the element if the
3229 view has an associated window. This also works with GC. (Fix suggested by Kevin.)
3231 * Plugins/WebKitPluginContainerView.mm:
3232 (-[WebKitPluginContainerView dealloc]):
3233 (-[WebKitPluginContainerView visibleRect]):
3235 2007-06-15 Anders Carlsson <andersca@apple.com>
3239 <rdar://problem/5271774> REGRESSION: A crash occurs when closing a window that contains a QT movie
3241 In some cases, calling [super dealloc] might end up calling visibleRect, so make sure to
3242 set _element to 0 so we won't send a message to a freed object and crash.
3244 * Plugins/WebKitPluginContainerView.mm:
3245 (-[WebKitPluginContainerView dealloc]):
3246 (-[WebKitPluginContainerView visibleRect]):
3248 2007-06-14 Anders Carlsson <andersca@apple.com>
3252 Call cleanupScriptObjectsForPlugin on the frame after destroying the plug-in.
3254 * Plugins/WebBaseNetscapePluginView.mm:
3255 (-[WebBaseNetscapePluginView _destroyPlugin]):
3256 * Plugins/WebPluginController.mm:
3257 (-[WebPluginController destroyPlugin:]):
3258 (-[WebPluginController destroyAllPlugins]):
3260 2007-06-13 John Sullivan <sullivan@apple.com>
3262 Reviewed by Adele Peterson
3264 - fixed <rdar://problem/5267607> Clicking the "Save to Downloads" button in
3265 PDF overlay too soon results in corrupt file
3267 * WebView/WebPDFView.mm:
3268 (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
3269 Just beep if the document isn't available yet, since trying to save it as a file
3270 really isn't a good idea.
3272 2007-06-12 Oliver Hunt <oliver@apple.com>
3276 Use correct size for BITMAPINFOHEADER -- whoops.
3278 * win/WebIconDatabase.cpp:
3280 (WebIconDatabase::getOrCreateDefaultIconBitmap):
3282 2007-06-10 David Hyatt <hyatt@apple.com>
3284 Fix for bug 14037, make sure respondsToSelector does the write thing
3285 when invoked on a WebKit plugin's container view.
3287 Reviewed by Mark Rowe
3289 * Plugins/WebKitPluginContainerView.mm:
3290 (-[WebKitPluginContainerView respondsToSelector:]):
3292 2007-06-08 John Sullivan <sullivan@apple.com>
3294 * WebView/WebViewPrivate.h:
3297 2007-06-07 Justin Garcia <justin.garcia@apple.com>
3299 Reviewed by Tristan.
3301 <rdar://problem/5250997> A crash occurs when selecting Undo Typing for a page that has been closed in tab
3303 * WebView/WebView.mm:
3304 (-[WebView _clearUndoRedoOperations]): Added.
3305 * WebView/WebViewPrivate.h:
3307 2007-06-07 Oliver Hunt <oliver@apple.com>
3309 Reviewed by Sam "The Intern" Weinig.
3311 Don't be overzealous with the input checks, firstRectForCharacterRange
3312 can be determined even when there is not an active editable region.
3314 This unbreaks editing/input/range-for-empty-document which was broken
3315 by aforementioned overzealousness.
3317 * WebView/WebHTMLView.mm:
3318 (-[WebHTMLView firstRectForCharacterRange:]):
3320 2007-06-07 Oliver Hunt <oliver@apple.com>
3324 Add checks to make sure we don't try to create, use
3325 or return invalid ranges to TSM when it calls us despite
3326 not currently being in an editable region.
3328 * WebView/WebHTMLView.mm:
3330 (-[WebHTMLView textStorage]):
3331 (-[WebHTMLView firstRectForCharacterRange:]):
3332 (-[WebHTMLView selectedRange]):
3333 (-[WebHTMLView attributedSubstringFromRange:]):
3335 2007-06-06 David Hyatt <hyatt@apple.com>
3337 Make sure to hand back a script object for webkit plugins (the container
3338 view forwards to its plugin child).
3340 Reviewed by sullivan
3342 * Plugins/WebKitPluginContainerView.h:
3343 * Plugins/WebKitPluginContainerView.mm:
3344 (-[WebKitPluginContainerView objectForWebScript]):
3346 2007-06-06 David Hyatt <hyatt@apple.com>
3348 Fix for bug 13972, quicktime doesn't respect CSS clip and overflow properties.
3349 Make sure that calls to [NSView visibleRect] will do the right thing for both
3350 Netscape plugins and WebKit plugins.
3354 * Plugins/WebBaseNetscapePluginView.mm:
3355 (-[WebBaseNetscapePluginView visibleRect]):
3356 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3357 (-[WebBaseNetscapePluginView isOpaque]):
3358 * Plugins/WebKitPluginContainerView.h: Added.
3359 * Plugins/WebKitPluginContainerView.mm: Added.
3360 (-[WebKitPluginContainerView initWithFrame:DOMElement:]):
3361 (-[WebKitPluginContainerView dealloc]):
3362 (-[WebKitPluginContainerView visibleRect]):
3363 * Plugins/WebPluginController.mm:
3364 (-[WebPluginController destroyAllPlugins]):
3365 * WebCoreSupport/WebFrameBridge.mm:
3366 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
3367 * WebKit.xcodeproj/project.pbxproj:
3368 * WebView/WebHTMLView.mm:
3369 (-[WebHTMLView addSubview:]):
3370 (-[WebHTMLView willRemoveSubview:]):
3372 2007-06-04 Oliver Hunt <oliver@apple.com>
3374 Reviewed by Geoff and Justin.
3376 Fix for <rdar://problem/5246941> Clicking URL field on
3377 Safari causes halt for a minute when using input methods.
3378 and <rdar://problem/5245964> Safari hangs for several
3379 seconds when trying to select text using mouse
3381 This is a by product of the textStorage hack used to fix
3382 rdar://problem/5000470 -- TSM calls textStorage repeatedly
3383 when changing focus, on certain mouse events, etc. If there
3384 is no selection/editable region we repeatedly create an
3385 NSAttributedString from the full document. If the document is
3386 sufficiently long this starts consuming an inordinate amount of
3389 This check should really have been present in the original
3392 * WebKit.xcodeproj/project.pbxproj:
3393 * WebView/WebHTMLView.mm:
3394 (-[WebHTMLView textStorage]):
3396 2007-05-31 David Hyatt <hyatt@apple.com>
3398 Fix for 11768, Flash plugin does not respect clips set by CSS.
3402 * Plugins/WebBaseNetscapePluginView.mm:
3403 (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3405 2007-05-30 Mark Rowe <mrowe@apple.com>
3407 Build fixes after r21889.
3409 * ForwardingHeaders/kjs/function.h: Added.
3411 2007-05-29 Mark Rowe <mrowe@apple.com>
3415 64-bit build fix. Ensure that use of WebNSUInteger in headers is matched by WebNSUInteger in implementations.
3417 * DefaultDelegates/WebScriptDebugServer.h:
3418 * DefaultDelegates/WebScriptDebugServer.m:
3419 (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
3420 (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
3421 * DefaultDelegates/WebScriptDebugServerPrivate.h:
3422 * History/WebBackForwardList.mm:
3423 (-[WebBackForwardList setPageCacheSize:]):
3424 (-[WebBackForwardList pageCacheSize]):
3425 * WebView/WebView.mm:
3426 (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
3428 2007-05-26 Darin Adler <darin@apple.com>
3430 Reviewed by Tim Hatcher.
3432 * MigrateHeaders.make: Added dependency on this makefile itself, which is
3433 useful when you change the sed command or other aspect of this file. My build
3434 failed until I made this fix.
3436 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3438 Reviewed by Darin Adler.
3440 Fixed <rdar://problem/5055182> The page cache has no global cap.
3442 The main WebKit changes are:
3443 1. Changed -[WebBackForwardList setPageCacheSize] and -[WebBackForwardList
3444 pageCacheSize] to accomodate the new global page cache model, updating
3445 their documentation.
3447 2. Added -[WebPreferences setShouldUsePageCache] and -[WebPreferences
3448 shouldUsePageCache] as pending public API.
3450 3. Centralized calculation of object cache and page cache sizes inside
3453 Cchanged our old behavior of reading a preference and applying a fudge
3454 factor with a new behavior of just using the preference directly. The
3455 old behavior was confusing and often inappropriate. (For example, if
3456 you set a page cache size of 100, a 256MB machine would somewhat
3457 arbitrarily reduce that number to 98. ???)
3459 * WebView/WebView.mm: Added support for two flags to determine whether
3460 to use the page cache. If either -[WebBackForwardList setPageCacheSize:0]
3461 or -[WebPreferences setShouldUsePageCache:NO] is called, we don't use
3464 2007-05-25 Timothy Hatcher <timothy@apple.com>
3466 Reviewed by Kevin Decker.
3468 <rdar://problem/5219089> Changes for migration of DictionaryServices
3470 * WebView/WebHTMLView.mm:
3471 (-[WebHTMLView _lookUpInDictionaryFromMenu:]): look for the HIDictionaryWindowShow symbol in HIToolbox
3473 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3475 Reviewed by Oliver Hunt.
3477 Fixed global initializer (like you fix a dog).
3479 I'm not sure how our script missed this. I tested, and it generally doesn't
3480 seem to work very well.
3482 * WebView/WebHTMLView.mm: Allocate lazily to avoid the performance hit of
3483 a global initializer.
3484 (promisedDataClient):
3485 (-[WebHTMLViewPrivate dealloc]):
3486 (-[WebHTMLViewPrivate clear]):
3487 (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
3489 2007-05-25 Brady Eidson <beidson@apple.com>
3493 <rdar://problem/5228371> - REGRESSION - Certain mail message bodies display as empty
3495 This is due to http://trac.webkit.org/projects/webkit/changeset/21480 which unintentionally
3496 made applewebdata urls result in check.call(false) instead of check.call(true)
3498 Best place for a fix is to have the FrameLoaderClient::canHandleRequest() call return true, which
3499 really is rooted in WebView
3501 <rdar://problem/5229587> tracks adding a layout test
3503 * WebView/WebView.mm:
3504 (+[WebView _canHandleRequest:]): Return true for applewebdata URLs
3506 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3508 Reviewed by Darin Adler, Tim Hatcher.
3510 "unsigned" => "WebNSUInteger" in public API.
3512 * History/WebBackForwardList.h:
3513 * WebView/WebScriptDebugDelegate.h:
3514 * WebView/WebUIDelegate.h:
3515 * WebView/WebViewPrivate.h:
3517 2007-05-25 Geoffrey Garen <ggaren@apple.com>
3519 Reviewed by Darin Adler.
3521 Moved JavaScriptCore-related pending public API to public API.<