1 2006-05-04 Mitz Pettel <opendarwin.org@mitzpettel.com>
5 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8594
6 REGRESSION: Exception on closing a page containing (just) an mp3
8 Test: plugins/pluginDocumentView-deallocated-dataSource.html
10 * Plugins/WebPluginDocumentView.m:
11 (-[WebPluginDocumentView dealloc]): Release the dataSource.
12 (-[WebPluginDocumentView setDataSource:]): Retain the dataSource.
14 2006-05-04 Tim Omernick <timo@apple.com>
18 <rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element
20 * WebCoreSupport/WebFrameBridge.m:
21 (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
22 Pass the DOMElement to the plugin if it's a WebKit plugin (we need to handle Netscape plugins
25 2006-05-04 Tim Omernick <timo@apple.com>
27 Reviewed by John Sullivan.
29 <rdar://problem/4480186> Give WebKit plugins access to their own DOM element
31 This does not fix <rdar://problem/4480187> Give Netscape plugins access to their own DOM element --
32 we're not going to use the ObjC DOM API for that, but rather the NP bindings API.
34 * Plugins/WebPluginPackage.m:
35 Declared WebPlugInContainingElementKey. This is not a new plugin argument -- it's been in our public
36 headers since all along, but has never been concretely declared -- plugins that referenced it would not
39 * WebCoreSupport/WebFrameBridge.m:
40 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:]):
41 Added DOMElement parameter, which is now included in the plugin arguments dictionary.
42 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:]):
46 Export WebPlugInContainingElementKey.
48 2006-05-02 Darin Adler <darin@apple.com>
52 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8677
53 REGRESSION: wkSetUpFontCache() may be called before the SPIs are connected.
55 I don't know how reproduce this without one of Rosyna's hacks installed, so I
56 did not include a test.
58 * Misc/WebStringTruncator.m: (+[WebStringTruncator initialize]): Add call to
59 InitWebCoreSystemInterface.
61 * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add a boolean
62 so we will only do this one time.
64 2006-05-02 Adele Peterson <adele@apple.com>
68 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6988
69 REGRESSION: Display correct context menus for new text fields
71 * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]):
72 Don't let the UI delegate have control over the context menu for text fields.
74 2006-05-01 Mitz Pettel <opendarwin.org@mitzpettel.com>
78 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8658
79 Assertion failure in -[WebPluginContainerCheck _isForbiddenFileLoad]
80 (bridge is null) when clicking QuickTime object with href
82 * WebView/WebHTMLView.m:
83 (-[WebHTMLView setDataSource:]): Set the pluginController's dataSource.
85 2006-05-01 Maciej Stachowiak <mjs@apple.com>
89 * WebKit.exp: Add symbol that the new Safari will need.
91 2006-05-01 John Sullivan <sullivan@apple.com>
93 Reviewed by Tim Omernick.
95 - fixed <rdar://problem/3126419> history load enforces history limit, but deletes the newest instead of oldest items
96 - added notification reporting items discarded during load because the age limit or item count limit is exceeded
97 - a few other minor tweaks
99 * History/WebHistory.h:
100 fixed a typo and an incorrect method name
102 * History/WebHistoryPrivate.h:
103 Added declaration of WebHistoryItemsDiscardedWhileLoadingNotification. Also changed signature of
104 WebHistoryPrivate method -loadFromURL:error: to have new collectDiscardedItemsInto: parameter.
105 Also deleted declarations of two methods that didn't actually exist (loadHistory and initWithFile:),
106 and added comments about which methods should become public API, WebKit-internal, or file-internal.
108 * History/WebHistory.m:
109 (-[WebHistoryPrivate arrayRepresentation]):
110 This method, called only by _saveHistoryGuts:, used to deliberately leave out items that violated
111 either the age limit or the item count limit. Now all the items are included (and thus saved), and
112 all the pruning is done at load time, so clients can keep track of the pruned items by observing
113 the new WebHistoryItemsDiscardedWhileLoadingNotification
114 (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
115 Now keeps track of all the items that violated the age limit or item count limit in the new
116 collectedDiscardedItemsInto: parameter. Also, now processes items in forward order rather than
117 reverse order to fix 3126419. Now uses compare: rather than _webkit_compareDay: to check against
118 age limit; this is faster and also more correct (most noticeable with small age limits).
119 (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]):
120 new collectDiscardedItemsInto: parameter, passed into _loadHistoryGuts:...
121 (-[WebHistory loadFromURL:error:]):
122 Now sends new WebHistoryItemsDiscardedWhileLoadingNotification if any items were discarded due
123 to age limit or item count limit.
126 exported symbol for WebHistoryItemsDiscardedWhileLoadingNotification
128 2006-04-29 Timothy Hatcher <timothy@apple.com>
132 Bug 8577: [TabBarView _web_superviewOfClass:stoppingAtClass:]
133 http://bugzilla.opendarwin.org/show_bug.cgi?id=8577
135 Added back _web_superviewOfClass:stoppingAtClass:.
136 This method was removed in r14032 (bug 8562), but Safari 2.0 still uses it.
137 We should remove this method once Open Source users have a new version
138 to use with TOT WebKit.
140 * Misc/WebNSViewExtras.m:
141 (-[NSView _web_superviewOfClass:stoppingAtClass:]):
143 2006-04-28 David Hyatt <hyatt@apple.com>
145 Double the cache size to account for our revised (more accurate)
146 measurement of the image buffers.
150 * WebView/WebPreferences.m:
151 (+[WebPreferences initialize]):
153 2006-04-28 David Hyatt <hyatt@apple.com>
155 Fix for 8586, move WebTextRenderer into WebCore.
159 * Misc/WebKitNSStringExtras.m:
160 (-[NSString _web_drawAtPoint:font:textColor:]):
161 (-[NSString _web_widthWithFont:]):
162 * Misc/WebStringTruncator.m:
163 (+[WebStringTruncator centerTruncateString:toWidth:]):
164 (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
165 (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
166 (+[WebStringTruncator widthOfString:font:]):
167 * WebCoreSupport/WebSystemInterface.m:
168 (InitWebCoreSystemInterface):
169 * WebCoreSupport/WebTextRenderer.h: Removed.
170 * WebCoreSupport/WebTextRenderer.m: Removed.
171 * WebCoreSupport/WebTextRendererFactory.h: Removed.
172 * WebCoreSupport/WebTextRendererFactory.m: Removed.
173 * WebKit.xcodeproj/project.pbxproj:
174 * WebView/WebFrameView.m:
175 (-[WebFrameView initWithFrame:]):
176 * WebView/WebHTMLView.m:
177 (-[NSArray _addToStyle:fontA:fontB:]):
178 * WebView/WebTextView.m:
179 (-[WebTextView setFixedWidthFont]):
181 (+[WebView _setAlwaysUseATSU:]):
182 (+[WebView _setShouldUseFontSmoothing:]):
183 (+[WebView _shouldUseFontSmoothing]):
185 2006-04-28 Eric Seidel <eseidel@apple.com>
190 http://bugzilla.opendarwin.org/show_bug.cgi?id=8643
192 * Misc/WebIconDatabase.m:
193 (-[NSMutableDictionary iconForURL:withSize:cache:]):
194 (-[NSMutableDictionary iconURLForURL:]):
195 (-[NSMutableDictionary retainIconForURL:]):
196 (-[NSMutableDictionary releaseIconForURL:]):
197 (-[WebIconDatabase _setIcon:forIconURL:]):
198 (-[WebIconDatabase _iconsForIconURLString:]):
199 (-[WebIconDatabase _forgetIconForIconURLString:]):
200 (-[WebIconDatabase _releaseIconForIconURLString:]):
201 (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]):
202 * Plugins/WebBasePluginPackage.m:
203 (+[WebBasePluginPackage pluginWithPath:]):
204 (-[WebBasePluginPackage pathByResolvingSymlinksAndAliasesInPath:]):
205 (-[WebBasePluginPackage initWithPath:]):
206 (-[WebBasePluginPackage getPluginInfoFromBundleAndMIMEDictionary:]):
207 (-[WebBasePluginPackage pListForPath:createFile:]):
208 (-[WebBasePluginPackage getPluginInfoFromPLists]):
209 (-[WebBasePluginPackage load]):
210 (-[WebBasePluginPackage setMIMEToExtensionsDictionary:]):
211 (-[WebBasePluginPackage isNativeLibraryData:]):
212 (-[NSArray _web_lowercaseStrings]):
213 * Plugins/WebNetscapePluginPackage.m:
214 (-[WebNetscapePluginPackage openResourceFile]):
215 (-[WebNetscapePluginPackage closeResourceFile:]):
216 (-[WebNetscapePluginPackage stringForStringListID:andIndex:]):
217 (-[WebNetscapePluginPackage getPluginInfoFromResources]):
218 (-[WebNetscapePluginPackage initWithPath:]):
219 (-[WebNetscapePluginPackage executableType]):
220 (-[WebNetscapePluginPackage unloadWithoutShutdown]):
221 (-[WebNetscapePluginPackage load]):
222 (-[WebNetscapePluginPackage unload]):
223 * Plugins/WebNetscapePluginRepresentation.m:
224 (-[WebNetscapePluginRepresentation redeliverStream]):
225 * Plugins/WebPluginDatabase.m:
226 (+[WebPluginDatabase installedPlugins]):
227 (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
228 (-[WebPluginDatabase pluginForExtension:]):
230 (-[WebPluginDatabase init]):
231 (-[WebPluginDatabase refresh]):
235 (pluginViewForInstance):
236 * WebCoreSupport/WebSubresourceLoader.m:
237 (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
238 (-[WebSubresourceLoader willSendRequest:redirectResponse:]):
239 * WebView/WebDataSource.m:
240 (-[WebDataSource isLoading]):
241 * WebView/WebFrame.m:
242 (-[WebFrame _loadDataSource:withLoadType:formState:]):
243 (-[WebFrame _subframeIsLoading]):
245 (-[WebView initWithFrame:]):
246 (-[WebView initWithFrame:frameName:groupName:]):
248 2006-04-26 Tim Omernick <timo@apple.com>
252 <rdar://problem/4525105> Repro TOT crash in [WebBaseNetscapePluginView dealloc] at coachella.com
253 <http://bugzilla.opendarwin.org/show_bug.cgi?id=8564> crashed when closing a tab
255 * WebView/WebFrame.m:
256 (-[WebFramePrivate dealloc]):
257 Assert that plugInViews has been released.
258 (-[WebFrame _addPlugInView:]):
259 New method. Adds the plug-in view to the plugInViews set and calls -setWebFrame: on it.
260 (-[WebFrame _removeAllPlugInViews]):
261 New method. Calls -setWebFrame:nil on all plug-in views and releases the plugInViews set.
262 (-[WebFrame _willCloseURL]):
263 New method. Dispose of plug-in views when leaving a page (or closing the WebView).
265 * WebView/WebFrameInternal.h:
266 Declared -_addPlugInView:, -_removeAllPlugInViews, -_willCloseURL
268 * WebCoreSupport/WebFrameBridge.m:
269 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
270 Call -[WebFrame _addPlugInView:] instead of directly setting plug-in views' frames. This
271 allows us to keep track of them so that we can explicitly dispose of them when leaving the page.
272 (-[WebFrameBridge closeURL]):
273 Override -[WebCoreFrameBridge closeURL] so that we can perform our own teardown when leaving
274 a page or closing the WebView.
276 * Plugins/WebBaseNetscapePluginView.h:
277 Declared -stop so that subclass WebNetscapePluginEmbeddedView can call it.
279 * Plugins/WebNetscapePluginEmbeddedView.m:
280 (-[WebNetscapePluginEmbeddedView setWebFrame:]):
281 Stop the plug-in when it is removed from its WebFrame.
283 2006-04-25 Tim Omernick <timo@apple.com>
285 Reviewed by John Sullivan.
287 <rdar://problem/4472035> SPI that checks for URL policy fails in plugin documents
289 * Plugins/WebPluginController.h:
290 * Plugins/WebPluginController.m:
291 (-[WebPluginController URLPolicyCheckReferrer]):
292 New method. Get the referrer from the frame's data source's NSURLResponse. Note that for
293 document types loaded by WebCore, this URL is the same as -[WebCorePageBridge referrer],
294 since the response URL is what we pass to -[WebCorePageBridge openURL:].
296 * Plugins/WebPluginContainerCheck.m:
297 (-[WebPluginContainerCheck _isForbiddenFileLoad]):
298 Use the WebPluginController's -URLPolicyCheckReferrer instead of assuming that the bridge's
299 -referrer is valid. -[WebCorePageBridge referrer] is only set during the normal WebCore page
300 load process, which has nothing to do with loading standalone plugin documents.
302 2006-04-25 Tim Omernick <timo@apple.com>
306 <rdar://problem/4526052> intermittent assertion failure in -[WebBasePluginPackage dealloc]
309 * Plugins/WebPluginPackage.m:
310 (-[WebPluginPackage unload]):
311 Clear isLoaded here. It turns out that only WebNetscapePluginPackage cleared its isLoaded
312 flag in -unload. We need to also do it here, because the superclass (WebBasePluginPackage)
313 asserts in -dealloc that -unload has been called.
315 2006-04-25 Tim Omernick <timo@apple.com>
319 <rdar://problem/4526120> -[WebBasePluginPackage finalize] leaks the CFBundle (under GC only)
321 * Plugins/WebBasePluginPackage.m:
322 (-[WebBasePluginPackage finalize]):
323 Release the CFBundle here.
325 2006-04-25 Tim Omernick <timo@apple.com>
329 <rdar://problem/4472037>
331 Private extensions to the WebPlugin interface. A plugin may implement these methods to receive loading callbacks
332 for its main resource. Plug-ins that implement this SPI show better loading progress in the browser, can be saved
333 to disk, and are more efficient by avoiding making duplicate GET or POST requests for the plug-in's main resource.
335 I want to provide a solid API for plug-in networking, but time constraints require that I first provide this simple
336 SPI for internal clients.
338 * Plugins/WebPluginViewFactoryPrivate.h:
339 Added a new plugin argument, WebPlugInShouldLoadMainResourceKey. If YES, the plugin is responsible
340 for loading its own content. If NO, the plugin should wait for WebKit to send it the data via the
341 new request-sharing SPI.
343 * Plugins/WebPluginPrivate.h: Added.
344 Request-sharing SPI. See comments in code.
346 * Plugins/WebPluginDocumentView.h:
347 Hang onto the plugin view as an ivar so we can call the new resource loading methods on it.
348 * Plugins/WebPluginDocumentView.m:
349 (-[WebPluginDocumentView dealloc]):
350 Release pluginView ivar.
351 (-[WebPluginDocumentView setDataSource:]):
352 Pass NO for WebPlugInShouldLoadMainResourceKey to indicate to the plugin that it should not
353 load its own main resource -- the data will come from WebKit. This is only necessary for plugin
354 documents. By the time we create the view for a plugin document, we already have fetched some
355 of its main resource's data. Embedded plugins do not have this issue because WebKit is not
356 involved in loading their content.
357 Call -webPlugInMainResourceDidReceivResponse: on the plugin if necessary. This lets the plugin
358 know how much and what kind of data is going to be received.
359 (-[WebPluginDocumentView dataSourceUpdated:]):
360 If the plugin implements the new request-sharing SPI, don't cancel the in-progress request.
361 (-[WebPluginDocumentView receivedData:withDataSource:]):
362 Forward to the plugin via the new request-sharing SPI.
363 (-[WebPluginDocumentView receivedError:withDataSource:]):
365 (-[WebPluginDocumentView finishedLoadingWithDataSource:]):
368 * Plugins/WebPluginPackage.m:
369 Added WebPlugInShouldLoadMainResourceKey, tweaked some style a bit.
371 * WebCoreSupport/WebFrameBridge.m:
372 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]):
373 Pass YES for WebPlugInShouldLoadMainResourceKey. Embedded plugins must load their own data.
374 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
377 * WebKit.xcodeproj/project.pbxproj:
378 Added WebPluginPrivate.h
380 2006-04-24 Maciej Stachowiak <mjs@apple.com>
384 <rdar://problem/4525364> REGRESSION (yesterday?): LOG() mechanism is broken
386 - initialize WebKit's log channels
388 * Misc/WebKitLogging.h:
389 * Misc/WebKitLogging.m:
390 (initializeLogChannel):
391 (WebKitInitializeLoggingChannelsIfNecessary):
392 * WebView/WebPreferences.m:
393 (+[WebPreferences initialize]):
395 (-[WebView _commonInitializationWithFrameName:groupName:]):
397 2006-04-24 Maciej Stachowiak <mjs@apple.com>
401 - move some prematurely moved code back
403 * WebCoreSupport/WebFrameBridge.h:
404 * WebCoreSupport/WebFrameBridge.m:
405 (-[WebFrameBridge fini]):
406 (-[WebFrameBridge _preferences]):
407 (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
408 (-[WebFrameBridge keyboardUIMode]):
410 2006-04-24 Maciej Stachowiak <mjs@apple.com>
414 - move more code from WebFrameBridge to WebCoreFrameBridge
416 * WebCoreSupport/WebFrameBridge.h:
417 * WebCoreSupport/WebFrameBridge.m:
418 (-[WebFrameBridge fini]):
419 (-[WebFrameBridge expiresTimeForResponse:]):
420 (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
421 (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
422 (-[WebFrameBridge valueForKey:keys:values:]):
423 (-[WebFrameBridge _preferences]):
425 2006-04-24 Maciej Stachowiak <mjs@apple.com>
429 - Remove use of _webSuperviewOfClass: and related
430 http://bugzilla.opendarwin.org/show_bug.cgi?id=8562
432 I removed all use of these, now objects get at each other via
433 actual pointers, not using the view hierarchy. However, I left two
434 of the calls in because other clients rely on them as SPI (ugh).
436 * History/WebHistoryItem.m:
437 * Misc/WebNSViewExtras.h:
438 * Misc/WebNSViewExtras.m:
439 (-[NSView _web_superviewOfClass:]):
440 (-[NSView _web_parentWebFrameView]):
441 * Plugins/WebNetscapePluginDocumentView.m:
442 (-[WebNetscapePluginDocumentView layout]):
443 * Plugins/WebNetscapePluginEmbeddedView.h:
444 * Plugins/WebNetscapePluginEmbeddedView.m:
445 (-[WebNetscapePluginEmbeddedView setWebFrame:]):
446 (-[WebNetscapePluginEmbeddedView dataSource]):
447 * Plugins/WebNullPluginView.h:
448 * Plugins/WebNullPluginView.m:
449 (-[WebNullPluginView setWebFrame:]):
450 (-[WebNullPluginView viewDidMoveToWindow]):
451 * Plugins/WebPluginController.h:
452 * Plugins/WebPluginController.m:
453 (-[WebPluginController setDataSource:]):
454 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
455 (-[WebPluginController webPlugInContainerShowStatus:]):
456 (-[WebPluginController webPlugInContainerSelectionColor]):
457 (-[WebPluginController webFrame]):
458 * Plugins/WebPluginDocumentView.h:
459 * Plugins/WebPluginDocumentView.m:
460 (-[WebPluginDocumentView setDataSource:]):
461 (-[WebPluginDocumentView layout]):
462 (-[WebPluginDocumentView currentWindow]):
463 (-[WebPluginDocumentView viewWillMoveToWindow:]):
464 * WebCoreSupport/WebFrameBridge.m:
465 (-[WebFrameBridge formControlIsBecomingFirstResponder:]):
466 (-[WebFrameBridge formControlIsResigningFirstResponder:]):
467 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
468 * WebCoreSupport/WebViewFactory.m:
469 (-[WebViewFactory bridgeForView:]):
470 * WebView/WebClipView.m:
471 (-[NSView initWithFrame:]):
472 * WebView/WebFrameView.m:
473 (-[WebFrameView _shouldDrawBorder]):
474 (-[WebFrameView webCoreBridge]):
475 * WebView/WebHTMLView.m:
476 (-[WebTextCompleteController dealloc]):
477 (-[WebHTMLView _dataSource]):
478 (-[WebHTMLView _bridge]):
479 (-[WebHTMLView _webView]):
480 (-[WebHTMLView _frameView]):
481 (-[WebHTMLView _web_firstResponderCausesFocusDisplay]):
482 (-[NSArray becomeFirstResponder]):
483 (-[NSArray setDataSource:]):
484 (-[NSArray pageUp:]):
485 (-[NSArray pageDown:]):
486 (-[NSArray pageUpAndModifySelection:]):
487 (-[NSArray pageDownAndModifySelection:]):
488 (-[WebHTMLView _frame]):
489 * WebView/WebHTMLViewInternal.h:
490 * WebView/WebImageView.h:
491 * WebView/WebImageView.m:
492 (-[WebImageView drawRect:]):
493 (-[WebImageView adjustFrameSize]):
494 (-[WebImageView setDataSource:]):
495 (-[WebImageView webView]):
496 (-[WebImageView writeImageToPasteboard:types:]):
497 (-[WebImageView copy:]):
498 (-[WebImageView elementAtPoint:]):
499 (-[WebImageView mouseDragged:]):
500 * WebView/WebPDFView.h:
501 * WebView/WebPDFView.m:
502 (-[WebPDFView _applyPDFDefaults]):
503 (-[WebPDFView _trackFirstResponder]):
504 (-[PDFPrefUpdatingProxy forwardInvocation:]):
505 * WebView/WebRenderNode.m:
506 (-[WebRenderNode initWithWebFrameView:]):
507 * WebView/WebTextView.h:
508 * WebView/WebTextView.m:
509 (-[WebTextView _textSizeMultiplierFromWebView]):
510 (-[WebTextView _preferences]):
511 (-[WebTextView setDataSource:]):
512 (-[WebTextView _webFrame]):
513 (-[WebTextView dragSelectionWithEvent:offset:slideBack:]):
514 (-[WebTextView menuForEvent:]):
515 (-[WebTextView resignFirstResponder]):
516 (-[WebTextView drawPageBorderWithSize:]):
517 (-[WebTextView knowsPageRange:]):
519 (-[WebView searchFor:direction:caseSensitive:wrap:]):
520 (containingFrameView):
521 (-[WebView _focusedFrame]):
522 (-[WebView _frameViewAtWindowPoint:]):
524 2006-04-23 Maciej Stachowiak <mjs@apple.com>
528 - push WebFileButton and WebStringTruncator code down to WebCore
529 http://bugzilla.opendarwin.org/show_bug.cgi?id=8552
531 * Misc/WebStringTruncator.m:
532 (+[WebStringTruncator centerTruncateString:toWidth:]):
533 (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
534 (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
535 (+[WebStringTruncator widthOfString:font:]):
536 * WebCoreSupport/WebFileButton.h: Removed.
537 * WebCoreSupport/WebFileButton.m: Removed.
538 * WebCoreSupport/WebFrameBridge.h:
539 * WebCoreSupport/WebFrameBridge.m:
540 (-[WebFrameBridge runOpenPanelForFileButtonWithResultListener:]):
541 * WebCoreSupport/WebViewFactory.m:
542 (-[WebViewFactory fileButtonChooseFileLabel]):
543 (-[WebViewFactory fileButtonNoFileSelectedLabel]):
544 * WebKit.xcodeproj/project.pbxproj:
546 2006-04-23 Maciej Stachowiak <mjs@apple.com>
550 - remove WebCookieAdapter, WebCore can just use Foundation directly.
552 * WebCoreSupport/WebCookieAdapter.h: Removed.
553 * WebCoreSupport/WebCookieAdapter.m: Removed.
554 * WebKit.xcodeproj/project.pbxproj:
555 * WebView/WebFrameView.m:
556 (-[WebFrameView initWithFrame:]):
558 2006-04-23 Maciej Stachowiak <mjs@apple.com>
562 - prune WebView SPI of unused calls
564 Specifically I moved methods that have no callers outside WebKit
565 to WebViewInternal.h or removed them entirely.
567 * DefaultDelegates/WebDefaultContextMenuDelegate.m:
568 * Plugins/WebBaseNetscapePluginView.m:
569 * Plugins/WebNetscapePluginDocumentView.m:
570 * Plugins/WebNetscapePluginStream.m:
571 * Plugins/WebNullPluginView.m:
572 * Plugins/WebPluginContainerCheck.m:
573 * Plugins/WebPluginController.m:
574 * WebCoreSupport/WebFrameBridge.m:
575 * WebCoreSupport/WebPageBridge.m:
576 * WebCoreSupport/WebSubresourceLoader.m:
577 * WebView/WebDataSource.m:
578 * WebView/WebHTMLView.m:
579 * WebView/WebImageView.m:
580 * WebView/WebLoader.m:
581 * WebView/WebMainResourceLoader.m:
582 * WebView/WebPDFView.m:
583 * WebView/WebScriptDebugDelegate.m:
585 (-[WebView _downloadURL:]):
586 * WebView/WebViewInternal.h:
587 * WebView/WebViewPrivate.h:
589 2006-04-22 Maciej Stachowiak <mjs@apple.com>
593 - remove WebKit copy of assertions code, use the assertions
594 stuff from JavaScriptCore instead.
596 * Carbon/HIViewAdapter.m:
597 * DOM/WebDOMOperations.m:
598 * DefaultDelegates/WebDefaultContextMenuDelegate.m:
599 * DefaultDelegates/WebDefaultPolicyDelegate.m:
600 (-[WebDefaultPolicyDelegate webView:unableToImplementPolicyWithError:frame:]):
601 * History/WebBackForwardList.m:
602 * History/WebHistory.m:
603 (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
604 (-[WebHistoryPrivate _saveHistoryGuts:URL:error:]):
605 * History/WebHistoryItem.m:
606 * Misc/WebAssertions.h: Removed.
607 * Misc/WebAssertions.m: Removed.
608 * Misc/WebDatabase.m:
609 * Misc/WebDownload.m:
610 * Misc/WebFileDatabase.m:
612 * Misc/WebIconDatabase.m:
613 (-[NSMutableDictionary iconForURL:withSize:cache:]):
614 (-[NSMutableDictionary releaseIconForURL:]):
615 (-[NSMutableDictionary delayDatabaseCleanup]):
616 (-[NSMutableDictionary allowDatabaseCleanup]):
617 (-[WebIconDatabase _loadIconDictionaries]):
618 (-[WebIconDatabase _updateFileDatabase]):
619 (-[WebIconDatabase _iconsBySplittingRepresentationsOfIcon:]):
620 * Misc/WebIconLoader.m:
621 * Misc/WebKitLogging.h:
622 * Misc/WebKitLogging.m:
623 * Misc/WebKitSystemBits.m:
625 * Misc/WebLRUFileList.m:
626 (WebLRUFileListRemoveOldestFileFromList):
627 (WebLRUFileListGetFileSize):
628 * Misc/WebLocalizableStrings.m:
629 * Misc/WebNSCalendarDateExtras.m:
630 * Misc/WebNSDataExtras.m:
631 * Misc/WebNSDictionaryExtras.m:
632 * Misc/WebNSFileManagerExtras.m:
633 * Misc/WebNSPasteboardExtras.m:
634 * Misc/WebNSURLExtras.m:
637 (allCharactersInIDNScriptWhiteList):
638 * Misc/WebNSURLRequestExtras.m:
639 * Misc/WebNSUserDefaultsExtras.m:
640 * Misc/WebStringTruncator.m:
641 * Panels/WebAuthenticationPanel.m:
642 (-[WebAuthenticationPanel loadNib]):
643 * Panels/WebPanelAuthenticationHandler.m:
644 * Plugins/WebBaseNetscapePluginStream.m:
645 (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
646 (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
647 * Plugins/WebBaseNetscapePluginView.m:
649 (-[WebBaseNetscapePluginView start]):
650 (-[WebBaseNetscapePluginView status:]):
651 (-[WebBaseNetscapePluginView _printedPluginBitmap]):
652 * Plugins/WebBasePluginPackage.m:
653 * Plugins/WebNetscapePluginDocumentView.m:
654 * Plugins/WebNetscapePluginPackage.m:
655 (-[WebNetscapePluginPackage load]):
656 * Plugins/WebNetscapePluginRepresentation.m:
657 * Plugins/WebPluginContainerCheck.m:
658 * Plugins/WebPluginController.m:
659 (-[WebPluginController addPlugin:]):
660 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
661 (-[WebPluginController webPlugInContainerShowStatus:]):
662 * Plugins/WebPluginDatabase.m:
663 * Plugins/WebPluginDocumentView.m:
664 * WebCoreSupport/WebCookieAdapter.m:
665 * WebCoreSupport/WebFileButton.m:
666 * WebCoreSupport/WebFrameBridge.m:
667 (-[WebFrameBridge runModal]):
668 * WebCoreSupport/WebImageData.m:
669 (-[WebImageData _checkSolidColor:]):
670 (-[WebImageData tileInRect:fromPoint:context:]):
671 (-[WebImageData scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
672 * WebCoreSupport/WebImageDecoder.m:
673 * WebCoreSupport/WebImageRenderer.m:
674 (-[WebImageRenderer TIFFRepresentation]):
675 * WebCoreSupport/WebImageRendererFactory.m:
676 * WebCoreSupport/WebJavaScriptTextInputPanel.m:
677 * WebCoreSupport/WebKeyGenerator.m:
678 * WebCoreSupport/WebPageBridge.m:
679 * WebCoreSupport/WebSubresourceLoader.m:
680 * WebCoreSupport/WebTextRenderer.m:
682 (-[WebTextRenderer initWithFont:]):
684 (initializeATSUStyle):
685 (createATSULayoutParameters):
688 * WebCoreSupport/WebTextRendererFactory.m:
689 * WebCoreSupport/WebViewFactory.m:
691 * WebKit.xcodeproj/project.pbxproj:
693 * WebView/WebArchiver.m:
694 (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
695 * WebView/WebClipView.m:
696 * WebView/WebDataProtocol.m:
697 * WebView/WebDataSource.m:
698 (-[WebDataSource _startLoading]):
699 * WebView/WebFormDataStream.m:
702 * WebView/WebFrame.m:
703 (-[WebFrame _transitionToCommitted:]):
704 * WebView/WebFrameView.m:
705 * WebView/WebHTMLRepresentation.m:
706 * WebView/WebHTMLView.m:
707 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
708 (-[NSArray drawSingleRect:]):
709 (-[NSArray namesOfPromisedFilesDroppedAtDestination:]):
710 (-[NSArray _scaleFactorForPrintOperation:]):
711 (-[NSArray deleteBackwardByDecomposingPreviousCharacter:]):
712 (-[NSArray checkSpelling:]):
713 (-[NSArray showGuessPanel:]):
714 (-[NSArray _changeSpellingToWord:]):
715 (-[NSArray ignoreSpelling:]):
716 (-[NSArray performFindPanelAction:]):
717 (-[WebTextCompleteController doCompletion]):
718 * WebView/WebImageView.m:
719 * WebView/WebLoader.m:
720 (-[NSURLProtocol connection:willCacheResponse:]):
721 * WebView/WebPDFRepresentation.m:
722 (+[WebPDFRepresentation PDFDocumentClass]):
723 * WebView/WebPDFView.m:
724 (+[WebPDFView PDFKitBundle]):
725 (+[WebPDFView PDFViewClass]):
726 (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
727 * WebView/WebTextRepresentation.m:
728 * WebView/WebTextView.m:
729 * WebView/WebUnarchivingState.m:
732 2006-04-22 Timothy Hatcher <timothy@apple.com>
736 http://bugzilla.opendarwin.org/show_bug.cgi?id=8514
737 Bug 8514: Web Inspector hides when the app is in the background
739 Makes the inspector not hide in the background. Since the inspector is a floating panel
740 we need to call setFloatingPanel:NO when the app is switching into the background. Then
741 call setFloatingPanel:YES when the app is activated again. Without this the inspector
742 would float above all applications.
744 * WebInspector/WebInspector.m:
745 (-[NSWindow window]): setHidesOnDeactivate:NO
746 (-[NSWindow windowWillClose:]): de-regiser appliction active notifications
747 (-[NSWindow showWindow:]): register for appliction active notifications
748 (-[WebInspector _applicationWillResignActive]): setFloatingPanel:NO
749 (-[WebInspector _applicationDidBecomeActive]): setFloatingPanel:YES
751 2006-04-21 Adele Peterson <adele@apple.com>
755 - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8181
756 REGRESSION: After tabbing in page's field, attempting to tab from Google toolbar search to page fails on first try
758 Test: manual-tests/tabbing-input-google.html
760 * WebView/WebHTMLView.m: (-[NSArray resignFirstResponder]):
761 When resigning first responder, reset willBecomeFirstResponderForNodeFocus, so when the WebHTMLView gets focus again
762 it knows it can start moving through the tab cycle.
764 2006-04-20 Tim Omernick <timo@apple.com>
766 Reviewed by John Sullivan.
768 <rdar://problem/4476875> Support printing for embedded Netscape plugins
770 NOTE: This only works with the Flash plugin right now. It appears that the other
771 major plugins either have awful printing support, or no printing support. If someone
772 can find an example of any other embedded Netscape plugin printing in any browser on
773 the Mac, I will be happy to eat my own words!
775 * Plugins/WebBaseNetscapePluginView.m:
776 (-[WebBaseNetscapePluginView drawRect:]):
777 When printing, get the printed bitmap via -_printedPluginBitmap, and draw it into the
779 (-[WebBaseNetscapePluginView _printedPluginBitmap]):
780 Call NPP_Print on the plugin to render it into a GWorld. This GWorld has the same
781 underlying buffer as an NSBitmapImageRep, which is returned to the caller.
783 2006-04-20 Mitz Pettel <opendarwin.org@mitzpettel.com>
788 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
789 REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
790 a file: URL being pasted instead of just the file name
791 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
792 REGRESSION: File's path doesn't appear after dragging file into input field
794 * WebView/WebHTMLView.m:
795 (-[WebHTMLView _plainTextFromPasteboard:]): Added method that tries to copy AppKit
796 text fields' logic for extracting plain text from the pasteboard.
797 (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Added helper method.
798 (-[WebHTMLView _shouldInsertText:replacingDOMRange:givenAction:]):
799 (-[WebHTMLView _shouldReplaceSelectionWithText:givenAction:]):
800 (-[WebHTMLView readSelectionFromPasteboard:]): Paste as plain text if
801 rich text is not allowed.
802 (-[WebHTMLView validateUserInterfaceItem:]): Changed to not allow pasteAsRichText:
803 if the paste is not going to be handled by the DOM and the selection
804 does not allow pasting rich text.
805 (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Paste as plain text if
806 rich text is not allowed.
807 (-[WebHTMLView paste:]): Ditto.
808 (-[WebHTMLView pasteAsPlainText:]):
810 2006-04-20 Darin Adler <darin@apple.com>
814 - WebKit part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
815 eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
817 * WebCoreSupport/WebGraphicsBridge.h: Removed.
818 * WebCoreSupport/WebGraphicsBridge.m: Removed.
819 * WebCoreSupport/WebSystemInterface.h: Added.
820 * WebCoreSupport/WebSystemInterface.m: Added.
822 * WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.
824 * WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
825 * WebCoreSupport/WebImageRenderer.m: Ditto.
826 * WebCoreSupport/WebTextRenderer.m: Ditto.
828 * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
829 initialization inside a boolean, just in case some things take a little time. Added
830 a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
831 will need to add it in some other places if we call code that requires the use of
832 WebCoreSystemInterface functions from anywhere that can be invoked before creations
833 of the first WebFrameView, but for now there is no need.
835 2006-04-19 James G. Speth <speth@end.com>
839 http://bugzilla.opendarwin.org/show_bug.cgi?id=8442
840 Bug 8442: improvements to Cocoa bindings support in WebView - code simplification
842 Removes the WebController class added earlier; changes NSTreeController and
843 WebView to together without it. Now you can just bind the contentObject binding
844 of the tree controller directly to the mainFrameDocument key of the WebView.
846 * WebCoreSupport/WebFrameBridge.m:
847 (-[WebFrameBridge windowObjectCleared]):
848 * WebView/WebDataSource.m:
849 (-[WebDataSource _setTitle:]):
850 * WebView/WebFrame.m:
851 (-[WebFrame _closeOldDataSources]):
853 (-[WebView _progressStarted:]):
854 (-[WebView _finalProgressComplete]):
855 (-[WebView _commonInitializationWithFrameName:groupName:]):
856 (-[WebView setMainFrameDocumentReady:]):
857 (-[WebView mainFrameDocument]):
858 * WebView/WebViewPrivate.h:
860 2006-04-19 James G. Speth <speth@end.com>
864 http://bugzilla.opendarwin.org/show_bug.cgi?id=6635
865 Bug 6635: Crash selecting inspector nodes for tabs that aren't foremost
867 Stop observing window will close notifications before we tell the highlight window to close,
868 this prevents the crash. Also prevent drawing highlights for hidden tabs.
870 * WebInspector/WebInspector.m:
871 (-[WebInspector _highlightNode:]):
872 * WebInspector/WebNodeHighlight.m:
873 (-[WebNodeHighlight expire]):
875 2006-04-19 James G. Speth <speth@end.com>
879 http://bugzilla.opendarwin.org/show_bug.cgi?id=6637
880 Bug 6637: selecting node in Inspector after closing window crashes Safari
882 When the window the Web Inspector was inspecting is closed, the inspector goes into its
883 no-selection state. Choosing to inspect another element activates it again. The inspector
884 will also follow the WebView if the URL changes and select the root element on the new page.
886 * WebInspector/WebInspector.m:
887 (-[NSWindow setWebFrame:]):
888 (-[NSWindow setRootDOMNode:]):
889 (-[WebInspector _revealAndSelectNodeInTree:]):
890 (-[WebInspector _update]):
891 (-[WebInspector _updateRoot]):
892 (-[WebInspector inspectedWebViewProgressFinished:]):
893 (-[WebInspector inspectedWindowWillClose:]):
894 (-[WebInspector webView:didFinishLoadForFrame:]):
895 * WebInspector/WebInspectorPanel.m:
896 (-[WebInspectorPanel canBecomeMainWindow]):
898 2006-04-18 Darin Adler <darin@apple.com>
902 * WebInspector/webInspector/inspector.css: Add "-webkit-" prefixes to the border
903 radius properties to make the corners rounded again.
905 2006-04-16 Mitz Pettel <opendarwin.org@mitzpettel.com>
909 - WebKit part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8324
910 REGRESSION: textarea :focus not applied immediately
912 * WebCoreSupport/WebFrameBridge.m:
913 (-[WebFrameBridge formControlIsBecomingFirstResponder:]): Added. Calls the ancestor
914 WebHTMLView's _formControlIsBecomingFirstResponder:
915 * WebView/WebHTMLView.m:
916 (-[WebHTMLView _updateFocusState:]): If a descendant is becoming first responder,
917 enable focused appearance.
918 (-[WebHTMLView _formControlIsBecomingFirstResponder:]): Added. Calls _updateFocusState,
919 causing the frame to display with focus attributes.
920 * WebView/WebHTMLViewInternal.h:
922 2006-04-14 James G. Speth <speth@end.com>
926 Bug 8389: support for Cocoa bindings - binding an NSTreeController to the WebView's DOM
927 http://bugzilla.opendarwin.org/show_bug.cgi?id=8389
929 Added a controller class, WebController, that is a subclass of
930 NSTreeController that has a new outlet/binding for the WebView.
932 * WebCoreSupport/WebFrameBridge.m:
933 (-[WebFrameBridge windowObjectCleared]): notify bindings about the document change
935 (-[WebView _progressStarted:]): notify bindings about the document change
936 (-[WebView _finalProgressComplete]): notify bindings about the document change
937 (-[WebView _declaredKeys]): added a key for the main frame document
938 (-[WebController init]):
939 (-[WebController exposedBindings]):
940 (-[WebController valueClassForBinding:]):
941 (-[WebController setContent:]):
942 (-[WebController webView]):
943 (-[WebController setWebView:]):
944 (-[WebView mainFrameDocument]): get the main frame's DOMDocument
945 * WebView/WebViewPrivate.h: Adds mainFrameDocument to pending public.
947 2006-04-12 David Harrison <harrison@apple.com>
951 <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
952 <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
954 (see related changes in WebCore)
957 * editing/selection/extend-by-sentence-001.html: Added.
958 * fast/dom/inner-text-001.html: Added.
960 * WebView/WebHTMLView.m:
961 (-[NSArray validateUserInterfaceItem:]):
962 (-[NSArray moveToBeginningOfSentence:]):
963 (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
964 (-[NSArray moveToEndOfSentence:]):
965 (-[NSArray moveToEndOfSentenceAndModifySelection:]):
966 (-[NSArray selectSentence:]):
968 * WebView/WebViewPrivate.h:
969 Add sentence navigation and selection.
971 2006-04-12 Tim Omernick <timo@apple.com>
975 Part of <rdar://problem/4482530>
978 (-[WebView _focusedFrame]):
979 Fixed up the logic here to take into account immediate subviews of WebView, which are not actually in a WebFrameView
980 (they are peers to the main frame's WebFrameView).
982 2006-04-10 John Sullivan <sullivan@apple.com>
984 Reviewed by Tim Omernick.
986 - fixed <rdar://problem/4139799> Seed: Safari: Private Browsing leaves traces in Icon Cache
988 * Misc/WebIconDatabasePrivate.h:
989 new ivars: pageURLsBoundDuringPrivateBrowsing, iconURLsBoundDuringPrivateBrowsing, and privateBrowsingEnabled
991 * Misc/WebIconDatabase.m:
992 (-[NSMutableDictionary init]):
993 initialize new ivars, and listen for notifications that WebPreferences changed so we can react to changes
995 (-[NSMutableDictionary iconForURL:withSize:cache:]):
996 Don't remove icon URL from extraRetain dictionary; that's now done in _forgetIconForIconURLString. (I left a
997 comment here earlier about why I was worried about this change, but I convinced myself that it's fine.)
998 (-[WebIconDatabase removeAllIcons]):
999 Removed no-longer-true (and never very clear) comment, and braces. Also remove all objects from the two
1000 private-browsing-related dictionaries.
1001 (-[WebIconDatabase _setIcon:forIconURL:]):
1002 remember icon URL if private browsing is enabled
1003 (-[WebIconDatabase _setHaveNoIconForIconURL:]):
1004 remember icon URL if private browsing is enabled
1005 (-[WebIconDatabase _setIconURL:forURL:]):
1006 added an assert that helped me out at one point
1007 (-[WebIconDatabase _clearDictionaries]):
1008 clear the two new dictionaries too
1009 (-[WebIconDatabase _loadIconDictionaries]):
1010 made an existing ERROR not fire in the expected case where there are no icons at all on disk
1011 (-[WebIconDatabase _updateFileDatabase]):
1012 when saving the pageURLToIconURL dictionary to disk, first remove any values that were created during
1014 (-[WebIconDatabase _retainIconForIconURLString:]):
1015 skip the code that deals with saving changes to disk if private browsing is enabled
1016 (-[WebIconDatabase _forgetIconForIconURLString:]):
1017 Remove the icon URL from extraRetain dictionary here. We're forgetting everything about this icon URL
1018 so we should forget its former extraRetain count too.
1019 (-[WebIconDatabase _resetCachedWebPreferences:]):
1020 Cache the new value of private browsing. If it has now been turned off, forget everything we learned
1021 while it was on. This causes (e.g.) icons for bookmarks or pre-existing history items to be forgotten
1022 if the icon was only learned during private browsing.
1024 * History/WebHistoryItem.m:
1025 removed an unnecessary #import I happened to notice
1027 2006-04-10 David Hyatt <hyatt@apple.com>
1029 Make the broken CG focus ring painting work when WebCore sets a clip
1030 (in addition to respecting the dirty rect clip).
1034 * WebCoreSupport/WebGraphicsBridge.m:
1035 (-[WebGraphicsBridge drawFocusRingWithPath:radius:color:clipRect:]):
1037 2006-04-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
1041 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8100
1042 REGRESSION (NativeTextField): Right-aligned and RTL text jitters in new text fields
1044 * WebCoreSupport/WebTextRenderer.m:
1045 (overrideLayoutOperation): For RTL runs, apply the word-rounding on the left.
1046 (CG_floatWidthForRun): For RTL runs, apply the last character's rounding
1047 on the left by adjusting the start position.
1048 (initializeWidthIterator): Added finalRoundingWidth field to WidthIterator.
1049 (advanceWidthIterator): For RTL runs, apply rounding on the left of the character,
1050 by increasing the width of the next character (which is the character to the left). For
1051 the last character, keep the rounding width in the iterator's finalRoundingWidth, to be used by
1052 CG_floatWidthForRun().
1054 2006-04-08 John Sullivan <sullivan@apple.com>
1056 Reviewed by Adele Peterson.
1058 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8260
1059 REGRESSION: Assertion failure: ![_private->iconsToSaveWithURLs containsObject:iconURLString]
1060 in WebIconDatabase.m:695-[WebIconDatabase(WebInternal) _retainIconForIconURLString:]
1062 * Misc/WebIconDatabase.m:
1063 (-[WebIconDatabase _retainIconForIconURLString:]):
1064 This new assertion was one block too high; moved it in.
1066 2006-04-07 David Hyatt <hyatt@apple.com>
1068 A fix that makes coalesced updates work much better (and makes our
1069 single animated GIF timer work better). The new rect painting algorithm
1070 for WebHTMLView will use the single unioned rect if the # of rects exceeds
1071 a threshold (10 is my initial cut), or if the union has enough "wasted"
1072 additional pixels (conservatively set at 75%).
1076 * WebView/WebHTMLView.m:
1077 (-[NSArray drawSingleRect:]):
1078 (-[NSArray drawRect:]):
1080 2006-04-07 Maciej Stachowiak <mjs@apple.com>
1084 - simplify archive loading
1086 * WebView/WebDataSource.m:
1087 (-[WebDataSource representation]): fix whitespace
1088 * WebView/WebHTMLRepresentation.m:
1089 (-[WebHTMLRepresentation loadArchive]): Use WebFrame's loadArchive: instead
1090 of trying to do a manual load here.
1091 (-[WebHTMLRepresentation documentSource]): No more special case for WebArchive.
1093 2006-04-07 John Sullivan <sullivan@apple.com>
1095 Reviewed by Tim Omernick.
1097 - fixed <rdar://problem/4507054> If an icon file is removed from disk behind Safari's back,
1098 Safari will not try to refetch it
1100 In addition to letting WebIconDatabase recover from disk/memory mismatches as per 4507054, I also found
1101 a bug in the way icons are remembered that could account for some of the other cases where
1102 site icons didn't appear (and you'd get an ERROR on debug builds about WebIconDatabase saying it
1103 had some icon when it really doesn't).
1105 * Misc/WebIconDatabase.m:
1106 (-[WebIconDatabase iconForURL:withSize:cache:]):
1107 When the icon file for a previously-saved site icon isn't found, forget about the darn icon URL thoroughly
1108 so that this situation is self-correcting. Formerly, once you got into this state WebKit would never find
1109 the icon again (short of removing the entire icon database cleanly). Note that this does *not* change
1110 the behavior of sites that didn't have a site icon when WebKit checked -- these will continue to not
1111 return a site icon indefinitely (that's a separate, possibly performance-sensitive issue).
1112 (-[WebIconDatabase _retainIconForIconURLString:]):
1113 This code did the wrong thing in the case where an icon was in the process of being forgotten about. In
1114 that case, the icon would still be in _private->iconsOnDiskWithURLs, so we wouldn't try to save it here,
1115 so the new icon wouldn't stick.
1117 2006-04-07 David Hyatt <hyatt@apple.com>
1119 Re-enable coalesced updates. Our move to a single timer has essentially
1120 implemented coalescing of updates anyway, so the regression has already
1121 come back. Since we have to deal with that now anyway, there's no reason
1122 to visually tear also. :)
1127 * WebView/WebView.m:
1128 (-[WebView _commonInitializationWithFrameName:groupName:]):
1130 2006-04-05 Darin Adler <darin@apple.com>
1132 - fixed a storage leak from that last check-in
1134 * WebView/WebUnarchivingState.m: (-[WebUnarchivingState dealloc]):
1135 Release the two dictionaries.
1137 2006-04-05 Maciej Stachowiak <mjs@apple.com>
1141 - start on factoring WebArchive unpacking more into a separate class.
1142 http://bugzilla.opendarwin.org/show_bug.cgi?id=8208
1144 * WebKit.xcodeproj/project.pbxproj:
1145 * WebView/WebDataSource.m:
1146 (-[WebDataSourcePrivate dealloc]):
1147 (-[WebDataSource _addToUnarchiveState:]):
1148 (-[WebDataSource _popSubframeArchiveWithName:]):
1149 (-[WebDataSource _documentFragmentWithArchive:]):
1150 (-[WebDataSource _setupForReplaceByMIMEType:]):
1151 (-[WebDataSource subresourceForURL:]):
1152 * WebView/WebDataSourcePrivate.h:
1153 * WebView/WebFrame.m:
1154 (-[WebFrame _loadRequest:archive:]):
1155 (-[WebFrame loadRequest:]):
1156 (-[WebFrame loadArchive:]):
1157 * WebView/WebFramePrivate.h:
1158 * WebView/WebHTMLRepresentation.m:
1159 (-[WebHTMLRepresentation loadArchive]):
1160 * WebView/WebUnarchivingState.h: Added.
1161 * WebView/WebUnarchivingState.m: Added.
1162 (-[WebUnarchivingState init]):
1163 (-[WebUnarchivingState addArchive:]):
1164 (-[WebUnarchivingState archivedResourceForURL:]):
1165 (-[WebUnarchivingState popSubframeArchiveWithFrameName:]):
1167 2006-04-04 Timothy Hatcher <timothy@apple.com>
1171 The Debug and Release frameworks are now built with install paths relative to the build products directory.
1172 This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore.
1174 * WebKit.xcodeproj/project.pbxproj:
1176 2006-04-04 John Sullivan <sullivan@apple.com>
1178 Reviewed by Adele Peterson.
1180 - WebKit part of <rdar://problem/4498418> "Autosaved" searchterms are saved during private browsing
1182 * WebView/WebView.m:
1183 (-[WebView _updateWebCoreSettingsFromPreferences:]):
1184 Pass private browsing setting down to WebCore.
1186 2006-04-03 John Sullivan <sullivan@apple.com>
1188 Reviewed by Tim Hatcher.
1190 - re-fixed <rdar://problem/4481198> REGRESSION (TOT): search results list in bookmarks view
1191 remains when search text is deleted
1193 * WebView/WebView.m:
1194 (-[WebView searchFor:direction:caseSensitive:wrap:]):
1195 I fixed this recently, but then broke it again by adding an early bail-out to this method. So
1196 now I'm removing the early bail-out.
1198 2006-04-02 Trey Matteson <trey@usa.net>
1202 fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8121
1203 REGRESSION: 404s are not displayed
1205 * WebView/WebMainResourceLoader.m:
1206 (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
1207 Only cancel failed loads for object elements, not for frames or a whole page.
1209 2006-04-02 Maciej Stachowiak <mjs@apple.com>
1213 - fixed <rdar://problem/4198619> REGRESSION: tabbing through links fails after hitting text field w/ sys's "tab to all controls" off
1214 - fixed <rdar://problem/4463760> REGRESSION: Can't tab from old text field (like password fields) to new text field (6811)
1215 (http://bugzilla.opendarwin.org/show_bug.cgi?id=6811)
1216 - fixed tab and shift tab don't select the right things
1217 http://bugzilla.opendarwin.org/show_bug.cgi?id=5685
1219 * WebCoreSupport/WebFrameBridge.m:
1220 (-[WebFrameBridge willMakeFirstResponderForNodeFocus]): New method
1221 - let WebHTMLView know that the next time it becomes first
1222 responder, it's to change focus within the page and the right node
1223 has already been set, so it should not move focus forward or
1225 * WebView/WebHTMLView.m:
1226 (-[NSArray needsPanelToBecomeKey]): Override to return YES, oddly enough this
1227 is the right way to tell AppKit that you should be in the tab cycle loop.
1228 (-[NSArray becomeFirstResponder]): Don't move forward or back in tab cycle
1229 when this becomeFirstResponder is for tabbing from a control in the page.
1230 (-[WebHTMLView _willMakeFirstResponderForNodeFocus]): Note that the next
1231 time this view becomes first responder, it will be for in-page focus
1233 * WebView/WebHTMLViewInternal.h:
1235 2006-04-01 Darin Adler <darin@apple.com>
1239 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8105
1240 REGRESSION (NativeTextField): Option-delete deletes one space before the deleted word
1242 Test: fast/forms/input-text-option-delete.html
1244 * WebView/WebHTMLView.m:
1245 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Pass NO for
1246 smartDeleteOK. Smart deletion only applies to deleting a word at a time, and none of
1247 the callers of this function that delete a word at a time want smart deletion.
1248 (-[WebHTMLView deleteToEndOfLine:]): Fixed tiny formatting glitch.
1250 2006-03-31 Timothy Hatcher <timothy@apple.com>
1254 We need to set reachedTerminalState to YES before we release
1255 the resources to prevent a double dealloc of WebView
1257 Fixes <rdar://problem/4372628> crash deallocating a WebView in -[WebFrame stopLoading]
1259 * WebView/WebLoader.m:
1260 (-[NSURLProtocol releaseResources]): set reachedTerminalState earlier
1262 2006-03-31 John Sullivan <sullivan@apple.com>
1264 Reviewed by Tim Omernick.
1266 Some cleanup in the WebIconDatabase code in a fruitless search for the cause
1267 of the mysterious -[WebFileDatabase performSetObject:forKey] crash
1269 * Misc/WebIconDatabase.m:
1270 (-[WebIconDatabase _createFileDatabase]):
1271 removed obsolete comment
1272 (-[WebIconDatabase _loadIconDictionaries]):
1273 Added ERRORs for unexpected early returns. Made dictionaries be autoreleased until
1274 the end of the method where they are retained, so that the early returns don't leak;
1275 added ASSERTs that the _private->dictionary values aren't being leaked.
1276 (-[WebIconDatabase _updateFileDatabase]):
1277 Added an ERROR for an unexpected early return, and made a trivial style fix.
1279 2006-03-31 Trey Matteson <trey@usa.net>
1281 Reviewed by Maciej, landed by ap.
1283 http://bugzilla.opendarwin.org/show_bug.cgi?id=7739
1284 REGRESSION: Assertion failure loading acid2 test in -[WebCoreFrameBridge installInFrame:]
1286 Tests: http/tests/misc/acid2.html, http/tests/misc/acid2-pixel.html
1288 The gist of this change is that we must cancel the load from the Webkit side when we
1289 realize we're switching to the fallback content. This is somewhat a temp workaround
1290 since control of loading will be moving to WebCore.
1292 * WebView/WebMainResourceLoader.m:
1293 (-[WebMainResourceLoader continueAfterContentPolicy:response:]):
1295 2006-03-30 Justin Garcia <justin.garcia@apple.com>
1299 http://bugzilla.opendarwin.org/show_bug.cgi?id=6989
1300 REGRESSION: Plain-text mode needed for contenteditable area used in new text field
1302 * WebView/WebHTMLView.m:
1303 (-[WebHTMLView _canEditRichly]): Added.
1304 (-[WebHTMLView _canIncreaseSelectionListLevel]): Use _canEditRichly
1305 (-[WebHTMLView _canDecreaseSelectionListLevel]): Ditto.
1306 (-[WebHTMLView _increaseSelectionListLevel]):
1307 (-[WebHTMLView _decreaseSelectionListLevel]):
1308 (-[NSArray validateUserInterfaceItem:]):
1309 Split rich text editing actions off from ones that can be applied anywhere.
1310 (-[NSArray _applyStyleToSelection:withUndoAction:]):
1311 (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
1312 (-[NSArray _alignSelectionUsingCSSValue:withUndoAction:]):
1313 * WebView/WebHTMLViewPrivate.h:
1315 2006-03-29 Tim Omernick <timo@apple.com>
1317 Reviewed by John Sullivan.
1319 <rdar://problem/4495316> REGRESSION (420+): After page has loaded, spinning progress indicator is displayed on
1320 tab at versiontracker.com
1322 * WebView/WebFrame.m:
1323 (-[WebFrame _receivedMainResourceError:]):
1324 Call -_clientRedirectCancelledOrFinished: here so that the frame load delegate is notified that the redirect's
1325 status has changed, if there was a redirect. The frame load delegate may have saved some state about
1326 the redirect in its -webView:willPerformClientRedirectToURL:delay:fireDate:forFrame:. Since we are definitely
1327 not going to use this provisional resource, as it was cancelled, notify the frame load delegate that the redirect
1329 The fix for 4432562 was similar to this, but only took care of the case where the redirect load was actually
1330 committed to the frame. The new call to -_clientRedirectCancelledOrFinished: handles the case where the redirect
1331 load was successful, but was not committed. This happens with downloads.
1333 2006-03-29 John Sullivan <sullivan@apple.com>
1335 Reviewed by Tim Omernick.
1338 <rdar://problem/4483806> REGRESSION (417.8-TOT): PDFs don't scale correctly with auto-size (5356)
1339 <rdar://problem/3874856> Safari PDF display should be full width by default rather than
1340 sized to show the entire page
1342 * WebView/WebPDFRepresentation.m:
1343 (-[WebPDFRepresentation finishedLoadingWithDataSource:]):
1344 Let the WebPDFView handle setting the document, because that's the best time to apply
1345 the sizing-related preferences.
1347 * WebView/WebPDFView.h:
1348 eliminated firstLayoutDone ivar and -PDFSubview public method; added -setPDFDocument:
1350 * WebView/WebPDFView.m:
1351 (-[WebPDFView initWithFrame:]):
1352 eliminate use of obsolete firstLayoutDone ivar
1353 (-[WebPDFView _applyPDFDefaults]):
1354 renamed from _readPDFDefaults for clarity
1355 (-[WebPDFView layout]):
1356 removed code that applied the preferences here. This was too early to handle auto-sizing correctly,
1357 because -layout can be called before the document exists, and calling setAutoSize:YES at that
1358 point confuses PDFView into setting the scale factor to 20 (the maximum).
1359 (-[WebPDFView setPDFDocument:]):
1360 New method, does what WebPDFRepresentation used to do and also applies the preferences here.
1361 This is a good place to apply them because the document is guaranteed to now exist (of course).
1362 (-[WebPDFView PDFSubview]):
1363 Moved this into a new FileInternal category because it's still needed by another class in
1364 this file but no longer needs to be public.
1366 * WebView/WebPreferences.m:
1367 (+[WebPreferences initialize]):
1368 Change WebKitPDFScaleFactorPreferenceKey to 0, which represents auto-size. This fixes 3874856,
1369 but wasn't feasible until 4483806 was fixed.
1371 2006-03-28 Darin Adler <darin@apple.com>
1375 - added a build step that checks for init routines
1377 * WebKit.xcodeproj/project.pbxproj: Added a custom build phase that invokes the
1378 check-for-global-initializers script.
1380 2006-03-28 Tim Omernick <timo@apple.com>
1384 <rdar://problem/3694090> -[WebBaseNetscapePluginView finalize] is incorrect; design change needed
1386 * Plugins/WebBaseNetscapePluginView.m:
1387 (-[WebBaseNetscapePluginView initWithFrame:]):
1388 Don't observe preferences changes here -- we only want to observe preferences while the view is
1389 installed in the view hierarchy. Plugins will appropriately start and stop themselves when added to
1390 or removed from a window.
1391 (-[WebBaseNetscapePluginView dealloc]):
1392 Don't remove observers here -- they should have been removed when the view was removed from its
1394 (-[WebBaseNetscapePluginView finalize]):
1396 (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
1397 Stop observing preferences when the view is removed from its window.
1398 (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
1399 Start observing preferences when the view is added to a window.
1401 2006-03-27 Tim Omernick <timo@apple.com>
1405 <rdar://problem/3694090> -[WebBaseNetscapePluginView finalize] is incorrect; design change needed
1408 * Plugins/WebBaseNetscapePluginView.m:
1409 (-[WebBaseNetscapePluginView dealloc]):
1410 Instead of calling -stop, assert that the plugin is not running. A plugin view cannot be deallocated
1411 until it is removed from its window. When a plugin view is removed from its window, it calls -stop
1412 on itself. Therefore I believe that this call to -stop is unnecessary; if I'm wrong, then the
1413 assertion will help catch any edge cases.
1414 (-[WebBaseNetscapePluginView finalize]):
1417 2006-03-27 Tim Omernick <timo@apple.com>
1421 <rdar://problem/3694086> -[WebBaseNetscapePluginStream finalize] is incorrect; design change needed
1423 * Plugins/WebBaseNetscapePluginStream.m:
1424 (-[WebBaseNetscapePluginStream dealloc]):
1425 Assert that the stream file path either never existed, or was deleted and NULL-ed out. The stream file
1426 is now deleted immediately after calling NPP_StreamAsFile().
1427 (-[WebBaseNetscapePluginStream finalize]):
1429 (-[WebBaseNetscapePluginStream _destroyStream]):
1430 Delete the file after calling NPP_StreamAsFile(), instead of in -dealloc/-finalize. It should be OK
1431 to delete the file here -- NPP_StreamAsFile() is always called immediately before NPP_DestroyStream()
1432 (the stream destruction function), so there can be no expectation that a plugin will read the stream file
1433 asynchronously after NPP_StreamAsFile() is called.
1435 2006-03-27 Tim Omernick <timo@apple.com>
1439 <rdar://problem/3694093> -[WebBasePluginPackage finalize] is incorrect; design change needed
1441 Call -unload on plug-in packages instead of relying on -dealloc/-finalize to do it. Currently
1442 the only place plug-in packages are deallocated is when refreshing the set of plugins, as when
1443 handling JavaScript's navigator.plugins.refresh().
1445 * Plugins/WebBasePluginPackage.m:
1446 (-[WebBasePluginPackage dealloc]):
1447 Assert that the plug-in has been unloaded by the time -dealloc is called.
1448 (-[WebBasePluginPackage finalize]):
1451 * Plugins/WebPluginDatabase.m:
1452 (-[WebPluginDatabase refresh]):
1453 Call -unload on the plug-in packages before releasing them.
1455 2006-03-27 Tim Omernick <timo@apple.com>
1457 Reviewed by Tim Hatcher.
1459 Part of <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore,
1460 WebKit and WebBrowser
1462 * Carbon/HIViewAdapter.h:
1463 HIViewAdapter is no longer an NSView subclass, since we no longer pose it as NSView.
1464 * Carbon/HIViewAdapter.m:
1465 (+[NSView bindHIViewToNSView:nsView:]):
1466 Replace individual NSView methods instead of posing as NSView.
1467 (_webkit_NSView_setNeedsDisplay):
1468 Replacement implementation of -[NSView setNeedsDisplay:].
1469 (_webkit_NSView_setNeedsDisplayInRect):
1470 Replacement implementation of -[NSView setNeedsDisplayInRect:]
1471 (_webkit_NSView_nextValidKeyView):
1472 Replacement implementation of -[NSView nextValidKeyView]
1474 2006-03-27 John Sullivan <sullivan@apple.com>
1476 Reviewed by Darin Adler.
1478 Removed two overzealous assertions that the steps to reproduce 4451831 were running into.
1479 Improved comments to match.
1481 * WebCoreSupport/WebFrameBridge.m:
1482 (-[WebFrameBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
1483 Remove assertion that _inNextKeyViewOutsideWebFrameViews should always be false here.
1485 * WebView/WebHTMLView.m:
1486 (-[NSArray nextValidKeyView]):
1487 Removed assertion that the frame should never be the main frame here.
1489 2006-03-27 Tim Omernick <timo@apple.com>
1491 Reviewed by Tim Hatcher.
1493 Removed tabs & reformatted code.
1495 * Carbon/HIViewAdapter.m:
1496 (+[NSView bindHIViewToNSView:nsView:]):
1497 (+[NSView getHIViewForNSView:]):
1498 (+[NSView unbindNSView:]):
1499 (-[NSView setNeedsDisplay:]):
1500 (-[NSView setNeedsDisplayInRect:]):
1501 (-[NSView nextValidKeyView]):
1502 (SetViewNeedsDisplay):
1504 2006-03-26 Justin Garcia <justin.garcia@apple.com>
1508 <http://bugzilla.opendarwin.org/show_bug.cgi?id=7974>
1509 Add EditActions and WebUndoActions for CreateLink and Unlink
1511 * English.lproj/Localizable.strings:
1512 * WebCoreSupport/WebFrameBridge.m:
1513 (-[WebFrameBridge nameForUndoAction:]):
1515 2006-03-23 Tim Omernick <timo@apple.com>
1517 Reviewed by John Sullivan.
1519 At John's suggestion, renamed a private WebFrame method and tightened up some of the redirect logic I recently touched.
1521 * WebView/WebFramePrivate.h:
1522 Renamed -_clientRedirectCancelled: to -_clientRedirectCancelledOrFinished:, since we call this both when a redirect is
1523 cancelled and when a redirect is successfully committed.
1524 * WebCoreSupport/WebFrameBridge.m:
1525 (-[WebFrameBridge reportClientRedirectCancelled:]):
1526 Call renamed WebFrame method.
1527 * WebView/WebFrame.m:
1528 Added sentRedirectNotification flag to WebFramePrivate. This flag is set when we notify the frame load delegate that a
1529 redirect will occur. We check this flag when committing a provisional load to ensure that the frame load delegate is
1530 notified that the redirect finished.
1531 (-[WebFrame _commitProvisionalLoad:]):
1532 After committing a provisional load, make sure that the frame load delegate is notified that there is no longer a pending
1534 (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
1535 Set the new sentRedirectNotification flag.
1536 (-[WebFrame _clientRedirectCancelledOrFinished:]):
1538 Clear the sentRedirectNotification flag.
1539 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
1540 Call renamed method.
1542 2006-03-23 Tim Omernick <timo@apple.com>
1544 Reviewed by John Sullivan.
1546 <rdar://problem/4439752> TinyMCE: "Search in Google" context menu is active but fails to work when selection is active
1549 * DefaultDelegates/WebDefaultContextMenuDelegate.m:
1550 (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
1551 Added a representedObject parameter, which is set on the newly created menu item.
1552 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
1553 Instead of setting the representedObject on each menu item after creating them all, pass the element to
1554 -menuItemWithTag:target:representedObject:.
1555 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
1556 ditto. This fixes 4439752 because this method failed to set the representedObject on the menu items as
1557 -contextMenuItemsForElement:defaultMenuItems: did.
1559 2006-03-23 Darin Adler <darin@apple.com>
1563 - fix <rdar://problem/4380465> repro crash when unsuccessfully attempting to import image from Services menu
1565 * WebView/WebDataSource.m:
1566 (-[WebDataSource _imageElementWithImageResource:]): Quietly do nothing if passed nil.
1567 (-[WebDataSource _documentFragmentWithImageResource:]): Ditto.
1569 2006-03-22 Tim Omernick <timo@apple.com>
1571 Reviewed by Kevin Decker.
1573 Even better fix for <rdar://problem/4432562>. We need to notify the frame delegate of a finished redirect for both
1574 "fast" and "slow" redirects, after committing the load. My previous change only notified for "fast", history-locking
1575 redirects. Now we notify the frame delegate after committing any kind of provisional load, not just in the case of
1578 * WebView/WebFrame.m:
1579 (-[WebFrame _transitionToCommitted:]):
1580 (-[WebFrame _commitProvisionalLoad:]):
1582 2006-03-22 Tim Omernick <timo@apple.com>
1584 Reviewed by Kevin Decker.
1586 Better fix for <rdar://problem/4432562> REGRESSION (TOT): Safari's "stop loading" active, "view source" inactive after page load [7058]
1588 * WebView/WebFrame.m:
1589 (-[WebFrame _transitionToCommitted:]):
1590 Cancel the client redirect when we commit the provisional load, if we were waiting for a redirect.
1591 This is a better fix for 7058 (<rdar://problem/4432562>). The original fix for 7058 changed the timing of the redirect cancel
1592 in such a way that WebKit was precluded from ever reusing back/forward list entries for redirects. Clearing the redirect state
1593 here actually makes logical sense, as the redirect's target page is being committed at this point.
1595 2006-03-21 Darin Adler <darin@apple.com>
1597 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3784
1598 <rdar://problem/4483827> JavaScript save dialog disappears right away (sheet triggers blur event) (3784)
1600 * WebView/WebHTMLView.m:
1601 (-[WebHTMLView _updateFocusState]): Treat window as having focus if its sheet is key.
1602 (-[WebHTMLView addWindowObservers]): Observe all focus notifications, not just the ones involving this window.
1603 (-[WebHTMLView removeWindowObservers]): Ditto.
1604 (-[WebHTMLView windowDidBecomeKey:]): Add checks so that we call the methods only when appropriate,
1605 since this will now be called for all windows.
1606 (-[WebHTMLView windowDidResignKey:]): Ditto.
1608 2006-03-21 Adele Peterson <adele@apple.com>
1612 - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6813
1613 elementAtPoint needs to return input element when clicking on new text field
1615 * WebView/WebDocumentInternal.h: Added elementAtPoint:allowShadowContent:
1616 * WebView/WebHTMLView.m:
1617 (-[NSArray elementAtPoint:]): Does not allow shadow content. This way, by default, callers would get the input element instead of the inner div.
1618 (-[NSArray elementAtPoint:allowShadowContent:]): Allows callers to specify whether or not the element can be a shadow node.
1619 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): Allows shadow content when getting element.
1620 (-[WebHTMLView _mayStartDragAtEventLocation:]): ditto.
1621 (-[NSArray _isSelectionEvent:]): ditto.
1622 (-[NSArray _canProcessDragWithDraggingInfo:]): ditto.
1623 * WebView/WebFrame.m: (-[WebFrame _actionInformationForNavigationType:event:originalURL:]): Does not allow shadow content when getting element.
1624 * WebView/WebImageView.m: (-[WebImageView elementAtPoint:allowShadowContent:]): Added to conform to the WebDocumentElement protocol.
1625 * WebView/WebPDFView.m: (-[WebPDFView elementAtPoint:allowShadowContent:]): ditto.
1626 * WebView/WebTextView.m: (-[WebTextView elementAtPoint:allowShadowContent:]): ditto.
1628 2006-03-21 Tim Omernick <timo@apple.com>
1630 Reviewed by Tim Hatcher and Darin.
1632 <rdar://problem/4427068> LMGetCurApRefNum, CloseConnection and GetDiskFragment deprecated, used in Netscape
1635 * Plugins/WebNetscapeDeprecatedFunctions.h: Added.
1636 * Plugins/WebNetscapeDeprecatedFunctions.c: Added.
1637 Added wrappers for deprecated CFM and LowMem functions. These exist in a separate file so that we can set
1638 -Wno-deprecated-declarations on this one file without ignoring other deprecated function usage elsewhere.
1639 (WebGetDiskFragment):
1640 (WebCloseConnection):
1641 (WebLMGetCurApRefNum):
1642 (WebLMSetCurApRefNum):
1644 * Plugins/WebNetscapePluginPackage.h:
1645 Don't include connID ivar in 64-bit, since CFM is not supported in 64-bit.
1646 * Plugins/WebNetscapePluginPackage.m:
1647 (+[WebNetscapePluginPackage initialize]):
1648 Don't bother setting the resource refNum in 64-bit, because the API to get and set it does not exist.
1649 A theoretical 64-bit plugin couldn't possibly rely this, since there is no API.
1650 (-[WebNetscapePluginPackage unloadWithoutShutdown]):
1651 No need to close the connID in 64-bit.
1652 (-[WebNetscapePluginPackage load]):
1653 Don't load CFM bundles in 64-bit, because CFM is not supported.
1655 * WebKit.xcodeproj/project.pbxproj:
1656 Added WebNetscapeDeprecatedFunctions.[hm].
1658 2006-03-21 John Sullivan <sullivan@apple.com>
1660 Reviewed by Kevin Decker.
1662 - fixed <rdar://problem/4485637> Implementors of searchFor:direction:caseSensitive:wrap: should bail
1663 out early if search string is empty
1665 This doesn't change any existing behavior, but avoids unnecessary work.
1667 * Misc/WebSearchableTextView.m:
1668 (-[WebSearchableTextView searchFor:direction:caseSensitive:wrap:]):
1669 bail out immediately (returning NO) if search string is empty
1671 * WebView/WebHTMLView.m:
1672 (-[WebView searchFor:direction:caseSensitive:wrap:]):
1675 * WebView/WebPDFView.m:
1676 (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
1679 * WebView/WebView.m:
1680 (-[WebView searchFor:direction:caseSensitive:wrap:]):
1683 2006-03-20 Tim Omernick <timo@apple.com>
1685 Reviewed by John Sullivan.
1687 Moved -_contentView from WebFrameViewInternal to WebFrameViewPrivate. Safari
1690 * WebView/WebFrameView.m:
1691 (-[WebFrameView _contentView]):
1692 * WebView/WebFrameViewInternal.h:
1693 * WebView/WebFrameViewPrivate.h:
1695 2006-03-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
1697 Reviewed by Darin, landed by Beth.
1699 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7693
1700 WebKit relies on unpredictable timing for onload events
1702 * WebView/WebDataSource.m:
1703 (-[WebDataSource _receivedMainResourceError:complete:]): Check for
1704 completion on the WebCore side before checking on the WebKit side,
1705 to ensure that the onload event is emitted before the WebFrame load
1706 delegate is sent the webView:didFinishLoadForFrame: message. For
1707 DumpRenderTree, this ensures that the render tree is dumped after
1708 the onload handler is run.
1709 * WebView/WebLoader.m:
1710 (-[NSURLProtocol didFailWithError:]): If load has already been
1711 cancelled (which could happen if the parent's onload handler caused
1712 the frame to detach), do nothing.
1714 2006-03-17 John Sullivan <sullivan@apple.com>
1716 Reviewed by Beth Dakin
1718 - fixed <rdar://problem/4239051> Sometimes "Copy Link" in Safari results in a
1719 URL on the pasteboard with no usable "title"
1721 * History/WebURLsWithTitles.m:
1722 (+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]):
1723 trim whitespace from titles that are put on pasteboard. This leaves an empty string
1724 for the title in cases where there's no displayed text, like an image in an <a> element
1725 that happens to have whitespace in the source, e.g. <a href="foo"> <img whatever></a>
1727 2006-03-17 Darin Adler <darin@apple.com>
1729 - missing bit of my check-in yesterday
1731 Maciej moved setWindowFrame for me, but I also had removed
1732 setWindowContentRect.
1734 * WebCoreSupport/WebFrameBridge.m: Removed unused setWindowContextRect and
1735 windowContentRect methods.
1737 2006-03-17 Adele Peterson <adele@apple.com>
1741 WebKit part of fix for:
1742 http://bugzilla.opendarwin.org/show_bug.cgi?id=7797
1743 Can't set background color on new text fields
1745 Added function to draw bezeled text field without drawing background.
1747 * WebCoreSupport/WebGraphicsBridge.m:
1748 (-[WebGraphicsBridge drawBezeledTextFieldCell:enabled:]): Added.
1750 2006-03-16 Maciej Stachowiak <mjs@apple.com>
1754 - move setWindowFrame / windowFrame to WebPageBridge to fix build
1756 * WebCoreSupport/WebFrameBridge.m:
1757 * WebCoreSupport/WebPageBridge.m:
1758 (-[WebPageBridge setWindowFrame:]):
1759 (-[WebPageBridge windowFrame]):
1761 2006-03-15 Darin Adler <darin@apple.com>
1763 Fix by Patrick Beard, reviewed by me.
1765 - fix <rdar://problem/4478181> WebPluginController leaks NSArray and NSMutableSet objects
1767 * Plugins/WebPluginController.m:
1768 (-[WebPluginController initWithDocumentView:]): Call CFMakeCollectable on the CFSet
1769 so we can act like it's an NSSet.
1770 (-[WebPluginController dealloc]): Release _views and _checksInProgress.
1772 2006-03-13 Tim Omernick <timo@apple.com>
1776 <rdar://problem/4476873> Support printing for plugin documents (not embedded plugins)
1778 * WebView/WebFrameViewPrivate.h:
1779 * WebView/WebFrameView.m:
1780 (-[WebFrameView documentViewShouldHandlePrint]):
1781 Called by the host application before it initializes and runs a print operation. If NO
1782 is returned, the host application will abort its print operation and call
1783 -printDocumentView on the WebFrameView. The document view is then expected to run its
1784 own print operation. If YES is returned, the host application's print operation will
1786 (-[WebFrameView printDocumentView]):
1787 Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint.
1789 * Plugins/WebNetscapePluginDocumentView.m:
1790 (-[WebNetscapePluginDocumentView documentViewShouldHandlePrint]):
1791 Allow the plugin to take over printing if it defines an NPP_Print function
1792 (-[WebNetscapePluginDocumentView printDocumentView]):
1793 Print the plugin document.
1795 2006-03-13 Geoffrey Garen <ggaren@apple.com>
1799 - Fixed the load progress indicator to give more incremental feedback,
1800 and to stop spending so much time near 100%.
1803 (1) Fixed some bugs and a misspelling in the previous heuristic's
1805 (2) Added two new rules to the heuristic:
1806 (a) Treat the first layout as the half-way point.
1807 (b) Just like we jump the first 10% to indicate that a load has
1808 started, jump the last 10% to indicate that a load has finished.
1810 Rule 2a is good for two reasons. First, it seems unnatural for loading
1811 to be "more than half done" when you can't even see anything. Second,
1812 in the early stages of laading our estimate of how much we'll need to
1813 load is often off by as much as 6000% (e.g., cnn.com). So anything that
1814 makes the progress indicator more conservative in the early stages of
1817 Rule 2b is good because it's confusing for loading to be "100% done"
1820 FIXME: The indicator still isn't perfect. For example, the old behavior
1821 shows up @ moviefone.com. Two areas for future work:
1822 (1) Estimate number of linked resources. Our code estimates the size
1823 of a single resource, but does nothing to estimate the number of
1824 resources that resource might link to. This is the key to why we're
1825 so wrong at the beginning.
1826 (2) Improve "when to do first layout" heuristic. A JavaScript query
1827 for a style property forces layout, creating a phantom first layout
1828 with no content, essentially nullifying 2a for certain pages.
1830 Filed <rdar://problem/4475834> to track estimating the number of
1831 linked resources. Phantom layouts are already on Hyatt's radar.
1833 * WebView/WebFrame.m:
1834 (-[WebFrame _setState:]): Update firstLayoutDone
1835 (-[WebFrame _numPendingOrLoadingRequests:]): Bug fix: In the recurisve
1836 case, query 'frame' instead of 'self', so that we actually recurse.
1837 (-[WebFrame _firstLayoutDone]): New method
1838 (-[WebFrame _didFirstLayout]): Update firstLayoutDone
1839 * WebView/WebFramePrivate.h: Added firstLayoutDone ivar
1840 * WebView/WebView.m:
1841 (-[WebView _incrementProgressForConnectionDelegate:data:]):
1842 (1) Implemented 2a and 2b
1843 (2) Bug fix: only update the 'last time I sent a notification' time if
1844 we actually send a notification.
1845 (3) Don't test for progress < 0 because ensuring progress < max
1846 also ensures max - progress > 0. (Do still test for progress > max
1847 because rounding errors make that a possibility -- although a very
1849 (4) Query only the loading frame and its subframes for pending
1850 requests instead of defaulting to the main frame. This is a slight
1851 optimization in cases where the main frame did not begin the load,
1852 and it makes the code more consistent.
1854 2006-03-13 John Sullivan <sullivan@apple.com>
1856 Reviewed by Tim Omernick.
1858 - fixed <rdar://problem/4475857> API: Setting a history item limit programmatically doesn't work
1860 * History/WebHistory.m:
1861 (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
1862 use [self historyItemLimit], which prefers the explicitly-set value and falls back to the
1863 NSUserDefaults value, instead of using the NSUserDefaults value explicitly.
1865 2006-03-10 Darin Adler <darin@apple.com>
1869 * WebCoreSupport/WebFrameBridge.m: Remove unused requestedURLString method.
1871 2006-03-10 Darin Adler <darin@apple.com>
1875 - change how frame namespacing works to be more completely on the WebCore side
1877 * WebView/WebFrameInternal.h: Remove _setFrameNamespace: and _frameNamespace.
1878 * WebView/WebFrame.m: Ditto.
1880 * WebView/WebView.m:
1881 (-[WebView setGroupName:]): Call -[WebCorePageBridge setGroupName:].
1882 (-[WebView groupName]): Call -[WebCorePageBridge groupName].
1884 2006-03-09 Alexey Proskuryakov <ap@nypop.com>
1888 - http://bugzilla.opendarwin.org/show_bug.cgi?id=7656
1889 Query string always appended to Flash URLs, instead of being replaced.
1891 * Misc/WebNSURLExtras.h: Added _webkit_URLByRemovingResourceSpecifier.
1892 * Misc/WebNSURLExtras.m:
1893 (+[NSURL _web_URLWithData:relativeToURL:]): Call _webkit_URLByRemovingResourceSpecifier to
1894 work around CFURL not removing non-path components from base URLs in some cases.
1895 (-[NSURL _webkit_URLByRemovingComponent:]): New generic function for removing URL components.
1896 (-[NSURL _webkit_URLByRemovingFragment]): Moved implementation to the above method.
1897 (-[NSURL _webkit_URLByRemovingResourceSpecifier]): Added.
1899 2006-03-07 Darin Adler <darin@apple.com>
1903 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7655
1904 unwanted output while running layout tests
1906 * WebView/WebDataSourcePrivate.h:
1907 * WebView/WebDataSource.m:
1908 (-[WebDataSource _setRepresentation:]): Clear the flag that records whether we've sent
1909 all the data to the representation or not; need this to prevent telling the same representation
1910 both that we've succeeded and then later that we've failed.
1911 (-[WebDataSource _setMainDocumentError:]): Don't send an error if representationFinishedLoading
1912 is already YES. Set representationFinishedLoading.
1913 (-[WebDataSource _finishedLoading]): Set representationFinishedLoading.
1914 (-[WebDataSource _setupForReplaceByMIMEType:]): Ditto.
1916 2006-03-06 Tim Omernick <timo@apple.com>
1918 Reviewed by Kevin Decker.
1920 <rdar://problem/4457574> assertion failure watching trailers at netflix.com -[WebNetscapePluginRepresentation
1921 receivedData:withDataSource:] + 684
1923 * Plugins/WebNetscapePluginRepresentation.m:
1924 (-[WebNetscapePluginRepresentation receivedData:withDataSource:]):
1925 Moved the ASSERT(instance) to the block that actually requires an assertion -- the plugin view should never
1926 have a NULL instance by the time we start the NPStream (by calling -startStreamWithResponse:).
1927 Some stream teardown logic changed with my fix to 4153419: when a WebBaseNetscapePluginStream is destroyed,
1928 it now clears its NPP instance backpointer. The WebBaseNetscapePluginStream may be destroyed from within
1929 -startStreamWithResponse: if NPP_NewStream() returns an error. We can handle this gracefully by changing
1930 the assertion before -receivedData: to a simple NULL check.
1931 This is unrelated to the Radar, but prior to this fix, we would attempt an NPP_Write() with the initial
1932 stream data even if NPP_NewStream() returned an error. Seems like that alone could cause issues, though
1933 I'm guessing that plugins handle this in practice.
1935 2006-03-03 Timothy Hatcher <timothy@apple.com>
1939 <rdar://problem/4411822> wrong element shown in Inspector inspecting main image at apple.com
1940 <rdar://problem/4411908> in the Web Inspector, state of disclosure triangles should be preserved after search
1941 http://bugzilla.opendarwin.org/show_bug.cgi?id=6616
1942 Bug 6616: Double-clicking on a search result seems broken
1943 http://bugzilla.opendarwin.org/show_bug.cgi?id=6709
1944 Bug 6709: TypeError: Value undefined (result of expression treeScrollbar.refresh) is not object.
1946 Code clean up and move more code into JavaScript.
1947 Removes a few unused ObjC methods.
1948 Many search fixes. Reveals the focused node when exiting the search.
1949 Shows a "No Selection" screen when there are no search results.
1950 Shows a node count for the number of results.
1951 Fixes a couple of TypeErrors that show on the console.
1952 Uses the system selection color in the Style pane tables.
1954 * English.lproj/Localizable.strings: removed localized strings
1955 * WebInspector.subproj/WebInspector.m:
1956 (-[WebInspector init]):
1957 (-[WebInspector dealloc]):
1958 (-[WebInspector window]):
1959 (-[WebInspector setSearchQuery:]):
1960 (-[WebInspector resizeTopArea]):
1961 (-[WebInspector searchPerformed:]): called from JavaScript when a search happens
1962 (-[WebInspector _toggleIgnoreWhitespace:]):
1963 (-[WebInspector _exitSearch:]): exit search results on double click
1964 (-[WebInspector _focusRootNode:]):
1965 (-[WebInspector _revealAndSelectNodeInTree:]):
1966 (-[WebInspector _refreshSearch]):
1967 (-[WebInspector _update]):
1968 (-[WebInspector _updateTraversalButtons]):
1969 (-[WebInspector _updateRoot]):
1970 (-[WebInspector _updateTreeScrollbar]):
1971 (-[WebInspector _updateSystemColors]): update CSS with system colors
1972 (-[WebInspector webView:didFinishLoadForFrame:]):
1973 (-[WebInspector webView:plugInViewWithArguments:]):
1974 (-[WebInspector outlineViewSelectionDidChange:]): test for webViewLoaded
1975 (-[WebInspectorPrivate init]): alloc rightArrowImage and downArrowImage
1976 (-[WebInspectorPrivate dealloc]): no more matchedRules
1977 (-[DOMNode _displayName]): removed localization UI_STRING calls.
1978 * WebInspector.subproj/WebInspectorInternal.h:
1979 * WebInspector.subproj/webInspector/inspector.css:
1980 * WebInspector.subproj/webInspector/inspector.html:
1981 * WebInspector.subproj/webInspector/inspector.js:
1983 2006-03-02 Alexey Proskuryakov <ap@nypop.com>
1985 Fixed a typo in the comments added in the previous checkin.
1987 * WebCoreSupport/WebFrameBridge.m:
1988 (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
1989 * WebCoreSupport/WebSubresourceLoader.m:
1990 (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
1991 (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
1993 2006-03-02 Alexey Proskuryakov <ap@nypop.com>
1997 - http://bugzilla.opendarwin.org/show_bug.cgi?id=7540
1998 REGRESSION: frequent cache-related crashes
2000 - http://bugzilla.opendarwin.org/show_bug.cgi?id=7393
2001 A stale comment about XMLHttpRequest responses being never cached
2003 * WebCoreSupport/WebFrameBridge.m: Don't call setHTTPHeader if the method is GET.
2004 (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2005 * WebCoreSupport/WebSubresourceLoader.m: Ditto. Also removed a stale comment about
2007 (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
2008 (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
2010 2006-02-23 David Harrison <harrison@apple.com>
2014 <rdar://problem/4359736> Support outlining ability with lists
2016 Added Mail SPI for list level changes. It is SPI because it is not complete support
2017 for outlining. See <rdar://problem/4457070> "API for html lists as note outlines".
2019 * WebView/WebHTMLView.m:
2020 (-[WebHTMLView _canIncreaseSelectionListLevel]):
2021 (-[WebHTMLView _canDecreaseSelectionListLevel]):
2022 (-[WebHTMLView _increaseSelectionListLevel]):
2023 (-[WebHTMLView _decreaseSelectionListLevel]):
2024 * WebView/WebHTMLViewPrivate.h:
2026 2006-03-01 Alexey Proskuryakov <ap@nypop.com>
2030 - http://bugzilla.opendarwin.org/show_bug.cgi?id=3812
2031 XMLHttpRequest: PUT, DELETE, HEAD and all other methods but POST actually do a GET.
2033 All WebKit changes are to use the method parameter passed from WebCore.
2035 * WebCoreSupport/WebFrameBridge.m:
2036 (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
2037 (-[WebFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
2038 (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2039 * WebCoreSupport/WebSubresourceLoader.h:
2040 * WebCoreSupport/WebSubresourceLoader.m:
2041 (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
2042 (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
2044 2006-03-01 Timothy Hatcher <timothy@apple.com>
2048 http://bugzilla.opendarwin.org/show_bug.cgi?id=7450
2049 elementAtPoint is expensive and should return a smart dictionary
2051 <rdar://problem/2952761> moving the mouse around eats more CPU than I would expect (7450)
2053 elementAtPoint for WebHTMLView now returns a WebElementDictionary,
2054 when objectForKey is called it will lookup in the DOM, cache and return the value
2056 * Misc/WebElementDictionary.h: Added.
2057 * Misc/WebElementDictionary.m: Added.
2060 (+[WebElementDictionary initializeLookupTable]):
2061 (-[WebElementDictionary initWithInnerNonSharedNode:innerNode:URLElement:andPoint:]):
2062 (-[WebElementDictionary dealloc]):
2063 (-[WebElementDictionary _fillCache]):
2064 (-[WebElementDictionary count]):
2065 (-[WebElementDictionary keyEnumerator]):
2066 (-[WebElementDictionary objectForKey:]):
2067 (-[WebElementDictionary _domNode]):
2068 (-[WebElementDictionary _webFrame]):
2069 (-[WebElementDictionary _targetWebFrame]):
2070 (-[WebElementDictionary _title]):
2071 (-[WebElementDictionary _imageRect]):
2072 (-[WebElementDictionary _isSelected]):
2073 * Misc/WebNSViewExtras.m:
2074 (-[NSView _web_dragImage:element:rect:event:pasteboard:source:offset:]):
2075 * WebKit.xcodeproj/project.pbxproj:
2076 * WebView/WebHTMLView.m:
2077 (-[WebHTMLView _updateMouseoverWithEvent:]):
2078 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
2079 (-[NSArray elementAtPoint:]):
2080 * WebView/WebView.m:
2081 * WebView/WebViewPrivate.h:
2083 2006-02-28 Darin Adler <darin@apple.com>
2087 - remove obsolete WebCoreScrollView class
2089 * WebView/WebDynamicScrollBarsView.h: Change base class to NSScrollView instead of WebCoreScrollView.
2090 * WebView/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView autoforwardsScrollWheelEvents]): Added.
2092 2006-02-28 John Sullivan <sullivan@apple.com>
2094 Reviewed by Eric Seidel
2096 Wean WebKit from one more SPI call. We learned about this new-to-Tiger
2097 API from filing Radar 4433222.
2099 * WebView/WebHTMLView.m:
2100 (-[WebHTMLView _autoscroll]):
2101 use public CGEventSourceButtonState() instead of WKMouseIsDown() (which was using SPI internally)
2103 2006-02-27 Tim Omernick <timo@apple.com>
2107 <rdar://problem/4222043> Safari should reduce null events sent to invisible plugins
2109 * Plugins/WebBaseNetscapePluginView.h:
2110 * Plugins/WebBaseNetscapePluginView.m:
2111 (-[WebBaseNetscapePluginView restartNullEvents]):
2112 Check to see if the plugin view is completely obscured (scrolled out of view, for example). If it is
2113 obscured and it wasn't before, or the other way around, then restart the null event timer so it can
2114 fire at the appropriate rate.
2115 (-[WebBaseNetscapePluginView viewHasMoved:]):
2116 If a plugin is obscured, send it null events as if it were in an inactive window.
2118 2006-02-26 Mitz Pettel <opendarwin.org@mitzpettel.com>
2120 Test: fast/frames/empty-frame-document.html
2124 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7293
2125 REGRESSION: Using Javascript Bookmarklets that reference location.href on a blank tab crashes WebKit
2127 The crash happened because an empty frame did not have a document.
2129 * WebView/WebFrame.m:
2130 (-[WebFrame _commitProvisionalLoad:]): Use "about:blank" instead of an empty URL for empty
2131 frames. This causes a document to be created for the frame.
2133 2006-02-21 Kevin Decker <kdecker@apple.com>
2137 Backed out my previous check in. Since these methods are internal to WebKit (and not private)
2138 it's perfectly OK for them to remain as categories.
2140 * WebView/WebPreferences.m:
2141 (-[WebPreferences _integerValueForKey:]):
2142 (-[WebPreferences _setIntegerValue:forKey:]):
2143 (-[WebPreferences _floatValueForKey:]):
2144 (-[WebPreferences _setFloatValue:forKey:]):
2145 (-[WebPreferences _boolValueForKey:]):
2146 (-[WebPreferences _setBoolValue:forKey:]):
2147 * WebView/WebPreferencesPrivate.h:
2149 2006-02-20 Darin Adler <darin@apple.com>
2151 Collaborated with Graham Dennis <Graham.Dennis@gmail.com> on this.
2153 - WebKit part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6831
2154 contentEditable outline darkens as caret moves
2156 * WebCoreSupport/WebGraphicsBridge.m:
2157 (-[WebGraphicsBridge drawFocusRingWithPath:radius:color:]):
2158 Replaced the old bridge function that set up style with this one that renders a path.
2160 2006-02-19 Darin Adler <darin@apple.com>
2164 - cut out a little unneeded bridge code
2166 * WebCoreSupport/WebFrameBridge.m:
2167 (-[WebFrameBridge webView]): Added. Helper, since the WebCore side of the bridge no longer
2169 (-[WebFrameBridge createWindowWithURL:]): Removed the frameName parameter -- this is now
2170 handled on the WebCore side. Also return a page bridge instead of a frame bridge.
2171 (-[WebFrameBridge createModalDialogWithURL:]): Changed to return a page bridge instead of
2174 * WebView/WebFrame.m: (-[WebFrame webView]): Change to get the webView from the page bridge
2175 instead of the frame bridge, since it's a per-page thing.
2177 * WebView/WebView.m: Removed init method since it just does what the default does (calls
2178 initWithFrame: with a zero rect).
2179 (-[WebView initWithCoder:]): Added checking so that if the obejcts have the wrong type
2180 we will fail gracefully instead of hitting "method not found" and the like.
2181 (-[WebView setPreferencesIdentifier:]): Fix storage leak. The WebPreferences object was
2183 (-[WebView mainFrame]): Removed excess "return nil".
2184 (-[WebView _pageBridge]): Added. Helper to let you go from the WebView to the bridge
2185 from outside the WebView class.
2186 * WebView/WebViewInternal.h: Put _pageBridge into an internal header.
2188 * WebCoreSupport/WebPageBridge.m: (-[WebPageBridge outerView]): Added. Replaces "webView"
2189 as public method to tell the WebCore side about the view everything's embedded in.
2193 * WebCoreSupport/WebPageBridge.h: Removed some unneeded declarations.
2195 * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView loadPluginRequest:]):
2196 Rearrange code so it doesn't have to get the main frame twice.
2198 2006-02-18 Maciej Stachowiak <mjs@apple.com>
2202 - fix build broken by my last checkin, the remaining code was not doing anything.
2204 * WebView/WebDataSource.m:
2205 * WebView/WebDataSourcePrivate.h:
2206 * WebView/WebFrame.m:
2207 (-[WebFrame _createPageCacheForItem:]):
2209 2006-02-16 Maciej Stachowiak <mjs@apple.com>
2213 - removed a few unused fields and methods of WebDataSource
2215 * WebView/WebDataSource.m:
2216 * WebView/WebDataSourcePrivate.h:
2217 * WebView/WebView.m:
2218 (+[WebView _MIMETypeForFile:]):
2219 (-[WebView _updateWebCoreSettingsFromPreferences:]):
2221 2006-02-15 Justin Garcia <justin.garcia@apple.com>
2225 <http://bugzilla.opendarwin.org/show_bug.cgi?id=7148>
2226 Add drag and drop support to DumpRenderTree
2228 Added a UI delegate method so that DumpRenderTree can perform dragging on its own.
2229 Made _updateFocusState SPI, to allow us to test the behavior and appearance of
2230 windows that have or don't have focus.
2232 * WebView/WebHTMLView.m:
2233 (-[WebHTMLView _updateFocusState]):
2234 (-[NSArray viewDidMoveToWindow]):
2235 (-[NSArray windowDidBecomeKey:]):
2236 (-[NSArray windowDidResignKey:]):
2237 (-[NSArray dragImage:at:offset:event:pasteboard:source:slideBack:]):
2238 (-[NSArray becomeFirstResponder]):
2239 (-[NSArray resignFirstResponder]):
2240 (-[WebHTMLView _formControlIsResigningFirstResponder:]):
2241 * WebView/WebHTMLViewInternal.h:
2242 * WebView/WebHTMLViewPrivate.h:
2243 * WebView/WebUIDelegatePrivate.h:
2244 * WebView/WebView.m:
2246 2006-02-15 Darin Adler <darin@apple.com>
2248 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
2250 2006-02-15 Maciej Stachowiak <mjs@apple.com>
2252 Rubber stamped by Anders.
2254 * WebView/WebControllerPolicyHandlerDelegate.h: Removed.
2256 2006-02-15 Maciej Stachowiak <mjs@apple.com>
2260 - remove some voodoo code
2262 * WebView/WebDataSource.m:
2263 (-[WebDataSource _setLoading:]): Removed useless ref/deref of self and WebView.
2264 A WebDataSource cannot be loading unless it is still connected to the WebView that
2265 owns it and retained by it, because getting disconnected stops loading.
2267 2006-02-13 Maciej Stachowiak <mjs@apple.com>
2271 Improvements to frame loading:
2273 - remove LayoutAcceptable state entirely
2274 - fix WebImageView to work right without LayoutAcceptable state
2275 - move guts of commitIfReady: to WebFrame
2276 - try to separate page cache loading from normal loading a bit more
2278 * English.lproj/StringsNotToBeLocalized.txt:
2279 * WebView/WebDataSource.m:
2280 (-[WebDataSource _prepareForLoadStart]):
2281 (-[WebDataSource _loadFromPageCache:]):
2282 (-[WebDataSource _startLoading]):
2283 (-[WebDataSource _commitIfReady]):
2284 (-[WebDataSource _setupForReplaceByMIMEType:]):
2285 * WebView/WebDataSourcePrivate.h:
2286 * WebView/WebFrame.m:
2287 (-[WebFrame _transitionToCommitted:]):
2288 (-[WebFrame _commitProvisionalLoad:]):
2289 (-[WebFrame _checkLoadCompleteForThisFrame]):
2290 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
2291 * WebView/WebFramePrivate.h:
2292 * WebView/WebImageRepresentation.h:
2293 * WebView/WebImageRepresentation.m:
2294 * WebView/WebImageView.m:
2295 (-[WebImageView dataSourceUpdated:]):
2296 (-[WebImageView setNeedsLayout:]):
2297 (-[WebImageView writeImageToPasteboard:types:]):
2298 (-[WebImageView copy:]):
2299 (-[WebImageView mouseDragged:]):
2300 * WebView/WebView.m:
2301 (-[WebView _finishedLoadingResourceFromDataSource:]):
2302 (-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]):
2304 2006-02-13 John Sullivan <sullivan@apple.com>
2306 Reviewed by Tim Omernick.
2308 Support for highlighting multiple text matches.
2310 * WebView/WebHTMLViewPrivate.h:
2311 * WebView/WebHTMLView.m:
2312 (-[WebHTMLView highlightAllMatchesForString:caseSensitive:]):
2313 new method, calls through to bridge
2314 (-[WebHTMLView clearHighlightedMatches]):
2317 * WebView/WebViewPrivate.h:
2318 * WebView/WebView.m:
2319 (-[WebView highlightAllMatchesForString:caseSensitive:]):
2320 new method, calls through to documentView. For now this is hardwired to only work
2322 (-[WebView clearHighlightedMatches]):
2325 2006-02-13 Darin Adler <darin@apple.com>
2329 - move pointer from frame to page over to WebCore
2331 * WebCoreSupport/WebPageBridge.m: (-[WebPageBridge initWithMainFrameName:webView:frameView:]):
2332 Call super init to create the page before creating the main frame and calling setMainFrame: with it.
2334 * WebCoreSupport/WebFrameBridge.h: Remove page pointer, and change init function parameters.
2335 * WebCoreSupport/WebFrameBridge.m:
2336 (-[WebFrameBridge initMainFrameWithPage:frameName:view:]): New function that is used only for
2337 the main frame. Passes the page over to the other side of the bridge.
2338 (-[WebFrameBridge initSubframeWithRenderer:frameName:view:]): New function that is used only for
2339 subframes. Passes the renderer over to the other side of the bridge.
2340 (-[WebFrameBridge mainFrame]):
2341 (-[WebFrameBridge webView]):
2342 (-[WebFrameBridge createWindowWithURL:frameName:]):
2343 (-[WebFrameBridge showWindow]):
2344 (-[WebFrameBridge areToolbarsVisible]):
2345 (-[WebFrameBridge setToolbarsVisible:]):
2346 (-[WebFrameBridge isStatusbarVisible]):
2347 (-[WebFrameBridge setStatusbarVisible:]):
2348 (-[WebFrameBridge setWindowFrame:]):
2349 (-[WebFrameBridge windowFrame]):
2350 (-[WebFrameBridge setWindowContentRect:]):
2351 (-[WebFrameBridge windowContentRect]):
2352 (-[WebFrameBridge setWindowIsResizable:]):
2353 (-[WebFrameBridge windowIsResizable]):
2354 (-[WebFrameBridge firstResponder]):
2355 (-[WebFrameBridge makeFirstResponder:]):
2356 (-[WebFrameBridge closeWindowSoon]):
2357 (-[WebFrameBridge runJavaScriptAlertPanelWithMessage:]):
2358 (-[WebFrameBridge runJavaScriptConfirmPanelWithMessage:]):
2359 (-[WebFrameBridge canRunBeforeUnloadConfirmPanel]):
2360 (-[WebFrameBridge runBeforeUnloadConfirmPanelWithMessage:]):
2361 (-[WebFrameBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
2362 (-[WebFrameBridge addMessageToConsole:]):
2363 (-[WebFrameBridge runOpenPanelForFileButtonWithResultListener:]):
2364 (-[WebFrameBridge setStatusText:]):
2365 (-[WebFrameBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2366 (-[WebFrameBridge focusWindow]):
2367 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
2368 (-[WebFrameBridge userAgentForURL:]):
2369 (-[WebFrameBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
2370 (-[WebFrameBridge previousKeyViewOutsideWebFrameViews]):
2371 (-[WebFrameBridge defersLoading]):
2372 (-[WebFrameBridge setDefersLoading:]):
2373 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
2374 (-[WebFrameBridge _preferences]):
2375 (-[WebFrameBridge selectWordBeforeMenuEvent]):
2376 (-[WebFrameBridge historyLength]):
2377 (-[WebFrameBridge canGoBackOrForward:]):
2378 (-[WebFrameBridge goBackOrForward:]):
2379 (-[WebFrameBridge print]):
2380 (-[WebFrameBridge pollForAppletInView:]):
2381 (-[WebFrameBridge respondToChangedContents]):
2382 (-[WebFrameBridge respondToChangedSelection]):
2383 (-[WebFrameBridge undoManager]):
2384 (-[WebFrameBridge issueCutCommand]):
2385 (-[WebFrameBridge issueCopyCommand]):
2386 (-[WebFrameBridge issuePasteCommand]):
2387 (-[WebFrameBridge issuePasteAndMatchStyleCommand]):
2388 (-[WebFrameBridge canPaste]):
2389 (-[WebFrameBridge overrideMediaType]):
2390 (-[WebFrameBridge isEditable]):
2391 (-[WebFrameBridge shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
2392 (-[WebFrameBridge shouldBeginEditing:]):
2393 (-[WebFrameBridge shouldEndEditing:]):
2394 (-[WebFrameBridge windowObjectCleared]):
2395 (-[WebFrameBridge spellCheckerDocumentTag]):
2396 (-[WebFrameBridge isContinuousSpellCheckingEnabled]):
2397 (-[WebFrameBridge didFirstLayout]):
2398 (-[WebFrameBridge dashboardRegionsChanged:]):
2399 (-[WebFrameBridge createModalDialogWithURL:]):
2400 (-[WebFrameBridge canRunModal]):
2401 (-[WebFrameBridge runModal]):
2402 Change all calls to [_page webView] to use [self webView] instead.
2406 2006-02-11 Maciej Stachowiak <mjs@apple.com>
2410 - factor WebArchive creation code out of other classes into new WebArchiver
2411 http://bugzilla.opendarwin.org/show_bug.cgi?id=7208
2413 * DOM/WebDOMOperations.m:
2414 (-[DOMNode webArchive]):
2415 (-[DOMRange webArchive]):
2416 * WebKit.xcodeproj/project.pbxproj:
2417 * WebView/WebArchiver.h: Added.
2418 * WebView/WebArchiver.m: Added.
2419 (+[WebArchiver _subframeArchivesForFrame:]):
2420 (+[WebArchiver archiveFrame:]):
2421 (+[WebArchiver _archiveCurrentStateForFrame:]):
2422 (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
2423 (+[WebArchiver archiveRange:]):
2424 (+[WebArchiver archiveNode:]):
2425 (+[WebArchiver archiveSelectionInFrame:]):
2426 * WebView/WebDataSource.m:
2427 (-[WebDataSource webArchive]):
2428 * WebView/WebDataSourcePrivate.h:
2429 * WebView/WebHTMLView.m:
2430 (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
2431 (-[WebHTMLView _writeSelectionToPasteboard:]):
2432 * WebView/WebHTMLViewPrivate.h:
2434 2006-02-11 Darin Adler <darin@apple.com>
2436 * English.lproj/StringsNotToBeLocalized.txt: Updated paths for recent changes in directory structure.
2438 2006-02-11 David Kilzer <ddkilzer@kilzer.net>
2440 Reviewed by John Sullivan.
2442 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7171
2443 No description in WebKitErrors.m for WebKitErrorPlugInWillHandleLoad
2445 * English.lproj/Localizable.strings: Added new UI_STRING().
2446 * Misc/WebKitErrors.m: Added #define for description.
2447 (registerErrors): Added dictionary entry.
2449 2006-02-09 Tim Omernick <timo@apple.com>
2451 Reviewed by Tim Hatcher.
2453 <rdar://problem/4153419> CrashTracer: 576 crashes in Safari at com.apple.WebKit: NPN_DestroyStream + 56
2455 I never could reproduce this crasher, which seems to be caused by the Speed Download plugin. However,
2456 I did find a way to make the affected code more bulletproof for those who are experiencing the crash.
2458 * Plugins/WebBaseNetscapePluginStream.h:
2459 Keep a WebBaseNetscapePluginView instead of the WebNetscapePluginPackage, since the plugin view could
2460 potentially be deallocated before the stream finishes loading.
2461 * Plugins/WebBaseNetscapePluginStream.m:
2462 (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
2463 Use pluginView instead of plugin.
2464 (-[WebBaseNetscapePluginStream dealloc]):
2465 Assert that the plugin instance has been nulled out, since that's now part of the stream's teardown
2467 Release pluginView instead of plugin.
2468 (-[WebBaseNetscapePluginStream setPluginPointer:]):
2469 Retain the plugin view instead of the plugin package, since the plugin view could be deallocated while
2470 the stream is running.
2471 This method now accepts a NULL argument so that we can easily clear out the pluginView backpointer
2472 (and other ivars derived from it).
2473 (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]):
2474 Use pluginView instead of plugin.
2475 (-[WebBaseNetscapePluginStream _destroyStream]):
2477 (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
2479 (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError]):
2480 Set the plugin instance to NULL, so that the pluginView backpointer is released. This method is called
2481 for every plugin view's stream when the plugin view is stopped/destroyed.
2482 (-[WebBaseNetscapePluginStream _deliverData]):
2483 Use pluginView instead of plugin.
2485 == Rolled over to ChangeLog-2006-02-09 ==