1 2005-07-31 John Sullivan <sullivan@apple.com>
3 Patch by Trey Matteson <trey@usa.net>
6 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4014
7 PDF files by default load with a poor choice of sizing
9 For now the various PDF viewing settings are sticky, stored in 2 new defaults. Since
10 there are a number of ways these settings are changed, I made a proxy for the PDFView
11 through which all view changing messages are sent. The proxy adds the behavior of
12 updating the defaults upon any change.
14 * Misc.subproj/WebNSDictionaryExtras.h:
15 * Misc.subproj/WebNSDictionaryExtras.m:
16 (-[NSMutableDictionary _webkit_setFloat:forKey:]): New support method.
17 * WebView.subproj/WebPDFView.h:
18 * WebView.subproj/WebPDFView.m:
19 (-[WebPDFView initWithFrame:]): Create proxy for PDFView.
20 (-[WebPDFView dealloc]): Free proxy.
21 (-[WebPDFView _menuItemsFromPDFKitForEvent:]): For relevant context menu items, set the
22 target to the proxy instead of the PDFView.
23 (-[WebPDFView _readPDFDefaults]): Init PDFView with settings from defaults.
24 (-[WebPDFView layout]): Call _readPDFDefaults, once. This turned out to be the best hook.
25 (-[WebPDFView _makeTextSmaller:]): Change PDFView via proxy
26 (-[WebPDFView _makeTextLarger:]): Ditto
27 (-[WebPDFView _makeTextStandardSize:]): Ditto
28 (-[PDFPrefUpdatingProxy initWithView:]): trivial
29 (-[PDFPrefUpdatingProxy forwardInvocation:]): Forward the msg, then update defaults
30 (-[PDFPrefUpdatingProxy methodSignatureForSelector:]): Simple forwarding support.
31 * WebView.subproj/WebPreferenceKeysPrivate.h:
32 * WebView.subproj/WebPreferences.m:
33 (+[WebPreferences initialize]): Set initial values for new PDF viewing defaults.
34 (-[WebPreferences _integerValueForKey:]): Nuke stray comment.
35 (-[WebPreferences _floatValueForKey:]): New simple support method.
36 (-[WebPreferences _setFloatValue:forKey:]): Ditto.
37 (-[WebPreferences PDFScaleFactor]): 4 accessors for new defaults
38 (-[WebPreferences setPDFScaleFactor:]):
39 (-[WebPreferences PDFDisplayMode]):
40 (-[WebPreferences setPDFDisplayMode:]):
41 * WebView.subproj/WebPreferencesPrivate.h:
43 2005-08-01 Justin Garcia <justin.garcia@apple.com>
45 Patch by Trey Matteson <trey@usa.net>
49 Fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4226>
50 link underlines print too thickly
52 Reinstate the fix made by sullivan on 1/11/05. There was a merge
53 error with an mjs fix on 1/13/05.
55 * WebCoreSupport.subproj/WebTextRenderer.m:
56 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
58 2005-07-30 Maciej Stachowiak <mjs@apple.com>
60 Build fixes for previous change (missing includes)
62 * WebView.subproj/WebFrame.m:
63 * WebView.subproj/WebScriptDebugDelegate.m:
65 2005-07-29 Maciej Stachowiak <mjs@apple.com>
67 Changes by Michael Kahl, reviewed by me.
69 - fixed <rdar://problem/4164112> MASTER: JavaScript debugging support
71 * WebCoreSupport.subproj/WebBridge.m:
72 (-[WebBridge windowObjectCleared]):
73 * WebCoreSupport.subproj/WebSubresourceLoader.m:
74 * WebKit.xcodeproj/project.pbxproj:
75 * WebView.subproj/WebDefaultScriptDebugDelegate.h: Added.
76 * WebView.subproj/WebDefaultScriptDebugDelegate.m: Added.
77 (+[WebDefaultScriptDebugDelegate sharedScriptDebugDelegate]):
78 (-[WebDefaultScriptDebugDelegate webView:didParseSource:fromURL:sourceId:forWebFrame:]):
79 (-[WebDefaultScriptDebugDelegate webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
80 (-[WebDefaultScriptDebugDelegate webView:willExecuteStatement:sourceId:line:forWebFrame:]):
81 (-[WebDefaultScriptDebugDelegate webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
82 * WebView.subproj/WebFrame.m:
83 (-[WebFramePrivate dealloc]):
84 (-[WebFrame _attachScriptDebugger]):
85 * WebView.subproj/WebFramePrivate.h:
86 * WebView.subproj/WebScriptDebugDelegate.h: Added.
87 * WebView.subproj/WebScriptDebugDelegate.m: Added.
88 (-[WebScriptDebugger initWithWebFrame:]):
89 (-[WebScriptDebugger dealloc]):
90 (-[WebScriptDebugger globalObject]):
91 (-[WebScriptDebugger newWrapperForFrame:]):
92 (-[WebScriptDebugger parsedSource:fromURL:sourceId:]):
93 (-[WebScriptDebugger enteredFrame:sourceId:line:]):
94 (-[WebScriptDebugger hitStatement:sourceId:line:]):
95 (-[WebScriptDebugger leavingFrame:sourceId:line:]):
96 (-[WebScriptCallFrame _initWithFrame:]):
97 (-[WebScriptCallFrame dealloc]):
98 (-[WebScriptCallFrame setUserInfo:]):
99 (-[WebScriptCallFrame userInfo]):
100 (-[WebScriptCallFrame caller]):
101 (-[WebScriptCallFrame scopeChain]):
102 (-[WebScriptCallFrame functionName]):
103 (-[WebScriptCallFrame exception]):
104 (-[WebScriptCallFrame evaluateWebScript:]):
105 * WebView.subproj/WebScriptDebugDelegatePrivate.h: Added.
106 * WebView.subproj/WebView.h:
107 * WebView.subproj/WebView.m:
108 (-[WebViewPrivate dealloc]):
109 (-[WebView _scriptDebugDelegateForwarder]):
110 (-[WebView setScriptDebugDelegate:]):
111 (-[WebView scriptDebugDelegate]):
112 * WebView.subproj/WebViewInternal.h:
113 * WebView.subproj/WebViewPrivate.h:
115 2005-07-26 Maciej Stachowiak <mjs@apple.com>
117 Reviewed by Dave Hyatt.
119 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4153
121 * WebView.subproj/WebFrame.m:
122 (-[WebFrame _purgePageCache]): Find the oldest candidate for
123 purging that is not a snapback item.
125 2005-07-29 David Harrison <harrison@apple.com>
127 Reviewed by Dave Hyatt (rendering) and Maciej (editing and performance improvements).
129 Test cases added: Existing tab-related basic editing tests were updated. More complex tests are coming soon.
131 <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
133 Basic strategy is to put tabs into spans with white-space:pre style, and
134 render them with tabs stops every 8th space, where the space width and
135 the left margin are those of the enclosing block.
137 * WebCoreSupport.subproj/WebTextRenderer.m:
139 (isRoundingHackCharacter):
141 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
142 (-[WebTextRenderer _computeWidthForSpace]):
144 (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
145 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startPosition:numGlyphs:]):
146 (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]):
147 (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
149 (initializeCharacterWidthIterator):
151 (widthForNextCharacter):
153 2005-07-29 John Sullivan <sullivan@apple.com>
155 Reviewed by Dave Hyatt.
157 - WebKit part of <rdar://problem/4187404> Redo form SPI so that it doesn't rely on NSViews
159 Much of 4187404 was addressed in earlier checkins. This checkin completes the task.
161 * WebView.subproj/WebHTMLRepresentation.h:
162 * WebView.subproj/WebHTMLRepresentation.m:
163 removed viewForElement:, which was the only remaining NSView-related SPI that Safari autofill was
164 still using. I added viewForElement a week ago as a transitional measure, so removing it won't
165 affect any other clients.
167 2005-07-29 John Sullivan <sullivan@apple.com>
169 Reviewed by Chris Blumenberg.
171 * WebView.subproj/WebFrameView.m:
172 (-[WebFrameView _firstResponderIsFormControl]):
173 renamed from _firstResponderIsControl for clarity. Explicitly rejects WebHTMLView, since
175 (-[WebFrameView keyDown:]):
176 updated for renamed method.
178 2005-07-28 John Sullivan <sullivan@apple.com>
180 Reviewed by Beth Dakin.
182 - removed method -[WebHTMLRepresentation elementForView:], which was SPI used only for
183 Safari autofill. Tip of tree Safari no longer includes any calls to this method. Also,
184 Tiger Safari never gets around to actually calling it due to the other recent form-SPI-related
185 changes, so removing this method doesn't break Tiger Safari running on tip of tree WebKit
186 (though autofill continues to not work in that configuration).
188 * WebView.subproj/WebHTMLRepresentation.h:
189 * WebView.subproj/WebHTMLRepresentation.m:
190 (-[WebHTMLRepresentation elementForView:]): removed
192 2005-07-27 John Sullivan <sullivan@apple.com>
194 Patch by Trey Matteson <trey@usa.net>
197 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4169
198 scaling PDF view up leaves later HTML view scaled too
200 An additional step of separating scaling of HTML and PDF. If we do a zoom and there
201 are no docViews that track the common scaling factor, then don't change it. Thus in
202 the common PDF case where it is the only doc view, scaling the PDF does not affect
203 HTML pages loaded in the same window.
205 * WebView.subproj/WebView.m:
206 (-[WebView canMakeTextSmaller]): Pass 0 for new scaling factor, since we just querying.
207 (-[WebView canMakeTextLarger]): Ditto.
208 (-[WebView makeTextSmaller:]): Pass new scaling factor.
209 (-[WebView makeTextLarger:]): Ditto.
210 (-[WebView canMakeTextStandardSize]): Pass 0 for new scaling factor.
211 (-[WebView makeTextStandardSize:]): Pass new scaling factor.
212 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
213 The meat of the change is that this Swiss Army Knife also takes a new scaling
214 factor, which it will set as the common scaling factor if it finds any doc views that
215 are able to be scaled which track the common scaling factor.
217 2005-07-27 John Sullivan <sullivan@apple.com>
219 Patch by Trey Matteson <trey@usa.net>
222 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4015
223 PDF views should remember viewing mode, scroll position across back/forward
224 Note this doesn't work within frames because of a PDFKit bug - see 4164
225 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4091
226 PDF views should keep a separate scaling factor from shared text scaling factor
228 Basic idea #1 is that we now have a general mechanism for a WebDocView to save/restore some UI
229 state to the WebHistoryItem.
230 Basic idea #2 is that _WebDocumentTextSizing is expanded to allow for the case of a WebDocView
231 keeping its own notion of a scaling factor. WebPDFView's -_tracksCommonSizeFactor has justification.
233 * History.subproj/WebHistoryItem.m:
234 (-[WebHistoryItem setViewState:]): New methods to hold PList of arbitrary WebView state
235 (-[WebHistoryItem viewState]):
236 * History.subproj/WebHistoryItemPrivate.h:
237 * WebKit.xcodeproj/project.pbxproj: Add Quartz to framework path so we can import PDFKit files
238 * WebView.subproj/WebDocumentInternal.h: New methods added to _WebDocumentTextSizing.
239 Also the _ prefix is sufficient instead of _web_WebDocumentTextSizing.
240 Added _WebDocumentViewState protocol.
241 * WebView.subproj/WebFrame.m:
242 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): Rename of save/restore methods.
243 (-[WebFrame _detachFromParent]): Ditto
244 (-[WebFrame _transitionToCommitted:]): Ditto
245 (-[WebFrame _checkLoadCompleteForThisFrame]): Ditto
246 (-[WebFrame _loadItem:withLoadType:]): Ditto
247 (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]): Ditto
248 (-[WebFrame _saveViewStateToItem:]): Call doc view to retrieve view state.
249 (-[WebFrame _restoreViewState]): Call doc view to set view state.
250 (-[WebFrame _scrollToTop]): Nuked dead code.
251 (-[WebFrame _textSizeMultiplierChanged]): This work now appears in WebView.
252 (-[WebFrame _saveDocumentAndScrollState]): Same rename, one code cleanup.
253 (-[WebFrame _accumulateDocumentViews:]): Add our docview to the array, call kids.
254 (-[WebFrame _documentViews]): New helper to return all docviews.
255 (-[WebFrame _didFirstLayout]): Same name change.
256 * WebView.subproj/WebFrameInternal.h:
257 * WebView.subproj/WebFramePrivate.h:
258 * WebView.subproj/WebHTMLView.m: Removed redundant category decl.
259 (-[WebHTMLView _makeTextSmaller:]): Implement new protocol.
260 (-[WebHTMLView _makeTextLarger:]):
261 (-[WebHTMLView _makeTextStandardSize:]):
262 (-[WebHTMLView _tracksCommonSizeFactor]):
263 * WebView.subproj/WebPDFRepresentation.m: Tweak #imports.
264 * WebView.subproj/WebPDFView.h:
265 * WebView.subproj/WebPDFView.m:
266 (-[WebPDFView _menuItemsFromPDFKitForEvent:]): No longer intercept context menu text sizing items.
267 (-[WebPDFView setDataSource:]): No longer track the WebView's scaling factor.
268 (-[WebPDFView scrollPoint]): Dig through PDFKit view tree to get real scroll position
269 (-[WebPDFView setScrollPoint:]): Ditto
270 (-[WebPDFView viewState]): Return bundle of viewing params
271 (-[WebPDFView setViewState:]): Restore bundle of viewing params
272 (-[WebPDFView _makeTextSmaller:]): Implement new text sizing protocol
273 (-[WebPDFView _makeTextLarger:]):
274 (-[WebPDFView _makeTextStandardSize:]):
275 (-[WebPDFView _tracksCommonSizeFactor]):
276 (-[WebPDFView _canMakeTextSmaller]):
277 (-[WebPDFView _canMakeTextLarger]):
278 (-[WebPDFView _canMakeTextStandardSize]):
279 * WebView.subproj/WebTextView.m:
280 (-[WebTextView _makeTextSmaller:]): Implement new text sizing protocol
281 (-[WebTextView _makeTextLarger:]):
282 (-[WebTextView _makeTextStandardSize:]):
283 (-[WebTextView _tracksCommonSizeFactor]):
284 * WebView.subproj/WebView.m:
285 (-[WebView setTextSizeMultiplier:]): Calling docViews is now more complicates than just posting
286 a notification to the frame.
287 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:]): Workhorse
288 that sends the text sizing method to the right doc views.
289 (-[WebView canMakeTextSmaller]): Call workhorse.
290 (-[WebView canMakeTextLarger]): Ditto
291 (-[WebView makeTextSmaller:]): Ditto
292 (-[WebView makeTextLarger:]): Ditto
293 (-[WebView canMakeTextStandardSize]): Ditto
294 (-[WebView makeTextStandardSize:]): Ditto
296 2005-07-26 Justin Garcia <justin.garcia@apple.com>
298 Patch by Trey Matteson <trey@usa.net>
300 Reviewed by John Sullivan.
302 Fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4072>
303 Pressing back in browser misses out a page
305 * WebView.subproj/WebFrame.m:
306 (-[WebFrame _transitionToCommitted:]): When reloading the same page or refreshing the
307 page, update the URL in the b/f item with the URL that we wind up at. Due to cookies,
308 it might be different than the result we just got when we loaded the same page.
310 2005-07-26 David Hyatt <hyatt@apple.com>
312 Make WebHTMLView inherit from NSControl instead of NSView.
313 This change is necessary because the theme renderer for
314 WebCore that draws controls with the Aqua appearance does so
315 using NSCells. NSCells must be hosted within a control view
316 in order to paint properly.
318 The method updateCell must be overridden because it wants to
319 repaint the whole control when the windows resigns/becomes
320 key, and this would result in behavior that we don't want
321 (the repainting of the whole view). We already have hooks
322 in WebHTMLView for the window resigning/becoming key so
323 we will do our proper control updating there instead (in a
328 * WebView.subproj/WebHTMLView.h:
329 * WebView.subproj/WebHTMLView.m:
330 (-[WebHTMLView updateCell:]):
332 2005-07-26 John Sullivan <sullivan@apple.com>
334 Reviewed by Chris Blumenberg.
336 - more work to wean form-related SPI from NSView. All that's left (but this is a big "all")
337 is viewForElement: and elementForView:
339 * WebCoreSupport.subproj/WebBridge.m:
340 (-[WebBridge textField:doCommandBySelector:]):
341 changed signature to pass along DOMElement* rather than NSView*
343 * WebView.subproj/WebFormDelegate.h:
344 * WebView.subproj/WebFormDelegate.m:
345 (-[WebFormDelegate textField:doCommandBySelector:inFrame:]):
348 2005-07-25 John Sullivan <sullivan@apple.com>
350 Reviewed by Darin Adler.
352 - big hunk of weaning form-related SPI from NSView; autofill continues to
353 work (but only on tip of tree Safari)
355 * WebCoreSupport.subproj/WebBridge.m:
356 (-[WebBridge textFieldDidBeginEditing:]):
357 changed name from controlTextXXX:, now takes a DOMHTMLInputElement*
358 (-[WebBridge textFieldDidEndEditing:]):
360 (-[WebBridge textDidChangeInTextField:]):
362 (-[WebBridge textDidChangeInTextArea:]):
363 changed name from textDidChange:, now takes a DOMHTMLTextAreaElement*
364 (-[WebBridge control:textShouldBeginEditing:]):
365 removed this method as it wasn't being used by autofill, and did nothing in WebKit
366 (-[WebBridge control:textShouldEndEditing:]):
368 (-[WebBridge textField:shouldHandleEvent:]):
369 changed name from control:textView:shouldHandleEvent:, now takes a DOMHTMLInputElement*.
370 The textView parameter wasn't being used, so I eliminated it.
372 * WebView.subproj/WebFormDelegate.h:
373 * WebView.subproj/WebFormDelegate.m:
374 (-[WebFormDelegate textFieldDidBeginEditing:inFrame:]):
375 (-[WebFormDelegate textFieldDidEndEditing:inFrame:]):
376 (-[WebFormDelegate control:textShouldBeginEditing:inFrame:]):
377 (-[WebFormDelegate control:textShouldEndEditing:inFrame:]):
378 (-[WebFormDelegate textDidChangeInTextField:inFrame:]):
379 (-[WebFormDelegate textDidChangeInTextArea:inFrame:]):
380 (-[WebFormDelegate textField:shouldHandleEvent:inFrame:]):
381 These all changed in the same way as the WebBridge methods
384 2005-07-25 Vicki Murley <vicki@apple.com>
388 - fixed <rdar://problem/3470523> Safari's user agent should be changed to say Intel rather
389 than PPC on Intel machines
391 * WebView.subproj/WebView.m: add conditional #defines for "PPC" and "Intel"
392 (-[WebView userAgentForURL:]): use this variable when constructing the user agent string
394 2005-07-24 Justin Garcia <justin.garcia@apple.com>
398 - Fixes <rdar://problem/4120535> deleteToEndOfLine: does not delete thew newline when at the end of a line
399 Fix to match NSTextView. Delete the next character if deleteToEndOfLine fails
401 * WebView.subproj/WebHTMLView.m:
402 (-[WebHTMLView deleteToEndOfLine:]):
404 2005-07-24 Justin Garcia <justin.garcia@apple.com>
406 Patch by Trey Matteson <trey@apple.com>
410 Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3953> back-forward items have wrong titles after sub-frame navigations
412 This was caused by a mistaken data structure, where WebDataSource tried to keep a list of
413 b/f items it was responsible for. The problem arose in the case of frames, where a subframe
414 was loaded with new content. When this happens a fresh tree of b/f items is created,
415 but the reference in the DataSource still pointed to the old item.
417 Since the WebFrame does a lot of work to track the current b/f item, the easiest thing is to
418 get rid of the DataSource's reference, and have it ask the WebFrame to set the title on the
421 * WebView.subproj/WebDataSource.m:
422 (-[WebDataSourcePrivate dealloc]):
423 (-[WebDataSource _setTitle:]):
424 * WebView.subproj/WebDataSourcePrivate.h:
425 * WebView.subproj/WebFrame.m:
426 (-[WebFrame _createItem:]):
427 (-[WebFrame _transitionToCommitted:]):
428 (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
429 (-[WebFrame _setTitle:]):
430 * WebView.subproj/WebFramePrivate.h:
432 2005-07-24 Justin Garcia <justin.garcia@apple.com>
436 Fixed make clean problem
440 2005-07-23 Justin Garcia <justin.garcia@apple.com>
442 Patch by <opendarwin.org@mitzpettel.com>
444 Reviewed by darin and hyatt
446 Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3862>
447 The fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=3545> enclosed each run of visually ordered
448 hebrew with LRO and PDF control characters, but adjusted the run's to and from to include those characters,
449 so that they would be rendered if the font includes a glyph for bidi control characters.
451 Also adding a manual test
453 * WebCoreSupport.subproj/WebTextRenderer.m:
454 (reverseCharactersInRun):
456 2005-07-22 John Sullivan <sullivan@apple.com>
458 Reviewed by Justin Garcia.
460 Mail (running on tip of tree WebKit) was running into an assertion I recently added.
461 The assertion is actually correct, catching an old bug in this code.
463 * WebView.subproj/WebView.m:
464 (-[WebView selectedFrame]):
465 if the first responder is a WebFrameView, then we've found the WebFrameView we're
466 looking for, and we shouldn't look at its superviews.
468 2005-07-22 John Sullivan <sullivan@apple.com>
470 Reviewed by Chris Blumenberg.
472 - some changes in the direction of weaning all the form-related SPI from NSView
474 * PublicHeaderChangesFromTiger.txt:
475 noted that the WebCore change to add -[DOMHTMLInputElement isTextField] to
476 DOMExtensions.h is a public header change.
478 * WebView.subproj/WebHTMLRepresentation.h:
479 * WebView.subproj/WebHTMLRepresentation.m:
480 (-[WebHTMLRepresentation viewForElement:]):
481 added viewForElement: as a stopgap measure. This allowed me to convert controlsInForm:
482 to return DOMElements rather than NSViews, while keeping autocomplete working in
483 Safari tip of tree. When I finish the SPI conversion I'll delete this method. Note that
484 from this point on, autocomplete will not work in Tiger Safari with tip of tree WebKit
485 (it will always fail to find anything to autocomplete)
487 2005-07-21 Adele Peterson <adele@apple.com>
491 Changing temporary #ifndef to #if
493 * WebCoreSupport.subproj/WebImageData.m:
494 (-[WebImageData _checkSolidColor:]):
496 2005-07-21 Adele Peterson <adele@apple.com>
498 Reviewed by Chris Blumenberg.
500 - fixed <rdar://problem/4132797> don't register thin PPC WebKit plug-ins
502 <rdar://problem/4127100> [WebKit] 8B1016: After installing Acrobat Reader, can no longer see pdf's in Safari
504 * Plugins.subproj/WebBasePluginPackage.h: Added isNativeLibraryData method.
505 * Plugins.subproj/WebBasePluginPackage.m: (-[WebBasePluginPackage isNativeLibraryData:]): Added isNativeLibraryData method.
506 * Plugins.subproj/WebNetscapePluginPackage.m: (-[WebNetscapePluginPackage initWithPath:]):
507 calls isNativeLibraryData to determine whether or not to register the plug-in.
508 * Plugins.subproj/WebPluginPackage.m: (-[WebPluginPackage initWithPath:]): ditto.
509 * WebCoreSupport.subproj/WebImageData.m: (-[WebImageData _checkSolidColor:]): added comment for #ifdef.
511 2005-07-21 Geoffrey Garen <ggaren@apple.com>
513 * WebKit.pbproj/project.pbxproj: Removed.
515 2005-07-21 Geoffrey Garen <ggaren@apple.com>
517 * WebKit.xcodeproj/.cvsignore: Added.
519 2005-07-21 Geoffrey Garen <ggaren@apple.com>
521 * WebKit.xcodeproj/project.pbxproj: Added.
523 2005-07-21 Geoffrey Garen <ggaren@apple.com>
527 2005-07-20 John Sullivan <sullivan@apple.com>
529 Reviewed by Vicki Murley.
531 - removed some form-related methods that weren't being used anywhere, in preparation
532 for weaning WebKit's WebFormDelegate protocol from NSView.
534 * WebCoreSupport.subproj/WebBridge.m:
535 * WebView.subproj/WebFormDelegate.h:
536 * WebView.subproj/WebFormDelegate.m:
537 removed these methods:
538 -control:didFailToFormatString:errorDescription:
539 -control:didFailToValidatePartialString:errorDescription:
540 -control:isValidObject:
542 2005-07-20 Adele Peterson <adele@apple.com>
545 <rdar://problem/4125127> [WebKit] horizontal rulers don't render on Safari on web.apple.com
547 * WebCoreSupport.subproj/WebImageData.m:
548 (-[WebImageData _checkSolidColor:]):
550 2005-07-20 Adele Peterson <adele@apple.com>
553 <rdar://problem/4118278> mail divide by zero navigating messages
555 * WebCoreSupport.subproj/WebTextRenderer.m:
556 (-[WebTextRenderer _extendGlyphToWidthMapToInclude:font:]):
558 2005-07-20 John Sullivan <sullivan@apple.com>
560 Reviewed by Adele Peterson.
562 - added -[WebView selectedFrame] to SPI (pending public API), needed for 4180958
564 * WebView.subproj/WebView.m:
565 (-[WebView selectedFrame]):
566 new method, extracted from _selectedOrMainFrame
567 (-[WebView _selectedOrMainFrame]):
568 now calls extracted method
570 * WebView.subproj/WebViewPrivate.h:
571 add -selectedFrame to PendingPublic category
573 2005-07-19 John Sullivan <sullivan@apple.com>
575 Reviewed by Darin Adler.
577 - cleaned up code related to dealing with the "selected frame"; fixes radar bugs 4118830 and 4118820
579 * WebView.subproj/WebTextView.m:
580 (-[WebTextView resignFirstResponder]):
581 call deselectAll here instead of replicating its guts, just for clarity
583 * WebView.subproj/WebViewInternal.h:
584 eliminated category WebInternal; all of these methods were used only inside WebView.m, so I moved
585 them into the existing category WebFileInternal that was declared and implemented in WebView.m
587 * WebView.subproj/WebView.m:
588 (-[WebView searchFor:direction:caseSensitive:wrap:]):
589 updated for name changes. Also, uses new _deselectFrame: to clear the selection if the found
590 text is in a different frame.
591 (-[WebView pasteboardTypesForSelection]):
592 (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
593 (-[WebView setSelectedDOMRange:affinity:]):
594 (-[WebView selectedDOMRange]):
595 (-[WebView selectionAffinity]):
596 (-[WebView setTypingStyle:]):
597 (-[WebView typingStyle]):
598 (-[WebView styleDeclarationWithText:]):
599 (-[WebView replaceSelectionWithNode:]):
600 (-[WebView replaceSelectionWithText:]):
601 (-[WebView replaceSelectionWithMarkupString:]):
602 (-[WebView replaceSelectionWithArchive:]):
603 (-[WebView deleteSelection]):
604 (-[WebView applyStyle:]):
605 updated for name changes only
607 (-[WebView _frameIsSelected:]):
608 new method, returns YES if given frame has a non-zero-length selection
609 (-[WebView _deselectFrame:]):
610 new method, clears selection from given frame
611 (-[WebView _findSelectedFrameStartingFromFrame:]):
612 new method, recursive helper used by _findSelectedFrame
613 (-[WebView _findSelectedFrame]):
614 new method, finds first frame that returns YES for _frameIsSelected, or nil
615 (-[WebView _debugCollectSelectedFramesIntoArray:startingFromFrame:]):
616 new method, recursive helper used by _debugCheckForMultipleSelectedFrames
617 (-[WebView _debugCheckForMultipleSelectedFrames]):
618 new method for debugging, fires an assertion if there's more than one selected frame.
619 (-[WebView _selectedOrMainFrame]):
620 renamed from _frameForCurrentSelection, which was a misleading name since the returned
621 frame does not necessarily have a selection (or even focus). Now checks for a selected
622 but non-focused frame if the first responder is not in any frame. Also, moved in file
623 from WebInternal category to WebFileInternal category.
624 (-[WebView _bridgeForSelectedOrMainFrame]):
625 renamed from _bridgeForCurrentSelection, which was a misleading name for the same
626 reasons as _frameForCurrentSelection. Also, moved in file from WebInternal category to
627 WebFileInternal category.
628 (-[WebView _isLoading]):
629 (-[WebView _frameViewAtWindowPoint:]):
630 (-[WebView _bridgeAtPoint:]):
631 just moved in file from WebInternal category to WebFileInternal category
633 2005-07-19 Darin Adler <darin@apple.com>
635 Reviewed by Geoff Garen.
637 - improve handling of plug-ins when the WebView or a superview is hidden with -[NSView setHidden]
639 * Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
640 Add "hidden" to the list of reasons to clip out all plug-in drawing.
642 2005-07-18 John Sullivan <sullivan@apple.com>
644 Written by Trey Matteson <trey@usa.net>
645 Reviewed by John Sullivan.
647 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4049
648 scroll position not restored when going back/forward at ebay
649 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4061
650 When going back/forward to some pages, they redraw at top before restoring scroll position
652 The short story is that attempting to restore the scroll position
653 at the time when the first layout finishes addresses both of these
654 issues. An explanation of the underlying race condition is in
655 a large comment near -_restoreScrollPosition.
657 * WebCoreSupport.subproj/WebBridge.m:
658 (-[WebBridge didFirstLayout]): Pass through to WebFrame.
659 * WebView.subproj/WebFrame.m:
660 (-[WebFrame _transitionToCommitted:]): Get rid of attempt to
661 restoreScrollPosition that never did anything because the
662 docView was always 0x0 size at that point.
663 (-[WebFrame _opened]): Get rid of redundant call to restoreScrollPosition.
664 The imminent call to layoutCompleted makes the same call.
665 (-[WebFrame _didFirstLayout]): Restore the scroll position on
666 first layout, if we're doing a b/f nav.
667 * WebView.subproj/WebFrameInternal.h:
669 2005-07-18 John Sullivan <sullivan@apple.com>
671 Reviewed by Darin Adler.
674 <rdar://problem/4158121> context menu in PDF view should contain the selection-based items like Copy
675 <rdar://problem/4184691> WebPDFView should conform to the WebDocumentElement protocol
676 <rdar://problem/4184663> "Search in Spotlight" is present but dimmed in context menu for plain-text documents
678 * WebView.subproj/WebDefaultContextMenuDelegate.m:
679 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
680 added ASSERT and comments
682 * WebView.subproj/WebHTMLView.m:
683 (-[WebHTMLView _searchWithGoogleFromMenu:]):
684 removed this method (now handled by WebView)
685 (-[WebHTMLView _searchWithSpotlightFromMenu:]):
687 (-[WebHTMLView validateUserInterfaceItem:]):
688 removed validation for removed items. The validation wasn't necessary anyway, since we only put these items
689 in the menu in the case where they should be enabled.
691 * WebView.subproj/WebPDFView.h:
692 now conforms to WebDocumentElement protocol (which lets [WebView elementAtPoint:] work better)
693 * WebView.subproj/WebPDFView.m:
694 (-[WebPDFView copy:]):
695 added, hands off to PDFView, needed to enable Copy in context menu
696 (-[WebPDFView _pointIsInSelection:]):
697 new method, checks whether given point is in the selected bounds
698 (-[WebPDFView elementAtPoint:]):
699 add WebElementIsSelectedKey to returned element
700 (-[WebPDFView menuForEvent:]):
701 use actual point instead of dummy placeholder, now that we have code that pays attention to the point
703 * WebView.subproj/WebView.m:
704 (-[WebView _searchWithGoogleFromMenu:]):
705 moved here from WebHTMLView so it will work for any documentView that conforms to WebDocumentText.
706 Rewrote slightly to be non-WebHTMLView-specific. (This menu item was always enabled in Safari because
707 Safari replaces its action, but it would not have been always enabled in other WebKit clients, though
708 it should have been.)
709 (-[WebView _searchWithSpotlightFromMenu:]):
710 moved here from WebHTMLView so it will work for any documentView that conforms to WebDocumentText.
711 Rewrote slightly to be non-WebHTMLView-specific.
713 2005-07-18 John Sullivan <sullivan@apple.com>
715 Reviewed by Richard Williamson.
717 - fixed <rdar://problem/4184366> WebPDFView should conform to the WebDocumentSelection protocol
719 * Misc.subproj/WebNSAttributedStringExtras.h: Added.
720 * Misc.subproj/WebNSAttributedStringExtras.m: Added.
721 (-[NSAttributedString _web_attributedStringByStrippingAttachmentCharacters]):
722 New category on NSAttributedString, initially contains this one method that had been in WebHTMLView.
724 * WebView.subproj/WebHTMLView.m:
725 (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
726 now uses _web_attributedStringByStrippingAttachmentCharacters
728 * WebView.subproj/WebPDFView.h:
729 now conforms to WebDocumentSelection protocol
730 * WebView.subproj/WebPDFView.m:
731 (-[WebPDFView selectionRect]):
732 new, implementation of WebDocumentSelection protocol method
733 (-[WebPDFView pasteboardTypesForSelection]):
735 (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
738 * WebKit.pbproj/project.pbxproj:
739 updated for new files
741 2005-07-18 John Sullivan <sullivan@apple.com>
743 Reviewed by Chris Blumenberg.
745 - some refactoring cleanup in the selection/searching code
747 * Misc.subproj/WebSearchableTextView.h:
748 moved WebDocumentSelection protocol conformation to this class, was in subclass WebTextView
749 * Misc.subproj/WebSearchableTextView.m:
750 (-[WebSearchableTextView selectionRect]):
751 new method (moved here from Safari) to return a single rect encompassing all selected text
752 (-[WebSearchableTextView pasteboardTypesForSelection]):
753 moved here from WebTextView
754 (-[WebSearchableTextView writeSelectionWithPasteboardTypes:toPasteboard:]):
757 * WebView.subproj/WebDocumentInternal.h:
758 moved WebDocumentSelection protocol out of here
760 * WebView.subproj/WebDocumentPrivate.h:
761 moved WebDocumentSelection protocol into here, added selectionRect method
763 * WebView.subproj/WebHTMLView.m:
764 (-[WebHTMLView selectionRect]):
765 new method, calls existing bridge method formerly called by _selectionRect
766 (-[WebHTMLView _selectionRect]):
767 now calls [self selectionRect]. We can't just delete _selectionRect because it's used by Mail.
769 * WebView.subproj/WebHTMLViewPrivate.h:
770 removed _selectionRect since it's in WebDocumentSelection now
772 * WebView.subproj/WebTextView.h:
773 removed WebDocumentSelection from protocol list since it's in superclass now
775 * WebView.subproj/WebTextView.m:
776 removed old WebDocumentSelection methods because they are in superclass now
778 2005-07-15 Adele Peterson <adele@apple.com>
780 Written by Trey Matteson <trey@usa.net>
781 Reviewed by John Sullivan.
783 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3910 - REGRESSION: Replying "Cancel" to the form repost nag leaves wrong b/f cursor
785 * WebView.subproj/WebFrame.m:
786 (-[WebFrame _resetBackForwardList]): new helper method
787 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
788 If the delegate bailed on the navigation, tell the main frame
789 to reset the b/f cursor back to where it was before we started.
791 2005-07-15 John Sullivan <sullivan@apple.com>
793 Written by Trey Matteson
796 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4013
797 text find doesn't wrap in PDF files
799 This just works once WebPDFView implements the WebDocumentText protocol, which is
800 mostly just a matter of forwarding the methods to PDFKit appropriately.
802 * WebView.subproj/WebPDFView.h:
803 * WebView.subproj/WebPDFView.m:
804 (-[WebPDFView supportsTextEncoding]):
805 (-[WebPDFView string]):
806 (-[WebPDFView attributedString]):
807 (-[WebPDFView selectedString]):
808 (-[WebPDFView selectedAttributedString]):
809 (-[WebPDFView selectAll]):
810 (-[WebPDFView deselectAll]):
812 2005-07-15 John Sullivan <sullivan@apple.com>
814 Reviewed by Kevin Decker.
816 - fixed <rdar://problem/4181884> Searching for text that overlaps selection works
817 differently in PDFView than in HTMLView
819 * WebView.subproj/WebPDFView.m:
820 (PDFSelectionsAreEqual):
821 new function, stand-in for nonexistent -[PDFSelection isEqual:] since calling isEqual:
822 on two identical PDFSelections returns NO
823 (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
824 Make search algorithm match that in WebCore: initially search inside selection, then check for the case
825 where the found text exactly matches the previous selection, and search from past the selection if so.
826 The implementation is slightly more complicated than it should be due to PDFKit API limitations (about
827 which I added FIXMEs and filed bugs)
829 2005-07-15 John Sullivan <sullivan@apple.com>
831 Reviewed by Maciej Stachowiak.
834 <rdar://problem/4181875> Searching for text that overlaps selection works differently in WebTextView than in HTMLView
835 <rdar://problem/3393678> Find not finding text in plain (non-HTML) if all text is selected
837 * Misc.subproj/WebSearchableTextView.m:
838 (-[NSString findString:selectedRange:options:wrap:]):
839 Make search algorithm match that in WebCore: initially search inside selection, then check for the case
840 where the found text exactly matches the previous selection, and search from past the selection if so.
842 2005-07-14 John Sullivan <sullivan@apple.com>
844 Reviewed by Dave Hyatt.
846 - WebKit part of fix for:
847 <rdar://problem/4181227> webpages incorrectly use standard instead of secondary highlighting in certain cases
849 * WebCoreSupport.subproj/WebBridge.m:
850 (-[WebBridge formControlIsResigningFirstResponder:]):
851 Implementation of new method defined in WebCore, passes call along to WebHTMLView
853 * WebView.subproj/WebHTMLViewInternal.h:
854 declare _formControlIsResigningFirstResponder: so bridge can call it
856 * WebView.subproj/WebHTMLView.m:
857 (-[WebHTMLView updateFocusState]):
858 just moved in file so it could be called from a different category
859 (-[WebHTMLView _formControlIsResigningFirstResponder:]):
860 new method, updates focus state
862 2005-07-14 John Sullivan <sullivan@apple.com>
864 added missing #import to fix build
865 * WebView.subproj/WebPDFView.m
867 2005-07-14 Kevin Decker <kdecker@apple.com>
871 Fixed: <rdar://problem/4122282> clicking a link in an PDF file opens the link with NSWorkspace without the usual security checks or WebView delegate control
873 * WebView.subproj/WebFrame.m:
874 (-[WebFrame _safeLoadURL:]): added
875 * WebView.subproj/WebFrameInternal.h:
876 * WebView.subproj/WebPDFView.m:
877 (-[WebPDFView initWithFrame:]):
878 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): prevents evilness with a call to _safeLoadURL
879 * WebView.subproj/WebTextView.m:
880 (-[WebTextView clickedOnLink:atIndex:]): factored calling out to the bridge, and instead call _safeLoadURL
882 2005-07-14 Vicki Murley <vicki@apple.com>
884 Reviewed by Kocienda.
886 - WebKit part of fix for <rdar://problem/4172380> [GENENTECH] window.opener
887 not available when child opened via target="_new"
889 Add a setOpener function to the WebCore bridge, and call this function when opening
890 new windows through Web Kit.
892 * WebView.subproj/WebFrame.m:
893 (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
895 2005-07-13 Justin Garcia <justin.garcia@apple.com>
899 Rolling in changes necessary to build with newer versions of gcc 4.0
901 * History.subproj/WebHistoryItem.m:
902 (-[WebHistoryItem copyWithZone:]):
903 * Misc.subproj/WebNSPasteboardExtras.m:
904 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]):
905 * Misc.subproj/WebNSURLExtras.m:
906 (-[NSURL _web_URLWithLowercasedScheme]):
907 (-[NSString _web_mapHostNameWithRange:encode:makeString:]):
908 * WebCoreSupport.subproj/WebBridge.m:
909 (-[WebBridge MIMETypeForPath:]):
910 * WebCoreSupport.subproj/WebImageRendererFactory.m:
911 (-[WebImageRendererFactory imageRendererWithBytes:length:MIMEType:]):
912 * WebCoreSupport.subproj/WebTextRenderer.m:
913 (-[WebTextRenderer initWithFont:usingPrinterFont:]):
914 * WebView.subproj/WebFrame.m:
915 (-[WebFrame _webDataRequestForData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
916 * WebView.subproj/WebHTMLView.m:
917 (-[WebHTMLView _styleFromFontAttributes:]):
918 * WebView.subproj/WebView.m:
919 (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
920 (-[WebView mainFrameTitle]):
922 2005-07-13 John Sullivan <sullivan@apple.com>
924 Reviewed by Maciej Stachowiak.
926 - cleaned up Find-related experimental code that I checked in a while back
928 * WebView.subproj/WebHTMLView.m:
929 (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
930 remove variant of this method that had findInSelection flag; this method is now
931 the same as it was on Tiger.
933 * WebView.subproj/WebView.m:
934 (-[WebView searchFor:direction:caseSensitive:wrap:]):
937 2005-07-12 Geoffrey Garen <ggaren@apple.com>
939 -rolled in patch by opendarwin.org@mitzpettel.com
940 for http://bugzilla.opendarwin.org/show_bug.cgi?id=3435
941 Parentheses are backwards in Hebrew text (no bidi mirroring?)
945 Layout test added to WebCore.
947 * WebCoreSupport.subproj/WebTextRenderer.h:
948 * WebCoreSupport.subproj/WebTextRenderer.m:
949 (-[WebTextRenderer _initializeATSUStyle]):
950 (applyMirroringToRun):
951 (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]):
952 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
953 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
955 2005-07-12 Ken Kocienda <kocienda@apple.com>
957 Reviewed by Chris Blumenberg
959 * WebCoreSupport.subproj/WebBridge.m: Removed some glue that allowed one
960 of two unicode (TEC or ICU ) to be chosen at runtime. I just added this
961 dual support yesterday, and while Maciej and I agreed that it was good
962 to land in the tree in case we run into problems in the near future, we
963 also agreed that cutting over to using ICU full time right now is
964 probably the best way to find bugs.
966 2005-07-11 Ken Kocienda <kocienda@apple.com>
970 * WebCoreSupport.subproj/WebBridge.m:
971 (+[WebBridge setTextConversionMethod:]): New method to support switching text conversion method.
972 (+[WebBridge textConversionMethod]): Returns current text conversion method.
974 2005-07-11 Kevin Decker <kdecker@apple.com>
976 Reviewed by cblu and mjs.
978 Fixed: <rdar://problem/4099552> REGRESSION: Safari 1.3 Netscape API NPN_PostURL[Notify] no longer allows manual headers
980 Most plugins (flash) send 2 CRFL's between the header and body of their POST requests, while the adboe plugin sends two LF's. This caused us to send custom headers as part of the actual POST data itself, and correspondently, would skew Content-Length.
982 * Plugins.subproj/WebBaseNetscapePluginView.m:
983 (-[NSData _web_locationAfterFirstBlankLine]): Look for two LF's as well
985 2005-07-09 Maciej Stachowiak <mjs@apple.com>
987 - back out my revent page cache changes, turns out they cause a
988 major performance regression on PLT
990 * WebView.subproj/WebFrame.m:
991 (-[WebFrame _purgePageCache]):
993 2005-07-09 Maciej Stachowiak <mjs@apple.com>
997 Replace int with unsigned, to avoid going into a huge loop when
998 back list count is 0.
1000 * WebView.subproj/WebFrame.m:
1001 (-[WebFrame _purgePageCache]):
1003 2005-07-09 Maciej Stachowiak <mjs@apple.com>
1005 - fixed broken Development build
1007 * WebView.subproj/WebFrame.m:
1008 (-[WebFrame _purgePageCache]):
1010 2005-07-09 Maciej Stachowiak <mjs@apple.com>
1014 - fix page cache purging logic; this gets rid of a bug where the
1015 page cache would grow without bound if the oldest page cache item
1016 was the snapback item, and changed the rule a bit so page cache
1017 items farther back than the max size get purged, even if fewer
1018 than the max size are in current use.
1020 * WebView.subproj/WebFrame.m:
1021 (-[WebFrame _purgePageCache]):
1023 2005-07-08 Geoffrey Garen <ggaren@apple.com>
1025 Rolled in patch by opendarwin.org@mitzpettel.com
1027 -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3818
1028 Fallback font doesn't have requested weight in ATSUI-rendered text
1030 (See WebCore Changelog for layout test)
1034 * WebCoreSupport.subproj/WebTextRenderer.m:
1035 (-[WebTextRenderer _createATSUTextLayoutForRun:style:]):
1037 2005-07-05 Adele Peterson <adele@apple.com>
1039 Rolling out changes for <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
1040 since it caused a 2% performance regression.
1042 * WebCoreSupport.subproj/WebTextRenderer.m:
1044 (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
1045 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startPosition:numGlyphs:]):
1046 (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]):
1047 (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
1048 (initializeCharacterWidthIterator):
1049 (widthForNextCharacter):
1051 2005-07-05 John Sullivan <sullivan@apple.com>
1053 Reviewed by Chris Blumenberg.
1055 - fixed <rdar://problem/4158230> Zoom In/Zoom Out in PDF context menu don't update window's notion of text size
1057 * WebView.subproj/WebPDFView.m:
1058 (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
1059 Redirect Actual Size, Zoom In, and Zoom Out context menu items so that they behave exactly like Make Text Standard Size,
1060 Make Text Larger, and Make Text Smaller.
1062 2005-07-01 John Sullivan <sullivan@apple.com>
1064 Reviewed by Darin Adler.
1066 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3711: Displayed PDF have limited options in contextual menu
1068 This was a problem with using Tiger's version of Safari with tip of tree WebKit.
1070 * WebView.subproj/WebPDFView.m:
1071 (-[WebPDFView _anyPDFTagsFoundInMenu:]):
1072 new method, returns YES if the menu contains any items with any of the new PDF-related tags.
1073 (-[WebPDFView menuForEvent:]):
1074 If the executable was linked on Tiger or older (but it will never be older, since this code is
1075 new to Tiger), force all of the PDF-related items into the menu if none of them were there
1076 after processing by the delegate.
1078 2005-06-30 Darin Adler <darin@apple.com>
1080 Reviewed by John Sullivan.
1082 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3774>
1083 do renaming so that loaders are called "loader", not "client" or "delegate"
1085 * Misc.subproj/WebIconLoader.h:
1086 * Plugins.subproj/WebNetscapePluginStream.h:
1087 * Plugins.subproj/WebNetscapePluginStream.m:
1088 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
1089 (-[WebNetscapePluginStream start]):
1090 (-[WebNetscapePlugInStreamLoader didFinishLoading]):
1091 (-[WebNetscapePlugInStreamLoader didFailWithError:]):
1092 (-[WebNetscapePlugInStreamLoader cancelWithError:]):
1093 * WebCoreSupport.subproj/WebBridge.m:
1094 (-[WebBridge startLoadingResource:withURL:customHeaders:]):
1095 (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]):
1096 (-[WebBridge canRunModalNow]):
1097 * WebCoreSupport.subproj/WebSubresourceClient.h: Removed.
1098 * WebCoreSupport.subproj/WebSubresourceClient.m: Removed.
1099 * WebCoreSupport.subproj/WebSubresourceLoader.h:
1100 * WebCoreSupport.subproj/WebSubresourceLoader.m:
1101 (-[WebSubresourceLoader initWithLoader:dataSource:]):
1102 (-[WebSubresourceLoader dealloc]):
1103 (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
1104 (+[WebSubresourceLoader startLoadingResource:withURL:customHeaders:referrer:forDataSource:]):
1105 (+[WebSubresourceLoader startLoadingResource:withURL:customHeaders:postData:referrer:forDataSource:]):
1106 (-[WebSubresourceLoader didReceiveResponse:]):
1107 (-[WebSubresourceLoader didReceiveData:lengthReceived:]):
1108 (-[WebSubresourceLoader didFinishLoading]):
1109 (-[WebSubresourceLoader didFailWithError:]):
1110 (-[WebSubresourceLoader cancel]):
1111 * WebKit.pbproj/project.pbxproj:
1112 * WebView.subproj/WebBaseResourceHandleDelegate.h: Removed.
1113 * WebView.subproj/WebBaseResourceHandleDelegate.m: Removed.
1114 * WebView.subproj/WebDataSource.m:
1115 (-[WebDataSourcePrivate dealloc]):
1116 (-[WebDataSource _setLoading:]):
1117 (-[WebDataSource _updateLoading]):
1118 (-[WebDataSource _setPrimaryLoadComplete:]):
1119 (-[WebDataSource _startLoading:]):
1120 (-[WebDataSource _addSubresourceLoader:]):
1121 (-[WebDataSource _removeSubresourceLoader:]):
1122 (-[WebDataSource _addPlugInStreamLoader:]):
1123 (-[WebDataSource _removePlugInStreamLoader:]):
1124 (-[WebDataSource _stopLoadingInternal]):
1125 (-[WebDataSource _defersCallbacksChanged]):
1126 (-[WebDataSource _stopLoadingWithError:]):
1127 (-[WebDataSource data]):
1128 (-[WebDataSource isLoading]):
1129 * WebView.subproj/WebDataSourcePrivate.h:
1130 * WebView.subproj/WebLoader.h:
1131 * WebView.subproj/WebLoader.m:
1132 * WebView.subproj/WebMainResourceClient.h: Removed.
1133 * WebView.subproj/WebMainResourceClient.m: Removed.
1134 * WebView.subproj/WebMainResourceLoader.h:
1135 * WebView.subproj/WebMainResourceLoader.m:
1136 (-[WebMainResourceLoader didReceiveResponse:]):
1138 2005-06-29 David Harrison <harrison@apple.com>
1140 Reviewed by Dave Hyatt (rendering) and Maciej (editing).
1142 Test cases added: Coming soon. Will include with next round of changes for this bug.
1144 This is the first checkin for...
1146 <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
1148 Basic strategy is to put tabs into spans with white-space:pre style, and
1149 render them with tabs stops every 8th space, where the space width and
1150 the left margin are those of the enclosing block.
1152 What's left is to switch to implement white-space:pre-wrap so
1153 that we can coalesce consecutive tabs while maintaining proper
1154 line breaking. That will keep the markup smaller.
1156 * WebCoreSupport.subproj/WebTextRenderer.m:
1158 (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
1159 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startPosition:numGlyphs:]):
1160 (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]):
1161 (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
1162 (initializeCharacterWidthIterator):
1163 (widthForNextCharacter):
1165 2005-06-29 John Sullivan <sullivan@apple.com>
1169 - deleted some never-used stub code
1171 * WebView.subproj/WebView.m:
1172 * WebView.subproj/WebViewInternal.h:
1173 * WebView.subproj/WebViewPrivate.h:
1175 2005-06-27 Justin Garcia <justin.garcia@apple.com>
1177 Patch by Anders Carlsson <andersca@mac.com>
1181 - Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3489>
1182 WebView's setSelectedDOMRange doesn't not implement clearing the selection as described in the WebView documentation:
1183 <http://developer.apple.com/documentation/Cocoa/Reference/WebKit/ObjC_classic/Classes/WebView.html>
1185 * WebView.subproj/WebView.m:
1186 (-[WebView setSelectedDOMRange:affinity:]):
1187 If range is nil, call deselectText.
1189 2005-06-24 Justin Garcia <justin.garcia@apple.com>
1191 Patch contributed by Duncan Wilcox <duncan@mclink.it>
1195 - Fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3535>
1196 Spelling suggestions in the context menu don't call the should* delegate methods
1198 * WebView.subproj/WebHTMLView.m:
1199 (-[WebHTMLView _changeSpellingFromMenu:]):
1200 give delegate's webView:shouldInsertText:replacingDOMRange:givenAction: a chance
1201 to prevent replacing of selected text
1203 2005-06-22 John Sullivan <sullivan@apple.com>
1205 Reviewed by Chris Blumenberg.
1207 - fixed <rdar://problem/3764645> please add a way to allow WebKit clients to override the WebPDFView context menu
1209 * PublicHeaderChangesFromTiger.txt: Added.
1210 New file to keep track of changes made to public headers that haven't been through API review yet.
1211 Initially lists the WebMenuItem enum tags added to WebUIDelegate.h as part of this change.
1213 * WebView.subproj/WebDefaultContextMenuDelegate.m:
1214 (-[WebDefaultUIDelegate appendDefaultItems:toArray:]):
1215 new method, handles initial separator
1216 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
1217 now has defaultMenuItems: parameter. Any menu items in this array are appended at the end of
1219 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
1221 (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
1222 This had a defaultMenuItems parameter before but it was always nil. Now it passes the defaultMenuItems
1223 parameter on to the two methods that construct lists (one for editing, the other for viewing). Also
1224 tweaked variable name and type for clarity.
1226 * WebView.subproj/WebHTMLView.m:
1227 (-[WebHTMLView menuForEvent:]):
1228 passes nil for new defaultItems parameter of _menuForElement:
1230 * WebView.subproj/WebImageView.m:
1231 (-[WebImageView menuForEvent:]):
1234 * WebView.subproj/WebTextView.m:
1235 (-[WebTextView menuForEvent:]):
1238 * WebView.subproj/WebPDFView.m:
1239 (-[WebPDFView elementAtPoint:]):
1240 new method to create the element dictionary needed for _menuForElement:defaultItems:. Only supplies the
1241 webFrame at this point.
1242 (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
1243 new method to return copies of the menu items that PDFKit would include in the context menu, with
1245 (-[WebPDFView menuForEvent:]):
1246 now calls standard WebKit context menu mechanism, so clients' delegates can modify the context menu as
1247 desired. The initial set of items are the ones WebKit was already displaying for PDF context menus.
1249 * WebView.subproj/WebUIDelegate.h:
1250 added enum values for the menu items in the PDF context menu
1252 * WebView.subproj/WebViewPrivate.h:
1253 * WebView.subproj/WebView.m:
1254 (-[WebView _menuForElement:defaultItems:]):
1255 Added the defaultItems: parameter to this method, which is then passed along to WebDefaultUIDelegate.
1256 All callers pass nil except for WebPDFView, at least for now.
1258 2005-06-22 Darin Adler <darin@apple.com>
1260 Change by Mitz Pettel.
1263 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3618>
1264 RTL runs drawn by CG not reversed properly
1266 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _CG_drawRun:style:geometry:]):
1267 Fix off-by-one mistake in order-swapping loops.
1269 2005-06-22 Darin Adler <darin@apple.com>
1271 Change by Michael Gaiman.
1274 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3436>
1275 Missing implementation of -[NSData(WebNSDateExtras) _webkit_parseRFC822HeaderFields]
1277 * Misc.subproj/WebNSDataExtras.h: Fixed name of category say NSData, not NSDate.
1278 * Misc.subproj/WebNSDataExtras.m: (-[NSData _webkit_parseRFC822HeaderFields]): Fixed method name.
1280 2005-06-21 John Sullivan <sullivan@apple.com>
1282 Reviewed by Vicki Murley
1284 - fixed assertion failure Vicki ran into
1286 * Misc.subproj/WebIconDatabase.m:
1287 (-[WebIconDatabase _forgetIconForIconURLString:]):
1288 Handle the case where there are no associated page URLs for the icon URL
1290 2005-06-20 John Sullivan <sullivan@apple.com>
1292 Reviewed by Chris Blumenberg.
1294 - fixed <rdar://problem/4155182> icon database retain counts can be incorrect after removing all icons
1296 Replaced the concept of "future retain count per page URL" with a simpler concept of "retain count per
1297 page URL", which is maintained even after the icon is actually loaded (unlike the future retain count).
1298 The total retain count for an icon is now the sum of the retain counts per page URL along with any retain
1299 count not associated with a page URL -- this is still needed for some internal housekeeping purposes.
1301 * Misc.subproj/WebIconDatabasePrivate.h:
1302 renamed iconURLToURLs -> iconURLToPageURLs for clarity
1303 renamed URLToIconURL -> pageURLToIconURL for clarity
1304 renamed futureURLToRetainCount -> pageURLToRetainCount (there's no more "future" aspect)
1305 renamed iconURLToRetainCount -> iconURLToExtraRetainCount (it now maintains only some of the retain count)
1307 * Misc.subproj/WebIconDatabase.m:
1308 (+[WebIconDatabase sharedIconDatabase]):
1309 updated for name changes only
1310 (-[WebIconDatabase init]):
1312 (-[WebIconDatabase iconForURL:withSize:cache:]):
1314 (-[WebIconDatabase iconURLForURL:]):
1316 (-[WebIconDatabase retainIconForURL:]):
1317 just bump the retain count in pageURLToRetainCount, instead of behaving differently based on whether
1318 an icon had been loaded for this URL; this let me delete the internal method _retainFutureIconForURL:
1319 (-[WebIconDatabase releaseIconForURL:]):
1320 decrement the retain count in pageURLToRetainCount, then handle the case where the retain count for
1321 this page has gone to zero. I deleted the internal method _releaseFutureIconForURL: formerly called here.
1322 (-[WebIconDatabase removeAllIcons]):
1323 remove all the code that dealt with retain counts; this operation no longer affects retain counts
1324 (-[WebIconDatabase _setIconURL:forURL:]):
1325 remove the code that consolidated multiple retain counts for different page URLs into a single retain
1326 count; the multiple retain counts are now maintained even after the icon is loaded
1327 (-[WebIconDatabase _clearDictionaries]):
1328 updated for name changes only
1329 (-[WebIconDatabase _loadIconDictionaries]):
1331 (-[WebIconDatabase _updateFileDatabase]):
1333 (-[WebIconDatabase _totalRetainCountForIconURLString:]):
1334 new method, sums the retain counts associated with specific page URLs and the extra retain count
1335 not associated with specific page URLs
1336 (-[WebIconDatabase _retainIconForIconURLString:]):
1337 updated for name changes
1338 (-[WebIconDatabase _forgetIconForIconURLString:]):
1339 no longer affects retain counts at all; this is up to callers
1340 (-[WebIconDatabase _releaseIconForIconURLString:]):
1341 this now distinguishes the case where the retain count not associated with any page URLs hits
1342 zero from the case where the total retain count hits zero, and handles both
1344 2005-06-20 John Sullivan <sullivan@apple.com>
1346 Reviewed by Chris Blumenberg.
1348 - added support for emptying the icon database
1350 * Misc.subproj/WebIconDatabase.h: just fixed a typo
1351 * Misc.subproj/WebIconDatabasePrivate.h:
1352 added WebPendingPublic category with method removeAllIcons, and
1353 declared WebIconDatabaseDidRemoveAllIconsNotification string.
1355 * Misc.subproj/WebIconDatabase.m:
1356 (-[WebIconDatabase removeAllIcons]):
1357 new method, removes all known icons from memory and disk. There's one loose end,
1358 covered by radar bug 4155182, where it's possible for the icon database's retain
1359 counts to get off after this operation. I plan to fix this next.
1360 (-[WebIconDatabase _setIconURL:forURL:]):
1361 just fixed some extra whitespace
1362 (-[WebIconDatabase _forgetIconForIconURLString:]):
1363 new method, extracted from _releaseIconForIconURLString
1364 (-[WebIconDatabase _releaseIconForIconURLString:]):
1365 now calls extracted method
1368 added _WebIconDatabaseDidRemoveAllIconsNotification
1370 2005-06-19 Darin Adler <darin@apple.com>
1372 Changes by Mitz Pettel
1375 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3466>
1376 ATSUI text doesn't render at coordinates greater than 32K
1378 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
1379 Translate the matrix of the CGContext instead of passing the appropriate coordinates to ATSU.
1381 2005-06-17 Richard Williamson <rjw@apple.com>
1383 Changes by Mitz Pettel
1384 Reviewed by Richard Williamson.
1386 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3545
1388 * WebCoreSupport.subproj/WebTextRenderer.m:
1389 (reverseCharactersInRun):
1390 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
1392 2005-06-17 John Sullivan <sullivan@apple.com>
1396 - fixed <rdar://problem/4151001> Reloading javascript-spawned window with no URL erases its contents
1398 * WebView.subproj/WebFrame.m:
1399 (-[WebFrame reload]):
1400 do nothing if URL is zero-length
1402 2005-06-14 John Sullivan <sullivan@apple.com>
1404 Changes by Devin Lane.
1407 - fixed <rdar://problem/3766909> PDF viewing could use a zoom control other than the one in the context menu
1409 * WebView.subproj/WebPDFView.h:
1410 now implements protocol _web_WebDocumentTextSizing
1411 * WebView.subproj/WebPDFView.m:
1412 (-[WebPDFView _updateScalingToReflectTextSize]):
1413 new method, sets the PDF scaling from the text size multiplier
1414 (-[WebPDFView setDataSource:]):
1415 call _updateScalingToReflectTextSize
1416 (-[WebPDFView _web_textSizeMultiplierChanged]):
1417 implementation of protocol _web_WebDocumentTextSizing, calls _updateScalingToReflectTextSize
1419 2005-06-14 John Sullivan <sullivan@apple.com>
1421 Reviewed by Dave Harrison.
1423 * WebView.subproj/WebHTMLView.m:
1424 (-[WebHTMLView _delayedEndPrintMode:]):
1425 After discussing this with Dave, I made this method both more debugger-friendly with asserts for
1426 the cases we don't think could ever happen, and more paranoid by handling these cases in deployment
1429 2005-06-14 Darin Adler <darin@apple.com>
1431 - fixed build for Xcode 2.1
1433 * WebKit.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT to search for the
1434 WebKitSystemInterface.h file. We could re-jigger this again later, but for now this is consistent
1435 with both the .a file's location and where build-webkit puts the file.
1437 2005-06-13 John Sullivan <sullivan@apple.com>
1439 Reviewed by Dave Harrison and Maciej.
1441 * WebView.subproj/WebHTMLView.m:
1442 (-[WebHTMLView _endPrintMode]):
1443 new method, extracted from identical code in beginDocument and endDocument. This method must be called
1444 once to counterbalance the code called from knowsPageRange that turns on "printing mode".
1445 (-[WebHTMLView _delayedEndPrintMode:]):
1446 new method, called from "perform after delay". Checks whether the same print operation is still underway
1447 and, if so, delays further. Otherwise calls _endPrintMode directly.
1448 (-[WebHTMLView knowsPageRange:]):
1449 after turning on "printing mode", queue up a delayed call to _delayedEndPrintMode:. If there's an early
1450 error in the print mechanism such that beginDocument is never called, this will cleanly end "printing
1451 mode" and make the webview usable again.
1452 (-[WebHTMLView beginDocument]):
1453 cancel any delayed call to _delayedEndPrintMode:. If we get this far along in printing, then we don't need
1454 the failsafe call to _delayedEndPrintMode: that was set up in knowsPageRange:. Also, call extracted method.
1455 (-[WebHTMLView endDocument]):
1456 call extracted method
1458 2005-06-13 Maciej Stachowiak <mjs@apple.com>
1460 Reviewed by Chris Blumenberg and Adele.
1462 - better fix for <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
1463 http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
1465 With this change and the matching WebKit change we'll still stop loading the moment you click
1466 a download link, but the unload event and detaching of event handlers will not happen early any more.
1468 * WebView.subproj/WebDataSource.m:
1469 (-[WebDataSource _stopLoadingInternal]): call stopLoading on bridge instead of closeURL.
1470 * WebView.subproj/WebFrame.m:
1471 (-[WebFrame _transitionToCommitted:]): Revert previous attempt at fix.
1472 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): ditto
1473 (-[WebFrame stopLoading]): ditto
1475 2005-06-13 Chris Petersen <cpetersen@apple.com>
1480 - fixed problems building deployment due to recent init change
1482 * WebView.subproj/WebArchive.m: (-[WebArchive initWithCoder:]):
1483 Put the [super init] call and check for nil outside the exception handler.
1484 * WebView.subproj/WebResource.m: (-[WebResource initWithCoder:]): Ditto.
1486 2005-06-12 Darin Adler <darin@apple.com>
1490 - fixed <rdar://problem/4141569> REGRESSION (412+): printing fails on any page with images, and for standalone images
1491 also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3318>
1493 * WebCoreSupport.subproj/WebImageData.m: Got rid of use of tabs instead of spaces throughout the file.
1494 (-[WebImageData _checkSolidColor:]): Wrap use of NSGraphicsContext with an autorelease pool.
1495 (-[WebImageData _fillSolidColorInRect:compositeOperation:context:]): Ditto.
1496 (-[WebImageData tileInRect:fromPoint:context:]): Ditto.
1497 (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]): Ditto.
1499 2005-06-12 Darin Adler <darin@apple.com>
1501 Changes by Nick Zitzmann.
1504 - fixed init methods that don't handle return values from the init methods they call
1506 * WebView.subproj/WebArchive.m:
1507 (-[WebArchive init]): Use value returned by init, check it for nil too.
1508 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Ditto.
1509 (-[WebArchive _initWithPropertyList:]): Ditto.
1510 (-[WebArchive initWithCoder:]): Ditto.
1511 * WebView.subproj/WebClipView.m:
1512 (-[WebClipView initWithFrame:]): Ditto.
1513 * WebView.subproj/WebDebugDOMNode.m:
1514 (-[WebDebugDOMNode initWithName:value:source:children:]): Ditto.
1515 * WebView.subproj/WebFrame.m:
1516 (-[WebFormState initWithForm:values:sourceFrame:]): Ditto.
1517 (-[WebFrame initWithName:webFrameView:webView:]): Ditto.
1518 * WebView.subproj/WebFrameView.m:
1519 (-[WebFrameView initWithFrame:]): Ditto.
1520 * WebView.subproj/WebHTMLRepresentation.m:
1521 (-[WebHTMLRepresentation init]): Ditto.
1522 * WebView.subproj/WebHTMLView.m:
1523 (-[WebHTMLView initWithFrame:]): Ditto.
1524 (-[WebTextCompleteController initWithHTMLView:]): Ditto.
1525 * WebView.subproj/WebImageView.m:
1526 (-[WebImageView initWithFrame:]): Ditto.
1527 * WebView.subproj/WebPreferences.m:
1528 (-[WebPreferences initWithIdentifier:]): Ditto.
1529 * WebView.subproj/WebRenderNode.m:
1530 (-[WebRenderNode initWithName:position:rect:view:children:]): Ditto.
1531 * WebView.subproj/WebResource.m:
1532 (-[WebResource init]): Ditto.
1533 (-[WebResource initWithCoder:]): Ditto.
1534 * WebView.subproj/WebView.m:
1535 (-[WebViewPrivate init]): Call super init.
1536 (-[_WebSafeForwarder initWithTarget:defaultTarget:templateClass:]): Use value returned by init, check it for nil too.
1537 (-[WebView initWithFrame:]): Ditto.
1539 2005-06-12 Maciej Stachowiak <mjs@apple.com>
1541 Reviewed by Chris Blumenberg.
1543 - fixed <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
1544 http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
1546 * WebView.subproj/WebFrame.m:
1547 (-[WebFrame _transitionToCommitted:]): Stop loading the non-provisional data
1548 source before swapping in the provisional.
1549 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): Stop only
1550 the provisional load here, we would not want to stop loading if this navigation
1551 later turns into a download or is cancelled before being committed.
1552 (-[WebFrame stopLoading]): Factored a bit.
1553 (-[WebFrame _cancelProvisionalLoad]): New method to stop only provisional load,
1554 and cancel any pending policy deicions.
1555 (-[WebFrame _stopNonProvisionalLoadOnly]): New mthod that stops only the main
1558 2005-06-10 John Sullivan <sullivan@apple.com>
1560 reviewed by Dave Harrison (first & second drafts) and Darin Adler (third draft)
1562 - WebKit part of fix for
1563 <rdar://problem/4145214> REGRESSION (412+): Can't drag URLs from the location bar
1565 * Misc.subproj/WebNSPasteboardExtras.m:
1566 (+[NSPasteboard initialize]):
1567 Reinstate variation of old code that uses CreatePasteboardFlavorTypeName to set up our new pasteboard types.
1568 The newfangled way didn't work.
1570 2005-06-07 Darin Adler <darin@apple.com>
1572 Change by Mark Rowe <opendarwin.org@bdash.net.nz>.
1575 - fixed the WebKit half of build failure with spaces in the path
1576 http://bugzilla.opendarwin.org/show_bug.cgi?id=3291
1578 * WebKit.pbproj/project.pbxproj: Quote DERIVED_FILE_DIR when it is substituted
1579 into FRAMEWORK_SEARCH_PATHS, and SYMROOT when into HEADER_SEARCH_PATHS.
1581 2005-06-06 Darin Adler <darin@apple.com>
1583 * Info.plist: Bumped version to 412+. For some reason it was set to 312.1!
1585 2005-06-05 Darin Adler <darin@apple.com>
1589 - fixed build that I broke with the license change (some includes of WebException were still around)
1591 * WebKit.pbproj/project.pbxproj: Removed references to WebException.h/m.
1592 * WebView.subproj/WebDataSource.m: Removed include of WebException.h.
1593 * WebView.subproj/WebHTMLView.m: Ditto.
1594 * WebView.subproj/WebView.m: Ditto.
1596 - fixed build under gcc 4.0 (some code moved here from Foundation had warnings)
1598 * Misc.subproj/WebNSDataExtras.m:
1599 (-[NSString _web_capitalizeRFC822HeaderFieldName]): Use char instead of UInt8.
1600 (-[NSData _webkit_guessedMIMEType]): Use char instead of UInt8, and take out now-
1601 unneeded type casts.
1603 2005-06-05 Darin Adler <darin@apple.com>
1605 - added appropriate license headers to most files and updated copyright to reflect publication dates
1608 * <lots of files>: Added license header.
1610 * WebKit.pbproj/project.pbxproj: Removed references to NP_objc.h.
1612 * API-Issues.rtf: Removed.
1613 * Misc.subproj/WebException.h: Removed.
1614 * Misc.subproj/WebException.m: Removed.
1615 * Plugins.subproj/NP_objc.h: Removed.
1617 2005-06-01 Darin Adler <darin@apple.com>
1619 Reviewed by John Sullivan.
1621 - WebKit part of fix for <rdar://problem/3166090> add IE JavaScript extension window.showModalDialog
1623 * WebCoreSupport.subproj/WebBridge.m:
1624 (-[WebBridge createModalDialogWithURL:]): Added. Calls the UI delegate, falling back to the generic
1625 "create WebView" method.
1626 (-[WebBridge canRunModal]): Added. Checks the UI delegate to see if it implements runModal.
1627 (-[WebBridge canRunModalNow]): Added. Checks the "inConnectionCallback" field so we can prevent
1628 deadlock since we can't do any I/O while inside a connection callback until this aspect of NSURLConnection
1630 (-[WebBridge runModal]): Added. Sets "defersCallbacks" on all other web views in the group, then
1631 calls runModal on the UI delegate.
1633 * WebView.subproj/WebBaseResourceHandleDelegate.h: Added inConnectionCallback class method.
1634 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1635 (-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]): Bump count and then
1636 decrement count so we can tell if we are in a callback.
1637 (-[WebBaseResourceHandleDelegate connection:didReceiveAuthenticationChallenge:]): Ditto.
1638 (-[WebBaseResourceHandleDelegate connection:didCancelAuthenticationChallenge:]): Ditto.
1639 (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]): Ditto.
1640 (-[WebBaseResourceHandleDelegate connection:didReceiveData:lengthReceived:]): Ditto.
1641 (-[WebBaseResourceHandleDelegate connection:willStopBufferingData:]): Ditto.
1642 (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]): Ditto.
1643 (-[WebBaseResourceHandleDelegate connection:didFailWithError:]): Ditto.
1644 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]): Ditto.
1645 (+[WebBaseResourceHandleDelegate inConnectionCallback]): Added. Return YES if count is not 0.
1647 * WebView.subproj/WebMainResourceClient.m:
1648 (-[WebMainResourceClient receivedError:]): Changed to use the method without the connection: parameter
1649 in the base class, since we no longer are overriding the connection: version.
1650 (-[WebMainResourceClient willSendRequest:redirectResponse:]): Change to override the version without
1651 the connection prefix/parameter; now only the base class overrides the actual connection delegate methods.
1652 (-[WebMainResourceClient continueAfterContentPolicy:response:]): Ditto.
1653 (-[WebMainResourceClient didReceiveResponse:]): Ditto.
1654 (-[WebMainResourceClient didReceiveData:lengthReceived:]): Ditto.
1655 (-[WebMainResourceClient didFinishLoading]): Ditto.
1656 (-[WebMainResourceClient didFailWithError:]): Ditto.
1657 (-[WebMainResourceClient loadWithRequestNow:]): Call the method without the connection parameter.
1659 * WebView.subproj/WebUIDelegatePrivate.h: Added new SPI here that WebBrowser implements.
1661 2005-05-26 Darin Adler <darin@apple.com>
1665 - fix build failure from when I removed WebCoreUnicode
1667 * WebCoreSupport.subproj/WebTextRenderer.m: Removed import of WebUnicode.h that I missed.
1668 (-[WebTextRenderer _convertUnicodeCharacters:length:toGlyphs:]): Switch from our own macros
1669 to the ICU macros for surrogate pairs.
1670 (widthForNextCharacter): Ditto.
1672 2005-05-26 David Harrison <harrison@apple.com>
1674 <rdar://problem/4120518> Mail: control-T in an empty message crashes mail
1676 * WebCoreSupport.subproj/WebBridge.m:
1677 (-[WebBridge issueTransposeCommand]):
1678 New, to support transpose in JS.
1680 2005-05-26 Darin Adler <darin@apple.com>
1682 Reviewed by Richard and Dave Harrison.
1684 - eliminate WebCoreUnicode and use ICU directly instead
1686 * Misc.subproj/WebKitNSStringExtras.m: (canUseFastRenderer): Use u_charDirection directly.
1687 * WebCoreSupport.subproj/WebTextRenderer.m: Removed import of <WebCore/WebCoreUnicode.h>.
1688 * WebView.subproj/WebHTMLView.m: (+[WebHTMLView initialize]): Removed call to WebKitInitializeUnicode.
1690 * Misc.subproj/WebUnicode.h: Removed.
1691 * Misc.subproj/WebUnicode.m: Removed.
1692 * Misc.subproj/WebUnicodeTables.m: Removed.
1694 * WebKit.pbproj/project.pbxproj: Removed files.
1696 2005-05-24 Richard Williamson <rjw@apple.com>
1698 Fixed <rdar://problem/4097289> -[WebView elementAtPoint:] failing when WebView is nested and offset
1700 Code to determine the correct frame under the window point was
1701 converting the point incorrectly.
1705 * WebView.subproj/WebView.m:
1706 (-[WebView _frameViewAtWindowPoint:]):
1708 2005-05-23 John Sullivan <sullivan@apple.com>
1712 - WebKit part of <rdar://problem/4125783> WebKit needs a way to control whether textareas are resizable
1714 * WebView.subproj/WebPreferencesPrivate.h:
1715 added private-for-now getter and setter for new preference
1716 * WebView.subproj/WebPreferenceKeysPrivate.h:
1717 added private preference key controlling whether textareas are resizable
1718 * WebView.subproj/WebPreferences.m:
1719 (+[WebPreferences initialize]):
1720 initial value of new preference is NO, so other clients' behavior doesn't change
1721 (-[WebPreferences textAreasAreResizable]):
1723 (-[WebPreferences setTextAreasAreResizable:]):
1726 * WebView.subproj/WebView.m:
1727 (-[WebView _updateWebCoreSettingsFromPreferences:]):
1728 update this new setting in WebCore
1730 * English.lproj/StringsNotToBeLocalized.txt:
1731 updated for these changes
1733 2005-05-23 Chris Blumenberg <cblu@apple.com>
1735 Changed type for identifier parameter in WebResourceLoadDelegate-related calls to id from NSString.
1739 * WebCoreSupport.subproj/WebBridge.m:
1740 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]):
1741 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
1742 * WebView.subproj/WebFrame.m:
1743 (-[WebFrame _opened]):
1744 (-[WebFrame _requestFromDelegateForRequest:identifier:error:]):
1745 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
1746 (-[WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]):
1747 * WebView.subproj/WebFrameInternal.h:
1749 2005-05-20 Chris Blumenberg <cblu@apple.com>
1751 Fixed: <rdar://problem/4098786> sync. XMLHttpRequest works w/o AllowNetworkAccess key because load delegate is not consulted
1753 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.
1755 Reviewed by sullivan.
1757 * WebCoreSupport.subproj/WebBridge.m:
1758 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): call [WebFrame _requestFromDelegateForRequest:identifier:error:] then
1759 [WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:] so synthetic resource load delegate
1760 methods are called and the data is saved as a WebResource for resources in the WebCore cache.
1762 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): call [WebFrame _requestFromDelegateForRequest:identifier:error:],
1763 respect its result, do the load and then call [WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]
1764 for synchronous loads
1766 * WebView.subproj/WebFrame.m:
1767 (-[WebFrame _opened]): call [WebFrame _requestFromDelegateForRequest:identifier:error:] then
1768 [WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:] so synthetic resource load delegate methods are called
1769 for subresrources in the page cache
1771 (-[WebFrame _requestFromDelegateForRequest:identifier:error:]): new, was part of the removed _sendResourceLoadDelegateMessagesForURL:::
1772 This method calls identifierForInitialRequest and willSendRequest.
1774 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]): new, was part of the removed _sendResourceLoadDelegateMessagesForURL:::
1775 This method calls the remaining resource load delegate messages.
1777 (-[WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]): new, saves the resource and calls
1778 [WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]
1780 * WebView.subproj/WebFrameInternal.h:
1782 2005-05-17 Chris Blumenberg <cblu@apple.com>
1784 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
1788 * WebCoreSupport.subproj/WebBridge.m:
1789 (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): pass the passed referrer to canLoadURL::: not [self referrer]
1790 (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): ditto
1791 * WebView.subproj/WebTextView.m:
1792 (-[WebTextView clickedOnLink:atIndex:]): call the loadURL bridge method so that security checks are made, command/option clicks work, policy delegate is consulted etc.
1794 2005-05-17 Chris Blumenberg <cblu@apple.com>
1796 Fixed: <rdar://problem/4120255> web archives on remote servers can be viewed directly (with major security issues); should download instead
1800 * WebView.subproj/WebBaseResourceHandleDelegate.h:
1801 * WebView.subproj/WebMainResourceClient.m:
1802 (-[WebMainResourceClient continueAfterContentPolicy:response:]): if the WebKit client has chosen to "use" a remote web archive, stop the load with an error
1804 2005-05-16 Darin Adler <darin@apple.com>
1806 - attempt to get things building under "Saffron" development tools
1808 * WebKit.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT.
1810 2005-05-13 John Sullivan <sullivan@apple.com>
1814 - fixed <rdar://problem/4093306> Safari crashes if Esc key is held down during series
1815 of authentication sheets
1817 * Panels.subproj/WebAuthenticationPanel.m:
1818 (-[WebAuthenticationPanel cancel:]):
1819 retain and autorelease self. This is a workaround for an AppKit key-handling issue, which I wrote up as:
1820 <rdar://problem/4118422> Key-down events can be sent to a closed window if a key is kept pressed down
1822 2005-05-12 John Sullivan <sullivan@apple.com>
1826 - rolled in changes from experimental-ui-branch to support resizable textareas
1827 and find-as-you-type and confirming unsubmitted form changes. The files/functions
1828 modified are listed just below. After that are the ChangeLog comments from the branch.
1830 * WebCoreSupport.subproj/WebBridge.m:
1831 (-[WebBridge textDidChange:]):
1832 * WebView.subproj/WebFormDelegate.h:
1833 * WebView.subproj/WebFormDelegate.m:
1834 (-[WebFormDelegate textDidChange:inFrame:]):
1835 * WebView.subproj/WebHTMLView.m:
1836 (-[WebHTMLView maintainsInactiveSelection]):
1837 (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
1838 (-[WebHTMLView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
1839 * WebView.subproj/WebView.m:
1840 (-[WebView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
1841 (-[WebView searchFor:direction:caseSensitive:wrap:]):
1842 (-[WebView makeTextStandardSize:]):
1843 (-[WebView maintainsInactiveSelection]):
1844 * WebView.subproj/WebViewPrivate.h:
1846 2005-04-18 John Sullivan <sullivan@apple.com>
1848 WebKit support for notifying a form delegate when a
1849 textarea's contents have changed (as opposed to a
1850 textfield, which was already handled).
1854 * WebView.subproj/WebFormDelegate.h:
1855 * WebView.subproj/WebFormDelegate.m:
1856 (-[WebFormDelegate textDidChange:inFrame:]):
1857 new form delegate method
1859 * WebCoreSupport.subproj/WebBridge.m:
1860 (-[WebBridge textDidChange:]):
1861 new method, calls through to form delegate
1863 2005-04-11 John Sullivan <sullivan@apple.com>
1865 Fixed inability to wrap around in Find in Page
1867 * WebView.subproj/WebView.m:
1868 (-[WebView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
1869 changed wrapFlag from NO to YES on two lines (copy/paste error)
1871 2005-04-07 John Sullivan <sullivan@apple.com>
1873 WebKit support for find-as-you-type. Needed an additional parameter on
1874 a method from WebDocumentSearching protocol. Since that's a public protocol,
1875 I couldn't just add the parameter. For now I hacked it with an undeclared
1876 internal method that's discovered via respondsToSelector. Probably the right
1877 long-term approach is to deprecate the WebDocumentSearching protocol and introduce
1878 a replacement that has a more flexible set of parameters for possible future
1881 Reviewed by Dave Hyatt.
1883 * WebView.subproj/WebHTMLView.m:
1884 (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
1885 now calls new one-more-parameter version passing NO for new parameter to match old behavior
1886 (-[WebHTMLView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
1887 new method, adds findInSelection parameter and passes it through to bridge
1889 * WebView.subproj/WebView.m:
1890 (-[WebView searchFor:direction:caseSensitive:wrap:]):
1891 now calls new one-more-parameter version passing NO for new parameter to match old behavior
1892 (-[WebView _searchFor:direction:caseSensitive:wrap:findInSelection:]):
1893 new method, adds findInSelection parameter and passes it through
1895 2005-04-07 John Sullivan <sullivan@apple.com>
1897 WebKit support to allow clients to control whether the selection is still
1898 drawn when the first responder is elsewhere. Formerly this was hardwired
1899 to be true only when -[WebView isEditable] was true.
1903 * WebView.subproj/WebHTMLView.m:
1904 (-[WebHTMLView maintainsInactiveSelection]):
1905 check [WebView maintainsInactiveSelection] rather than just [WebView isEditable]
1907 * WebView.subproj/WebViewPrivate.h:
1908 * WebView.subproj/WebView.m:
1909 (-[WebView maintainsInactiveSelection]):
1910 new method for clients to override, returns -[self isEditable]
1913 2005-05-10 John Sullivan <sullivan@apple.com>
1917 - WebKit support for <rdar://problem/3795701> Menu item/keyboard shortcut to
1918 restore text zoom to normal
1920 * WebView.subproj/WebView.m:
1921 (-[WebView validateUserInterfaceItem:]):
1922 validate makeTextStandardSize by calling canMakeTextStandardSize
1923 (-[WebView canMakeTextStandardSize]):
1924 new method, returns YES unless text size multiplier is currently 1
1925 (-[WebView makeTextStandardSize:]):
1926 new method, sets text size multiplier to 1
1928 * WebView.subproj/WebViewPrivate.h:
1929 add makeTextStandardSize: and canMakeTextStandardSize to pending public category
1931 2005-05-10 John Sullivan <sullivan@apple.com>
1935 - fixed <rdar://problem/4067981> Mail places RTF flavor before RTFD flavor when dragging
1936 mixed image/text content.
1938 * WebView.subproj/WebHTMLView.m:
1939 (+[WebHTMLView _selectionPasteboardTypes]):
1940 put RTFD type before RTF type in array of types to declare
1942 2005-05-09 Chris Blumenberg <cblu@apple.com>
1944 Turned assertion into error message to prevent crash when encountering this bug:
1945 <rdar://problem/4067625> connection:willCacheResponse: is called inside of [NSURLConnection initWithRequest:delegate:]
1947 * WebView.subproj/WebBaseResourceHandleDelegate.h:
1948 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1949 (-[WebBaseResourceHandleDelegate loadWithRequest:]): set flag to track when we're initializing the connection
1950 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]): log error
1952 2005-05-09 Darin Adler <darin@apple.com>
1954 * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly;
1955 Not needed to make builds work, spews undesirable error messages too.
1957 2005-05-06 Darin Adler <darin@apple.com>
1961 - make building multiple trees with make work better
1963 * Makefile.am: Set up Xcode build directory before invoking xcodebuild.
1965 2005-05-04 Darin Adler <darin@apple.com>
1967 Reviewed by Dave Hyatt.
1969 - fixed layout tests
1971 * WebKit.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles.
1972 When built without a build style (by Apple B&I) we want to get the target from the
1973 environment. But when built with a build style (by Safari engineers and others), we want
1974 to use 10.3. Because our deployment target was not set, we ran into this bug:
1976 <rdar://problem/4108717> CTFontGetGlyphWithName doesn't work with some strings
1978 * Makefile.am: Took out extra parameters that make command-line building different from
1979 Xcode building. Now that this is fixed, you should not get a full rebuild if you switch
1980 from command line to Xcode or back.
1982 2005-05-04 Chris Blumenberg <cblu@apple.com>
1985 <rdar://problem/4078417> REGRESSION (125-412): MLB gameday page doesn't update (Flash)
1986 <rdar://problem/4072280> XMLHttpRequest calls onReadyStateChange callback with bogus status value
1990 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.
1992 * WebCoreSupport.subproj/WebBridge.m:
1993 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): call new [WebResource _initWithData:URL:response:]
1994 * WebView.subproj/WebBaseResourceHandleDelegate.m:
1995 (-[WebBaseResourceHandleDelegate _canUseResourceWithResponse:]): new, checks response cache directives
1996 (-[WebBaseResourceHandleDelegate loadWithRequest:]): call _canUseResourceWithResponse:
1997 (-[WebBaseResourceHandleDelegate saveResource]): call new [WebResource _initWithData:URL:response:]
1998 * WebView.subproj/WebResource.m:
1999 (-[WebResourcePrivate dealloc]):
2000 (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): call renamed _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:
2001 (-[WebResource initWithCoder:]): decode the NSURLReponse
2002 (-[WebResource encodeWithCoder:]): encode the NSURLReponse
2003 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): take the NSURLReponse
2004 (-[WebResource _initWithData:URL:response:]): new
2005 (-[WebResource _initWithPropertyList:]): decode the NSURLReponse
2006 (-[WebResource _propertyListRepresentation]): encode the NSURLReponse
2007 (-[WebResource _response]): return ivar if we have one
2008 * WebView.subproj/WebResourcePrivate.h:
2010 2005-05-03 David Hyatt <hyatt@apple.com>
2012 Fix object element support so that fallback content works. With this change Safari passes the Acid2 test.
2016 * WebCoreSupport.subproj/WebBridge.m:
2017 (-[WebBridge determineObjectFromMIMEType:URL:]):
2018 * WebView.subproj/WebDataSource.m:
2019 (-[WebDataSource _receivedMainResourceError:complete:]):
2020 * WebView.subproj/WebMainResourceClient.m:
2021 (-[WebMainResourceClient continueAfterContentPolicy:response:]):
2023 2005-05-03 Darin Adler <darin@apple.com>
2025 * WebView.subproj/WebUIDelegate.h: Fixed incorrect comment.
2027 2005-05-01 Darin Adler <darin@apple.com>
2029 - move to Xcode native targets and stop checking in generated files
2031 * WebKit.pbproj/project.pbxproj: Updated to use native targets and generate all the generated
2032 files, so we don't have to check them in any more.
2033 * Info.plist: Added. Native targets use a separate file for this.
2035 * Plugins.subproj/npapi.m: Fixed import statement to get npapi.h from <WebKit/> rather than current directory.
2037 * Makefile.am: Removed timestamp cleaning rules since we don't use it any more.
2039 * .cvsignore: Removed various timestamp files.
2041 * DOM.subproj/DOM-compat.h: Removed.
2042 * DOM.subproj/DOM.h: Removed.
2043 * DOM.subproj/DOMCSS.h: Removed.
2044 * DOM.subproj/DOMCore.h: Removed.
2045 * DOM.subproj/DOMEvents.h: Removed.
2046 * DOM.subproj/DOMExtensions.h: Removed.
2047 * DOM.subproj/DOMHTML.h: Removed.
2048 * DOM.subproj/DOMPrivate.h: Removed.
2049 * DOM.subproj/DOMRange.h: Removed.
2050 * DOM.subproj/DOMStylesheets.h: Removed.
2051 * DOM.subproj/DOMTraversal.h: Removed.
2052 * DOM.subproj/DOMViews.h: Removed.
2053 * Plugins.subproj/WebScriptObject.h: Removed.
2054 * Plugins.subproj/npapi.h: Removed.
2055 * Plugins.subproj/npruntime.h: Removed.
2056 * copy-webcore-files-to-webkit: Removed.
2057 * embed-frameworks.sh: Removed.
2058 * force-clean-timestamp: Removed.
2060 2005-04-28 Darin Adler <darin@apple.com>
2064 - fixed problems preventing us from compiling with gcc 4.0
2066 * WebKit.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
2067 way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
2068 WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
2070 * History.subproj/WebHistoryItem.m: (-[WebHistoryItem pageCache]): Changed return type
2071 to match the declaration.
2072 * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
2073 Fixed a BOOL that should have been a Boolean.
2074 * WebCoreSupport.subproj/WebTextRenderer.m: Removed redundant copy of ROUND_TO_INT, also in
2076 (-[WebTextRenderer _computeWidthForSpace]): Had to add cast because of difference in type of
2077 ROUND_TO_INT vs. CEIL_TO_INT.
2078 (pathFromFont): Added a cast to convert UInt8 * to char *.
2079 * WebView.subproj/WebFrameView.m:
2080 (-[WebFrameView _setDocumentView:]): Fixed parameter type to match the declaration.
2081 (-[WebFrameView documentView]): Fixed return type to match the declaration.
2082 * WebView.subproj/WebHTMLView.m:
2083 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
2084 Initialized a variable to quiet an incorrect gcc 4.0 uninitialized variable warning.
2085 (-[WebHTMLView deleteToMark:]): Switched from @try style to NS_DURING style of exception handler
2086 because we can't pass -fobjc-exceptions just to Objective-C at the moment (see above).
2087 (-[WebHTMLView selectToMark:]): Ditto.
2088 (-[WebHTMLView swapWithMark:]): Ditto.
2090 2005-04-27 John Sullivan <sullivan@apple.com>
2092 Reviewed by Dave Harrison.
2094 - fixed <rdar://problem/3547489> pop-up window blocking preference and
2095 menu item can easily get out of sync.
2097 * WebView.subproj/WebPreferences.m:
2098 (-[WebPreferences _setStringValue:forKey:]):
2099 save local value before setting value in NSUserDefaults, so clients reacting to NSUserDefaults
2100 change notification but calling back on WebPreferences API will see the updated value.
2101 (-[WebPreferences _setIntegerValue:forKey:]):
2103 (-[WebPreferences _setBoolValue:forKey:]):
2106 2005-04-26 Richard Williamson <rjw@apple.com>
2108 Fixed <rdar://problem/4098713> Scripting API is incompatible with Mozilla
2112 * Plugins.subproj/npfunctions.h:
2113 * Plugins.subproj/npruntime.h:
2115 2005-04-26 Darin Adler <darin@apple.com>
2119 - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler
2121 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView scrollWheel:]): Call sendScrollWheelEvent: method
2122 instead of the old scrollOverflowWithScrollWheelEvent: (just a name change).
2124 2005-04-18 Darin Adler <darin@apple.com>
2128 - fixed <rdar://problem/4092614> REGRESSION (Tiger): progressively loaded background images "scroll around" instead of just appearing
2130 * WebCoreSupport.subproj/WebImageData.m:
2131 (-[WebImageData _imageSourceOptions]): Moved a global inside this function, since it's only used here.
2132 (-[WebImageData _cacheImages:allImages:]): Fixed a sizeof that was getting the size of the wrong thing.
2133 (-[WebImageData _isSizeAvailable]): Used calloc in a more consistent way.
2134 (drawPattern): Removed an unneeded cast.
2135 (-[WebImageData tileInRect:fromPoint:context:]): Here's the actual bug fix. Don't use the image size
2136 when deciding whether the image needs to be tiled as a pattern nor when creating the pattern: in both
2137 cases, use the tile size. The old way was wrong, and the new way works perfectly. Also removed uneeded
2138 error message when the image is not yet loaded enough to create a CGImageRef for it -- it's fine to
2139 draw nothing in that case.
2141 2005-04-14 John Sullivan <sullivan@apple.com>
2145 * WebView.subproj/WebBaseResourceHandleDelegate.m:
2146 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]):
2147 Beefed up assertion that's been bugging me and Chris to include
2148 the two troublemaking values.
2150 2005-04-05 David Hyatt <hyatt@apple.com>
2152 Fix for 4077106, wheel scroll amount smaller in Tiger. All along wheeling should have been 4x the default
2153 line height of 10 (just as arrow keys did). Scroll arrows should have done this too for scroll views (they did
2154 already for overflow sections). This patch puts the override into the scrollview itself, and removes the
2155 multipliers in the private frame methods.
2159 * WebView.subproj/WebFrameView.m:
2160 (-[WebFrameView _verticalKeyboardScrollDistance]):
2161 (-[WebFrameView initWithFrame:]):
2162 (-[WebFrameView _horizontalKeyboardScrollDistance]):
2164 === WebKit-312.1 ===
2166 2005-03-31 Chris Blumenberg <cblu@apple.com>
2168 Fixed: <rdar://problem/4070729> REGRESSION (125-311, Panther-only?): Safari crashes while reloading "My eBay" page
2172 * WebView.subproj/WebBaseResourceHandleDelegate.m:
2173 (-[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
2179 2005-03-23 Richard Williamson <rjw@apple.com>
2181 Use Patti Yeh's hack to determine the appropriate rectangle
2182 to place the "associated word" window.
2183 If there is no marked text firstRectForCharacterRange: will
2184 use the selected range to determine the returned rectangle,
2185 ignoring the input range. This is the fix from
2186 4029491 that I previously backed out.
2190 * WebView.subproj/WebHTMLView.m:
2191 (-[WebHTMLView firstRectForCharacterRange:]):
2193 2005-03-23 Richard Williamson <rjw@apple.com>
2195 Fixed <rdar://problem/4062490> REGRESSION (WebKit-408): no subresources reported in Activity window after going back at hrweb.apple.com
2197 Stop collecting subresource responses after the document
2198 had loaded, not after it has been opened.
2202 * WebView.subproj/WebFrame.m:
2203 (-[WebFrame _setState:]):
2204 (-[WebFrame _opened]):
2206 2005-03-21 Maciej Stachowiak <mjs@apple.com>
2210 <rdar://problem/4051145> The QuickTime Cocoa plug-in needs an SPI that it can call to check for URL policy
2212 * Plugins.subproj/WebPluginContainerCheck.h: Added.
2213 * Plugins.subproj/WebPluginContainerCheck.m: Added this new helper class to encapsulate
2214 an async plugin navigation check.
2215 (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:]): Convenience allocator that gives autoreleased value.
2216 (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]): Initializer.
2217 (-[WebPluginContainerCheck finalize]): Just assert that we're done, it would
2218 be bad to deallocate this object while request is still outstanding.
2219 (-[WebPluginContainerCheck dealloc]): Ditto.
2220 (-[WebPluginContainerCheck _continueWithPolicy:]): Method to continue after async
2222 (-[WebPluginContainerCheck _isDisallowedFileLoad]): Do "file: URL from remote content"
2224 (-[WebPluginContainerCheck _actionInformationWithURL:]): Helper to make action
2226 (-[WebPluginContainerCheck _askPolicyDelegate]): Call policy delegate to let
2227 the app decide if this load is allowed.
2228 (-[WebPluginContainerCheck start]): Start the check.
2229 (-[WebPluginContainerCheck cancel]): Cancel a check in progress.
2230 * Plugins.subproj/WebPluginController.h:
2231 * Plugins.subproj/WebPluginController.m:
2232 (-[WebPluginController initWithDocumentView:]): Initialize new _checksInProgress field.
2233 (-[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Implement
2234 this new SPI method.
2235 (-[WebPluginController _cancelOutstandingChecks]): New helper to make sure to cancel
2236 all outstanding requests when destroying all plugins.
2237 (-[WebPluginController destroyAllPlugins]): Call above helper.
2238 (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Implement this new plug-in SPI method.
2239 (-[WebPluginController bridge]): New helper method.
2240 (-[WebPluginController webView]): New helper method.
2241 * WebView.subproj/WebPolicyDelegatePrivate.h: Add new navigation
2242 type WebNavigationTypePlugInRequest.
2243 * WebKit.pbproj/project.pbxproj: Add new files.
2244 * WebView.subproj/WebDefaultPolicyDelegate.m:
2245 (-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): Don't open externally on a plug-in request.
2247 2005-03-23 Richard Williamson <rjw@apple.com>
2249 Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
2251 We now use actual document NSRanges to represent both marked text
2252 ranges and selection ranges.
2254 Reviewed by Ken Kocienda.
2256 * WebView.subproj/WebHTMLView.m:
2257 (-[WebHTMLView validAttributesForMarkedText]):
2258 (-[WebHTMLView firstRectForCharacterRange:]):
2259 (-[WebHTMLView selectedRange]):
2260 (-[WebHTMLView markedRange]):
2261 (-[WebHTMLView _selectMarkedText]):
2262 (-[WebHTMLView setMarkedText:selectedRange:]):
2266 2005-03-22 Darin Adler <darin@apple.com>
2268 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
2272 2005-03-20 Maciej Stachowiak <mjs@apple.com>
2276 <rdar://problem/4060020> Add stub version of security SPI for QuickTime plug-in so QuickTime team has something to compile and link against
2278 * Plugins.subproj/WebPluginContainerPrivate.h: Added.
2279 * Plugins.subproj/WebPluginController.m:
2280 (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]):
2281 (-[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
2282 * WebKit.pbproj/project.pbxproj:
2284 2005-03-19 David Harrison <harrison@apple.com>
2288 <rdar://problem/4059479> Misspelling underline does underline the whole word, could go farther to the right
2290 * WebCoreSupport.subproj/WebTextRenderer.m:
2291 (-[WebTextRenderer misspellingLinePatternGapWidth]):
2292 (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
2293 Consider that the last pixel in the underline dot pattern is transparent.
2295 2005-03-19 Darin Adler <darin@apple.com>
2297 Reviewed by Maciej (a while back).
2299 - fixed <rdar://problem/4059323> local-file security check is allowing plug-in streams, but must not
2301 * Plugins.subproj/WebNetscapePluginStream.m:
2302 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
2303 Roll out change I made on 3-13. That change is needed for subresource, but not for plug-in streams.
2304 For plug-in streams it's too risky, and leaves a serious security hole open.
2306 2005-03-19 Darin Adler <darin@apple.com>
2308 Reviewed by Ken and John.
2310 - fixed <rdar://problem/4059123> REGRESSION (402-403): deleteWordForward: and deleteWordBackward: start deleting single characters after the first delete
2312 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
2313 Fixed backwards logic in here and added missing check. Set action to one of the two typing actions only
2314 if isTypingAction is YES.
2316 2005-03-19 David Harrison <harrison@apple.com>
2318 Reviewed by me (written by Patti Yeh).
2320 <rdar://problem/4029491> <TCIM> CangJie: the candidate window appears at the top left hand corner during typing in Mail and iChat
2322 * WebView.subproj/WebHTMLView.m:
2323 (-[WebHTMLView firstRectForCharacterRange:]):
2324 Use selected range if there is no marked range.
2328 2005-03-18 David Harrison <harrison@apple.com>
2332 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
2334 * WebView.subproj/WebFrameView.m:
2335 (-[WebFrameView webCoreBridge]):
2336 New to conform to WebCoreBridgeHolder protocol.
2338 2005-03-18 Richard Williamson <rjw@apple.com>
2340 Fixed <rdar://problem/4057004> Data from XMLHTTPRequest is never dealloced
2342 WebDataSource keeps an array of all the NSURLResponses associated
2343 with the load for a page. This is used to playback delegate messages
2344 when loading from the page cache. However, after the document
2345 has completed it's initial load, we continue to keep track of responses.
2346 So, this has the consequence of keeping all the responses for a page
2347 around for the life of the page. NSURLResponses are now very
2348 heavy. They indirectly reference the resource data (via the
2349 download assessment dictionary). This fix will keep
2350 references to responses around for those resources loaded during initial
2351 page load, but not after that point.
2355 * WebView.subproj/WebDataSource.m:
2356 (-[WebDataSource _addResponse:]):
2357 (-[WebDataSource _stopRecordingResponses]):
2358 * WebView.subproj/WebDataSourcePrivate.h:
2359 * WebView.subproj/WebFrame.m:
2360 (-[WebFrame _opened]):
2362 2005-03-18 Ken Kocienda <kocienda@apple.com>
2368 <rdar://problem/4053729> Copy/paste of page with frames into Blot or Mail does nothing and loses insertion point
2370 * WebView.subproj/WebHTMLView.m:
2371 (-[WebHTMLView _selectedArchive]): Wrap frameset documents in an iframe, so they can be pasted into
2372 existing documents which will have a body or frameset of their own.
2376 2005-03-17 Richard Williamson <rjw@apple.com>
2378 Fixed <rdar://problem/4055562> REGRESSION (Tiger): Safari doesn't draw progressively-loaded JPEGs (www.theregister.co.uk, www.titantalk.com)
2380 Anothe side effect of lazy loading of image meta data. We now
2381 don't cache image size until size meta data is actually available.
2385 * WebCoreSupport.subproj/WebImageData.m:
2386 (-[WebImageData size]):
2388 2005-03-16 David Harrison <harrison@apple.com>
2392 <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements
2394 Also changed WebCore.
2396 * WebView.subproj/WebHTMLView.m:
2397 (-[WebHTMLView _shouldDeleteRange:]):
2398 Added call to new bridge method canDeleteRange.
2400 2005-03-16 Ken Kocienda <kocienda@apple.com>
2406 <rdar://problem/4042935> undo doesn't work properly during inline input
2408 * WebView.subproj/WebHTMLView.m:
2409 (-[WebHTMLView setMarkedText:selectedRange:]): Call new -[WebCoreBridge replaceMarkedTextWithText:] instead of
2410 -[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]. The former call was just added in
2411 order to provide a better mapping of international text input onto the typing command/undo design.
2413 2005-03-15 Richard Williamson <rjw@apple.com>
2415 Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
2417 If client mutates request use new Foundation SPI to address remove applewebdata properties from request.
2419 Reviewed by Ken Kocienda.
2421 * WebView.subproj/WebBaseResourceHandleDelegate.m:
2422 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
2423 * WebView.subproj/WebDataProtocol.h:
2424 * WebView.subproj/WebDataProtocol.m:
2425 (+[NSURLRequest _webDataRequestPropertyKey]):
2427 2005-03-15 Ken Kocienda <kocienda@apple.com>
2433 <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
2435 Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
2436 keystrokes grouped together in a single undo operation. My change on 27 Jan to route delete keystrokes
2437 through _deleteRange:killRing:... made this feature regress. Previous to that change, the backwards delete
2438 key went through separate code that is no longer in the tree that did not set the selection in the way
2441 The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
2442 -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
2443 selection will act to close typing or not. The code changes below all add this new argument with the
2444 appropriate value for closeTyping.
2446 * WebView.subproj/WebHTMLView.m:
2447 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Passes NO for closeTyping when
2448 deletionAction is deleteKeyAction or forwardDeleteKeyAction; YES when deleteSelectionAction.
2449 (-[WebHTMLView _expandSelectionToGranularity:]): Passes YES for closeTyping.
2450 (-[WebHTMLView selectToMark:]): Passes YES for closeTyping.
2451 (-[WebHTMLView swapWithMark:]): Passes YES for closeTyping.
2452 (-[WebHTMLView transpose:]): Passes YES for closeTyping.
2453 (-[WebHTMLView _selectMarkedText]): Passes NO for closeTyping.
2454 (-[WebHTMLView _selectRangeInMarkedText:]): Passes NO for closeTyping.
2455 * WebView.subproj/WebView.m:
2456 (-[WebView setSelectedDOMRange:affinity:]): Passes YES for closeTyping.
2458 2005-03-14 Richard Williamson <rjw@apple.com>
2460 Fix <rdar://problem/4051389> 8A413: gifs animating too fast
2464 Match Mozilla's policy for minimum frame duration, which is somewhat odd:
2466 <= 0.01 sec use .1 sec, otherwise use specified duration.
2468 * WebCoreSupport.subproj/WebImageData.m:
2469 (-[WebImageData _frameDurationAt:]):
2471 2005-03-14 Darin Adler <darin@apple.com>
2473 Reviewed by Harrison.
2475 - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts
2477 * WebView.subproj/WebFrameInternal.h: Added _unmarkAllMisspellings.
2478 * WebView.subproj/WebFrame.m: (-[WebFrame _unmarkAllMisspellings]): Added.
2479 Calls unmarkAllMisspellings on the bridge and self and all subframes.
2481 * WebView.subproj/WebView.m: (-[WebView setContinuousSpellCheckingEnabled:]):
2482 Call _unmarkAllMisspellings on the main frame when turning continuous spell checking off.
2484 2005-03-14 Richard Williamson <rjw@apple.com>
2486 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
2488 The Acrobat application triggers loads of new documents in it's policy delegate. This
2489 ultimately causes the WebHTMLView to be released before their event handlers have
2490 returned. To bullet proof against this case we retain/release self before passing
2491 the event on for further handling.
2495 * WebView.subproj/WebHTMLView.m:
2496 (-[WebHTMLView _updateMouseoverWithEvent:]):
2497 (-[WebHTMLView scrollWheel:]):
2498 (-[WebHTMLView mouseDown:]):
2499 (-[WebHTMLView mouseDragged:]):
2500 (-[WebHTMLView mouseUp:]):
2501 (-[WebHTMLView keyDown:]):
2502 (-[WebHTMLView keyUp:]):
2503 (-[WebHTMLView performKeyEquivalent:]):
2505 2005-03-14 Vicki Murley <vicki@apple.com>
2507 - roll out the fix for 4040321, since it is still pending CCC review.
2509 2005-03-10 Richard Williamson <rjw@apple.com>
2511 Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
2515 If a delegate returns a mutated applewebdata: request in it's willSendRequest:
2516 method, we don't load using the WebDataRequest. Instead we do a normal load.
2517 Unfortunately, if the request they return is mutated *copy* of the applewebdata:
2518 request it will hold the applewebdata: special properties. These properties
2519 will be encoded into the cache. They should not be. So, to fix, we sanitize the
2520 request, by removing the special properties from the request.
2522 Note that we had to dig into the private guts of NSURLRequest because there is
2523 no public mechanism to remove properties from a request, see 4046775.
2525 * WebView.subproj/WebBaseResourceHandleDelegate.m:
2526 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
2527 * WebView.subproj/WebDataProtocol.h:
2528 * WebView.subproj/WebDataProtocol.m:
2529 (-[NSURLRequest _webDataRequestExternalRequest]):
2530 (-[NSURLRequest _webDataRequestSanitize]):
2534 2005-03-13 Darin Adler <darin@apple.com>
2536 Reviewed by Ken and Maciej.
2538 - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
2540 * Plugins.subproj/WebNetscapePluginStream.m: (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
2541 Allow plug-in subresource streams to load with any URL, ignoring the "canLoadURL" method's restriction (only
2542 file URLs can load other file URLs), which now applies only to main resources, like web pages in frames or
2543 object tags and plug-in main resources.
2545 * WebCoreSupport.subproj/WebBridge.m:
2546 (-[WebBridge startLoadingResource:withURL:customHeaders:]): Allow subresources to load with any URL, as above.
2547 This allows things like images, stylesheets, and JavaScript to be loaded without the "canLoadURL" method's
2549 (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]): Ditto.
2550 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Ditto.
2552 2005-03-10 Richard Williamson <rjw@apple.com>
2554 Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
2558 If a delegate returns a mutated applewebdata: request in it's willSendRequest:
2559 method, we don't load using the WebDataRequest. Instead we do a normal load.
2560 Unfortunately, if the request they return is mutated *copy* of the applewebdata:
2561 request it will hold the applewebdata: special properties. These properties
2562 will be encoded into the cache. They should not be. So, to fix, we sanitize the
2563 request, by removing the special properties from the request.
2565 Note that we had to dig into the private guts of NSURLRequest because there is
2566 no public mechanism to remove properties from a request, see 4046775.
2568 * WebView.subproj/WebBaseResourceHandleDelegate.m:
2569 (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
2570 * WebView.subproj/WebDataProtocol.h:
2571 * WebView.subproj/WebDataProtocol.m:
2572 (-[NSURLRequest _webDataRequestExternalRequest]):
2573 (-[NSURLRequest _webDataRequestSanitize]):
2577 2005-03-10 Maciej Stachowiak <mjs@apple.com>
2581 <rdar://problem/4046510> REGRESSION (TOT): All Flash and Shockwave plugin-based web content missing
2583 * Plugins.subproj/WebNetscapePluginStream.m:
2584 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
2586 2005-03-10 John Sullivan <sullivan@apple.com>
2590 - fixed <rdar://problem/4045843> Going back/forward to error page
2591 hits assertion in -[WebDataSource(WebPrivate) _setData:]
2593 * WebView.subproj/WebDataSource.m:
2594 (-[WebDataSource _setData:]):
2595 Removed bogus assertion
2597 2005-03-09 Deborah Goldsmith <goldsmit@apple.com>
2601 - fixed <rdar://problem/3997044> default encoding for non-Latin incorrect
2603 * WebKit/WebView.subproj/WebPreferences.m: (+[WebPreferences _systemCFStringEncoding]):
2604 Call __CFStringGetUserDefaultEncoding to get region, and TECGetWebTextEncodings to get
2605 the first encoding to determine the default encoding.
2607 2005-03-09 Darin Adler <darin@apple.com>
2609 Reviewed by Richard.
2611 - fixed <rdar://problem/4034175> REGRESSION (Mail): Can't use any font with style Light/Condensed/Semibold/Extrabold, etc
2613 * WebView.subproj/WebHTMLView.m:
2614 (-[WebHTMLView _styleFromFontAttributes:]): Use a constant instead of hard-coded weight for clarity.
2615 (-[WebHTMLView _originalFontA]): Ditto.
2616 (-[WebHTMLView _originalFontB]): Ditto.
2617 (-[WebHTMLView _addToStyle:fontA:fontB:]): Add code to detect the case where the family name is not good enough
2618 to specify the font precisely. In that case, use the Postscript font name instead. Also change variable names
2619 so it's easier to understand the method.
2621 2005-03-06 Maciej Stachowiak <mjs@apple.com>
2625 <rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content
2627 * Plugins.subproj/WebBaseNetscapePluginView.m:
2628 (-[WebBaseNetscapePluginView requestWithURLCString:]):
2629 * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
2630 (-[WebNetscapePluginEmbeddedView didStart]):
2631 * Plugins.subproj/WebNetscapePluginStream.m:
2632 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
2633 * WebCoreSupport.subproj/WebBridge.m:
2634 (-[WebBridge createWindowWithURL:frameName:]):
2635 (-[WebBridge startLoadingResource:withURL:customHeaders:]):
2636 (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]):
2637 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2638 (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
2639 (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
2640 (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
2641 (-[WebBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
2642 * WebView.subproj/WebFrame.m:
2643 (-[WebFrame _loadURL:referrer:intoChild:]):
2644 * WebView.subproj/WebFramePrivate.h:
2646 2005-03-09 Richard Williamson <rjw@apple.com>
2648 Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted
2650 The AppKit and ATS reports that MS P Gothic is fixed pitch. It is
2651 not! This is another case of "fixed pitch" being wrong. I've
2652 coalesced all the special cases into our isFontFixedPitch:, and
2653 used a dictionary to improve speed. No performance regression.
2657 * WebCoreSupport.subproj/WebTextRenderer.m:
2658 (-[WebTextRenderer _computeWidthForSpace]):
2659 * WebCoreSupport.subproj/WebTextRendererFactory.m:
2660 (-[WebTextRendererFactory clearCaches]):
2661 (-[WebTextRendererFactory isFontFixedPitch:]):
2663 2005-03-09 Darin Adler <darin@apple.com>
2667 <rdar://problem/4040388> REGRESSION (172-173): nonrepro crash in -[NSString(WebNSURLExtras) _web_isUserVisibleURL]
2669 * Misc.subproj/WebNSURLExtras.m:
2670 (-[NSString _web_isUserVisibleURL]): Fixed some pointer expressions that didn't include the index in the expression.
2671 (readIDNScriptWhiteListFile): Removed NSLog statements in here since we decided they aren't useful and they will
2672 write some messages on Tiger.
2674 2005-03-09 Darin Adler <darin@apple.com>
2676 * DOM.subproj/DOMPrivate.h: Checked in file copied from WebCore.
2678 2005-03-08 Richard Williamson <rjw@apple.com>
2680 Fixed <rdar://problem/4036949> many JPEG images fail to incremental-load due to change in ImageIO JPEG header parsing (to be fixed in WebKit)
2681 Fixed <rdar://problem/4042570> Need to check image properties for presence of width/height properties
2683 ImageIO-55 changed how image properties are created. They
2684 are now created incrementally. So we need "re-get" the image
2685 properties if the properties we care about (width/height) aren't
2686 in the property dictionary.
2690 * WebCoreSupport.subproj/WebImageData.h:
2691 * WebCoreSupport.subproj/WebImageData.m:
2692 (-[WebImageData init]):
2693 (-[WebImageData fileProperties]):
2694 (-[WebImageData propertiesAtIndex:]):
2695 (-[WebImageData _isSizeAvailable]):
2696 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
2697 (-[WebImageData size]):
2699 2005-03-08 John Sullivan <sullivan@apple.com>
2701 A couple of tweaks to the previous patch, from Darin's review.
2703 * Misc.subproj/WebNSPasteboardExtras.m:
2704 (_writableTypesForImageWithoutArchive):
2705 remove unnecessary _web prefix
2706 (_writableTypesForImageWithArchive):
2708 (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
2709 use mutableCopy rather than initWithArray:, and adjust for name changes
2711 2005-03-08 John Sullivan <sullivan@apple.com>
2715 - fixed <rdar://problem/4031826> REGRESSION (Mail): standalone images from
2716 Safari can't be pasted into Mail (WebKit part of fix)
2718 We were always declaring webarchive-related pasteboard types, even in the standalone
2719 image cases where we had no webarchive. Unfortunately, the WebView pasteboard-related
2720 API doesn't prevent this kind of thing from happening, because the code that
2721 declares the types isn't guaranteed to be anywhere near the code that writes
2722 the pasteboard data.
2724 After this fix, I discovered that pasting standalone images into Mail still doesn't
2725 work right, but the remaining issues seem to be entirely in Mail. I wrote up 4041671
2728 * Misc.subproj/WebNSPasteboardExtras.h:
2729 (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
2730 Added boolean parameter; clients must specify whether or not there's an
2731 archive involved, because the array of types is different if there is.
2733 * Misc.subproj/WebNSPasteboardExtras.m:
2734 (_web_writableTypesForImageWithoutArchive):
2735 new static function, constructs (once) and returns the array of types
2736 for images that don't have archives
2737 (_web_writableTypesForImageWithArchive):
2738 new static function, constructs (once) and returns the array of types
2739 for images that do have archives
2740 (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
2741 added boolean parameter, now calls one of the two new static functions
2743 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]):
2744 added asserts that we aren't declaring the archive types if we don't have archive data
2746 (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
2747 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
2749 * WebView.subproj/WebDefaultContextMenuDelegate.m:
2750 (-[WebDefaultUIDelegate copyImageToClipboard:]):
2751 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
2753 * WebView.subproj/WebImageView.m:
2754 (-[WebImageView copy:]):
2755 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
2757 * WebView.subproj/WebView.m:
2758 (-[WebView pasteboardTypesForElement:]):
2759 updated to pass parameter to _web_writableTypesForImageIncludingArchive:
2761 2005-03-07 Richard Williamson <rjw@apple.com>
2763 More bullet proofing for <rdar://problem/4038304> CrashTracer: ....9 crashes at com.apple.WebKit: -[WebTextRenderer initWithFont:usingPrinterFont:] + 840
2765 Protect against removal of Times and Times New Roman from
2766 system. If these fonts are removed attempt to get system font
2767 instead of FATAL_ALWAYS.
2771 * WebCoreSupport.subproj/WebTextRenderer.m:
2772 (-[WebTextRenderer initWithFont:usingPrinterFont:]):
2776 2005-03-06 Darin Adler <darin@apple.com>
2778 - fixed obvious mistake in IDN script code (luckily it hasn't been in a submission yet!)
2780 * Misc.subproj/WebNSURLExtras.m: (readIDNScriptWhiteListFile): Use "index" to index into the array,
2781 not "script", which is the script number, not the 32-bit-word index.
2783 2005-03-05 Kevin Decker <kdecker@apple.com>
2787 Fixed: <rdar://problem/4038529> Infinite progress bar loading webcams and other sites that use multipart/x-mixed-replace
2789 The previous patch I landed prevented us from loading multipart/x-mixed-replace but did not always update the progress bar accordingly.
2790 This stops websites from having seemingly infinite progress in the browser UI.
2792 * WebCoreSupport.subproj/WebSubresourceClient.m:
2793 (-[WebSubresourceClient didReceiveResponse:]): If this is "multipart/x-mixed-replace", remove the WebBaseResourceHandleDelegate client from
2794 the datasource's subresource array, otherwise -[WebDataSource isLoading] incorrectly returns YES. Also it's possible at this point in
2795 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
2796 in fact we're complete.
2797 * WebView.subproj/WebMainResourceClient.m:
2798 (-[WebMainResourceClient connection:didReceiveResponse:]): ditto
2800 2005-03-05 Richard Williamson <rjw@apple.com>
2802 Fixed panther build problem. Shouldn't include
2803 changes for 3968753 on panther.
2807 * WebView.subproj/WebView.m:
2808 (-[WebView _commonInitializationWithFrameName:groupName:]):
2810 2005-03-05 Darin Adler <darin@apple.com>
2814 - fixed <rdar://problem/4034603> REGRESSION (185-188): RadarWeb can't send enclosures anymore
2816 * WebView.subproj/WebFormDataStream.m:
2817 (closeCurrentStream): Release currentData when closing the stream.
2818 (advanceCurrentStream): Set up and retain currentData when the current stream is reading that data, so the
2819 data won't be released while in use.
2820 (formCreate): Initialize currentData to NULL.
2822 - fixed <rdar://problem/4037562> Tiger8A402: Help Viewer crashed when viewing help for iChat (infinite recursion in WebView)
2824 * WebView.subproj/WebView.m: (-[WebView _responderValidateUserInterfaceItem:]):
2825 Check for the case where we ourselves are the responder. This avoids an infinite loop.
2826 The actual code to perform operations avoids this with a global variable, but this lighter weight
2827 solution is sufficient here because validate operations don't call through to the next responder.
2829 2005-03-04 Richard Williamson <rjw@apple.com>
2831 Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple animated GIFs (was fast in Panther)
2833 Disable coalesced updates (in CG). This restores the
2836 Reviewed by David Harrison.
2838 * WebView.subproj/WebView.m:
2839 (-[WebView _commonInitializationWithFrameName:groupName:]):
2841 2005-03-04 Adele Amchan <adele@apple.com>
2845 * English.lproj/StringsNotToBeLocalized.txt: added new strings "text/x-vcf" and "text/x-csv" to the list
2847 2005-03-04 Adele Amchan <adele@apple.com>
2851 Fix for <rdar://problem/4032982> Sun iPlanet app: not able to import AddressBook CSV format addresses properly
2852 Fix for <rdar://problem/4032985> Sun iPlanet app: not able to import vCard format addresses properly
2854 * WebView.subproj/WebTextView.m:
2855 (+[WebTextView unsupportedTextMIMETypes]): added "text/x-csv" and "text/x-vcf" to the list of MIME types that our text view doesn't handle
2857 2005-03-04 Darin Adler <darin@apple.com>
2861 - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut
2863 * WebView.subproj/WebHTMLView.m:
2864 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Merged _handleKillRing behavior
2865 into this function, since there's now a more-complicated way the startNewKillRingSequence boolean needs to
2866 be handled. Set the startNewKillRingSequence boolean after the entire process so changing the selection before
2867 and during the editing dosn't clear it. Also change "isTypingAction" parameter to "deletionAction" so we can
2868 handle forward delete with this method.
2869 (-[WebHTMLView _deleteSelection]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
2870 which is the way to say the same thing using the new parameter.
2871 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Refactor to use the _deleteRange
2872 method above. Also calls _shouldDeleteRange: for the pre-existing selection case; not doing that before was
2874 (-[WebHTMLView deleteToMark:]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
2875 which is the way to say the same thing using the new parameter.
2877 2005-03-04 Darin Adler <darin@apple.com>
2881 - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)
2883 * WebView.subproj/WebHTMLView.m:
2884 (-[WebHTMLView _styleFromFontAttributes:]): Quote font name when calling setFontFamily.
2885 (-[WebHTMLView _addToStyle:fontA:fontB:]): Ditto.
2887 2005-03-04 Darin Adler <darin@apple.com>
2891 - fixed <rdar://problem/3965666> IDN spoofing vulnerability caused by Unicode characters that look like ASCII characters
2893 * Misc.subproj/WebNSURLExtras.m:
2894 (readIDNScriptWhiteListFile): Added. Reads file and parses script names.
2895 (readIDNScriptWhiteList): Added. Calls readIDNScriptWhiteList on each of the white list locations in succession.
2896 (allCharactersInIDNScriptWhiteList): Renamed from containsPossibleLatinLookalikes and changed sense.
2897 Now calls readIDNScriptWhiteList first time, and then uses the read-in list to check the scripts.
2898 (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call allCharactersInIDNScriptWhiteList instead of
2899 containsPossibleLatinLookalikes.
2900 * Resources/IDNScriptWhiteList.txt: Added.
2901 * WebKit.pbproj/project.pbxproj: Added IDNScriptWhiteList.txt file.
2903 * Misc.subproj/WebKitLocalizableStrings.m: Removed. This is simply unused.
2904 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
2906 2005-03-04 Darin Adler <darin@apple.com>
2910 - fixed <rdar://problem/3937667> REGRESSION (Mail): Zooming a window from titlebar button doesn't paint newly-exposed portions of window
2912 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
2913 Re-set-up the visRect if the bounds changes due to layout.
2917 2005-03-03 Jens Alfke <jens@apple.com>
2921 <rdar://problem/3991818> REGRESSION: Images scale while loading
2922 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.
2924 * WebCoreSupport.subproj/WebImageData.m:
2925 (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
2927 2005-03-01 David Hyatt <hyatt@apple.com>
2929 Fix for 3841186, scrollbar shows up disabled when it should not appear at all. Make sure updateScrollers
2930 is never allowed to be re-entrant from any call point by moving the guard inside the function itself.
2932 Reviewed by John Sullivan
2934 * WebView.subproj/WebDynamicScrollBarsView.m:
2935 (-[WebDynamicScrollBarsView updateScrollers]):
2936 (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
2938 2005-03-02 Chris Blumenberg <cblu@apple.com>
2940 Fixed: <rdar://problem/4029010> Expose method to retrieve drag image for WebView's selection
2942 Reviewed by sullivan.
2944 * WebView.subproj/WebHTMLView.m:
2945 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): call _selectionDraggingImage
2946 (-[WebHTMLView _selectionDraggingImage]): new SPI for Mail, factored from previous method
2947 (-[WebHTMLView _selectionDraggingRect]): new SPI for Mail
2948 * WebView.subproj/WebHTMLViewPrivate.h:
2950 2005-03-02 John Sullivan <sullivan@apple.com>
2954 - fixed <rdar://problem/4023337> Safari stops loading any page (-[NSCFDictionary setObject:forKey:]:
2955 attempt to insert nil key)
2957 It is very likely that the exception being hit is caused by the same problem as WebFoundation
2958 bug 4018486. This change makes the code robust against this kind of problem regardless.
2960 * WebView.subproj/WebBaseResourceHandleDelegate.m:
2961 (-[WebBaseResourceHandleDelegate saveResource]):
2962 Don't call addSubresource if newly-created resource is nil (but do assert on debug builds).
2963 Also assert that originalURL and MIMEType are not nil.
2965 * WebView.subproj/WebDataSource.m:
2966 (-[WebDataSource addSubresource:]):
2967 Don't add nil subresource to dictionary, but do assert on debug builds.
2971 2005-03-01 John Sullivan <sullivan@apple.com>
2975 - fixed <rdar://problem/3987482> Format>Style>Italic is not enabled when a
2976 compose window is empty (works in Blot)
2978 * WebView.subproj/WebHTMLView.m:
2979 (-[WebHTMLView becomeFirstResponder]):
2980 call _updateFontPanel here so NSFontManager knows the right font for the menu
2981 items and the font panel
2983 2005-03-01 David Harrison <harrison@apple.com>
2987 <rdar://problem/3915560> Mail would like an SPI to enable "smart" text paste/drop
2989 * WebView.subproj/WebHTMLView.m:
2990 (-[WebHTMLView _smartDeleteRangeForProposedRange:]):
2991 (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]):
2994 2005-02-28 John Sullivan <sullivan@apple.com>
2998 - WebKit part of fix for <rdar://problem/4023490> REGRESSION (125-185): Tabbing through links
2999 on frameset page gets stuck at end (tivofaq.com)
3001 This tab-to-links stuff has been in shaky condition ever since AppKit futzed with
3002 tabbing behavior in Tiger to add support for including the toolbar in the key loop.
3003 I made some changes months ago to compensate for that, but some cases, such as this
3004 one, still weren't fixed.
3006 * WebCoreSupport.subproj/WebBridge.m:
3007 (-[WebBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
3008 new bottleneck method, extracted from nextKeyViewOutsideWebFrameViews; handles
3009 nextKeyView or nextValidKeyView depending on parameter.
3010 (-[WebBridge nextKeyViewOutsideWebFrameViews]):
3011 now calls extracted method
3012 (-[WebBridge nextValidKeyViewOutsideWebFrameViews]):
3013 new method, calls new bottleneck method
3015 * WebView.subproj/WebHTMLView.m:
3016 (-[WebHTMLView nextValidKeyView]):
3017 when we're stuck at the end of a nextKeyView chain inside a nexted frame, use
3018 nextValidKeyViewOutsideWebFrameViews. Make sure we don't end up looking inside
3019 the web frame views while doing this.
3021 2005-02-25 Darin Adler <darin@apple.com>
3025 - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus
3027 * WebView.subproj/WebHTMLView.m:
3028 (-[WebHTMLView updateFocusState]): Renamed from updateFocusDisplay. Added call to setWindowHasFocus: method.
3029 (-[WebHTMLView viewDidMoveToWindow]): Call method by new name.
3030 (-[WebHTMLView windowDidBecomeKey:]): Ditto.
3031 (-[WebHTMLView windowDidResignKey:]): Ditto.
3032 (-[WebHTMLView becomeFirstResponder]): Ditto.
3033 (-[WebHTMLView resignFirstResponder]): Ditto.
3037 2005-02-25 Richard Williamson <rjw@apple.com>
3039 Fixed <rdar://problem/4000962> 8A375: Help Viewer displays voiced sound and semi-voiced characters strangely (characters don't seem to be composed)
3041 Added special case for voiced marks.
3045 * WebCoreSupport.subproj/WebTextRenderer.m:
3046 (widthForNextCharacter):
3048 2005-02-25 Darin Adler <darin@apple.com>
3052 - fixed <rdar://problem/4019823> Seed: Control-Y doesn't work
3054 * WebView.subproj/WebHTMLView.m:
3055 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Call _handleKillRing
3056 after setting the selection, since it uses the selection to get the text.
3057 (-[WebHTMLView _insertText:selectInsertedText:]): Check for empty string to avoid an assertion
3058 on the other side of the bridge when you yank the empty string.
3060 2005-02-24 Richard Williamson <rjw@apple.com>
3062 Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.
3064 If directionality is specified use that as initial directionality,
3065 rather than neutral directionality.
3069 * WebCoreSupport.subproj/WebTextRenderer.m:
3070 (widthForNextCharacter):
3072 2005-02-24 Adele Amchan <adele@apple.com>
3076 Fix for <rdar://problem/4023393> Safari crashed in khtml::RenderObject::repaintAfterLayoutIfNeeded(QRect const&, QRect const&)
3078 We were crashing after hitting PageDown when viewing a pdf because
3079 WebKit was calling over to WebCore to scroll overflow areas.
3080 Since this only needs to be done if we're dealing with a WebHTMLView,
3081 I added a wrapper function to check the documentView before calling
3084 * WebView.subproj/WebFrameView.m:
3085 (-[WebFrameView _scrollOverflowInDirection:granularity:]): added wrapper function that checks if documentView is a WebHTMLView
3086 (-[WebFrameView scrollToBeginningOfDocument:]): uses new wrapper function now
3087 (-[WebFrameView scrollToEndOfDocument:]): uses new wrapper function now
3088 (-[WebFrameView _pageVertically:]): uses new wrapper function now
3089 (-[WebFrameView _pageHorizontally:]): uses new wrapper function now
3090 (-[WebFrameView _scrollLineVertically:]): uses new wrapper function now
3091 (-[WebFrameView _scrollLineHorizontally:]): uses new wrapper function now
3093 2005-02-24 Richard Williamson <rjw@apple.com>
3095 Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame
3099 * WebCoreSupport.subproj/WebImageData.h:
3100 * WebCoreSupport.subproj/WebImageData.m:
3101 (-[WebImageData resetAnimation]):
3102 * WebCoreSupport.subproj/WebImageRenderer.m:
3103 (-[WebImageRenderer resetAnimation]):
3104 (-[WebInternalImage resetAnimation]):
3105 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
3107 2005-02-24 Kevin Decker <kdecker@apple.com>
3111 Fixed <rdar://problem/3962401> Don't load multipart/x-mixed-replace content to prevent memory leak
3113 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.
3115 * WebView.subproj/WebMainResourceClient.m:
3116 (-[WebMainResourceClient connection:didReceiveResponse:]): Disabled loading of multipart/x-mixed-replace content until we fully implement server side push.
3117 * WebCoreSupport.subproj/WebSubresourceClient.m:
3118 (-[WebSubresourceClient didReceiveResponse:]): Ditto. Same exact thing for sub resources.
3121 2005-02-23 John Sullivan <sullivan@apple.com>
3125 - fixed <rdar://problem/4021370> REGRESSION (Tiger): WebKit part of fix for
3126 shift-tab on tivofaq doing the wrong thing
3128 * WebView.subproj/WebFrameView.m:
3129 (-[WebFrameView becomeFirstResponder]):
3130 If our previousValidKeyView is nil or self (same as nil modulo AppKit oddness),
3131 look out of the box and get the previousValidKeyView of our webview.
3133 2005-02-23 Darin Adler <darin@apple.com>
3137 - fixed <rdar://problem/4010196> REGRESSION (125-186+): 8-character timestamps in gmail wrap to 2 lines (width:8ex; font-size:80%)
3139 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer xHeight]): Return the maximum
3140 of the "x" height and width. Comment in the code explains why in more detail.
3142 2005-02-22 Richard Williamson <rjw@apple.com>
3144 Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions
3146 Compare regions after automatice scroll regions have been
3151 * WebCoreSupport.subproj/WebBridge.h:
3152 * WebCoreSupport.subproj/WebBridge.m:
3153 (-[WebBridge dealloc]):
3154 (-[WebBridge _compareDashboardRegions:]):
3155 (-[WebBridge dashboardRegionsChanged:]):
3157 2005-02-22 Richard Williamson <rjw@apple.com>
3159 Fixed <rdar://problem/4012463> Dashboard widgets don't work with authenticating proxies
3161 Added new SPI for dashboard that just calls default delegate
3166 * WebView.subproj/WebView.m:
3167 (-[WebView handleAuthenticationForResource:challenge:fromDataSource:]):
3168 * WebView.subproj/WebViewPrivate.h:
3170 2005-02-22 Chris Blumenberg <cblu@apple.com>
3174 * WebCoreSupport.subproj/WebBridge.m:
3175 (-[WebBridge issuePasteAndMatchStyleCommand]): support for new "PasteAndMatchStyle" exec command
3179 2005-02-21 David Harrison <harrison@apple.com>
3183 <rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps
3185 * WebCoreSupport.subproj/WebTextRenderer.m:
3186 (-[WebTextRenderer misspellingLineThickness]):
3187 (-[WebTextRenderer misspellingLinePatternWidth]):
3188 Replaced #defines with these methods, so others can get the same info.
3190 (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
3191 Keep underline within originally specified bounds.
3194 2005-02-21 Darin Adler <darin@apple.com>
3198 - fixed <rdar://problem/4016358> don't ever display IDN URLs with characters from "possible Latin look-alike" scripts
3200 * Misc.subproj/WebNSURLExtras.m:
3201 (containsPossibleLatinLookalikes): Added.
3202 (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call containsPossibleLatinLookalikes, and if true,
3203 don't decode the host name.
3205 2005-02-19 Kevin Decker <kdecker@apple.com>
3209 Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission
3211 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.
3213 * Plugins.subproj/WebBaseNetscapePluginView.h: Addded currentEventIsUserGesture boolean ivar.
3214 * Plugins.subproj/WebBaseNetscapePluginView.m:
3215 (-[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.
3216 (-[WebBaseNetscapePluginView initWithFrame:]): In our asynchronous load, pass along currentEventIsUserGesture to the PluginRequest.
3217 (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Inform WebCore if this was a user originated gesture when calling executeScript().
3218 (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
3219 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
3220 (-[WebPluginRequest isCurrentEventUserGesture]): Added.
3222 2005-02-18 Chris Blumenberg <cblu@apple.com>
3224 Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled
3226 Reviewed by kocienda.
3228 * WebView.subproj/WebDataSource.m:
3229 (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for matchStyle to replaceSelection
3230 * WebView.subproj/WebHTMLView.m:
3231 (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]): return new chosePlainText parameter
3232 (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass chosePlainText for matchStyle to replaceSelection
3233 (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
3235 2005-02-17 Richard Williamson <rjw@apple.com>
3237 Removed code that should not have been checked in from
3240 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3241 (-[WebTextRendererFactory isFontFixedPitch:]):
3243 2005-02-17 Richard Williamson <rjw@apple.com>
3245 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
3247 Fixed w/o introducing a performance regression.
3249 Reviewed by Vicki (and earlier by Dave Harrison).
3251 * WebCoreSupport.subproj/WebTextRenderer.m:
3252 (-[WebTextRenderer _computeWidthForSpace]):
3253 (widthForNextCharacter):
3254 * WebCoreSupport.subproj/WebTextRendererFactory.h:
3255 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3256 (-[NSFont _web_isFakeFixedPitch]):
3257 (-[WebTextRendererFactory isFontFixedPitch:]):
3258 (-[WebTextRendererFactory fontWithFamily:traits:size:]):
3260 2005-02-17 Richard Williamson <rjw@apple.com>
3262 Fixed <rdar://problem/3959304> PDF in img tag is not rendered correctly anymore
3264 We were incorrectly adding image position when flipping coordinates.
3266 Reviewed by David Harrison.
3268 * WebCoreSupport.subproj/WebImageData.m:
3269 (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]):
3271 2005-02-17 Richard Williamson <rjw@apple.com>
3273 Fixed <rdar://problem/4007262> Seed: Flight tracker scrolling moves to the left
3275 Added SPI for dashboard to disable wheel scrolling of the WebClipView.
3280 * WebView.subproj/WebClipView.m:
3281 (-[WebClipView _focusRingVisibleRect]):
3282 (-[WebClipView scrollWheel:]):
3283 * WebView.subproj/WebView.m:
3284 (-[WebViewPrivate init]):
3285 (-[WebView drawRect:]):
3286 (-[WebView _dashboardBehavior:]):
3287 * WebView.subproj/WebViewInternal.h:
3288 * WebView.subproj/WebViewPrivate.h:
3292 2005-02-17 Vicki Murley <vicki@apple.com>
3294 - roll out this change, since it causes a 1.5% performance regression
3296 2005-02-15 Richard Williamson <rjw@apple.com>
3298 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
3300 Lie about Osaka-Mono. Treat it as fixed pitch, even though,
3301 strictly speaking it isn't. (Similar to what we do with
3304 Reviewed by David Harrison.
3306 * WebCoreSupport.subproj/WebTextRenderer.m:
3307 (-[WebTextRenderer _computeWidthForSpace]):
3308 * WebCoreSupport.subproj/WebTextRendererFactory.h:
3309 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3310 (-[NSFont _web_isFakeFixedPitch]):
3311 (-[WebTextRendererFactory isFontFixedPitch:]):
3312 (-[WebTextRendererFactory fontWithFamily:traits:size:]):
3314 2005-02-17 John Sullivan <sullivan@apple.com>
3318 - fixed <rdar://problem/3997185> The Web view on .Mac Prefs caused System Prefs
3319 to lockup (resolved by re-boot only)
3321 * WebCoreSupport.subproj/WebBridge.m:
3322 (-[WebBridge nextKeyViewOutsideWebFrameViews]):
3323 Don't allow recursion here; assert on debug build, return nil on deployment. I
3324 couldn't get my machine into a state to repro this problem (and neither could the
3325 originator), but it's obvious from the stack crawl that this method was recursing
3326 when it shouldn't have.
3328 2005-02-16 John Sullivan <sullivan@apple.com>
3330 Written by Darin, reviewed by me.
3332 - WebKit part of fix for <rdar://problem/4007384>
3333 FILTER: Bookmark of RSS with Japanese search word & multiple RSS pages loses filter
3335 * DOM.subproj/DOMPrivate.h:
3336 updated this file, which is a copy of the WebCore version
3338 2005-02-16 Richard Williamson <rjw@apple.com>
3340 Fixed <rdar://problem/3966973> Tiger 8A357: Binary Compatiblity: frequent Webstractor.app crashes [WebImageData _nextFrame]
3342 Webstractor.app was playing tricks to create thumbnails of
3343 pages. This caused the 'focusView' to be incorrect during
3344 animated GIF frame rendering.
3348 * WebCoreSupport.subproj/WebImageRenderer.m:
3349 (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):
3351 2005-02-16 Vicki Murley <vicki@apple.com>
3353 Reviewed by me, code change by Darin.
3355 - fixed the build on Panther
3357 * WebView.subproj/WebFormDataStream.m: (webSetHTTPBody):
3358 Added a Panther-specific code path that just loads all the data into one big
3359 NSData object. This means that bug 3686434 won't be fixed on SUPanWheat; we'll
3360 still load the file into memory before sending it to the server on Panther.
3362 2005-02-15 Richard Williamson <rjw@apple.com>
3364 Fixed <rdar://problem/3998368> Tiger8A376: WebTextRenderer assertion failure in Safari while browsing news.bbc.co.uk
3366 Removed use of FATAL_ALWAYS from getUncachedWidth(). It's unclear
3367 why we would trigger the FATAL_ALWAYS. In the past we've seen
3368 the message triggered because of corrupt fonts. Anyway, in this
3369 particular case, we will now return 0 for the character width,
3370 rather than exiting.
3372 Reviewed by David Harrison.
3374 * WebCoreSupport.subproj/WebTextRenderer.m:
3377 2005-02-15 Richard Williamson <rjw@apple.com>
3379 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
3381 Lie about Osaka-Mono. Treat it as fixed pitch, even though,
3382 strictly speaking it isn't. (Similar to what we do with
3385 Reviewed by David Harrison.
3387 * WebCoreSupport.subproj/WebTextRenderer.m:
3388 (-[WebTextRenderer _computeWidthForSpace]):
3389 * WebCoreSupport.subproj/WebTextRendererFactory.h:
3390 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3391 (-[NSFont _web_isFakeFixedPitch]):
3392 (-[WebTextRendererFactory isFontFixedPitch:]):
3393 (-[WebTextRendererFactory fontWithFamily:traits:size:]):
3395 2005-02-14 Darin Adler <darin@apple.com>
3399 - fixed <rdar://problem/3686434> Safari uses too much RAM on file upload, leading to malloc errors and crashes (HP printers)
3401 * WebView.subproj/WebFormDataStream.h: Added webSetHTTPBody, which creates and connects an appropriate
3402 stream to an NSMutableURLRequest.
3403 * WebView.subproj/WebFormDataStream.m: Added implementation here.
3405 * WebCoreSupport.subproj/WebBridge.m:
3406 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3408 * WebCoreSupport.subproj/WebSubresourceClient.m:
3409 (+[WebSubresourceClient startLoadingResource:withURL:customHeaders:postData:referrer:forDataSource:]):
3411 * WebView.subproj/WebFrame.m:
3412 (-[WebFrame _loadItem:withLoadType:]): Use webSetHTTPBody.
3413 (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): Ditto.
3415 * English.lproj/StringsNotToBeLocalized.txt: Updated for this change and other recent changes.
3417 2005-02-11 Richard Williamson <rjw@apple.com>
3419 Fixed <rdar://problem/4002505> 8A378: Endlessly animating gif's on http://www.entropy.ch
3421 If animated images had no loop count property we were incorrectly
3422 looping forver. Note, that in the course of fixing this bug
3423 I found that ImageIO is incorrectly NOT reporting the loop count
3424 for a whole class of animated GIFs.
3426 Reviewed by Ken Kocienda.
3428 * WebCoreSupport.subproj/WebImageData.m:
3429 (-[WebImageData _repetitionCount]):
3433 2005-02-11 Vicki Murley <vicki@apple.com>
3437 - fix deployment build on Panther
3439 * WebView.subproj/WebHTMLView.m:
3440 (-[WebHTMLView changeBaseWritingDirection:]): ifdef out NSWritingDirectionNatural
3441 (-[WebHTMLView toggleBaseWritingDirection:]): fix a spacing issue
3443 2005-02-10 David Harrison <harrison@apple.com>
3445 Reviewed by Richard.
3447 <rdar://problem/3991652> REGRESSION (Mail): Deleting entire line in reply deletes extra blank line and moves insertion point
3449 * WebView.subproj/WebHTMLView.m:
3450 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:isTypingAction:]):
3451 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
3452 (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
3453 (-[WebHTMLView selectToMark:]):
3454 (-[WebHTMLView swapWithMark:]):
3455 (-[WebHTMLView transpose:]):
3456 (-[WebHTMLView _selectMarkedText]):
3457 (-[WebHTMLView _selectRangeInMarkedText:]):
3458 Adopt new default affinity of NSSelectionAffinityDownstream as of <rdar://problem/3937447>.
3460 2005-02-10 Darin Adler <darin@apple.com>
3462 Reviewed by Harrison.
3464 - fixed <rdar://problem/4002084> Setting ResourceLoadDelegate to nil can cause a crash