1 2005-11-01 Tim Omernick <timo@apple.com>
3 Reviewed by John Sullivan.
5 <rdar://problem/4318632>
7 I've added a new notification, WebPluginWillPresentNativeUserInterfaceNotification. Plugins are expected to post this
8 notification before presenting "native UI", such as dialog boxes. A Dashboard client can observe this notification to
9 hide the Dashboard layer when plugins present external UI.
11 * English.lproj/StringsNotToBeLocalized.txt:
12 Added "WebPluginWillPresentNativeUserInterface".
14 * Plugins.subproj/WebPluginsPrivate.h: Added.
15 * Plugins.subproj/WebPluginsPrivate.m: Added.
16 Declare WebPluginWillPresentNativeUserInterfaceNotification.
18 * WebKit.xcodeproj/project.pbxproj:
19 Added WebPluginsPrivate.[hm]
22 Added _WebPluginWillPresentNativeUserInterfaceNotification.
24 2005-11-01 John Sullivan <sullivan@apple.com>
26 Reviewed by Darin Adler.
28 fixed deployment build by hiding local variables used only in ASSERTs on builds for
29 which ASSERT_DISABLED is true.
31 * History.subproj/WebHistory.m:
32 (-[WebHistoryPrivate removeItemForURLString:]):
33 (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]):
35 2005-11-01 John Sullivan <sullivan@apple.com>
37 Reviewed by Tim Omernick.
39 - fixed <rdar://problem/4324104> Assertion failure (foundDate) in WebHistory
41 WebFrame was updating the last visited date on a WebHistoryItem behind WebHistory's
42 back, causing WebHistory's caches of items by date to get out of sync with reality.
43 Changed to set the date through WebHistory rather than directly.
45 * History.subproj/WebHistory.m:
46 (-[WebHistoryPrivate _removeItemFromDateCaches:]):
47 New method, extracted from removeItemForURLString.
48 (-[WebHistoryPrivate removeItemForURLString:]):
49 Now calls extracted method. Cleaned up white space a little.
50 (-[WebHistoryPrivate _addItemToDateCaches:]):
51 New method, extracted from addItem:
52 (-[WebHistoryPrivate addItem:]):
53 Now calls extracted method. Cleaned up white space a little.
54 (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]):
55 New method, removes item from date caches, changes date, then adds item back to
56 date caches and sends notification.
57 (-[WebHistory setLastVisitedTimeInterval:forItem:]):
58 New method, cover for WebHistoryPrivate version.
60 * History.subproj/WebHistoryItem.m:
61 (-[WebHistoryItem _setLastVisitedTimeInterval:]):
62 Don't send notification here; send from new WebHistory method instead.
64 * History.subproj/WebHistoryItemPrivate.h:
65 Added comment about avoiding incorrect use of _setLastVisitedTimeInterval:
66 * History.subproj/WebHistoryPrivate.h:
67 Added declarations for WebHistory and WebHistoryPrivate versions of
68 setLastVisitedTimeInterval:forItem:
70 * WebView.subproj/WebFrame.m:
71 (-[WebFrame _transitionToCommitted:]):
72 change history item's date via new WebHistory method rather than directly
74 2005-10-25 Timothy Hatcher <timothy@apple.com>
78 Remove the use of a stamp file in the Frameworks symlink build phase.
79 This lets us pass the build verification.
81 * WebKit.xcodeproj/project.pbxproj:
83 2005-10-24 Darin Adler <darin@apple.com>
87 - change internal methods in WebTextRenderer to be functions in case this
88 has any effect on speed (also makes things a bit clearer, in my opinion)
90 * WebCoreSupport.subproj/WebTextRenderer.h: Made all fields public, which is
91 OK since this is really a private class. Made setAlwaysUseATSU: class method
92 public too for the same reason.
94 * WebCoreSupport.subproj/WebTextRenderer.m: Change all methods to functions.
95 (destroy): Function name for method free.
96 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]): Removed code to first subtract
97 lineSpacing - descent, then later add it back.
98 (getSmallCapsRenderer): Function name for method smallCapsRenderer.
99 (findSubstituteFont): Function name for method substituteFontForString:families:.
100 (findSubstituteRenderer): Function name for method substituteRendererForCharacters:length:families:.
101 (updateGlyphMapEntry): Function name for method updateGlyphEntryForCharacter:glyphID:substituteRenderer:.
102 (extendGlyphMap): Function name for method extendCharacterToGlyphMapToInclude:.
103 (extendWidthMap): Function name for method extendGlyphToWidthMapToInclude:.
104 (getTextBounds): Function name for method trapezoidForRun:style:atPoint:.
106 2005-10-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
108 Reviewed by Darin. Committed by David Harrison.
110 http://bugzilla.opendarwin.org/show_bug.cgi?id=5415
111 "Left border of selection highlight leaves behind a trail"
113 * manual-tests/drag_select_highlighting.html: Added.
114 (this test case was added to WebCore)
116 * WebCoreSupport.subproj/WebTextRenderer.m:
117 (overrideLayoutOperation):
118 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]):
119 (-[WebTextRenderer ATSU_drawHighlightForRun:style:geometry:]):
120 (advanceWidthIterator):
123 2005-10-23 Tim Omernick <tomernick@apple.com>
125 Reviewed by Dave Hyatt.
127 <http://bugzilla.opendarwin.org/show_bug.cgi?id=5365>
129 Send -webPlugInStop (or -pluginStop) and -webPluginDestroy (or -pluginDestroy)
130 to complying plugins right when they're removed from the WebHTMLView, and also
131 release them from the plugin controller's arrays.
133 I think this patch makes WebKit behave more like plugins expect it to, which is
134 the way it already behaves with Netscape plugins.
136 I expect complying plugins to stop making noise when receiving the stop
137 message, but QuickTime doesn't. If it's lucky, then it will be deallocated
138 because of the release and will stop then. However, JS, for one, can retain the
139 plugin (e.g. if you execute <javascript:document.getElementById('obj').width;>
140 before clicking Remove OBJECT), in which case it will just keep playing.
142 * Plugins.subproj/WebPluginController.h:
143 * Plugins.subproj/WebPluginController.m:
144 (-[WebPluginController destroyPlugin:]):
145 Stop and destroy the plugin.
146 * WebView.subproj/WebHTMLView.m:
147 (-[NSArray willRemoveSubview:]):
148 Destroy plugins when they are removed from the HTML view.
150 2005-10-23 Geoffrey Garen <ggaren@apple.com>
154 For better abstraction, made the tokenizer -- instead of the
155 data source -- responsible for calling [WebFrame _checkLoadComplete]
156 when the tokenizer stops.
158 * WebView.subproj/WebDataSource.m:
159 (-[WebDataSource _stopLoadingInternal]):
161 2005-10-21 Geoffrey Garen <ggaren@apple.com>
165 WebKit side of the fix for <rdar://problem/4184719> window.print() followed by
166 window.close() causes world leak
168 No test case added because I have another reviewed patch that will include a test
169 for this bug as well as many others.
171 Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading]
172 to false, so the didFInishLoad delegates never fired.
174 The reason isLoading didn't become false was that the tokenizer was still running.
175 The fix here is to move the call to [WebCoreBridge stopLoading] above the early return
176 inside [WebDataSource stopLoading] -- since the tokenizer may still be running even if the
177 loader is finished loading -- and then to call [WebFrame _checkLoadComplete] to
178 give the frame a chance to fire its delegates.
180 * WebView.subproj/WebDataSource.m:
181 (-[WebDataSource _stopLoadingInternal]):
183 2005-10-21 Beth Dakin <bdakin@apple.com>
187 Fix for <rdar://problem/3853672> Malformed HTML using crashes Safari in NSFireTimer
189 The webFrame was being deleted prematurely by a call to stop(), so we changed it
190 so that the calls to _receivedMainResourceError and _mainReceivedError happen
191 before the stop(), and we retain the bridge.
193 * WebView.subproj/WebDataSource.m:
194 (-[WebDataSource _receivedMainResourceError:complete:]):
196 2005-10-21 Geoffrey Garen <ggaren@apple.com>
198 Patch by TimO, Reviewed by hyatt, tested and landed by me.
200 Found what appears to be a misguided optimization that actually causes a measurable performance problem.
201 A fixed-size buffer was allocated on the stack to pass into CFURLGetBytes(), presumably to avoid malloc()
202 for URLs less than 2048 bytes. There was also a fallback which malloc()'ed a buffer in case the fixed-size
203 buffer was too small to hold the URL's bytes. This malloc()'ed buffer was then wrapped in an NSData using
204 +dataWithBytesNoCopy:length:, avoiding a memory copy (yay!)
206 The problem with this approach is two-fold:
208 1. Regardless of how the buffer was allocated and filled, it is immediately wrapped in an NSData using
209 +dataWithBytes:length:, which copies the input bytes. This is pretty much unavoidable; we need to get
210 the data into a malloc()'ed buffer to return it to the caller, unless the caller provides its own storage
211 (which would be super inconvenient).
213 2. The size of the fixed buffer was large enough that it fit most (if not all) URLs involved in our Page
214 Load Test. This means the unintentionally-inefficient case was by far the most *common* case!
216 My fix is to malloc() the buffer from the start, and then use +[NSData dataWithBytes:length:freeWhenDone:]
217 to wrap the buffer in an NSData. This avoids a memory copy for the normal case where a URL is less than
218 2048 bytes, and keeps the efficient behavior for the uncommon long URL case.
220 * Misc.subproj/WebNSURLExtras.m:
221 (-[NSURL _web_originalData]):
223 2005-10-21 Mitz Pettel <opendarwin.org@mitzpettel.com>
225 Reviewed and landed by Darin.
227 - fixed a couple regressions caused by my last check-in
228 http://bugzilla.opendarwin.org/show_bug.cgi?id=5437
229 http://bugzilla.opendarwin.org/show_bug.cgi?id=5443
231 * WebCoreSupport.subproj/WebTextRenderer.m:
232 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]): Compute background width
233 correctly, by subtracting position after run from position before run.
234 (addDirectionalOverride): Make the range include only the characters between the
235 directional override characters, not the directional override characters themselves.
236 (initializeWidthIterator): Correctly compute "widthToStart" based on the offset to
237 the beginning of the run, not to the end of the run!
239 2005-10-19 Darin Adler <darin@apple.com>
243 - optimizations for a total of about 1% speed-up on PLT
245 * WebCoreSupport.subproj/WebTextRenderer.h: Updated to use bool instead of BOOL,
246 since BOOL is a signed char (which is not so efficient, at least on PPC).
247 * WebCoreSupport.subproj/WebTextRenderer.m:
248 (isSpace): Changed BOOL to bool and UniChar to UChar32. This actually fixes a
249 potential bug when the passed-in character is a non-BMP character (> FFFF).
250 (isRoundingHackCharacter): Ditto.
251 (widthForGlyph): Merged getUncachedWidth, widthFromMap, and widthForGlyph into
252 one function. Marked it inline. Changed to include syntheticBoldOffset in the
253 cached widths to save an add in the cached case. Instead of the special constant
254 UNINITIALIZED_GLYPH_WIDTH, just check for a width >= 0. This allows us to use
255 a negative number or NAN for the uninitialized width value -- I chose NAN.
256 (overrideLayoutOperation): Use bool instead of Boolean in one place.
257 (-[WebTextRenderer initWithFont:]): Use lroundf instead of ROUND_TO_INT.
258 (-[WebTextRenderer floatWidthForRun:style:]): Put the code to choose the ATSU
259 vs. CG code path back in here, because there are no callers inside the class
260 that need to call both.
261 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
262 Use bool instead of BOOL.
263 (+[WebTextRenderer setAlwaysUseATSU:]): Ditto.
264 (fontContainsString): Ditto.
265 (-[WebTextRenderer computeWidthForSpace]): Ditto. Also use roundf instead of
267 (-[WebTextRenderer setUpFont]): Use bool instead of BOOL.
269 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]): Restructure the
270 code so it can use the new advanceWidthIterator function instead of the old
271 widthForNextCharacter function.
272 (-[WebTextRenderer CG_drawRun:style:geometry:]): Use malloc instead of calloc
273 since we don't need initialization. Call CG_floatWidthForRun instead of
274 floatWidthForRun -- no need to re-check whether to use the CG or ATSU code path.
275 Removed code to handle a renderer of 0 since we no longer generate that in
276 the renderers array in advanceWidthIterator.
277 (CG_floatWidthForRun): Changed to call the new advanceWidthIterator instead of
278 the old widthForNextCharacter.
279 (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]): Use malloc instead of
280 calloc and explicitly initialize the one field that needs it. Fixed a potential
281 storage leak by adding a call to WKClearGlyphVector. Initialize the renderers
282 to self instead of to 0.
283 (-[WebTextRenderer extendGlyphToWidthMapToInclude:]): Initialize the widths to
284 NAN instead of UNINITIALIZED_GLYPH_WIDTH.
285 (addDirectionalOverride): Fixed bug where the first and last character in the buffer
286 could be uninitialized and where characters before and after the direction override
288 (-[WebTextRenderer ATSU_drawRun:style:geometry:]): Use bool instead of BOOL.
289 (-[WebTextRenderer ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
291 (advanceWidthIteratorOneCharacter): Added new helper function for CG_pointToOffset.
292 (-[WebTextRenderer CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
293 Reimplemented to use advanceWidthIteratorOneCharacter instead of widthForNextCharacter.
294 Also call CG_floatWidthForRun instead of floatWidthForRun since we don't need to
295 reconsider whether to use CG or ATSU.
296 (glyphForCharacter): Removed the map parameter and changed the renderer parameter to
297 be an in-out one. Removed uneeded special case for when map is 0 and always get the
298 renderer from the map. Also call extendCharacterToGlyphMapToInclude in here instead of
299 making that the caller's responsibility.
300 (initializeWidthIterator): Renamed to make the name shorter (removed "Character").
301 Streamlned common cases like "no padding" and removed some unneeded casts. Changed to
302 use advanceWidthIterator to compute width fo the first part of the run.
303 (normalizeVoicingMarks): Factored this out into a separate function, since it's not part
305 (advanceWidthIterator): Changed widthForNextCharacter to this, eliminating per-character
306 function overhead for iterating past a few characters. Merged the handling of surrogate
307 pairs and of voicing marks so that we typically only have to do one "if" to rule out both.
308 Merged the mirroring for RTL and uppercasing for small caps into a single boolean so that
309 we only need one "if" to rule out both. Call the new glyphForCharacter. Check for the
310 character '\t' first since that's cheaper than looking at tabWidth. Check tabWidth for 0
311 first so that we don't have to convert it to floating point when not using it. Changed
312 the special case for spaces to first check width, so that we don't bother with the rest
313 of the code for glyphs not the same width as spaces. Fixed substitution code to call
314 CG_floatWidthForRun -- no need to reconsider whether to use CG or ATSU. Also changed to
315 properly get width from the result of that function. Merged the handling of letter spacing,
316 padding, and word spacing into a single boolean so that we typically only have to do one
317 "if" to rule out all three. Check for letterSpacing of 0 first so that we don't have to
318 convert it to floating point when not using it. Same for padding and wordSpacing.
319 Move the work from ceilCurrentWidth in line into this function. Assume that either we have
320 all three pointers (widths, renderers, glyphs), or none of the three, to cut down on branches.
321 (fillStyleWithAttributes): Use bool instead of BOOL.
322 (shouldUseATSU): Ditto.
324 * Misc.subproj/WebKitNSStringExtras.m: (-[NSString _web_widthWithFont:]): Update since
325 the floatWidthForRun method no longer takes a widths parameter.
326 * Misc.subproj/WebStringTruncator.m: (stringWidth): Ditto.
328 2005-10-19 Tim Omernick <tomernick@apple.com>
330 Reviewed by eseidel & darin.
332 Changed some of the run measurement methods to C functions
333 to avoid overhead associated with objc_msgSend().
335 * WebCoreSupport.subproj/WebTextRenderer.m:
336 (-[WebTextRenderer floatWidthForRun:style:widths:]):
337 Updated to call new run measurement functions instead
338 of calling ObjC methods.
339 (-[WebTextRenderer CG_drawRun:style:geometry:]): ditto
340 (floatWidthForRun): ditto
341 (CG_floatWidthForRun): ditto
342 (ATSU_floatWidthForRun): ditto
343 (widthForNextCharacter): ditto
345 2005-10-14 Vicki Murley <vicki@apple.com>
347 Changes by Mitz Pettel, reviewed by Maciej.
349 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5029 (Assertion failure in -[NSPasteboard(WebExtras)
350 _web_writeImage:URL:title:archive:types:] when trying to drag an image from a site with no favicon)
352 * Misc.subproj/WebNSPasteboardExtras.m:
353 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]): Prefer the main resource if it is an image
355 2005-10-12 Vicki Murley <vicki@apple.com>
359 - fix <rdar://problem/4043643> iframe swallows events for overlapping elements (3449)
361 * WebView.subproj/WebHTMLView.m:
362 (-[WebHTMLView hitTest:]):
363 (-[WebHTMLView _updateMouseoverWithEvent:]): eliminate _hitViewForEvent hackery and self
364 dependency from this function
366 2005-10-12 Timothy Hatcher <timothy@apple.com>
370 Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
371 Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
373 * WebView.subproj/WebDefaultResourceLoadDelegate.m:
374 (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
375 * WebView.subproj/WebFrame.m:
376 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
377 * WebView.subproj/WebLoader.m:
378 (-[NSURLProtocol didReceiveData:lengthReceived:]):
379 * WebView.subproj/WebResourceLoadDelegate.h:
380 * WebView.subproj/WebUIDelegate.h:
381 * WebView.subproj/WebView.h:
382 * WebView.subproj/WebView.m:
383 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
384 (-[WebView spellCheckerDocumentTag]):
385 * WebView.subproj/WebViewInternal.h:
386 * WebView.subproj/WebViewPrivate.h:
388 2005-10-12 Darin Adler <darin@apple.com>
390 * WebView.subproj/WebPolicyDelegate.h: Fix a comment.
392 2005-10-11 Timothy Hatcher <timothy@apple.com>
396 Test for 10.4 because of <rdar://problem/4243463>
398 * WebView.subproj/WebHTMLView.m:
399 (-[WebHTMLView conversationIdentifier]):
401 2005-10-11 Adele Peterson <adele@apple.com>
403 Rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
406 REGRESSION text areas draw focus ring around each glyph, no caret in text fields
407 http://bugzilla.opendarwin.org/show_bug.cgi?id=5335
409 * WebView.subproj/WebHTMLView.m:
410 (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
411 (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
412 (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
414 2005-10-09 Darin Adler <darin@apple.com>
418 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
419 Would like API to flush rendering of pending DOM changes
421 This was actually a Tiger regression. When AppKit added a new code path for rendering
422 NSView, our special hack for doing layout when we draw didn't work any more. So we
423 were able to fix this without adding any API.
425 * WebView.subproj/WebHTMLView.m:
426 (-[WebHTMLView _recursiveDisplayRectIgnoringOpacity:inContext:topView:]): Added.
427 Does the same thing that other _recursiveDisplay methods do.
429 2005-10-08 Alexey Proskuryakov <ap@nypop.com>
433 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5187
434 UTF-8 in long text files breaks at some point
436 * WebView.subproj/WebTextRepresentation.m:
437 (-[WebTextRepresentation finishedLoadingWithDataSource:]):
438 Call flushReceivedData on the WebTextView so it can decode any final bytes.
440 * WebView.subproj/WebTextView.h: Added WebCoreTextDecoder field and flushReceivedData method.
441 * WebView.subproj/WebTextView.m:
442 (-[WebTextView dealloc]): Release WebCoreTextDecoder.
443 (-[WebTextView appendReceivedData:fromDataSource:]): Create a WebCoreTextDecoder to decode
444 the text; use the textEncodingName from the data source. Use it to decode instead of the
445 data source's stringWithData.
446 (-[WebTextView flushReceivedData]): Call flush on the decoder and append any last bytes to
449 2005-10-07 John Sullivan <sullivan@apple.com>
451 Reviewed by Tim Omernick.
453 WebKit support for allowing clients to know which frame originated a particular JavaScript alert/dialog.
455 * WebView.subproj/WebUIDelegatePrivate.h:
456 New optional delegate methods for the three JavaScript alert/dialogs. These are just like the existing
457 ones in WebUIDelegate.h except that each adds a parameter specifying the frame that the JavaScript was
458 running in. Eventually we'll deprecate the old three methods in favor of these in the public API.
460 * WebCoreSupport.subproj/WebBridge.m:
461 (-[WebBridge runJavaScriptAlertPanelWithMessage:]):
462 Call version of the delegate method that has the frame parameter if the delegate supports it.
463 (-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
465 (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
468 * WebView.subproj/WebDefaultUIDelegate.m:
469 (-[WebDefaultUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
470 Now implements the new version of the delegate method that includes the frame parameter. (Still
471 doesn't do anything though.)
472 (-[WebDefaultUIDelegate webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:]):
473 Now implements the new version of the delegate method that includes the frame parameter. (Still
474 doesn't do anything though.)
475 (-[WebDefaultUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):
476 Now implements the new version of the delegate method that includes the frame parameter. Doesn't
477 actually use the frame parameter here yet though.
479 2005-10-06 Darin Adler <darin@apple.com>
481 - fixed compiling on Deployment
483 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer initWithFont:]):
484 Put initialFont inside !LOG_DISABLED.
486 2005-10-06 Darin Adler <darin@apple.com>
492 * WebCoreSupport.subproj/WebTextRenderer.m: Changed function names to remove underscores;
493 fixed formatting to match our coding guidelines, other related tweaks.
495 2005-10-06 Darin Adler <darin@apple.com>
499 - fixed regression in drawing of text in non-flipped contexts from my last check-in
501 * WebCoreSupport.subproj/WebTextRenderer.m:
502 (drawGlyphs): Only flip the matrix if the NSGraphicsContext is flipped.
503 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use -[NSGraphicsContext isFlipped]
504 instead of [[NSView focusView] isFlipped].
506 2005-10-06 Darin Adler <darin@apple.com>
510 - fixed <rdar://problem/3217793> Monaco bold comes out as Helvetica bold, very bad if you choose Monaco as your fixed-width font
511 - fixed <rdar://problem/3256269> CSS1: bold/italic font styles not programmatically created if font doesn't include them (3231)
512 also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3231>
514 * WebCoreSupport.subproj/WebTextRenderer.h: Removed public declarations of private structures that are not
515 used in the header. Removed the separate 16-bit character map; the difference in code size is only a few
516 bytes per page and there's no measurable performance difference by always using the 32-bit character version.
517 Removed substitute font width maps altogether, since we now use the width map in the substitute font's renderer.
518 Also removed a few more now-unused fields and methods. Changed initWithFont to take WebCoreFont. Changed
519 the setAlwaysUseATSU: method to remove the underscore prefix.
521 * WebCoreSupport.subproj/WebTextRenderer.m:
522 (getUncachedWidth): Get font from WebCoreFont directly instead of taking a parameter, since we now use only
523 one NSFont per WebTextRenderer.
524 (widthFromMap): Removed NSFont parameter for same reason as above; simplified.
525 (widthForGlyph): Ditto.
526 (overrideLayoutOperation): Updated for change to WebCoreFont.
527 (-[WebTextRenderer initWithFont:]): Changed to use WebCoreFont. Removed code to deal with substitute font maps.
528 Changed lineGap computation to use floats instead of doubles. Added code to compute a synthetic bold offset.
529 Currently this is the font size divided by 24 and then rounded up to an integer.
530 (-[WebTextRenderer dealloc]): Updated for change to WebCoreFont and other related changes.
531 (-[WebTextRenderer finalize]): Ditto.
532 (-[WebTextRenderer xHeight]): Ditto.
533 (-[WebTextRenderer drawRun:style:geometry:]): Remove small caps case here; no longer needed. Also updated as above.
534 (-[WebTextRenderer floatWidthForRun:style:widths:]): Ditto.
535 (-[WebTextRenderer drawHighlightForRun:style:geometry:]): Ditto.
536 (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]): Ditto.
537 (+[WebTextRenderer setAlwaysUseATSU:]): Renamed to remove underscore prefix.
538 (-[WebTextRenderer smallCapsRenderer]): Ditto. Changed to create a renderer for the smaller sized font.
539 (-[WebTextRenderer _substituteFontForString:families:]): Reorganized this to be more readable and to call
540 the new rendererForAlternateFont method.
541 (-[WebTextRenderer rendererForAlternateFont:]): Added. Used to select an alternate font taking into account
542 bold and italic synthesis.
543 (-[WebTextRenderer substituteRendererForCharacters:length:families:]): Renamed to remove underscore prefix.
544 Updated to use rendererForAlternateFont.
545 (-[WebTextRenderer _computeWidthForSpace]): Updated for name changes and to remove unnecessary parameters.
546 (-[WebTextRenderer setUpFont]): Renamed to remove underscore prefix. Added code to get printer or screen
547 font as specified by WebCoreFont so calers don't need to do this.
548 (drawGlyphs): Renamed to remove underscore prefix. Added code for synthetic oblique (14 degree slant), and
549 synthetic bold (add offset and draw text a second time).
550 (-[WebTextRenderer _CG_drawRun:style:geometry:]): Keep an array of substitute renderers instead of fonts.
551 Changed around the loop to reverse the run to be a single loop instead of 3.
552 (-[WebTextRenderer floatWidthForRun:style:widths:substituteRenderers:glyphs:startPosition:numGlyphs:]):
553 Renamed to remove the underscore prefix.
554 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:substituteRenderers:glyphs:startPosition:numGlyphs:]):
555 Changed to use subsitute renderers rather than fonts.
556 (-[WebTextRenderer updateGlyphEntryForCharacter:glyphID:substituteRenderer:]): Renamed to remove underscore
557 prefix and changed to use a substitute renderer rather than a substitute NSFont.
558 (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]): Updated to work with all characters, both ones
559 that fit into 16-bit and ones that don't.
560 (-[WebTextRenderer _extendGlyphToWidthMapToInclude:]): Removed NSFont parameter and simplified. This fixes
561 a bug where numberOfGlyphs was accidentally used from the main font instead of "subFont".
562 (glyphForCharacter): Changed to use subsitute renderers instead of substitute fonts.
563 (widthForNextCharacter): Ditto. Also removed small caps code no longer needed here and replaced it with
564 simpler small caps code that no longer assumes glyphs match.
565 (shouldUseATSU): Changed the code to check ranges in order to slightly reduce the number of cases and
566 to create earlier exit for lower character codes.
568 * WebCoreSupport.subproj/WebTextRendererFactory.h: Added caches for synthesized font and oblique
569 variants so we can still use the NSFont as the dictionary key. Removed coalesceTextDrawing methods.
570 Changed methods to use WebCoreFont as the parameters and results instead of NSFont.
571 * WebCoreSupport.subproj/WebTextRendererFactory.m:
572 (-[WebTextRendererFactory clearCaches]): Clear all 8 caches.
573 (-[WebTextRendererFactory isFontFixedPitch:]): Changed code slightly so there's only one call to
574 the CFDictionarySetValue function.
575 (-[WebTextRendererFactory init]): Create all 8 caches.
576 (-[WebTextRendererFactory dealloc]): Release all 8 caches.
577 (-[WebTextRendererFactory rendererWithFont:]): Select the appropriate cache based on 3 booleans:
578 synthetic bold, synthetic oblique, and printer. Use WebCoreFont instead of NSFont.
579 (-[WebTextRendererFactory fontWithFamilies:traits:size:]): Set the synthetic bold and oblique flags
580 when returning a WebCoreFont based on requested traits that are not present in the NSFont.
581 (acceptableChoice): Ignore the synthesizable traits when deciding if a chosen font is acceptable.
582 (betterChoice): Rather than assuming that every font has all the desired traits, implement a rule
583 that says a font with an unwanted trait loses out over a font that does not have an unwanted trait.
584 This lets us chose a bold font over a non-bold font that could use synthesized bold but treat both
587 * WebCoreSupport.subproj/WebGlyphBuffer.h: Removed.
588 * WebCoreSupport.subproj/WebGlyphBuffer.m: Removed.
589 * WebKit.xcodeproj/project.pbxproj: Removed WebGlyphBuffer source files.
591 * Misc.subproj/WebKitNSStringExtras.m:
592 (-[NSString _web_drawAtPoint:font:textColor:]): Update to use WebCoreFont.
593 (-[NSString _web_widthWithFont:]): Ditto.
594 * Misc.subproj/WebStringTruncator.m:
595 (truncateString): Ditto.
596 (+[WebStringTruncator widthOfString:font:]): Ditto.
598 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]): Removed text drawing coalesce method calls.
599 * WebView.subproj/WebTextView.m: (-[WebTextView setFixedWidthFont]): Updated to use cachedFontFromFamily
600 method, which we still have, rather than fontWithFamilies method which we don't (since it now uses WebCoreFont).
601 * WebView.subproj/WebView.m: (+[WebView _setAlwaysUseATSU:]): Updated for name change to underlying method.
603 2005-10-05 Maciej Stachowiak <mjs@apple.com>
607 <rdar://problem/4158439> Safari appears to hang when sending synchronous XMLHttpRequest that gets no server response
609 No testcase - not testable w/o network.
611 * WebCoreSupport.subproj/WebBridge.m:
612 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Set a timeout of 10.
614 2005-10-04 Beth Dakin <bdakin@apple.com>
618 Fix for <rdar://problem/4285538> TOT fix for Denver Regression: Drawing glitch in the transparent dialog's cancel/ok
619 button in the widget manager.
621 * WebCoreSupport.subproj/WebImageData.m: Calls WKSetPatternPhaseInUserSpace() which is a new function that lies in
622 WebKitSystemInterface that and takes care of pattern-setting. Prevents
623 regression that occurred with image tiling in transparency layers.
624 (-[WebImageData tileInRect:fromPoint:context:]):
626 2005-10-03 Tim Omernick <tomernick@apple.com>
628 Reviewed by John Sullivan.
630 <rdar://problem/4281095> Denver regression: Seed: Safari HTML 4.01 <object ...> tag problem
632 * WebCoreSupport.subproj/WebBridge.m:
633 (-[WebBridge determineObjectFromMIMEType:URL:]):
634 If no view class is registered to handle the MIME type, check to see if there is a plugin registered which can handle it.
635 This check is required because the Java plugin does not register an NSView class, so that Java files are downloaded when
638 Prior to this fix, -determineObjectFromMIMEType:URL: would always return ObjectElementNone for Java applets (MIME type
639 "application/x-java-applet"), which would cause Java applets embedded in <OBJECT> elements to not be loaded.
641 This broke on 05-03-2005, when we changed how we handle fallback content for <OBJECT> elements so that we could pass the
644 2005-09-28 Justin Garcia <justin.garcia@apple.com>
648 Fixed <rdar://problem/4276596> multipart/x-mixed-replace: saved inline images appear only partially loaded
649 Fixed <rdar://problem/4265439> progress bar should look complete even if there is some more multipart content being loaded
651 * WebCoreSupport.subproj/WebSubresourceLoader.h:
652 * WebCoreSupport.subproj/WebSubresourceLoader.m:
653 (-[WebSubresourceLoader didReceiveResponse:]):
654 Now calls signalFinish and saveResource.
656 (-[WebSubresourceLoader signalFinish]):
657 Added. Does the part of didFinishLoading that signals to the WebDataSource and load delegates that the load is finished.
659 (-[WebSubresourceLoader didFinishLoading]):
660 * WebView.subproj/WebLoader.h:
661 * WebView.subproj/WebLoader.m:
662 (-[NSURLProtocol signalFinish]):
665 (-[NSURLProtocol didFinishLoading]):
667 2005-09-28 Adele Peterson <adele@apple.com>
671 Moved _downloadWithLoadingConnection and _downloadWithRequestfrom WebDownload.h to WebDownloadInternal.h
673 * Misc.subproj/WebDownload.h:
674 * Misc.subproj/WebDownloadInternal.h: Added.
675 * WebKit.xcodeproj/project.pbxproj: Added WebDownloadInternal.h
676 * WebView.subproj/WebMainResourceLoader.m: Added import of WebDownloadInternal.h
677 * WebView.subproj/WebView.m: ditto.
679 2005-09-27 Adele Peterson <adele@apple.com>
683 Changed ints to size_t where appropriate.
685 * Misc.subproj/WebCoreStatistics.h:
686 * Misc.subproj/WebCoreStatistics.m:
687 (+[WebCoreStatistics javaScriptObjectsCount]):
688 (+[WebCoreStatistics javaScriptInterpretersCount]):
689 (+[WebCoreStatistics javaScriptNoGCAllowedObjectsCount]):
690 (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
691 * WebView.subproj/WebPreferences.m:
692 (-[WebPreferences _pageCacheSize]):
693 (-[WebPreferences _objectCacheSize]):
694 * WebView.subproj/WebPreferencesPrivate.h:
696 2005-09-26 John Sullivan <sullivan@apple.com>
698 Reviewed by Tim Omernick.
700 - fixed <rdar://problem/4118126> Drag-and-drop text with text containing a colon causes a crash
702 There were two problems here. One is that dragging and dropping text within the same WebTextView
703 should have done nothing rather than try to navigate. The other is that navigating while processing
704 the end of the drag would dealloc the drag-initiating WebTextView, leading to a crash. Fixing the
705 former doesn't fix all cases of the latter, since dropping onto (e.g.) Safari's location field
706 could cause a navigation during the drag. So these two issues needed to be fixed separately.
708 * WebView.subproj/WebTextView.m:
709 (-[WebTextView dragSelectionWithEvent:offset:slideBack:]):
710 Before drag, retain self, and tell WebView that the drag is self-initiated. After drag, do the
711 opposite. This is the same approach as WebImageView, but it can all be contained in one method
712 here due to NSTextView's dragging API, which wraps up some of the drag-machinery guts.
714 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
716 Reviewed and landed by Darin.
718 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5100
719 -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
721 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
722 Set up a the CGContext with a matrix that flips the text if the view is not flipped.
724 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
726 Reviewed, tweaked a tiny bit, and landed by Darin.
728 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4940
729 CG and ATSUI give different width to the same text
731 * WebCoreSupport.subproj/WebTextRenderer.m:
732 (overrideLayoutOperation): Added. ATSU callback to do the rounding.
733 (-[WebTextRenderer _trapezoidForRun:style:atPoint:]): Use the new createATSULayoutParameters
734 function instead of calling _createATSUTextLayoutForRun.
735 (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Use createATSULayoutParameters,
736 and also compute the width in a way that works for any direction combination.
737 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use createATSULayoutParameters.
738 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
739 Use createATSULayoutParameters. Also put in code that seems to work around an ATSU bug.
740 (createATSULayoutParameters): Added.
741 (disposeATSULayoutParameters): Added.
743 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
748 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4862
749 Incorrect layout of bidi overrides
751 * WebCoreSupport.subproj/WebTextRenderer.m:
752 (addDirectionalOverride): Renamed, and made it work in both directions.
753 (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Updated to call addDirectionalOverride.
754 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): More of the same.
755 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]): Ditto.
757 2005-09-24 Alexey Proskuryakov <ap@nypop.com>
759 Tweaked, reviewed, and landed by Darin.
761 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4394
762 Mouse clicks ignored in inline input areas
764 * WebView.subproj/WebHTMLView.m:
765 (-[NSArray mouseDown:]): Removed misleading comment and added code to send mouse event to input manager.
766 (-[NSArray mouseDragged:]): Added code to send mouse event to input manager.
767 (-[NSArray mouseUp:]): Ditto.
768 (-[WebHTMLView _discardMarkedText]): Umnmark text before calling markedTextAbandoned: to match behavior
769 of NSTextView (not sure why we did things in the opposite order before).
770 (-[WebHTMLView _updateSelectionForInputManager]): Ditto.
774 * WebView.subproj/WebView.m:
775 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
776 Fix typecast that used ... for no good reason.
778 2005-09-23 Duncan Wilcox <duncan@mclink.it>
780 Reviewed and landed by Darin.
782 - name changes to prepare for fixing bugzilla bug 4582
784 * WebView.subproj/WebHTMLView.m: Changed names to match WebCore changes.
786 2005-09-20 John Sullivan <sullivan@apple.com>
788 Reviewed by Tim Omernick.
790 - fixed <rdar://problem/3228554> We should enforce one selection per WebView instead of per window
792 Note that this checkin does not mean that we will always maintain a selection in a WebView when
793 the focus is elsewhere. Instead it means that there should never be more than one frame containing
794 a selection in a WebView, and that it's possible to maintain a selection in a WebView when the focus
797 * WebView.subproj/WebView.m:
798 (-[WebView searchFor:direction:caseSensitive:wrap:]):
799 removed unnecessary and somewhat confusing comment
800 (-[WebView selectedFrame]):
801 now calls the extracted method -_focusedFrame
802 (-[WebView _focusedFrame]):
803 new method, extracted from -selectedFrame; returns frame containing first responder, if any
804 (-[WebView _findSelectedFrameStartingFromFrame:skippingFrame:]):
805 added skippingFrame parameter, which is never returned
806 (-[WebView _findSelectedFrameSkippingFrame:]):
807 new method, starts from main frame and passes a frame to skip
808 (-[WebView _findSelectedFrame]):
809 now calls _findSelectedFrameSkippingFrame:nil
810 (-[WebView _selectedFrameDidChange]):
811 new method, called by WebDocumentText protocol implementors; calls -deselectAll on frame that
812 formerly displayed a selection, if any
814 * WebView.subproj/WebViewInternal.h:
815 added category WebDocumentSelectionExtras, with the one method _selectedFrameDidChange
817 * WebView.subproj/WebHTMLView.m:
818 (-[WebHTMLView becomeFirstResponder]):
819 call -[WebView _selectedFrameDidChange]
821 * WebView.subproj/WebPDFView.m:
822 (-[WebPDFView becomeFirstResponder]):
823 call -[WebView _selectedFrameDidChange]
824 (-[WebPDFView resignFirstResponder]):
825 deselect all unless webview says not to; note that this doesn't work in all cases due to:
826 <rdar://problem/4265966> PDFs continue to show a (secondary) selection when the focus moves elsewhere
828 * WebView.subproj/WebTextView.m:
829 (-[WebTextView becomeFirstResponder]):
830 call -[WebView _selectedFrameDidChange]
831 (-[WebTextView resignFirstResponder]):
832 deselect all unless webview says not to
834 2005-09-20 Eric Seidel <eseidel@apple.com>
838 Moved MIME type support from a hard coded list
839 (in two places) to single lists in the corresponding
840 *Representation classes. Also moved the list of types
841 supported by WebCore (WebHTMLRepresentation) into WebCore.
842 http://bugzilla.opendarwin.org/show_bug.cgi?id=5037
844 * WebView.subproj/WebDataSource.m:
845 (addTypesFromClass): new inline function
846 (+[WebDataSource _repTypesAllowImageTypeOmission:]):
847 * WebView.subproj/WebFrameView.m:
848 (addTypesFromClass): new inline function
849 (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
850 * WebView.subproj/WebHTMLRepresentation.h:
851 * WebView.subproj/WebHTMLRepresentation.m:
852 (+[WebHTMLRepresentation supportedMIMETypes]):
853 * WebView.subproj/WebHTMLView.m:
854 (+[WebHTMLView supportedMIMETypes]):
855 * WebView.subproj/WebHTMLViewPrivate.h:
856 * WebView.subproj/WebImageRepresentation.h:
857 * WebView.subproj/WebImageRepresentation.m:
858 (+[WebImageRepresentation supportedMIMETypes]):
859 * WebView.subproj/WebImageView.h:
860 * WebView.subproj/WebImageView.m:
861 (+[WebImageView supportedMIMETypes]):
862 * WebView.subproj/WebPDFRepresentation.h:
863 * WebView.subproj/WebPDFRepresentation.m:
864 (+[WebPDFRepresentation supportedMIMETypes]):
865 * WebView.subproj/WebPDFView.h:
866 * WebView.subproj/WebPDFView.m:
867 (+[WebPDFView supportedMIMETypes]):
868 * WebView.subproj/WebTextRepresentation.h:
869 * WebView.subproj/WebTextRepresentation.m:
870 (+[WebTextRepresentation supportedMIMETypes]):
871 * WebView.subproj/WebTextView.h:
872 * WebView.subproj/WebTextView.m:
873 (+[WebTextView supportedMIMETypes]):
874 * WebView.subproj/WebView.m:
875 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
876 (+[WebView MIMETypesShownAsHTML]): updated to match style
877 (+[WebView setMIMETypesShownAsHTML:]): ditto
879 2005-09-16 John Sullivan <sullivan@apple.com>
881 * WebView.subproj/WebImageView.m:
882 (-[WebImageView copy:]):
883 fixed build-breaking silly error in previous checkin
885 2005-09-16 John Sullivan <sullivan@apple.com>
887 Reviewed by Tim Omernick
889 - fixed <rdar://problem/4256557> CrashTracer: 238 crashes in Safari at
890 com.apple.AppKit: -[NSPasteboard setData:forType:] + 188
892 * WebView.subproj/WebImageView.m:
893 (-[WebImageView copy:]):
894 declare types to pasteboard before starting to set their data
895 (-[WebImageView writeSelectionToPasteboard:types:]):
898 2005-09-16 Adele Peterson <adele@apple.com>
900 Rolling out the fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4924
901 QPainter should use CGContext as much as possible rather than NSGraphicsContext
902 since it caused a performance regression.
904 2005-09-16 Adele Peterson <adele@apple.com>
906 Change by Darin, reviewed by me and Maciej.
908 Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=4547
909 use int instead of long for 32-bit (to prepare for LP64 compiling)
911 * Plugins.subproj/npapi.m: changed types to match those defined in npapi.h
918 2005-09-14 Justin Garcia <justin.garcia@apple.com>
922 Fixes <rdar://problem/4237479> REGRESSION (Cambridge-Denver): old QuickTime movie continues to play sound after reload
923 We were adding the movie to the document twice after the changes were added to handle fallback content.
924 There are some errors for which we should not render fall back content
926 * Misc.subproj/WebKitErrorsPrivate.h:
927 Introduced WebKitErrorPlugInWillHandleLoad to represent the cancel we do
928 to prevent loading plugin content twice
930 * Plugins.subproj/WebPluginDocumentView.m:
931 (-[WebPluginDocumentView dataSourceUpdated:]): Ditto
933 * WebView.subproj/WebDataSource.m:
934 (-[WebDataSource _receivedMainResourceError:complete:]):
935 Don't handleFallbackContent on WebKitErrorPlugInWillHandleLoad or on a user cancel
937 2005-09-14 Timothy Hatcher <thatcher@apple.com>
941 * WebKit.xcodeproj/project.pbxproj:
942 made WebDashboardRegion.h a private header
944 2005-09-14 Darin Adler <darin@apple.com>
948 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4924
949 QPainter should use CGContext as much as possible rather than NSGraphicsContext
951 * WebCoreSupport.subproj/WebImageRendererFactory.m: Remove setCGCompositeOperationFromString
952 method, no longer needed.
954 2005-09-13 Tim Omernick <tomernick@apple.com>
956 Reviewed by Justin Garcia, Darin Adler.
958 - <rdar://problem/3163393> Safari does not support Windowless mode in Flash
960 * Plugins.subproj/WebBaseNetscapePluginView.h:
961 Added 'isTransparent' instance variable.
963 * Plugins.subproj/WebBaseNetscapePluginView.m:
964 (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
965 When updating a plugin in "windowless" (transparent) mode, clip drawing to the dirty
966 region of the opaque ancestor. This means that a partially-transparent plugin, which
967 by definition does not clear its port on redraw, will not overdraw the valid parts
969 (-[WebBaseNetscapePluginView sendEvent:]):
970 Disabled the "green debug background" for transparent plugins -- since they are not
971 expected to cover their entire port every redraw, this debug code makes no sense.
972 (-[WebBaseNetscapePluginView setVariable:value:]):
973 Implemented -setVariable:value:, which is called from NPN_SetValue() (previously
975 Right now we only handle NPPVpluginTransparentBool; if we choose to handle the other
976 plugin variables, then we may do so here.
977 * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
978 Added SPI for -[WebBaseNetscapePluginView setVariable:value].
979 * Plugins.subproj/npapi.m:
981 Implemented this function so that plugins may set state (such as window mode).
983 2005-09-11 Mark Rowe <opendarwin.org@bdash.net.nz>
985 Reviewed, tweaked, and landed by Darin.
987 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4286
988 .Mac prefpane crashes when Safari using CVS WebKit is running
990 * WebView.subproj/WebView.m: (-[WebView initWithFrame:frameName:groupName:]):
991 If ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH, and WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
992 is set in the environment, then unset DYLD_FRAMEWORK_PATH.
994 * WebKit.xcodeproj/project.pbxproj: Set ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
995 in configurations other than Default -- we don't want that code in production
996 builds, but we want it in builds we do ourselves and nightly builds.
998 2005-09-10 Ingmar J Stein <IngmarStein@gmail.com>
1000 Reviewed and landed by Darin.
1002 * WebCoreSupport.subproj/WebImageRenderer.m:
1003 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
1004 Removed unused local variable.
1006 2005-09-09 Tim Omernick <tomernick@apple.com>
1008 Reviewed by John Sullivan.
1010 * History.subproj/WebBackForwardList.m:
1011 (-[WebBackForwardList removeItem:]):
1012 SPI to remove a given WebHistoryItem.
1014 * History.subproj/WebBackForwardListPrivate.h: Added.
1016 * WebKit.xcodeproj/project.pbxproj:
1017 Added WebBackForwardListPrivate.h as a private header.
1019 2005-09-09 John Sullivan <sullivan@apple.com>
1021 Reviewed by Tim Omernick.
1023 fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4070:
1024 Find in plain text won't find only occurrence if it overlaps selection
1026 * Misc.subproj/WebSearchableTextView.m:
1027 (-[NSString findString:selectedRange:options:wrap:]):
1028 in the wrap case, extend the search range far enough that text overlapping the
1029 selection (including the exact-match case) will be considered.
1031 2005-09-08 Justin Garcia <justin.garcia@apple.com>
1035 WebKit portion of multipart/x-mixed-replace support
1037 * WebCoreSupport.subproj/WebSubresourceLoader.m:
1038 (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
1039 Subresource case: Check for Foundation level multipart support
1040 (-[WebSubresourceLoader didReceiveResponse:]):
1041 Send previously received data in a multipart section to the coreLoader
1042 (-[WebSubresourceLoader didReceiveData:lengthReceived:]):
1043 Don't send data to the coreLoader until it has been completely received
1044 * WebView.subproj/WebDataSource.m:
1045 (-[WebDataSource _startLoading:]):
1046 Main resource case: check for Foundation level multipart support
1047 (+[WebDataSource _repTypesAllowImageTypeOmission:]):
1048 Some server apps send data right after declaring content multipart/x-mixed-replace, and expect it to be treated as html
1049 (-[WebDataSource _commitIfReady:]):
1050 Don't ask the WebFrame to close its old WebDataSource when loading a multipart section, because we're going to reuse it
1051 (-[WebDataSource _receivedData:]):
1052 For non text/html multipart sections, we commit the data all at once, at the end
1053 (-[WebDataSource _doesProgressiveLoadWithMIMEType:]):
1054 Added heuristic for when to commit the load incrementally
1055 (-[WebDataSource _commitLoadWithData:]):
1056 Moved from _receivedData into its own function
1057 (-[WebDataSource _revertToProvisionalState]):
1058 (-[WebDataSource _setupForReplaceByMIMEType:]):
1059 Commits the data received for the previous multipart section if it wasn't loaded progresively, clears out the WebFrame and WebDatasource for the next multipart section
1060 * WebView.subproj/WebDataSourcePrivate.h:
1061 * WebView.subproj/WebFrame.m:
1062 (-[WebFrame _transitionToCommitted:]):
1063 The very first multipart section is treated as a normal load, so that the back/forward list and history are updated.
1064 All later sections have a new load type, WebFrameLoadTypeReplace, and are treated like reloads
1065 (-[WebFrame _checkLoadCompleteForThisFrame]): Ditto
1066 (-[WebFrame _itemForRestoringDocState]): Ditto
1067 (-[WebFrame _setupForReplace]):
1068 Clears out the WebFrame for the next multipart section
1069 * WebView.subproj/WebFrameInternal.h:
1070 * WebView.subproj/WebFramePrivate.h:
1071 * WebView.subproj/WebFrameView.m:
1072 (+[WebFrameView _viewTypesAllowImageTypeOmission:]): See above
1073 * WebView.subproj/WebLoader.h:
1074 * WebView.subproj/WebLoader.m:
1075 (-[NSURLProtocol clearResourceData]):
1076 (-[NSURLProtocol setSupportsMultipartContent:]):
1077 * WebView.subproj/WebMainResourceLoader.m: Straightforward
1078 (-[WebMainResourceLoader didReceiveResponse:]):
1080 2005-09-06 Geoffrey Garen <ggaren@apple.com>
1082 - fixed build bustage from last checkin.
1086 * History.subproj/WebBackForwardList.m:
1087 (-[WebBackForwardList pageCacheSize]): updated debug printf since we no
1088 longer have a variable called 'multiplier'
1090 2005-09-06 David Hyatt <hyatt@apple.com>
1092 Reduce the # of cached pages for a back/forward list. The old cache would cache the
1094 > 1gb memory = 16 pages per tab/window
1095 > 512mb memory = 8 pages per tab/window
1096 <= 512mb memory = 4 pages per tab/window
1098 This consumes far too much memory and is way too aggressive. The new cache sizes are
1100 >= 1gb memory = 3 pages per tab/window
1101 >= 512mb memory = 2 pages per tab/window
1102 < 512mb memory = 1 page per tab/window
1106 * History.subproj/WebBackForwardList.m:
1107 (-[WebBackForwardList pageCacheSize]):
1108 * WebView.subproj/WebPreferences.m:
1109 (+[WebPreferences initialize]):
1111 2005-09-05 Darin Adler <darin@apple.com>
1113 Reviewed by John Sullivan.
1115 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4846
1116 REGRESSION: Carbon WebKit applications don't work at all
1118 * Carbon.subproj/HIWebView.m: Remove lots of unneeded declarations of private stuff.
1119 (Draw): Call WKNSWindowOverrideCGContext and WKNSWindowRestoreCGContext rather
1120 than calling a non-existent setCGContext: method on the context.
1122 2005-09-05 John Sullivan <sullivan@apple.com>
1124 Reviewed by Dave Hyatt.
1126 - change related to <rdar://problem/4211999> Safari quits when click-drag-hold an image
1127 that is set to automatically change.
1129 * WebView.subproj/WebHTMLView.m:
1130 (-[NSArray namesOfPromisedFilesDroppedAtDestination:]):
1131 handle nil wrapper with ERROR and early return rather than ASSERT, since we now know
1132 of a way to reproduce this (written up as 4244861)
1134 2005-09-05 Darin Adler <darin@apple.com>
1136 Reviewed by John Sullivan.
1138 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4357
1139 crash related to animated GIFs, reproducible in non-Safari WebKit application
1141 * WebCoreSupport.subproj/WebImageData.m:
1142 (removeAnimatingRendererFromView): Added.
1143 (removeFromDictionary): Added.
1144 (-[WebImageData removeAnimatingRenderer:]): Rewrote using CF functions rather than
1145 NS functions so that we never retain the views, since this can be called from
1146 a view's dealloc method.
1147 (setNeedsDisplayInAnimationRect): Added.
1148 (-[WebImageData _nextFrame:]): Rewrote as above, even though in this case it can't
1149 be called from the dealloc method.
1151 2005-08-26 David Hyatt <hyatt@apple.com>
1153 Add support for a new scaling and tiling function so that border images from CSS3
1158 * WebCoreSupport.subproj/WebImageData.h:
1159 * WebCoreSupport.subproj/WebImageData.m:
1160 (-[WebImageData scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
1161 * WebCoreSupport.subproj/WebImageRenderer.m:
1162 (-[WebImageRenderer scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
1163 (-[WebImageRenderer setAnimationRect:]):
1164 * WebView.subproj/WebHTMLView.m:
1165 (-[WebHTMLView updateFocusState]):
1167 2005-08-26 Adele Peterson <adele@apple.com>
1171 * WebKit.xcodeproj/project.pbxproj: Changed WebKit.Framework to WebKit.framework in UMBRELLA_FRAMEWORK.
1173 2005-08-25 David Harrison <harrison@apple.com>
1177 <rdar://problem/4227734> Denver Regression: WebCore selection bug on lines starting with tab (clownfish)
1179 The text is in a DIV styled with "white-space:pre", and uses newline characters as linebreaks.
1180 WebKit's text renderer is erroneously considering the width of the lines leading up to the tab
1181 character when calculating the width of the tab.
1182 Easily fixed by having widthForNextCharacter ignore the widthToStart when working with tabWidth.
1183 Any prior text that fits in the same line is already factored into the xpos, which is paid attention to.
1185 * WebCoreSupport.subproj/WebTextRenderer.m:
1186 (widthForNextCharacter):
1187 Ignore the widthToStart when working with tabWidth.
1189 2005-08-23 John Sullivan <sullivan@apple.com>
1191 Reviewed by Beth Dakin.
1193 - fixed <rdar://problem/4229167> 14 leaks of WebFileButton and associated objects,
1194 seen after running webkit layout tests
1196 * WebCoreSupport.subproj/WebBridge.m:
1197 (-[WebBridge fileButtonWithDelegate:]):
1198 this method was returning a retained object; I added an autorelease
1200 2005-08-23 Darin Adler <darin@apple.com>
1202 * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
1204 2005-08-23 Mitz Pettel <opendarwin.org@mitzpettel.com>
1206 Reviewed and landed by Darin.
1208 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4604
1209 LEAK -[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:] leaks an ATSUTextLayout
1210 <rdar://problem/4228787> ATSUTextLayout leak in _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs: (4604)
1212 * WebCoreSupport.subproj/WebTextRenderer.m:
1213 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
1214 Added missing call to ATSUDisposeTextLayout.
1216 2005-08-22 Geoffrey Garen <ggaren@apple.com>
1218 - fixed <rdar://problem/4227011> Debugger SPI should be removed from WebView.h API
1220 Reviewed by mjs and adele.
1222 Cut and pasted debugging SPI from WebView to WebView(WebPendingPublic)
1224 * WebView.subproj/WebView.h:
1225 * WebView.subproj/WebView.m:
1226 (-[WebView setScriptDebugDelegate:]):
1227 (-[WebView scriptDebugDelegate]):
1228 * WebView.subproj/WebViewPrivate.h:
1230 2005-08-20 John Sullivan <sullivan@apple.com>
1232 Reviewed by Darin Adler.
1234 - WebKit part of fix for
1235 <rdar://problem/3977607> ER: Safari should check framework versions at launch
1237 * WebView.subproj/WebViewPrivate.h:
1238 * WebView.subproj/WebView.m:
1239 (+[WebView _minimumRequiredSafariBuildNumber]):
1240 new method, returns the minimum build number of Safari that this WebKit is
1241 willing to work with. (The Safari version has to be new enough to check
1242 for this value in order for this to have any effect.)
1244 2005-08-19 Justin Garcia <justin.garcia@apple.com>
1248 The boolean justOpenedForTargetedLink is never used to determine a course of action.
1249 It was added long ago for findOrCreateFramedNamed, which has since been removed.
1251 * WebView.subproj/WebDataSource.m:
1252 * WebView.subproj/WebDataSourcePrivate.h:
1253 * WebView.subproj/WebFrame.m:
1254 (-[WebFrame _loadDataSource:withLoadType:formState:]):
1255 * WebView.subproj/WebFramePrivate.h:
1257 2005-08-19 Darin Adler <darin@apple.com>
1261 * English.lproj/Localizable.strings: Updated to include a new localizable string
1262 that was added a long while back. Apprently no one has run into the code using
1263 this string, because if they had, they'd have seen an assert.
1264 * English.lproj/StringsNotToBeLocalized.txt: Updated for various recent changes.
1266 2005-08-17 Maciej Stachowiak <mjs@apple.com>
1270 - fix mysterious CGImageSource error message and possibly crash on layout tests.
1272 * WebView.subproj/WebMainResourceLoader.m:
1273 (-[WebMainResourceLoader receivedError:]): Retain the data source since it may
1274 prematurely self-destruct otherwise.
1275 (-[WebMainResourceLoader cancelWithError:]): ditto
1277 2005-08-17 Justin Garcia <justin.garcia@apple.com>
1281 Addresses <rdar://problem/4192534> new frame load delegate SPI needed for Dashboard
1282 Added handledOnloadEvents delegate method (private for now)
1284 * WebCoreSupport.subproj/WebBridge.m:
1285 (-[WebBridge handledOnloadEvents]):
1286 * WebView.subproj/WebDefaultFrameLoadDelegate.m:
1287 (-[WebDefaultFrameLoadDelegate webView:didHandleOnloadEventsForFrame:]):
1288 * WebView.subproj/WebFrame.m:
1289 (-[WebFrame _handledOnloadEvents]):
1290 * WebView.subproj/WebFramePrivate.h:
1291 * WebView.subproj/WebViewPrivate.h:
1293 2005-08-17 John Sullivan <sullivan@apple.com>
1295 Reviewed by Geoff Garen.
1297 - fixed <rdar://problem/4219817> Particular icon database + bookmarks + history crashes Safari on launch
1299 * Misc.subproj/WebIconDatabase.m:
1300 (-[WebIconDatabase releaseIconForURL:]):
1301 Move line that might remove last reference to iconURL to the end of the block.
1303 2005-08-16 Darin Adler <darin@apple.com>
1307 - improved fix for <rdar://problem/4211631>, tiled images tiled incorrectly when printing or
1310 * WebCoreSupport.subproj/WebImageData.m: (-[WebImageData tileInRect:fromPoint:context:]):
1311 Fix pattern phase origin to use the image tile origin, which is clearly right, rather than
1312 the image rectangle, which isn't right, but often is the same.
1314 2005-08-16 Adele Peterson <adele@apple.com>
1318 - fixed <rdar://problem/4210320> URL tooltips should display a URL for elements that submit forms
1320 When the setShowsURLsInToolTips preference is set, we will display a tooltip containing
1321 the form's url when you mouse over a submit button.
1323 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _updateMouseoverWithEvent:]):
1325 2005-08-16 Darin Adler <darin@apple.com>
1327 Reviewed by Beth Dakin.
1329 - removed Panther-only code that was not being compiled and was
1330 simply "bit-rotting"
1332 * Misc.subproj/WebFileDatabase.m:
1333 (-[WebFileDatabase _createLRUList:]):
1334 (+[WebFileDatabase _syncLoop:]):
1335 * Misc.subproj/WebKitErrors.m:
1337 * Misc.subproj/WebNSObjectExtras.h:
1339 * Misc.subproj/WebNSPasteboardExtras.m:
1340 (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
1341 * WebCoreSupport.subproj/WebImageData.h:
1342 * WebCoreSupport.subproj/WebImageDecodeItem.h:
1343 * WebCoreSupport.subproj/WebImageDecodeItem.m:
1344 * WebCoreSupport.subproj/WebImageDecoder.h:
1345 * WebCoreSupport.subproj/WebImageDecoder.m:
1347 (startDecoderThread):
1348 * WebCoreSupport.subproj/WebKeyGeneration.cpp: Removed.
1349 * WebCoreSupport.subproj/WebKeyGeneration.h: Removed.
1350 * WebCoreSupport.subproj/WebKeyGenerator.h:
1351 * WebCoreSupport.subproj/WebTextRenderer.m:
1354 * WebCoreSupport.subproj/WebViewFactory.m:
1355 (-[WebViewFactory getBytes:fromTextMarker:length:]):
1356 * WebKit.xcodeproj/project.pbxproj:
1358 * WebView.subproj/WebDataSource.m:
1359 (-[WebDataSource _setPrimaryLoadComplete:]):
1360 (+[WebDataSource _repTypesAllowImageTypeOmission:]):
1361 (-[WebDataSource isLoading]):
1362 * WebView.subproj/WebDefaultContextMenuDelegate.m:
1363 (localizedMenuTitleFromAppKit):
1364 (-[WebDefaultUIDelegate menuItemWithTag:]):
1365 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
1366 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
1367 * WebView.subproj/WebFormDataStream.m:
1370 * WebView.subproj/WebFrameView.m:
1371 (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
1372 * WebView.subproj/WebHTMLView.m:
1373 (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]):
1374 (-[WebHTMLView resourceForData:preferredFilename:]):
1375 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
1376 (-[WebHTMLView validateUserInterfaceItem:]):
1377 (-[WebHTMLView _attributeStringFromDOMRange:]):
1378 (-[WebHTMLView toggleBaseWritingDirection:]):
1379 (-[WebHTMLView changeBaseWritingDirection:]):
1380 * WebView.subproj/WebPDFRepresentation.h:
1381 * WebView.subproj/WebPDFRepresentation.m:
1382 * WebView.subproj/WebPDFView.h:
1383 * WebView.subproj/WebPDFView.m:
1384 * WebView.subproj/WebPreferences.m:
1385 (+[WebPreferences _systemCFStringEncoding]):
1386 * WebView.subproj/WebView.m:
1387 (-[WebView _commonInitializationWithFrameName:groupName:]):
1389 2005-08-16 Darin Adler <darin@apple.com>
1391 Reviewed by Beth Dakin.
1393 - removed some unnecessary code
1395 * WebCoreSupport.subproj/WebGraphicsBridge.h: Removed pattern-phase related field and methods.
1396 * WebCoreSupport.subproj/WebGraphicsBridge.m: Ditto.
1398 * WebCoreSupport.subproj/WebImageData.m: Tweaked formatting and removed some unused code
1399 inside #if and comments.
1401 * WebCoreSupport.subproj/WebImageRenderer.h: Removed USE_CGIMAGEREF (which is always true now).
1402 * WebCoreSupport.subproj/WebImageRenderer.m: Removed old non-CGImageRef code.
1404 * WebCoreSupport.subproj/WebImageRendererFactory.m:
1405 (-[WebImageRendererFactory imageRendererWithMIMEType:]): Removed non-USE_CGIMAGEREF code.
1406 (-[WebImageRendererFactory imageRendererWithData:MIMEType:]): Ditto.
1407 (-[WebImageRendererFactory imageRendererWithSize:]): Ditto.
1408 (-[WebImageRendererFactory imageRendererWithName:]): Ditto.
1410 2005-08-15 Darin Adler <darin@apple.com>
1414 This is a fix for <rdar://problem/4211631> tiled images tiled incorrectly when printing or
1417 Cayenne found there was a problem when they were trying to take screen shots of widgets, and
1418 it was ultimately a problem with the way we tile images. Darin was able to fix the problem
1419 by replacing some confusing hacked code with CG calls.
1421 * WebCoreSupport.subproj/WebImageData.m:
1422 (-[WebImageData tileInRect:fromPoint:context:]):
1423 * WebCoreSupport.subproj/WebImageRenderer.m:
1424 (-[WebInternalImage tileInRect:fromPoint:context:]):
1425 * WebCoreSupport.subproj/WebTextRenderer.m:
1426 (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
1428 2005-08-14 Maciej Stachowiak <mjs@apple.com>
1432 - 1% speedup on HTML load speed iBench by avoiding icon database thrash
1433 http://bugzilla.opendarwin.org/show_bug.cgi?id=4423
1435 * Misc.subproj/WebIconDatabase.m:
1436 (-[WebIconDatabase _setIconURL:forURL:]): Be more aggressive about returning early, because
1437 updating the database does some expensive data structure copies.
1440 2005-08-14 Duncan Wilcox <duncan@mclink.it>
1442 Reviewed and landed by Darin.
1444 WebKit part of fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=4011>:
1445 "Editing delegate selection methods not called when using mouse"
1447 Clicking on editable content would move the cursor or alter the selection without
1448 calling the appropriate editing delegate method
1449 (webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:). The
1450 core of the patch is in the KHTMLPart::handleMousePressEvent* methods, the rest
1451 is glue needed to drill through all the layers.
1453 * WebCoreSupport.subproj/WebBridge.m:
1454 (-[WebBridge shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
1457 * WebView.subproj/WebView.m:
1458 (-[WebView(WebViewEditingExtras) _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
1459 Final step in glue, calling editing delegate.
1461 * WebView.subproj/WebViewInternal.h:
1462 Added _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting: private method to WebViewEditingExtras
1465 2005-08-11 Beth Dakin <bdakin@apple.com>
1469 This is a fix for <rdar://problem/4141161> REGRESSION (Tiger): WebKit does not display in composited Carbon windows.
1470 I basically did what Troy suggests in his bug comments, and everything seems to work fine!
1472 * Carbon.subproj/HIViewAdapter.m:
1473 (-[HIViewAdapter setNeedsDisplayInRect:]):
1475 2005-08-10 Adele Peterson <adele@apple.com>
1477 Bumping version to 420+
1481 2005-08-08 Darin Adler <darin@apple.com>
1483 Reviewed by John Sullivan.
1485 - fixed <rdar://problem/3996324> REGRESSION (1.2-2.0): scroll bars sometimes not updated properly (with >40 duplicate reports!)
1486 also http://bugzilla.opendarwin.org/show_bug.cgi?id=3416
1488 * WebView.subproj/WebHTMLView.m:
1489 (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1490 Propagate dirty rects after doing a layout, since a layout can create new dirty rects.
1492 2005-08-05 Adele Peterson <adele@apple.com>
1496 * WebKit.xcodeproj/project.pbxproj: Unchecked 'statics are thread safe' option.
1498 2005-08-04 Justin Garcia <justin.garcia@apple.com>
1503 <rdar://problem/3167884> Shockwave: 3D sprites rendered in OpenGL draw over the browser (3447)
1504 also as <http://bugzilla.opendarwin.org/show_bug.cgi?id=3447>
1506 The WindowRef created by -[NSWindow windowRef] has a QuickDraw GrafPort that covers
1507 the entire window frame (or structure region in Carbon parlance) rather then just the window content.
1509 We filed this as an NSWindow bug <rdar://problem/4201099>
1511 To work around, we modify the CGrafPort to only cover the content area before we let the plug-in draw.
1513 * Plugins.subproj/WebBaseNetscapePluginView.m:
1514 (-[WebBaseNetscapePluginView fixWindowPort]):
1515 (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
1517 2005-08-03 John Sullivan <sullivan@apple.com>
1519 Reviewed by Geoff Garen.
1521 - fixed <rdar://problem/3918675> Remove code to replace authentication dialog
1522 with a subclass when out of localization freeze
1524 * Panels.subproj/WebAuthenticationPanel.h:
1525 moved declaration of NonBlockingPanel here so it can be accessed by the nib
1526 * Panels.subproj/WebAuthenticationPanel.m:
1527 (-[WebAuthenticationPanel replacePanelWithSubclassHack]):
1529 (-[WebAuthenticationPanel loadNib]):
1530 stop calling the removed method
1532 * Panels.subproj/English.lproj/WebAuthenticationPanel.nib/classes.nib:
1533 * Panels.subproj/English.lproj/WebAuthenticationPanel.nib/info.nib:
1534 * Panels.subproj/English.lproj/WebAuthenticationPanel.nib/objects.nib:
1535 the panel in the nib now has custom class NonBlockingPanel
1537 2005-08-03 Beth Dakin <bdakin@apple.com>
1541 Removing calls to WKCreateUncorrectedRGBColorSpace and
1542 WKCreateUncorrectedGrayColorSpace in WebKit to patch up
1543 TOT...Eric removed them from WebCore last night.
1545 * WebCoreSupport.subproj/WebImageData.m:
1546 * WebCoreSupport.subproj/WebImageRenderer.m:
1547 (WebCGColorSpaceCreateRGB):
1548 (WebCGColorSpaceCreateGray):
1550 2005-08-02 John Sullivan <sullivan@apple.com>
1552 Reviewed by Darin Adler.
1554 Preemptively moved some WebMenuItemTag values from SPI to API, in anticipation of
1555 approval from macosx-api-reviewers. Retitled one of them in response to API reviewers feedback:
1556 WebMenuItemSearchInGoogle -> WebMenuItemSearchWeb
1558 Note that as a side effect of this change, the actual numbers used for these WebMenuItemTags has
1559 changed from what it was in Tiger. This causes "Search in Spotlight", "Search in Google", and
1560 "Look Up in Dictionary" to not appear in Tiger Safari if running on tip of tree WebKit.
1562 * WebView.subproj/WebUIDelegatePrivate.h:
1563 removed WebMenuItemTagSearchInSpotlight, WebMenuItemTagSearchInGoogle, and WebMenuItemTagLookUpInDictionary
1565 * WebView.subproj/WebUIDelegate.h:
1566 added WebMenuItemTagSearchInSpotlight, WebMenuItemTagSearchWeb, and WebMenuItemTagLookUpInDictionary
1568 * WebView.subproj/WebDefaultContextMenuDelegate.m:
1569 (-[WebDefaultUIDelegate menuItemWithTag:]):
1571 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
1573 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
1576 2005-08-01 Geoffrey Garen <ggaren@apple.com>
1578 -fixed <rdar://problem/3572585> window.open fails if name param =
1579 the name of a window just closed in same function
1585 * manual-tests/open-after-close.html: Added.
1586 * manual-tests/resources/open-after-close-popup.html: Added.
1588 * WebCoreSupport.subproj/WebBridge.m:
1589 (-[WebBridge closeWindowSoon]): We now remove a WebView from
1590 WebViewSets when the WebView is *scheduled* to close.
1592 2005-08-01 John Sullivan <sullivan@apple.com>
1594 * PublicHeaderChangesFromTiger.txt:
1595 added a comment about isTextField -> _isTextField
1597 2005-08-01 John Sullivan <sullivan@apple.com>
1599 Patch by Trey Matteson <trey@usa.net>
1602 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4255
1603 underlines still print too thick
1605 The real problem here is that we have code that scales a 0 width line to always
1606 be width=1.0 in device space. I'm leaving that in for the screen, but when printing
1607 a width of 0.5 looks good.
1609 * WebCoreSupport.subproj/WebTextRenderer.m:
1610 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
1612 2005-08-01 Eric Seidel <eseidel@apple.com>
1616 * WebCoreSupport.subproj/WebGraphicsBridge.m:
1617 removed create*ColorSpace methods, now using CG API directly.
1618 http://bugzilla.opendarwin.org/show_bug.cgi?id=4211
1620 2005-07-31 John Sullivan <sullivan@apple.com>
1622 Patch by Trey Matteson <trey@usa.net>
1625 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4014
1626 PDF files by default load with a poor choice of sizing
1628 For now the various PDF viewing settings are sticky, stored in 2 new defaults. Since
1629 there are a number of ways these settings are changed, I made a proxy for the PDFView
1630 through which all view changing messages are sent. The proxy adds the behavior of
1631 updating the defaults upon any change.
1633 * Misc.subproj/WebNSDictionaryExtras.h:
1634 * Misc.subproj/WebNSDictionaryExtras.m:
1635 (-[NSMutableDictionary _webkit_setFloat:forKey:]): New support method.
1636 * WebView.subproj/WebPDFView.h:
1637 * WebView.subproj/WebPDFView.m:
1638 (-[WebPDFView initWithFrame:]): Create proxy for PDFView.
1639 (-[WebPDFView dealloc]): Free proxy.
1640 (-[WebPDFView _menuItemsFromPDFKitForEvent:]): For relevant context menu items, set the
1641 target to the proxy instead of the PDFView.
1642 (-[WebPDFView _readPDFDefaults]): Init PDFView with settings from defaults.
1643 (-[WebPDFView layout]): Call _readPDFDefaults, once. This turned out to be the best hook.
1644 (-[WebPDFView _makeTextSmaller:]): Change PDFView via proxy
1645 (-[WebPDFView _makeTextLarger:]): Ditto
1646 (-[WebPDFView _makeTextStandardSize:]): Ditto
1647 (-[PDFPrefUpdatingProxy initWithView:]): trivial
1648 (-[PDFPrefUpdatingProxy forwardInvocation:]): Forward the msg, then update defaults
1649 (-[PDFPrefUpdatingProxy methodSignatureForSelector:]): Simple forwarding support.
1650 * WebView.subproj/WebPreferenceKeysPrivate.h:
1651 * WebView.subproj/WebPreferences.m:
1652 (+[WebPreferences initialize]): Set initial values for new PDF viewing defaults.
1653 (-[WebPreferences _integerValueForKey:]): Nuke stray comment.
1654 (-[WebPreferences _floatValueForKey:]): New simple support method.
1655 (-[WebPreferences _setFloatValue:forKey:]): Ditto.
1656 (-[WebPreferences PDFScaleFactor]): 4 accessors for new defaults
1657 (-[WebPreferences setPDFScaleFactor:]):
1658 (-[WebPreferences PDFDisplayMode]):
1659 (-[WebPreferences setPDFDisplayMode:]):
1660 * WebView.subproj/WebPreferencesPrivate.h:
1662 2005-08-01 Justin Garcia <justin.garcia@apple.com>
1664 Patch by Trey Matteson <trey@usa.net>
1668 Fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4226>
1669 link underlines print too thickly
1671 Reinstate the fix made by sullivan on 1/11/05. There was a merge
1672 error with an mjs fix on 1/13/05.
1674 * WebCoreSupport.subproj/WebTextRenderer.m:
1675 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
1677 2005-07-30 Maciej Stachowiak <mjs@apple.com>
1679 Build fixes for previous change (missing includes)
1681 * WebView.subproj/WebFrame.m:
1682 * WebView.subproj/WebScriptDebugDelegate.m:
1684 2005-07-29 Maciej Stachowiak <mjs@apple.com>
1686 Changes by Michael Kahl, reviewed by me.
1688 - fixed <rdar://problem/4164112> MASTER: JavaScript debugging support
1690 * WebCoreSupport.subproj/WebBridge.m:
1691 (-[WebBridge windowObjectCleared]):
1692 * WebCoreSupport.subproj/WebSubresourceLoader.m:
1693 * WebKit.xcodeproj/project.pbxproj:
1694 * WebView.subproj/WebDefaultScriptDebugDelegate.h: Added.
1695 * WebView.subproj/WebDefaultScriptDebugDelegate.m: Added.
1696 (+[WebDefaultScriptDebugDelegate sharedScriptDebugDelegate]):
1697 (-[WebDefaultScriptDebugDelegate webView:didParseSource:fromURL:sourceId:forWebFrame:]):
1698 (-[WebDefaultScriptDebugDelegate webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
1699 (-[WebDefaultScriptDebugDelegate webView:willExecuteStatement:sourceId:line:forWebFrame:]):
1700 (-[WebDefaultScriptDebugDelegate webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
1701 * WebView.subproj/WebFrame.m:
1702 (-[WebFramePrivate dealloc]):
1703 (-[WebFrame _attachScriptDebugger]):
1704 * WebView.subproj/WebFramePrivate.h:
1705 * WebView.subproj/WebScriptDebugDelegate.h: Added.
1706 * WebView.subproj/WebScriptDebugDelegate.m: Added.
1707 (-[WebScriptDebugger initWithWebFrame:]):
1708 (-[WebScriptDebugger dealloc]):
1709 (-[WebScriptDebugger globalObject]):
1710 (-[WebScriptDebugger newWrapperForFrame:]):
1711 (-[WebScriptDebugger parsedSource:fromURL:sourceId:]):
1712 (-[WebScriptDebugger enteredFrame:sourceId:line:]):
1713 (-[WebScriptDebugger hitStatement:sourceId:line:]):
1714 (-[WebScriptDebugger leavingFrame:sourceId:line:]):
1715 (-[WebScriptCallFrame _initWithFrame:]):
1716 (-[WebScriptCallFrame dealloc]):
1717 (-[WebScriptCallFrame setUserInfo:]):
1718 (-[WebScriptCallFrame userInfo]):
1719 (-[WebScriptCallFrame caller]):
1720 (-[WebScriptCallFrame scopeChain]):
1721 (-[WebScriptCallFrame functionName]):
1722 (-[WebScriptCallFrame exception]):
1723 (-[WebScriptCallFrame evaluateWebScript:]):
1724 * WebView.subproj/WebScriptDebugDelegatePrivate.h: Added.
1725 * WebView.subproj/WebView.h:
1726 * WebView.subproj/WebView.m:
1727 (-[WebViewPrivate dealloc]):
1728 (-[WebView _scriptDebugDelegateForwarder]):
1729 (-[WebView setScriptDebugDelegate:]):
1730 (-[WebView scriptDebugDelegate]):
1731 * WebView.subproj/WebViewInternal.h:
1732 * WebView.subproj/WebViewPrivate.h:
1734 2005-07-26 Maciej Stachowiak <mjs@apple.com>
1736 Reviewed by Dave Hyatt.
1738 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4153
1740 * WebView.subproj/WebFrame.m:
1741 (-[WebFrame _purgePageCache]): Find the oldest candidate for
1742 purging that is not a snapback item.
1744 2005-07-29 David Harrison <harrison@apple.com>
1746 Reviewed by Dave Hyatt (rendering) and Maciej (editing and performance improvements).
1748 Test cases added: Existing tab-related basic editing tests were updated. More complex tests are coming soon.
1750 <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
1752 Basic strategy is to put tabs into spans with white-space:pre style, and
1753 render them with tabs stops every 8th space, where the space width and
1754 the left margin are those of the enclosing block.
1756 * WebCoreSupport.subproj/WebTextRenderer.m:
1758 (isRoundingHackCharacter):
1760 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
1761 (-[WebTextRenderer _computeWidthForSpace]):
1763 (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
1764 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startPosition:numGlyphs:]):
1765 (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]):
1766 (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
1767 (glyphForCharacter):
1768 (initializeCharacterWidthIterator):
1770 (widthForNextCharacter):
1772 2005-07-29 John Sullivan <sullivan@apple.com>
1774 Reviewed by Dave Hyatt.
1776 - WebKit part of <rdar://problem/4187404> Redo form SPI so that it doesn't rely on NSViews
1778 Much of 4187404 was addressed in earlier checkins. This checkin completes the task.
1780 * WebView.subproj/WebHTMLRepresentation.h:
1781 * WebView.subproj/WebHTMLRepresentation.m:
1782 removed viewForElement:, which was the only remaining NSView-related SPI that Safari autofill was
1783 still using. I added viewForElement a week ago as a transitional measure, so removing it won't
1784 affect any other clients.
1786 2005-07-29 John Sullivan <sullivan@apple.com>
1788 Reviewed by Chris Blumenberg.
1790 * WebView.subproj/WebFrameView.m:
1791 (-[WebFrameView _firstResponderIsFormControl]):
1792 renamed from _firstResponderIsControl for clarity. Explicitly rejects WebHTMLView, since
1794 (-[WebFrameView keyDown:]):
1795 updated for renamed method.
1797 2005-07-28 John Sullivan <sullivan@apple.com>
1799 Reviewed by Beth Dakin.
1801 - removed method -[WebHTMLRepresentation elementForView:], which was SPI used only for
1802 Safari autofill. Tip of tree Safari no longer includes any calls to this method. Also,
1803 Tiger Safari never gets around to actually calling it due to the other recent form-SPI-related
1804 changes, so removing this method doesn't break Tiger Safari running on tip of tree WebKit
1805 (though autofill continues to not work in that configuration).
1807 * WebView.subproj/WebHTMLRepresentation.h:
1808 * WebView.subproj/WebHTMLRepresentation.m:
1809 (-[WebHTMLRepresentation elementForView:]): removed
1811 2005-07-27 John Sullivan <sullivan@apple.com>
1813 Patch by Trey Matteson <trey@usa.net>
1816 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4169
1817 scaling PDF view up leaves later HTML view scaled too
1819 An additional step of separating scaling of HTML and PDF. If we do a zoom and there
1820 are no docViews that track the common scaling factor, then don't change it. Thus in
1821 the common PDF case where it is the only doc view, scaling the PDF does not affect
1822 HTML pages loaded in the same window.
1824 * WebView.subproj/WebView.m:
1825 (-[WebView canMakeTextSmaller]): Pass 0 for new scaling factor, since we just querying.
1826 (-[WebView canMakeTextLarger]): Ditto.
1827 (-[WebView makeTextSmaller:]): Pass new scaling factor.
1828 (-[WebView makeTextLarger:]): Ditto.
1829 (-[WebView canMakeTextStandardSize]): Pass 0 for new scaling factor.
1830 (-[WebView makeTextStandardSize:]): Pass new scaling factor.
1831 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
1832 The meat of the change is that this Swiss Army Knife also takes a new scaling
1833 factor, which it will set as the common scaling factor if it finds any doc views that
1834 are able to be scaled which track the common scaling factor.
1836 2005-07-27 John Sullivan <sullivan@apple.com>
1838 Patch by Trey Matteson <trey@usa.net>
1841 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4015
1842 PDF views should remember viewing mode, scroll position across back/forward
1843 Note this doesn't work within frames because of a PDFKit bug - see 4164
1844 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4091
1845 PDF views should keep a separate scaling factor from shared text scaling factor
1847 Basic idea #1 is that we now have a general mechanism for a WebDocView to save/restore some UI
1848 state to the WebHistoryItem.
1849 Basic idea #2 is that _WebDocumentTextSizing is expanded to allow for the case of a WebDocView
1850 keeping its own notion of a scaling factor. WebPDFView's -_tracksCommonSizeFactor has justification.
1852 * History.subproj/WebHistoryItem.m:
1853 (-[WebHistoryItem setViewState:]): New methods to hold PList of arbitrary WebView state
1854 (-[WebHistoryItem viewState]):
1855 * History.subproj/WebHistoryItemPrivate.h:
1856 * WebKit.xcodeproj/project.pbxproj: Add Quartz to framework path so we can import PDFKit files
1857 * WebView.subproj/WebDocumentInternal.h: New methods added to _WebDocumentTextSizing.
1858 Also the _ prefix is sufficient instead of _web_WebDocumentTextSizing.
1859 Added _WebDocumentViewState protocol.
1860 * WebView.subproj/WebFrame.m:
1861 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): Rename of save/restore methods.
1862 (-[WebFrame _detachFromParent]): Ditto
1863 (-[WebFrame _transitionToCommitted:]): Ditto
1864 (-[WebFrame _checkLoadCompleteForThisFrame]): Ditto
1865 (-[WebFrame _loadItem:withLoadType:]): Ditto
1866 (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]): Ditto
1867 (-[WebFrame _saveViewStateToItem:]): Call doc view to retrieve view state.
1868 (-[WebFrame _restoreViewState]): Call doc view to set view state.
1869 (-[WebFrame _scrollToTop]): Nuked dead code.
1870 (-[WebFrame _textSizeMultiplierChanged]): This work now appears in WebView.
1871 (-[WebFrame _saveDocumentAndScrollState]): Same rename, one code cleanup.
1872 (-[WebFrame _accumulateDocumentViews:]): Add our docview to the array, call kids.
1873 (-[WebFrame _documentViews]): New helper to return all docviews.
1874 (-[WebFrame _didFirstLayout]): Same name change.
1875 * WebView.subproj/WebFrameInternal.h:
1876 * WebView.subproj/WebFramePrivate.h:
1877 * WebView.subproj/WebHTMLView.m: Removed redundant category decl.
1878 (-[WebHTMLView _makeTextSmaller:]): Implement new protocol.
1879 (-[WebHTMLView _makeTextLarger:]):
1880 (-[WebHTMLView _makeTextStandardSize:]):
1881 (-[WebHTMLView _tracksCommonSizeFactor]):
1882 * WebView.subproj/WebPDFRepresentation.m: Tweak #imports.
1883 * WebView.subproj/WebPDFView.h:
1884 * WebView.subproj/WebPDFView.m:
1885 (-[WebPDFView _menuItemsFromPDFKitForEvent:]): No longer intercept context menu text sizing items.
1886 (-[WebPDFView setDataSource:]): No longer track the WebView's scaling factor.
1887 (-[WebPDFView scrollPoint]): Dig through PDFKit view tree to get real scroll position
1888 (-[WebPDFView setScrollPoint:]): Ditto
1889 (-[WebPDFView viewState]): Return bundle of viewing params
1890 (-[WebPDFView setViewState:]): Restore bundle of viewing params
1891 (-[WebPDFView _makeTextSmaller:]): Implement new text sizing protocol
1892 (-[WebPDFView _makeTextLarger:]):
1893 (-[WebPDFView _makeTextStandardSize:]):
1894 (-[WebPDFView _tracksCommonSizeFactor]):
1895 (-[WebPDFView _canMakeTextSmaller]):
1896 (-[WebPDFView _canMakeTextLarger]):
1897 (-[WebPDFView _canMakeTextStandardSize]):
1898 * WebView.subproj/WebTextView.m:
1899 (-[WebTextView _makeTextSmaller:]): Implement new text sizing protocol
1900 (-[WebTextView _makeTextLarger:]):
1901 (-[WebTextView _makeTextStandardSize:]):
1902 (-[WebTextView _tracksCommonSizeFactor]):
1903 * WebView.subproj/WebView.m:
1904 (-[WebView setTextSizeMultiplier:]): Calling docViews is now more complicates than just posting
1905 a notification to the frame.
1906 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:]): Workhorse
1907 that sends the text sizing method to the right doc views.
1908 (-[WebView canMakeTextSmaller]): Call workhorse.
1909 (-[WebView canMakeTextLarger]): Ditto
1910 (-[WebView makeTextSmaller:]): Ditto
1911 (-[WebView makeTextLarger:]): Ditto
1912 (-[WebView canMakeTextStandardSize]): Ditto
1913 (-[WebView makeTextStandardSize:]): Ditto
1915 2005-07-26 Justin Garcia <justin.garcia@apple.com>
1917 Patch by Trey Matteson <trey@usa.net>
1919 Reviewed by John Sullivan.
1921 Fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4072>
1922 Pressing back in browser misses out a page
1924 * WebView.subproj/WebFrame.m:
1925 (-[WebFrame _transitionToCommitted:]): When reloading the same page or refreshing the
1926 page, update the URL in the b/f item with the URL that we wind up at. Due to cookies,
1927 it might be different than the result we just got when we loaded the same page.
1929 2005-07-26 David Hyatt <hyatt@apple.com>
1931 Make WebHTMLView inherit from NSControl instead of NSView.
1932 This change is necessary because the theme renderer for
1933 WebCore that draws controls with the Aqua appearance does so
1934 using NSCells. NSCells must be hosted within a control view
1935 in order to paint properly.
1937 The method updateCell must be overridden because it wants to
1938 repaint the whole control when the windows resigns/becomes
1939 key, and this would result in behavior that we don't want
1940 (the repainting of the whole view). We already have hooks
1941 in WebHTMLView for the window resigning/becoming key so
1942 we will do our proper control updating there instead (in a
1947 * WebView.subproj/WebHTMLView.h:
1948 * WebView.subproj/WebHTMLView.m:
1949 (-[WebHTMLView updateCell:]):
1951 2005-07-26 John Sullivan <sullivan@apple.com>
1953 Reviewed by Chris Blumenberg.
1955 - more work to wean form-related SPI from NSView. All that's left (but this is a big "all")
1956 is viewForElement: and elementForView:
1958 * WebCoreSupport.subproj/WebBridge.m:
1959 (-[WebBridge textField:doCommandBySelector:]):
1960 changed signature to pass along DOMElement* rather than NSView*
1962 * WebView.subproj/WebFormDelegate.h:
1963 * WebView.subproj/WebFormDelegate.m:
1964 (-[WebFormDelegate textField:doCommandBySelector:inFrame:]):
1967 2005-07-25 John Sullivan <sullivan@apple.com>
1969 Reviewed by Darin Adler.
1971 - big hunk of weaning form-related SPI from NSView; autofill continues to
1972 work (but only on tip of tree Safari)
1974 * WebCoreSupport.subproj/WebBridge.m:
1975 (-[WebBridge textFieldDidBeginEditing:]):
1976 changed name from controlTextXXX:, now takes a DOMHTMLInputElement*
1977 (-[WebBridge textFieldDidEndEditing:]):
1979 (-[WebBridge textDidChangeInTextField:]):
1981 (-[WebBridge textDidChangeInTextArea:]):
1982 changed name from textDidChange:, now takes a DOMHTMLTextAreaElement*
1983 (-[WebBridge control:textShouldBeginEditing:]):
1984 removed this method as it wasn't being used by autofill, and did nothing in WebKit
1985 (-[WebBridge control:textShouldEndEditing:]):
1987 (-[WebBridge textField:shouldHandleEvent:]):
1988 changed name from control:textView:shouldHandleEvent:, now takes a DOMHTMLInputElement*.
1989 The textView parameter wasn't being used, so I eliminated it.
1991 * WebView.subproj/WebFormDelegate.h:
1992 * WebView.subproj/WebFormDelegate.m:
1993 (-[WebFormDelegate textFieldDidBeginEditing:inFrame:]):
1994 (-[WebFormDelegate textFieldDidEndEditing:inFrame:]):
1995 (-[WebFormDelegate control:textShouldBeginEditing:inFrame:]):
1996 (-[WebFormDelegate control:textShouldEndEditing:inFrame:]):
1997 (-[WebFormDelegate textDidChangeInTextField:inFrame:]):
1998 (-[WebFormDelegate textDidChangeInTextArea:inFrame:]):
1999 (-[WebFormDelegate textField:shouldHandleEvent:inFrame:]):
2000 These all changed in the same way as the WebBridge methods
2003 2005-07-25 Vicki Murley <vicki@apple.com>
2007 - fixed <rdar://problem/3470523> Safari's user agent should be changed to say Intel rather
2008 than PPC on Intel machines
2010 * WebView.subproj/WebView.m: add conditional #defines for "PPC" and "Intel"
2011 (-[WebView userAgentForURL:]): use this variable when constructing the user agent string
2013 2005-07-24 Justin Garcia <justin.garcia@apple.com>
2017 - Fixes <rdar://problem/4120535> deleteToEndOfLine: does not delete thew newline when at the end of a line
2018 Fix to match NSTextView. Delete the next character if deleteToEndOfLine fails
2020 * WebView.subproj/WebHTMLView.m:
2021 (-[WebHTMLView deleteToEndOfLine:]):
2023 2005-07-24 Justin Garcia <justin.garcia@apple.com>
2025 Patch by Trey Matteson <trey@apple.com>
2029 Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3953> back-forward items have wrong titles after sub-frame navigations
2031 This was caused by a mistaken data structure, where WebDataSource tried to keep a list of
2032 b/f items it was responsible for. The problem arose in the case of frames, where a subframe
2033 was loaded with new content. When this happens a fresh tree of b/f items is created,
2034 but the reference in the DataSource still pointed to the old item.
2036 Since the WebFrame does a lot of work to track the current b/f item, the easiest thing is to
2037 get rid of the DataSource's reference, and have it ask the WebFrame to set the title on the
2040 * WebView.subproj/WebDataSource.m:
2041 (-[WebDataSourcePrivate dealloc]):
2042 (-[WebDataSource _setTitle:]):
2043 * WebView.subproj/WebDataSourcePrivate.h:
2044 * WebView.subproj/WebFrame.m:
2045 (-[WebFrame _createItem:]):
2046 (-[WebFrame _transitionToCommitted:]):
2047 (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
2048 (-[WebFrame _setTitle:]):
2049 * WebView.subproj/WebFramePrivate.h:
2051 2005-07-24 Justin Garcia <justin.garcia@apple.com>
2055 Fixed make clean problem
2059 2005-07-23 Justin Garcia <justin.garcia@apple.com>
2061 Patch by <opendarwin.org@mitzpettel.com>
2063 Reviewed by darin and hyatt
2065 Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3862>
2066 The fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=3545> enclosed each run of visually ordered
2067 hebrew with LRO and PDF control characters, but adjusted the run's to and from to include those characters,
2068 so that they would be rendered if the font includes a glyph for bidi control characters.
2070 Also adding a manual test
2072 * WebCoreSupport.subproj/WebTextRenderer.m:
2073 (reverseCharactersInRun):
2075 2005-07-22 John Sullivan <sullivan@apple.com>
2077 Reviewed by Justin Garcia.
2079 Mail (running on tip of tree WebKit) was running into an assertion I recently added.
2080 The assertion is actually correct, catching an old bug in this code.
2082 * WebView.subproj/WebView.m:
2083 (-[WebView selectedFrame]):
2084 if the first responder is a WebFrameView, then we've found the WebFrameView we're
2085 looking for, and we shouldn't look at its superviews.
2087 2005-07-22 John Sullivan <sullivan@apple.com>
2089 Reviewed by Chris Blumenberg.
2091 - some changes in the direction of weaning all the form-related SPI from NSView
2093 * PublicHeaderChangesFromTiger.txt:
2094 noted that the WebCore change to add -[DOMHTMLInputElement isTextField] to
2095 DOMExtensions.h is a public header change.
2097 * WebView.subproj/WebHTMLRepresentation.h:
2098 * WebView.subproj/WebHTMLRepresentation.m:
2099 (-[WebHTMLRepresentation viewForElement:]):
2100 added viewForElement: as a stopgap measure. This allowed me to convert controlsInForm:
2101 to return DOMElements rather than NSViews, while keeping autocomplete working in
2102 Safari tip of tree. When I finish the SPI conversion I'll delete this method. Note that
2103 from this point on, autocomplete will not work in Tiger Safari with tip of tree WebKit
2104 (it will always fail to find anything to autocomplete)
2106 2005-07-21 Adele Peterson <adele@apple.com>
2110 Changing temporary #ifndef to #if
2112 * WebCoreSupport.subproj/WebImageData.m:
2113 (-[WebImageData _checkSolidColor:]):
2115 2005-07-21 Adele Peterson <adele@apple.com>
2117 Reviewed by Chris Blumenberg.
2119 - fixed <rdar://problem/4132797> don't register thin PPC WebKit plug-ins
2121 <rdar://problem/4127100> [WebKit] 8B1016: After installing Acrobat Reader, can no longer see pdf's in Safari
2123 * Plugins.subproj/WebBasePluginPackage.h: Added isNativeLibraryData method.
2124 * Plugins.subproj/WebBasePluginPackage.m: (-[WebBasePluginPackage isNativeLibraryData:]): Added isNativeLibraryData method.
2125 * Plugins.subproj/WebNetscapePluginPackage.m: (-[WebNetscapePluginPackage initWithPath:]):
2126 calls isNativeLibraryData to determine whether or not to register the plug-in.
2127 * Plugins.subproj/WebPluginPackage.m: (-[WebPluginPackage initWithPath:]): ditto.
2128 * WebCoreSupport.subproj/WebImageData.m: (-[WebImageData _checkSolidColor:]): added comment for #ifdef.
2130 2005-07-21 Geoffrey Garen <ggaren@apple.com>
2132 * WebKit.pbproj/project.pbxproj: Removed.
2134 2005-07-21 Geoffrey Garen <ggaren@apple.com>
2136 * WebKit.xcodeproj/.cvsignore: Added.
2138 2005-07-21 Geoffrey Garen <ggaren@apple.com>
2140 * WebKit.xcodeproj/project.pbxproj: Added.
2142 2005-07-21 Geoffrey Garen <ggaren@apple.com>
2146 2005-07-20 John Sullivan <sullivan@apple.com>
2148 Reviewed by Vicki Murley.
2150 - removed some form-related methods that weren't being used anywhere, in preparation
2151 for weaning WebKit's WebFormDelegate protocol from NSView.
2153 * WebCoreSupport.subproj/WebBridge.m:
2154 * WebView.subproj/WebFormDelegate.h:
2155 * WebView.subproj/WebFormDelegate.m:
2156 removed these methods:
2157 -control:didFailToFormatString:errorDescription:
2158 -control:didFailToValidatePartialString:errorDescription:
2159 -control:isValidObject:
2161 2005-07-20 Adele Peterson <adele@apple.com>
2164 <rdar://problem/4125127> [WebKit] horizontal rulers don't render on Safari on web.apple.com
2166 * WebCoreSupport.subproj/WebImageData.m:
2167 (-[WebImageData _checkSolidColor:]):
2169 2005-07-20 Adele Peterson <adele@apple.com>
2172 <rdar://problem/4118278> mail divide by zero navigating messages
2174 * WebCoreSupport.subproj/WebTextRenderer.m:
2175 (-[WebTextRenderer _extendGlyphToWidthMapToInclude:font:]):
2177 2005-07-20 John Sullivan <sullivan@apple.com>
2179 Reviewed by Adele Peterson.
2181 - added -[WebView selectedFrame] to SPI (pending public API), needed for 4180958
2183 * WebView.subproj/WebView.m:
2184 (-[WebView selectedFrame]):
2185 new method, extracted from _selectedOrMainFrame
2186 (-[WebView _selectedOrMainFrame]):
2187 now calls extracted method
2189 * WebView.subproj/WebViewPrivate.h:
2190 add -selectedFrame to PendingPublic category
2192 2005-07-19 John Sullivan <sullivan@apple.com>
2194 Reviewed by Darin Adler.
2196 - cleaned up code related to dealing with the "selected frame"; fixes radar bugs 4118830 and 4118820
2198 * WebView.subproj/WebTextView.m:
2199 (-[WebTextView resignFirstResponder]):
2200 call deselectAll here instead of replicating its guts, just for clarity
2202 * WebView.subproj/WebViewInternal.h:
2203 eliminated category WebInternal; all of these methods were used only inside WebView.m, so I moved
2204 them into the existing category WebFileInternal that was declared and implemented in WebView.m
2206 * WebView.subproj/WebView.m:
2207 (-[WebView searchFor:direction:caseSensitive:wrap:]):
2208 updated for name changes. Also, uses new _deselectFrame: to clear the selection if the found
2209 text is in a different frame.
2210 (-[WebView pasteboardTypesForSelection]):
2211 (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
2212 (-[WebView setSelectedDOMRange:affinity:]):
2213 (-[WebView selectedDOMRange]):
2214 (-[WebView selectionAffinity]):
2215 (-[WebView setTypingStyle:]):
2216 (-[WebView typingStyle]):
2217 (-[WebView styleDeclarationWithText:]):
2218 (-[WebView replaceSelectionWithNode:]):
2219 (-[WebView replaceSelectionWithText:]):
2220 (-[WebView replaceSelectionWithMarkupString:]):
2221 (-[WebView replaceSelectionWithArchive:]):
2222 (-[WebView deleteSelection]):
2223 (-[WebView applyStyle:]):
2224 updated for name changes only
2226 (-[WebView _frameIsSelected:]):
2227 new method, returns YES if given frame has a non-zero-length selection
2228 (-[WebView _deselectFrame:]):
2229 new method, clears selection from given frame
2230 (-[WebView _findSelectedFrameStartingFromFrame:]):
2231 new method, recursive helper used by _findSelectedFrame
2232 (-[WebView _findSelectedFrame]):
2233 new method, finds first frame that returns YES for _frameIsSelected, or nil
2234 (-[WebView _debugCollectSelectedFramesIntoArray:startingFromFrame:]):
2235 new method, recursive helper used by _debugCheckForMultipleSelectedFrames
2236 (-[WebView _debugCheckForMultipleSelectedFrames]):
2237 new method for debugging, fires an assertion if there's more than one selected frame.
2238 (-[WebView _selectedOrMainFrame]):
2239 renamed from _frameForCurrentSelection, which was a misleading name since the returned
2240 frame does not necessarily have a selection (or even focus). Now checks for a selected
2241 but non-focused frame if the first responder is not in any frame. Also, moved in file
2242 from WebInternal category to WebFileInternal category.
2243 (-[WebView _bridgeForSelectedOrMainFrame]):
2244 renamed from _bridgeForCurrentSelection, which was a misleading name for the same
2245 reasons as _frameForCurrentSelection. Also, moved in file from WebInternal category to
2246 WebFileInternal category.
2247 (-[WebView _isLoading]):
2248 (-[WebView _frameViewAtWindowPoint:]):
2249 (-[WebView _bridgeAtPoint:]):
2250 just moved in file from WebInternal category to WebFileInternal category
2252 2005-07-19 Darin Adler <darin@apple.com>
2254 Reviewed by Geoff Garen.
2256 - improve handling of plug-ins when the WebView or a superview is hidden with -[NSView setHidden]
2258 * Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
2259 Add "hidden" to the list of reasons to clip out all plug-in drawing.
2261 2005-07-18 John Sullivan <sullivan@apple.com>
2263 Written by Trey Matteson <trey@usa.net>
2264 Reviewed by John Sullivan.
2266 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4049
2267 scroll position not restored when going back/forward at ebay
2268 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4061
2269 When going back/forward to some pages, they redraw at top before restoring scroll position
2271 The short story is that attempting to restore the scroll position
2272 at the time when the first layout finishes addresses both of these
2273 issues. An explanation of the underlying race condition is in
2274 a large comment near -_restoreScrollPosition.
2276 * WebCoreSupport.subproj/WebBridge.m:
2277 (-[WebBridge didFirstLayout]): Pass through to WebFrame.
2278 * WebView.subproj/WebFrame.m:
2279 (-[WebFrame _transitionToCommitted:]): Get rid of attempt to
2280 restoreScrollPosition that never did anything because the
2281 docView was always 0x0 size at that point.
2282 (-[WebFrame _opened]): Get rid of redundant call to restoreScrollPosition.
2283 The imminent call to layoutCompleted makes the same call.
2284 (-[WebFrame _didFirstLayout]): Restore the scroll position on
2285 first layout, if we're doing a b/f nav.
2286 * WebView.subproj/WebFrameInternal.h:
2288 2005-07-18 John Sullivan <sullivan@apple.com>
2290 Reviewed by Darin Adler.
2293 <rdar://problem/4158121> context menu in PDF view should contain the selection-based items like Copy
2294 <rdar://problem/4184691> WebPDFView should conform to the WebDocumentElement protocol
2295 <rdar://problem/4184663> "Search in Spotlight" is present but dimmed in context menu for plain-text documents
2297 * WebView.subproj/WebDefaultContextMenuDelegate.m:
2298 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
2299 added ASSERT and comments
2301 * WebView.subproj/WebHTMLView.m:
2302 (-[WebHTMLView _searchWithGoogleFromMenu:]):
2303 removed this method (now handled by WebView)
2304 (-[WebHTMLView _searchWithSpotlightFromMenu:]):
2306 (-[WebHTMLView validateUserInterfaceItem:]):
2307 removed validation for removed items. The validation wasn't necessary anyway, since we only put these items
2308 in the menu in the case where they should be enabled.
2310 * WebView.subproj/WebPDFView.h:
2311 now conforms to WebDocumentElement protocol (which lets [WebView elementAtPoint:] work better)
2312 * WebView.subproj/WebPDFView.m:
2313 (-[WebPDFView copy:]):
2314 added, hands off to PDFView, needed to enable Copy in context menu
2315 (-[WebPDFView _pointIsInSelection:]):
2316 new method, checks whether given point is in the selected bounds
2317 (-[WebPDFView elementAtPoint:]):
2318 add WebElementIsSelectedKey to returned element
2319 (-[WebPDFView menuForEvent:]):
2320 use actual point instead of dummy placeholder, now that we have code that pays attention to the point
2322 * WebView.subproj/WebView.m:
2323 (-[WebView _searchWithGoogleFromMenu:]):
2324 moved here from WebHTMLView so it will work for any documentView that conforms to WebDocumentText.
2325 Rewrote slightly to be non-WebHTMLView-specific. (This menu item was always enabled in Safari because
2326 Safari replaces its action, but it would not have been always enabled in other WebKit clients, though
2327 it should have been.)
2328 (-[WebView _searchWithSpotlightFromMenu:]):
2329 moved here from WebHTMLView so it will work for any documentView that conforms to WebDocumentText.
2330 Rewrote slightly to be non-WebHTMLView-specific.
2332 2005-07-18 John Sullivan <sullivan@apple.com>
2334 Reviewed by Richard Williamson.
2336 - fixed <rdar://problem/4184366> WebPDFView should conform to the WebDocumentSelection protocol
2338 * Misc.subproj/WebNSAttributedStringExtras.h: Added.
2339 * Misc.subproj/WebNSAttributedStringExtras.m: Added.
2340 (-[NSAttributedString _web_attributedStringByStrippingAttachmentCharacters]):
2341 New category on NSAttributedString, initially contains this one method that had been in WebHTMLView.
2343 * WebView.subproj/WebHTMLView.m:
2344 (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
2345 now uses _web_attributedStringByStrippingAttachmentCharacters
2347 * WebView.subproj/WebPDFView.h:
2348 now conforms to WebDocumentSelection protocol
2349 * WebView.subproj/WebPDFView.m:
2350 (-[WebPDFView selectionRect]):
2351 new, implementation of WebDocumentSelection protocol method
2352 (-[WebPDFView pasteboardTypesForSelection]):
2354 (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
2357 * WebKit.pbproj/project.pbxproj:
2358 updated for new files
2360 2005-07-18 John Sullivan <sullivan@apple.com>
2362 Reviewed by Chris Blumenberg.
2364 - some refactoring cleanup in the selection/searching code
2366 * Misc.subproj/WebSearchableTextView.h:
2367 moved WebDocumentSelection protocol conformation to this class, was in subclass WebTextView
2368 * Misc.subproj/WebSearchableTextView.m:
2369 (-[WebSearchableTextView selectionRect]):
2370 new method (moved here from Safari) to return a single rect encompassing all selected text
2371 (-[WebSearchableTextView pasteboardTypesForSelection]):
2372 moved here from WebTextView
2373 (-[WebSearchableTextView writeSelectionWithPasteboardTypes:toPasteboard:]):
2376 * WebView.subproj/WebDocumentInternal.h:
2377 moved WebDocumentSelection protocol out of here
2379 * WebView.subproj/WebDocumentPrivate.h:
2380 moved WebDocumentSelection protocol into here, added selectionRect method
2382 * WebView.subproj/WebHTMLView.m:
2383 (-[WebHTMLView selectionRect]):
2384 new method, calls existing bridge method formerly called by _selectionRect
2385 (-[WebHTMLView _selectionRect]):
2386 now calls [self selectionRect]. We can't just delete _selectionRect because it's used by Mail.
2388 * WebView.subproj/WebHTMLViewPrivate.h:
2389 removed _selectionRect since it's in WebDocumentSelection now
2391 * WebView.subproj/WebTextView.h:
2392 removed WebDocumentSelection from protocol list since it's in superclass now
2394 * WebView.subproj/WebTextView.m:
2395 removed old WebDocumentSelection methods because they are in superclass now
2397 2005-07-15 Adele Peterson <adele@apple.com>
2399 Written by Trey Matteson <trey@usa.net>
2400 Reviewed by John Sullivan.
2402 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3910 - REGRESSION: Replying "Cancel" to the form repost nag leaves wrong b/f cursor
2404 * WebView.subproj/WebFrame.m:
2405 (-[WebFrame _resetBackForwardList]): new helper method
2406 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
2407 If the delegate bailed on the navigation, tell the main frame
2408 to reset the b/f cursor back to where it was before we started.
2410 2005-07-15 John Sullivan <sullivan@apple.com>
2412 Written by Trey Matteson
2415 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4013
2416 text find doesn't wrap in PDF files
2418 This just works once WebPDFView implements the WebDocumentText protocol, which is
2419 mostly just a matter of forwarding the methods to PDFKit appropriately.
2421 * WebView.subproj/WebPDFView.h:
2422 * WebView.subproj/WebPDFView.m:
2423 (-[WebPDFView supportsTextEncoding]):
2424 (-[WebPDFView string]):
2425 (-[WebPDFView attributedString]):
2426 (-[WebPDFView selectedString]):
2427 (-[WebPDFView selectedAttributedString]):
2428 (-[WebPDFView selectAll]):
2429 (-[WebPDFView deselectAll]):
2431 2005-07-15 John Sullivan <sullivan@apple.com>
2433 Reviewed by Kevin Decker.
2435 - fixed <rdar://problem/4181884> Searching for text that overlaps selection works
2436 differently in PDFView than in HTMLView
2438 * WebView.subproj/WebPDFView.m:
2439 (PDFSelectionsAreEqual):
2440 new function, stand-in for nonexistent -[PDFSelection isEqual:] since calling isEqual:
2441 on two identical PDFSelections returns NO
2442 (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
2443 Make search algorithm match that in WebCore: initially search inside selection, then check for the case
2444 where the found text exactly matches the previous selection, and search from past the selection if so.
2445 The implementation is slightly more complicated than it should be due to PDFKit API limitations (about
2446 which I added FIXMEs and filed bugs)
2448 2005-07-15 John Sullivan <sullivan@apple.com>
2450 Reviewed by Maciej Stachowiak.
2453 <rdar://problem/4181875> Searching for text that overlaps selection works differently in WebTextView than in HTMLView
2454 <rdar://problem/3393678> Find not finding text in plain (non-HTML) if all text is selected
2456 * Misc.subproj/WebSearchableTextView.m:
2457 (-[NSString findString:selectedRange:options:wrap:]):
2458 Make search algorithm match that in WebCore: initially search inside selection, then check for the case
2459 where the found text exactly matches the previous selection, and search from past the selection if so.
2461 2005-07-14 John Sullivan <sullivan@apple.com>
2463 Reviewed by Dave Hyatt.
2465 - WebKit part of fix for:
2466 <rdar://problem/4181227> webpages incorrectly use standard instead of secondary highlighting in certain cases
2468 * WebCoreSupport.subproj/WebBridge.m:
2469 (-[WebBridge formControlIsResigningFirstResponder:]):
2470 Implementation of new method defined in WebCore, passes call along to WebHTMLView
2472 * WebView.subproj/WebHTMLViewInternal.h:
2473 declare _formControlIsResigningFirstResponder: so bridge can call it
2475 * WebView.subproj/WebHTMLView.m:
2476 (-[WebHTMLView updateFocusState]):
2477 just moved in file so it could be called from a different category
2478 (-[WebHTMLView _formControlIsResigningFirstResponder:]):
2479 new method, updates focus state
2481 2005-07-14 John Sullivan <sullivan@apple.com>
2483 added missing #import to fix build
2484 * WebView.subproj/WebPDFView.m
2486 2005-07-14 Kevin Decker <kdecker@apple.com>
2490 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
2492 * WebView.subproj/WebFrame.m:
2493 (-[WebFrame _safeLoadURL:]): added
2494 * WebView.subproj/WebFrameInternal.h:
2495 * WebView.subproj/WebPDFView.m:
2496 (-[WebPDFView initWithFrame:]):
2497 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): prevents evilness with a call to _safeLoadURL
2498 * WebView.subproj/WebTextView.m:
2499 (-[WebTextView clickedOnLink:atIndex:]): factored calling out to the bridge, and instead call _safeLoadURL
2501 2005-07-14 Vicki Murley <vicki@apple.com>
2503 Reviewed by Kocienda.
2505 - WebKit part of fix for <rdar://problem/4172380> [GENENTECH] window.opener
2506 not available when child opened via target="_new"
2508 Add a setOpener function to the WebCore bridge, and call this function when opening
2509 new windows through Web Kit.
2511 * WebView.subproj/WebFrame.m:
2512 (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
2514 2005-07-13 Justin Garcia <justin.garcia@apple.com>
2518 Rolling in changes necessary to build with newer versions of gcc 4.0
2520 * History.subproj/WebHistoryItem.m:
2521 (-[WebHistoryItem copyWithZone:]):
2522 * Misc.subproj/WebNSPasteboardExtras.m:
2523 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]):
2524 * Misc.subproj/WebNSURLExtras.m:
2525 (-[NSURL _web_URLWithLowercasedScheme]):
2526 (-[NSString _web_mapHostNameWithRange:encode:makeString:]):
2527 * WebCoreSupport.subproj/WebBridge.m:
2528 (-[WebBridge MIMETypeForPath:]):
2529 * WebCoreSupport.subproj/WebImageRendererFactory.m:
2530 (-[WebImageRendererFactory imageRendererWithBytes:length:MIMEType:]):
2531 * WebCoreSupport.subproj/WebTextRenderer.m:
2532 (-[WebTextRenderer initWithFont:usingPrinterFont:]):
2533 * WebView.subproj/WebFrame.m:
2534 (-[WebFrame _webDataRequestForData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
2535 * WebView.subproj/WebHTMLView.m:
2536 (-[WebHTMLView _styleFromFontAttributes:]):
2537 * WebView.subproj/WebView.m:
2538 (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
2539 (-[WebView mainFrameTitle]):
2541 2005-07-13 John Sullivan <sullivan@apple.com>
2543 Reviewed by Maciej Stachowiak.
2545 - cleaned up Find-related experimental code that I checked in a while back
2547 * WebView.subproj/WebHTMLView.m:
2548 (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
2549 remove variant of this method that had findInSelection flag; this method is now
2550 the same as it was on Tiger.
2552 * WebView.subproj/WebView.m:
2553 (-[WebView searchFor:direction:caseSensitive:wrap:]):
2556 2005-07-12 Geoffrey Garen <ggaren@apple.com>
2558 -rolled in patch by opendarwin.org@mitzpettel.com
2559 for http://bugzilla.opendarwin.org/show_bug.cgi?id=3435
2560 Parentheses are backwards in Hebrew text (no bidi mirroring?)
2564 Layout test added to WebCore.
2566 * WebCoreSupport.subproj/WebTextRenderer.h:
2567 * WebCoreSupport.subproj/WebTextRenderer.m:
2568 (-[WebTextRenderer _initializeATSUStyle]):
2569 (applyMirroringToRun):
2570 (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]):
2571 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
2572 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2574 2005-07-12 Ken Kocienda <kocienda@apple.com>
2576 Reviewed by Chris Blumenberg
2578 * WebCoreSupport.subproj/WebBridge.m: Removed some glue that allowed one
2579 of two unicode (TEC or ICU ) to be chosen at runtime. I just added this
2580 dual support yesterday, and while Maciej and I agreed that it was good
2581 to land in the tree in case we run into problems in the near future, we
2582 also agreed that cutting over to using ICU full time right now is
2583 probably the best way to find bugs.
2585 2005-07-11 Ken Kocienda <kocienda@apple.com>
2589 * WebCoreSupport.subproj/WebBridge.m:
2590 (+[WebBridge setTextConversionMethod:]): New method to support switching text conversion method.
2591 (+[WebBridge textConversionMethod]): Returns current text conversion method.
2593 2005-07-11 Kevin Decker <kdecker@apple.com>
2595 Reviewed by cblu and mjs.
2597 Fixed: <rdar://problem/4099552> REGRESSION: Safari 1.3 Netscape API NPN_PostURL[Notify] no longer allows manual headers
2599 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.
2601 * Plugins.subproj/WebBaseNetscapePluginView.m:
2602 (-[NSData _web_locationAfterFirstBlankLine]): Look for two LF's as well
2604 2005-07-09 Maciej Stachowiak <mjs@apple.com>
2606 - back out my revent page cache changes, turns out they cause a
2607 major performance regression on PLT
2609 * WebView.subproj/WebFrame.m:
2610 (-[WebFrame _purgePageCache]):
2612 2005-07-09 Maciej Stachowiak <mjs@apple.com>
2616 Replace int with unsigned, to avoid going into a huge loop when
2617 back list count is 0.
2619 * WebView.subproj/WebFrame.m:
2620 (-[WebFrame _purgePageCache]):
2622 2005-07-09 Maciej Stachowiak <mjs@apple.com>
2624 - fixed broken Development build
2626 * WebView.subproj/WebFrame.m:
2627 (-[WebFrame _purgePageCache]):
2629 2005-07-09 Maciej Stachowiak <mjs@apple.com>
2633 - fix page cache purging logic; this gets rid of a bug where the
2634 page cache would grow without bound if the oldest page cache item
2635 was the snapback item, and changed the rule a bit so page cache
2636 items farther back than the max size get purged, even if fewer
2637 than the max size are in current use.
2639 * WebView.subproj/WebFrame.m:
2640 (-[WebFrame _purgePageCache]):
2642 2005-07-08 Geoffrey Garen <ggaren@apple.com>
2644 Rolled in patch by opendarwin.org@mitzpettel.com
2646 -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3818
2647 Fallback font doesn't have requested weight in ATSUI-rendered text
2649 (See WebCore Changelog for layout test)
2653 * WebCoreSupport.subproj/WebTextRenderer.m:
2654 (-[WebTextRenderer _createATSUTextLayoutForRun:style:]):
2656 2005-07-05 Adele Peterson <adele@apple.com>
2658 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)
2659 since it caused a 2% performance regression.
2661 * WebCoreSupport.subproj/WebTextRenderer.m:
2663 (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
2664 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startPosition:numGlyphs:]):
2665 (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]):
2666 (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2667 (initializeCharacterWidthIterator):
2668 (widthForNextCharacter):
2670 2005-07-05 John Sullivan <sullivan@apple.com>
2672 Reviewed by Chris Blumenberg.
2674 - fixed <rdar://problem/4158230> Zoom In/Zoom Out in PDF context menu don't update window's notion of text size
2676 * WebView.subproj/WebPDFView.m:
2677 (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
2678 Redirect Actual Size, Zoom In, and Zoom Out context menu items so that they behave exactly like Make Text Standard Size,
2679 Make Text Larger, and Make Text Smaller.
2681 2005-07-01 John Sullivan <sullivan@apple.com>
2683 Reviewed by Darin Adler.
2685 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3711: Displayed PDF have limited options in contextual menu
2687 This was a problem with using Tiger's version of Safari with tip of tree WebKit.
2689 * WebView.subproj/WebPDFView.m:
2690 (-[WebPDFView _anyPDFTagsFoundInMenu:]):
2691 new method, returns YES if the menu contains any items with any of the new PDF-related tags.
2692 (-[WebPDFView menuForEvent:]):
2693 If the executable was linked on Tiger or older (but it will never be older, since this code is
2694 new to Tiger), force all of the PDF-related items into the menu if none of them were there
2695 after processing by the delegate.
2697 2005-06-30 Darin Adler <darin@apple.com>
2699 Reviewed by John Sullivan.
2701 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3774>
2702 do renaming so that loaders are called "loader", not "client" or "delegate"
2704 * Misc.subproj/WebIconLoader.h:
2705 * Plugins.subproj/WebNetscapePluginStream.h:
2706 * Plugins.subproj/WebNetscapePluginStream.m:
2707 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
2708 (-[WebNetscapePluginStream start]):
2709 (-[WebNetscapePlugInStreamLoader didFinishLoading]):
2710 (-[WebNetscapePlugInStreamLoader didFailWithError:]):
2711 (-[WebNetscapePlugInStreamLoader cancelWithError:]):
2712 * WebCoreSupport.subproj/WebBridge.m:
2713 (-[WebBridge startLoadingResource:withURL:customHeaders:]):
2714 (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]):
2715 (-[WebBridge canRunModalNow]):
2716 * WebCoreSupport.subproj/WebSubresourceClient.h: Removed.
2717 * WebCoreSupport.subproj/WebSubresourceClient.m: Removed.
2718 * WebCoreSupport.subproj/WebSubresourceLoader.h:
2719 * WebCoreSupport.subproj/WebSubresourceLoader.m:
2720 (-[WebSubresourceLoader initWithLoader:dataSource:]):
2721 (-[WebSubresourceLoader dealloc]):
2722 (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
2723 (+[WebSubresourceLoader startLoadingResource:withURL:customHeaders:referrer:forDataSource:]):
2724 (+[WebSubresourceLoader startLoadingResource:withURL:customHeaders:postData:referrer:forDataSource:]):
2725 (-[WebSubresourceLoader didReceiveResponse:]):
2726 (-[WebSubresourceLoader didReceiveData:lengthReceived:]):
2727 (-[WebSubresourceLoader didFinishLoading]):
2728 (-[WebSubresourceLoader didFailWithError:]):
2729 (-[WebSubresourceLoader cancel]):
2730 * WebKit.pbproj/project.pbxproj:
2731 * WebView.subproj/WebBaseResourceHandleDelegate.h: Removed.
2732 * WebView.subproj/WebBaseResourceHandleDelegate.m: Removed.
2733 * WebView.subproj/WebDataSource.m:
2734 (-[WebDataSourcePrivate dealloc]):
2735 (-[WebDataSource _setLoading:]):
2736 (-[WebDataSource _updateLoading]):
2737 (-[WebDataSource _setPrimaryLoadComplete:]):
2738 (-[WebDataSource _startLoading:]):
2739 (-[WebDataSource _addSubresourceLoader:]):
2740 (-[WebDataSource _removeSubresourceLoader:]):
2741 (-[WebDataSource _addPlugInStreamLoader:]):
2742 (-[WebDataSource _removePlugInStreamLoader:]):
2743 (-[WebDataSource _stopLoadingInternal]):
2744 (-[WebDataSource _defersCallbacksChanged]):
2745 (-[WebDataSource _stopLoadingWithError:]):
2746 (-[WebDataSource data]):
2747 (-[WebDataSource isLoading]):
2748 * WebView.subproj/WebDataSourcePrivate.h:
2749 * WebView.subproj/WebLoader.h:
2750 * WebView.subproj/WebLoader.m:
2751 * WebView.subproj/WebMainResourceClient.h: Removed.
2752 * WebView.subproj/WebMainResourceClient.m: Removed.
2753 * WebView.subproj/WebMainResourceLoader.h:
2754 * WebView.subproj/WebMainResourceLoader.m:
2755 (-[WebMainResourceLoader didReceiveResponse:]):
2757 2005-06-29 David Harrison <harrison@apple.com>
2759 Reviewed by Dave Hyatt (rendering) and Maciej (editing).
2761 Test cases added: Coming soon. Will include with next round of changes for this bug.
2763 This is the first checkin for...
2765 <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
2767 Basic strategy is to put tabs into spans with white-space:pre style, and
2768 render them with tabs stops every 8th space, where the space width and
2769 the left margin are those of the enclosing block.
2771 What's left is to switch to implement white-space:pre-wrap so
2772 that we can coalesce consecutive tabs while maintaining proper
2773 line breaking. That will keep the markup smaller.
2775 * WebCoreSupport.subproj/WebTextRenderer.m:
2777 (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
2778 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:fonts:glyphs:startPosition:numGlyphs:]):
2779 (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]):
2780 (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2781 (initializeCharacterWidthIterator):
2782 (widthForNextCharacter):
2784 2005-06-29 John Sullivan <sullivan@apple.com>
2788 - deleted some never-used stub code
2790 * WebView.subproj/WebView.m:
2791 * WebView.subproj/WebViewInternal.h:
2792 * WebView.subproj/WebViewPrivate.h:
2794 2005-06-27 Justin Garcia <justin.garcia@apple.com>
2796 Patch by Anders Carlsson <andersca@mac.com>
2800 - Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=3489>
2801 WebView's setSelectedDOMRange doesn't not implement clearing the selection as described in the WebView documentation:
2802 <http://developer.apple.com/documentation/Cocoa/Reference/WebKit/ObjC_classic/Classes/WebView.html>
2804 * WebView.subproj/WebView.m:
2805 (-[WebView setSelectedDOMRange:affinity:]):
2806 If range is nil, call deselectText.
2808 2005-06-24 Justin Garcia <justin.garcia@apple.com>
2810 Patch contributed by Duncan Wilcox <duncan@mclink.it>
2814 - Fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3535>
2815 Spelling suggestions in the context menu don't call the should* delegate methods
2817 * WebView.subproj/WebHTMLView.m:
2818 (-[WebHTMLView _changeSpellingFromMenu:]):
2819 give delegate's webView:shouldInsertText:replacingDOMRange:givenAction: a chance
2820 to prevent replacing of selected text
2822 2005-06-22 John Sullivan <sullivan@apple.com>
2824 Reviewed by Chris Blumenberg.
2826 - fixed <rdar://problem/3764645> please add a way to allow WebKit clients to override the WebPDFView context menu
2828 * PublicHeaderChangesFromTiger.txt: Added.
2829 New file to keep track of changes made to public headers that haven't been through API review yet.
2830 Initially lists the WebMenuItem enum tags added to WebUIDelegate.h as part of this change.
2832 * WebView.subproj/WebDefaultContextMenuDelegate.m:
2833 (-[WebDefaultUIDelegate appendDefaultItems:toArray:]):
2834 new method, handles initial separator
2835 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
2836 now has defaultMenuItems: parameter. Any menu items in this array are appended at the end of
2838 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
2840 (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
2841 This had a defaultMenuItems parameter before but it was always nil. Now it passes the defaultMenuItems
2842 parameter on to the two methods that construct lists (one for editing, the other for viewing). Also
2843 tweaked variable name and type for clarity.
2845 * WebView.subproj/WebHTMLView.m:
2846 (-[WebHTMLView menuForEvent:]):
2847 passes nil for new defaultItems parameter of _menuForElement:
2849 * WebView.subproj/WebImageView.m:
2850 (-[WebImageView menuForEvent:]):
2853 * WebView.subproj/WebTextView.m:
2854 (-[WebTextView menuForEvent:]):
2857 * WebView.subproj/WebPDFView.m:
2858 (-[WebPDFView elementAtPoint:]):
2859 new method to create the element dictionary needed for _menuForElement:defaultItems:. Only supplies the
2860 webFrame at this point.
2861 (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
2862 new method to return copies of the menu items that PDFKit would include in the context menu, with
2864 (-[WebPDFView menuForEvent:]):
2865 now calls standard WebKit context menu mechanism, so clients' delegates can modify the context menu as
2866 desired. The initial set of items are the ones WebKit was already displaying for PDF context menus.
2868 * WebView.subproj/WebUIDelegate.h:
2869 added enum values for the menu items in the PDF context menu
2871 * WebView.subproj/WebViewPrivate.h:
2872 * WebView.subproj/WebView.m:
2873 (-[WebView _menuForElement:defaultItems:]):
2874 Added the defaultItems: parameter to this method, which is then passed along to WebDefaultUIDelegate.
2875 All callers pass nil except for WebPDFView, at least for now.
2877 2005-06-22 Darin Adler <darin@apple.com>
2879 Change by Mitz Pettel.
2882 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3618>
2883 RTL runs drawn by CG not reversed properly
2885 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _CG_drawRun:style:geometry:]):
2886 Fix off-by-one mistake in order-swapping loops.
2888 2005-06-22 Darin Adler <darin@apple.com>
2890 Change by Michael Gaiman.
2893 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3436>
2894 Missing implementation of -[NSData(WebNSDateExtras) _webkit_parseRFC822HeaderFields]
2896 * Misc.subproj/WebNSDataExtras.h: Fixed name of category say NSData, not NSDate.
2897 * Misc.subproj/WebNSDataExtras.m: (-[NSData _webkit_parseRFC822HeaderFields]): Fixed method name.
2899 2005-06-21 John Sullivan <sullivan@apple.com>
2901 Reviewed by Vicki Murley
2903 - fixed assertion failure Vicki ran into
2905 * Misc.subproj/WebIconDatabase.m:
2906 (-[WebIconDatabase _forgetIconForIconURLString:]):
2907 Handle the case where there are no associated page URLs for the icon URL
2909 2005-06-20 John Sullivan <sullivan@apple.com>
2911 Reviewed by Chris Blumenberg.
2913 - fixed <rdar://problem/4155182> icon database retain counts can be incorrect after removing all icons
2915 Replaced the concept of "future retain count per page URL" with a simpler concept of "retain count per
2916 page URL", which is maintained even after the icon is actually loaded (unlike the future retain count).
2917 The total retain count for an icon is now the sum of the retain counts per page URL along with any retain
2918 count not associated with a page URL -- this is still needed for some internal housekeeping purposes.
2920 * Misc.subproj/WebIconDatabasePrivate.h:
2921 renamed iconURLToURLs -> iconURLToPageURLs for clarity
2922 renamed URLToIconURL -> pageURLToIconURL for clarity
2923 renamed futureURLToRetainCount -> pageURLToRetainCount (there's no more "future" aspect)
2924 renamed iconURLToRetainCount -> iconURLToExtraRetainCount (it now maintains only some of the retain count)
2926 * Misc.subproj/WebIconDatabase.m:
2927 (+[WebIconDatabase sharedIconDatabase]):
2928 updated for name changes only
2929 (-[WebIconDatabase init]):
2931 (-[WebIconDatabase iconForURL:withSize:cache:]):
2933 (-[WebIconDatabase iconURLForURL:]):
2935 (-[WebIconDatabase retainIconForURL:]):
2936 just bump the retain count in pageURLToRetainCount, instead of behaving differently based on whether
2937 an icon had been loaded for this URL; this let me delete the internal method _retainFutureIconForURL:
2938 (-[WebIconDatabase releaseIconForURL:]):
2939 decrement the retain count in pageURLToRetainCount, then handle the case where the retain count for
2940 this page has gone to zero. I deleted the internal method _releaseFutureIconForURL: formerly called here.
2941 (-[WebIconDatabase removeAllIcons]):
2942 remove all the code that dealt with retain counts; this operation no longer affects retain counts
2943 (-[WebIconDatabase _setIconURL:forURL:]):
2944 remove the code that consolidated multiple retain counts for different page URLs into a single retain
2945 count; the multiple retain counts are now maintained even after the icon is loaded
2946 (-[WebIconDatabase _clearDictionaries]):
2947 updated for name changes only
2948 (-[WebIconDatabase _loadIconDictionaries]):
2950 (-[WebIconDatabase _updateFileDatabase]):
2952 (-[WebIconDatabase _totalRetainCountForIconURLString:]):
2953 new method, sums the retain counts associated with specific page URLs and the extra retain count
2954 not associated with specific page URLs
2955 (-[WebIconDatabase _retainIconForIconURLString:]):
2956 updated for name changes
2957 (-[WebIconDatabase _forgetIconForIconURLString:]):
2958 no longer affects retain counts at all; this is up to callers
2959 (-[WebIconDatabase _releaseIconForIconURLString:]):
2960 this now distinguishes the case where the retain count not associated with any page URLs hits
2961 zero from the case where the total retain count hits zero, and handles both
2963 2005-06-20 John Sullivan <sullivan@apple.com>
2965 Reviewed by Chris Blumenberg.
2967 - added support for emptying the icon database
2969 * Misc.subproj/WebIconDatabase.h: just fixed a typo
2970 * Misc.subproj/WebIconDatabasePrivate.h:
2971 added WebPendingPublic category with method removeAllIcons, and
2972 declared WebIconDatabaseDidRemoveAllIconsNotification string.
2974 * Misc.subproj/WebIconDatabase.m:
2975 (-[WebIconDatabase removeAllIcons]):
2976 new method, removes all known icons from memory and disk. There's one loose end,
2977 covered by radar bug 4155182, where it's possible for the icon database's retain
2978 counts to get off after this operation. I plan to fix this next.
2979 (-[WebIconDatabase _setIconURL:forURL:]):
2980 just fixed some extra whitespace
2981 (-[WebIconDatabase _forgetIconForIconURLString:]):
2982 new method, extracted from _releaseIconForIconURLString
2983 (-[WebIconDatabase _releaseIconForIconURLString:]):
2984 now calls extracted method
2987 added _WebIconDatabaseDidRemoveAllIconsNotification
2989 2005-06-19 Darin Adler <darin@apple.com>
2991 Changes by Mitz Pettel
2994 - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3466>
2995 ATSUI text doesn't render at coordinates greater than 32K
2997 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
2998 Translate the matrix of the CGContext instead of passing the appropriate coordinates to ATSU.
3000 2005-06-17 Richard Williamson <rjw@apple.com>
3002 Changes by Mitz Pettel
3003 Reviewed by Richard Williamson.
3005 Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3545
3007 * WebCoreSupport.subproj/WebTextRenderer.m:
3008 (reverseCharactersInRun):
3009 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
3011 2005-06-17 John Sullivan <sullivan@apple.com>
3015 - fixed <rdar://problem/4151001> Reloading javascript-spawned window with no URL erases its contents
3017 * WebView.subproj/WebFrame.m:
3018 (-[WebFrame reload]):
3019 do nothing if URL is zero-length
3021 2005-06-14 John Sullivan <sullivan@apple.com>
3023 Changes by Devin Lane.
3026 - fixed <rdar://problem/3766909> PDF viewing could use a zoom control other than the one in the context menu
3028 * WebView.subproj/WebPDFView.h:
3029 now implements protocol _web_WebDocumentTextSizing
3030 * WebView.subproj/WebPDFView.m:
3031 (-[WebPDFView _updateScalingToReflectTextSize]):
3032 new method, sets the PDF scaling from the text size multiplier
3033 (-[WebPDFView setDataSource:]):
3034 call _updateScalingToReflectTextSize
3035 (-[WebPDFView _web_textSizeMultiplierChanged]):
3036 implementation of protocol _web_WebDocumentTextSizing, calls _updateScalingToReflectTextSize
3038 2005-06-14 John Sullivan <sullivan@apple.com>
3040 Reviewed by Dave Harrison.
3042 * WebView.subproj/WebHTMLView.m:
3043 (-[WebHTMLView _delayedEndPrintMode:]):
3044 After discussing this with Dave, I made this method both more debugger-friendly with asserts for
3045 the cases we don't think could ever happen, and more paranoid by handling these cases in deployment
3048 2005-06-14 Darin Adler <darin@apple.com>
3050 - fixed build for Xcode 2.1
3052 * WebKit.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT to search for the
3053 WebKitSystemInterface.h file. We could re-jigger this again later, but for now this is consistent
3054 with both the .a file's location and where build-webkit puts the file.
3056 2005-06-13 John Sullivan <sullivan@apple.com>
3058 Reviewed by Dave Harrison and Maciej.
3060 * WebView.subproj/WebHTMLView.m:
3061 (-[WebHTMLView _endPrintMode]):
3062 new method, extracted from identical code in beginDocument and endDocument. This method must be called
3063 once to counterbalance the code called from knowsPageRange that turns on "printing mode".
3064 (-[WebHTMLView _delayedEndPrintMode:]):
3065 new method, called from "perform after delay". Checks whether the same print operation is still underway
3066 and, if so, delays further. Otherwise calls _endPrintMode directly.
3067 (-[WebHTMLView knowsPageRange:]):
3068 after turning on "printing mode", queue up a delayed call to _delayedEndPrintMode:. If there's an early
3069 error in the print mechanism such that beginDocument is never called, this will cleanly end "printing
3070 mode" and make the webview usable again.
3071 (-[WebHTMLView beginDocument]):
3072 cancel any delayed call to _delayedEndPrintMode:. If we get this far along in printing, then we don't need
3073 the failsafe call to _delayedEndPrintMode: that was set up in knowsPageRange:. Also, call extracted method.
3074 (-[WebHTMLView endDocument]):
3075 call extracted method
3077 2005-06-13 Maciej Stachowiak <mjs@apple.com>
3079 Reviewed by Chris Blumenberg and Adele.
3081 - better fix for <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
3082 http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
3084 With this change and the matching WebKit change we'll still stop loading the moment you click
3085 a download link, but the unload event and detaching of event handlers will not happen early any more.
3087 * WebView.subproj/WebDataSource.m:
3088 (-[WebDataSource _stopLoadingInternal]): call stopLoading on bridge instead of closeURL.
3089 * WebView.subproj/WebFrame.m:
3090 (-[WebFrame _transitionToCommitted:]): Revert previous attempt at fix.
3091 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): ditto
3092 (-[WebFrame stopLoading]): ditto
3094 2005-06-13 Chris Petersen <cpetersen@apple.com>
3099 - fixed problems building deployment due to recent init change
3101 * WebView.subproj/WebArchive.m: (-[WebArchive initWithCoder:]):
3102 Put the [super init] call and check for nil outside the exception handler.
3103 * WebView.subproj/WebResource.m: (-[WebResource initWithCoder:]): Ditto.
3105 2005-06-12 Darin Adler <darin@apple.com>
3109 - fixed <rdar://problem/4141569> REGRESSION (412+): printing fails on any page with images, and for standalone images
3110 also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3318>
3112 * WebCoreSupport.subproj/WebImageData.m: Got rid of use of tabs instead of spaces throughout the file.
3113 (-[WebImageData _checkSolidColor:]): Wrap use of NSGraphicsContext with an autorelease pool.
3114 (-[WebImageData _fillSolidColorInRect:compositeOperation:context:]): Ditto.
3115 (-[WebImageData tileInRect:fromPoint:context:]): Ditto.
3116 (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]): Ditto.
3118 2005-06-12 Darin Adler <darin@apple.com>
3120 Changes by Nick Zitzmann.
3123 - fixed init methods that don't handle return values from the init methods they call
3125 * WebView.subproj/WebArchive.m:
3126 (-[WebArchive init]): Use value returned by init, check it for nil too.
3127 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Ditto.
3128 (-[WebArchive _initWithPropertyList:]): Ditto.
3129 (-[WebArchive initWithCoder:]): Ditto.
3130 * WebView.subproj/WebClipView.m:
3131 (-[WebClipView initWithFrame:]): Ditto.
3132 * WebView.subproj/WebDebugDOMNode.m:
3133 (-[WebDebugDOMNode initWithName:value:source:children:]): Ditto.
3134 * WebView.subproj/WebFrame.m:
3135 (-[WebFormState initWithForm:values:sourceFrame:]): Ditto.
3136 (-[WebFrame initWithName:webFrameView:webView:]): Ditto.
3137 * WebView.subproj/WebFrameView.m:
3138 (-[WebFrameView initWithFrame:]): Ditto.
3139 * WebView.subproj/WebHTMLRepresentation.m:
3140 (-[WebHTMLRepresentation init]): Ditto.
3141 * WebView.subproj/WebHTMLView.m:
3142 (-[WebHTMLView initWithFrame:]): Ditto.
3143 (-[WebTextCompleteController initWithHTMLView:]): Ditto.
3144 * WebView.subproj/WebImageView.m:
3145 (-[WebImageView initWithFrame:]): Ditto.
3146 * WebView.subproj/WebPreferences.m:
3147 (-[WebPreferences initWithIdentifier:]): Ditto.
3148 * WebView.subproj/WebRenderNode.m:
3149 (-[WebRenderNode initWithName:position:rect:view:children:]): Ditto.
3150 * WebView.subproj/WebResource.m:
3151 (-[WebResource init]): Ditto.
3152 (-[WebResource initWithCoder:]): Ditto.
3153 * WebView.subproj/WebView.m:
3154 (-[WebViewPrivate init]): Call super init.
3155 (-[_WebSafeForwarder initWithTarget:defaultTarget:templateClass:]): Use value returned by init, check it for nil too.
3156 (-[WebView initWithFrame:]): Ditto.
3158 2005-06-12 Maciej Stachowiak <mjs@apple.com>
3160 Reviewed by Chris Blumenberg.
3162 - fixed <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
3163 http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
3165 * WebView.subproj/WebFrame.m:
3166 (-[WebFrame _transitionToCommitted:]): Stop loading the non-provisional data
3167 source before swapping in the provisional.
3168 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): Stop only
3169 the provisional load here, we would not want to stop loading if this navigation
3170 later turns into a download or is cancelled before being committed.
3171 (-[WebFrame stopLoading]): Factored a bit.
3172 (-[WebFrame _cancelProvisionalLoad]): New method to stop only provisional load,
3173 and cancel any pending policy deicions.
3174 (-[WebFrame _stopNonProvisionalLoadOnly]): New mthod that stops only the main
3177 2005-06-10 John Sullivan <sullivan@apple.com>
3179 reviewed by Dave Harrison (first & second drafts) and Darin Adler (third draft)
3181 - WebKit part of fix for
3182 <rdar://problem/4145214> REGRESSION (412+): Can't drag URLs from the location bar
3184 * Misc.subproj/WebNSPasteboardExtras.m:
3185 (+[NSPasteboard initialize]):
3186 Reinstate variation of old code that uses CreatePasteboardFlavorTypeName to set up our new pasteboard types.
3187 The newfangled way didn't work.
3189 2005-06-07 Darin Adler <darin@apple.com>
3191 Change by Mark Rowe <opendarwin.org@bdash.net.nz>.
3194 - fixed the WebKit half of build failure with spaces in the path
3195 http://bugzilla.opendarwin.org/show_bug.cgi?id=3291
3197 * WebKit.pbproj/project.pbxproj: Quote DERIVED_FILE_DIR when it is substituted
3198 into FRAMEWORK_SEARCH_PATHS, and SYMROOT when into HEADER_SEARCH_PATHS.
3200 2005-06-06 Darin Adler <darin@apple.com>
3202 * Info.plist: Bumped version to 412+. For some reason it was set to 312.1!
3204 2005-06-05 Darin Adler <darin@apple.com>
3208 - fixed build that I broke with the license change (some includes of WebException were still around)
3210 * WebKit.pbproj/project.pbxproj: Removed references to WebException.h/m.
3211 * WebView.subproj/WebDataSource.m: Removed include of WebException.h.
3212 * WebView.subproj/WebHTMLView.m: Ditto.
3213 * WebView.subproj/WebView.m: Ditto.
3215 - fixed build under gcc 4.0 (some code moved here from Foundation had warnings)
3217 * Misc.subproj/WebNSDataExtras.m:
3218 (-[NSString _web_capitalizeRFC822HeaderFieldName]): Use char instead of UInt8.
3219 (-[NSData _webkit_guessedMIMEType]): Use char instead of UInt8, and take out now-
3220 unneeded type casts.
3222 2005-06-05 Darin Adler <darin@apple.com>
3224 - added appropriate license headers to most files and updated copyright to reflect publication dates
3227 * <lots of files>: Added license header.
3229 * WebKit.pbproj/project.pbxproj: Removed references to NP_objc.h.
3231 * API-Issues.rtf: Removed.
3232 * Misc.subproj/WebException.h: Removed.
3233 * Misc.subproj/WebException.m: Removed.
3234 * Plugins.subproj/NP_objc.h: Removed.
3236 2005-06-01 Darin Adler <darin@apple.com>
3238 Reviewed by John Sullivan.
3240 - WebKit part of fix for <rdar://problem/3166090> add IE JavaScript extension window.showModalDialog
3242 * WebCoreSupport.subproj/WebBridge.m:
3243 (-[WebBridge createModalDialogWithURL:]): Added. Calls the UI delegate, falling back to the generic
3244 "create WebView" method.
3245 (-[WebBridge canRunModal]): Added. Checks the UI delegate to see if it implements runModal.
3246 (-[WebBridge canRunModalNow]): Added. Checks the "inConnectionCallback" field so we can prevent
3247 deadlock since we can't do any I/O while inside a connection callback until this aspect of NSURLConnection
3249 (-[WebBridge runModal]): Added. Sets "defersCallbacks" on all other web views in the group, then
3250 calls runModal on the UI delegate.
3252 * WebView.subproj/WebBaseResourceHandleDelegate.h: Added inConnectionCallback class method.
3253 * WebView.subproj/WebBaseResourceHandleDelegate.m:
3254 (-[WebBaseResourceHandleDelegate connection:willSendRequest:redirectResponse:]): Bump count and then
3255 decrement count so we can tell if we are in a callback.
3256 (-[WebBaseResourceHandleDelegate connection:didReceiveAuthenticationChallenge:]): Ditto.
3257 (-[WebBaseResourceHandleDelegate connection:didCancelAuthenticationChallenge:]): Ditto.
3258 (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]): Ditto.
3259 (-[WebBaseResourceHandleDelegate connection:didReceiveData:lengthReceived:]): Ditto.
3260 (-[WebBaseResourceHandleDelegate connection:willStopBufferingData:]): Ditto.
3261 (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]): Ditto.
3262 (-[WebBaseResourceHandleDelegate connection:didFailWithError:]): Ditto.
3263 (-[WebBaseResourceHandleDelegate connection:willCacheResponse:]): Ditto.
3264 (+[WebBaseResourceHandleDelegate inConnectionCallback]): Added. Return YES if count is not 0.
3266 * WebView.subproj/WebMainResourceClient.m:
3267 (-[WebMainResourceClient receivedError:]): Changed to use the method without the connection: parameter
3268 in the base class, since we no longer are overriding the connection: version.
3269 (-[WebMainResourceClient willSendRequest:redirectResponse:]): Change to override the version without
3270 the connection prefix/parameter; now only the base class overrides the actual connection delegate methods.
3271 (-[WebMainResourceClient continueAfterContentPolicy:response:]): Ditto.
3272 (-[WebMainResourceClient didReceiveResponse:]): Ditto.
3273 (-[WebMainResourceClient didReceiveData:lengthReceived:]): Ditto.
3274 (-[WebMainResourceClient didFinishLoading]): Ditto.
3275 (-[WebMainResourceClient didFailWithError:]): Ditto.
3276 (-[WebMainResourceClient loadWithRequestNow:]): Call the method without the connection parameter.
3278 * WebView.subproj/WebUIDelegatePrivate.h: Added new SPI here that WebBrowser implements.
3280 2005-05-26 Darin Adler <darin@apple.com>
3284 - fix build failure from when I removed WebCoreUnicode
3286 * WebCoreSupport.subproj/WebTextRenderer.m: Removed import of WebUnicode.h that I missed.
3287 (-[WebTextRenderer _convertUnicodeCharacters:length:toGlyphs:]): Switch from our own macros
3288 to the ICU macros for surrogate pairs.
3289 (widthForNextCharacter): Ditto.
3291 2005-05-26 David Harrison <harrison@apple.com>
3293 <rdar://problem/4120518> Mail: control-T in an empty message crashes mail
3295 * WebCoreSupport.subproj/WebBridge.m:
3296 (-[WebBridge issueTransposeCommand]):
3297 New, to support transpose in JS.
3299 2005-05-26 Darin Adler <darin@apple.com>
3301 Reviewed by Richard and Dave Harrison.
3303 - eliminate WebCoreUnicode and use ICU directly instead
3305 * Misc.subproj/WebKitNSStringExtras.m: (canUseFastRenderer): Use u_charDirection directly.
3306 * WebCoreSupport.subproj/WebTextRenderer.m: Removed import of <WebCore/WebCoreUnicode.h>.
3307 * WebView.subproj/WebHTMLView.m: (+[WebHTMLView initialize]): Removed call to WebKitInitializeUnicode.
3309 * Misc.subproj/WebUnicode.h: Removed.
3310 * Misc.subproj/WebUnicode.m: Removed.
3311 * Misc.subproj/WebUnicodeTables.m: Removed.
3313 * WebKit.pbproj/project.pbxproj: Removed files.
3315 2005-05-24 Richard Williamson <rjw@apple.com>
3317 Fixed <rdar://problem/4097289> -[WebView elementAtPoint:] failing when WebView is nested and offset
3319 Code to determine the correct frame under the window point was
3320 converting the point incorrectly.
3324 * WebView.subproj/WebView.m:
3325 (-[WebView _frameViewAtWindowPoint:]):
3327 2005-05-23 John Sullivan <sullivan@apple.com>
3331 - WebKit part of <rdar://problem/4125783> WebKit needs a way to control whether textareas are resizable
3333 * WebView.subproj/WebPreferencesPrivate.h:
3334 added private-for-now getter and setter for new preference
3335 * WebView.subproj/WebPreferenceKeysPrivate.h:
3336 added private preference key controlling whether textareas are resizable
3337 * WebView.subproj/WebPreferences.m:
3338 (+[WebPreferences initialize]):
3339 initial value of new preference is NO, so other clients' behavior doesn't change
3340 (-[WebPreferences textAreasAreResizable]):
3342 (-[WebPreferences setTextAreasAreResizable:]):
3345 * WebView.subproj/WebView.m:
3346 (-[WebView _updateWebCoreSettingsFromPreferences:]):
3347 update this new setting in WebCore
3349 * English.lproj/StringsNotToBeLocalized.txt:
3350 updated for these changes
3352 2005-05-23 Chris Blumenberg <cblu@apple.com>
3354 Changed type for identifier parameter in WebResourceLoadDelegate-related calls to id from NSString.
3358 * WebCoreSupport.subproj/WebBridge.m:
3359 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]):
3360 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3361 * WebView.subproj/WebFrame.m:
3362 (-[WebFrame _opened]):
3363 (-[WebFrame _requestFromDelegateForRequest:identifier:error:]):
3364 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
3365 (-[WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]):
3366 * WebView.subproj/WebFrameInternal.h:
3368 2005-05-20 Chris Blumenberg <cblu@apple.com>
3370 Fixed: <rdar://problem/4098786> sync. XMLHttpRequest works w/o AllowNetworkAccess key because load delegate is not consulted
3372 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.
3374 Reviewed by sullivan.
3376 * WebCoreSupport.subproj/WebBridge.m:
3377 (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): call [WebFrame _requestFromDelegateForRequest:identifier:error:] then
3378 [WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:] so synthetic resource load delegate
3379 methods are called and the data is saved as a WebResource for resources in the WebCore cache.
3381 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): call [WebFrame _requestFromDelegateForRequest:identifier:error:],
3382 respect its result, do the load and then call [WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]
3383 for synchronous loads
3385 * WebView.subproj/WebFrame.m:
3386 (-[WebFrame _opened]): call [WebFrame _requestFromDelegateForRequest:identifier:error:] then
3387 [WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:] so synthetic resource load delegate methods are called
3388 for subresrources in the page cache
3390 (-[WebFrame _requestFromDelegateForRequest:identifier:error:]): new, was part of the removed _sendResourceLoadDelegateMessagesForURL:::
3391 This method calls identifierForInitialRequest and willSendRequest.
3393 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]): new, was part of the removed _sendResourceLoadDelegateMessagesForURL:::
3394 This method calls the remaining resource load delegate messages.
3396 (-[WebFrame _saveResourceAndSendRemainingDelegateMessagesWithRequest:identifier:response:data:error:]): new, saves the resource and calls
3397 [WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]
3399 * WebView.subproj/WebFrameInternal.h:
3401 2005-05-17 Chris Blumenberg <cblu@apple.com>
3403 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
3407 * WebCoreSupport.subproj/WebBridge.m:
3408 (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): pass the passed referrer to canLoadURL::: not [self referrer]
3409 (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): ditto
3410 * WebView.subproj/WebTextView.m:
3411 (-[WebTextView clickedOnLink:atIndex:]): call the loadURL bridge method so that security checks are made, command/option clicks work, policy delegate is consulted etc.
3413 2005-05-17 Chris Blumenberg <cblu@apple.com>
3415 Fixed: <rdar://problem/4120255> web archives on remote servers can be viewed directly (with major security issues); should download instead
3419 * WebView.subproj/WebBaseResourceHandleDelegate.h:
3420 * WebView.subproj/WebMainResourceClient.m:
3421 (-[WebMainResourceClient continueAfterContentPolicy:response:]): if the WebKit client has chosen to "use" a remote web archive, stop the load with an error
3423 2005-05-16 Darin Adler <darin@apple.com>
3425 - attempt to get things building under "Saffron" development tools
3427 * WebKit.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT.
3429 2005-05-13 John Sullivan <sullivan@apple.com>
3433 - fixed <rdar://problem/4093306> Safari crashes if Esc key is held down during series
3434 of authentication sheets
3436 * Panels.subproj/WebAuthenticationPanel.m:
3437 (-[WebAuthenticationPanel cancel:]):
3438 retain and autorelease self. This is a workaround for an AppKit key-handling issue, which I wrote up as: