1 2005-06-02 Maciej Stachowiak <mjs@apple.com>
5 - removed dependencies on NSError SPI
7 * Misc.subproj/WebKitErrors.m:
8 (-[NSError _webkit_initWithDomain:code:URL:]):
9 (+[NSError _webkit_errorWithDomain:code:URL:]):
10 (+[NSError _webKitErrorWithDomain:code:URL:]):
11 (+[NSError _webKitErrorWithCode:failingURL:]):
12 (+[NSError _webkit_addErrorsWithCodesAndDescriptions:inDomain:]):
14 * Plugins.subproj/WebNetscapePluginRepresentation.m:
15 * Plugins.subproj/WebNetscapePluginStream.m:
16 * WebCoreSupport.subproj/WebSubresourceClient.m:
17 * WebView.subproj/WebBaseResourceHandleDelegate.m:
18 * WebView.subproj/WebDefaultResourceLoadDelegate.m:
19 * WebView.subproj/WebMainResourceClient.m:
20 (-[WebMainResourceClient didFailWithError:]):
22 2005-06-02 Maciej Stachowiak <mjs@apple.com>
26 - remove use of _cfBundle SPI
28 * Plugins.subproj/WebBasePluginPackage.h:
29 * Plugins.subproj/WebBasePluginPackage.m:
30 (-[WebBasePluginPackage initWithPath:]):
31 (-[WebBasePluginPackage load]):
32 (-[WebBasePluginPackage dealloc]):
33 * Plugins.subproj/WebNetscapePluginPackage.m:
34 (-[WebNetscapePluginPackage openResourceFile]):
35 (-[WebNetscapePluginPackage closeResourceFile:]):
36 (-[WebNetscapePluginPackage initWithPath:]):
37 (-[WebNetscapePluginPackage unloadWithoutShutdown]):
38 (-[WebNetscapePluginPackage load]):
39 * Plugins.subproj/WebPluginPackage.m:
40 (-[WebPluginPackage initWithPath:]):
42 2005-06-02 Maciej Stachowiak <mjs@apple.com>
46 - remove use of NSURLRequest and NSUserDefaults SPI
48 * History.subproj/WebHistoryItem.m:
49 (-[WebHistoryItem _setFormInfoFromRequest:]):
50 * Misc.subproj/WebNSURLRequestExtras.h: Added.
51 * Misc.subproj/WebNSURLRequestExtras.m: Added.
52 (-[NSURLRequest _web_HTTPReferrer]):
53 (-[NSURLRequest _web_HTTPContentType]):
54 (-[NSMutableURLRequest _web_setHTTPContentType:]):
55 (-[NSMutableURLRequest _web_setHTTPReferrer:]):
56 (-[NSMutableURLRequest _web_setHTTPUserAgent:]):
57 * Misc.subproj/WebNSUserDefaultsExtras.h: Added.
58 * Misc.subproj/WebNSUserDefaultsExtras.m: Added.
59 (-[NSString _webkit_HTTPStyleLanguageCode]):
61 (+[NSUserDefaults _ensureAndLockPreferredLanguageLock]):
62 (+[NSUserDefaults _webkit_defaultsDidChange]):
63 (addDefaultsChangeObserver):
64 (+[NSUserDefaults _webkit_addDefaultsChangeObserver]):
65 (+[NSUserDefaults _webkit_preferredLanguageCode]):
66 * Plugins.subproj/WebBaseNetscapePluginView.m:
67 (-[WebBaseNetscapePluginView requestWithURLCString:]):
68 * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
69 (-[WebNetscapePluginEmbeddedView didStart]):
70 * Plugins.subproj/WebNetscapePluginStream.m:
71 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
72 * WebCoreSupport.subproj/WebBridge.m:
73 (-[WebBridge createWindowWithURL:frameName:]):
74 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
75 (-[WebBridge incomingReferrer]):
76 (-[WebBridge createModalDialogWithURL:]):
77 * WebCoreSupport.subproj/WebSubresourceClient.m:
78 (+[WebSubresourceClient startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
79 * WebCoreSupport.subproj/WebViewFactory.m:
80 (-[WebViewFactory defaultLanguageCode]):
81 * WebKit.pbproj/project.pbxproj:
82 * WebView.subproj/WebBaseResourceHandleDelegate.m:
83 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
84 * WebView.subproj/WebDefaultContextMenuDelegate.m:
85 (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
86 * WebView.subproj/WebFrame.m:
87 (-[WebFrame _loadItem:withLoadType:]):
88 (-[WebFrame _addExtraFieldsToRequest:alwaysFromRequest:]):
89 (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
90 (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
91 * WebView.subproj/WebMainResourceClient.m:
92 * WebView.subproj/WebView.m:
93 (-[WebView _cachedResponseForURL:]):
94 (-[WebView userAgentForURL:]):
96 2005-06-02 Maciej Stachowiak <mjs@apple.com>
100 - move private gunk from header to implementation file.
102 * WebCoreSupport.subproj/WebNewKeyGeneration.c:
103 * WebCoreSupport.subproj/WebNewKeyGeneration.h:
105 2005-06-02 Maciej Stachowiak <mjs@apple.com>
109 - remove dependency on NSFileManager and NSCalendarDate private extras from WebFou
111 * History.subproj/WebHistory.m:
112 (-[WebHistoryPrivate findIndex:forDay:]):
113 (-[WebHistoryPrivate arrayRepresentation]):
114 (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
115 * Misc.subproj/WebFileDatabase.m:
116 (-[WebFileDatabase _truncateToSizeLimit:]):
117 (-[WebFileDatabase removeAllObjects]):
118 (-[WebFileDatabase performSetObject:forKey:]):
119 (-[WebFileDatabase performRemoveObjectForKey:]):
120 (-[WebFileDatabase open]):
121 * Misc.subproj/WebKitNSStringExtras.m:
122 (-[NSString _webkit_fixedCarbonPOSIXPath]):
123 * Misc.subproj/WebNSCalendarDateExtras.h: Added.
124 * Misc.subproj/WebNSCalendarDateExtras.m: Added.
125 (-[NSCalendarDate _webkit_compareDay:]):
126 * Misc.subproj/WebNSDataExtras.h:
127 * Misc.subproj/WebNSDictionaryExtras.h:
128 * Misc.subproj/WebNSFileManagerExtras.h: Added.
129 * Misc.subproj/WebNSFileManagerExtras.m: Added.
130 (-[NSFileManager _webkit_fileExistsAtPath:isDirectory:traverseLink:]):
131 (-[NSFileManager _webkit_createIntermediateDirectoriesForPath:attributes:]):
132 (-[NSFileManager _webkit_createDirectoryAtPathWithIntermediateDirectories:attributes:]):
133 (-[NSFileManager _webkit_createFileAtPathWithIntermediateDirectories:contents:attributes:directoryAttributes:]):
134 (-[NSFileManager _webkit_removeFileOnlyAtPath:]):
135 (-[NSFileManager _webkit_backgroundRemoveFileAtPath:]):
136 (-[NSFileManager _webkit_backgroundRemoveLeftoverFiles:]):
137 (-[NSFileManager _webkit_carbonPathForPath:]):
138 (-[NSFileManager _webkit_startupVolumeName]):
139 (-[NSFileManager _webkit_pathWithUniqueFilenameForPath:]):
140 * Plugins.subproj/WebBaseNetscapePluginStream.m:
141 * WebKit.pbproj/project.pbxproj:
142 * WebView.subproj/WebHTMLView.m:
143 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
144 * WebView.subproj/WebImageView.m:
145 (-[WebImageView namesOfPromisedFilesDroppedAtDestination:]):
147 2005-06-02 Maciej Stachowiak <mjs@apple.com>
151 - remove dependencies on NSDictionary and NSURL extras
153 * History.subproj/WebHistoryItem.m:
154 (-[WebHistoryItem initFromDictionaryRepresentation:]):
155 * Misc.subproj/WebKitNSStringExtras.h:
156 * Misc.subproj/WebKitNSStringExtras.m:
157 (-[NSString _webkit_hasCaseInsensitiveSuffix:]):
158 (-[NSString _webkit_hasCaseInsensitiveSubstring:]):
159 (-[NSString _webkit_filenameByFixingIllegalCharacters]):
160 * Misc.subproj/WebNSDictionaryExtras.h: Added.
161 * Misc.subproj/WebNSDictionaryExtras.m: Added.
162 (-[NSDictionary _webkit_numberForKey:]):
163 (-[NSDictionary _webkit_intForKey:]):
164 (-[NSDictionary _webkit_stringForKey:]):
165 (-[NSDictionary _webkit_objectForMIMEType:]):
166 (-[NSMutableDictionary _webkit_setObject:forUncopiedKey:]):
167 (-[NSMutableDictionary _webkit_setInt:forKey:]):
168 (-[NSMutableDictionary _webkit_setBool:forKey:]):
169 * Misc.subproj/WebNSPasteboardExtras.m:
170 * Misc.subproj/WebNSURLExtras.h:
171 * Misc.subproj/WebNSURLExtras.m:
172 (-[NSURL _webkit_URLByRemovingFragment]):
173 (-[NSURL _webkit_scriptIfJavaScriptURL]):
174 (-[NSURL _webkit_isFileURL]):
175 (-[NSURL _web_hostString]):
176 (-[NSURL _webkit_suggestedFilenameWithMIMEType:]):
177 * Misc.subproj/WebNSViewExtras.m:
178 * Panels.subproj/WebPanelAuthenticationHandler.m:
179 * Plugins.subproj/WebBaseNetscapePluginStream.m:
180 * Plugins.subproj/WebBaseNetscapePluginView.m:
181 (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
182 (-[WebBaseNetscapePluginView loadPluginRequest:]):
183 (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
184 * Plugins.subproj/WebPluginController.m:
185 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
186 * WebCoreSupport.subproj/WebBridge.m:
187 * WebKit.pbproj/project.pbxproj:
188 * WebView.subproj/WebDataSource.m:
189 * WebView.subproj/WebFrame.m:
190 * WebView.subproj/WebFrameView.m:
191 * WebView.subproj/WebHTMLView.m:
192 * WebView.subproj/WebPreferences.m:
193 (-[WebPreferences _setIntegerValue:forKey:]):
194 (-[WebPreferences _setBoolValue:forKey:]):
195 * WebView.subproj/WebResource.m:
196 (-[WebResource _initWithPropertyList:]):
197 (-[WebResource _fileWrapperRepresentation]):
198 * WebView.subproj/WebView.m:
200 2005-06-02 Maciej Stachowiak <mjs@apple.com>
204 - remove dependencies on NSString and NSData extras from Foundation
206 * Misc.subproj/WebKitNSStringExtras.h:
207 * Misc.subproj/WebKitNSStringExtras.m:
208 (-[NSString _webkit_isCaseInsensitiveEqualToString:]):
209 (-[NSString _webkit_hasCaseInsensitivePrefix:]):
210 (-[NSString _webkit_stringByTrimmingWhitespace]):
211 (-[NSString _webkit_stringByCollapsingNonPrintingCharacters]):
212 (-[NSString _webkit_fixedCarbonPOSIXPath]):
213 * Misc.subproj/WebNSDataExtras.h:
214 * Misc.subproj/WebNSDataExtras.m:
215 (-[NSString _web_capitalizeRFC822HeaderFieldName]):
216 (-[NSData _web_isCaseInsensitiveEqualToCString:]):
218 (-[NSData _web_parseRFC822HeaderFields]):
219 (-[NSData _webkit_guessedMIMETypeForXML]):
220 (-[NSData _webkit_guessedMIMEType]):
221 * Misc.subproj/WebNSPasteboardExtras.m:
222 (-[NSPasteboard _web_bestURL]):
223 * Misc.subproj/WebNSURLExtras.h:
224 * Misc.subproj/WebNSURLExtras.m:
225 (applyHostNameFunctionToURLString):
226 (+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
227 (+[NSURL _web_URLWithDataAsString:relativeToURL:]):
228 (-[NSURL _webkit_shouldLoadAsEmptyDocument]):
229 (-[NSString _webkit_isJavaScriptURL]):
230 (-[NSString _webkit_isFileURL]):
231 (-[NSString _webkit_isFTPDirectoryURL]):
232 (-[NSString _web_encodeHostName]):
233 (-[NSString _webkit_rangeOfURLScheme]):
234 (-[NSString _webkit_looksLikeAbsoluteURL]):
235 (-[NSString _webkit_URLFragment]):
236 * Misc.subproj/WebNSViewExtras.m:
237 * Plugins.subproj/WebBaseNetscapePluginView.m:
238 (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
239 * Plugins.subproj/WebPluginDatabase.m:
240 * WebCoreSupport.subproj/WebBridge.m:
241 (-[WebBridge setTitle:]):
242 * WebView.subproj/WebDataSource.m:
243 (-[WebDataSource _setTitle:]):
244 * WebView.subproj/WebFrame.m:
245 (-[WebFrame _loadItem:withLoadType:]):
246 * WebView.subproj/WebPreferences.m:
247 (-[WebPreferences userStyleSheetLocation]):
248 * WebView.subproj/WebView.m:
249 (+[WebView _MIMETypeForFile:]):
251 2005-06-02 Maciej Stachowiak <mjs@apple.com>
255 - first stage of cleaning up SPI usage in WebKit
257 * Carbon.subproj/CarbonUtils.m:
258 * DOM.subproj/WebDOMOperations.m:
259 (-[DOMHTMLLinkElement _subresourceURLs]):
260 (-[DOMHTMLParamElement _subresourceURLs]):
261 * History.subproj/WebHistoryItem.m:
262 (-[WebHistoryItem _setFormInfoFromRequest:]):
263 * Misc.subproj/WebDatabase.m:
264 (-[WebDatabase setObject:forKey:]):
265 (-[WebDatabase removeObjectForKey:]):
266 (-[WebDatabase removeAllObjects]):
267 (-[WebDatabase objectForKey:]):
268 (-[WebDatabase open]):
269 (-[WebDatabase close]):
270 (-[WebDatabase sync]):
271 (-[WebDatabase count]):
272 (-[WebDatabase setSizeLimit:]):
273 * Misc.subproj/WebIconDatabase.m:
274 (-[WebIconDatabase iconForURL:withSize:cache:]):
275 (-[WebIconDatabase _iconForFileURL:withSize:]):
276 * Misc.subproj/WebKitNSStringExtras.h:
277 * Misc.subproj/WebKitNSStringExtras.m:
278 (+[NSString _web_encodingForResource:]):
279 (-[NSString _webkit_isCaseInsensitiveEqualToString:]):
280 * Misc.subproj/WebNSEventExtras.h:
281 * Misc.subproj/WebNSEventExtras.m:
282 (-[NSEvent _web_isTabKeyEvent]):
283 * Misc.subproj/WebNSURLExtras.h:
284 * Misc.subproj/WebNSURLExtras.m:
285 (-[NSURL _webkit_isFileURL]):
286 (-[NSString _webkit_isJavaScriptURL]):
287 (-[NSString _webkit_isFileURL]):
288 * Panels.subproj/WebPanelAuthenticationHandler.m:
289 (-[NSMutableDictionary _webkit_setObject:forUncopiedKey:]):
290 (-[WebPanelAuthenticationHandler enqueueChallenge:forWindow:]):
291 (-[WebPanelAuthenticationHandler startAuthentication:window:]):
292 * Plugins.subproj/WebBaseNetscapePluginView.m:
293 * Plugins.subproj/WebBasePluginPackage.m:
294 (-[WebBasePluginPackage isQuickTimePlugIn]):
295 (-[WebBasePluginPackage isJavaPlugIn]):
296 * Plugins.subproj/WebPluginPackage.m:
297 (-[WebPluginPackage initWithPath:]):
298 * WebCoreSupport.subproj/WebBridge.m:
299 (-[WebBridge canTargetLoadInFrame:]):
300 (-[WebBridge valueForKey:keys:values:]):
301 * WebCoreSupport.subproj/WebGlyphBuffer.m:
302 * WebCoreSupport.subproj/WebImageDecodeItem.h:
303 * WebCoreSupport.subproj/WebImageDecodeItem.m:
304 * WebCoreSupport.subproj/WebImageDecoder.h:
305 * WebCoreSupport.subproj/WebImageDecoder.m:
306 * WebCoreSupport.subproj/WebTextRenderer.h:
308 * WebView.subproj/WebBaseResourceHandleDelegate.m:
309 (-[WebBaseResourceHandleDelegate _canUseResourceForRequest:]):
310 * WebView.subproj/WebDataProtocol.m:
311 (+[WebDataProtocol _webIsDataProtocolURL:]):
312 * WebView.subproj/WebFrame.m:
313 (-[WebFrame _shouldAllowAccessFrom:]):
314 (-[WebFrame reload]):
315 * WebView.subproj/WebHTMLRepresentation.m:
316 (-[WebHTMLRepresentation _isDisplayingWebArchive]):
317 * WebView.subproj/WebMainResourceClient.m:
318 (-[WebMainResourceClient continueAfterContentPolicy:response:]):
319 (-[WebMainResourceClient didReceiveResponse:]):
320 * WebView.subproj/WebPDFView.m:
321 * WebView.subproj/WebView.m:
322 (+[WebView _MIMETypeForFile:]):
324 2005-06-01 Darin Adler <darin@apple.com>
326 Reviewed by John Sullivan.
328 - WebKit part of fix for <rdar://problem/3166090> add IE JavaScript extension window.showModalDialog
330 * WebCoreSupport.subproj/WebBridge.m:
331 (-[WebBridge createModalDialogWithURL:]): Added. Calls the UI delegate, falling back to the generic
332 "create WebView" method.
333 (-[WebBridge canRunModal]): Added. Checks the UI delegate to see if it implements runModal.
334 (-[WebBridge canRunModalNow]): Added. Checks the "inConnectionCallback" field so we can prevent
335 deadlock since we can't do any I/O while inside a connection callback until this aspect of NSURLConnection
337 (-[WebBridge runModal]): Added. Sets "defersCallbacks" on all other web views in the group, then
338 calls runModal on the UI delegate.
340 * WebView.subproj/WebBaseResourceHandleDelegate.h: Added inConnectionCallback class method.
341 * WebView.subproj/WebBaseResourceHandleDelegate.m:
342 (-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]): Bump count and then
343 decrement count so we can tell if we are in a callback.
344 (-[WebBaseResourceHandleDelegate connection:didReceiveAuthenticationChallenge:]): Ditto.
345 (-[WebBaseResourceHandleDelegate connection:didCancelAuthenticationChallenge:]): Ditto.
346 (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]): Ditto.
347 (-[WebBaseResourceHandleDelegate connection:didReceiveData:lengthReceived:]): Ditto.
348 (-[WebBaseResourceHandleDelegate connection:willStopBufferingData:]): Ditto.
349 (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]): Ditto.
350 (-[WebBaseResourceHandleDelegate connection:didFailWithError:]): Ditto.
351 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]): Ditto.
352 (+[WebBaseResourceHandleDelegate inConnectionCallback]): Added. Return YES if count is not 0.
354 * WebView.subproj/WebMainResourceClient.m:
355 (-[WebMainResourceClient receivedError:]): Changed to use the method without the connection: parameter
356 in the base class, since we no longer are overriding the connection: version.
357 (-[WebMainResourceClient willSendRequest:redirectResponse:]): Change to override the version without
358 the connection prefix/parameter; now only the base class overrides the actual connection delegate methods.
359 (-[WebMainResourceClient continueAfterContentPolicy:response:]): Ditto.
360 (-[WebMainResourceClient didReceiveResponse:]): Ditto.
361 (-[WebMainResourceClient didReceiveData:lengthReceived:]): Ditto.
362 (-[WebMainResourceClient didFinishLoading]): Ditto.
363 (-[WebMainResourceClient didFailWithError:]): Ditto.
364 (-[WebMainResourceClient loadWithRequestNow:]): Call the method without the connection parameter.
366 * WebView.subproj/WebUIDelegatePrivate.h: Added new SPI here that WebBrowser implements.
368 2005-05-26 Darin Adler <darin@apple.com>
372 - fix build failure from when I removed WebCoreUnicode
374 * WebCoreSupport.subproj/WebTextRenderer.m: Removed import of WebUnicode.h that I missed.
375 (-[WebTextRenderer _convertUnicodeCharacters:length:toGlyphs:]): Switch from our own macros
376 to the ICU macros for surrogate pairs.
377 (widthForNextCharacter): Ditto.
379 2005-05-26 David Harrison <harrison@apple.com>
381 <rdar://problem/4120518> Mail: control-T in an empty message crashes mail
383 * WebCoreSupport.subproj/WebBridge.m:
384 (-[WebBridge issueTransposeCommand]):
385 New, to support transpose in JS.
387 2005-05-26 Darin Adler <darin@apple.com>
389 Reviewed by Richard and Dave Harrison.
391 - eliminate WebCoreUnicode and use ICU directly instead
393 * Misc.subproj/WebKitNSStringExtras.m: (canUseFastRenderer): Use u_charDirection directly.
394 * WebCoreSupport.subproj/WebTextRenderer.m: Removed import of <WebCore/WebCoreUnicode.h>.
395 * WebView.subproj/WebHTMLView.m: (+[WebHTMLView initialize]): Removed call to WebKitInitializeUnicode.
397 * Misc.subproj/WebUnicode.h: Removed.
398 * Misc.subproj/WebUnicode.m: Removed.
399 * Misc.subproj/WebUnicodeTables.m: Removed.
401 * WebKit.pbproj/project.pbxproj: Removed files.
403 2005-05-24 Richard Williamson <rjw@apple.com>
405 Fixed <rdar://problem/4097289> -[WebView elementAtPoint:] failing when WebView is nested and offset
407 Code to determine the correct frame under the window point was
408 converting the point incorrectly.
412 * WebView.subproj/WebView.m:
413 (-[WebView _frameViewAtWindowPoint:]):
415 2005-05-23 John Sullivan <sullivan@apple.com>
419 - WebKit part of <rdar://problem/4125783> WebKit needs a way to control whether textareas are resizable
421 * WebView.subproj/WebPreferencesPrivate.h:
422 added private-for-now getter and setter for new preference
423 * WebView.subproj/WebPreferenceKeysPrivate.h:
424 added private preference key controlling whether textareas are resizable
425 * WebView.subproj/WebPreferences.m:
426 (+[WebPreferences initialize]):
427 initial value of new preference is NO, so other clients' behavior doesn't change
428 (-[WebPreferences textAreasAreResizable]):
430 (-[WebPreferences setTextAreasAreResizable:]):
433 * WebView.subproj/WebView.m:
434 (-[WebView _updateWebCoreSettingsFromPreferences:]):
435 update this new setting in WebCore
437 * English.lproj/StringsNotToBeLocalized.txt:
438 updated for these changes
440 2005-05-23 Chris Blumenberg <cblu@apple.com>
442 Changed type for identifier parameter in WebResourceLoadDelegate-related calls to id from NSString.
446 * WebCoreSupport.subproj/WebBridge.m:
447 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]):
448 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
449 * WebView.subproj/WebFrame.m:
450 (-[WebFrame _opened]):
451 (-[WebFrame _requestFromDelegateForRequest:identifier:error:]):
452 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
453 (-[WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]):
454 * WebView.subproj/WebFrameInternal.h:
456 2005-05-20 Chris Blumenberg <cblu@apple.com>
458 Fixed: <rdar://problem/4098786> sync. XMLHttpRequest works w/o AllowNetworkAccess key because load delegate is not consulted
460 Synchronous loads did not cause the willSendRequest method on the resource load delegate to be called. This is the method that Dashboard uses to enforce AllowNetworkAccess and this must be called to avoid exploits.
462 Reviewed by sullivan.
464 * WebCoreSupport.subproj/WebBridge.m:
465 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): call [WebFrame _requestFromDelegateForRequest:identifier:error:] then
466 [WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:] so synthetic resource load delegate
467 methods are called and the data is saved as a WebResource for resources in the WebCore cache.
469 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): call [WebFrame _requestFromDelegateForRequest:identifier:error:],
470 respect its result, do the load and then call [WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]
471 for synchronous loads
473 * WebView.subproj/WebFrame.m:
474 (-[WebFrame _opened]): call [WebFrame _requestFromDelegateForRequest:identifier:error:] then
475 [WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:] so synthetic resource load delegate methods are called
476 for subresrources in the page cache
478 (-[WebFrame _requestFromDelegateForRequest:identifier:error:]): new, was part of the removed _sendResourceLoadDelegateMessagesForURL:::
479 This method calls identifierForInitialRequest and willSendRequest.
481 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]): new, was part of the removed _sendResourceLoadDelegateMessagesForURL:::
482 This method calls the remaining resource load delegate messages.
484 (-[WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]): new, saves the resource and calls
485 [WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]
487 * WebView.subproj/WebFrameInternal.h:
489 2005-05-17 Chris Blumenberg <cblu@apple.com>
491 Fixed: <rdar://problem/4119282> clicking a link in an RTF file opens the link with NSWorkspace without the usual security checks or WebView delegate control
495 * WebCoreSupport.subproj/WebBridge.m:
496 (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): pass the passed referrer to canLoadURL::: not [self referrer]
497 (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): ditto
498 * WebView.subproj/WebTextView.m:
499 (-[WebTextView clickedOnLink:atIndex:]): call the loadURL bridge method so that security checks are made, command/option clicks work, policy delegate is consulted etc.
501 2005-05-17 Chris Blumenberg <cblu@apple.com>
503 Fixed: <rdar://problem/4120255> web archives on remote servers can be viewed directly (with major security issues); should download instead
507 * WebView.subproj/WebBaseResourceHandleDelegate.h:
508 * WebView.subproj/WebMainResourceClient.m:
509 (-[WebMainResourceClient continueAfterContentPolicy:response:]): if the WebKit client has chosen to "use" a remote web archive, stop the load with an error
511 2005-05-16 Darin Adler <darin@apple.com>
513 - attempt to get things building under "Saffron" development tools
515 * WebKit.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT.
517 2005-05-13 John Sullivan <sullivan@apple.com>
521 - fixed <rdar://problem/4093306> Safari crashes if Esc key is held down during series
522 of authentication sheets
524 * Panels.subproj/WebAuthenticationPanel.m:
525 (-[WebAuthenticationPanel cancel:]):
526 retain and autorelease self. This is a workaround for an AppKit key-handling issue, which I wrote up as:
527 <rdar://problem/4118422> Key-down events can be sent to a closed window if a key is kept pressed down
529 2005-05-12 John Sullivan <sullivan@apple.com>
533 - rolled in changes from experimental-ui-branch to support resizable textareas
534 and find-as-you-type and confirming unsubmitted form changes. The files/functions
535 modified are listed just below. After that are the ChangeLog comments from the branch.
537 * WebCoreSupport.subproj/WebBridge.m:
538 (-[WebBridge textDidChange:]):
539 * WebView.subproj/WebFormDelegate.h:
540 * WebView.subproj/WebFormDelegate.m:
541 (-[WebFormDelegate textDidChange:inFrame:]):
542 * WebView.subproj/WebHTMLView.m:
543 (-[WebHTMLView maintainsInactiveSelection]):
544 (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
545 (-[WebHTMLView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
546 * WebView.subproj/WebView.m:
547 (-[WebView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
548 (-[WebView searchFor:direction:caseSensitive:wrap:]):
549 (-[WebView makeTextStandardSize:]):
550 (-[WebView maintainsInactiveSelection]):
551 * WebView.subproj/WebViewPrivate.h:
553 2005-04-18 John Sullivan <sullivan@apple.com>
555 WebKit support for notifying a form delegate when a
556 textarea's contents have changed (as opposed to a
557 textfield, which was already handled).
561 * WebView.subproj/WebFormDelegate.h:
562 * WebView.subproj/WebFormDelegate.m:
563 (-[WebFormDelegate textDidChange:inFrame:]):
564 new form delegate method
566 * WebCoreSupport.subproj/WebBridge.m:
567 (-[WebBridge textDidChange:]):
568 new method, calls through to form delegate
570 2005-04-11 John Sullivan <sullivan@apple.com>
572 Fixed inability to wrap around in Find in Page
574 * WebView.subproj/WebView.m:
575 (-[WebView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
576 changed wrapFlag from NO to YES on two lines (copy/paste error)
578 2005-04-07 John Sullivan <sullivan@apple.com>
580 WebKit support for find-as-you-type. Needed an additional parameter on
581 a method from WebDocumentSearching protocol. Since that's a public protocol,
582 I couldn't just add the parameter. For now I hacked it with an undeclared
583 internal method that's discovered via respondsToSelector. Probably the right
584 long-term approach is to deprecate the WebDocumentSearching protocol and introduce
585 a replacement that has a more flexible set of parameters for possible future
588 Reviewed by Dave Hyatt.
590 * WebView.subproj/WebHTMLView.m:
591 (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
592 now calls new one-more-parameter version passing NO for new parameter to match old behavior
593 (-[WebHTMLView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
594 new method, adds findInSelection parameter and passes it through to bridge
596 * WebView.subproj/WebView.m:
597 (-[WebView searchFor:direction:caseSensitive:wrap:]):
598 now calls new one-more-parameter version passing NO for new parameter to match old behavior
599 (-[WebView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
600 new method, adds findInSelection parameter and passes it through
602 2005-04-07 John Sullivan <sullivan@apple.com>
604 WebKit support to allow clients to control whether the selection is still
605 drawn when the first responder is elsewhere. Formerly this was hardwired
606 to be true only when -[WebView isEditable] was true.
610 * WebView.subproj/WebHTMLView.m:
611 (-[WebHTMLView maintainsInactiveSelection]):
612 check [WebView maintainsInactiveSelection] rather than just [WebView isEditable]
614 * WebView.subproj/WebViewPrivate.h:
615 * WebView.subproj/WebView.m:
616 (-[WebView maintainsInactiveSelection]):
617 new method for clients to override, returns -[self isEditable]
620 2005-05-10 John Sullivan <sullivan@apple.com>
624 - WebKit support for <rdar://problem/3795701> Menu item/keyboard shortcut to
625 restore text zoom to normal
627 * WebView.subproj/WebView.m:
628 (-[WebView validateUserInterfaceItem:]):
629 validate makeTextStandardSize by calling canMakeTextStandardSize
630 (-[WebView canMakeTextStandardSize]):
631 new method, returns YES unless text size multiplier is currently 1
632 (-[WebView makeTextStandardSize:]):
633 new method, sets text size multiplier to 1
635 * WebView.subproj/WebViewPrivate.h:
636 add makeTextStandardSize: and canMakeTextStandardSize to pending public category
638 2005-05-10 John Sullivan <sullivan@apple.com>
642 - fixed <rdar://problem/4067981> Mail places RTF flavor before RTFD flavor when dragging
643 mixed image/text content.
645 * WebView.subproj/WebHTMLView.m:
646 (+[WebHTMLView _selectionPasteboardTypes]):
647 put RTFD type before RTF type in array of types to declare
649 2005-05-09 Chris Blumenberg <cblu@apple.com>
651 Turned assertion into error message to prevent crash when encountering this bug:
652 <rdar://problem/4067625> connection:willCacheResponse: is called inside of [NSURLConnection initWithRequest:delegate:]
654 * WebView.subproj/WebBaseResourceHandleDelegate.h:
655 * WebView.subproj/WebBaseResourceHandleDelegate.m:
656 (-[WebBaseResourceHandleDelegate loadWithRequest:]): set flag to track when we're initializing the connection
657 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]): log error
659 2005-05-09 Darin Adler <darin@apple.com>
661 * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly;
662 Not needed to make builds work, spews undesirable error messages too.
664 2005-05-06 Darin Adler <darin@apple.com>
668 - make building multiple trees with make work better
670 * Makefile.am: Set up Xcode build directory before invoking xcodebuild.
672 2005-05-04 Darin Adler <darin@apple.com>
674 Reviewed by Dave Hyatt.
678 * WebKit.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles.
679 When built without a build style (by Apple B&I) we want to get the target from the
680 environment. But when built with a build style (by Safari engineers and others), we want
681 to use 10.3. Because our deployment target was not set, we ran into this bug:
683 <rdar://problem/4108717> CTFontGetGlyphWithName doesn't work with some strings
685 * Makefile.am: Took out extra parameters that make command-line building different from
686 Xcode building. Now that this is fixed, you should not get a full rebuild if you switch
687 from command line to Xcode or back.
689 2005-05-04 Chris Blumenberg <cblu@apple.com>
692 <rdar://problem/4078417> REGRESSION (125-412): MLB gameday page doesn't update (Flash)
693 <rdar://problem/4072280> XMLHttpRequest calls onReadyStateChange callback with bogus status value
697 Our WebKit-level caching of subresources "dumbed-down" information held in NSURLResponse. This caused some loads to lack response headers and thus disabling cache directives. Status codes were also not retained and this caused XMLHttpRequest to fail frequently. The fix is to have WebResource retain the NSURLResponse and to use the NSURLResponse when we decide to load from WebResources.
699 * WebCoreSupport.subproj/WebBridge.m:
700 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): call new [WebResource _initWithData:URL:response:]
701 * WebView.subproj/WebBaseResourceHandleDelegate.m:
702 (-[WebBaseResourceHandleDelegate _canUseResourceWithResponse:]): new, checks response cache directives
703 (-[WebBaseResourceHandleDelegate loadWithRequest:]): call _canUseResourceWithResponse:
704 (-[WebBaseResourceHandleDelegate saveResource]): call new [WebResource _initWithData:URL:response:]
705 * WebView.subproj/WebResource.m:
706 (-[WebResourcePrivate dealloc]):
707 (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): call renamed _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:
708 (-[WebResource initWithCoder:]): decode the NSURLReponse
709 (-[WebResource encodeWithCoder:]): encode the NSURLReponse
710 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): take the NSURLReponse
711 (-[WebResource _initWithData:URL:response:]): new
712 (-[WebResource _initWithPropertyList:]): decode the NSURLReponse
713 (-[WebResource _propertyListRepresentation]): encode the NSURLReponse
714 (-[WebResource _response]): return ivar if we have one
715 * WebView.subproj/WebResourcePrivate.h:
717 2005-05-03 David Hyatt <hyatt@apple.com>
719 Fix object element support so that fallback content works. With this change Safari passes the Acid2 test.
723 * WebCoreSupport.subproj/WebBridge.m:
724 (-[WebBridge determineObjectFromMIMEType:URL:]):
725 * WebView.subproj/WebDataSource.m:
726 (-[WebDataSource _receivedMainResourceError:complete:]):
727 * WebView.subproj/WebMainResourceClient.m:
728 (-[WebMainResourceClient continueAfterContentPolicy:response:]):
730 2005-05-03 Darin Adler <darin@apple.com>
732 * WebView.subproj/WebUIDelegate.h: Fixed incorrect comment.
735 2005-05-01 Darin Adler <darin@apple.com>
737 - move to Xcode native targets and stop checking in generated files
739 * WebKit.pbproj/project.pbxproj: Updated to use native targets and generate all the generated
740 files, so we don't have to check them in any more.
741 * Info.plist: Added. Native targets use a separate file for this.
743 * Plugins.subproj/npapi.m: Fixed import statement to get npapi.h from <WebKit/> rather than current directory.
745 * Makefile.am: Removed timestamp cleaning rules since we don't use it any more.
747 * .cvsignore: Removed various timestamp files.
749 * DOM.subproj/DOM-compat.h: Removed.
750 * DOM.subproj/DOM.h: Removed.
751 * DOM.subproj/DOMCSS.h: Removed.
752 * DOM.subproj/DOMCore.h: Removed.
753 * DOM.subproj/DOMEvents.h: Removed.
754 * DOM.subproj/DOMExtensions.h: Removed.
755 * DOM.subproj/DOMHTML.h: Removed.
756 * DOM.subproj/DOMPrivate.h: Removed.
757 * DOM.subproj/DOMRange.h: Removed.
758 * DOM.subproj/DOMStylesheets.h: Removed.
759 * DOM.subproj/DOMTraversal.h: Removed.
760 * DOM.subproj/DOMViews.h: Removed.
761 * Plugins.subproj/WebScriptObject.h: Removed.
762 * Plugins.subproj/npapi.h: Removed.
763 * Plugins.subproj/npruntime.h: Removed.
764 * copy-webcore-files-to-webkit: Removed.
765 * embed-frameworks.sh: Removed.
766 * force-clean-timestamp: Removed.
768 2005-04-28 Darin Adler <darin@apple.com>
772 - fixed problems preventing us from compiling with gcc 4.0
774 * WebKit.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
775 way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
776 WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
778 * History.subproj/WebHistoryItem.m: (-[WebHistoryItem pageCache]): Changed return type
779 to match the declaration.
780 * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
781 Fixed a BOOL that should have been a Boolean.
782 * WebCoreSupport.subproj/WebTextRenderer.m: Removed redundant copy of ROUND_TO_INT, also in
784 (-[WebTextRenderer _computeWidthForSpace]): Had to add cast because of difference in type of
785 ROUND_TO_INT vs. CEIL_TO_INT.
786 (pathFromFont): Added a cast to convert UInt8 * to char *.
787 * WebView.subproj/WebFrameView.m:
788 (-[WebFrameView _setDocumentView:]): Fixed parameter type to match the declaration.
789 (-[WebFrameView documentView]): Fixed return type to match the declaration.
790 * WebView.subproj/WebHTMLView.m:
791 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
792 Initialized a variable to quiet an incorrect gcc 4.0 uninitialized variable warning.
793 (-[WebHTMLView deleteToMark:]): Switched from @try style to NS_DURING style of exception handler
794 because we can't pass -fobjc-exceptions just to Objective-C at the moment (see above).
795 (-[WebHTMLView selectToMark:]): Ditto.
796 (-[WebHTMLView swapWithMark:]): Ditto.
798 2005-04-27 John Sullivan <sullivan@apple.com>
800 Reviewed by Dave Harrison.
802 - fixed <rdar://problem/3547489> pop-up window blocking preference and
803 menu item can easily get out of sync.
805 * WebView.subproj/WebPreferences.m:
806 (-[WebPreferences _setStringValue:forKey:]):
807 save local value before setting value in NSUserDefaults, so clients reacting to NSUserDefaults
808 change notification but calling back on WebPreferences API will see the updated value.
809 (-[WebPreferences _setIntegerValue:forKey:]):
811 (-[WebPreferences _setBoolValue:forKey:]):
814 2005-04-26 Richard Williamson <rjw@apple.com>
816 Fixed <rdar://problem/4098713> Scripting API is incompatible with Mozilla
820 * Plugins.subproj/npfunctions.h:
821 * Plugins.subproj/npruntime.h:
823 2005-04-26 Darin Adler <darin@apple.com>
827 - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler
829 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView scrollWheel:]): Call sendScrollWheelEvent: method
830 instead of the old scrollOverflowWithScrollWheelEvent: (just a name change).
832 2005-04-18 Darin Adler <darin@apple.com>
836 - fixed <rdar://problem/4092614> REGRESSION (Tiger): progressively loaded background images "scroll around" instead of just appearing
838 * WebCoreSupport.subproj/WebImageData.m:
839 (-[WebImageData _imageSourceOptions]): Moved a global inside this function, since it's only used here.
840 (-[WebImageData _cacheImages:allImages:]): Fixed a sizeof that was getting the size of the wrong thing.
841 (-[WebImageData _isSizeAvailable]): Used calloc in a more consistent way.
842 (drawPattern): Removed an unneeded cast.
843 (-[WebImageData tileInRect:fromPoint:context:]): Here's the actual bug fix. Don't use the image size
844 when deciding whether the image needs to be tiled as a pattern nor when creating the pattern: in both
845 cases, use the tile size. The old way was wrong, and the new way works perfectly. Also removed uneeded
846 error message when the image is not yet loaded enough to create a CGImageRef for it -- it's fine to
847 draw nothing in that case.
849 2005-04-14 John Sullivan <sullivan@apple.com>
853 * WebView.subproj/WebBaseResourceHandleDelegate.m:
854 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]):
855 Beefed up assertion that's been bugging me and Chris to include
856 the two troublemaking values.
858 2005-04-05 David Hyatt <hyatt@apple.com>
860 Fix for 4077106, wheel scroll amount smaller in Tiger. All along wheeling should have been 4x the default
861 line height of 10 (just as arrow keys did). Scroll arrows should have done this too for scroll views (they did
862 already for overflow sections). This patch puts the override into the scrollview itself, and removes the
863 multipliers in the private frame methods.
867 * WebView.subproj/WebFrameView.m:
868 (-[WebFrameView _verticalKeyboardScrollDistance]):
869 (-[WebFrameView initWithFrame:]):
870 (-[WebFrameView _horizontalKeyboardScrollDistance]):
874 2005-03-31 Chris Blumenberg <cblu@apple.com>
876 Fixed: <rdar://problem/4070729> REGRESSION (125-311, Panther-only?): Safari crashes while reloading "My eBay" page
880 * WebView.subproj/WebBaseResourceHandleDelegate.m:
881 (-[WebBaseResourceHandleDelegate resourceData]): retain and autorelease resourceData since releaseResources (which releases resourceData) may be called before the caller of this method has an opporuntity to retain the returned data
887 2005-03-23 Richard Williamson <rjw@apple.com>
889 Use Patti Yeh's hack to determine the appropriate rectangle
890 to place the "associated word" window.
891 If there is no marked text firstRectForCharacterRange: will
892 use the selected range to determine the returned rectangle,
893 ignoring the input range. This is the fix from
894 4029491 that I previously backed out.
898 * WebView.subproj/WebHTMLView.m:
899 (-[WebHTMLView firstRectForCharacterRange:]):
901 2005-03-23 Richard Williamson <rjw@apple.com>
903 Fixed <rdar://problem/4062490> REGRESSION (WebKit-408): no subresources reported in Activity window after going back at hrweb.apple.com
905 Stop collecting subresource responses after the document
906 had loaded, not after it has been opened.
910 * WebView.subproj/WebFrame.m:
911 (-[WebFrame _setState:]):
912 (-[WebFrame _opened]):
914 2005-03-21 Maciej Stachowiak <mjs@apple.com>
918 <rdar://problem/4051145> The QuickTime Cocoa plug-in needs an SPI that it can call to check for URL policy
920 * Plugins.subproj/WebPluginContainerCheck.h: Added.
921 * Plugins.subproj/WebPluginContainerCheck.m: Added this new helper class to encapsulate
922 an async plugin navigation check.
923 (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:]): Convenience allocator that gives autoreleased value.
924 (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]): Initializer.
925 (-[WebPluginContainerCheck finalize]): Just assert that we're done, it would
926 be bad to deallocate this object while request is still outstanding.
927 (-[WebPluginContainerCheck dealloc]): Ditto.
928 (-[WebPluginContainerCheck _continueWithPolicy:]): Method to continue after async
930 (-[WebPluginContainerCheck _isDisallowedFileLoad]): Do "file: URL from remote content"
932 (-[WebPluginContainerCheck _actionInformationWithURL:]): Helper to make action
934 (-[WebPluginContainerCheck _askPolicyDelegate]): Call policy delegate to let
935 the app decide if this load is allowed.
936 (-[WebPluginContainerCheck start]): Start the check.
937 (-[WebPluginContainerCheck cancel]): Cancel a check in progress.
938 * Plugins.subproj/WebPluginController.h:
939 * Plugins.subproj/WebPluginController.m:
940 (-[WebPluginController initWithDocumentView:]): Initialize new _checksInProgress field.
941 (-[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Implement
943 (-[WebPluginController _cancelOutstandingChecks]): New helper to make sure to cancel
944 all outstanding requests when destroying all plugins.
945 (-[WebPluginController destroyAllPlugins]): Call above helper.
946 (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Implement this new plug-in SPI method.
947 (-[WebPluginController bridge]): New helper method.
948 (-[WebPluginController webView]): New helper method.
949 * WebView.subproj/WebPolicyDelegatePrivate.h: Add new navigation
950 type WebNavigationTypePlugInRequest.
951 * WebKit.pbproj/project.pbxproj: Add new files.
952 * WebView.subproj/WebDefaultPolicyDelegate.m:
953 (-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): Don't open externally on a plug-in request.
955 2005-03-23 Richard Williamson <rjw@apple.com>
957 Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
959 We now use actual document NSRanges to represent both marked text
960 ranges and selection ranges.
962 Reviewed by Ken Kocienda.
964 * WebView.subproj/WebHTMLView.m:
965 (-[WebHTMLView validAttributesForMarkedText]):
966 (-[WebHTMLView firstRectForCharacterRange:]):
967 (-[WebHTMLView selectedRange]):
968 (-[WebHTMLView markedRange]):
969 (-[WebHTMLView _selectMarkedText]):
970 (-[WebHTMLView setMarkedText:selectedRange:]):
974 2005-03-22 Darin Adler <darin@apple.com>
976 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
980 2005-03-20 Maciej Stachowiak <mjs@apple.com>
984 <rdar://problem/4060020> Add stub version of security SPI for QuickTime plug-in so QuickTime team has something to compile and link against
986 * Plugins.subproj/WebPluginContainerPrivate.h: Added.
987 * Plugins.subproj/WebPluginController.m:
988 (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]):
989 (-[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
990 * WebKit.pbproj/project.pbxproj:
992 2005-03-19 David Harrison <harrison@apple.com>
996 <rdar://problem/4059479> Misspelling underline does underline the whole word, could go farther to the right
998 * WebCoreSupport.subproj/WebTextRenderer.m:
999 (-[WebTextRenderer misspellingLinePatternGapWidth]):
1000 (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
1001 Consider that the last pixel in the underline dot pattern is transparent.
1003 2005-03-19 Darin Adler <darin@apple.com>
1005 Reviewed by Maciej (a while back).
1007 - fixed <rdar://problem/4059323> local-file security check is allowing plug-in streams, but must not
1009 * Plugins.subproj/WebNetscapePluginStream.m:
1010 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
1011 Roll out change I made on 3-13. That change is needed for subresource, but not for plug-in streams.
1012 For plug-in streams it's too risky, and leaves a serious security hole open.
1014 2005-03-19 Darin Adler <darin@apple.com>
1016 Reviewed by Ken and John.
1018 - fixed <rdar://problem/4059123> REGRESSION (402-403): deleteWordForward: and deleteWordBackward: start deleting single characters after the first delete
1020 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
1021 Fixed backwards logic in here and added missing check. Set action to one of the two typing actions only
1022 if isTypingAction is YES.
1024 2005-03-19 David Harrison <harrison@apple.com>
1026 Reviewed by me (written by Patti Yeh).
1028 <rdar://problem/4029491> <TCIM> CangJie: the candidate window appears at the top left hand corner during typing in Mail and iChat
1030 * WebView.subproj/WebHTMLView.m:
1031 (-[WebHTMLView firstRectForCharacterRange:]):
1032 Use selected range if there is no marked range.
1036 2005-03-18 David Harrison <harrison@apple.com>
1040 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
1042 * WebView.subproj/WebFrameView.m:
1043 (-[WebFrameView webCoreBridge]):
1044 New to conform to WebCoreBridgeHolder protocol.
1046 2005-03-18 Richard Williamson <rjw@apple.com>
1048 Fixed <rdar://problem/4057004> Data from XMLHTTPRequest is never dealloced
1050 WebDataSource keeps an array of all the NSURLResponses associated
1051 with the load for a page. This is used to playback delegate messages
1052 when loading from the page cache. However, after the document
1053 has completed it's initial load, we continue to keep track of responses.
1054 So, this has the consequence of keeping all the responses for a page
1055 around for the life of the page. NSURLResponses are now very
1056 heavy. They indirectly reference the resource data (via the
1057 download assessment dictionary). This fix will keep
1058 references to responses around for those resources loaded during initial
1059 page load, but not after that point.
1063 * WebView.subproj/WebDataSource.m:
1064 (-[WebDataSource _addResponse:]):
1065 (-[WebDataSource _stopRecordingResponses]):
1066 * WebView.subproj/WebDataSourcePrivate.h:
1067 * WebView.subproj/WebFrame.m:
1068 (-[WebFrame _opened]):
1070 2005-03-18 Ken Kocienda <kocienda@apple.com>
1076 <rdar://problem/4053729> Copy/paste of page with frames into Blot or Mail does nothing and loses insertion point
1078 * WebView.subproj/WebHTMLView.m:
1079 (-[WebHTMLView _selectedArchive]): Wrap frameset documents in an iframe, so they can be pasted into
1080 existing documents which will have a body or frameset of their own.
1084 2005-03-17 Richard Williamson <rjw@apple.com>
1086 Fixed <rdar://problem/4055562> REGRESSION (Tiger): Safari doesn't draw progressively-loaded JPEGs (www.theregister.co.uk, www.titantalk.com)
1088 Anothe side effect of lazy loading of image meta data. We now
1089 don't cache image size until size meta data is actually available.
1093 * WebCoreSupport.subproj/WebImageData.m:
1094 (-[WebImageData size]):
1096 2005-03-16 David Harrison <harrison@apple.com>
1100 <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements
1102 Also changed WebCore.
1104 * WebView.subproj/WebHTMLView.m:
1105 (-[WebHTMLView _shouldDeleteRange:]):
1106 Added call to new bridge method canDeleteRange.
1108 2005-03-16 Ken Kocienda <kocienda@apple.com>
1114 <rdar://problem/4042935> undo doesn't work properly during inline input
1116 * WebView.subproj/WebHTMLView.m:
1117 (-[WebHTMLView setMarkedText:selectedRange:]): Call new -[WebCoreBridge replaceMarkedTextWithText:] instead of
1118 -[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]. The former call was just added in
1119 order to provide a better mapping of international text input onto the typing command/undo design.
1121 2005-03-15 Richard Williamson <rjw@apple.com>
1123 Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
1125 If client mutates request use new Foundation SPI to address remove applewebdata properties from request.
1127 Reviewed by Ken Kocienda.
1129 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1130 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
1131 * WebView.subproj/WebDataProtocol.h:
1132 * WebView.subproj/WebDataProtocol.m:
1133 (+[NSURLRequest _webDataRequestPropertyKey]):
1135 2005-03-15 Ken Kocienda <kocienda@apple.com>
1141 <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
1143 Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
1144 keystrokes grouped together in a single undo operation. My change on 27 Jan to route delete keystrokes
1145 through _deleteRange:killRing:... made this feature regress. Previous to that change, the backwards delete
1146 key went through separate code that is no longer in the tree that did not set the selection in the way
1149 The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
1150 -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
1151 selection will act to close typing or not. The code changes below all add this new argument with the
1152 appropriate value for closeTyping.
1154 * WebView.subproj/WebHTMLView.m:
1155 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Passes NO for closeTyping when
1156 deletionAction is deleteKeyAction or forwardDeleteKeyAction; YES when deleteSelectionAction.
1157 (-[WebHTMLView _expandSelectionToGranularity:]): Passes YES for closeTyping.
1158 (-[WebHTMLView selectToMark:]): Passes YES for closeTyping.
1159 (-[WebHTMLView swapWithMark:]): Passes YES for closeTyping.
1160 (-[WebHTMLView transpose:]): Passes YES for closeTyping.
1161 (-[WebHTMLView _selectMarkedText]): Passes NO for closeTyping.
1162 (-[WebHTMLView _selectRangeInMarkedText:]): Passes NO for closeTyping.
1163 * WebView.subproj/WebView.m:
1164 (-[WebView setSelectedDOMRange:affinity:]): Passes YES for closeTyping.
1166 2005-03-14 Richard Williamson <rjw@apple.com>
1168 Fix <rdar://problem/4051389> 8A413: gifs animating too fast
1172 Match Mozilla's policy for minimum frame duration, which is somewhat odd:
1174 <= 0.01 sec use .1 sec, otherwise use specified duration.
1176 * WebCoreSupport.subproj/WebImageData.m:
1177 (-[WebImageData _frameDurationAt:]):
1179 2005-03-14 Darin Adler <darin@apple.com>
1181 Reviewed by Harrison.
1183 - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts
1185 * WebView.subproj/WebFrameInternal.h: Added _unmarkAllMisspellings.
1186 * WebView.subproj/WebFrame.m: (-[WebFrame _unmarkAllMisspellings]): Added.
1187 Calls unmarkAllMisspellings on the bridge and self and all subframes.
1189 * WebView.subproj/WebView.m: (-[WebView setContinuousSpellCheckingEnabled:]):
1190 Call _unmarkAllMisspellings on the main frame when turning continuous spell checking off.
1192 2005-03-14 Richard Williamson <rjw@apple.com>
1194 Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane
1196 The Acrobat application triggers loads of new documents in it's policy delegate. This
1197 ultimately causes the WebHTMLView to be released before their event handlers have
1198 returned. To bullet proof against this case we retain/release self before passing
1199 the event on for further handling.
1203 * WebView.subproj/WebHTMLView.m:
1204 (-[WebHTMLView _updateMouseoverWithEvent:]):
1205 (-[WebHTMLView scrollWheel:]):
1206 (-[WebHTMLView mouseDown:]):
1207 (-[WebHTMLView mouseDragged:]):
1208 (-[WebHTMLView mouseUp:]):
1209 (-[WebHTMLView keyDown:]):
1210 (-[WebHTMLView keyUp:]):
1211 (-[WebHTMLView performKeyEquivalent:]):
1213 2005-03-14 Vicki Murley <vicki@apple.com>
1215 - roll out the fix for 4040321, since it is still pending CCC review.
1217 2005-03-10 Richard Williamson <rjw@apple.com>
1219 Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
1223 If a delegate returns a mutated applewebdata: request in it's willSendRequest:
1224 method, we don't load using the WebDataRequest. Instead we do a normal load.
1225 Unfortunately, if the request they return is mutated *copy* of the applewebdata:
1226 request it will hold the applewebdata: special properties. These properties
1227 will be encoded into the cache. They should not be. So, to fix, we sanitize the
1228 request, by removing the special properties from the request.
1230 Note that we had to dig into the private guts of NSURLRequest because there is
1231 no public mechanism to remove properties from a request, see 4046775.
1233 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1234 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
1235 * WebView.subproj/WebDataProtocol.h:
1236 * WebView.subproj/WebDataProtocol.m:
1237 (-[NSURLRequest _webDataRequestExternalRequest]):
1238 (-[NSURLRequest _webDataRequestSanitize]):
1242 2005-03-13 Darin Adler <darin@apple.com>
1244 Reviewed by Ken and Maciej.
1246 - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
1248 * Plugins.subproj/WebNetscapePluginStream.m: (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
1249 Allow plug-in subresource streams to load with any URL, ignoring the "canLoadURL" method's restriction (only
1250 file URLs can load other file URLs), which now applies only to main resources, like web pages in frames or
1251 object tags and plug-in main resources.
1253 * WebCoreSupport.subproj/WebBridge.m:
1254 (-[WebBridge startLoadingResource:withURL:customHeaders:]): Allow subresources to load with any URL, as above.
1255 This allows things like images, stylesheets, and JavaScript to be loaded without the "canLoadURL" method's
1257 (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]): Ditto.
1258 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Ditto.
1260 2005-03-10 Richard Williamson <rjw@apple.com>
1262 Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
1266 If a delegate returns a mutated applewebdata: request in it's willSendRequest:
1267 method, we don't load using the WebDataRequest. Instead we do a normal load.
1268 Unfortunately, if the request they return is mutated *copy* of the applewebdata:
1269 request it will hold the applewebdata: special properties. These properties
1270 will be encoded into the cache. They should not be. So, to fix, we sanitize the
1271 request, by removing the special properties from the request.
1273 Note that we had to dig into the private guts of NSURLRequest because there is
1274 no public mechanism to remove properties from a request, see 4046775.
1276 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1277 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
1278 * WebView.subproj/WebDataProtocol.h:
1279 * WebView.subproj/WebDataProtocol.m:
1280 (-[NSURLRequest _webDataRequestExternalRequest]):
1281 (-[NSURLRequest _webDataRequestSanitize]):
1285 2005-03-10 Maciej Stachowiak <mjs@apple.com>
1289 <rdar://problem/4046510> REGRESSION (TOT): All Flash and Shockwave plugin-based web content missing
1291 * Plugins.subproj/WebNetscapePluginStream.m:
1292 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
1294 2005-03-10 John Sullivan <sullivan@apple.com>
1298 - fixed <rdar://problem/4045843> Going back/forward to error page
1299 hits assertion in -[WebDataSource(WebPrivate) _setData:]
1301 * WebView.subproj/WebDataSource.m:
1302 (-[WebDataSource _setData:]):
1303 Removed bogus assertion
1305 2005-03-09 Deborah Goldsmith <goldsmit@apple.com>
1309 - fixed <rdar://problem/3997044> default encoding for non-Latin incorrect
1311 * WebKit/WebView.subproj/WebPreferences.m: (+[WebPreferences _systemCFStringEncoding]):
1312 Call __CFStringGetUserDefaultEncoding to get region, and TECGetWebTextEncodings to get
1313 the first encoding to determine the default encoding.
1315 2005-03-09 Darin Adler <darin@apple.com>
1317 Reviewed by Richard.
1319 - fixed <rdar://problem/4034175> REGRESSION (Mail): Can't use any font with style Light/Condensed/Semibold/Extrabold, etc
1321 * WebView.subproj/WebHTMLView.m:
1322 (-[WebHTMLView _styleFromFontAttributes:]): Use a constant instead of hard-coded weight for clarity.
1323 (-[WebHTMLView _originalFontA]): Ditto.
1324 (-[WebHTMLView _originalFontB]): Ditto.
1325 (-[WebHTMLView _addToStyle:fontA:fontB:]): Add code to detect the case where the family name is not good enough
1326 to specify the font precisely. In that case, use the Postscript font name instead. Also change variable names
1327 so it's easier to understand the method.
1329 2005-03-06 Maciej Stachowiak <mjs@apple.com>
1333 <rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content
1335 * Plugins.subproj/WebBaseNetscapePluginView.m:
1336 (-[WebBaseNetscapePluginView requestWithURLCString:]):
1337 * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
1338 (-[WebNetscapePluginEmbeddedView didStart]):
1339 * Plugins.subproj/WebNetscapePluginStream.m:
1340 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
1341 * WebCoreSupport.subproj/WebBridge.m:
1342 (-[WebBridge createWindowWithURL:frameName:]):
1343 (-[WebBridge startLoadingResource:withURL:customHeaders:]):
1344 (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]):
1345 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
1346 (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
1347 (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
1348 (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
1349 (-[WebBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
1350 * WebView.subproj/WebFrame.m:
1351 (-[WebFrame _loadURL:referrer:intoChild:]):
1352 * WebView.subproj/WebFramePrivate.h:
1354 2005-03-09 Richard Williamson <rjw@apple.com>
1356 Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted
1358 The AppKit and ATS reports that MS P Gothic is fixed pitch. It is
1359 not! This is another case of "fixed pitch" being wrong. I've
1360 coalesced all the special cases into our isFontFixedPitch:, and
1361 used a dictionary to improve speed. No performance regression.
1365 * WebCoreSupport.subproj/WebTextRenderer.m:
1366 (-[WebTextRenderer _computeWidthForSpace]):
1367 * WebCoreSupport.subproj/WebTextRendererFactory.m:
1368 (-[WebTextRendererFactory clearCaches]):
1369 (-[WebTextRendererFactory isFontFixedPitch:]):
1371 2005-03-09 Darin Adler <darin@apple.com>
1375 <rdar://problem/4040388> REGRESSION (172-173): nonrepro crash in -[NSString(WebNSURLExtras) _web_isUserVisibleURL]
1377 * Misc.subproj/WebNSURLExtras.m:
1378 (-[NSString _web_isUserVisibleURL]): Fixed some pointer expressions that didn't include the index in the expression.
1379 (readIDNScriptWhiteListFile): Removed NSLog statements in here since we decided they aren't useful and they will
1380 write some messages on Tiger.
1382 2005-03-09 Darin Adler <darin@apple.com>
1384 * DOM.subproj/DOMPrivate.h: Checked in file copied from WebCore.
1386 2005-03-08 Richard Williamson <rjw@apple.com>
1388 Fixed <rdar://problem/4036949> many JPEG images fail to incremental-load due to change in ImageIO JPEG header parsing (to be fixed in WebKit)
1389 Fixed <rdar://problem/4042570> Need to check image properties for presence of width/height properties
1391 ImageIO-55 changed how image properties are created. They
1392 are now created incrementally. So we need "re-get" the image
1393 properties if the properties we care about (width/height) aren't
1394 in the property dictionary.
1398 * WebCoreSupport.subproj/WebImageData.h:
1399 * WebCoreSupport.subproj/WebImageData.m:
1400 (-[WebImageData init]):
1401 (-[WebImageData fileProperties]):
1402 (-[WebImageData propertiesAtIndex:]):
1403 (-[WebImageData _isSizeAvailable]):
1404 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
1405 (-[WebImageData size]):
1407 2005-03-08 John Sullivan <sullivan@apple.com>
1409 A couple of tweaks to the previous patch, from Darin's review.
1411 * Misc.subproj/WebNSPasteboardExtras.m:
1412 (_writableTypesForImageWithoutArchive):
1413 remove unnecessary _web prefix
1414 (_writableTypesForImageWithArchive):
1416 (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
1417 use mutableCopy rather than initWithArray:, and adjust for name changes
1419 2005-03-08 John Sullivan <sullivan@apple.com>
1423 - fixed <rdar://problem/4031826> REGRESSION (Mail): standalone images from
1424 Safari can't be pasted into Mail (WebKit part of fix)
1426 We were always declaring webarchive-related pasteboard types, even in the standalone
1427 image cases where we had no webarchive. Unfortunately, the WebView pasteboard-related
1428 API doesn't prevent this kind of thing from happening, because the code that
1429 declares the types isn't guaranteed to be anywhere near the code that writes
1430 the pasteboard data.
1432 After this fix, I discovered that pasting standalone images into Mail still doesn't
1433 work right, but the remaining issues seem to be entirely in Mail. I wrote up 4041671
1436 * Misc.subproj/WebNSPasteboardExtras.h:
1437 (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
1438 Added boolean parameter; clients must specify whether or not there's an
1439 archive involved, because the array of types is different if there is.
1441 * Misc.subproj/WebNSPasteboardExtras.m:
1442 (_web_writableTypesForImageWithoutArchive):
1443 new static function, constructs (once) and returns the array of types
1444 for images that don't have archives
1445 (_web_writableTypesForImageWithArchive):
1446 new static function, constructs (once) and returns the array of types
1447 for images that do have archives
1448 (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
1449 added boolean parameter, now calls one of the two new static functions
1451 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]):
1452 added asserts that we aren't declaring the archive types if we don't have archive data
1454 (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
1455 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
1457 * WebView.subproj/WebDefaultContextMenuDelegate.m:
1458 (-[WebDefaultUIDelegate copyImageToClipboard:]):
1459 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
1461 * WebView.subproj/WebImageView.m:
1462 (-[WebImageView copy:]):
1463 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
1465 * WebView.subproj/WebView.m:
1466 (-[WebView pasteboardTypesForElement:]):
1467 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
1469 2005-03-07 Richard Williamson <rjw@apple.com>
1471 More bullet proofing for <rdar://problem/4038304> CrashTracer: ....9 crashes at com.apple.WebKit: -[WebTextRenderer initWithFont:usingPrinterFont:] + 840
1473 Protect against removal of Times and Times New Roman from
1474 system. If these fonts are removed attempt to get system font
1475 instead of FATAL_ALWAYS.
1479 * WebCoreSupport.subproj/WebTextRenderer.m:
1480 (-[WebTextRenderer initWithFont:usingPrinterFont:]):
1484 2005-03-06 Darin Adler <darin@apple.com>
1486 - fixed obvious mistake in IDN script code (luckily it hasn't been in a submission yet!)
1488 * Misc.subproj/WebNSURLExtras.m: (readIDNScriptWhiteListFile): Use "index" to index into the array,
1489 not "script", which is the script number, not the 32-bit-word index.
1491 2005-03-05 Kevin Decker <kdecker@apple.com>
1495 Fixed: <rdar://problem/4038529> Infinite progress bar loading webcams and other sites that use multipart/x-mixed-replace
1497 The previous patch I landed prevented us from loading multipart/x-mixed-replace but did not always update the progress bar accordingly.
1498 This stops websites from having seemingly infinite progress in the browser UI.
1500 * WebCoreSupport.subproj/WebSubresourceClient.m:
1501 (-[WebSubresourceClient didReceiveResponse:]): If this is "multipart/x-mixed-replace", remove the WebBaseResourceHandleDelegate client from
1502 the datasource's subresource array, otherwise -[WebDataSource isLoading] incorrectly returns YES. Also it's possible at this point in
1503 time we're done loading now (loaded everything else except for the multipart/x-mixed-replace content) so go ahead and check to see if
1504 in fact we're complete.
1505 * WebView.subproj/WebMainResourceClient.m:
1506 (-[WebMainResourceClient connection:didReceiveResponse:]): ditto
1508 2005-03-05 Richard Williamson <rjw@apple.com>
1510 Fixed panther build problem. Shouldn't include
1511 changes for 3968753 on panther.
1515 * WebView.subproj/WebView.m:
1516 (-[WebView _commonInitializationWithFrameName:groupName:]):
1518 2005-03-05 Darin Adler <darin@apple.com>
1522 - fixed <rdar://problem/4034603> REGRESSION (185-188): RadarWeb can't send enclosures anymore
1524 * WebView.subproj/WebFormDataStream.m:
1525 (closeCurrentStream): Release currentData when closing the stream.
1526 (advanceCurrentStream): Set up and retain currentData when the current stream is reading that data, so the
1527 data won't be released while in use.
1528 (formCreate): Initialize currentData to NULL.
1530 - fixed <rdar://problem/4037562> Tiger8A402: Help Viewer crashed when viewing help for iChat (infinite recursion in WebView)
1532 * WebView.subproj/WebView.m: (-[WebView _responderValidateUserInterfaceItem:]):
1533 Check for the case where we ourselves are the responder. This avoids an infinite loop.
1534 The actual code to perform operations avoids this with a global variable, but this lighter weight
1535 solution is sufficient here because validate operations don't call through to the next responder.
1537 2005-03-04 Richard Williamson <rjw@apple.com>
1539 Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple animated GIFs (was fast in Panther)
1541 Disable coalesced updates (in CG). This restores the
1544 Reviewed by David Harrison.
1546 * WebView.subproj/WebView.m:
1547 (-[WebView _commonInitializationWithFrameName:groupName:]):
1549 2005-03-04 Adele Amchan <adele@apple.com>
1553 * English.lproj/StringsNotToBeLocalized.txt: added new strings "text/x-vcf" and "text/x-csv" to the list
1555 2005-03-04 Adele Amchan <adele@apple.com>
1559 Fix for <rdar://problem/4032982> Sun iPlanet app: not able to import AddressBook CSV format addresses properly
1560 Fix for <rdar://problem/4032985> Sun iPlanet app: not able to import vCard format addresses properly
1562 * WebView.subproj/WebTextView.m:
1563 (+[WebTextView unsupportedTextMIMETypes]): added "text/x-csv" and "text/x-vcf" to the list of MIME types that our text view doesn't handle
1565 2005-03-04 Darin Adler <darin@apple.com>
1569 - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut
1571 * WebView.subproj/WebHTMLView.m:
1572 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Merged _handleKillRing behavior
1573 into this function, since there's now a more-complicated way the startNewKillRingSequence boolean needs to
1574 be handled. Set the startNewKillRingSequence boolean after the entire process so changing the selection before
1575 and during the editing dosn't clear it. Also change "isTypingAction" parameter to "deletionAction" so we can
1576 handle forward delete with this method.
1577 (-[WebHTMLView _deleteSelection]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
1578 which is the way to say the same thing using the new parameter.
1579 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Refactor to use the _deleteRange
1580 method above. Also calls _shouldDeleteRange: for the pre-existing selection case; not doing that before was
1582 (-[WebHTMLView deleteToMark:]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
1583 which is the way to say the same thing using the new parameter.
1585 2005-03-04 Darin Adler <darin@apple.com>
1589 - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)
1591 * WebView.subproj/WebHTMLView.m:
1592 (-[WebHTMLView _styleFromFontAttributes:]): Quote font name when calling setFontFamily.
1593 (-[WebHTMLView _addToStyle:fontA:fontB:]): Ditto.
1595 2005-03-04 Darin Adler <darin@apple.com>
1599 - fixed <rdar://problem/3965666> IDN spoofing vulnerability caused by Unicode characters that look like ASCII characters
1601 * Misc.subproj/WebNSURLExtras.m:
1602 (readIDNScriptWhiteListFile): Added. Reads file and parses script names.
1603 (readIDNScriptWhiteList): Added. Calls readIDNScriptWhiteList on each of the white list locations in succession.
1604 (allCharactersInIDNScriptWhiteList): Renamed from containsPossibleLatinLookalikes and changed sense.
1605 Now calls readIDNScriptWhiteList first time, and then uses the read-in list to check the scripts.
1606 (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call allCharactersInIDNScriptWhiteList instead of
1607 containsPossibleLatinLookalikes.
1608 * Resources/IDNScriptWhiteList.txt: Added.
1609 * WebKit.pbproj/project.pbxproj: Added IDNScriptWhiteList.txt file.
1611 * Misc.subproj/WebKitLocalizableStrings.m: Removed. This is simply unused.
1612 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
1614 2005-03-04 Darin Adler <darin@apple.com>
1618 - fixed <rdar://problem/3937667> REGRESSION (Mail): Zooming a window from titlebar button doesn't paint newly-exposed portions of window
1620 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
1621 Re-set-up the visRect if the bounds changes due to layout.
1625 2005-03-03 Jens Alfke <jens@apple.com>
1629 <rdar://problem/3991818> REGRESSION: Images scale while loading
1630 The code could crop an image when not all the scanlines were available yet, and it could crop when only a sub-rect of the image was to be drawn; but if it had to do both at once, it got the coordinates wrong. Fixed that.
1632 * WebCoreSupport.subproj/WebImageData.m:
1633 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
1635 2005-03-01 David Hyatt <hyatt@apple.com>
1637 Fix for 3841186, scrollbar shows up disabled when it should not appear at all. Make sure updateScrollers
1638 is never allowed to be re-entrant from any call point by moving the guard inside the function itself.
1640 Reviewed by John Sullivan
1642 * WebView.subproj/WebDynamicScrollBarsView.m:
1643 (-[WebDynamicScrollBarsView updateScrollers]):
1644 (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
1646 2005-03-02 Chris Blumenberg <cblu@apple.com>
1648 Fixed: <rdar://problem/4029010> Expose method to retrieve drag image for WebView's selection
1650 Reviewed by sullivan.
1652 * WebView.subproj/WebHTMLView.m:
1653 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): call _selectionDraggingImage
1654 (-[WebHTMLView _selectionDraggingImage]): new SPI for Mail, factored from previous method
1655 (-[WebHTMLView _selectionDraggingRect]): new SPI for Mail
1656 * WebView.subproj/WebHTMLViewPrivate.h:
1658 2005-03-02 John Sullivan <sullivan@apple.com>
1662 - fixed <rdar://problem/4023337> Safari stops loading any page (-[NSCFDictionary setObject:forKey:]:
1663 attempt to insert nil key)
1665 It is very likely that the exception being hit is caused by the same problem as WebFoundation
1666 bug 4018486. This change makes the code robust against this kind of problem regardless.
1668 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1669 (-[WebBaseResourceHandleDelegate saveResource]):
1670 Don't call addSubresource if newly-created resource is nil (but do assert on debug builds).
1671 Also assert that originalURL and MIMEType are not nil.
1673 * WebView.subproj/WebDataSource.m:
1674 (-[WebDataSource addSubresource:]):
1675 Don't add nil subresource to dictionary, but do assert on debug builds.
1679 2005-03-01 John Sullivan <sullivan@apple.com>
1683 - fixed <rdar://problem/3987482> Format>Style>Italic is not enabled when a
1684 compose window is empty (works in Blot)
1686 * WebView.subproj/WebHTMLView.m:
1687 (-[WebHTMLView becomeFirstResponder]):
1688 call _updateFontPanel here so NSFontManager knows the right font for the menu
1689 items and the font panel
1691 2005-03-01 David Harrison <harrison@apple.com>
1695 <rdar://problem/3915560> Mail would like an SPI to enable "smart" text paste/drop
1697 * WebView.subproj/WebHTMLView.m:
1698 (-[WebHTMLView _smartDeleteRangeForProposedRange:]):
1699 (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]):
1702 2005-02-28 John Sullivan <sullivan@apple.com>
1706 - WebKit part of fix for <rdar://problem/4023490> REGRESSION (125-185): Tabbing through links
1707 on frameset page gets stuck at end (tivofaq.com)
1709 This tab-to-links stuff has been in shaky condition ever since AppKit futzed with
1710 tabbing behavior in Tiger to add support for including the toolbar in the key loop.
1711 I made some changes months ago to compensate for that, but some cases, such as this
1712 one, still weren't fixed.
1714 * WebCoreSupport.subproj/WebBridge.m:
1715 (-[WebBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
1716 new bottleneck method, extracted from nextKeyViewOutsideWebFrameViews; handles
1717 nextKeyView or nextValidKeyView depending on parameter.
1718 (-[WebBridge nextKeyViewOutsideWebFrameViews]):
1719 now calls extracted method
1720 (-[WebBridge nextValidKeyViewOutsideWebFrameViews]):
1721 new method, calls new bottleneck method
1723 * WebView.subproj/WebHTMLView.m:
1724 (-[WebHTMLView nextValidKeyView]):
1725 when we're stuck at the end of a nextKeyView chain inside a nexted frame, use
1726 nextValidKeyViewOutsideWebFrameViews. Make sure we don't end up looking inside
1727 the web frame views while doing this.
1729 2005-02-25 Darin Adler <darin@apple.com>
1733 - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus
1735 * WebView.subproj/WebHTMLView.m:
1736 (-[WebHTMLView updateFocusState]): Renamed from updateFocusDisplay. Added call to setWindowHasFocus: method.
1737 (-[WebHTMLView viewDidMoveToWindow]): Call method by new name.
1738 (-[WebHTMLView windowDidBecomeKey:]): Ditto.
1739 (-[WebHTMLView windowDidResignKey:]): Ditto.
1740 (-[WebHTMLView becomeFirstResponder]): Ditto.
1741 (-[WebHTMLView resignFirstResponder]): Ditto.
1745 2005-02-25 Richard Williamson <rjw@apple.com>
1747 Fixed <rdar://problem/4000962> 8A375: Help Viewer displays voiced sound and semi-voiced characters strangely (characters don't seem to be composed)
1749 Added special case for voiced marks.
1753 * WebCoreSupport.subproj/WebTextRenderer.m:
1754 (widthForNextCharacter):
1756 2005-02-25 Darin Adler <darin@apple.com>
1760 - fixed <rdar://problem/4019823> Seed: Control-Y doesn't work
1762 * WebView.subproj/WebHTMLView.m:
1763 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Call _handleKillRing
1764 after setting the selection, since it uses the selection to get the text.
1765 (-[WebHTMLView _insertText:selectInsertedText:]): Check for empty string to avoid an assertion
1766 on the other side of the bridge when you yank the empty string.
1768 2005-02-24 Richard Williamson <rjw@apple.com>
1770 Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.
1772 If directionality is specified use that as initial directionality,
1773 rather than neutral directionality.
1777 * WebCoreSupport.subproj/WebTextRenderer.m:
1778 (widthForNextCharacter):
1780 2005-02-24 Adele Amchan <adele@apple.com>
1784 Fix for <rdar://problem/4023393> Safari crashed in khtml::RenderObject::repaintAfterLayoutIfNeeded(QRect const&, QRect const&)
1786 We were crashing after hitting PageDown when viewing a pdf because
1787 WebKit was calling over to WebCore to scroll overflow areas.
1788 Since this only needs to be done if we're dealing with a WebHTMLView,
1789 I added a wrapper function to check the documentView before calling
1792 * WebView.subproj/WebFrameView.m:
1793 (-[WebFrameView _scrollOverflowInDirection:granularity:]): added wrapper function that checks if documentView is a WebHTMLView
1794 (-[WebFrameView scrollToBeginningOfDocument:]): uses new wrapper function now
1795 (-[WebFrameView scrollToEndOfDocument:]): uses new wrapper function now
1796 (-[WebFrameView _pageVertically:]): uses new wrapper function now
1797 (-[WebFrameView _pageHorizontally:]): uses new wrapper function now
1798 (-[WebFrameView _scrollLineVertically:]): uses new wrapper function now
1799 (-[WebFrameView _scrollLineHorizontally:]): uses new wrapper function now
1801 2005-02-24 Richard Williamson <rjw@apple.com>
1803 Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame
1807 * WebCoreSupport.subproj/WebImageData.h:
1808 * WebCoreSupport.subproj/WebImageData.m:
1809 (-[WebImageData resetAnimation]):
1810 * WebCoreSupport.subproj/WebImageRenderer.m:
1811 (-[WebImageRenderer resetAnimation]):
1812 (-[WebInternalImage resetAnimation]):
1813 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
1815 2005-02-24 Kevin Decker <kdecker@apple.com>
1819 Fixed <rdar://problem/3962401> Don't load multipart/x-mixed-replace content to prevent memory leak
1821 Since we're not going to fix <rdar://problem/3087535> for Tiger, we should not load multipart/x-mixed-replace content. Pages with such content contain what is essentially an infinite load and therefore may leak.
1823 * WebView.subproj/WebMainResourceClient.m:
1824 (-[WebMainResourceClient connection:didReceiveResponse:]): Disabled loading of multipart/x-mixed-replace content until we fully implement server side push.
1825 * WebCoreSupport.subproj/WebSubresourceClient.m:
1826 (-[WebSubresourceClient didReceiveResponse:]): Ditto. Same exact thing for sub resources.
1829 2005-02-23 John Sullivan <sullivan@apple.com>
1833 - fixed <rdar://problem/4021370> REGRESSION (Tiger): WebKit part of fix for
1834 shift-tab on tivofaq doing the wrong thing
1836 * WebView.subproj/WebFrameView.m:
1837 (-[WebFrameView becomeFirstResponder]):
1838 If our previousValidKeyView is nil or self (same as nil modulo AppKit oddness),
1839 look out of the box and get the previousValidKeyView of our webview.
1841 2005-02-23 Darin Adler <darin@apple.com>
1845 - fixed <rdar://problem/4010196> REGRESSION (125-186+): 8-character timestamps in gmail wrap to 2 lines (width:8ex; font-size:80%)
1847 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer xHeight]): Return the maximum
1848 of the "x" height and width. Comment in the code explains why in more detail.
1850 2005-02-22 Richard Williamson <rjw@apple.com>
1852 Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions
1854 Compare regions after automatice scroll regions have been
1859 * WebCoreSupport.subproj/WebBridge.h:
1860 * WebCoreSupport.subproj/WebBridge.m:
1861 (-[WebBridge dealloc]):
1862 (-[WebBridge _compareDashboardRegions:]):
1863 (-[WebBridge dashboardRegionsChanged:]):
1865 2005-02-22 Richard Williamson <rjw@apple.com>
1867 Fixed <rdar://problem/4012463> Dashboard widgets don't work with authenticating proxies
1869 Added new SPI for dashboard that just calls default delegate
1874 * WebView.subproj/WebView.m:
1875 (-[WebView handleAuthenticationForResource:challenge:fromDataSource:]):
1876 * WebView.subproj/WebViewPrivate.h:
1878 2005-02-22 Chris Blumenberg <cblu@apple.com>
1882 * WebCoreSupport.subproj/WebBridge.m:
1883 (-[WebBridge issuePasteAndMatchStyleCommand]): support for new "PasteAndMatchStyle" exec command
1887 2005-02-21 David Harrison <harrison@apple.com>
1891 <rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps
1893 * WebCoreSupport.subproj/WebTextRenderer.m:
1894 (-[WebTextRenderer misspellingLineThickness]):
1895 (-[WebTextRenderer misspellingLinePatternWidth]):
1896 Replaced #defines with these methods, so others can get the same info.
1898 (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
1899 Keep underline within originally specified bounds.
1902 2005-02-21 Darin Adler <darin@apple.com>
1906 - fixed <rdar://problem/4016358> don't ever display IDN URLs with characters from "possible Latin look-alike" scripts
1908 * Misc.subproj/WebNSURLExtras.m:
1909 (containsPossibleLatinLookalikes): Added.
1910 (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call containsPossibleLatinLookalikes, and if true,
1911 don't decode the host name.
1913 2005-02-19 Kevin Decker <kdecker@apple.com>
1917 Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission
1919 Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case. Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker.
1921 * Plugins.subproj/WebBaseNetscapePluginView.h: Addded currentEventIsUserGesture boolean ivar.
1922 * Plugins.subproj/WebBaseNetscapePluginView.m:
1923 (-[WebBaseNetscapePluginView sendEvent:]): If at any point the user clicks or presses a key from within a plugin, set the currentEventIsUserGesture flag to true. This is important to differentiate legitimate window.open() calls originating from plugins; we still want to allow those.
1924 (-[WebBaseNetscapePluginView initWithFrame:]): In our asynchronous load, pass along currentEventIsUserGesture to the PluginRequest.
1925 (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Inform WebCore if this was a user originated gesture when calling executeScript().
1926 (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1927 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
1928 (-[WebPluginRequest isCurrentEventUserGesture]): Added.
1930 2005-02-18 Chris Blumenberg <cblu@apple.com>
1932 Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled
1934 Reviewed by kocienda.
1936 * WebView.subproj/WebDataSource.m:
1937 (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for matchStyle to replaceSelection
1938 * WebView.subproj/WebHTMLView.m:
1939 (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]): return new chosePlainText parameter
1940 (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass chosePlainText for matchStyle to replaceSelection
1941 (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
1943 2005-02-17 Richard Williamson <rjw@apple.com>
1945 Removed code that should not have been checked in from
1948 * WebCoreSupport.subproj/WebTextRendererFactory.m:
1949 (-[WebTextRendererFactory isFontFixedPitch:]):
1951 2005-02-17 Richard Williamson <rjw@apple.com>
1953 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
1955 Fixed w/o introducing a performance regression.
1957 Reviewed by Vicki (and earlier by Dave Harrison).
1959 * WebCoreSupport.subproj/WebTextRenderer.m:
1960 (-[WebTextRenderer _computeWidthForSpace]):
1961 (widthForNextCharacter):
1962 * WebCoreSupport.subproj/WebTextRendererFactory.h:
1963 * WebCoreSupport.subproj/WebTextRendererFactory.m:
1964 (-[NSFont _web_isFakeFixedPitch]):
1965 (-[WebTextRendererFactory isFontFixedPitch:]):
1966 (-[WebTextRendererFactory fontWithFamily:traits:size:]):
1968 2005-02-17 Richard Williamson <rjw@apple.com>
1970 Fixed <rdar://problem/3959304> PDF in img tag is not rendered correctly anymore
1972 We were incorrectly adding image position when flipping coordinates.
1974 Reviewed by David Harrison.
1976 * WebCoreSupport.subproj/WebImageData.m:
1977 (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]):
1979 2005-02-17 Richard Williamson <rjw@apple.com>
1981 Fixed <rdar://problem/4007262> Seed: Flight tracker scrolling moves to the left
1983 Added SPI for dashboard to disable wheel scrolling of the WebClipView.
1988 * WebView.subproj/WebClipView.m:
1989 (-[WebClipView _focusRingVisibleRect]):
1990 (-[WebClipView scrollWheel:]):
1991 * WebView.subproj/WebView.m:
1992 (-[WebViewPrivate init]):
1993 (-[WebView drawRect:]):
1994 (-[WebView _dashboardBehavior:]):
1995 * WebView.subproj/WebViewInternal.h:
1996 * WebView.subproj/WebViewPrivate.h:
2000 2005-02-17 Vicki Murley <vicki@apple.com>
2002 - roll out this change, since it causes a 1.5% performance regression
2004 2005-02-15 Richard Williamson <rjw@apple.com>
2006 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
2008 Lie about Osaka-Mono. Treat it as fixed pitch, even though,
2009 strictly speaking it isn't. (Similar to what we do with
2012 Reviewed by David Harrison.
2014 * WebCoreSupport.subproj/WebTextRenderer.m:
2015 (-[WebTextRenderer _computeWidthForSpace]):
2016 * WebCoreSupport.subproj/WebTextRendererFactory.h:
2017 * WebCoreSupport.subproj/WebTextRendererFactory.m:
2018 (-[NSFont _web_isFakeFixedPitch]):
2019 (-[WebTextRendererFactory isFontFixedPitch:]):
2020 (-[WebTextRendererFactory fontWithFamily:traits:size:]):
2022 2005-02-17 John Sullivan <sullivan@apple.com>
2026 - fixed <rdar://problem/3997185> The Web view on .Mac Prefs caused System Prefs
2027 to lockup (resolved by re-boot only)
2029 * WebCoreSupport.subproj/WebBridge.m:
2030 (-[WebBridge nextKeyViewOutsideWebFrameViews]):
2031 Don't allow recursion here; assert on debug build, return nil on deployment. I
2032 couldn't get my machine into a state to repro this problem (and neither could the
2033 originator), but it's obvious from the stack crawl that this method was recursing
2034 when it shouldn't have.
2036 2005-02-16 John Sullivan <sullivan@apple.com>
2038 Written by Darin, reviewed by me.
2040 - WebKit part of fix for <rdar://problem/4007384>
2041 FILTER: Bookmark of RSS with Japanese search word & multiple RSS pages loses filter
2043 * DOM.subproj/DOMPrivate.h:
2044 updated this file, which is a copy of the WebCore version
2046 2005-02-16 Richard Williamson <rjw@apple.com>
2048 Fixed <rdar://problem/3966973> Tiger 8A357: Binary Compatiblity: frequent Webstractor.app crashes [WebImageData _nextFrame]
2050 Webstractor.app was playing tricks to create thumbnails of
2051 pages. This caused the 'focusView' to be incorrect during
2052 animated GIF frame rendering.
2056 * WebCoreSupport.subproj/WebImageRenderer.m:
2057 (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):
2059 2005-02-16 Vicki Murley <vicki@apple.com>
2061 Reviewed by me, code change by Darin.
2063 - fixed the build on Panther
2065 * WebView.subproj/WebFormDataStream.m: (webSetHTTPBody):
2066 Added a Panther-specific code path that just loads all the data into one big
2067 NSData object. This means that bug 3686434 won't be fixed on SUPanWheat; we'll
2068 still load the file into memory before sending it to the server on Panther.
2070 2005-02-15 Richard Williamson <rjw@apple.com>
2072 Fixed <rdar://problem/3998368> Tiger8A376: WebTextRenderer assertion failure in Safari while browsing news.bbc.co.uk
2074 Removed use of FATAL_ALWAYS from getUncachedWidth(). It's unclear
2075 why we would trigger the FATAL_ALWAYS. In the past we've seen
2076 the message triggered because of corrupt fonts. Anyway, in this
2077 particular case, we will now return 0 for the character width,
2078 rather than exiting.
2080 Reviewed by David Harrison.
2082 * WebCoreSupport.subproj/WebTextRenderer.m:
2085 2005-02-15 Richard Williamson <rjw@apple.com>
2087 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
2089 Lie about Osaka-Mono. Treat it as fixed pitch, even though,
2090 strictly speaking it isn't. (Similar to what we do with
2093 Reviewed by David Harrison.
2095 * WebCoreSupport.subproj/WebTextRenderer.m:
2096 (-[WebTextRenderer _computeWidthForSpace]):
2097 * WebCoreSupport.subproj/WebTextRendererFactory.h:
2098 * WebCoreSupport.subproj/WebTextRendererFactory.m:
2099 (-[NSFont _web_isFakeFixedPitch]):
2100 (-[WebTextRendererFactory isFontFixedPitch:]):
2101 (-[WebTextRendererFactory fontWithFamily:traits:size:]):
2103 2005-02-14 Darin Adler <darin@apple.com>
2107 - fixed <rdar://problem/3686434> Safari uses too much RAM on file upload, leading to malloc errors and crashes (HP printers)
2109 * WebView.subproj/WebFormDataStream.h: Added webSetHTTPBody, which creates and connects an appropriate
2110 stream to an NSMutableURLRequest.
2111 * WebView.subproj/WebFormDataStream.m: Added implementation here.
2113 * WebCoreSupport.subproj/WebBridge.m:
2114 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2116 * WebCoreSupport.subproj/WebSubresourceClient.m:
2117 (+[WebSubresourceClient startLoadingResource:withURL:customHeaders:postData:referrer:forDataSource:]):
2119 * WebView.subproj/WebFrame.m:
2120 (-[WebFrame _loadItem:withLoadType:]): Use webSetHTTPBody.
2121 (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): Ditto.
2123 * English.lproj/StringsNotToBeLocalized.txt: Updated for this change and other recent changes.
2125 2005-02-11 Richard Williamson <rjw@apple.com>
2127 Fixed <rdar://problem/4002505> 8A378: Endlessly animating gif's on http://www.entropy.ch
2129 If animated images had no loop count property we were incorrectly
2130 looping forver. Note, that in the course of fixing this bug
2131 I found that ImageIO is incorrectly NOT reporting the loop count
2132 for a whole class of animated GIFs.
2134 Reviewed by Ken Kocienda.
2136 * WebCoreSupport.subproj/WebImageData.m:
2137 (-[WebImageData _repetitionCount]):
2141 2005-02-11 Vicki Murley <vicki@apple.com>
2145 - fix deployment build on Panther
2147 * WebView.subproj/WebHTMLView.m:
2148 (-[WebHTMLView changeBaseWritingDirection:]): ifdef out NSWritingDirectionNatural
2149 (-[WebHTMLView toggleBaseWritingDirection:]): fix a spacing issue
2151 2005-02-10 David Harrison <harrison@apple.com>
2153 Reviewed by Richard.
2155 <rdar://problem/3991652> REGRESSION (Mail): Deleting entire line in reply deletes extra blank line and moves insertion point
2157 * WebView.subproj/WebHTMLView.m:
2158 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:isTypingAction:]):
2159 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
2160 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
2161 (-[WebHTMLView selectToMark:]):
2162 (-[WebHTMLView swapWithMark:]):
2163 (-[WebHTMLView transpose:]):
2164 (-[WebHTMLView _selectMarkedText]):
2165 (-[WebHTMLView _selectRangeInMarkedText:]):
2166 Adopt new default affinity of NSSelectionAffinityDownstream as of <rdar://problem/3937447>.
2168 2005-02-10 Darin Adler <darin@apple.com>
2170 Reviewed by Harrison.
2172 - fixed <rdar://problem/4002084> Setting ResourceLoadDelegate to nil can cause a crash
2174 * WebView.subproj/WebView.m: (-[WebView _cacheResourceLoadDelegateImplementations]):
2175 Set booleans to either YES or NO, rather than setting them only in the YES case.
2177 2005-02-10 Darin Adler <darin@apple.com>
2179 Reviewed by Harrison.
2181 - fixed <rdar://problem/3991225> Format->Style->Underline menu item does not get checked when selected text is underlined
2183 * WebView.subproj/WebHTMLView.m:
2184 (-[WebHTMLView validateUserInterfaceItem:]): Added tons of additional cases in here for all the
2185 "action" style methods in this class that don't always want to be valid. For the ones where state
2186 makes sense, added the state-checking code too for the menu item case.
2187 (-[WebHTMLView ignoreSpelling:]): Removed unnecessary "editable text only" check since this command
2188 would work fine on a non-editable selection.
2189 (-[WebHTMLView swapWithMark:]): Ditto.
2190 (-[WebHTMLView changeBaseWritingDirection:]): Added. Like toggle, but based on the sender's tag.
2192 2005-02-08 Darin Adler <darin@apple.com>
2194 "Reviewed" by Richard (he told me the file was obsolete).
2196 - got rid of an obsolete file
2198 * Plugins.subproj/npsap.h: Removed.
2199 * copy-webcore-files-to-webkit: Removed npsap.h.
2201 2005-02-09 Richard Williamson <rjw@apple.com>
2203 Fixed <rdar://problem/4000073> non-screen font error on www.worldofwarcraft.com
2205 Reviewed by John Sullivan.
2207 * WebCoreSupport.subproj/WebTextRenderer.m:
2208 (-[WebTextRenderer _smallCapsFont]):
2212 2005-02-07 Chris Blumenberg <cblu@apple.com>
2214 Fixed: <rdar://problem/3993354> Safari claims to put RTFD on the pasteboard, but doesn't, in some cases
2218 * WebView.subproj/WebHTMLView.m:
2219 (-[WebHTMLView _stripAttachmentCharactersFromAttributedString:]): moved
2220 (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]): take cachedAttributedString parameter in case the attributed string was gotten already
2221 (-[WebHTMLView _writeSelectionToPasteboard:]): omit RTFD from the types list when there are no attachments
2223 2005-02-07 David Harrison <harrison@apple.com>
2227 <rdar://problem/3990693> REGRESSION (8A373): ctrl-k now deletes just one character instead of line
2229 * WebView.subproj/WebHTMLView.m:
2230 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
2231 Set the selection so that deleteKeyPressedWithSmartDelete knows what to delete.
2233 2005-02-06 Darin Adler <darin@apple.com>
2237 - fixed <rdar://problem/3963166> PDFView SPI print method is being deprecated, moving to PDFDocument; please update WebKit
2239 * WebView.subproj/WebPDFView.m: (-[WebPDFView printOperationWithPrintInfo:]): Target the document instead of the view.
2241 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes and also moved one translation to be a file-specific
2242 item rather than a file-independent one.
2244 2005-02-05 Chris Blumenberg <cblu@apple.com>
2246 Fixed: <rdar://problem/3991974> REGRESSION: www.jabra.com world location screen does not work
2250 * WebCoreSupport.subproj/WebBridge.m:
2251 (-[WebBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]): use the baseURL from the bridge rather than from the response
2253 2005-02-04 Chris Blumenberg <cblu@apple.com>
2255 Fixed: <rdar://problem/3802781> rtf->html pasteboard conversion using xhtml
2257 Reviewed by kocienda.
2259 * WebView.subproj/WebHTMLView.m:
2260 (+[WebHTMLView _excludedElementsForAttributedStringConversion]): new
2261 (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): call _excludedElementsForAttributedStringConversion
2263 2005-02-04 Chris Blumenberg <cblu@apple.com>
2265 Fixed: <rdar://problem/3832973> copy text from PowerPoint, paste into Blot (or presumably Mail) and get a single missing image icon
2269 * WebView.subproj/WebHTMLView.m:
2270 (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): prefer RTF and RTFD over images just as NSTextView does
2272 2005-02-03 Chris Blumenberg <cblu@apple.com>
2274 Fixed: <rdar://problem/3555137> REGRESSION (125-173): Flash animation can erase parts of chrome (bookmarks bar & tab bar)
2276 convertRect:toView: returns incorrect results inside of viewWillMoveToWindow: with a nil window. Workaround this by catching this case.
2280 * Plugins.subproj/WebBaseNetscapePluginView.m:
2281 (-[WebBaseNetscapePluginView superviewsHaveSuperviews]): new
2282 (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]): clip out the plug-in view when superviewsHaveSuperviews returns NO
2284 2005-02-03 Chris Blumenberg <cblu@apple.com>
2286 Fixed: <rdar://problem/3893513> Sun iPlanet app: when saving to a file it brings up a window with the thing to be saved instead
2290 * WebView.subproj/WebTextView.m:
2291 (+[WebTextView unsupportedTextMIMETypes]): added "text/ldif" to the list of MIME types that our text view doesn't handle
2295 2005-02-03 Chris Blumenberg <cblu@apple.com>
2297 * English.lproj/StringsNotToBeLocalized.txt: updated
2299 2005-02-03 Chris Blumenberg <cblu@apple.com>
2301 Fixed: <rdar://problem/3989611> Evite style "add vCalendar to calendar" do not work
2305 * WebView.subproj/WebTextView.m:
2306 (+[WebTextView unsupportedTextMIMETypes]): added "text/x-vcalendar" to the list of MIME types our text view doesn't handle
2308 2005-02-03 Vicki Murley <vicki@apple.com>
2312 - fix deployment build breakage on Panther
2314 * WebView.subproj/WebHTMLView.m:
2315 (-[WebHTMLView toggleBaseWritingDirection:]):
2317 2005-02-02 John Sullivan <sullivan@apple.com>
2321 - WebKit part of fix for <rdar://problem/3980651> REGRESSION (125-180): Huge number of pages printed from certain page,
2324 This also fixes the problems with printing from GMail, yay!
2326 * WebView.subproj/WebHTMLView.m:
2327 (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
2328 Don't adjust margins for header/footer here, because this is called for each subframe.
2329 (-[WebHTMLView knowsPageRange:]):
2330 Do adjust margins for header/footer here (analogous to WebTextView and WebImageView).
2331 Also, round the page height to an integer here (noticed in passing).
2333 2005-02-02 Chris Blumenberg <cblu@apple.com>
2335 Fixed: <rdar://problem/3986546> Cut, delete, and paste menu items are active when a image is opened in window
2339 * WebView.subproj/WebView.m:
2340 (-[WebView _responderValidateUserInterfaceItem:]): new, has the responder validate the item
2341 (-[WebView validateUserInterfaceItem:]): call VALIDATE for each repsonder selector using FOR_EACH_RESPONDER_SELECTOR macro
2342 (-[WebView _performResponderOperation:with:]): call factored out method _responderForResponderOperations
2343 (-[WebView _responderForResponderOperations]): new, code from _performResponderOperation:with:
2345 2005-02-02 Chris Blumenberg <cblu@apple.com>
2347 Fixed: <rdar://problem/3983628> control-click on WebView is not selecting the word under the cursor (Mail, non-editable WebView)
2351 * WebCoreSupport.subproj/WebBridge.m:
2352 (-[WebBridge selectWordBeforeMenuEvent]): new
2353 * WebView.subproj/WebView.m:
2354 (-[WebView _selectWordBeforeMenuEvent]): new SPI
2355 (-[WebView _setSelectWordBeforeMenuEvent:]): new SPI
2356 * WebView.subproj/WebViewInternal.h:
2357 * WebView.subproj/WebViewPrivate.h:
2359 2005-02-02 Chris Blumenberg <cblu@apple.com>
2361 Fixed: <rdar://problem/3986013> Assertion failure going back after page load error (no apparent problem in nondebug build)
2365 * WebView.subproj/WebDataSource.m:
2366 (-[WebDataSource _setPrimaryLoadComplete:]): don't set the data source data when the main client is nil
2368 2005-02-02 Ken Kocienda <kocienda@apple.com>
2374 <rdar://problem/3823109> WebKit should support -toggleBaseWritingDirection: (bidi editing support)
2376 * WebView.subproj/WebHTMLView.m:
2377 (-[WebHTMLView _applyParagraphStyleToSelection:withUndoAction:]): New function that calls through to
2378 new feature that allows callers to force all properties in a style to be applied as block styles.
2379 (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]): Removed FIXME comment for something that has been fixed.
2380 (-[WebHTMLView toggleBaseWritingDirection:]): Implemented.
2382 2005-02-01 Richard Williamson <rjw@apple.com>
2384 Fixed <rdar://problem/3977727> WebKit should use new SPI to support faster GIF rendering
2386 Note: This REQUIRES build >= 3A362 when building on Tiger.
2390 * WebCoreSupport.subproj/WebImageData.m:
2391 (-[WebImageData _imageSourceOptions]):
2395 2005-02-01 Richard Williamson <rjw@apple.com>
2397 Added new SPI for <rdar://problem/3967063> need spi on WebView to turn of lcd text for Dashboard
2401 * WebCoreSupport.subproj/WebTextRenderer.m:
2403 * WebView.subproj/WebView.m:
2404 (-[WebView drawRect:]):
2405 (-[WebView _dashboardBehavior:]):
2406 (+[WebView _setShouldUseFontSmoothing:]):
2407 (+[WebView _shouldUseFontSmoothing]):
2408 * WebView.subproj/WebViewInternal.h:
2409 * WebView.subproj/WebViewPrivate.h:
2411 2005-01-31 Chris Blumenberg <cblu@apple.com>
2413 Fixed: <rdar://problem/3949806> REGRESSION: Source window fails to refresh correctly on reload
2415 The data method was being called on WebDataSource before the data was set. This fix makes WebDataSource set the data before releasing the main client instead of waiting for the main client to set it when it is dealloced.
2419 * WebView.subproj/WebDataSource.m:
2420 (-[WebDataSource _setData:]): moved within file
2421 (-[WebDataSource _setPrimaryLoadComplete:]): call _setData: with the data from the main client before letting go of the main client
2422 * WebView.subproj/WebDataSourcePrivate.h:
2423 * WebView.subproj/WebMainResourceClient.m:
2424 (-[WebMainResourceClient releaseResources]): removed call to _setData: since the data source may need the data before releaseResources is called
2426 2005-01-31 Chris Blumenberg <cblu@apple.com>
2428 Fixed: <rdar://problem/3946285> Seed: Safari crashed by selecting all at internet-moebel.com
2432 * WebView.subproj/WebHTMLView.m:
2433 (-[WebHTMLView _hitViewForEvent:]): new, factored hit test hack to this method
2434 (-[WebHTMLView _updateMouseoverWithEvent:): call _hitViewForEvent:
2435 (-[WebHTMLView acceptsFirstMouse:]): call _setMouseDownEvent: and _isSelectionEvent: on the hit HTMLView or else when it's asked to drag it will assert
2436 (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): ditto
2438 2005-01-31 David Harrison <harrison@apple.com>
2442 <rdar://problem/3961239> AX Setting AXFocused on AXScrollArea of AXWebArea will cause keyboard selection change
2444 * WebView.subproj/WebHTMLView.m:
2445 (-[WebHTMLView maintainsInactiveSelection]):
2446 Keep the selection when the new first respomder is our own scrollview, in both editable and non-editaqble content.
2448 2005-01-31 Jens Alfke <jens@apple.com>
2452 - Fixed <rdar://problem/3903199> REGRESSION: Large background patterns slide around while loading
2454 * WebCoreSupport.subproj/WebImageData.m:
2456 (-[WebImageData tileInRect:fromPoint:context:]):
2458 2005-01-30 Darin Adler <darin@apple.com>
2462 - fixed <rdar://problem/3965265> Safari displays HTML as source when default encoding is Hebrew (due to direction overrides added by encoding converter)
2464 * WebView.subproj/WebPreferencesPrivate.h: Added _systemCFStringEncoding, and changed
2465 _setInitialDefaultTextEncodingToSystemEncoding to be a class method.
2466 * WebView.subproj/WebPreferences.m:
2467 (+[WebPreferences _systemCFStringEncoding]): Added. New SPI to be used by Safari. Broken out of
2468 _setInitialDefaultTextEncodingToSystemEncoding, but also added cases for MacArabic and MacHebrew.
2469 (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Refactor to use _systemCFStringEncoding.
2471 2005-01-28 Jens Alfke <jens@apple.com>
2473 Reviewed by Richard.
2475 <rdar://problem/3727680> printing some page with WebKit generates a PDF with a 1x1 image with soft mask (causes Acrobat to hang during print spooling)
2477 Detect 1x1 images, extract and cache color of single pixel, reduce draw and tile operations to a color fill (or to a no-op if the pixel is clear.)
2479 * WebCoreSupport.subproj/WebImageData.h:
2480 * WebCoreSupport.subproj/WebImageData.m:
2481 (-[WebImageData _invalidateImages]):
2482 (-[WebImageData _checkSolidColor:]):
2483 (-[WebImageData _cacheImages:allImages:]):
2484 (-[WebImageData _fillSolidColorInRect:compositeOperation:context:]):
2485 (-[WebImageData tileInRect:fromPoint:context:]):
2487 2005-01-28 David Harrison <harrison@apple.com>
2491 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
2493 Use AppKit SPI _accessibilityParentForSubview to return KWQAccObject parent of AppKit AX object.
2495 * WebView.subproj/WebHTMLView.m:
2496 (-[WebHTMLView _accessibilityParentForSubview:]):
2499 2005-01-28 Chris Blumenberg <cblu@apple.com>
2501 WebKit side of: <rdar://problem/3951283> can view pages from the back/forward cache that should be disallowed by Parental Controls
2505 * WebView.subproj/WebDefaultPolicyDelegate.m:
2506 (-[WebDefaultPolicyDelegate webView:shouldGoToHistoryItem:]): new private delegate method
2507 * WebView.subproj/WebFrame.m:
2508 (-[WebFrame _goToItem:withLoadType:]): call new delegate method
2509 * WebView.subproj/WebPolicyDelegatePrivate.h:
2511 2005-01-26 Maciej Stachowiak <mjs@apple.com>
2513 Reviewed by Darin, Hyatt and Ken.
2515 <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
2517 * WebView.subproj/WebHTMLView.m:
2518 (-[WebHTMLView _styleFromFontAttributes:]): Use new -khtml-text-decorations-in-effect
2520 (-[WebHTMLView _styleForAttributeChange:]): likewise
2521 (-[WebHTMLView underline:]): likewise
2523 2005-01-27 Ken Kocienda <kocienda@apple.com>
2527 * WebView.subproj/WebHTMLView.m:
2528 (-[WebHTMLView _handleKillRing:prepend:]): New helper function. Code factored out from
2529 _deleteRange:killRing:prepend:smartDeleteOK:isTypingAction:.
2530 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:isTypingAction:]): No longer takes
2531 unused preflight argument. Now takes new isTypingAction argument. Uses isTypingAction to
2532 determine which flavor of delete command to call.
2533 (-[WebHTMLView _deleteSelection]): No longer passes unused preflight argument. Now passes new isTypingAction argument.
2534 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Rearranged code to call
2535 correct flavor of delete command, based on whether typing should be preserved. Some other cleanups.
2536 (-[WebHTMLView deleteForward:]): Add _isEditable check.
2537 (-[WebHTMLView deleteBackward:]): Now calls _deleteWithDirection instead of having unique behavior different
2538 from forward delete.
2539 (-[WebHTMLView deleteWordForward:]): Add new isTypingAction flag to _deleteWithDirection call.
2540 (-[WebHTMLView deleteWordBackward:]): Ditto.
2541 (-[WebHTMLView deleteToBeginningOfLine:]): Ditto.
2542 (-[WebHTMLView deleteToEndOfLine:]): Ditto.
2543 (-[WebHTMLView deleteToBeginningOfParagraph:]): Ditto.
2544 (-[WebHTMLView deleteToEndOfParagraph:]): Ditto.
2545 (-[WebHTMLView deleteToMark:]): Ditto.
2549 2005-01-27 Chris Blumenberg <cblu@apple.com>
2551 Fixed: <rdar://problem/3973272> REGRESSION: Safari uses QT plugin to display PNG images
2555 * Plugins.subproj/WebBasePluginPackage.m: use renamed QT bundle ID
2557 2005-01-26 Darin Adler <darin@apple.com>
2561 - fixed <rdar://problem/3829517> WebView still draws white when setDrawsBackground set to NO and no content loaded yet
2563 * WebView.subproj/WebFrameView.m: (-[WebFrameView drawRect:]): Check drawsBackground, and don't
2564 draw the white "no document" background if it's NO. This fixes things for frames with no document.
2565 * WebView.subproj/WebImageView.m: (-[WebImageView drawRect:]): Same as above. This fixes things
2566 for frames with just an image.
2567 * WebView.subproj/WebFrame.m: (-[WebFrame _updateDrawsBackground]): Call setDrawsBackground: on the
2568 document view if it implements it. This fixes things for frames with plain text.
2570 2005-01-25 John Sullivan <sullivan@apple.com>
2574 - WebKit part of fix for: <rdar://problem/3970670> Text context menu
2575 in WebKit needs "Look Up in Dictionary" item
2577 * WebView.subproj/WebDefaultContextMenuDelegate.m:
2578 (localizedMenuTitleFromAppKit):
2579 return English string in the case where AppKit bundle is found but doesn't
2580 contain the expected string. This case will be hit by people testing with
2582 (-[WebDefaultUIDelegate menuItemWithTag:]):
2583 create Look Up in Dictionary item
2584 (-[WebDefaultUIDelegate contextMenuItemsForElement:]):
2585 add Look Up in Dictionary item and separator
2586 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:]):
2589 * WebView.subproj/WebHTMLView.m:
2590 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
2591 new method, handles bringing up the Dictionary window. Includes FIXMEs
2592 for a couple of the known loose ends.
2593 (-[WebHTMLView validateUserInterfaceItem:]):
2594 handle Look Up in Dictionary item like the other new items
2596 * WebView.subproj/WebUIDelegatePrivate.h:
2597 added SPI constant for Look Up in Dictionary menu item
2599 2005-01-24 Maciej Stachowiak <mjs@apple.com>
2601 Fixed Panther build (missing ifdef)
2603 * WebView.subproj/WebDefaultContextMenuDelegate.m:
2605 2005-01-24 John Sullivan <sullivan@apple.com>
2609 - WebKit part of fix for <rdar://problem/3960231> Text context menu in WebKit needs Spotlight and Google items
2611 * WebView.subproj/WebDefaultContextMenuDelegate.m:
2612 (localizedMenuTitleFromAppKit):
2613 new function, gets localized string from AppKit so we can avoid adding localized
2614 strings to WebKit at this late date in Tiger. Returns the non-localized English
2615 string if we can't find the localized string in AppKit.
2616 (-[WebDefaultUIDelegate menuItemWithTag:]):
2617 handle the two new menu items by tag name
2618 (-[WebDefaultUIDelegate contextMenuItemsForElement:]):
2619 add menu items for Search in Google and Search in Spotlight to selected-text menu item
2620 for the noneditable case
2621 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:]):
2622 add menu items for Search in Google and Search in Spotlight to selected-text menu item
2623 for the editable case
2625 * WebView.subproj/WebHTMLView.m:
2626 (-[WebHTMLView _searchWithGoogleFromMenu:]):
2627 implement this menu item action method, using same method name and implementation as NSTextView
2628 (-[WebHTMLView _searchWithSpotlightFromMenu:]):
2629 implement this menu item action method, using same basic implementation as NSTextView
2630 (-[WebHTMLView validateUserInterfaceItem:]):
2631 validate new menu items
2633 * WebView.subproj/WebUIDelegatePrivate.h:
2634 define new tags for new menu items
2636 * English.lproj/StringsNotToBeLocalized.txt:
2637 updated for these changes
2639 2005-01-24 Darin Adler <darin@apple.com>
2641 * WebView.subproj/WebDataSource.m: (+[WebDataSource _repTypesAllowImageTypeOmission:]):
2642 Do the same check as for view types, so the representation types are consistent.
2644 2005-01-24 Darin Adler <darin@apple.com>
2648 - fixed <rdar://problem/3791158> REGRESSION (Mail): copyFont: and pasteFont: copy and paste only the NSFont, not other attributes
2650 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _styleFromFontAttributes:]): Added the last
2651 few loose ends here: strikethrough and underline.
2653 - fixed <rdar://problem/3967393> add a user default that lets you turn off WebKit PDF support
2655 * WebView.subproj/WebFrameView.m: (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
2656 Leave the PDF-handling classes out of the dictionary if the secret default is set.
2658 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
2660 2005-01-20 Darin Adler <darin@apple.com>
2662 Reviewed by Kristin Forster.
2664 - fixed <rdar://problem/3964972> update _initWithCGSEvent:eventRef: call in mouse moved workaround (breaks cursors in Carbon WebKit applications)
2666 * Carbon.subproj/HIWebView.m: (MouseMoved): Instead of munging the event record's window number directly
2667 before calling _initWithCGSEvent, on Tiger we call _eventRelativeToWindow on the event after creating it.
2668 Also added a check so that with Macromedia Contribute's workaround in place we don't do anything at all
2669 to the event. Tested with both Contribute and CarbonWeb.
2671 * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
2673 2005-01-20 Richard Williamson <rjw@apple.com>
2675 Fixed <rdar://problem/3815672> REGRESSION (Mail): Japanese text cannot be made bold
2677 The AppKit's font substitution API doesn't match font traits!
2678 It only find fonts that contain the appropriate glyphs. This
2679 patch attempts to find the best variation within a family.
2683 * WebCoreSupport.subproj/WebTextRenderer.m:
2684 (-[WebTextRenderer _substituteFontForString:families:]):
2688 2005-01-20 Ken Kocienda <kocienda@apple.com>
2694 <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with "size up" and "size down" NSFontManager changes
2696 * WebView.subproj/WebHTMLView.m:
2697 (-[WebHTMLView _addToStyle:fontA:fontB:]): This is the WebKit side of the fix. Replaced unimplemented code blocks
2698 with FIXME's in them for make bigger and make smaller with real working code.
2700 2005-01-19 David Hyatt <hyatt@apple.com>
2702 Fix for 3513067, spaces being lost when RTL text is rendered. Make sure not to allow hangers or spaces
2707 * WebCoreSupport.subproj/WebTextRenderer.m:
2708 (-[WebTextRenderer _createATSUTextLayoutForRun:style:]):
2710 2005-01-19 Darin Adler <darin@apple.com>
2714 - fixed <rdar://problem/3962559> stopAnimationsInView leaks after cvs-base
2716 * WebCoreSupport.subproj/WebImageData.m: (+[WebImageData stopAnimationsInView:]): add a release
2718 2005-01-19 Chris Blumenberg <cblu@apple.com>
2720 Fixed: <rdar://problem/3961809> plug-in code attempts to load empty URL
2724 * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
2725 (-[WebNetscapePluginEmbeddedView didStart]): don't start load if URL is empty
2727 2005-01-17 Darin Adler <darin@apple.com>
2729 * DOM.subproj/DOMPrivate.h: Check in generated file.
2731 2005-01-17 Darin Adler <darin@apple.com>
2733 Reviewed by John and Richard.
2735 - fixed <rdar://problem/3907453> printing a multi-page PDF document from Safari doesn't produce correct output
2737 * WebView.subproj/WebFrameViewPrivate.h: Added.
2738 * WebView.subproj/WebFrameView.m:
2739 (-[WebFrameView canPrintHeadersAndFooters]): Added. Returnes NO for documents that can't print headers or footers,
2740 and delegates to the document view to answer the question. Defaults to NO, since only a view that actively does
2741 the work is compatible with our header and footer code.
2742 (-[WebFrameView printOperationWithPrintInfo:]): Added. Returns an NSPrintOperation set up for printing. The reason
2743 we return this rather than an NSView is that in the PDFView case, the print info is changed around before creating
2744 the NSPrintOperation, and also the PDFKit SPI works this way.
2746 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView canPrintHeadersAndFooters]): Added. Returns YES.
2747 * WebView.subproj/WebImageView.m: (-[WebImageView canPrintHeadersAndFooters]): Ditto.
2748 * WebView.subproj/WebTextView.m: (-[WebTextView canPrintHeadersAndFooters]): Ditto.
2750 * WebView.subproj/WebPDFView.m:
2751 (-[WebPDFView canPrintHeadersAndFooters]): Added. Returns NO.
2752 (-[WebPDFView printOperationWithPrintInfo:]): Added. Calls getPrintOperationForPrintInfo: autoRotate:YES on the PDFView.
2754 * WebKit.pbproj/project.pbxproj: Added WebFrameViewPrivate.h as a new private header.
2756 2005-01-13 Chris Blumenberg <cblu@apple.com>
2758 Fixed: <rdar://problem/3932107> Safari does not load QT Cocoa plug-in if the WebPluginMIMETypes key is not in the info.plist
2760 Fixing this bug required that we allow WebKit plug-ins (as well as Netscape plug-ins) support BP_CreatePluginMIMETypesPreferences
2761 which allows plug-ins create an auxiliary MIME types file.
2765 * Plugins.subproj/WebBasePluginPackage.h:
2766 * Plugins.subproj/WebBasePluginPackage.m:
2767 (+[WebBasePluginPackage preferredLocalizationName]): moved from WebNetscapePluginPackage
2768 (-[WebBasePluginPackage pListForPath:createFile:]): ditto
2769 (-[WebBasePluginPackage getPluginInfoFromPLists]): ditto
2770 (-[WebBasePluginPackage isLoaded]): return isLoaded ivar
2771 (-[WebBasePluginPackage load]): if loaded, get BP_CreatePluginMIMETypesPreferences symbol
2772 * Plugins.subproj/WebNetscapePluginPackage.h:
2773 * Plugins.subproj/WebNetscapePluginPackage.m:
2774 (-[WebNetscapePluginPackage load]): call super when done so BP_CreatePluginMIMETypesPreferences can be initialized
2775 * Plugins.subproj/WebPluginPackage.m:
2776 (-[WebPluginPackage initWithPath:]): call getPluginInfoFromPLists
2777 (-[WebPluginPackage load]): call super when done so BP_CreatePluginMIMETypesPreferences can be initialized
2779 2005-01-13 Richard Williamson <rjw@apple.com>
2781 Fixed <rdar://problem/3952809> WebJavaPlugIn.h comments need method name corrected (webPlugInCallJava)
2785 * Plugins.subproj/WebJavaPlugIn.h:
2789 2005-01-13 Vicki Murley <vicki@apple.com>
2793 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
2795 * WebKit.pbproj/project.pbxproj: bump "2004" to "2005"
2797 2005-01-13 Richard Williamson <rjw@apple.com>
2799 Fixed <rdar://problem/3951911> REGRESSION: Animated GIF images with loop counts no longer update
2801 Draw last image after animation loop terminates. (We
2802 were drawing the image at index+1, which doesn't exist!)
2806 * WebCoreSupport.subproj/WebImageData.m:
2807 (-[WebImageData _nextFrame:]):
2809 2005-01-13 Richard Williamson <rjw@apple.com>
2811 Fixed <rdar://problem/3952084> REGRESSION: Links at projectseven.com now draw and update incorrectly during hover
2813 Turn off use of new CGContextStrokeLineSegments API. We should
2814 turn back on when 3952944 is fixed.
2818 * WebCoreSupport.subproj/WebTextRenderer.m:
2819 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
2821 2005-01-13 Chris Blumenberg <cblu@apple.com>
2823 Fixed: <rdar://problem/3937663> repro assertion failure and crash dragging image that has PDF source
2827 * Misc.subproj/WebNSViewExtras.m:
2828 (-[NSView _web_dragImage:rect:event:pasteboard:source:offset:]): if [WebImageRenderer image] returns nil, fallback to code that uses a file icon as the drag image
2829 * WebCoreSupport.subproj/WebImageRendererFactory.m:
2830 (-[WebImageRendererFactory supportedMIMETypes]): removed code that omits PDF and PostScript from the list since this omission is only needed in WebImageView
2831 * WebView.subproj/WebImageView.m:
2832 (+[WebImageView supportedImageMIMETypes]): added code that omits PDF and PostScript since we don't want WebImageView to render these types
2834 2005-01-10 Maciej Stachowiak <mjs@apple.com>
2838 <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
2840 * WebCoreSupport.subproj/WebTextRenderer.m:
2841 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]): Changed to support
2842 underline thickness. Also added a bit of a hack here to move thickness 2 underlines down by
2843 .5 pixels, since the rendering engine can't give a fractional pixel offset.
2844 * WebView.subproj/WebHTMLView.m:
2845 (-[WebHTMLView validAttributesForMarkedText]): Support underline, underline color and marked
2846 clause attributes. Others that NSText supports are unimplemented for now.
2847 (-[WebHTMLView firstRectForCharacterRange:]): Remove needless logging.
2848 (-[WebHTMLView unmarkText]): Updated for new WebCore SPI.
2849 (-[WebHTMLView _extractAttributes:ranges:fromAttributedString:]): New method to pull the attributes
2850 and ranges out of an attributed string.
2851 (-[WebHTMLView setMarkedText:selectedRange:]): Extract attributes and pass to WebCore.
2852 (-[WebHTMLView insertText:]): Add comment noting that we don't really handle attributed strings
2855 2005-01-12 Darin Adler <darin@apple.com>
2859 - fixed <rdar://problem/3848257> WebView will draw more than AppKit asks it to, so views behind won't redraw enough (transparent WebView)
2861 * WebView.subproj/WebHTMLView.m:
2862 (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]): As recommended by Troy Stephens, do the
2863 layouts here in this call, since it's before propagating the dirty rects to our ancestors.
2864 This fixes the bug, but we only do it if the WebView is not opaque, because otherwise we can
2865 optimize by only doing layouts you really need, and doing them later on is safe because we
2866 know we don't need to draw any of the views behind us.
2867 (-[WebHTMLView _layoutIfNeeded]): Added. Factored out from the method below.
2868 (-[WebHTMLView _web_layoutIfNeededRecursive]): Added. Like the other "layout if needed" call,
2870 (-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]): Factored out the guts into the
2871 _layoutIfNeeded method above. Otherwise unchanged.
2872 (-[NSView _web_layoutIfNeededRecursive]): Added.
2874 * WebView.subproj/WebFrame.m: (-[WebFrame _updateDrawsBackground]): Call setDrawsBackground:NO
2875 on the scroll view when changing the frame to no longer be in "draws background" mode. This
2876 is needed because the frame manages the "draws background" mode of the scroll view. It won't
2877 have any effect if you call setDrawsBackground:NO before starting to use a WebView, but without
2878 it calling setDrawsBackground:NO later won't have an immediate effect (easily visible in Safari).
2879 This was hidden before because the HTML view was filling with transparent color, which blew away
2880 the fill that was done by NSScrollView.
2882 - fixed <rdar://problem/3921129> reproducible crash at www.funnychristmas.com in CFSet manipulation in WebImageData
2884 * WebCoreSupport.subproj/WebImageData.m:
2885 (-[WebImageData _imageSourceOptions]): Changed types so we don't need a cast.
2886 (+[WebImageData stopAnimationsInView:]): Instead of building a set of sets, by putting in the sets with addObject,
2887 build a single set using unionSet, and then iterate the objects instead of having to iterate the sets and then the
2888 objects in each set. The old code ended up sharing the sets with the live code, when the whole idea was to gather
2889 all the renderers because the process of stopping modifies the active sets.
2891 2005-01-12 Richard Williamson <rjw@apple.com>
2893 Fixed <rdar://problem/3926825> Safari ignores GIF loop count
2895 Get loop count from file properties, not image properties.
2897 Reviewed by Ken Kocienda.
2899 * WebCoreSupport.subproj/WebImageData.h:
2900 * WebCoreSupport.subproj/WebImageData.m:
2901 (-[WebImageData _commonTermination]):
2902 (-[WebImageData fileProperties]):
2903 (-[WebImageData _floatProperty:type:at:]):
2904 (-[WebImageData _floatFileProperty:type:]):
2905 (-[WebImageData _repetitionCount]):
2907 2005-01-11 Chris Blumenberg <cblu@apple.com>
2909 Fixed: <rdar://problem/3934749> assertion failure in WebBaseNetscapePluginView loading movie
2913 * Plugins.subproj/WebBaseNetscapePluginView.m:
2914 (-[WebBaseNetscapePluginView start]): call canStart before asserting about the webView
2916 2005-01-11 John Sullivan <sullivan@apple.com>
2920 - fixed <rdar://problem/3446838> REGRESSION (Mail): text decorations don't print
2921 (e.g. <strike>, underline)
2923 * WebCoreSupport.subproj/WebTextRenderer.m:
2924 (-[WebTextRenderer drawLineForCharacters:yOffset:withWidth:withColor:]):
2925 This bottleneck routine for drawing a line was setting the linewidth to 0 when
2926 the graphics context was not drawing to the screen. Thus, no lines. Now links
2927 are underlined when printing from Safari (as well as Mail).
2929 2005-01-11 Richard Williamson <rjw@apple.com>
2931 Fixed 3949145. CG has a much faster API for drawing lines.
2932 Switched over to that new API (CGContextStrokeLineSegments).
2934 Reviewed by John Sullivan.
2936 * WebCoreSupport.subproj/WebTextRenderer.m:
2937 (-[WebTextRenderer drawLineForCharacters:yOffset:withWidth:withColor:]):
2939 2005-01-10 Chris Blumenberg <cblu@apple.com>
2941 Fixed: <rdar://problem/3948862> REGRESSION: missing images when RTFD is pasted into editable WebView
2943 This problem occurred because we were creating image elements before creating corresponding image resources. The fix is to have AppKit call us back to create the resources before it creates the elements.
2947 * WebView.subproj/WebHTMLView.m:
2948 (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): don't deal with subresources since that's now done by the following method
2949 (-[WebHTMLView resourceForData:preferredFilename:]): new handler method called by AppKit
2953 2005-01-06 David Harrison <harrison@apple.com>
2955 Reviewed by Dave Hyatt
2957 <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work.
2959 * WebView.subproj/WebHTMLView.m:
2960 (-[WebHTMLView accessibilityFocusedUIElement]):
2961 Implement this so that AppKit can use it from NSAccessibilityHandleFocusChanged.
2963 2005-01-05 Chris Blumenberg <cblu@apple.com>
2965 Fixed: <rdar://problem/3936865> REGRESSION: canvas.drawImage no longer scales properly
2969 * WebCoreSupport.subproj/WebImageData.m: use the height of the inRect instead of the fromRect when setting the origin of the context
2971 2005-01-04 Chris Blumenberg <cblu@apple.com>
2973 Fixed: <rdar://problem/3928329> WebKit should pass nil for "language" to checkSpellingOfString:
2975 Reviewed by kocienda.
2977 * WebView.subproj/WebHTMLView.m:
2978 (-[WebHTMLView _isSelectionMisspelled]): pass nil not @"" for language
2980 2004-12-21 Maciej Stachowiak <mjs@apple.com>
2984 <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another
2986 Implement a security check on name frame visbility. This is the
2987 same rule as mozilla. You can only target frames by name if you
2988 are in the same window, have the same domain as the frame or an
2989 ancestor, or if it's a top level window have the same domain as
2992 * WebView.subproj/WebFrame.m:
2993 (-[WebFrame _shouldAllowAccessFrom:]):
2994 (-[WebFrame _descendantFrameNamed:sourceFrame:]):
2995 (-[WebFrame findFrameNamed:]):
2996 * WebView.subproj/WebFramePrivate.h:
2997 * WebView.subproj/WebView.m:
2998 (-[WebView _findFrameInThisWindowNamed:sourceFrame:]):
2999 (-[WebView _findFrameNamed:sourceFrame:]):
3000 * WebView.subproj/WebViewPrivate.h:
3006 2004-12-20 Richard Williamson <rjw@apple.com>
3008 Add call to new API. ImageIO deprecated some older (although
3009 quite new!) API. This caused us to fail to build on 337 or later.
3011 Developers wanting to build on older versions of Tiger must define
3012 USE_DEPRECATED_IMAGESOURCE_API in WebImageData.m.
3016 * WebCoreSupport.subproj/WebImageData.m:
3017 (-[WebImageData propertiesAtIndex:]):
3019 2004-12-20 Richard Williamson <rjw@apple.com>
3021 Don't call Tiger SPI on Panther.
3025 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3026 (+[WebTextRendererFactory createSharedFactory]):
3028 2004-12-20 Richard Williamson <rjw@apple.com>
3030 Fixed <rdar://problem/3884448> WebKit should turn on CG local font cache
3032 Enable mutli-tier font caching. We should see a performance boost with this
3037 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3038 (+[WebTextRendererFactory createSharedFactory]):
3040 2004-12-20 Richard Williamson <rjw@apple.com>
3042 Fix image decoding to separately decode image meta data from actual image bits. I
3043 incorrectly consolidated decode of meta data and image bits resulting in a huge
3044 performance regression.
3046 Double size of WebCore cache on lower end machines. On the PLT run on machines with
3047 256MB of memory, too many images were being evicted, causing a re-decode on the PLT.
3048 Upping the lower limit of the cache size ensure that no images are evicted (this
3049 goes hand-in-hand with the change to the minimum object size from 32K to 40K).
3053 * WebCoreSupport.subproj/WebImageData.h:
3054 * WebCoreSupport.subproj/WebImageData.m:
3055 (+[WebImageData initialize]):
3056 (-[WebImageData _commonTermination]):
3057 (-[WebImageData _invalidateImages]):
3058 (-[WebImageData _invalidateImageProperties]):
3059 (-[WebImageData imageAtIndex:]):
3060 (-[WebImageData propertiesAtIndex:]):
3061 (-[WebImageData _cacheImages:allImages:]):
3062 (-[WebImageData decodeData:isComplete:callback:]):
3063 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
3064 * WebView.subproj/WebPreferences.m:
3065 (+[WebPreferences initialize]):
3067 2004-12-20 Richard Williamson <rjw@apple.com>
3069 Fixed build problem caused by change to ImageIO API.
3073 * WebCoreSupport.subproj/WebImageData.m:
3075 2004-12-19 Darin Adler <darin@apple.com>
3079 - some garbage collection fixes
3081 * Misc.subproj/WebNSObjectExtras.h: (WebCFAutorelease): Replaced the old WebNSRetainCFRelease with this
3082 much-easier-to-understand function cribbed from what David Harrison did in WebCore.
3084 * Misc.subproj/WebKitNSStringExtras.m: (+[NSString _web_encodingForResource:]): Use CFRelease here to
3085 get rid of an unnecessary use of WebNSRetainCFRelease.
3086 * Misc.subproj/WebNSURLExtras.m:
3087 (+[NSURL _web_URLWithData:relativeToURL:]): Use WebCFAutorelease instead of WebNSRetainCFRelease and autorelease.
3088 (-[NSURL _web_URLWithLowercasedScheme]): Ditto.
3089 (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Use WebCFAutorelease here; the old code would not
3090 work correctly under GC.
3091 * Plugins.subproj/WebNetscapePluginPackage.m: (+[WebNetscapePluginPackage preferredLocalizationName]):
3092 Use WebCFAutorelease here; the old code would not work correctly under GC.
3094 2004-12-18 Chris Blumenberg <cblu@apple.com>
3096 Fixed: <rdar://problem/3766915> PDF content needs search to work
3098 Reviewed by kevin, john.
3100 * WebView.subproj/WebPDFView.m:
3101 (-[WebPDFView searchFor:direction:caseSensitive:wrap:]): implemented
3102 (-[WebPDFView takeFindStringFromSelection:]): new
3103 (-[WebPDFView jumpToSelection:]): new
3104 (-[WebPDFView validateUserInterfaceItem:]): new
3106 2004-12-17 Richard Williamson <rjw@apple.com>
3108 Make image decoding as lazy as possible for non threaded case; in some cases
3109 can avoid unnecessary decoding work.
3113 * WebCoreSupport.subproj/WebImageData.h:
3114 * WebCoreSupport.subproj/WebImageData.m:
3115 (-[WebImageData imageAtIndex:]):
3116 (-[WebImageData propertiesAtIndex:]):
3117 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
3119 2004-12-16 John Sullivan <sullivan@apple.com>
3123 One of the assertions from my previous checkin fired, so
3124 I made this code more robust.
3126 * WebCoreSupport.subproj/WebBridge.m:
3127 (-[WebBridge _preferences]):
3128 new helper method, returns global preferences if webView is nil,
3129 otherwise returns webView's preferences
3130 (-[WebBridge getObjectCacheSize]):
3131 use new helper method, remove now-unnecessary assert
3132 (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
3135 2004-12-16 John Sullivan <sullivan@apple.com>
3139 - fixed <rdar://problem/3913523> Mail needs SPI for adding tooltips to links
3140 - cleaned up some calls to +[WebPreferences standardPreferences] that should
3141 have been using -[WebView preferences]
3143 This adds a (currently SPI-only) new feature that shows the URL of the link
3144 under the mouse in a toolTip. I tested this in Safari, but we're adding this
3145 feature for Mail, and Safari won't use it (unless of course you know the
3146 magic defaults command)
3148 * Plugins.subproj/WebBaseNetscapePluginView.m:
3149 (-[WebBaseNetscapePluginView start]):
3150 use -[WebView preferences] instead of +[WebPreferences standardPreferences]
3152 * WebCoreSupport.subproj/WebBridge.m:
3153 (-[WebBridge getObjectCacheSize]):
3155 (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
3158 * WebView.subproj/WebBaseResourceHandleDelegate.m:
3159 (-[WebBaseResourceHandleDelegate willCacheResponse:]):
3162 * WebView.subproj/WebFrame.m:
3163 (-[WebFrame _transitionToCommitted:]):
3165 (-[WebFrame _loadItem:withLoadType:]):
3168 * WebView.subproj/WebHTMLViewInternal.h:
3169 private struct now keeps ivar for cached value of showsURLsInToolTips
3170 so it doesn't have look it up in preferences a zillion times
3172 * WebView.subproj/WebHTMLView.m:
3173 (-[WebHTMLView _updateMouseoverWithEvent:]):
3174 if private->showsURLsInToolTips is true, set the toolTip from the URL.
3175 Fall back to showing the title attribute in case some element has a title
3176 attribute but no URL.
3177 (-[WebHTMLView _mayStartDragAtEventLocation:]):
3178 use -[WebView preferences] instead of +[WebPreferences standardPreferences]
3179 (-[WebHTMLView _resetCachedWebPreferences:]):
3180 get a fresh value for private->showsURLsInToolTips
3181 (-[WebHTMLView initWithFrame:]):
3182 call _resetCachedWebPreferences the first time, and listen for WebPreferencesChanged notifications
3183 (-[WebHTMLView _handleStyleKeyEquivalent:]):
3184 use -[WebView preferences] instead of +[WebPreferences standardPreferences]
3186 * WebView.subproj/WebPreferenceKeysPrivate.h:
3187 added WebKitShowsURLsInToolTipsPreferenceKey
3189 * WebView.subproj/WebPreferences.m:
3190 (+[WebPreferences initialize]):
3191 initialize WebKitShowsURLsInToolTipsPreferenceKey to 0
3192 (-[WebPreferences showsURLsInToolTips]):
3193 return WebKitShowsURLsInToolTipsPreferenceKey value
3194 (-[WebPreferences setShowsURLsInToolTips:]):
3195 set WebKitShowsURLsInToolTipsPreferenceKey value
3197 * WebView.subproj/WebPreferencesPrivate.h:
3198 add declarations for showsURLsInToolTips and setter
3200 * WebView.subproj/WebTextView.m:
3201 (-[WebTextView _preferences]):
3202 new helper method that gets preferences from webView if there is a webView,
3203 otherwise gets global preferences
3204 (-[WebTextView setFixedWidthFont]):
3205 use new helper method rather than always using global preferences
3206 (-[WebTextView initWithFrame:]):
3207 observe WebPreferencesChangedNotification instead of unnecessarily general
3208 NSUserDefaultsChangedNotification
3210 2004-12-14 John Sullivan <sullivan@apple.com>
3214 - rest of WebKit fix for <rdar://problem/3790011> undoable operations all say "Undo"
3215 in the menu, no specific action names
3217 I only know of one loose end currently, which I wrote up as <rdar://problem/3920971> Edit menu
3218 says "Undo Change Attributes" when it should say "Undo Set Color", from font panel
3220 * WebView.subproj/WebHTMLView.m:
3221 (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
3222 use WebUndoActionSetColor when dragging color swatch
3223 (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
3224 new WebUndoAction parameter, passed across bridge
3225 (-[WebHTMLView _toggleBold]):
3226 use WebUndoActionSetFont
3227 (-[WebHTMLView _toggleItalic]):
3228 use WebUndoActionSetFont
3229 (-[WebHTMLView pasteFont:]):
3230 use WebUndoActionPasteFont
3231 (-[WebHTMLView changeFont:]):
3232 use WebUndoActionSetFont
3233 (-[WebHTMLView changeAttributes:]):
3234 use WebUndoActionChangeAttributes
3235 (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
3236 new method, returns WebUndoActionSetBackgroundColor or WebUndoActionSetColor
3237 (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
3238 now calls _undoActionFromColorPanelWithSelector
3239 (-[WebHTMLView changeColor:]):
3240 use WebUndoActionSetColor
3241 (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]):
3242 new WebUndoAction parameter, passed through
3243 (-[WebHTMLView alignCenter:]):
3244 use WebUndoActionCenter
3245 (-[WebHTMLView alignJustified:]):
3246 use WebUndoActionJustify
3247 (-[WebHTMLView alignLeft:]):
3248 use WebUndoActionAlignLeft
3249 (-[WebHTMLView alignRight:]):
3250 use WebUndoActionAlignRight
3251 (-[WebHTMLView subscript:]):
3252 use WebUndoActionAlignSubscript
3253 (-[WebHTMLView superscript:]):
3254 use WebUndoActionAlignSuperscript
3255 (-[WebHTMLView unscript:]):
3256 use WebUndoActionAlignUnscript
3257 (-[WebHTMLView underline:]):
3258 use WebUndoActionAlignUnderline
3260 * WebView.subproj/WebView.m:
3261 (-[WebView setTypingStyle:]):
3262 pass WebUndoActionUnspecified through as new parameter since we don't have any more specific info
3263 (-[WebView applyStyle:]):
3266 2004-12-14 Richard Williamson <rjw@apple.com>
3268 Helper method to get URL of plugin view.
3272 * Misc.subproj/WebNSViewExtras.m:
3273 (-[NSView _webViewURL]):
3275 2004-12-14 Vicki Murley <vicki@apple.com>
3279 <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments
3281 * Plugins.subproj/WebPlugin.h: changed instances of "WebScriptMethods" to "WebScripting" in this
3282 file as well, as requested in the bug report
3284 2004-12-13 Maciej Stachowiak <mjs@apple.com>
3288 <rdar://problem/3912488> Mail throws an exception after backspacing "away" inline input
3290 * WebView.subproj/WebHTMLView.m:
3291 (-[WebHTMLView setMarkedText:selectedRange:]): Don't try to set a selection if
3292 we end up with no marked text, since that case fails and is unnecessary.
3294 2004-12-14 John Sullivan <sullivan@apple.com>
3298 - WebKit part of plumbing of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
3299 no specific action names
3301 * WebCoreSupport.subproj/WebBridge.m:
3302 (-[WebBridge nameForUndoAction:]):
3303 renamed from setUndoActionNamePlaceholder, replaced arbitrary integers with enum values, and
3304 handled new "unspecified" case as a fallback
3306 2004-12-13 Richard Williamson <rjw@apple.com>
3308 Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)
3312 * Plugins.subproj/WebJavaPlugIn.h:
3314 2004-12-13 John Sullivan <sullivan@apple.com>
3318 - fixed <rdar://problem/3744583> Safari can not quit when a webpage has a login sheet
3319 that can't be cancelled.
3321 The proper fix for this would be to change the class of the NSPanel in the nib file.
3322 But since this would require a localization change, I did a run-time hack instead.
3323 I'll file a bug about fixing this when we're out of localization freeze.
3325 * Panels.subproj/WebAuthenticationPanel.m:
3326 (-[WebAuthenticationPanel replacePanelWithSubclassHack]):
3327 new method, creates a new panel that is identical to the original one except that
3328 it's our subclass, and moves all the subviews of the original panel into the new one.
3329 (-[WebAuthenticationPanel loadNib]):
3330 call replacePanelWithSubclassHack
3331 (-[NonBlockingPanel _blocksActionWhenModal:]):
3332 only method of new NSPanel subclass; overrides this SPI to allow the user to quit
3333 when one of these panels/sheets is on-screen
3335 2004-12-10 Richard Williamson <rjw@apple.com>
3337 Fixed <rdar://problem/3898708> REGRESSION (8A314-8A317): World Clock's short hand not displayed (ImageIO problem with PDF?)
3338 Fixed <rdar://problem/3914012> use CG directly for pdf images not ImageIO
3340 Create a PDF document and draw that instead of using ImageIO to create a rasterized image.
3344 * WebCoreSupport.subproj/WebImageData.h:
3345 * WebCoreSupport.subproj/WebImageData.m:
3346 (-[WebImageData setIsPDF:]):
3347 (-[WebImageData isPDF]):
3348 (-[WebImageData dealloc]):
3349 (-[WebImageData decodeData:isComplete:callback:]):
3350 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
3351 (-[WebImageData size]):
3352 (-[WebImageData animate]):
3353 (-[WebImageData _createPDFWithData:]):
3354 (-[WebImageData _PDFDocumentRef]):
3355 (-[WebImageData _PDFDrawInContext:]):
3356 (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]):
3357 * WebCoreSupport.subproj/WebImageRenderer.h:
3358 * WebCoreSupport.subproj/WebImageRenderer.m:
3359 (-[WebImageRenderer size]):
3360 (-[WebImageRenderer incrementalLoadWithBytes:length:complete:callback:]):
3361 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
3364 2004-12-10 John Sullivan <sullivan@apple.com>
3368 - fixed <rdar://problem/3855127> Error while printing w/o sheet, then window is left in a bad state,
3369 if there's no default printer set
3371 * WebView.subproj/WebHTMLView.m:
3372 (-[WebHTMLView beginDocument]):
3373 Our implementation of knowsPageRange puts the WebHTMLView into a special "printing mode". We must
3374 exit the "printing mode" to return to normal behavior. This is normally done in endDocument.
3375 However, it turns out that if there's an exception in [super beginDocument], then endDocument
3376 will not be called (lame-o AppKit API). So, we handle that case by catching the exception and
3377 exiting the "printing mode" in beginDocument when it occurs.
3379 2004-12-09 Richard Williamson <rjw@apple.com>
3381 Fixed <rdar://problem/3905789> Burn Disc image vibrates rapidly
3383 Restrict our support for animated images to GIF. We used to
3384 use presence of more than one image in a resource to determine
3385 if an image should be animated. This caused us to animate icns!
3386 If we ever support any other animated image formats we'll have
3391 * WebCoreSupport.subproj/WebImageData.h:
3392 * WebCoreSupport.subproj/WebImageData.m:
3393 (-[WebImageData shouldAnimate]):
3394 * WebCoreSupport.subproj/WebImageRenderer.m:
3395 (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):
3397 2004-12-09 Richard Williamson <rjw@apple.com>
3399 Make WebPluginDatabase.h private (Dashboard needs SPI).
3401 * WebKit.pbproj/project.pbxproj:
3405 2004-12-09 Chris Blumenberg <cblu@apple.com>
3407 Workaround for this exception being raised during download:
3408 [WebDownload connection:willStopBufferingData:]: selector not recognized
3412 * Misc.subproj/WebDownload.m:
3413 (-[WebDownload connection:willStopBufferingData:]): implement this method so no exception is raised. It is a bug in Foundation that this method is being called, but it's too late to fix Foundation since it has already been submitted this week. This workaround will prevent any problems from affecting users.
3415 2004-12-08 Richard Williamson <rjw@apple.com>
3417 Fixed <rdar://problem/3911719> REGRESSION: Images no longer scale vertically
3418 Account for scaling correctly when taking into account progressively
3421 Also added implementation of repetition count for animated GIF images.
3422 Also replaced strings with new constants from CFImageProperties.h
3424 Also fixed possible problem with -(NSSize)size implementation,
3425 relevant to Panther only.
3429 * WebCoreSupport.subproj/WebImageData.m:
3430 (-[WebImageData _floatProperty:type:at:]):
3431 (-[WebImageData _frameDurationAt:]):
3432 (-[WebImageData _repetitionCount]):
3433 * WebCoreSupport.subproj/WebImageRenderer.m:
3434 (-[WebImageRenderer size]):
3436 2004-12-08 Chris Blumenberg <cblu@apple.com>
3438 Removed NPN wrappers since these no longer need to be defined to make the QT plug-in work
3439 since 3828925 has been fixed.
3443 * Plugins.subproj/WebNetscapePluginPackage.m:
3444 (-[WebNetscapePluginPackage load]): use under-bar symbols since non-under-bar wrappers have been removed
3445 * Plugins.subproj/npapi.m: removed NPN wrappers
3446 * WebKit.exp: removed symbols
3448 2004-12-08 Ken Kocienda <kocienda@apple.com>
3452 * WebView.subproj/WebHTMLView.m:
3453 (-[WebHTMLView drawRect:]): Work around for this bug:
3454 <rdar://problem/3908282> REGRESSION (Mail): No drag image dragging selected text in Blot and Mail
3455 The reason for the workaround is that this method is called explicitly from the code
3456 to generate a drag image, and at that time, getRectsBeingDrawn:count: will return a zero count.
3457 This code change uses the passed-in rect when the count is zero.
3459 2004-12-07 Administrator <cblu@apple.com>
3461 Support for fix for:
3462 <rdar://problem/3734309> Safari doesn't open folders in title bar menu with non-Roman names using Cmd+click
3466 * Misc.subproj/WebNSURLExtras.h:
3467 * Misc.subproj/WebNSURLExtras.m:
3468 (+[NSURL _web_URLWithUserTypedString:relativeToURL:]): renamed to take relativeToURL parameter
3469 (+[NSURL _web_URLWithUserTypedString:]): call _web_URLWithUserTypedString:relativeToURL: with nil for URL
3471 2004-12-07 Richard Williamson <rjw@apple.com>
3473 Fixed <rdar://problem/3905564> REGRESSION (Tiger); in History menu, pixel size appears but is wrong for standalone images in Safari.
3477 * WebCoreSupport.subproj/WebImageRenderer.m:
3478 (-[WebImageRenderer size]):
3480 2004-12-07 Richard Williamson <rjw@apple.com>
3482 Support threaded image decoding on machines w/ >= 2 CPUs.
3484 Reviewed by Maciej and Chris.
3486 * Misc.subproj/WebKitSystemBits.h:
3487 * Misc.subproj/WebKitSystemBits.m:
3488 (WebSystemMainMemory):
3490 * WebCoreSupport.subproj/WebImageData.h:
3491 * WebCoreSupport.subproj/WebImageData.m:
3492 (+[WebImageData initialize]):
3493 (-[WebImageData init]):
3494 (-[WebImageData _commonTermination]):
3495 (-[WebImageData dealloc]):
3496 (-[WebImageData _invalidateImages]):
3497 (-[WebImageData _imageSourceOptions]):
3498 (-[WebImageData imageAtIndex:]):
3499 (-[WebImageData propertiesAtIndex:]):
3500 (-[WebImageData _createImages]):
3501 (-[WebImageData decodeData:isComplete:callback:]):
3502 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
3504 (-[WebImageData tileInRect:fromPoint:context:]):
3505 (-[WebImageData isNull]):
3506 (-[WebImageData size]):
3507 (-[WebImageData _frameDurationAt:]):
3508 (-[WebImageData _frameDuration]):
3509 (+[WebImageData stopAnimationsInView:]):
3510 (-[WebImageData addAnimatingRenderer:inView:]):
3511 (-[WebImageData removeAnimatingRenderer:]):
3512 * WebCoreSupport.subproj/WebImageDecodeItem.h: Added.
3513 * WebCoreSupport.subproj/WebImageDecodeItem.m: Added.
3514 (+[WebImageDecodeItem decodeItemWithImage:data:isComplete:callback:]):
3515 (-[WebImageDecodeItem initWithImage:data:isComplete:callback:]):
3516 (-[WebImageDecodeItem finalize]):
3517 (-[WebImageDecodeItem dealloc]):
3518 * WebCoreSupport.subproj/WebImageDecoder.h: Added.
3519 * WebCoreSupport.subproj/WebImageDecoder.m: Added.
3520 (decoderNotifications):
3521 (+[WebImageDecoder initialize]):
3522 (+[WebImageDecoder notifyMainThread]):
3523 (+[WebImageDecoder sharedDecoder]):
3524 (+[WebImageDecoder performDecodeWithImage:data:isComplete:callback:]):
3525 (+[WebImageDecoder imageDecodesPending]):
3526 (+[WebImageDecoder decodeComplete:status:]):
3527 (-[WebImageDecoder init]):
3528 (-[WebImageDecoder dealloc]):
3529 (-[WebImageDecoder finalize]):
3530 (-[WebImageDecoder removeItem]):
3531 (-[WebImageDecoder addItem:]):
3532 (-[WebImageDecoder decodeItem:]):
3534 (startDecoderThread):
3535 * WebCoreSupport.subproj/WebImageRenderer.m:
3536 (-[WebImageRenderer initWithData:MIMEType:]):
3537 (-[WebImageRenderer initWithContentsOfFile:]):
3538 (-[WebImageRenderer incrementalLoadWithBytes:length:complete:callback:]):
3539 (-[WebInternalImage incrementalLoadWithBytes:length:complete:callback:]):
3540 * WebKit.pbproj/project.pbxproj:
3541 * WebView.subproj/WebImageRepresentation.m:
3542 (-[WebImageRepresentation receivedData:withDataSource:]):
3543 (-[WebImageRepresentation receivedError:withDataSource:]):
3544 (-[WebImageRepresentation finishedLoadingWithDataSource:]):
3546 2004-12-07 Chris Blumenberg <cblu@apple.com>
3548 Fix for performance regression.
3552 * WebCoreSupport.subproj/WebBridge.m:
3553 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): construct the WebResource without copying the data
3555 2004-12-07 Chris Blumenberg <cblu@apple.com>
3557 Fixed: <rdar://problem/3909243> REGRESSION: large standalone images stop loading part way through
3561 * WebView.subproj/WebBaseResourceHandleDelegate.h:
3562 * WebView.subproj/WebMainResourceClient.m:
3563 (-[WebMainResourceClient addData:]): call super so it buffers the data
3565 2004-12-06 Richard Williamson <rjw@apple.com>
3567 Use the AppKit's font rendering mode. This fixes 3905347, but we still need to track down
3568 and resolve why metrics have changed for Courier. This may be caused by changes in
3573 * WebCoreSupport.subproj/WebTextRenderer.m:
3574 (_AppkitGetCGRenderingMode):
3578 2004-12-06 Chris Blumenberg <cblu@apple.com>
3580 Forgot to commit copied header.
3582 * DOM.subproj/DOMPrivate.h:
3584 2004-12-06 Chris Blumenberg <cblu@apple.com>
3586 Fixed: <rdar://problem/3907381> NSURLConnection and WebKit buffer 2 copies of incoming data
3590 * WebView.subproj/WebBaseResourceHandleDelegate.h:
3591 * WebView.subproj/WebBaseResourceHandleDelegate.m:
3592 (+[WebBaseResourceHandleDelegate initialize]): cache check to see if Foundation supports access to its buffered data
3593 (-[WebBaseResourceHandleDelegate addData:]): don't buffer data if Foundation is buffering it for us
3594 (-[WebBaseResourceHandleDelegate saveResource]): when creating a WebResource, pass NO for copyData since we know it won't be mutated
3595 (-[WebBaseResourceHandleDelegate resourceData]): return the buffered data from the connection if it supports it
3596 (-[WebBaseResourceHandleDelegate willStopBufferingData:]): make a mutable copy of the data from NSURLConnection so we can continue buffering
3597 (-[WebBaseResourceHandleDelegate willCacheResponse:]): removed optimization that used the cached response data to save the resource since that is obsolete by this change
3598 (-[WebBaseResourceHandleDelegate connection:willStopBufferingData:]): new callback from NSURLConnection, informs us that NSURLConnection has given up buffering
3599 * WebView.subproj/WebDataSource.m:
3600 (-[WebDataSource _receivedData:]): removed buffering code since that's done by NSURLConnection and the main client
3601 (-[WebDataSource _setData:]): removed unnecessary cast since the resourceData ivar is now an NSData instead of NSMutableData
3602 (-[WebDataSource data]): return resourceData ivar, else return the resourceData from the main client
3603 * WebView.subproj/WebDataSourcePrivate.h:
3604 * WebView.subproj/WebMainResourceClient.m:
3605 (-[WebMainResourceClient releaseResources]): store resourceData on the data source so it can continue to have data after the main client has gone away
3606 (-[WebMainResourceClient connection:didReceiveData:lengthReceived:]):don't call [dataSource data] just to get the length of data received since [dataSource data] can now cause data to be copied
3607 (-[WebMainResourceClient connectionDidFinishLoading:]): ditto
3608 * WebView.subproj/WebResource.m:
3609 (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): call following method with YES for copyData
3610 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:copyData:]): new initializer, allows caller to choose whether or not the data is copied
3611 * WebView.subproj/WebResourcePrivate.h:
3613 2004-12-06 Richard Williamson <rjw@apple.com>
3615 Fixed <rdar://problem/3903749> REGRESSION (8A321): WebKit gets incorrect glyph metrics due to change in how AppKit uses CGFont
3617 Use CGFontRef direction when both getting font metrics and drawing
3618 glyphs, instead on depending on [NSFont set].
3622 * WebCoreSupport.subproj/WebTextRenderer.m:
3626 2004-12-06 Ken Kocienda <kocienda@apple.com>
3628 Reviewed by Harrison
3632 <rdar://problem/3906930> Hitting return key in editable content inserts br elements instead of blocks
3634 * WebView.subproj/WebHTMLView.m:
3635 (-[WebHTMLView insertNewline:]): One-line change to call insert-block rather than insert-br method
3638 2004-12-04 Darin Adler <darin@apple.com>
3642 - fixed <rdar://problem/3846079> assertion failure in WebHTMLView(WebPrivate) removeTrackingRect at boots.com
3643 - fixed <rdar://problem/3857737> REGRESSION (165-166): clicking in a text field that's scrolled to the right causes it to scroll all the way left
3644 - fixed <rdar://problem/3861952> REGRESSION (165-166): selection is cleared when you start to scroll a frame
3646 * WebView.subproj/WebHTMLViewInternal.h: Added handlingMouseDown flag.
3647 * WebView.subproj/WebHTMLView.m:
3648 (-[WebHTMLView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]): Allow passing in a
3649 tracking number of 0, which means no existing tracking number.
3650 (-[WebHTMLView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]): Ditto.
3651 (-[WebHTMLView removeTrackingRect:]): Allow removing a tracking number of 0, which is a no-op.
3652 (-[WebHTMLView _removeTrackingRects:count:]): Ditto.
3653 (-[WebHTMLView acceptsFirstResponder]): Changed check to use handlingMouseDown flag instead of mouseDownEvent
3654 field since that field is set up too early in the mouse down event handling process.
3655 (-[WebHTMLView mouseDown:]): Added code to set handlingMouseDown flag.
3657 - fixed part of <rdar://problem/3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
3659 * WebCoreSupport.subproj/WebBridge.m:
3660 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3661 Changed code around so that it won't try to create a WebResource when the load fails.
3663 - moved next/previous links into private structure with the rest of WebFrame fields
3664 (We have a rule against putting new fields into obejcts that are part of our public API.)
3666 * WebView.subproj/WebFrame.h: Remove _nextSibling and _previousSibling.
3667 * WebView.subproj/WebFramePrivate.h: Added nextSibling and previousSibling fields to private class.
3668 * WebView.subproj/WebFrame.m: Got rid of some tabs in this file.
3669 (-[WebFrame _addChild:]): Changed code to use fields inside _private.
3670 (-[WebFrame _removeChild:]): Ditto.
3671 (-[WebFrame _nextFrameWithWrap:]): Ditto.
3672 (-[WebFrame _previousFrameWithWrap:]): Ditto.
3674 2004-12-04 Chris Blumenberg <cblu@apple.com>
3677 <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
3678 <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
3679 <rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
3680 <rdar://problem/3902749> REGRESSION (Tiger): missing image symbol does not appear
3682 Reviewed by darin, rjw, kocienda.
3684 * WebCoreSupport.subproj/WebBridge.m:
3685 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]):
3686 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3687 * WebCoreSupport.subproj/WebSubresourceClient.m:
3688 (-[WebSubresourceClient didFinishLoading]):
3689 * WebView.subproj/WebFrame.m:
3690 (-[WebFrame _opened]):
3691 (-[WebFrame _internalLoadDelegate]):
3692 (-[WebFrame _sendResourceLoadDelegateMessagesForURL:response:length:]):
3693 * WebView.subproj/WebFrameInternal.h:
3695 2004-12-04 Darin Adler <darin@apple.com>
3699 - fixed remaining bit of <rdar://problem/3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window
3701 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _styleFromFontAttributes:]): When translating from
3702 an attribute dictionary to a CSS declaration, treat missing values according to the defaults defined
3703 in <AppKit/NSAttributedString.h>. Before the code was treating them as "no change", which is incorrect.
3705 * English.lproj/StringsNotToBeLocalized.txt: Add a string from the above change.
3709 2004-12-03 Ken Kocienda <kocienda@apple.com>
3713 Roll out some recent changes by Chris that caused a performance regression.
3714 Fix is in hand, but it is a little risky this close to a submission. So,
3715 we have decided to roll back the change with the regression and roll in
3716 the new code after we submit.
3718 * WebCoreSupport.subproj/WebBridge.m:
3719 (-[WebBridge objectLoadedFromCacheWithURL:response:size:]):
3720 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3721 * WebCoreSupport.subproj/WebSubresourceClient.m:
3722 (-[WebSubresourceClient didFinishLoading]):
3723 * WebView.subproj/WebFrame.m:
3724 (-[WebFrame _opened]):
3725 (-[WebFrame _internalLoadDelegate]):
3726 * WebView.subproj/WebFrameInternal.h:
3728 2004-12-02 Richard Williamson <rjw@apple.com>
3730 Fixed <rdar://problem/3841332> REGRESSION (125.9-167u): repro crash in -[KWQPageState invalidate] involving .Mac images
3732 Ensure that the document is cleared when leaving a non-HTML page. This ensures that
3733 the b/f cache won't incorrectly trash the previous state when restoring.
3737 * WebView.subproj/WebFrame.m:
3738 (-[WebFrame _setState:]):
3740 2004-12-02 Ken Kocienda <kocienda@apple.com>
3744 <rdar://problem/3748323> Problem with -[WebView editableDOMRangeForPoint:] (-isFlipped not taken into account?)
3745 <rdar://problem/3852590> REGRESSION (Mail): Dropped content appears in wrong place if Mail message is scrolled down
3747 When implementing drag and drop, moveDragCaretToPoint: and editableDOMRangeForPoint: are used in
3748 concert to track the mouse and determine a drop location, respectively. However, moveDragCaretToPoint:
3749 did a conversion of the passed-in point to the document view's coordinate space, whereas
3750 editableDOMRangeForPoint: did not. Now it does.
3752 Note that I will need to coordinate with Grant to have him roll out some code in Mail that
3753 attempts to work around this problem (unsuccessfully), and actually manages to block the
3754 real fix (which needs to be in WebKit).
3756 * WebView.subproj/WebView.m:
3757 (-[WebView editableDOMRangeForPoint:]): Convert the passed-in point to the document view's coordinate space.
3759 2004-12-02 Richard Williamson <rjw@apple.com>
3761 Fixed <rdar://problem/3895810> FATAL ERROR: <WebTextRenderer: 0x9328a20> unable to initialize with font "Times-Roman 16.00 pt. S ....
3763 We have a hack to replace Times with Times New Roman if we fail
3764 to setup Times. If we then fail to setup Times New Roman we
3765 don't attempt to further fallback to the system font. Added
3766 that additional fallback.
3770 * WebCoreSupport.subproj/WebTextRenderer.m:
3771 (+[WebTextRenderer webFallbackFontFamily]):
3772 (-[WebTextRenderer initWithFont:usingPrinterFont:]):
3774 2004-12-02 Richard Williamson <rjw@apple.com>
3776 Fixed build problem on Tiger8A821. Private macro and function
3777 we were using have been deprecated,
3781 * WebCoreSupport.subproj/WebTextRenderer.m:
3782 (-[WebTextRenderer initWithFont:usingPrinterFont:]):
3784 2004-12-01 Chris Blumenberg <cblu@apple.com>
3786 Fixed: <rdar://problem/3879870> Flash Player unable to stop data stream from continuing to download by returning -1 from NPP_Write
3787 Also improved and cleaned-up the plug-in stream termination code.
3791 * Plugins.subproj/WebBaseNetscapePluginStream.h:
3792 * Plugins.subproj/WebBaseNetscapePluginStream.m:
3793 (+[WebBaseNetscapePluginStream reasonForError:]): return NPRES_DONE for a nil error
3794 (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]): new, factored out from other methods
3795 (-[WebBaseNetscapePluginStream errorForReason:]): new
3796 (-[WebBaseNetscapePluginStream dealloc]): release MIME type
3797 (-[WebBaseNetscapePluginStream setMIMEType:]): new
3798 (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]): call setMIMEType so we can use it in _pluginCancelledConnectionError, call renamed methods
3799 (-[WebBaseNetscapePluginStream _destroyStream]): prepended underscore, replaced some early returns with asserts as the callers are now smarter
3800 (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): prepended underscore, only call _destroyStream if there is an error or if the load is complete and there is no more data to be streamed
3801 (-[WebBaseNetscapePluginStream cancelLoadWithError:]): new, overridden by subclasses to cancel the actual NSURLConnection
3802 (-[WebBaseNetscapePluginStream destroyStreamWithError:]): new, calls _destroyStreamWithReason
3803 (-[WebBaseNetscapePluginStream finishedLoadingWithData:]): call renamed methods
3804 (-[WebBaseNetscapePluginStream _deliverData]): prepended underscore, call cancelLoadAndDestroyStreamWithError if NPP_Write returns a negative number
3805 * Plugins.subproj/WebBaseNetscapePluginView.m:
3806 (-[WebBaseNetscapePluginView destroyStream:reason:]): call cancelLoadAndDestroyStreamWithError
3807 * Plugins.subproj/WebNetscapePluginRepresentation.m:
3808 (-[WebNetscapePluginRepresentation receivedError:withDataSource:]): call destroyStreamWithError
3809 (-[WebNetscapePluginRepresentation cancelLoadWithError:]): new, override method, tell the data source to stop loading
3810 * Plugins.subproj/WebNetscapePluginStream.m:
3811 (-[WebNetscapePluginStream cancelLoadWithError:]): new, override method, tell the loader to stop
3812 (-[WebNetscapePluginStream stop]): call cancelLoadAndDestroyStreamWithError
3813 (-[WebNetscapePluginConnectionDelegate isDone]): new
3814 (-[WebNetscapePluginConnectionDelegate didReceiveResponse:]): call cancelLoadAndDestroyStreamWithError
3815 (-[WebNetscapePluginConnectionDelegate didFailWithError:]): call destroyStreamWithError
3817 2004-12-01 Kevin Decker <kdecker@apple.com>
3819 Reviewed by Harrison.
3821 Fixed: <rdar://problem/3228878> potential performance problem in finding in large framesets
3823 Got rid of O(N^2) conditions in _nextSibling and _previousSibling of where we were looking up self in the parent array of frames.
3825 * WebView.subproj/WebFrame.h: Added two new pointers, one for the previous kid and one for the next kid
3826 * WebView.subproj/WebFrame.m:
3827 (-[WebFrame _addChild:]): Updates the previous frame and the next frame after this child
3828 (-[WebFrame _removeChild:]): ditto
3829 (-[WebFrame _nextSibling]): just return the pointer now
3830 (-[WebFrame _previousSibling]): ditto
3832 2004-11-30 Chris Blumenberg <cblu@apple.com>
3835 <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
3836 <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
3840 * WebCoreSupport.subproj/WebBridge.m:
3841 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): renamed to pass all data for the resource, moved delegate code to new method
3842 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): call renamed method
3843 * WebCoreSupport.subproj/WebSubresourceClient.m:
3844 (-[WebSubresourceClient didFinishLoading]): call renamed method
3845 * WebView.subproj/WebFrame.m:
3846 (-[WebFrame _opened]): call _sendResourceLoadDelegateMessagesForURL:response:length:, not objectLoadedFromCacheWithURL:response:data:
3847 (-[WebFrame _internalLoadDelegate]):
3848 (-[WebFrame _sendResourceLoadDelegateMessagesForURL:response:length:]): moved from objectLoadedFromCacheWithURL:response:data:
3849 * WebView.subproj/WebFrameInternal.h:
3851 2004-11-29 Darin Adler <darin@apple.com>
3855 - worked around bug in Panther where NSScroller calls _destinationFloatValueForScroller: on superview
3856 without first checking if it's implemented
3858 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _destinationFloatValueForScroller:]):
3859 Implemented. Calls floatValue on the scroller.
3861 * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
3863 2004-11-23 Chris Blumenberg <cblu@apple.com>
3865 Fixed: <rdar://problem/3890944> disable icon database for Dashboard
3869 * Misc.subproj/WebIconDatabase.h:
3870 * Misc.subproj/WebIconDatabase.m:
3871 (-[WebIconDatabase init]): don't create dictionaries if disabled
3872 (-[WebIconDatabase iconForURL:withSize:cache:]): return default icon if disabled
3873 (-[WebIconDatabase iconURLForURL:]): return nil if disabled
3874 (-[WebIconDatabase retainIconForURL:]): return if disabled
3875 (-[WebIconDatabase releaseIconForURL:]): ditto
3876 (-[WebIconDatabase delayDatabaseCleanup]): ditto
3877 (-[WebIconDatabase allowDatabaseCleanup]): ditto
3878 (-[WebIconDatabase _isEnabled]): new
3879 (-[WebIconDatabase _setIcon:forIconURL:]): assert if called when disabled, moved to own category implementation
3880 (-[WebIconDatabase _setHaveNoIconForIconURL:]): ditto
3881 (-[WebIconDatabase _setIconURL:forURL:]): ditto
3882 (-[WebIconDatabase _createFileDatabase]): tweak
3883 (-[WebIconDatabase _applicationWillTerminate:]): moved out of public code
3884 * Misc.subproj/WebIconDatabasePrivate.h:
3885 * Misc.subproj/WebIconLoader.m:
3886 * WebView.subproj/WebDataSource.m:
3887 (-[WebDataSource _updateIconDatabaseWithURL:]): assert if called when icon DB is disabled
3888 (-[WebDataSource _loadIcon]): don't load icon if icon DB is disabled
3890 2004-11-22 David Hyatt <hyatt@apple.com>
3892 Make sure the WebCore cache grows at 512mb and at 1024mb exactly.
3896 * WebCoreSupport.subproj/WebBridge.m:
3897 (-[WebBridge getObjectCacheSize]):
3899 2004-11-22 Richard Williamson <rjw@apple.com>
3901 Fixed <rdar://problem/3891737> WebPreferences do not work if they are set before set on the WebView
3903 John found this problem and suggested the fix.
3905 Reviewed by John Louch.
3907 * WebView.subproj/WebView.m:
3908 (-[WebView setPreferences:]):
3910 2004-11-22 Ken Kocienda <kocienda@apple.com>
3912 Reviewed by Harrison
3914 * WebCoreSupport.subproj/WebBridge.m:
3915 (-[WebBridge canPaste]): Call WebView _canPaste.
3916 * WebView.subproj/WebView.m:
3917 (-[WebView _canPaste]): Try to forward to document view's implementation. Only WebHTMLView
3918 answers right now. Returns NO otherwise.
3919 * WebView.subproj/WebViewInternal.h: Add _canPaste method to WebView.
3921 2004-11-22 Maciej Stachowiak <mjs@apple.com>
3923 Back out the window closing fix, it seems to be causing crashes.
3925 * WebView.subproj/WebFrame.m:
3926 (-[WebFrame _detachFromParent]):
3928 2004-11-20 Maciej Stachowiak <mjs@apple.com>
3932 <rdar://problem/3710101> _web_userVisibleString makes URL autocomplete roughly 2x slower
3934 * Misc.subproj/WebNSURLExtras.h:
3935 * Misc.subproj/WebNSURLExtras.m:
3936 (-[NSString _web_isUserVisibleURL]): New SPI to check if a URL
3937 string is already in user-visible form (i.e. converting it to an
3938 NSURL and then back via _web_userVisibleString would not change
3941 2004-11-19 Maciej Stachowiak <mjs@apple.com>
3945 <rdar://problem/3190977> closing window with many tabs in it can be quite slow
3947 * WebView.subproj/WebFrame.m:
3948 (-[WebFrame _detachFromParent]): autorelease bridge instead of releasing it,
3949 to make window and tab closing more responsive - this way the deallocation happens
3950 after the windoow or tab appears to close.
3954 2004-11-19 Chris Blumenberg <cblu@apple.com>
3956 Fixed: <rdar://problem/3880387> REGRESSION: www.shockplay.com site gives "Unexpected server response"
3960 * Plugins.subproj/WebBaseNetscapePluginView.m:
3961 (-[NSData _web_locationAfterFirstBlankLine]): support both formats ("\r\n\n" and "\r\n\r\n") for separating header data from body data because Shockwave still sends the prior format
3963 2004-11-19 Ken Kocienda <kocienda@apple.com>
3965 Reviewed by Harrison
3969 <rdar://problem/3655241> setTypingStyle: does not set the real typing style, and typingStyle does not return it
3971 * WebCoreSupport.subproj/WebBridge.m:
3972 (-[WebBridge respondToChangedContents]): No longer call through to WebKit to set the typing style. The call
3973 was part of the misguided use of the setTypingStyle: and typingStyle as a cache of what was stored on
3975 (-[WebBridge respondToChangedSelection]): Ditto.
3976 * WebView.subproj/WebView.m:
3977 (-[WebViewPrivate dealloc]): Object no longer has typingStyle ivar.
3978 (-[WebView setTypingStyle:]): Call over the bridge to set typing style.
3979 (-[WebView typingStyle]): Call over the bridge to retrieve typing style.
3980 * WebView.subproj/WebViewInternal.h: Object no longer has typingStyle ivar.
3982 2004-11-18 John Sullivan <sullivan@apple.com>
3986 - fixed <rdar://problem/3886042> should save history file as binary XML so serialization,
3987 parsing, reading and writing is faster
3989 * History.subproj/WebHistory.m:
3990 (-[WebHistoryPrivate _saveHistoryGuts:URL:error:]):
3991 convert dictionary to binary data before saving
3993 2004-11-18 Chris Blumenberg <cblu@apple.com>
3995 * WebView.subproj/WebHTMLRepresentation.m:
3996 (-[WebHTMLRepresentation currentForm]): removed stray ";"
3998 2004-11-18 Chris Blumenberg <cblu@apple.com>
4000 Fixed development build failure.
4002 * Misc.subproj/WebIconDatabase.m:
4003 (+[WebIconDatabase sharedIconDatabase]): call LOG not Log
4005 2004-11-18 Chris Blumenberg <cblu@apple.com>
4007 <rdar://problem/3885708> save memory in icon DB by not using NSSets when holding 1 object
4009 Reviewed by sullivan.
4011 * Misc.subproj/WebIconDatabase.m:
4012 (+[WebIconDatabase sharedIconDatabase]): added timing code
4013 (-[WebIconDatabase _clearDictionaries]): new
4014 (-[WebIconDatabase _loadIconDictionaries]): call _clearDictionaries in 2 places before we bail, use _web_setObjectUsingSetIfNecessary:forKey: when adding site URLs to the iconURLToURLs dictionary
4015 (-[WebIconDatabase _updateFileDatabase]): fixed comment
4016 (-[WebIconDatabase _setIconURL:forURL:]): use _web_setObjectUsingSetIfNecessary:forKey: when adding site URLs to the iconURLToURLs dictionary
4017 (-[WebIconDatabase _releaseIconForIconURLString:]): handle NSString objects retured from iconURLToURLs
4018 (-[NSMutableDictionary _web_setObjectUsingSetIfNecessary:forKey:]): new, puts a set on the dictionary when there are 2 or more object for s key
4020 2004-11-17 Richard Williamson <rjw@apple.com>
4022 Fixed <rdar://problem/3885073> REGRESSION: Tab images at top of news.com.com replicated and squished
4024 Correctly account for scaled image size and clipping.
4028 * WebCoreSupport.subproj/WebImageData.h:
4029 * WebCoreSupport.subproj/WebImageData.m:
4030 * WebCoreSupport.subproj/WebImageRenderer.m:
4031 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
4033 2004-11-17 Maciej Stachowiak <mjs@apple.com>
4035 Reviewed by Richard.
4037 <rdar://problem/3885076> Don't make IDN calls for all-ascii URLs to save about 3 pages
4040 * Misc.subproj/WebNSURLExtras.m:
4041 (mapHostNames): If encoding and not decoding, then bail early if the URL is all ascii.
4042 (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Remove earlier special-case
4043 check for localhost, no longer needed.
4045 2004-11-17 Richard Williamson <rjw@apple.com>
4047 Fixed <rdar://problem/3863601> Legacy font cache code in [WebTextRendererFactory createSharedFactory] may be unnecesary
4049 and added call to SPI for
4051 <rdar://problem/3884448> WebKit should turn on CG local font cache
4053 currently disabled until a Tiger build shows up with the SPI.
4055 Reviewed by David Harrison.
4057 * WebCoreSupport.subproj/WebTextRendererFactory.m:
4058 (+[WebTextRendererFactory createSharedFactory]):
4060 2004-11-17 Richard Williamson <rjw@apple.com>
4062 Fixed <rdar://problem/3882212> REGRESSION: Images clipped instead of scaled
4063 Fixed <rdar://problem/3884088> Crash terminating image load
4065 Also added code to turn off color correction for images created
4066 via CGImageSources. This code is currently disabled because CG
4067 can't change the color space of images loaded progressively.
4068 Further, according to Dave Hayward, CG will no longer attempt
4069 to color correct images that don't have embedded profiles as of
4074 * WebCoreSupport.subproj/WebImageData.m:
4075 (-[WebImageData _commonTermination]):
4076 (-[WebImageData dealloc]):
4077 (-[WebImageData _invalidateImageProperties]):
4078 (-[WebImageData imageAtIndex:]):
4079 (-[WebImageData incrementalLoadWithBytes:length:complete:]):
4080 (-[WebImageData propertiesAtIndex:]):
4082 2004-11-16 Chris Blumenberg <cblu@apple.com>
4084 Fixed: <rdar://problem/3882034> REGRESSION: Context menu incorrect for PDF content
4088 * WebView.subproj/WebPDFView.m:
4089 (-[WebPDFView hitTest:]): return self if the current event is a context menu event
4090 (-[WebPDFView menuForEvent:]): use the PDFView subview