1 2006-02-09 Tim Omernick <timo@apple.com>
3 Reviewed by Darin Adler.
5 <rdar://problem/4198378> Crash on a CFRelease when visiting http://www.akella.com/
7 * Plugins/WebBaseNetscapePluginView.m:
8 (-[WebBaseNetscapePluginView requestWithURLCString:]):
9 The true source of this crash is that the URL string is sometimes not NULL-terminated, which is the
10 Real Player plugin's fault. That has been filed as 4439591.
11 However, we can be more bulletproof here by switching the URL string encoding from Windows Latin 1
12 to ISO Latin 1, so that any NULL-terminated string can be represented. (As Darin and I found out
13 last night, Windows Latin 1 has "holes" in certain character ranges and thus cannot encode arbitrary
16 2006-02-09 Maciej Stachowiak <mjs@apple.com>
18 Rubber stamped by Anders.
20 - Moved all the default delegate classes to their own directory.
22 * DefaultDelegates: Added.
23 * DefaultDelegates/WebDefaultContextMenuDelegate.h: Added.
24 * DefaultDelegates/WebDefaultContextMenuDelegate.m: Added.
25 * DefaultDelegates/WebDefaultEditingDelegate.h: Added.
26 * DefaultDelegates/WebDefaultEditingDelegate.m: Added.
27 * DefaultDelegates/WebDefaultFrameLoadDelegate.h: Added.
28 * DefaultDelegates/WebDefaultFrameLoadDelegate.m: Added.
29 * DefaultDelegates/WebDefaultPolicyDelegate.h: Added.
30 * DefaultDelegates/WebDefaultPolicyDelegate.m: Added.
31 * DefaultDelegates/WebDefaultResourceLoadDelegate.h: Added.
32 * DefaultDelegates/WebDefaultResourceLoadDelegate.m: Added.
33 * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Added.
34 * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Added.
35 * DefaultDelegates/WebDefaultUIDelegate.h: Added.
36 * DefaultDelegates/WebDefaultUIDelegate.m: Added.
37 * WebKit.xcodeproj/project.pbxproj:
38 * WebView/WebDefaultContextMenuDelegate.h: Removed.
39 * WebView/WebDefaultContextMenuDelegate.m: Removed.
40 * WebView/WebDefaultEditingDelegate.h: Removed.
41 * WebView/WebDefaultEditingDelegate.m: Removed.
42 * WebView/WebDefaultFrameLoadDelegate.h: Removed.
43 * WebView/WebDefaultFrameLoadDelegate.m: Removed.
44 * WebView/WebDefaultPolicyDelegate.h: Removed.
45 * WebView/WebDefaultPolicyDelegate.m: Removed.
46 * WebView/WebDefaultResourceLoadDelegate.h: Removed.
47 * WebView/WebDefaultResourceLoadDelegate.m: Removed.
48 * WebView/WebDefaultScriptDebugDelegate.h: Removed.
49 * WebView/WebDefaultScriptDebugDelegate.m: Removed.
50 * WebView/WebDefaultUIDelegate.h: Removed.
51 * WebView/WebDefaultUIDelegate.m: Removed.
53 2006-02-08 Justin Garcia <justin.garcia@apple.com>
55 Original patch by Graham Dennis, reviewed by me:
57 <http://bugzilla.opendarwin.org/show_bug.cgi?id=3982>
58 webViewDidBeginEditing, webViewDidEndEditing notification methods not called on delegate
60 Changes made by me, reviewed by thatcher:
62 Made _setWindowHasFocus: and _setDisplaysWithFocusAttributes: into private SPI to allow
63 for the testing of window.onFocus, window.onBlur, caret and focus halo painting, and
64 the focusing of content editable regions that happens as side effect of setting a selection,
65 but only if the window has focus (7128).
67 * WebCoreSupport/WebFrameBridge.m:
68 (-[WebFrameBridge didBeginEditing]):
69 (-[WebFrameBridge didEndEditing]):
70 * WebView/WebHTMLView.m:
71 (-[WebHTMLView updateFocusState]):
72 (-[WebHTMLView _setWindowHasFocus:]):
73 (-[WebHTMLView _setDisplaysWithFocusAttributes:]):
74 * WebView/WebHTMLViewPrivate.h:
76 2006-02-08 David Kilzer <ddkilzer@kilzer.net>
80 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3527
81 Allow Safari to open postscript files in browser windows as well
83 * WebView/WebPDFRepresentation.m:
84 (+[WebPDFRepresentation postScriptMIMETypes]): Added.
85 (+[WebPDFRepresentation supportedMIMETypes]): Include PostScript MIME types.
86 (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Added.
87 (-[WebPDFRepresentation finishedLoadingWithDataSource:]):
88 Handle PostScript conversion using new convertPostScriptDataSourceToPDF method.
90 2006-02-07 Alexey Proskuryakov <ap@nypop.com>
94 Convert JavaScript objects to appropriate AppleScript types, instead of only strings
95 http://bugzilla.opendarwin.org/show_bug.cgi?id=7012
97 Tests: fast/AppleScript/*
100 (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Added.
101 * WebView/WebViewPrivate.h:
103 2006-02-06 Maciej Stachowiak <mjs@apple.com>
107 - fixed "remove frame, renderer and completed flag from ChildFrame, make Frame track these"
108 http://bugzilla.opendarwin.org/show_bug.cgi?id=7125
110 - fixed "onload event never called for iframe element with emtpy or about:blank src"
111 http://bugzilla.opendarwin.org/show_bug.cgi?id=3609
113 * WebCoreSupport/WebFrameBridge.h:
114 * WebCoreSupport/WebFrameBridge.m:
115 (-[WebFrameBridge initWithPage:webView:renderer:frameName:view:]): Pass along renderer.
116 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]): Pass along renderer.
117 * WebCoreSupport/WebPageBridge.m:
118 (-[WebPageBridge initWithMainFrameName:webView:frameView:]): Pass null for renderer.
120 * WebView/WebViewPrivate.h:
122 2006-02-06 John Sullivan <sullivan@apple.com>
124 Reviewed by Maciej Stachowiak.
126 * WebView/WebPDFView.m:
127 (-[WebPDFView menuForEvent:]):
128 Removed use of WKExecutableLinkedInTigerOrEarlier() by modifying backward-compatibility
129 hack involving PDF view context menus. Now we only bother to make sure that the PDFKit-
130 supplied context menu items are present in Safari, for the benefit of the open source
131 folks using tip of tree WebKit but older released Safari; it's possible that some other
132 existing WebKit apps won't show all the PDF view context menu items.
134 2006-02-06 Maciej Stachowiak <mjs@apple.com>
136 Remove remaining .subproj references to fix release build.
138 * WebKit.xcodeproj/project.pbxproj:
140 2006-02-06 Maciej Stachowiak <mjs@apple.com>
142 Rubber stamped by Hyatt.
144 - renamed subproject directories to not end with .subproj
146 * Carbon: renamed from Carbon.subproj
147 * DOM: renamed from DOM.subproj
148 * History: renamed from History.subproj
149 * Misc: renamed from Misc.subproj
150 * Panels: renamed from Panels.subproj
151 * Plugins: renamed from Plugins.subproj
152 * WebCoreSupport: renamed from WebCoreSupport.subproj
153 * WebInspector: renamed from WebInspector.subproj
154 * WebView: renamed from WebView.subproj
156 2006-02-06 Maciej Stachowiak <mjs@apple.com>
158 Ooops, I made a last-minute change to my last patch that broke the build - fixed.
160 * WebView.subproj/WebFrame.m:
161 (-[WebFrame _closeOldDataSources]):
162 (-[WebFrame _detachFromParent]):
163 (-[WebFrame _transitionToCommitted:]):
164 (-[WebFrame _checkLoadCompleteForThisFrame]):
165 (-[WebFrame _handledOnloadEvents]):
166 (-[WebFrame _loadItem:withLoadType:]):
167 (-[WebFrame _goToItem:withLoadType:]):
168 (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]):
169 (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
170 (-[WebFrame _clientRedirectCancelled:]):
171 * WebView.subproj/WebFramePrivate.h:
173 2006-02-05 Maciej Stachowiak <mjs@apple.com>
177 - shuffle things around so that WebFrame no longer has a WebView backpointer, the backpointer is
179 http://bugzilla.opendarwin.org/show_bug.cgi?id=7093
181 * WebCoreSupport.subproj/WebFrameBridge.h:
182 * WebCoreSupport.subproj/WebFrameBridge.m:
183 (-[WebFrameBridge initWithPage:webView:frameName:view:]):
184 (-[WebFrameBridge page]):
185 (-[WebFrameBridge mainFrame]):
186 (-[WebFrameBridge webView]):
187 (-[WebFrameBridge createWindowWithURL:frameName:]):
188 (-[WebFrameBridge showWindow]):
189 (-[WebFrameBridge areToolbarsVisible]):
190 (-[WebFrameBridge setToolbarsVisible:]):
191 (-[WebFrameBridge isStatusbarVisible]):
192 (-[WebFrameBridge setStatusbarVisible:]):
193 (-[WebFrameBridge setWindowFrame:]):
194 (-[WebFrameBridge windowFrame]):
195 (-[WebFrameBridge setWindowContentRect:]):
196 (-[WebFrameBridge windowContentRect]):
197 (-[WebFrameBridge setWindowIsResizable:]):
198 (-[WebFrameBridge windowIsResizable]):
199 (-[WebFrameBridge firstResponder]):
200 (-[WebFrameBridge makeFirstResponder:]):
201 (-[WebFrameBridge closeWindowSoon]):
202 (-[WebFrameBridge runJavaScriptAlertPanelWithMessage:]):
203 (-[WebFrameBridge runJavaScriptConfirmPanelWithMessage:]):
204 (-[WebFrameBridge canRunBeforeUnloadConfirmPanel]):
205 (-[WebFrameBridge runBeforeUnloadConfirmPanelWithMessage:]):
206 (-[WebFrameBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
207 (-[WebFrameBridge addMessageToConsole:]):
208 (-[WebFrameBridge runOpenPanelForFileButtonWithResultListener:]):
209 (-[WebFrameBridge setStatusText:]):
210 (-[WebFrameBridge startLoadingResource:withURL:customHeaders:]):
211 (-[WebFrameBridge startLoadingResource:withURL:customHeaders:postData:]):
212 (-[WebFrameBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
213 (-[WebFrameBridge focusWindow]):
214 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
215 (-[WebFrameBridge userAgentForURL:]):
216 (-[WebFrameBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
217 (-[WebFrameBridge previousKeyViewOutsideWebFrameViews]):
218 (-[WebFrameBridge defersLoading]):
219 (-[WebFrameBridge setDefersLoading:]):
220 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
221 (-[WebFrameBridge _preferences]):
222 (-[WebFrameBridge selectWordBeforeMenuEvent]):
223 (-[WebFrameBridge historyLength]):
224 (-[WebFrameBridge canGoBackOrForward:]):
225 (-[WebFrameBridge goBackOrForward:]):
226 (-[WebFrameBridge print]):
227 (-[WebFrameBridge pollForAppletInView:]):
228 (-[WebFrameBridge respondToChangedContents]):
229 (-[WebFrameBridge respondToChangedSelection]):
230 (-[WebFrameBridge undoManager]):
231 (-[WebFrameBridge issueCutCommand]):
232 (-[WebFrameBridge issueCopyCommand]):
233 (-[WebFrameBridge issuePasteCommand]):
234 (-[WebFrameBridge issuePasteAndMatchStyleCommand]):
235 (-[WebFrameBridge canPaste]):
236 (-[WebFrameBridge overrideMediaType]):
237 (-[WebFrameBridge isEditable]):
238 (-[WebFrameBridge shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
239 (-[WebFrameBridge shouldBeginEditing:]):
240 (-[WebFrameBridge shouldEndEditing:]):
241 (-[WebFrameBridge windowObjectCleared]):
242 (-[WebFrameBridge spellCheckerDocumentTag]):
243 (-[WebFrameBridge isContinuousSpellCheckingEnabled]):
244 (-[WebFrameBridge didFirstLayout]):
245 (-[WebFrameBridge dashboardRegionsChanged:]):
246 (-[WebFrameBridge createModalDialogWithURL:]):
247 (-[WebFrameBridge canRunModal]):
248 (-[WebFrameBridge runModal]):
249 * WebCoreSupport.subproj/WebPageBridge.h:
250 * WebCoreSupport.subproj/WebPageBridge.m:
251 (-[WebPageBridge initWithMainFrameName:webView:frameView:]):
252 (-[WebPageBridge webView]):
253 * WebView.subproj/WebDataSource.m:
254 (-[WebDataSource _fileWrapperForURL:]):
255 (-[WebDataSource _webView]):
256 (-[WebDataSource _setLoading:]):
257 (-[WebDataSource _startLoading:]):
258 (-[WebDataSource _setTitle:]):
259 (-[WebDataSource _setRequest:]):
260 (-[WebDataSource _updateIconDatabaseWithURL:]):
261 (-[WebDataSource _defersCallbacksChanged]):
262 (-[WebDataSource _setWebFrame:]):
263 * WebView.subproj/WebDataSourcePrivate.h:
264 * WebView.subproj/WebFrame.m:
265 (-[WebFrame _traverseNextFrameStayWithin::]):
266 (-[WebFrame _detachFromParent]):
267 (-[WebFrame _setDataSource:]):
268 (-[WebFrame _loadDataSource:withLoadType:formState:]):
269 (-[WebFrame _initWithWebFrameView:webView:bridge:]):
270 (-[WebFrame dealloc]):
271 (-[WebFrame finalize]):
272 (-[WebFrame webView]):
273 * WebView.subproj/WebFrameView.m:
274 (-[WebFrameView _webView]):
275 (-[WebFrameView _goBack]):
276 (-[WebFrameView _goForward]):
277 * WebView.subproj/WebFrameViewInternal.h:
278 * WebView.subproj/WebView.m:
279 (-[WebView _createFrameNamed:inParent:allowsScrolling:]):
280 (-[WebView _commonInitializationWithFrameName:groupName:]):
282 2006-02-04 Darin Adler <darin@apple.com>
286 * Misc.subproj/WebCoreStatistics.h:
287 * Misc.subproj/WebCoreStatistics.m:
288 (+[WebCoreStatistics javaScriptRootObjectTypeCounts]):
289 javaScriptRootObjecTypeCounts -> javaScriptRootObjectTypeCounts
291 2006-02-04 Maciej Stachowiak <mjs@apple.com>
295 - change JavaScript collector statistics calls to use HashCountedSet instead
296 of CFSet; other misc cleanup
297 http://bugzilla.opendarwin.org/show_bug.cgi?id=7072
299 * Misc.subproj/WebCoreStatistics.h:
300 * Misc.subproj/WebCoreStatistics.m:
301 (+[WebCoreStatistics javaScriptProtectedObjectsCount]): new
302 (+[WebCoreStatistics javaScriptRootObjecTypeCounts]): new
303 (+[WebCoreStatistics javaScriptRootObjectClasses]): deprecated
304 (+[WebCoreStatistics javaScriptReferencedObjectsCount]): deprecated
305 (+[WebCoreStatistics javaScriptNoGCAllowedObjectsCount]): Just return 0. Deprecated.
307 2006-02-03 Maciej Stachowiak <mjs@apple.com>
311 - change spellchecker preflighting to happen via class methods instead of
314 * WebView.subproj/WebView.m:
315 (-[WebView setContinuousSpellCheckingEnabled:]):
316 (+[WebView _preflightSpellCheckerNow:]):
317 (+[WebView _preflightSpellChecker]):
319 2006-02-03 Timothy Hatcher <timothy@apple.com>
323 Renamed configuration names to Debug, Release and Production.
325 * WebKit.xcodeproj/project.pbxproj:
327 2006-02-02 David Hyatt <hyatt@apple.com>
329 Fix for bug 6957, rewrite image rendering in C++ and move it to
330 WebCore. Animation now stops lazily and just uses the CachedObject
331 notification system to push updates so that rects no longer need to
332 be cached (or sets of animating renderers in specific views).
336 * Misc.subproj/WebNSPasteboardExtras.h:
337 * Misc.subproj/WebNSPasteboardExtras.m:
338 (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
339 (-[NSPasteboard _web_declareAndWriteDragImage:element:URL:title:archive:source:]):
340 * Misc.subproj/WebNSViewExtras.h:
341 * Misc.subproj/WebNSViewExtras.m:
342 (-[NSView _web_dragImage:element:rect:event:pasteboard:source:offset:]):
343 * WebCoreSupport.subproj/WebImageData.m:
344 (-[WebImageData init]):
345 * WebCoreSupport.subproj/WebImageRendererFactory.m:
346 (+[WebImageRendererFactory shouldUseThreadedDecoding]):
347 (+[WebImageRendererFactory setShouldUseThreadedDecoding:]):
348 (-[WebImageRendererFactory setPatternPhaseForContext:inUserSpace:]):
349 (-[WebImageRendererFactory imageDataForName:]):
350 * WebView.subproj/WebHTMLView.m:
351 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
352 (-[NSArray elementAtPoint:]):
353 * WebView.subproj/WebImageView.m:
354 (-[WebImageView writeImageToPasteboard:types:]):
355 (-[WebImageView elementAtPoint:]):
356 (-[WebImageView mouseDragged:]):
357 * WebView.subproj/WebView.m:
358 (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
360 2006-01-31 John Sullivan <sullivan@apple.com>
362 Reviewed by Tim Omernick.
364 - fixed <rdar://problem/4267144> REGRESSION (10.4.2): Safari pages auto-scroll too easily
365 during drag over content [5853]
367 There were two issues here:
368 (1) dragging over a non-editable webview (such as a typical Safari page) should not have
369 auto-scrolled at all; the fact that it did was an uninentional side effect of making
370 auto-scroll work for editable webviews a la Blot.
371 (2) the speed & hot area of the auto-scroll changed between 10.4.1 and 10.4.2.
373 I have a fix for (1), which is the much more important issue. I'll modify the bugzilla bug
374 to be about the remaining issue.
376 * WebView.subproj/WebView.m:
377 (-[WebView _autoscrollForDraggingInfo:timeDelta:]):
378 do nothing if not editable
379 (-[WebView _shouldAutoscrollForDraggingInfo:]):
380 return NO if not editable
382 2006-01-31 John Sullivan <sullivan@apple.com>
384 Reviewed by Tim Omernick.
386 Support for programmatic scrolling one line at a time for PDFs. (We already had support for
387 programmatic scrolling one page at a time, and to top/end.)
389 * WebView.subproj/WebPDFView.m:
390 (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
392 (-[WebPDFView scrollLineDown:]):
393 pass a faked arrow-down key event
394 (-[WebPDFView scrollLineUp:]):
395 pass a faked arrow-up key event
397 2006-01-31 Darin Adler <darin@apple.com>
401 * WebCoreSupport.subproj/WebFrameBridge.m:
402 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
403 Updated for name change.
405 2006-01-30 Timothy Hatcher <timothy@apple.com>
409 Add -Wno-deprecated-declarations to the compile flags for WebNetscapePluginPackage.m.
410 <rdar://problem/4427068> LMGetCurApRefNum, CloseConnection and GetDiskFragment now deprecated.
411 When we workaround these we can remove this compile flag.
413 * WebKit.xcodeproj/project.pbxproj:
415 2006-01-30 Timothy Hatcher <timothy@apple.com>
419 Remove the only use of -[NSFont glyphPacking]. This method was deprecated in Tiger
420 and always returns NSNativeShortGlyphPacking.
422 * WebCoreSupport.subproj/WebTextRenderer.m:
423 (-[WebTextRenderer initWithFont:]):
425 2006-01-28 David Hyatt <hyatt@apple.com>
427 Clean up RenderImage, eliminating unneeded members and methods.
431 * WebCoreSupport.subproj/WebImageRenderer.h:
432 * WebCoreSupport.subproj/WebImageRenderer.m:
433 (-[WebImageRenderer copyWithZone:]):
434 (-[WebImageRenderer size]):
435 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
437 2006-01-26 Tim Omernick <timo@apple.com>
439 Reviewed by John Sullivan.
441 <rdar://problem/4422365>
443 * WebView.subproj/WebHTMLView.m:
444 (-[NSArray addSuperviewObservers]):
445 In addition to registering for frame/bounds change notifications, call -_frameOrBoundsChanged.
446 It will check the current size/scroll against the previous layout's size/scroll. We need to
447 do this here to catch the case where the WebView is laid out at one size, removed from its
448 window, resized, and inserted into another window. Our frame/bounds changed notifications
449 will not be sent in that situation, since we only watch for changes while in the view hierarchy.
451 I have verified that this does not cause unnecessary layouts while running the PLT.
453 2006-01-25 Vicki Murley <vicki@apple.com>
455 Reviewed by Beth Dakin.
457 - fix <rdar://problem/4351664> REGRESSION (420+): extra URL in b/f list - navigating back to
458 previous page fails at apple.com/retail/)
460 * WebView.subproj/WebFrame.m:
461 (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): grab the
462 redirect flag of the current load before calling _loadURL, which clears this flag,
463 (-[WebFrame _transitionToCommitted:]): remove misleading comment
464 * History.subproj/WebHistoryItem.m:
465 (-[WebHistoryItem setURL:]): release resources in the page cache when setting
466 the URL on a WebHistoryItem
468 2006-01-25 Timothy Hatcher <timothy@apple.com>
470 Move off of -[NSFont widthOfString:] since it is now deprecated.
471 Use the NSStringDrawing -[NSString sizeWithAttributes:] API.
473 * WebCoreSupport.subproj/WebFileButton.m:
474 (-[WebFileChooserButton bestVisualFrameSizeForCharacterCount:]):
476 2006-01-23 Darin Adler <darin@apple.com>
478 - fixed some small localizable strings issues
480 * WebInspector.subproj/WebInspector.m:
481 (-[DOMNode _nodeTypeName]): Changed so we don't have two localizable strings that
482 are both "Document". I'm not sure we want to localize the DOM inspector UI at all,
483 but this fixes things for now.
484 (-[DOMNode _displayName]): Ditto.
486 * English.lproj/Localizable.strings: Updated.
487 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
489 2006-01-23 Justin Garcia <justin.garcia@apple.com>
493 Turned on -O2 for B&I build.
495 * WebKit.xcodeproj/project.pbxproj:
497 2006-01-22 Timothy Hatcher <timothy@apple.com>
499 Reviewed by Anders Carlsson.
501 Makes the Inspector's Style pane take !important into account
502 when marking overloaded properties.
504 * WebInspector.subproj/webInspector/inspector.js:
506 2006-01-21 Timothy Hatcher <timothy@apple.com>
508 Reviewed by Anders Carlsson.
510 Make sure shorthand properties get striked-out if
511 all the properties they expand into are overloaded.
513 * WebInspector.subproj/webInspector/inspector.js:
515 2006-01-21 Timothy Hatcher <timothy@apple.com>
519 Adds computed style to the Web Inspector.
520 Adds a "mapped style" link to the mapped attributes.
522 * WebInspector.subproj/webInspector/inspector.css:
523 * WebInspector.subproj/webInspector/inspector.html:
524 * WebInspector.subproj/webInspector/inspector.js:
526 2006-01-20 Timothy Hatcher <timothy@apple.com>
528 Reviewed by John, some parts by Darin.
530 Removes the old WebDebugDOMNode code, superseded by the ObjC DOM and the Web Inspector.
531 Since Safari 2.0 still relies on these classes for the Debug menu's "Show DOM Tree", we remove
532 that menu item to prevent a crash.
534 * WebKit.exp: adds WebInspector, removes WebDebugDOMNode
535 * WebKit.xcodeproj/project.pbxproj: added the REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM define so the new WebView code doesn't build in the Default config
536 * WebView.subproj/WebDebugDOMNode.h: Removed.
537 * WebView.subproj/WebDebugDOMNode.m: Removed.
538 * WebView.subproj/WebView.m:
539 (+[WebView initialize]): check if we are in Safari and IncludeDebugMenu is true then observe for NSApplicationDidFinishLaunchingNotification and call _finishedLaunching
540 (+[WebView _finishedLaunching]): observe for NSMenuDidAddItemNotification now that the main menu is loaded and wait for the Debug menu to be added
541 (+[WebView _removeDOMTreeMenuItem:]): when the debug menu is added remove the "Show DOM Tree" item
543 2006-01-20 Timothy Hatcher <timothy@apple.com>
547 Corrects the cascade order for mapped attributes.
548 Shows "inline stylesheet" rather than "null" for rules in <style> tags.
550 * WebInspector.subproj/webInspector/inspector.js:
552 2006-01-19 Timothy Hatcher <timothy@apple.com>
556 Adds inline style reporting and mapped attribute support to the Inspector Style pane.
557 Cleans up the node attributes area with a more natural attr = "value" look.
558 Slight optimization to only update visible scrollbars during a window resize.
560 * WebInspector.subproj/webInspector/inspector.css:
561 * WebInspector.subproj/webInspector/inspector.js:
563 2006-01-19 Timothy Hatcher <timothy@apple.com>
567 http://bugzilla.opendarwin.org/show_bug.cgi?id=6631
568 Inspector window has inappropriate maximum height
570 * WebInspector.subproj/WebInspector.m:
571 (-[WebInspector window]): removes the maximum size constraint
573 2006-01-19 John Sullivan <sullivan@apple.com>
575 Reviewed by Tim Omernick.
577 * WebKit.xcodeproj/project.pbxproj:
578 made WebNSUserDefaultsExtras.h private (SPI) so its one method can be called from
579 Safari, so Safari can stop calling the similar method in Foundation.
581 2006-01-19 John Sullivan <sullivan@apple.com>
583 Reviewed by Tim Omernick.
585 Made _webKit_guessedMIMEType SPI so Safari can use it in order to stop using
586 the similar SPI method in Foundation. This involved splitting it out of the file
587 it was in, to avoid creating any other new SPI here. Poor svn diff got mighty
588 confused in the process.
590 * Misc.subproj/WebNSDataExtras.h:
591 removed _webkit_guessedMIMEType from here
592 * Misc.subproj/WebNSDataExtrasPrivate.h:
593 Added. Contains only _webkit_guessedMIMEType. This file is private (SPI), whereas
594 WebNSDataExtras.h is project-internal. I could have renamed WebNSDateExtras.h to
595 WebNSDateExtrasInternal.h also, but I minimized the gratuitous change level here
598 * Misc.subproj/WebNSDataExtras.m:
599 Despite the great confusion of svn diff, all I actually did here was move
600 _webkit_guessedMIMEType and its helper _webkit_guessedMIMETypeForXML into a new
601 category. No lines of code were harmed while creating this patch.
603 * WebKit.xcodeproj/project.pbxproj:
606 * WebView.subproj/WebView.m:
607 Added #import for new file since WebView uses _webkit_guessedMIMEType
609 2006-01-19 John Sullivan <sullivan@apple.com>
611 Reviewed by Tim Omernick.
613 * Misc.subproj/WebNSURLExtras.h:
614 added declaration of _webkit_rangeOfURLScheme so Safari can call it as a step
615 towards weaning Safari from Foundation SPI.
617 2006-01-17 Justin Garcia <justin.garcia@apple.com>
621 Deployment builds now use -O2
623 * WebKit.xcodeproj/project.pbxproj:
625 2006-01-17 Beth Dakin <bdakin@apple.com>
629 Fix for <rdar://problem/4112029> With Quartz scaling on, Safari incorrectly
630 handles mouseover effects
632 The location of an event in the window should be converted to the superview
633 of the contentView to do accurate hitTesting.
635 * WebView.subproj/WebHTMLView.m:
636 (-[WebHTMLView _updateMouseoverWithEvent:]): Convert the point to the
637 contentView's superview from nil.
639 2006-01-16 Timothy Hatcher <timothy@apple.com>
641 Rubber stamped by Maciej.
643 Check for a new "WebKitDeveloperExtras" default when
644 including the "Inspect Element" context menu item.
645 We should retire the other one eventually.
647 * WebView.subproj/WebView.m:
648 (-[WebView _menuForElement:defaultItems:]):
650 2006-01-17 Anders Carlsson <andersca@mac.com>
652 Reviewed by Timothy Hatcher.
654 - http://bugzilla.opendarwin.org/show_bug.cgi?id=6594
655 Web Inspector: finish node attributes
657 * WebInspector.subproj/webInspector/inspector.css:
658 * WebInspector.subproj/webInspector/inspector.html:
659 * WebInspector.subproj/webInspector/inspector.js:
660 Add initial support for element attributes.
662 2006-01-16 John Sullivan <sullivan@apple.com>
664 Reviewed by Vicki Murley.
666 - fixed <rdar://problem/4409288> REGRESSION (TOT): When no selection is present on page,
667 Jump to Selection doesn't beep
669 * WebView.subproj/WebHTMLView.m:
670 (-[WebHTMLView _hasInsertionPoint]):
672 (-[NSArray validateUserInterfaceItem:]):
673 Don't validate this menu item (or a couple of others) if the selection is a caret and
674 the page isn't editable. In that state, there is no visible selection so this menu item
675 doesn't make sense. I suspect this was broken by some editing-related change that makes
676 selectionState return WebSelectionStateCaret here where it used to return WebSelectionStateNone.
678 2006-01-16 Tim Omernick <timo@apple.com>
680 Reviewed by John Sullivan.
682 WebKit part of <rdar://problem/4211707> NPAPI ref count behavior differs with Mozilla
684 * Plugins.subproj/WebBaseNetscapePluginView.m:
685 (-[WebBaseNetscapePluginView getVariable:value:]):
686 The returned window script object is expected to be retained, as described here:
687 <http://www.mozilla.org/projects/plugins/npruntime.html#browseraccess>
689 2006-01-16 Anders Carlsson <andersca@mac.com>
693 * WebInspector.subproj/webInspector/inspector.js:
694 Use defined NodeType values instead of integers.
696 2006-01-15 Timothy Hatcher <timothy@apple.com>
700 New DOM Inspector that lives in WebKit and is accessible from any WebView.
701 Accessible from a contextual menu when the WebKitEnableInspectElementContextMenuItem default is
702 true or you have a development build. Browsing the tree, serialized HTML and CSS rules work.
704 To always enable enter the following in the Terminal (change the bundle id to affect other WebKit apps):
705 defaults write com.apple.Safari WebKitEnableInspectElementContextMenuItem -bool true
707 http://bugzilla.opendarwin.org/show_bug.cgi?id=6571
709 * English.lproj/Localizable.strings:
710 * English.lproj/StringsNotToBeLocalized.txt: reorder of the entries
711 * Misc.subproj/WebKitNSStringExtras.h:
712 * Misc.subproj/WebKitNSStringExtras.m:
713 (-[NSString _webkit_stringByCollapsingWhitespaceCharacters]): collapses consecutive whitespace into a single space
714 * WebCoreSupport.subproj/WebFrameBridge.m:
715 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): cleanup
716 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]): call the new UI delegate method
717 * WebInspector.subproj: Added.
718 * WebInspector.subproj/WebInspector.h: Added.
719 * WebInspector.subproj/WebInspector.m: Added.
720 (+[WebInspector sharedWebInspector]):
721 (-[WebInspector init]):
722 (-[WebInspector initWithWebFrame:]):
723 (-[WebInspector dealloc]):
724 (-[WebInspector window]):
725 (-[WebInspector windowDidLoad]):
726 (-[WebInspector windowWillClose:]):
727 (-[WebInspector showWindow:]):
728 (-[WebInspector setWebFrame:]):
729 (-[WebInspector webFrame]):
730 (-[WebInspector setRootDOMNode:]):
731 (-[WebInspector rootDOMNode]):
732 (-[WebInspector setFocusedDOMNode:]):
733 (-[WebInspector focusedDOMNode]):
734 (-[WebInspector setSearchQuery:]):
735 (-[WebInspector searchQuery]):
736 (-[WebInspector searchResults]):
737 (-[WebInspector showOptionsMenu]):
738 (-[WebInspector selectNewRoot:]):
739 (-[WebInspector resizeTopArea:]):
740 (-[WebInspector treeViewScrollTo:]):
741 (-[WebInspector treeViewOffsetTop]):
742 (-[WebInspector treeViewScrollHeight]):
743 (-[WebInspector traverseTreeBackward]):
744 (-[WebInspector traverseTreeForward]):
745 (-[WebInspector _toggleIgnoreWhitespace:]):
746 (-[WebInspector _highlightNode:]):
747 (-[WebInspector _nodeHighlightExpired:]):
748 (-[WebInspector _focusRootNode:]):
749 (-[WebInspector _revealAndSelectNodeInTree:]):
750 (-[WebInspector _showSearchResults:]):
751 (-[WebInspector _refreshSearch]):
752 (-[WebInspector _update]):
753 (-[WebInspector _updateRoot]):
754 (-[WebInspector _updateTreeScrollbar]):
755 (+[WebInspector isSelectorExcludedFromWebScript:]):
756 (+[WebInspector webScriptNameForSelector:]):
757 (+[WebInspector isKeyExcludedFromWebScript:]):
758 (-[WebInspector handleEvent:]):
759 (-[WebInspector webView:didFinishLoadForFrame:]):
760 (-[WebInspector webView:plugInViewWithArguments:]):
761 (-[WebInspector outlineView:numberOfChildrenOfItem:]):
762 (-[WebInspector outlineView:isItemExpandable:]):
763 (-[WebInspector outlineView:child:ofItem:]):
764 (-[WebInspector outlineView:objectValueForTableColumn:byItem:]):
765 (-[WebInspector outlineView:willDisplayOutlineCell:forTableColumn:item:]):
766 (-[WebInspector outlineViewItemDidCollapse:]):
767 (-[WebInspector outlineViewSelectionDidChange:]):
768 (-[WebInspectorPrivate dealloc]):
769 (-[DOMHTMLElement _addClassName:]): Helper method for the Inspector to append style classes
770 (-[DOMHTMLElement _removeClassName:]): Helper method for the Inspector to remove style classes
771 (-[DOMNode _contentPreview]):
772 (-[DOMNode _isAncestorOfNode:]):
773 (-[DOMNode _isDescendantOfNode:]):
774 (-[DOMNode _isWhitespace]):
775 (-[DOMNode _lengthOfChildNodesIgnoringWhitespace]):
776 (-[DOMNode _childNodeAtIndexIgnoringWhitespace:]):
777 (-[DOMNode _nextSiblingSkippingWhitespace]):
778 (-[DOMNode _previousSiblingSkippingWhitespace]):
779 (-[DOMNode _firstChildSkippingWhitespace]):
780 (-[DOMNode _lastChildSkippingWhitespace]):
781 (-[DOMNode _firstAncestorCommonWithNode:]):
782 (-[DOMNode _traverseNextNodeStayingWithin:]):
783 (-[DOMNode _traverseNextNodeSkippingWhitespaceStayingWithin:]):
784 (-[DOMNode _traversePreviousNode]):
785 (-[DOMNode _traversePreviousNodeSkippingWhitespace]):
786 (-[DOMNode _nodeTypeName]):
787 (-[DOMNode _shortDisplayName]):
788 (-[DOMNode _displayName]):
789 * WebInspector.subproj/WebInspectorInternal.h: Added.
790 * WebInspector.subproj/WebInspectorOutlineView.h: Added.
791 * WebInspector.subproj/WebInspectorOutlineView.m: Added.
792 (-[WebInspectorOutlineView isOpaque]):
793 (-[WebInspectorOutlineView _highlightColorForCell:]):
794 (-[WebInspectorOutlineView _highlightRow:clipRect:]):
795 (-[WebInspectorOutlineView drawBackgroundInClipRect:]):
796 * WebInspector.subproj/WebInspectorPanel.h: Added.
797 * WebInspector.subproj/WebInspectorPanel.m: Added.
798 (-[WebInspectorPanel canBecomeKeyWindow]):
799 (-[WebInspectorPanel canBecomeMainWindow]):
800 (-[WebInspectorPanel moveWindow:]):
801 (-[WebInspectorPanel resizeWindow:]):
802 (-[WebInspectorPanel sendEvent:]):
803 * WebInspector.subproj/WebNodeHighlight.h: Added.
804 * WebInspector.subproj/WebNodeHighlight.m: Added.
805 (-[WebNodeHighlight initWithBounds:andRects:forView:]):
806 (-[WebNodeHighlight dealloc]):
807 (-[WebNodeHighlight fractionComplete]):
808 (-[WebNodeHighlight expire]):
809 (-[WebNodeHighlight redraw:]):
810 * WebInspector.subproj/WebNodeHighlightView.h: Added.
811 * WebInspector.subproj/WebNodeHighlightView.m: Added.
812 (-[WebNodeHighlightView roundedRect:withRadius:]):
813 (-[WebNodeHighlightView initWithHighlight:andRects:forView:]):
814 (-[WebNodeHighlightView dealloc]):
815 (-[WebNodeHighlightView isOpaque]):
816 (-[WebNodeHighlightView drawRect:]):
817 * WebInspector.subproj/webInspector: Added.
818 * WebInspector.subproj/webInspector/Images: Added.
819 * WebInspector.subproj/webInspector/Images/close.png: Added.
820 * WebInspector.subproj/webInspector/Images/closePressed.png: Added.
821 * WebInspector.subproj/webInspector/Images/downTriangle.png: Added.
822 * WebInspector.subproj/webInspector/Images/menu.png: Added.
823 * WebInspector.subproj/webInspector/Images/menuPressed.png: Added.
824 * WebInspector.subproj/webInspector/Images/popupFill.png: Added.
825 * WebInspector.subproj/webInspector/Images/popupFillPressed.png: Added.
826 * WebInspector.subproj/webInspector/Images/popupLeft.png: Added.
827 * WebInspector.subproj/webInspector/Images/popupLeftPressed.png: Added.
828 * WebInspector.subproj/webInspector/Images/popupRight.png: Added.
829 * WebInspector.subproj/webInspector/Images/popupRightPressed.png: Added.
830 * WebInspector.subproj/webInspector/Images/rightTriangle.png: Added.
831 * WebInspector.subproj/webInspector/Images/scrollThumbBottom.png: Added.
832 * WebInspector.subproj/webInspector/Images/scrollThumbMiddle.png: Added.
833 * WebInspector.subproj/webInspector/Images/scrollThumbTop.png: Added.
834 * WebInspector.subproj/webInspector/Images/scrollTrackBottom.png: Added.
835 * WebInspector.subproj/webInspector/Images/scrollTrackMiddle.png: Added.
836 * WebInspector.subproj/webInspector/Images/scrollTrackTop.png: Added.
837 * WebInspector.subproj/webInspector/Images/squareButtonRight.png: Added.
838 * WebInspector.subproj/webInspector/Images/squareButtonRightPressed.png: Added.
839 * WebInspector.subproj/webInspector/Images/upTriangle.png: Added.
840 * WebInspector.subproj/webInspector/inspector.css: Added.
841 * WebInspector.subproj/webInspector/inspector.html: Added.
842 * WebInspector.subproj/webInspector/inspector.js: Added.
843 * WebKit.xcodeproj/project.pbxproj: Adds Web Inspector files
844 * WebView.subproj/WebUIDelegatePrivate.h: new UI delegate method to supply a replacement view for plugins
845 * WebView.subproj/WebView.m:
846 (-[WebView _menuForElement:defaultItems:]): Add a new context menu item for inspecting
847 (-[WebView _inspectElement:]): Context menu item target for inspecting
849 2006-01-14 Alexey Proskuryakov <ap@nypop.com>
853 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6531
854 document.cookie="killmenothing" doesn't set the cookie
856 * WebCoreSupport.subproj/WebCookieAdapter.m: (-[WebCookieAdapter setCookies:forURL:policyBaseURL:]):
857 Append an '=' to the cookie string if it has none, so that
858 +[NSHTTPCookie cookiesWithResponseHeaderFields:forURL:] can parse it.
860 2006-01-14 Maciej Stachowiak <mjs@apple.com>
864 - added bridging infrastructure for Page class
866 * WebCoreSupport.subproj/WebPageBridge.h: Added.
867 * WebCoreSupport.subproj/WebPageBridge.m: Added.
868 (-[WebPageBridge initWithMainFrameName:view:]): New class, somewhat obvious.
869 * WebKit.xcodeproj/project.pbxproj:
870 * WebView.subproj/WebView.m:
871 (-[WebViewPrivate dealloc]): Don't use _mainFrameBrige, use _pageBridge
872 (-[WebView _close]): ditto
873 (-[WebView _commonInitializationWithFrameName:groupName:]): ditto
874 (-[WebView mainFrame]): ditto
876 2006-01-12 Maciej Stachowiak <mjs@apple.com>
878 Rubber stamped by Eric.
880 - rename WebBridge to WebFrameBridge
882 - also removed all tabs from WebFrameBridge.m
884 * DOM.subproj/WebDOMOperations.m:
885 (-[DOMNode _bridge]):
886 (-[DOMNode webArchive]):
887 (-[DOMRange _bridge]):
888 (-[DOMRange webArchive]):
889 * DOM.subproj/WebDOMOperationsPrivate.h:
890 * English.lproj/StringsNotToBeLocalized.txt:
891 * Misc.subproj/WebCoreStatistics.m:
892 * Misc.subproj/WebNSViewExtras.h:
893 * Misc.subproj/WebNSViewExtras.m:
895 * Plugins.subproj/WebBaseNetscapePluginView.m:
896 * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
897 * Plugins.subproj/WebNetscapePluginStream.m:
898 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
899 * Plugins.subproj/WebPluginContainerCheck.m:
900 (-[WebPluginContainerCheck _isForbiddenFileLoad]):
901 * Plugins.subproj/WebPluginController.h:
902 * Plugins.subproj/WebPluginController.m:
903 (-[WebPluginController bridge]):
904 * WebCoreSupport.subproj/WebBridge.h: Removed.
905 * WebCoreSupport.subproj/WebBridge.m: Removed.
906 * WebCoreSupport.subproj/WebFileButton.h:
907 * WebCoreSupport.subproj/WebFileButton.m:
908 (-[WebFileChooserButton initWithBridge:delegate:]):
909 * WebCoreSupport.subproj/WebFrameBridge.h: Added.
910 * WebCoreSupport.subproj/WebFrameBridge.m: Added.
911 (-[WebFrameBridge mainFrame]):
912 (-[WebFrameBridge createWindowWithURL:frameName:]):
913 (-[WebFrameBridge canTargetLoadInFrame:]):
914 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
916 (-[WebFrameBridge createModalDialogWithURL:]):
917 * WebCoreSupport.subproj/WebSubresourceLoader.m:
918 * WebCoreSupport.subproj/WebTextRendererFactory.m:
919 * WebCoreSupport.subproj/WebViewFactory.m:
920 (-[WebViewFactory bridgeForView:]):
921 * WebKit.xcodeproj/project.pbxproj:
922 * WebView.subproj/WebDataSource.m:
923 (-[WebDataSource _bridge]):
924 (-[WebDataSource _receivedMainResourceError:complete:]):
925 (-[WebDataSource _stringWithData:]):
926 * WebView.subproj/WebDataSourcePrivate.h:
927 * WebView.subproj/WebDebugDOMNode.m:
928 * WebView.subproj/WebDefaultContextMenuDelegate.m:
929 * WebView.subproj/WebFrame.m:
930 (-[WebFrame _traverseNextFrameStayWithin::]):
932 (-[WebFrame _detachFromParent]):
933 (-[WebFrame _bridge]):
934 (-[WebFrame _initWithWebFrameView:webView:bridge:]):
935 * WebView.subproj/WebFrameInternal.h:
936 * WebView.subproj/WebFramePrivate.h:
937 * WebView.subproj/WebFrameView.m:
938 (-[WebFrameView webCoreBridge]):
939 (-[WebFrameView _bridge]):
940 * WebView.subproj/WebHTMLRepresentation.m:
941 (+[WebHTMLRepresentation supportedMIMETypes]):
942 (-[WebHTMLRepresentation _bridge]):
943 (-[WebHTMLRepresentation documentSource]):
944 * WebView.subproj/WebHTMLRepresentationPrivate.h:
945 * WebView.subproj/WebHTMLView.m:
946 (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
947 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]):
948 (-[WebHTMLView updateFocusState]):
949 (-[NSArray validateUserInterfaceItem:]):
950 (-[NSArray attributedString]):
951 (-[NSArray selectedAttributedString]):
952 (-[NSArray concludeDragForDraggingInfo:actionMask:]):
953 (-[NSArray keyDown:]):
954 (-[NSArray _alterCurrentSelection:direction:granularity:]):
955 (-[NSArray _alterCurrentSelection:verticalDistance:]):
956 (-[NSArray _expandSelectionToGranularity:]):
958 (-[NSArray _applyStyleToSelection:withUndoAction:]):
959 (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
960 (-[NSArray pasteAsPlainText:]):
961 (-[NSArray insertNewline:]):
962 (-[NSArray insertLineBreak:]):
963 (-[NSArray insertParagraphSeparator:]):
964 (-[NSArray _changeWordCaseWithSelector:]):
965 (-[NSArray startSpeaking:]):
966 (-[NSArray selectToMark:]):
967 (-[NSArray swapWithMark:]):
968 (-[NSArray transpose:]):
969 (-[WebHTMLView characterIndexForPoint:]):
970 (-[WebHTMLView firstRectForCharacterRange:]):
971 (-[WebHTMLView selectedRange]):
972 (-[WebHTMLView attributedSubstringFromRange:]):
973 (-[WebHTMLView _selectMarkedText]):
974 (-[WebHTMLView _selectRangeInMarkedText:]):
975 (-[WebHTMLView setMarkedText:selectedRange:]):
976 (-[WebHTMLView _selectionIsInsideMarkedText]):
977 (-[WebTextCompleteController _insertMatch:]):
978 (-[WebTextCompleteController doCompletion]):
979 (-[WebTextCompleteController endRevertingChange:moveLeft:]):
980 * WebView.subproj/WebHTMLViewPrivate.h:
981 * WebView.subproj/WebImageView.m:
982 * WebView.subproj/WebMainResourceLoader.m:
983 * WebView.subproj/WebRenderNode.m:
984 * WebView.subproj/WebResource.m:
985 (-[WebResource _stringValue]):
986 * WebView.subproj/WebScriptDebugDelegate.m:
987 * WebView.subproj/WebTextView.m:
988 * WebView.subproj/WebView.m:
989 (-[WebView _createFrameNamed:inParent:allowsScrolling:]):
990 (-[WebView _commonInitializationWithFrameName:groupName:]):
991 (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
992 (-[WebView moveDragCaretToPoint:]):
993 (-[WebView shouldClose]):
994 (-[WebView editableDOMRangeForPoint:]):
995 (-[WebView setEditable:]):
996 (-[WebView deleteSelection]):
997 (-[WebView _bridgeForSelectedOrMainFrame]):
998 (-[WebView _bridgeAtPoint:]):
1000 2006-01-13 Darin Adler <darin@apple.com>
1002 - Replaced tabs with spaces in source files that had less than 10 lines with tabs.
1003 - Set allow-tabs Subversion property in source files that have more than 10 lines with tabs.
1005 2006-01-12 John Sullivan <sullivan@apple.com>
1009 - fixed <rdar://problem/4406994> REGRESSION (TOT): zooming window at cnn.com
1010 makes window fill width of screen
1012 * WebView.subproj/WebFrameView.m:
1013 (-[WebFrameView _largestChildWithScrollBars]):
1014 now skips zero-area frames, used by some evil ads
1016 2006-01-10 John Sullivan <sullivan@apple.com>
1020 - fixed <rdar://problem/4265966> PDFs continue to show a (secondary) selection
1021 when the focus moves elsewhere
1023 * WebView.subproj/WebPDFView.h:
1024 added trackedFirstResponder ivar
1026 * WebView.subproj/WebPDFView.m:
1027 (-[WebPDFView dealloc]):
1028 assert that trackedFirstResponder is nil, as it was released/cleared in viewWillMoveToWindow:
1029 (-[WebPDFView _trackFirstResponder]):
1030 If the tracked first responder was the PDFView's documentView, and the current first responder isn't,
1031 deselect all. This is equivalent to overriding resignFirstResponder in the PDFView's
1032 documentView and deselecting all there, as other web document view classes do. Also, keep track of
1033 the new first responder for next time.
1034 (-[WebPDFView viewWillMoveToWindow:]):
1035 stop observing NSWindowDidUpdateNotification on the old window
1036 (-[WebPDFView viewDidMoveToWindow]):
1037 start observing NSWindowDidUpdateNotification on the new window, with _trackFirstResponder
1038 as the callback. Ideally we'd use a notification that tells us that the first responder is
1039 changing, but there is no such notification, so we have to use this very frequent one instead.
1040 The archaic 2573089 tracks the desire to have a responder-changed notification.
1041 (-[WebPDFView becomeFirstResponder]):
1042 removed comment about this bug that's now obsolete
1044 2006-01-11 Darin Adler <darin@apple.com>
1046 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
1048 2006-01-09 Darin Adler <darin@apple.com>
1050 * Makefile.am: Removed.
1052 2006-01-09 John Sullivan <sullivan@apple.com>
1054 Reviewed by Beth Dakin.
1056 - fixed <rdar://problem/4302263> CrashTracer: 504 crashes in Safari at
1057 com.apple.AppKit: NSTargetForSendAction + 1060
1059 The problem was that back/forward/stop/reload context menu items had nil targets,
1060 and thus were relying on AppKit to start from the context menu target (the clicked-upon
1061 view) and use the responder chain to find the WebView to act as the target. In Tiger,
1062 context menus don't retain their implicit target (the clicked-upon view again), and
1063 there was a race condition where the WebHTMLView could be dealloc'ed while the menu item
1064 was being processed, eventually crashing in AppKit. The fix is to explicitly set the
1065 target of these four menu items to the WebView, since the WebView is not dealloc'ed
1066 in the loading process.
1068 This might be fixed in a future version of AppKit by making the context menu retain its
1069 implicit target until it is dismissed, but with this change it will be fixed regardless
1070 of potential AppKit changes.
1072 * WebView.subproj/WebDefaultContextMenuDelegate.m:
1073 (-[WebDefaultUIDelegate menuItemWithTag:target:]):
1074 Added target: parameter and removed code that set the target for some menu items; now the
1075 caller is responsible for supplying the target.
1076 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
1077 Supply target (or nil) in calls to menuItemWithTag:target:. This matches existing behavior
1078 except for Back/Forward/Stop/Reload, which used to supply no target but now supply the
1079 WebView as the target.
1080 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
1081 Supply target (or nil) in calls to menuItemWithTag:target:
1083 2006-01-09 Geoffrey Garen <ggaren@apple.com>
1087 - Second cut at fixing <rdar://problem/4268278> Submitting a form
1088 in onUnload event handler causes crash in
1089 -[WebDataSource(WebPrivate) _commitIfReady:].)
1091 - Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=6331
1092 REGRESSION: form events don't fire after back/forward navigation,
1093 due to inconsistent load state
1095 * WebView.subproj/WebDataSource.m:
1096 (-[WebDataSource _stopLoading]):
1097 (1) If there are no resource loaders to signal the WebView that we've
1098 been canceled, manufacture the signal. Otherwise, the cancel gets
1099 ignored and nobody cleans up after the load. (We signal the WebView but
1100 not the WebFrame because we don't want the WebFrame to tear down the
1101 data source. Unlike most canceled data sources, this one has valid data
1102 because it's in the back/forward cache.)
1103 (2) Update _private->stopping before returning because if the
1104 data source is in the back/forward cache it can be reused, so it
1105 needs to be in a consistent state. (We never encountered this
1106 situation before because we would always crash first.)
1107 (-[WebDataSource _commitLoadWithData:]): Move _commitIfReady call
1108 inside retain block because the commit may cause an unload event
1109 to fire, which may start a new load, deallocating the current
1110 data source. (This is the same reason the rest of the function is
1111 in the retain block.)
1112 * WebView.subproj/WebFrame.m:
1113 (-[WebFrame _transitionToCommitted:]): If the unload handler
1114 started a new load, return early to avoid stomping it.
1115 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
1116 Undo previous incorrect fix.
1117 (-[WebFrame stopLoading]): Remove misleading comment. Setting
1118 provisionalDataSource to nil is not optional but required for
1119 internal consistency.
1121 2006-01-09 Alexey Proskuryakov <ap@nypop.com>
1125 Affects many layout tests (when running with primary Russian language).
1127 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4759
1128 'ex' length unit calculation (Some layout tests fail if the system primary language is Russian)
1130 * WebCoreSupport.subproj/WebTextRenderer.m:
1131 (-[WebTextRenderer xHeight]): Use glyphForCharacter() instead of -[NSFont glyphWithName:].
1133 2006-01-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
1135 Reviewed by Darin, landed by ap.
1137 Test: fast/text/atsui-small-caps-punctuation-size.html
1139 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6397
1140 ATSUI small caps use small punctuation
1142 * WebCoreSupport.subproj/WebTextRenderer.m:
1143 (createATSULayoutParameters): Changed the characters for which size must
1144 not change from !u_isbase() to the M* categories.
1146 2006-01-06 John Sullivan <sullivan@apple.com>
1148 Reviewed by Vicki Murley (full credit) and Tim Omernick (half credit).
1150 - fixed <rdar://problem/4401102> REGRESSION (420+): When displaying a PDF, tabbing around stops working after reaching page
1152 * WebView.subproj/WebPDFView.m:
1153 (-[WebPDFView setNextKeyView:]):
1154 Use [PDFSubview documentView] rather than PDFSubview here, since that's the view that we now hand off first-responderhood to.
1156 2006-01-05 Tim Omernick <timo@apple.com>
1160 <rdar://problem/4400804> Client-side redirect to a non-HTTP URL confuses Safari
1162 * WebView.subproj/WebFrame.m:
1163 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
1164 If we were waiting for a quick redirect, but the policy delegate decided to ignore it, then we
1165 need to report that the client redirect was cancelled.
1167 2006-01-05 John Sullivan <sullivan@apple.com>
1169 * WebView.subproj/WebPDFView.m:
1170 (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
1171 Just added a FIXME comment about how to clean up this minor hack in the future.
1173 2006-01-05 John Sullivan <sullivan@apple.com>
1178 <rdar://problem/3021785> page up/down don't work on frameset pages unless you click
1179 <rdar://problem/3021788> Page Up/Down moves an unscrollable frame if you click on it first
1181 and the WebKit part of this (need new Safari too for complete fix):
1182 <rdar://problem/4378905> Page up/down don't work in PDFs when address field is focused
1184 I moved some logic down from Safari that dealt with finding the largest scrollable child frame in a frameset,
1185 and added support for standard scrolling-related selectors to WebPDFView. The latter was needed for 4378905;
1186 the former was needed due to side effects of the Safari part of the change. As long as I was doing the former,
1187 I also used that logic to fix 3021785 and 3021788.
1189 * WebView.subproj/WebFrameViewPrivate.h:
1190 new currently-private methods _hasScrollBars and _largestChildWithScrollBars
1192 * WebView.subproj/WebFrameView.m:
1193 (-[WebFrameView scrollToBeginningOfDocument:]):
1194 if we don't have scroll bars, operate on our largest child with scroll bars instead
1195 (-[WebFrameView scrollToEndOfDocument:]):
1197 (-[WebFrameView _pageVertically:]):
1199 (-[WebFrameView _pageHorizontally:]):
1201 (-[WebFrameView _scrollLineVertically:]):
1203 (-[WebFrameView _scrollLineHorizontally:]):
1205 (-[WebFrameView keyDown:]):
1206 where we were bailing out if ![self allowsScrolling], also check for whether there's a
1207 child with scroll bars, and don't bail out if so
1208 (-[WebFrameView _area]):
1209 new helper method used to implement _largestChildWithScrollBars (code moved from Safari)
1210 (-[WebFrameView _hasScrollBars]):
1211 new method, just returns YES if either scroll bar is showing (code moved from Safari)
1212 (-[WebFrameView _largestChildWithScrollBars]):
1213 new method, returns the child with the largest area that is showing at least one scroll bar
1214 (code moved from Safari and tweaked a little)
1216 * WebView.subproj/WebPDFView.m:
1217 (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
1218 new method, hackaround for the fact that PDFView handles key downs from standard scrolling keys
1219 but does not implement the standard responder selectors
1220 (-[WebPDFView scrollPageDown:]):
1221 use _fakeKeyEventWithFunctionKey: to get the PDFView to scroll appropriately
1222 (-[WebPDFView scrollPageUp:]):
1224 (-[WebPDFView scrollToBeginningOfDocument:]):
1226 (-[WebPDFView scrollToEndOfDocument:]):
1229 * WebView.subproj/WebView.m:
1230 add scrollToBeginningOfDocument and scrollToEndOfDocument to the list of responder operations
1231 that we hand off appropriately to the responder chain. These two aren't defined in any header
1232 but are generated by Home and End keys and used by the text system.
1234 2006-01-05 Geoffrey Garen <ggaren@apple.com>
1238 - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6361
1239 Add plugin support to DumpRenderTree
1241 * WebKit.exp: export WebPluginDatabase class, which DumpRenderTree
1242 needs to add plugins to the runtime.
1244 2006-01-03 Maciej Stachowiak <mjs@apple.com>
1248 - move frame management and finding code from WebKit to WebCore
1249 http://bugzilla.opendarwin.org/show_bug.cgi?id=6368
1251 * Plugins.subproj/WebBaseNetscapePluginView.m:
1252 (-[WebBaseNetscapePluginView loadPluginRequest:]): Set frame name straight on the bridge,
1253 instead of having it bubble through the view and frame.
1254 * WebCoreSupport.subproj/WebBridge.m:
1255 (-[WebBridge initWithFrameName:view:]): don't pass name to frame, we own it now; set it
1256 on ourselves directly
1257 (-[WebBridge findFrameNamed:]): removed
1258 (-[WebBridge createWindowWithURL:frameName:]): set name on bridge, not webview
1259 (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
1260 (-[WebBridge runModal]): remove excess braces
1261 * WebKit.xcodeproj/project.pbxproj:
1262 * WebView.subproj/WebControllerSets.h: Removed.
1263 * WebView.subproj/WebControllerSets.m: Removed.
1264 * WebView.subproj/WebFrame.m:
1265 (-[WebFramePrivate name]): removed
1266 (-[WebFramePrivate setName:]): removed
1267 (-[WebFramePrivate dealloc]): don't release name, we no longer have one
1268 (-[WebFrame _appendChild:]): removed
1269 (-[WebFrame _removeChild:]): removed
1270 (-[WebFrame _createItem:]): removed stray space
1271 (-[WebFrame _immediateChildFrameNamed:]): Just call the bridge
1272 (-[WebFrame _setName:]): removed
1273 (-[WebFrame _detachFromParent]): remove bridge from parent note self
1274 (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
1275 (-[WebFrame _addChild:]): Call appendChild: on bridge, not self
1276 (-[WebFrame _nextFrameWithWrap:]): just call bridge (and moved helpers there)
1277 (-[WebFrame _previousFrameWithWrap:]): just call bridge (and moved helpers there)
1278 (-[WebFrame _initWithWebFrameView:webView:bridge:]): don't take a name any more
1279 (-[WebFrame _setFrameNamespace:]): just call bridge
1280 (-[WebFrame _frameNamespace]): just call bridge
1281 (-[WebFrame _hasSelection]): remove excess braces
1282 (-[WebFrame _clearSelection]): ditto
1283 (-[WebFrame initWithName:webFrameView:webView:]): no more name
1284 (-[WebFrame name]): just call bridge
1285 (-[WebFrame findFrameNamed:]): just call bridge (and moved helpers there)
1286 (-[WebFrame parentFrame]): fixed for new style
1287 * WebView.subproj/WebFrameInternal.h:
1288 * WebView.subproj/WebFramePrivate.h:
1289 * WebView.subproj/WebView.m:
1290 * WebView.subproj/WebViewPrivate.h:
1292 2006-01-03 Darin Adler <darin@apple.com>
1296 This is a fix for <rdar://problem/3710994> HiDPI: Link underlines are
1297 still one pixel high even if the UI resolution is > 100%
1299 This fix refactors -drawLineForCharacters to make its organization
1300 more logical. It changes behavior when printing to the screen by
1301 rounding the parameters of the line (x- and y-values, width, and
1302 thickness) to integer boundaries in device space. Previously,
1303 this part of the routine just hardcoded a 1 pixel line.
1305 * WebCoreSupport.subproj/WebTextRenderer.m:
1306 (drawHorizontalLine): This just takes care of drawing the line once everything
1307 has been calculated in -drawLineForCharacters
1308 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
1309 Now takes device space into account. Calls drawHorizontalLine
1311 2006-01-03 Maciej Stachowiak <mjs@apple.com>
1315 - moved frame traversal code across from bridge, also dropped the children
1318 * WebCoreSupport.subproj/WebBridge.h:
1319 * WebCoreSupport.subproj/WebBridge.m:
1320 (-[WebBridge dealloc]): Don't release children array, that was moved
1322 (-[WebBridge saveDocumentState:]):
1323 - many methods moved to WebCore.
1324 * WebView.subproj/WebFrame.m:
1325 (Frame): New convenience method to get a WebFrame * from a method that
1326 returns WebCoreBridge *.
1327 (-[WebFrame _firstChildFrame]): use Frame()
1328 (-[WebFrame _lastChildFrame]): ditto
1329 (-[WebFrame _previousSiblingFrame]): ditto
1330 (-[WebFrame _nextSiblingFrame]): ditto
1331 (-[WebFrame _traverseNextFrameStayWithin:]): ditto
1333 2006-01-03 Anders Carlsson <andersca@mac.com>
1337 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6357
1338 REGRESSION: iframe and target is broken
1340 * WebView.subproj/WebFrame.m:
1341 (-[WebFrame _descendantFrameNamed:sourceFrame:]):
1342 Return the correct frame.
1344 2006-01-02 Maciej Stachowiak <mjs@apple.com>
1348 - moved frame traversal logic from WebFrame to WebBridge
1349 http://bugzilla.opendarwin.org/show_bug.cgi?id=6341
1351 To do this, I had to invert the ownership so that WebBridge now
1352 owns WebFrame instead of vice versa. As a result, WebView now owns
1353 a WebBridge pointer and does not have a direct WebFrame pointer.
1355 * WebCoreSupport.subproj/WebBridge.h:
1356 * WebCoreSupport.subproj/WebBridge.m:
1357 (-[WebBridge initWithFrameName:view:]): The initializer is now responsible for creating
1358 the frame, so pass it what it needs to do that.
1359 (-[WebBridge dealloc]): The bridge now owns the frame, so release it.
1360 (-[WebBridge close]): ditto
1361 (-[WebBridge firstChild]): Moved from WebFrame
1362 (-[WebBridge lastChild]): ditto
1363 (-[WebBridge childCount]): ditto
1364 (-[WebBridge previousSibling]): ditto
1365 (-[WebBridge nextSibling]): ditto
1366 (-[WebBridge isDescendantOfFrame:]): ditto
1367 (-[WebBridge traverseNextFrameStayWithin:]): ditto
1368 (-[WebBridge appendChild:]): ditto
1369 (-[WebBridge removeChild:]): ditto
1370 * WebView.subproj/WebFrame.m:
1371 (-[WebFrame _removeChild::]): Call WebBridge version
1372 (-[WebFramePrivate dealloc]): ditto
1373 (-[WebFrame _firstChildFrame]): ditto
1374 (-[WebFrame _lastChildFrame]): ditto
1375 (-[WebFrame _childFrameCount]): ditto
1376 (-[WebFrame _previousSiblingFrame]): ditto
1377 (-[WebFrame _nextSiblingFrame]): ditto
1378 (-[WebFrame _traverseNextFrameStayWithin:]): ditto
1379 (-[WebFrame _appendChild:]): ditto
1380 (-[WebFrame _removeChild:]): ditto
1381 (-[WebFrame _isDescendantOfFrame:]): ditto,
1382 (-[WebFrame _detachFromParent]): reorder a bit to avoid losing our bridge
1383 pointer before the bridge is due to release us, and don't release the
1384 bridge any more since it now owns us
1385 (-[WebFrame _initWithName:webFrameView:webView:bridge:]): new initializer,
1386 we no longer create the bridge, instead it is passed in
1387 (-[WebFrame initWithName:webFrameView:webView:]): Call the new designated
1388 initializer, but this method is no longer viable and should be deprecated.
1389 * WebView.subproj/WebFrameInternal.h:
1391 * WebView.subproj/WebView.m: WebView was changed to hold onto
1392 the WebBridge for the main frame instead of the WebFrame.
1394 (-[WebViewPrivate dealloc]): update for the fact that we hold
1395 a bridge now, not a frame.
1396 (-[WebView _close]): ditto
1397 (-[WebView _createFrameNamed:inParent:allowsScrolling:]): Create
1398 a bridge, not a frame.
1399 (-[WebView _commonInitializationWithFrameName:groupName:]): ditto.
1400 (-[WebView setDefersCallbacks:]): get mainFrame via method
1401 (-[WebView mainFrame]): Update to get the main frame properly
1403 2005-12-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
1405 Reviewed by Darin, landed by ap.
1407 Test: fast/text/justified-text-rect.html
1409 - WebKit part of fix for
1410 http://bugzilla.opendarwin.org/show_bug.cgi?id=5461
1411 Text width measured incorrectly when text-align: justify
1413 * WebCoreSupport.subproj/WebTextRenderer.m:
1414 (-[WebTextRenderer selectionRectForRun:style:geometry:]): Added.
1415 (CG_drawHighlight): Use new function CG_selectionRect.
1416 (CG_selectionRect): New function to compute the selection rect.
1417 Eliminated rounding hackery that was required for keeping the highlight
1418 rect within the selection rect computed by
1419 InlineTextBox::selectionRect, since the latter uses this function now.
1420 The new selection rect is wider and matches AppKit more closely,
1421 although the right hand side is roundf()ed instead of cielf()ed for
1422 optimal caret positioning.
1423 (ATSU_drawHighlight): Use new function ATSU_selectionRect.
1424 (ATSU_selectionRect): New function to compute the selection rect.
1425 Much like CG_selectionRect.
1427 2005-12-29 Geoffrey Garen <ggaren@apple.com>
1431 Manual testcase added:
1432 WebCore/manual-tests/onunload-form-submit-crash.html
1434 - Fixed <rdar://problem/4268278> Submitting a form in onUnload event
1435 handler causes crash in -[WebDataSource(WebPrivate) _commitIfReady:]
1437 The problem is that the form submission in the unload event kicks off
1438 a new load in the midst of the load that caused the unload event to
1439 fire in the first place, so the two loads stomp each other.
1441 The solution is to cancel the first load and let the unload handler's
1442 load win. (Firefox does the same.)
1444 * WebView.subproj/WebFrame.m:
1445 (-[WebFrame _transitionToCommitted:]): Moved call to -closeURL up
1446 the call stack to _continueLoadRequest. (See below.) This has the
1447 side-effect of always firing the unload event, even if the new
1448 datasource never becomes committed, which seems like a good thing.
1450 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
1451 Call -closeURL here, instead of in _transitionToCommitted, so that the
1452 unload handler can fire before we initialize any part of the load.
1454 Check provisionalDataSource for nil to discover if the unload event
1455 kicked off its own load.
1457 Cleared up some coments.
1459 (-[WebFrame _detachFromParent]):
1460 It turns out that if you close the window instead of just navigating
1461 to a new page, you get an alternate assertion failure/crash because
1462 the load kicked off by the unload event handler generates resource
1463 loader callbacks after the associated WebFrame/WebView has disappeared.
1465 The nifty solution here is just to reverse the order of calls to
1466 -stopLoading and -closeURL, thus guaranteeing that -stopLoading has the
1467 last word when you close a window.
1469 2005-12-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
1471 Reviewed by Eric, committed by Maciej.
1473 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6288
1474 HEAD build broken 12/29/2005
1476 * WebCoreSupport.subproj/WebTextRenderer.m:
1477 (overrideLayoutOperation): Use previous character from the buffer
1478 instead of ch which may be uninitialized on the first iteration.
1480 2005-12-29 Maciej Stachowiak <mjs@apple.com>
1484 - finished frame traversal cleanup
1485 http://bugzilla.opendarwin.org/show_bug.cgi?id=6293
1487 * WebCoreSupport.subproj/WebBridge.m:
1488 (-[WebBridge childFrames]): Removed (this was unused)
1489 * WebView.subproj/WebFrame.m:
1490 (-[WebFrame _removeChild::]): Moved to FrameTraversal category.
1491 (-[WebFrame _childFrameCount]): New frame traversal method to avoid
1492 getting the count from the array directly.
1493 (-[WebFrame _appendChild:]): Factored out the parts of addChild: that
1494 seem directly relevant to adding a child.
1495 (-[WebFrame _removeChild:]): Moved to FrameTraversal category.
1496 (-[WebFrame _detachChildren]): Don't deallocate children array because
1497 there's no particular need to.
1498 (-[WebFrame _setDataSource:]): make the assert use _childFrameCount
1499 (-[WebFrame _opened]):
1500 (-[WebFrame _checkLoadComplete]): Instead of checking all frames starting
1501 from the main frame, check this frame and all ancestors. If a resource
1502 for a frame completes, that con only possibly finish loading for that
1503 frame and its ancestors, not any other frame in the tree.
1504 (-[WebFrame _recursiveCheckLoadComplete]): Removed, no longer needed.
1505 (-[WebFrame _childFramesMatchItem:]): Get child frame count in the new
1507 (-[WebFrame _internalChildFrames]): removed
1508 (-[WebFrame _addChild:]): Use _appendChild: for most of the work.
1509 (-[WebFrame _generateFrameName]): Get child frame count in the new
1511 (-[WebFrame _stopLoadingSubframes]): Use new frame traversal mechanisms,
1512 upon further consideration there's no need to copy part of the frame tree here.
1513 (-[WebFrame findFrameNamed:]): Remove extra braces.
1514 (-[WebFrame childFrames]): Make a new array using the frame traversal methods.
1515 * WebView.subproj/WebFramePrivate.h: Remove some methods.
1516 * WebView.subproj/WebMainResourceLoader.m:
1517 (-[WebMainResourceLoader didReceiveResponse:]): Do _checkLoadComplete on the current
1518 frame not the main frame (before there was no difference and now the new version is
1520 * WebView.subproj/WebView.m:
1521 (-[WebView _finishedLoadingResourceFromDataSource:]): Remove stray space
1522 (-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]): Remove stray spaces
1523 and update FIXME comment.
1524 (-[WebView _receivedError:fromDataSource:]): Remove stray space
1526 2005-12-29 Maciej Stachowiak <mjs@apple.com>
1530 - abstract frame traversal in WebFrame more
1531 http://bugzilla.opendarwin.org/show_bug.cgi?id=6283
1533 Rewrote most of the frame traversal code in WebFrame to use DOM-style
1534 first/last/next/previous methods, to abstract access better in preparation
1537 As an added bonus, many formerly recursive methods are now iterative.
1539 * WebKit.xcodeproj/project.pbxproj: Use gnu99 dialect of C, so that
1540 variables can be declared in for loop initializers.
1542 - added new frame traversal methods, to avoid dealing with the children array
1545 * WebView.subproj/WebFrame.m:
1546 (-[WebFrame _firstChildFrame]): New method.
1547 (-[WebFrame _lastChildFrame]): New method.
1548 (-[WebFrame _previousSiblingFrame]): New method.
1549 (-[WebFrame _nextSiblingFrame]): New method.
1550 (-[WebFrame _traverseNextFrameStayWithin:]): Like traverseNextNode() in the DOM;
1551 uses some of the previous.
1553 - apply the new methods
1555 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): Rewrite loop
1556 to use new traversal methods.
1557 (-[WebFrame _immediateChildFrameNamed:]): ditto, also added FIXME
1558 (-[WebFrame _setName:]): Improved comment, removed gratuitous brace
1559 (-[WebFrame _isDescendantOfFrame:]): Rewrote to chase parent pointers instead
1560 of looking in child arrays (duh)
1561 (-[WebFrame _detachChildren]): Rewrite loop to use new traversal methods,
1562 still walk backwards for now.
1563 (-[WebFrame _closeOldDataSources]): Rewrite using new traversal methods.
1564 (-[WebFrame _childFramesMatchItem:]): ditto
1565 (-[WebFrame _defersCallbacksChanged]): ditto
1566 (-[WebFrame _viewWillMoveToHostWindow:]): ditto
1567 (-[WebFrame _viewDidMoveToHostWindow]): ditto
1568 (-[WebFrame _addChild:]): don't use childFrames method
1569 (-[WebFrame _removeChild:]): Clear out the sibling pointers after unlinking from the list,
1570 not obvious if anything needs this but it seems like the right thing to do.
1571 (-[WebFrame _generateFrameName]): don't bother to nil-check children array, since
1572 calling count on nil still gives 0.
1573 (-[WebFrame _saveDocumentAndScrollState]): Rewrite to use frame traversal methods
1574 (-[WebFrame _deepLastChildFrame]): renamed from _lastChildFrame, rewrite to use child
1576 (-[WebFrame _nextFrameWithWrap:]): Use new frame traversal stuff (mostly just
1577 a thin wrapper on _traverseNextFrameStayWithin:
1578 (-[WebFrame _previousFrameWithWrap:]): Use new traversal functions
1579 (-[WebFrame _numPendingOrLoadingRequests:]): Rewrite loop with new tracrsal functions
1580 (-[WebFrame _reloadForPluginChanges]): ditto
1581 (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): ditto
1582 (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): ditto
1583 (-[WebFrame _documentViews]): ditto
1584 (-[WebFrame _updateDrawsBackground]): ditto
1585 (-[WebFrame _unmarkAllMisspellings]): ditto
1586 (-[WebFrame _atMostOneFrameHasSelection]): ditto
1587 (-[WebFrame _findFrameWithSelection]): ditto
1588 (-[WebFrame _stopLoadingSubframes]): ditto
1589 (-[WebFrame _subframeIsLoading]): ditto
1590 (-[WebFrame _descendantFrameNamed:sourceFrame:]): ditto
1592 2005-12-29 Darin Adler <darin@apple.com>
1594 * WebView.subproj/WebFrameView.m: (-[WebFrameViewPrivate dealloc]):
1595 Removed unused "draggingTypes" instance variable.
1597 2005-12-29 Mitz Pettel <opendarwin.org@mitzpettel.com>
1601 Test: fast/text/atsui-spacing-features.html
1603 - WebKit part of fix for
1604 http://bugzilla.opendarwin.org/show_bug.cgi?id=3922
1605 Variable word/letter spacing and full justification not supported for
1608 * WebCoreSupport.subproj/WebTextRenderer.m:
1609 (overrideLayoutOperation): Add letter- and word-spacing and padding for
1611 (createATSULayoutParameters): Compute padding per space.
1613 2005-12-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
1615 Reviewed by Maciej, landed by Darin.
1617 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4844
1618 Render "simple" Hebrew using the CG codepath
1620 * WebCoreSupport.subproj/WebTextRenderer.m: (shouldUseATSU): Exclude Hebrew letters and maqaf.
1622 2005-12-25 Maciej Stachowiak <mjs@apple.com>
1626 - Remove WebFrame's parent frame pointer, instead rely on WebCore's parent concept
1627 http://bugzilla.opendarwin.org/show_bug.cgi?id=6241
1629 * WebCoreSupport.subproj/WebBridge.h:
1630 * WebCoreSupport.subproj/WebBridge.m:
1631 (-[WebBridge canTargetLoadInFrame:]): Use bridge parent method instead of needlessly
1632 asking for parent via WebFrame
1633 (-[WebBridge frameDetached]): Don't call _removeChild on the parent frame any more
1634 because WebFame's _detachFromParent takes care of that now.
1635 * WebView.subproj/WebFrame.m:
1636 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): Fix stray spaces
1637 (-[WebFrame _detachChildren]): Don't remove children as we loop any more, they
1638 can remove themselves.
1639 (-[WebFrame _detachFromParent]): Remove self from parent; don't nil out bridge
1640 until we are done with it.
1641 (-[WebFrame _transitionToCommitted:]): Remove some extra braces.
1642 (-[WebFrame _goToItem:withLoadType:]): Use parentFrame method in assert instead of parent
1644 (-[WebFrame _addChild:]): Don't poke at parent frame pointer in _private
1645 since it is not there any more.
1646 (-[WebFrame _removeChild:]): Remove extra braces and don't clear parent pointer
1647 explicitly any more.
1648 (-[WebFrame _addFramePathToString:]): Get parentFrame from method, not field.
1649 (-[WebFrame _loadDataSource:withLoadType:formState:]): Remove extra braces.
1650 (-[WebFrame _nextFrameWithWrap:]): Get parent in the proper way and clean up the
1652 (-[WebFrame _previousFrameWithWrap:]): Ditto.
1653 (-[WebFrame parentFrame]): Get parent from the bridge.
1655 2005-12-25 Maciej Stachowiak <mjs@apple.com>
1659 - fixed REGRESSION: world leak of WebDataSource
1660 http://bugzilla.opendarwin.org/show_bug.cgi?id=6242
1662 * WebView.subproj/WebDataSource.m:
1663 (-[WebDataSource _stopLoading]): don't retain self until after
1664 the possible early return.
1666 2005-12-24 Maciej Stachowiak <mjs@apple.com>
1670 - rearrange some code in WebDataSource so that more of the frame traversal logic
1671 is in WebFrame, in preparation for moving it down to WebBridge.
1672 http://bugzilla.opendarwin.org/show_bug.cgi?id=6239
1674 * WebView.subproj/WebDataSource.m:
1675 (-[WebDataSource _archiveWithMarkupString:nodes:]): Assert that the
1676 data source is committed, doesn't make sense to archive otherwise.
1677 (-[WebDataSource _subframeArchivesWithCurrentState:]): New helper method.
1678 (-[WebDataSource _archiveWithCurrentState:]): Assert that the data source
1679 is committed. Use the helper.
1680 (-[WebDataSource _setWebView:]): Comment that we won't tell subframes that
1681 defers callback changed.
1682 (-[WebDataSource _startLoading]): Remove stray space.
1683 (-[WebDataSource _stopLoading]): Only handle local _stopLoading business.
1684 Cound on WebFrame to tell subframes to stop loading. Fold in _stopLoadingInternal
1685 and remove _recursiveStopLoading.
1686 (-[WebDataSource _startLoading:]): Clean up an assert slightly.
1687 (-[WebDataSource _setTitle:]): Remove stray spaces.
1688 (-[WebDataSource _defersCallbacksChanged]): Don't call subframes. WebFrame
1690 (-[WebDataSource isLoading]): Move checking of subframes down to WebFrame.
1691 (-[WebDataSource webArchive]): Return nil if the data source is not yet
1692 committed. It makes no sense to archive a provisional data source since it
1694 (-[WebDataSource addSubresource:]): Replace an assert with an early return,
1695 ASSERT is not an appropriate way to flag problems with the argument of a public
1697 * WebView.subproj/WebDataSourcePrivate.h:
1698 * WebView.subproj/WebFrame.m:
1699 (-[WebFrame _setLoadType:]): Remove stray space.
1700 (-[WebFrame _checkLoadCompleteForThisFrame]): Stop loading subframes
1701 manually and add a FIXME about confusingness of stopping loading here.
1702 (-[WebFrame _defersCallbacksChanged]): Tell our subframes.
1703 (-[WebFrame _addChild:]): Remove stray space.
1704 (-[WebFrame _stopLoadingSubframes]): New helper method.
1705 (-[WebFrame _subframeIsLoading]): New helper method, code moved
1707 (-[WebFrame stopLoading]): Tell subframes to stop loading.
1708 (-[WebFrame reload]): Remove extra braces.
1709 * WebView.subproj/WebFrameInternal.h:
1711 2005-12-23 Maciej Stachowiak <mjs@apple.com>
1715 - move more frame tree traversal code from WebView to WebFrame
1717 * WebView.subproj/WebFrame.m:
1718 (-[WebFrame _atMostOneFrameHasSelection]): Moved this debug
1719 method from WebView, renamed it and changed it to return a boolean
1720 so it is appropriate for use in assertions instead of giving its own
1722 (-[WebFrame _accumulateFramesWithSelection:]): Helper for the above.
1723 (-[WebFrame _findFrameWithSelection]): Moved from WebView and renamed from
1724 _findSelectedFrame, also removed the skipping variant.
1725 (-[WebFrame _clearSelectionInOtherFrames]): Moved from WebView and
1726 changed how the logic works. Instead of clearing selection in any frame
1727 but the focus frame, it clears selection in all but this one.
1728 * WebView.subproj/WebFrameInternal.h:
1729 * WebView.subproj/WebHTMLView.m:
1730 (-[WebHTMLView becomeFirstResponder]): Call _clearSelectionInOtherFrames
1731 * WebView.subproj/WebPDFView.m:
1732 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Stop getting WebFrame
1733 in needlessly roundabout way.
1734 (-[WebPDFView becomeFirstResponder]): Call _clearSelectionInOtherFrames
1735 * WebView.subproj/WebTextView.m:
1736 (-[WebTextView _webFrame]): New helper method.
1737 (-[WebTextView _elementAtWindowPoint:]): Use it.
1738 (-[WebTextView becomeFirstResponder]): Call _clearSelectionInOtherFrames
1739 (-[WebTextView resignFirstResponder]): Fix style issue
1740 (-[WebTextView clickedOnLink:atIndex:]): Use new helkper
1741 * WebView.subproj/WebView.m:
1742 (-[WebView selectedFrame]): Call to WebFrame as appropriate
1743 (-[WebView _selectedOrMainFrame]): Fix style issue
1744 * WebView.subproj/WebViewInternal.h:
1746 2005-12-22 Maciej Stachowiak <mjs@apple.com>
1750 - move a few more methods from WebView to WebFrame.
1752 * WebView.subproj/WebFrame.m:
1753 (-[WebFrame _hasSelection]): Renamed from _frameIsSelected: and moved from
1755 (-[WebFrame _clearSelection]): Renamed from _deselectFrame: and moved from
1757 * WebView.subproj/WebFrameInternal.h:
1758 * WebView.subproj/WebView.m:
1759 (-[WebView searchFor:direction:caseSensitive:wrap:]): Update for renames.
1760 (-[WebView _findSelectedFrameStartingFromFrame:skippingFrame:]): Ditto.
1761 (-[WebView _debugCollectSelectedFramesIntoArray:startingFromFrame:]): Ditto.
1762 (-[WebView _selectedFrameDidChange]):
1764 2005-12-21 Timothy Hatcher <timothy@apple.com>
1766 * WebKit.xcodeproj/project.pbxproj:
1767 Set tab width to 8, indent width to 4 and uses tabs to false per file.
1769 2005-12-20 Alexey Proskuryakov <ap@nypop.com>
1773 <http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
1774 -[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
1776 * WebView.subproj/WebHTMLView.m:
1777 (-[WebHTMLView firstRectForCharacterRange:]):
1778 Handle some large unsigned values the way NSTextView does.
1779 Actually use the range passed in instead of _selectedRange,
1780 use of _selectedRange was a workaround that is no longer necessary.
1782 2005-12-20 John Sullivan <sullivan@apple.com>
1784 Reviewed by Darin Adler.
1786 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6146
1787 (REGRESSION: Bold font used for Google search result pages is too thick)
1789 This is a problem with a particular font that was installed by Microsoft Office X. Though the
1790 font and/or lower levels of font-handling code in the system are buggy, this bad symptom will
1791 occur for users of Safari and other WebKit clients who happen to have one of these bad fonts.
1792 This adds a workaround to avoid the problem.
1794 * WebCoreSupport.subproj/WebTextRendererFactory.m:
1795 (-[WebTextRendererFactory fontWithFamilies:traits:size:]):
1796 When we're going to synthesize bold or italic, yet the font we looked up was apparently a
1797 match for the traits, try to look up a font that without the to-be-synthesized traits.
1798 This way, instead of applying synthetic bold over Arial Bold, we'll apply synthetic
1799 bold over Arial Regular, which is uglier than just using Arial Bold, but far less ugly
1800 than using Arial Bold with synthetic bold too.
1802 2005-12-16 Justin Garcia <justin.garcia@apple.com>
1804 <rdar://problem/4103393> Frequent Safari crash on lexisnexus.com (khtml::Selection::xPosForVerticalArrowNavigation)
1805 <rdar://problem/4330451> CrashTracer: [REGRESSION] 2235 crashes in Safari at com.apple.WebCore: khtml::Selection::xPosForVerticalArrowNavigation const 436
1809 WebCore will crash when a selection that starts or ends in a node
1810 that has been removed from the document is modify()d. This can occur:
1811 (1) in non-editable regions (4103393 and 4330451), (2) in editable
1812 regions (4383146) as the result of arbitrary DOM operations, and (3) in
1813 Mail (4099739) as the result of an editing operation that sets a
1814 bad ending selection.
1816 Crashes of type (1) can occur when the user uses the arrow keys
1817 to interact with a web app, or when the user tries to use
1818 command-shift-arrow to switch tabs (this is a depricated
1819 combo that will work if no one else responds to it). The easiest
1820 way to fix these crashes is to disallow editing'ish selection changes
1821 like moveDown:, selectWord:, pageDown:, etc, when the selection
1822 is in a non-editable region.
1824 Crashes of type (2) will require a more complicated fix (but occur
1825 much less often than type (1)). Crashes of type (3) must be
1826 fixed by tracking down the editing operation that sets bad selections.
1828 Added a layout-test:
1829 * editing/selection/selection-actions.html
1831 * WebView.subproj/WebHTMLView.m:
1832 (-[WebHTMLView _canAlterCurrentSelection]):
1833 (-[WebHTMLView _alterCurrentSelection:direction:granularity:]):
1834 (-[WebHTMLView _alterCurrentSelection:verticalDistance:]):
1835 (-[WebHTMLView _expandSelectionToGranularity:]):
1836 * WebView.subproj/WebHTMLViewPrivate.h:
1838 2005-12-20 Justin Garcia <justin.garcia@apple.com>
1842 Fixed more uninitialized variable warnings, and
1843 removed an extra semicolon.
1845 * WebCoreSupport.subproj/WebTextRenderer.m:
1846 (overrideLayoutOperation):
1847 (createATSULayoutParameters):
1849 2005-12-20 Maciej Stachowiak <mjs@apple.com>
1853 - push more of frame lookup and management from WebView to
1854 WebFrame, this is in preparation for shifting this to WebCore
1855 http://bugzilla.opendarwin.org/show_bug.cgi?id=6163
1857 * WebCoreSupport.subproj/WebBridge.m:
1858 (-[WebBridge closeWindowSoon]): Adjust for change to WebFrameNamespaces
1859 (-[WebBridge runModal]): ditto
1860 * WebView.subproj/WebControllerSets.h:
1861 * WebView.subproj/WebControllerSets.m:
1862 (+[WebFrameNamespaces addFrame:toNamespace:]): This now operates in terms
1863 of WebFrames (expected to be the main frame) not WebViews.
1864 (+[WebFrameNamespaces framesInNamespace:]): Ditto.
1865 * WebView.subproj/WebFrame.m:
1866 (-[WebFrame _setFrameNamespace:]): Set self, not WebView.
1867 (-[WebFrame _shouldAllowAccessFrom:]): Moved this code above use
1868 to avoid prototyping the method.
1869 (-[WebFrame _descendantFrameNamed:sourceFrame:]): Ditto.
1870 (-[WebFrame _frameInAnyWindowNamed:sourceFrame:]): Copied logic
1872 (-[WebFrame findFrameNamed:]): Do it all here, don't call WebView.
1873 * WebView.subproj/WebFramePrivate.h:
1874 * WebView.subproj/WebView.m:
1875 * WebView.subproj/WebViewPrivate.h:
1877 2005-12-20 Geoffrey Garen <ggaren@apple.com>
1881 Fixed build failure due to missing 'b's in my last checkin.
1883 * WebCoreSupport.subproj/WebBridge.m:
1884 (-[WebBridge isStatusbarVisible]): changed 'B' to 'b'
1885 (-[WebBridge setStatusbarVisible:]): ditto
1887 2005-12-20 Mitz Pettel <opendarwin.org@mitzpettel.com>
1889 Reviewed by Darin, committed by Adele.
1891 - fix deployment builds broken by the ATSUI multiple renderers patch
1892 http://bugzilla.opendarwin.org/show_bug.cgi?id=6153
1894 * WebCoreSupport.subproj/WebTextRenderer.m:
1895 (createATSULayoutParameters): Assign initial values, which will never be used,
1896 to substituteRenderer and firstSmallCap, to avoid uninitialized variable warnings.
1898 2005-12-20 Geoffrey Garen <ggaren@apple.com>
1902 Part of fix for <rdar://problem/4310363> JavaScript window.open: Height
1903 is 1 pixel short, and related bugs. See WebCore ChageLog.
1905 * WebCoreSupport.subproj/WebBridge.m:
1906 (-[WebBridge webView]): Added method.
1908 2005-12-20 Eric Seidel <eseidel@apple.com>
1912 Development-only build fix.
1914 * WebView.subproj/WebFrame.m:
1915 (-[WebFramePrivate dealloc]): fixed typo
1917 2005-12-20 Maciej Stachowiak <mjs@apple.com>
1921 - revert accidental commit of this file.
1923 2005-12-19 Maciej Stachowiak <mjs@apple.com>
1927 - Move handling of frame namespaces down to WebFrame.
1928 - Put some internal class declarations in the implementation file.
1930 * WebView.subproj/WebControllerSets.m:
1931 (+[WebFrameNamespaces addWebView:toFrameNamespace:]):
1932 (+[WebFrameNamespaces webViewsInFrameNamespace:]):
1933 * WebView.subproj/WebFrame.m:
1934 (-[WebFramePrivate dealloc]):
1935 (-[WebFrame _setFrameNamespace:]):
1936 (-[WebFrame _frameNamespace]):
1937 * WebView.subproj/WebFrameInternal.h:
1938 * WebView.subproj/WebFramePrivate.h:
1939 * WebView.subproj/WebView.m:
1940 (-[WebView _close]):
1941 (-[WebView _findFrameNamed:sourceFrame:]):
1942 (-[WebView setGroupName:]):
1943 (-[WebView groupName]):
1944 * WebView.subproj/WebViewInternal.h:
1946 2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
1948 Reviewed by Darin, committed by Adele.
1950 Test: fast/text/atsui-multiple-renderers.html
1952 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6139
1953 ATSUI code path should implement small caps, synthetic bold and oblique and correct metrics for fallback fonts
1955 * WebCoreSupport.subproj/WebTextRenderer.m:
1956 (overrideLayoutOperation): Fetch renderer info from the renderers array;
1957 add synthetic bold offset; render only synthetic bold in the synthetic bold pass.
1958 (drawGlyphs): Replaced 14 with new SYNTHETIC_OBLIQUE_ANGLE define.
1959 (initializeATSUStyle): Apply a skewing transform for synthetic oblique.
1960 (createATSUTextLayout): Merged into createATSUTextLayout.
1961 (createATSULayoutParameters): Merged in createATSUTextLayout; allocate
1962 and fill a renderers array and a character buffer for small caps and mirroring;
1963 (applyMirroringToRun): Merged into createATSULayoutParameters.
1964 (ATSU_drawHighlight): Deleted mirroring code.
1965 (ATSU_draw): Deleted mirroring code; added second pass for synthetic bold.
1966 (ATSU_pointToOffset): Deleted mirroring code.
1968 2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
1970 Reviewed by Darin, committed by Adele.
1972 Test: fast/text/atsui-kerning-and-ligatures.html
1974 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6137
1975 Disable kerning and some ligatures in the ATSUI code path
1977 * WebCoreSupport.subproj/WebTextRenderer.m:
1978 (initializeATSUStyle): Disable kerning; disable ligatures unless the font
1979 does not contain 'a', in which case it is assumed to never be rendered
1980 by the CG code path.
1982 2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
1984 Reviewed by Darin, committed by Adele.
1986 Test: fast/text/should-use-atsui.html
1988 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6132
1989 Incorrect selection highlighting for ATSUI text when selected range is "CG-safe"
1991 * WebCoreSupport.subproj/WebTextRenderer.m:
1992 (shouldUseATSU): Always start scanning from 0 since drawing and
1993 highlighting also measure everything up to run->from.
1995 2005-12-17 Maciej Stachowiak <mjs@apple.com>
1997 Rubber stamped by Eric.
1999 - remove some unused SPI headers.
2001 * DOM.subproj/WebDOMDocument.h: Removed.
2002 * DOM.subproj/WebDOMElement.h: Removed.
2003 * DOM.subproj/WebDOMNode.h: Removed.
2004 * WebKit.xcodeproj/project.pbxproj:
2006 2005-12-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
2008 Reviewed and landed by Darin.
2010 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5479
2011 Can't select text with RTL override rendered by ATSUI
2013 * WebCoreSupport.subproj/WebTextRenderer.m:
2014 (overrideLayoutOperation): Update since the layout only includes from -> to now.
2015 (-[WebTextRenderer pointToOffset:style:position:includePartialGlyphs:]): Remove
2017 (CG_floatWidthForRun): Add code to handle RTL case.
2018 (addDirectionalOverride): Put the override around the entire run.
2019 (ATSU_drawHighlight): Rearrange and reuse ATSU_floatWidthForRun for more of the work.
2021 (ATSU_pointToOffset): Remove reversed parameter and run swapping.
2022 (CG_pointToOffset): Remove reversed parameter, using rtl flag in style instead.
2024 2005-12-16 Evan Gross <evan@rainmakerinc.com>
2026 Reviewed and landed by Darin.
2028 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4680
2029 WebHTMLView (WebNSTextInputSupport) - attributedSubstringFromRange "not yet implemented"
2031 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView attributedSubstringFromRange:]):
2032 Implement by calling the same RTF conversion used when copying to the pasteboard.
2034 2005-12-16 Mitz Pettel <opendarwin.org@mitzpettel.com>
2036 Reviewed and landed by Darin.
2038 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6090
2039 REGRESSION: Assertion failure when choosing Copy from a WebImageView's contextual menu
2041 * WebView.subproj/WebImageView.m:
2042 (-[WebImageView elementAtPoint:]): Use WebCoreElementImageRendererKey
2043 for the image renderer and WebElementImageKey for the image.
2045 2005-12-15 Maciej Stachowiak <mjs@apple.com>
2049 - remove _frameForView: method from WebView and replace with a direct pointer on the WebFrameView in the WebFrame
2051 * Misc.subproj/WebNSViewExtras.m:
2052 * WebView.subproj/WebFrame.m:
2053 (-[WebFrame _detachFromParent]):
2054 (-[WebFrame _loadDataSource:withLoadType:formState:]):
2055 (-[WebFrame initWithName:webFrameView:webView:]):
2056 * WebView.subproj/WebFrameView.m:
2057 (-[WebFrameView _setWebFrame:]):
2058 (-[WebFrameView webFrame]):
2059 * WebView.subproj/WebFrameViewInternal.h:
2060 * WebView.subproj/WebView.m:
2061 * WebView.subproj/WebViewPrivate.h:
2063 2005-12-13 Maciej Stachowiak <mjs@apple.com>
2067 - remove the dead _frameForDataSource: method (WebDataSource now knows its WebFrame)
2068 http://bugzilla.opendarwin.org/show_bug.cgi?id=6072
2070 * WebView.subproj/WebView.m:
2071 * WebView.subproj/WebViewPrivate.h:
2073 === Safari-521~5 ===
2075 2005-12-12 Timothy Hatcher <timothy@apple.com>
2077 Reviewed by nobody, simple build fix.
2079 Fixes a couple ambiguous selector build errors when building with GCC 3.3.
2081 * Misc.subproj/WebIconDatabase.m:
2082 (-[WebIconDatabase releaseIconForURL:]):
2083 * WebView.subproj/WebHTMLView.m:
2084 (-[NSView _web_layoutIfNeededRecursive:testDirtyRect:]):
2085 (-[NSArray elementAtPoint:]):
2087 2005-12-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
2089 Reviewed and checked in by John Sullivan.
2091 Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=6053
2092 WebIconDatabase returns the Accessibility Verifier app icon instead of
2093 a generic document icon
2095 * Misc.subproj/WebIconDatabase.m:
2096 (-[WebIconDatabase _iconForFileURL:withSize:]):
2097 use file type iconForFileType:NSFileTypeForHFSTypeCode(kGenericDocumentIcon) instead of '????'
2098 to get the generic document icon.
2100 2005-12-12 John Sullivan <sullivan@apple.com>
2102 Reviewed by Tim Omernick.
2104 - Made protocol <WebDocumentSelection> include protocol <WebDocumentText>, for clarity.
2105 This required moving some methods from WebTextView, which conformed to <WebDocumentText>,
2106 up into superclass WebSearchableTextView, which conformed to <WebDocumentSelection>.
2108 * Misc.subproj/WebSearchableTextView.m:
2109 (-[NSString supportsTextEncoding]):
2110 moved this method (unchanged) from subclass WebTextView
2111 (-[NSString string]):
2113 (-[NSString attributedString]):
2115 (-[NSString selectedString]):
2117 (-[NSString selectedAttributedString]):
2119 (-[NSString selectAll]):
2121 (-[NSString deselectAll]):
2124 * WebView.subproj/WebDocumentPrivate.h:
2125 made <WebDocumentSelection> incorporate <WebDocumentText> rather than just <NSObject>
2126 * WebView.subproj/WebHTMLView.h:
2127 removed <WebDocumentText> from protocol list since it's covered by <WebDocumentSelection>
2128 * WebView.subproj/WebPDFView.h:
2130 * WebView.subproj/WebTextView.h:
2132 * WebView.subproj/WebTextView.m:
2133 removed the methods that were moved into WebSearchableTextView.m
2135 2005-12-10 Darin Adler <darin@apple.com>
2137 Reviewed by John Sullivan.
2139 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6032
2140 REGRESSION: Uncaught exception when image is dragged out of webpage
2142 * WebView.subproj/WebHTMLView.m:
2143 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
2144 Pass the image renderer, not the NSImage.
2145 (-[WebHTMLView elementAtPoint:]): Add an NSImage to the dictionary, which now comes from
2146 WebCore with only an image renderer.
2147 * WebView.subproj/WebView.m: (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
2148 Pass the image renderer, not the NSImage.
2150 2005-12-10 Darin Adler <darin@apple.com>
2152 Was getting build failures related to "count" methods.
2153 Made Tim's build fix Leopard-only.
2155 * WebView.subproj/WebPreferencesPrivate.h: Go back to <PDFKit/PDFKit.h> on Tiger.
2157 2005-12-09 John Sullivan <sullivan@apple.com>
2159 Reviewed by Adele Peterson.
2161 - fixed <rdar://problem/4373905> Cannot paste in Tiger Mail using TOT WebKit
2163 * WebView.subproj/WebView.m:
2164 (-[WebView _frameForCurrentSelection]):
2165 I removed this method many moons ago when restructuring the code involving frames and selection.
2166 Too bad Mail was still using it (d'oh!). In Leopard Mail has updated to use newer SPI (which should
2167 become API), but to continue to work with Mail on Tiger we need this method to be around. Now it's
2168 just a cover for the method _selectedOrMainFrame, to which it was renamed so very long ago.
2170 2005-12-09 Tim Omernick <timo@apple.com>
2172 Reviewed by John Sullivan.
2174 * Carbon.subproj/HIWebView.m:
2175 (UpdateCommandStatus):
2176 Don't call -performSelector:withObject: on a method that returns a BOOL; this is not guaranteed to work on all architectures.
2177 -performSelector:withObject:'s return value should only be checked if the method returns an object.
2179 2005-12-09 Timothy Hatcher <timothy@apple.com>
2181 Reviewed by nobody, build fix.
2183 Using <PDFKit/PDFKit.h> was causing build failures for the Mail team.
2184 The comment about getting an ambiguous signature conflict anywhere the
2185 method "count" is used seems to no longer be an issue.
2187 * WebView.subproj/WebPreferencesPrivate.h: Use <Quartz/Quartz.h>
2189 2005-12-08 John Sullivan <sullivan@apple.com>
2191 Reviewed by Tim Hatcher.
2193 Some cleanup of how selection rects are associated with NSViews.
2195 * WebView.subproj/WebDocumentPrivate.h:
2196 Added a -selectionView method to <WebDocumentSelection>, and clarified that the
2197 selectionRect is in the coordinate system of this view.
2199 * Misc.subproj/WebSearchableTextView.m:
2200 (-[WebSearchableTextView selectionView]):
2201 new method, returns self
2203 * WebView.subproj/WebHTMLView.m:
2204 (-[WebHTMLView selectionView]):
2205 new method, returns self
2207 * WebView.subproj/WebPDFView.m:
2208 (-[WebPDFView selectionRect]):
2209 translate result into coordinate system of [PDFSubview documentView]
2210 (-[WebPDFView selectionView]):
2211 new method, returns [PDFSubview documentView]
2213 2005-12-08 John Sullivan <sullivan@apple.com>
2215 Reviewed by Tim Omernick and Dave Hyatt.
2217 - fixed these semi-legendary bugs:
2218 <rdar://problem/4032405> Inline PDF doesn't get keyboard focus like web pages do, so can't scroll with keys without clicking
2219 <rdar://problem/4265684> PDFs use secondary selection when displaying found text (4748)
2221 * WebView.subproj/WebPDFView.m:
2222 (-[WebPDFView becomeFirstResponder]):
2223 Discovered that there is indeed PDFKit API for accessing the view that becomes focused; now
2224 passes the focus down to that view.
2226 2005-12-08 John Sullivan <sullivan@apple.com>
2228 Reviewed by Tim Omernick.
2230 - Added WebKit mechanism to help correctly pass the first responder into the PDF view hierarchy,
2231 in order to start addressing keyboard focus and selection highlight issues. Unfortunately this
2232 doesn't actually have any user effect yet due to problems that must be fixed in PDFKit.
2234 * WebView.subproj/WebPDFView.m:
2235 (-[WebPDFView acceptsFirstResponder]):
2236 Overridden to returns YES. Needed so NSClipView knows it's OK to pass focus down to this level.
2237 (-[WebPDFView becomeFirstResponder]):
2238 With setNextKeyView:, splices the PDF view into the focus-passing mechanism in much the same
2239 way as NSScrollView and NSClipView.
2240 (-[WebPDFView setNextKeyView:]):
2241 With becomeFirstResponder:, splices the PDF view into the focus-passing mechanism in much the same
2242 way as NSScrollView and NSClipView.
2243 (-[WebPDFView resignFirstResponder]):
2244 Removed this method because the WebPDFView itself is never first responder except transiently.
2246 2005-12-08 Maciej Stachowiak <mjs@apple.com>
2250 - some small changes towards frame tree refactoring
2252 Renamed WebViewSets to WebFrameNamespaces, and put the method for
2253 performing a selector on all extant WebViews to WebView itself,
2254 with a separate set tracking live WebViews. This should allow
2255 moving the storage of this info down to WebCore more easily.
2257 * WebCoreSupport.subproj/WebBridge.m:
2258 (-[WebBridge closeWindowSoon]):
2259 (-[WebBridge runModal]):
2260 * WebCoreSupport.subproj/WebViewFactory.m:
2261 (-[WebViewFactory refreshPlugins:]):
2262 * WebView.subproj/WebControllerSets.h:
2263 * WebView.subproj/WebControllerSets.m:
2264 (+[WebFrameNamespaces addWebView:toFrameNamespace:]):
2266 (+[WebFrameNamespaces webViewsInFrameNamespace:]):
2267 * WebView.subproj/WebView.m:
2268 (+[WebView _makeAllWebViewsPerformSelector:]):
2269 (-[WebView _removeFromAllWebViewsSet]):
2270 (-[WebView _addToAllWebViewsSet]):
2271 (-[WebView _close]):
2272 (-[WebView _findFrameNamed:sourceFrame:]):
2273 (-[WebView _commonInitializationWithFrameName:groupName:]):
2274 (-[WebView setGroupName:]):
2275 * WebView.subproj/WebViewInternal.h:
2277 2005-12-08 Darin Adler <darin@apple.com>
2281 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5689
2282 add support for CSS "custom cursors" (cursor images)
2284 * WebCoreSupport.subproj/WebImageRenderer.h: Remove declaration of TIFFRepresentation and
2285 image methods since both are required by the WebCoreImageRenderer protocol now and we don't
2286 have to re-declare them.
2288 * Misc.subproj/WebNSPasteboardExtras.m: Add an import of the WebCoreImageRenderer.h file
2289 since we need to use methods inherited from that protocol.
2290 * Misc.subproj/WebNSViewExtras.m: Ditto.
2291 * WebCoreSupport.subproj/WebImageRenderer.m: Ditto. (Use and implement.)
2293 2005-12-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
2295 Reviewed by Maciej, landed by Darin.
2297 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5878
2298 REGRESSION (WebTextRenderer.m r1.201): pointToOffset always takes the CG code path
2300 * WebCoreSupport.subproj/WebTextRenderer.m:
2301 (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]):
2302 Added the missing "return".
2304 2005-12-07 John Sullivan <sullivan@apple.com>
2306 Reviewed by Tim Omernick.
2308 - <rdar://problem/4331488> TOT Assertion failure in -[WebHTMLView nextValidKeyView]
2311 * WebView.subproj/WebHTMLView.m:
2312 (-[NSArray nextValidKeyView]):
2313 Removed assert that I added a while back. In this case at least, the assertion is
2314 overzealous, and I can't recreate the tortured chain of logic that led me to adding
2315 this assertion in the first place.
2317 2005-12-06 David Harrison <harrison@apple.com>
2321 - fix <rdar://problem/4365308> Glendale Regression: Floating dictionary doesn't work well in Safari text areas/fields
2323 Add use of NSAccessibilityHitTest to the list of exceptions.
2325 * WebView.subproj/WebHTMLView.m:
2326 (-[WebHTMLView hitTest:]): check for NSFlagsChanged event.
2328 2005-12-05 John Sullivan <sullivan@apple.com>
2330 Reviewed by Darin Adler.
2332 * WebView.subproj/WebHTMLView.m:
2333 (-[NSArray validateUserInterfaceItem:]):
2334 one more tweak: moved jumpToSelection: to be validated the same way as
2335 centerSelectionInVisibleArea:, since it now calls the same code. Might not
2336 make a difference in any real code, but you never know.
2338 2005-12-05 John Sullivan <sullivan@apple.com>
2340 Reviewed by Darin Adler.
2342 * WebView.subproj/WebHTMLView.m:
2343 (-[NSArray validateUserInterfaceItem:]):
2344 removed double handling of centerSelectionInVisibleArea
2346 2005-12-05 John Sullivan <sullivan@apple.com>
2348 Reviewed by Tim Omernick.
2350 - WebKit part of fix for
2351 <rdar://problem/4365690> Find > Jump to Selection does nothing on plain-text documents (inc. source HTML)
2353 * WebView.subproj/WebHTMLView.m:
2354 (-[WebHTMLView jumpToSelection:]):
2355 Reimplement jumpToSelection: to call centerSelectionInVisibleArea:, and added a comment explaining why
2356 jumpToSelection: exists at all. Note that centerSelectionInVisibleArea: was already implemented here; it
2357 was added as part of HTML editing implementation without us realizing that it was the API replacement
2358 for jumpToSelection:.
2359 (-[WebHTMLView validateUserInterfaceItem:]):
2360 validate centerSelectionInVisibleArea: the same way we validate jumpToSelection: (we should have done
2361 this when centerSelectionInVisibleArea: was implemented)
2363 * WebView.subproj/WebPDFView.m:
2364 (-[WebPDFView centerSelectionInVisibleArea:]):
2365 new method, same code that jumpToSelection: used to have
2366 (-[WebPDFView jumpToSelection:]):
2367 now calls centerSelectionInVisibleArea:, and there's now a comment about why it exists at all.
2368 (-[WebPDFView validateUserInterfaceItem:]):
2369 validate centerSelectionInVisibleArea: the same way we validate jumpToSelection:
2371 2005-12-04 Tim Omernick <timo@apple.com>
2373 Reviewed by Dave Harrison, John Sullivan.
2375 <rdar://problem/4364847> REGRESSION: QuickTime movies open without controller or don't open at all (5928)
2377 I changed WebFrameView on 2005-11-29 so that it avoids creating duplicate WebPluginDocumentViews.
2378 Unfortunately, this change caused a regression due to the fact that it subtly changed when plugins are
2379 initialized. Certain plugins (e.g. QuickTime) expect to be initialized after the WebPluginDocumentView
2380 has been "committed" (inserted into the view hierarchy).
2382 My fix is to ensure that the plugin is initialized where we previously would have created that second
2383 WebPluginDocumentView -- that is, the plugin is created after the WebPluginDocumentView has been committed.
2385 * Plugins.subproj/WebPluginDocumentView.m:
2386 (-[WebPluginDocumentView setDataSource:]):
2387 Don't initialize the plugin if the WebPluginDocumentView has not been inserted into the view hierarchy.
2388 We assume here that a later call to -setDataSource: will pass this conditional, once the WebDocumentView
2391 2005-12-02 Justin Garcia <justin.garcia@apple.com>
2393 <rdar://problem/4345030>
2394 Denver REGRESSION (10.4.2-10.4.3): Two identical warnings on "Back" from Amazon's package tracker
2396 Before checking the navigation policy for a request, the request is compared
2397 against the last checked request. If the two are the same, no check is done.
2398 In the bug, the two requests are identical except for the boolean on
2399 NSURLRequests that tells Foundation to support multipart loads for that request.
2400 One request was the one that was used to start servicing "Back" operation, and
2401 the second was being used to start loading the page (it needed to be reloaded
2402 because it was the result of a form submission). Set the boolean on all
2403 NSURLRequests, not just one's that are about to be used to start a load.
2405 Reviewed by harrison
2407 * WebView.subproj/WebDataSource.m:
2408 (-[WebDataSource _startLoading:]):
2409 (-[WebDataSource initWithRequest:]):
2410 * WebView.subproj/WebDataSourcePrivate.h:
2412 2005-12-01 Darin Adler <darin@apple.com>
2416 - fix <rdar://problem/4349721> Regression: Hovering over menu item doesn't highlight menu item or
2417 mousing up on menu item in applet does not open URL in new window at smartmoney.com
2419 Since Java depends on doing a hit test inside it's mouse moved handling, let hit testing on Java
2420 applets go through the standard NSView code path. Since this should only happen for Java, add a global
2421 so that we can Use our own WebHTMLView hit testing when calling from _updateMouseoverWithEvent.
2423 * WebView.subproj/WebHTMLView.m:
2424 (-[WebHTMLView _hitViewForEvent:]): rename forceRealHitTest to forceNSViewHitTest
2425 (-[WebHTMLView _updateMouseoverWithEvent:]): set global variable to force a WebHTMLView-style hit test from here
2426 (-[WebHTMLView hitTest:]): perform the appropriate hit test based on global variables
2428 2005-11-29 Andrew Wellington <proton@wiretapped.net>
2430 Reviewed by darin. Committed by eseidel.
2432 Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=4726
2433 Drop of multiple non-image file URLs only yields one item
2435 * WebView.subproj/WebHTMLView.m:
2436 (-[WebHTMLView _documentFragmentWithPaths:]):
2438 2005-11-29 Tim Omernick <timo@apple.com>
2440 Reviewed by John Sullivan, Eric Seidel
2442 <rdar://problem/4340787> Safari & Dashcode create 2 instances of the QC plug-in
2444 * WebView.subproj/WebFrameView.m:
2445 (-[WebFrameView _makeDocumentViewForDataSource:]):
2446 Instead of creating a new WebDocumentView, use the WebDataSource's representation if it is a WebDocumentView
2447 of the appropriate class. Right now, this can only happen when the loading document is a standalone WebKit
2448 plugin, because WebPluginDocumentView is both the WebDocumentView and the WebDocumentRepresentation for that
2451 I have verified that this does not affect other kinds of page loads; in all other cases, the representation
2452 class is distinct from the document view class.
2454 I talked with Chris Blumenberg about this change (he knows this code), and he agreed that this is the right
2457 2005-11-28 Alexey Proskuryakov <ap@nypop.com>
2459 Reviewed by Darin. Committed by Maciej.
2461 - fixed "Word completion doesn't work at end of word (unless last word)"
2462 (http://bugzilla.opendarwin.org/show_bug.cgi?id=4062)
2464 * WebView.subproj/WebHTMLView.m:
2465 (-[WebTextCompleteController doCompletion]):
2467 2005-11-28 John Sullivan <sullivan@apple.com>
2469 Reviewed by Tim Omernick.
2471 Probable fix for <rdar://problem/4356060> crash in -[WebHistoryItem _mergeAutoCompleteHints:]
2473 * History.subproj/WebHistory.m:
2474 (-[WebHistoryPrivate addItem:]):
2475 retain/release oldEntry until we're done with it, since removing it from dictionary might
2476 cause it to be dealloc'ed otherwise.
2478 * History.subproj/WebHistoryItem.m:
2479 (-[WebHistoryItem _mergeAutoCompleteHints:]):
2482 2005-11-26 Alexey Proskuryakov <ap@nypop.com>
2484 Reviewed by mjs. Committed by eseidel.
2486 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5230
2487 "characterIndexForPoint: not yet implemented"
2489 * WebView.subproj/WebHTMLView.m:
2490 (-[WebHTMLView characterIndexForPoint:]):
2491 (-[WebHTMLView firstRectForCharacterRange:]):
2493 2005-11-22 Darin Adler <darin@apple.com>
2495 * WebView.subproj/WebView.h: Fixed incorrect comment in public header.
2497 2005-11-18 Vicki Murley <vicki@apple.com>
2499 Changes by Tim H, reviewed by Vicki.
2501 - call shouldClose on the bridge for the main frame
2503 * WebView.subproj/WebView.m:
2504 (-[WebView shouldClose]):
2506 2005-11-18 Vicki Murley <vicki@apple.com>
2508 Changes by Darin, reviewed by Beth and Vicki.
2510 - fix <rdar://problem/3939265> support "before unload" event and onbeforeunload handler (supported by both IE and Mozilla)
2512 * WebCoreSupport.subproj/WebBridge.m:
2513 (-[WebBridge canRunBeforeUnloadConfirmPanel]):
2514 (-[WebBridge runBeforeUnloadConfirmPanelWithMessage:]):
2515 * WebView.subproj/WebFrame.m:
2516 (-[WebFrame _checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
2517 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
2518 * WebView.subproj/WebUIDelegatePrivate.h:
2519 * WebView.subproj/WebView.m:
2520 (-[WebView shouldClose]):
2521 * WebView.subproj/WebViewPrivate.h:
2523 2005-11-10 Maciej Stachowiak <mjs@apple.com>
2525 Build fix, not reviewed.
2527 * Plugins.subproj/WebBaseNetscapePluginViewInternal.h: Added.
2529 2005-11-10 Tim Omernick <timo@apple.com>
2533 <rdar://problem/4237941> Dashboard needs a way to stop Netscape plug-ins from getting null events
2535 * Plugins.subproj/WebBaseNetscapePluginViewInternal.h: Added.
2536 Added WebInternal category, with -stopNullEvents and -restartNullEvents. These methods already exist on WebBaseNetscapePluginView.
2537 I am just exposing them to callers elsewhere within WebKit.
2539 * WebKit.xcodeproj/project.pbxproj:
2540 Added WebBaseNetscapePluginViewInternal.h.
2542 * WebView.subproj/WebFrame.m:
2543 (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
2544 Walks down the web frame hierarchy and calls -_pauseNullEventsForAllNetscapePlugins on each WebHTMLView.
2545 (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
2546 Same as above, but calls -_resumeNullEventsForAllNetscapePlugins.
2548 * WebView.subproj/WebFramePrivate.h:
2549 Declared -_recursive_pauseNullEventsForAllNetscapePlugins and -_recursive_pauseNullEventsForAllNetscapePlugins.
2551 * WebView.subproj/WebHTMLView.m:
2552 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
2553 Checks subviews for WebBaseNetscapePluginViews, and calls -stopNullEvents on them.
2554 (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
2555 Same as above, but calls -restartNullEvents.
2557 * WebView.subproj/WebHTMLViewInternal.h:
2558 Declared -_pauseNullEventsForAllNetscapePlugins and -_resumeNullEventsForAllNetscapePlugins.
2560 2005-11-07 Geoffrey Garen <ggaren@apple.com>
2562 Darin reviewed this a while back.
2564 - Fixed <rdar://problem/4161660> window.close followed by window.print
2565 in onload handler crashes Safari in KJS::ScopeChain::bottom
2566 (redmccombstoyota.com)
2568 Added a call to stopLoading inside closeWindowSoon to prevent load
2569 events from firing after a window has torn down.
2571 Manual test case: WebCore/manual-tests/window-close-during-parsing.html
2573 * WebCoreSupport.subproj/WebBridge.m:
2574 (-[WebBridge closeWindowSoon]):
2576 2005-11-03 Timothy Hatcher <timothy@apple.com>
2578 Reviewed by Darin and Vicki.
2580 * WebKit.xcodeproj/project.pbxproj:
2581 Change to use $(SYSTEM_LIBRARY_DIR) consistently and place
2582 $(NEXT_ROOT) in a few spots to make build-root work.
2584 2005-11-01 Tim Omernick <timo@apple.com>
2586 Reviewed by John Sullivan.
2588 <rdar://problem/4318632>
2590 I've added a new notification, WebPluginWillPresentNativeUserInterfaceNotification. Plugins are expected to post this
2591 notification before presenting "native UI", such as dialog boxes. A Dashboard client can observe this notification to
2592 hide the Dashboard layer when plugins present external UI.
2594 * English.lproj/StringsNotToBeLocalized.txt:
2595 Added "WebPluginWillPresentNativeUserInterface".
2597 * Plugins.subproj/WebPluginsPrivate.h: Added.
2598 * Plugins.subproj/WebPluginsPrivate.m: Added.
2599 Declare WebPluginWillPresentNativeUserInterfaceNotification.
2601 * WebKit.xcodeproj/project.pbxproj:
2602 Added WebPluginsPrivate.[hm]
2605 Added _WebPluginWillPresentNativeUserInterfaceNotification.
2607 2005-11-01 John Sullivan <sullivan@apple.com>
2609 Reviewed by Darin Adler.
2611 fixed deployment build by hiding local variables used only in ASSERTs on builds for
2612 which ASSERT_DISABLED is true.
2614 * History.subproj/WebHistory.m:
2615 (-[WebHistoryPrivate removeItemForURLString:]):
2616 (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]):
2618 2005-11-01 John Sullivan <sullivan@apple.com>
2620 Reviewed by Tim Omernick.
2622 - fixed <rdar://problem/4324104> Assertion failure (foundDate) in WebHistory
2624 WebFrame was updating the last visited date on a WebHistoryItem behind WebHistory's
2625 back, causing WebHistory's caches of items by date to get out of sync with reality.
2626 Changed to set the date through WebHistory rather than directly.
2628 * History.subproj/WebHistory.m:
2629 (-[WebHistoryPrivate _removeItemFromDateCaches:]):
2630 New method, extracted from removeItemForURLString.
2631 (-[WebHistoryPrivate removeItemForURLString:]):
2632 Now calls extracted method. Cleaned up white space a little.
2633 (-[WebHistoryPrivate _addItemToDateCaches:]):
2634 New method, extracted from addItem:
2635 (-[WebHistoryPrivate addItem:]):
2636 Now calls extracted method. Cleaned up white space a little.
2637 (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]):
2638 New method, removes item from date caches, changes date, then adds item back to
2639 date caches and sends notification.
2640 (-[WebHistory setLastVisitedTimeInterval:forItem:]):
2641 New method, cover for WebHistoryPrivate version.
2643 * History.subproj/WebHistoryItem.m:
2644 (-[WebHistoryItem _setLastVisitedTimeInterval:]):
2645 Don't send notification here; send from new WebHistory method instead.
2647 * History.subproj/WebHistoryItemPrivate.h:
2648 Added comment about avoiding incorrect use of _setLastVisitedTimeInterval:
2649 * History.subproj/WebHistoryPrivate.h:
2650 Added declarations for WebHistory and WebHistoryPrivate versions of
2651 setLastVisitedTimeInterval:forItem:
2653 * WebView.subproj/WebFrame.m:
2654 (-[WebFrame _transitionToCommitted:]):
2655 change history item's date via new WebHistory method rather than directly
2657 2005-10-25 Timothy Hatcher <timothy@apple.com>
2661 Remove the use of a stamp file in the Frameworks symlink build phase.
2662 This lets us pass the build verification.
2664 * WebKit.xcodeproj/project.pbxproj:
2666 2005-10-24 Darin Adler <darin@apple.com>
2670 - change internal methods in WebTextRenderer to be functions in case this
2671 has any effect on speed (also makes things a bit clearer, in my opinion)
2673 * WebCoreSupport.subproj/WebTextRenderer.h: Made all fields public, which is
2674 OK since this is really a private class. Made setAlwaysUseATSU: class method
2675 public too for the same reason.
2677 * WebCoreSupport.subproj/WebTextRenderer.m: Change all methods to functions.
2678 (destroy): Function name for method free.
2679 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]): Removed code to first subtract
2680 lineSpacing - descent, then later add it back.
2681 (getSmallCapsRenderer): Function name for method smallCapsRenderer.
2682 (findSubstituteFont): Function name for method substituteFontForString:families:.
2683 (findSubstituteRenderer): Function name for method substituteRendererForCharacters:length:families:.
2684 (updateGlyphMapEntry): Function name for method updateGlyphEntryForCharacter:glyphID:substituteRenderer:.
2685 (extendGlyphMap): Function name for method extendCharacterToGlyphMapToInclude:.
2686 (extendWidthMap): Function name for method extendGlyphToWidthMapToInclude:.
2687 (getTextBounds): Function name for method trapezoidForRun:style:atPoint:.
2689 2005-10-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
2691 Reviewed by Darin. Committed by David Harrison.
2693 http://bugzilla.opendarwin.org/show_bug.cgi?id=5415
2694 "Left border of selection highlight leaves behind a trail"
2696 * manual-tests/drag_select_highlighting.html: Added.
2697 (this test case was added to WebCore)
2699 * WebCoreSupport.subproj/WebTextRenderer.m:
2700 (overrideLayoutOperation):
2701 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]):
2702 (-[WebTextRenderer ATSU_drawHighlightForRun:style:geometry:]):
2703 (advanceWidthIterator):
2706 2005-10-23 Tim Omernick <tomernick@apple.com>
2708 Reviewed by Dave Hyatt.
2710 <http://bugzilla.opendarwin.org/show_bug.cgi?id=5365>
2712 Send -webPlugInStop (or -pluginStop) and -webPluginDestroy (or -pluginDestroy)
2713 to complying plugins right when they're removed from the WebHTMLView, and also
2714 release them from the plugin controller's arrays.
2716 I think this patch makes WebKit behave more like plugins expect it to, which is
2717 the way it already behaves with Netscape plugins.
2719 I expect complying plugins to stop making noise when receiving the stop
2720 message, but QuickTime doesn't. If it's lucky, then it will be deallocated
2721 because of the release and will stop then. However, JS, for one, can retain the
2722 plugin (e.g. if you execute <javascript:document.getElementById('obj').width;>
2723 before clicking Remove OBJECT), in which case it will just keep playing.
2725 * Plugins.subproj/WebPluginController.h:
2726 * Plugins.subproj/WebPluginController.m:
2727 (-[WebPluginController destroyPlugin:]):
2728 Stop and destroy the plugin.
2729 * WebView.subproj/WebHTMLView.m:
2730 (-[NSArray willRemoveSubview:]):
2731 Destroy plugins when they are removed from the HTML view.
2733 2005-10-23 Geoffrey Garen <ggaren@apple.com>
2737 For better abstraction, made the tokenizer -- instead of the
2738 data source -- responsible for calling [WebFrame _checkLoadComplete]
2739 when the tokenizer stops.
2741 * WebView.subproj/WebDataSource.m:
2742 (-[WebDataSource _stopLoadingInternal]):
2744 2005-10-21 Geoffrey Garen <ggaren@apple.com>
2748 WebKit side of the fix for <rdar://problem/4184719> window.print() followed by
2749 window.close() causes world leak
2751 No test case added because I have another reviewed patch that will include a test
2752 for this bug as well as many others.
2754 Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading]
2755 to false, so the didFInishLoad delegates never fired.
2757 The reason isLoading didn't become false was that the tokenizer was still running.
2758 The fix here is to move the call to [WebCoreBridge stopLoading] above the early return
2759 inside [WebDataSource stopLoading] -- since the tokenizer may still be running even if the
2760 loader is finished loading -- and then to call [WebFrame _checkLoadComplete] to
2761 give the frame a chance to fire its delegates.
2763 * WebView.subproj/WebDataSource.m:
2764 (-[WebDataSource _stopLoadingInternal]):
2766 2005-10-21 Beth Dakin <bdakin@apple.com>
2770 Fix for <rdar://problem/3853672> Malformed HTML using crashes Safari in NSFireTimer
2772 The webFrame was being deleted prematurely by a call to stop(), so we changed it
2773 so that the calls to _receivedMainResourceError and _mainReceivedError happen
2774 before the stop(), and we retain the bridge.
2776 * WebView.subproj/WebDataSource.m:
2777 (-[WebDataSource _receivedMainResourceError:complete:]):
2779 2005-10-21 Geoffrey Garen <ggaren@apple.com>
2781 Patch by TimO, Reviewed by hyatt, tested and landed by me.
2783 Found what appears to be a misguided optimization that actually causes a measurable performance problem.
2784 A fixed-size buffer was allocated on the stack to pass into CFURLGetBytes(), presumably to avoid malloc()
2785 for URLs less than 2048 bytes. There was also a fallback which malloc()'ed a buffer in case the fixed-size
2786 buffer was too small to hold the URL's bytes. This malloc()'ed buffer was then wrapped in an NSData using
2787 +dataWithBytesNoCopy:length:, avoiding a memory copy (yay!)
2789 The problem with this approach is two-fold:
2791 1. Regardless of how the buffer was allocated and filled, it is immediately wrapped in an NSData using
2792 +dataWithBytes:length:, which copies the input bytes. This is pretty much unavoidable; we need to get
2793 the data into a malloc()'ed buffer to return it to the caller, unless the caller provides its own storage
2794 (which would be super inconvenient).
2796 2. The size of the fixed buffer was large enough that it fit most (if not all) URLs involved in our Page
2797 Load Test. This means the unintentionally-inefficient case was by far the most *common* case!
2799 My fix is to malloc() the buffer from the start, and then use +[NSData dataWithBytes:length:freeWhenDone:]
2800 to wrap the buffer in an NSData. This avoids a memory copy for the normal case where a URL is less than
2801 2048 bytes, and keeps the efficient behavior for the uncommon long URL case.
2803 * Misc.subproj/WebNSURLExtras.m:
2804 (-[NSURL _web_originalData]):
2806 2005-10-21 Mitz Pettel <opendarwin.org@mitzpettel.com>
2808 Reviewed and landed by Darin.
2810 - fixed a couple regressions caused by my last check-in
2811 http://bugzilla.opendarwin.org/show_bug.cgi?id=5437
2812 http://bugzilla.opendarwin.org/show_bug.cgi?id=5443
2814 * WebCoreSupport.subproj/WebTextRenderer.m:
2815 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]): Compute background width
2816 correctly, by subtracting position after run from position before run.
2817 (addDirectionalOverride): Make the range include only the characters between the
2818 directional override characters, not the directional override characters themselves.
2819 (initializeWidthIterator): Correctly compute "widthToStart" based on the offset to
2820 the beginning of the run, not to the end of the run!
2822 2005-10-19 Darin Adler <darin@apple.com>
2826 - optimizations for a total of about 1% speed-up on PLT
2828 * WebCoreSupport.subproj/WebTextRenderer.h: Updated to use bool instead of BOOL,
2829 since BOOL is a signed char (which is not so efficient, at least on PPC).
2830 * WebCoreSupport.subproj/WebTextRenderer.m:
2831 (isSpace): Changed BOOL to bool and UniChar to UChar32. This actually fixes a
2832 potential bug when the passed-in character is a non-BMP character (> FFFF).
2833 (isRoundingHackCharacter): Ditto.
2834 (widthForGlyph): Merged getUncachedWidth, widthFromMap, and widthForGlyph into
2835 one function. Marked it inline. Changed to include syntheticBoldOffset in the
2836 cached widths to save an add in the cached case. Instead of the special constant
2837 UNINITIALIZED_GLYPH_WIDTH, just check for a width >= 0. This allows us to use
2838 a negative number or NAN for the uninitialized width value -- I chose NAN.
2839 (overrideLayoutOperation): Use bool instead of Boolean in one place.
2840 (-[WebTextRenderer initWithFont:]): Use lroundf instead of ROUND_TO_INT.
2841 (-[WebTextRenderer floatWidthForRun:style:]): Put the code to choose the ATSU
2842 vs. CG code path back in here, because there are no callers inside the class
2843 that need to call both.
2844 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
2845 Use bool instead of BOOL.
2846 (+[WebTextRenderer setAlwaysUseATSU:]): Ditto.
2847 (fontContainsString): Ditto.
2848 (-[WebTextRenderer computeWidthForSpace]): Ditto. Also use roundf instead of
2850 (-[WebTextRenderer setUpFont]): Use bool instead of BOOL.
2851 (drawGlyphs): Ditto.
2852 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]): Restructure the
2853 code so it can use the new advanceWidthIterator function instead of the old
2854 widthForNextCharacter function.
2855 (-[WebTextRenderer CG_drawRun:style:geometry:]): Use malloc instead of calloc
2856 since we don't need initialization. Call CG_floatWidthForRun instead of
2857 floatWidthForRun -- no need to re-check whether to use the CG or ATSU code path.
2858 Removed code to handle a renderer of 0 since we no longer generate that in
2859 the renderers array in advanceWidthIterator.
2860 (CG_floatWidthForRun): Changed to call the new advanceWidthIterator instead of
2861 the old widthForNextCharacter.
2862 (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]): Use malloc instead of
2863 calloc and explicitly initialize the one field that needs it. Fixed a potential
2864 storage leak by adding a call to WKClearGlyphVector. Initialize the renderers
2865 to self instead of to 0.
2866 (-[WebTextRenderer extendGlyphToWidthMapToInclude:]): Initialize the widths to
2867 NAN instead of UNINITIALIZED_GLYPH_WIDTH.
2868 (addDirectionalOverride): Fixed bug where the first and last character in the buffer
2869 could be uninitialized and where characters before and after the direction override
2871 (-[WebTextRenderer ATSU_drawRun:style:geometry:]): Use bool instead of BOOL.
2872 (-[WebTextRenderer ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2874 (advanceWidthIteratorOneCharacter): Added new helper function for CG_pointToOffset.
2875 (-[WebTextRenderer CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2876 Reimplemented to use advanceWidthIteratorOneCharacter instead of widthForNextCharacter.
2877 Also call CG_floatWidthForRun instead of floatWidthForRun since we don't need to
2878 reconsider whether to use CG or ATSU.
2879 (glyphForCharacter): Removed the map parameter and changed the renderer parameter to
2880 be an in-out one. Removed uneeded special case for when map is 0 and always get the
2881 renderer from the map. Also call extendCharacterToGlyphMapToInclude in here instead of
2882 making that the caller's responsibility.
2883 (initializeWidthIterator): Renamed to make the name shorter (removed "Character").
2884 Streamlned common cases like "no padding" and removed some unneeded casts. Changed to
2885 use advanceWidthIterator to compute width fo the first part of the run.
2886 (normalizeVoicingMarks): Factored this out into a separate function, since it's not part
2888 (advanceWidthIterator): Changed widthForNextCharacter to this, eliminating per-character
2889 function overhead for iterating past a few characters. Merged the handling of surrogate
2890 pairs and of voicing marks so that we typically only have to do one "if" to rule out both.
2891 Merged the mirroring for RTL and uppercasing for small caps into a single boolean so that
2892 we only need one "if" to rule out both. Call the new glyphForCharacter. Check for the
2893 character '\t' first since that's cheaper than looking at tabWidth. Check tabWidth for 0
2894 first so that we don't have to convert it to floating point when not using it. Changed
2895 the special case for spaces to first check width, so that we don't bother with the rest
2896 of the code for glyphs not the same width as spaces. Fixed substitution code to call
2897 CG_floatWidthForRun -- no need to reconsider whether to use CG or ATSU. Also changed to
2898 properly get width from the result of that function. Merged the handling of letter spacing,
2899 padding, and word spacing into a single boolean so that we typically only have to do one
2900 "if" to rule out all three. Check for letterSpacing of 0 first so that we don't have to
2901 convert it to floating point when not using it. Same for padding and wordSpacing.
2902 Move the work from ceilCurrentWidth in line into this function. Assume that either we have
2903 all three pointers (widths, renderers, glyphs), or none of the three, to cut down on branches.
2904 (fillStyleWithAttributes): Use bool instead of BOOL.
2905 (shouldUseATSU): Ditto.
2907 * Misc.subproj/WebKitNSStringExtras.m: (-[NSString _web_widthWithFont:]): Update since
2908 the floatWidthForRun method no longer takes a widths parameter.
2909 * Misc.subproj/WebStringTruncator.m: (stringWidth): Ditto.
2911 2005-10-19 Tim Omernick <tomernick@apple.com>
2913 Reviewed by eseidel & darin.
2915 Changed some of the run measurement methods to C functions
2916 to avoid overhead associated with objc_msgSend().
2918 * WebCoreSupport.subproj/WebTextRenderer.m:
2919 (-[WebTextRenderer floatWidthForRun:style:widths:]):
2920 Updated to call new run measurement functions instead
2921 of calling ObjC methods.
2922 (-[WebTextRenderer CG_drawRun:style:geometry:]): ditto
2923 (floatWidthForRun): ditto
2924 (CG_floatWidthForRun): ditto
2925 (ATSU_floatWidthForRun): ditto
2926 (widthForNextCharacter): ditto
2928 2005-10-14 Vicki Murley <vicki@apple.com>
2930 Changes by Mitz Pettel, reviewed by Maciej.
2932 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5029 (Assertion failure in -[NSPasteboard(WebExtras)
2933 _web_writeImage:URL:title:archive:types:] when trying to drag an image from a site with no favicon)
2935 * Misc.subproj/WebNSPasteboardExtras.m:
2936 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]): Prefer the main resource if it is an image
2938 2005-10-12 Vicki Murley <vicki@apple.com>
2942 - fix <rdar://problem/4043643> iframe swallows events for overlapping elements (3449)
2944 * WebView.subproj/WebHTMLView.m:
2945 (-[WebHTMLView hitTest:]):
2946 (-[WebHTMLView _updateMouseoverWithEvent:]): eliminate _hitViewForEvent hackery and self
2947 dependency from this function
2949 2005-10-12 Timothy Hatcher <timothy@apple.com>
2953 Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
2954 Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
2956 * WebView.subproj/WebDefaultResourceLoadDelegate.m:
2957 (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
2958 * WebView.subproj/WebFrame.m:
2959 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
2960 * WebView.subproj/WebLoader.m:
2961 (-[NSURLProtocol didReceiveData:lengthReceived:]):
2962 * WebView.subproj/WebResourceLoadDelegate.h:
2963 * WebView.subproj/WebUIDelegate.h:
2964 * WebView.subproj/WebView.h:
2965 * WebView.subproj/WebView.m:
2966 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
2967 (-[WebView spellCheckerDocumentTag]):
2968 * WebView.subproj/WebViewInternal.h:
2969 * WebView.subproj/WebViewPrivate.h:
2971 2005-10-12 Darin Adler <darin@apple.com>
2973 * WebView.subproj/WebPolicyDelegate.h: Fix a comment.
2975 2005-10-11 Timothy Hatcher <timothy@apple.com>
2979 Test for 10.4 because of <rdar://problem/4243463>
2981 * WebView.subproj/WebHTMLView.m:
2982 (-[WebHTMLView conversationIdentifier]):
2984 2005-10-11 Adele Peterson <adele@apple.com>
2986 Rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
2989 REGRESSION text areas draw focus ring around each glyph, no caret in text fields
2990 http://bugzilla.opendarwin.org/show_bug.cgi?id=5335
2992 * WebView.subproj/WebHTMLView.m:
2993 (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
2994 (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2995 (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
2997 2005-10-09 Darin Adler <darin@apple.com>
3001 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
3002 Would like API to flush rendering of pending DOM changes
3004 This was actually a Tiger regression. When AppKit added a new code path for rendering
3005 NSView, our special hack for doing layout when we draw didn't work any more. So we
3006 were able to fix this without adding any API.
3008 * WebView.subproj/WebHTMLView.m:
3009 (-[WebHTMLView _recursiveDisplayRectIgnoringOpacity:inContext:topView:]): Added.
3010 Does the same thing that other _recursiveDisplay methods do.
3012 2005-10-08 Alexey Proskuryakov <ap@nypop.com>
3016 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5187
3017 UTF-8 in long text files breaks at some point
3019 * WebView.subproj/WebTextRepresentation.m:
3020 (-[WebTextRepresentation finishedLoadingWithDataSource:]):
3021 Call flushReceivedData on the WebTextView so it can decode any final bytes.
3023 * WebView.subproj/WebTextView.h: Added WebCoreTextDecoder field and flushReceivedData method.
3024 * WebView.subproj/WebTextView.m:
3025 (-[WebTextView dealloc]): Release WebCoreTextDecoder.
3026 (-[WebTextView appendReceivedData:fromDataSource:]): Create a WebCoreTextDecoder to decode
3027 the text; use the textEncodingName from the data source. Use it to decode instead of the
3028 data source's stringWithData.
3029 (-[WebTextView flushReceivedData]): Call flush on the decoder and append any last bytes to
3032 2005-10-07 John Sullivan <sullivan@apple.com>
3034 Reviewed by Tim Omernick.
3036 WebKit support for allowing clients to know which frame originated a particular JavaScript alert/dialog.
3038 * WebView.subproj/WebUIDelegatePrivate.h:
3039 New optional delegate methods for the three JavaScript alert/dialogs. These are just like the existing
3040 ones in WebUIDelegate.h except that each adds a parameter specifying the frame that the JavaScript was
3041 running in. Eventually we'll deprecate the old three methods in favor of these in the public API.
3043 * WebCoreSupport.subproj/WebBridge.m:
3044 (-[WebBridge runJavaScriptAlertPanelWithMessage:]):
3045 Call version of the delegate method that has the frame parameter if the delegate supports it.
3046 (-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
3048 (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
3051 * WebView.subproj/WebDefaultUIDelegate.m:
3052 (-[WebDefaultUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
3053 Now implements the new version of the delegate method that includes the frame parameter. (Still
3054 doesn't do anything though.)
3055 (-[WebDefaultUIDelegate webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:]):
3056 Now implements the new version of the delegate method that includes the frame parameter. (Still
3057 doesn't do anything though.)
3058 (-[WebDefaultUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):
3059 Now implements the new version of the delegate method that includes the frame parameter. Doesn't
3060 actually use the frame parameter here yet though.
3062 2005-10-06 Darin Adler <darin@apple.com>
3064 - fixed compiling on Deployment
3066 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer initWithFont:]):
3067 Put initialFont inside !LOG_DISABLED.
3069 2005-10-06 Darin Adler <darin@apple.com>
3073 - tweaked formatting
3075 * WebCoreSupport.subproj/WebTextRenderer.m: Changed function names to remove underscores;
3076 fixed formatting to match our coding guidelines, other related tweaks.
3078 2005-10-06 Darin Adler <darin@apple.com>
3082 - fixed regression in drawing of text in non-flipped contexts from my last check-in
3084 * WebCoreSupport.subproj/WebTextRenderer.m:
3085 (drawGlyphs): Only flip the matrix if the NSGraphicsContext is flipped.
3086 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use -[NSGraphicsContext isFlipped]
3087 instead of [[NSView focusView] isFlipped].
3089 2005-10-06 Darin Adler <darin@apple.com>
3093 - fixed <rdar://problem/3217793> Monaco bold comes out as Helvetica bold, very bad if you choose Monaco as your fixed-width font
3094 - fixed <rdar://problem/3256269> CSS1: bold/italic font styles not programmatically created if font doesn't include them (3231)
3095 also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3231>
3097 * WebCoreSupport.subproj/WebTextRenderer.h: Removed public declarations of private structures that are not
3098 used in the header. Removed the separate 16-bit character map; the difference in code size is only a few
3099 bytes per page and there's no measurable performance difference by always using the 32-bit character version.
3100 Removed substitute font width maps altogether, since we now use the width map in the substitute font's renderer.
3101 Also removed a few more now-unused fields and methods. Changed initWithFont to take WebCoreFont. Changed
3102 the setAlwaysUseATSU: method to remove the underscore prefix.
3104 * WebCoreSupport.subproj/WebTextRenderer.m:
3105 (getUncachedWidth): Get font from WebCoreFont directly instead of taking a parameter, since we now use only
3106 one NSFont per WebTextRenderer.
3107 (widthFromMap): Removed NSFont parameter for same reason as above; simplified.
3108 (widthForGlyph): Ditto.
3109 (overrideLayoutOperation): Updated for change to WebCoreFont.
3110 (-[WebTextRenderer initWithFont:]): Changed to use WebCoreFont. Removed code to deal with substitute font maps.
3111 Changed lineGap computation to use floats instead of doubles. Added code to compute a synthetic bold offset.
3112 Currently this is the font size divided by 24 and then rounded up to an integer.
3113 (-[WebTextRenderer dealloc]): Updated for change to WebCoreFont and other related changes.
3114 (-[WebTextRenderer finalize]): Ditto.
3115 (-[WebTextRenderer xHeight]): Ditto.
3116 (-[WebTextRenderer drawRun:style:geometry:]): Remove small caps case here; no longer needed. Also updated as above.
3117 (-[WebTextRenderer floatWidthForRun:style:widths:]): Ditto.
3118 (-[WebTextRenderer drawHighlightForRun:style:geometry:]): Ditto.
3119 (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]): Ditto.
3120 (+[WebTextRenderer setAlwaysUseATSU:]): Renamed to remove underscore prefix.
3121 (-[WebTextRenderer smallCapsRenderer]): Ditto. Changed to create a renderer for the smaller sized font.
3122 (-[WebTextRenderer _substituteFontForString:families:]): Reorganized this to be more readable and to call
3123 the new rendererForAlternateFont method.
3124 (-[WebTextRenderer rendererForAlternateFont:]): Added. Used to select an alternate font taking into account
3125 bold and italic synthesis.
3126 (-[WebTextRenderer substituteRendererForCharacters:length:families:]): Renamed to remove underscore prefix.
3127 Updated to use rendererForAlternateFont.
3128 (-[WebTextRenderer _computeWidthForSpace]): Updated for name changes and to remove unnecessary parameters.
3129 (-[WebTextRenderer setUpFont]): Renamed to remove underscore prefix. Added code to get printer or screen
3130 font as specified by WebCoreFont so calers don't need to do this.
3131 (drawGlyphs): Renamed to remove underscore prefix. Added code for synthetic oblique (14 degree slant), and
3132 synthetic bold (add offset and draw text a second time).
3133 (-[WebTextRenderer _CG_drawRun:style:geometry:]): Keep an array of substitute renderers instead of fonts.
3134 Changed around the loop to reverse the run to be a single loop instead of 3.
3135 (-[WebTextRenderer floatWidthForRun:style:widths:substituteRenderers:glyphs:startPosition:numGlyphs:]):
3136 Renamed to remove the underscore prefix.
3137 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:substituteRenderers:glyphs:startPosition:numGlyphs:]):
3138 Changed to use subsitute renderers rather than fonts.
3139 (-[WebTextRenderer updateGlyphEntryForCharacter:glyphID:substituteRenderer:]): Renamed to remove underscore
3140 prefix and changed to use a substitute renderer rather than a substitute NSFont.
3141 (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]): Updated to work with all characters, both ones
3142 that fit into 16-bit and ones that don't.
3143 (-[WebTextRenderer _extendGlyphToWidthMapToInclude:]): Removed NSFont parameter and simplified. This fixes
3144 a bug where numberOfGlyphs was accidentally used from the main font instead of "subFont".
3145 (glyphForCharacter): Changed to use subsitute renderers instead of substitute fonts.
3146 (widthForNextCharacter): Ditto. Also removed small caps code no longer needed here and replaced it with
3147 simpler small caps code that no longer assumes glyphs match.
3148 (shouldUseATSU): Changed the code to check ranges in order to slightly reduce the number of cases and
3149 to create earlier exit for lower character codes.
3151 * WebCoreSupport.subproj/WebTextRendererFactory.h: Added caches for synthesized font and oblique
3152 variants so we can still use the NSFont as the dictionary key. Removed coalesceTextDrawing methods.
3153 Changed methods to use WebCoreFont as the parameters and results instead of NSFont.
3154 * WebCoreSupport.subproj/WebTextRendererFactory.m:
3155 (-[WebTextRendererFactory clearCaches]): Clear all 8 caches.
3156 (-[WebTextRendererFactory isFontFixedPitch:]): Changed code slightly so there's only one call to
3157 the CFDictionarySetValue function.
3158 (-[WebTextRendererFactory init]): Create all 8 caches.
3159 (-[WebTextRendererFactory dealloc]): Release all 8 caches.
3160 (-[WebTextRendererFactory rendererWithFont:]): Select the appropriate cache based on 3 booleans:
3161 synthetic bold, synthetic oblique, and printer. Use WebCoreFont instead of NSFont.
3162 (-[WebTextRendererFactory fontWithFamilies:traits:size:]): Set the synthetic bold and oblique flags
3163 when returning a WebCoreFont based on requested traits that are not present in the NSFont.
3164 (acceptableChoice): Ignore the synthesizable traits when deciding if a chosen font is acceptable.
3165 (betterChoice): Rather than assuming that every font has all the desired traits, implement a rule
3166 that says a font with an unwanted trait loses out over a font that does not have an unwanted trait.
3167 This lets us chose a bold font over a non-bold font that could use synthesized bold but treat both
3170 * WebCoreSupport.subproj/WebGlyphBuffer.h: Removed.
3171 * WebCoreSupport.subproj/WebGlyphBuffer.m: Removed.
3172 * WebKit.xcodeproj/project.pbxproj: Removed WebGlyphBuffer source files.
3174 * Misc.subproj/WebKitNSStringExtras.m:
3175 (-[NSString _web_drawAtPoint:font:textColor:]): Update to use WebCoreFont.
3176 (-[NSString _web_widthWithFont:]): Ditto.
3177 * Misc.subproj/WebStringTruncator.m:
3178 (truncateString): Ditto.
3179 (+[WebStringTruncator widthOfString:font:]): Ditto.
3181 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]): Removed text drawing coalesce method calls.
3182 * WebView.subproj/WebTextView.m: (-[WebTextView setFixedWidthFont]): Updated to use cachedFontFromFamily
3183 method, which we still have, rather than fontWithFamilies method which we don't (since it now uses WebCoreFont).
3184 * WebView.subproj/WebView.m: (+[WebView _setAlwaysUseATSU:]): Updated for name change to underlying method.
3186 2005-10-05 Maciej Stachowiak <mjs@apple.com>
3190 <rdar://problem/4158439> Safari appears to hang when sending synchronous XMLHttpRequest that gets no server response
3192 No testcase - not testable w/o network.
3194 * WebCoreSupport.subproj/WebBridge.m:
3195 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Set a timeout of 10.
3197 2005-10-04 Beth Dakin <bdakin@apple.com>
3201 Fix for <rdar://problem/4285538> TOT fix for Denver Regression: Drawing glitch in the transparent dialog's cancel/ok
3202 button in the widget manager.
3204 * WebCoreSupport.subproj/WebImageData.m: Calls WKSetPatternPhaseInUserSpace() which is a new function that lies in
3205 WebKitSystemInterface that and takes care of pattern-setting. Prevents
3206 regression that occurred with image tiling in transparency layers.
3207 (-[WebImageData tileInRect:fromPoint:context:]):
3209 2005-10-03 Tim Omernick <tomernick@apple.com>
3211 Reviewed by John Sullivan.
3213 <rdar://problem/4281095> Denver regression: Seed: Safari HTML 4.01 <object ...> tag problem
3215 * WebCoreSupport.subproj/WebBridge.m:
3216 (-[WebBridge determineObjectFromMIMEType:URL:]):
3217 If no view class is registered to handle the MIME type, check to see if there is a plugin registered which can handle it.
3218 This check is required because the Java plugin does not register an NSView class, so that Java files are downloaded when
3221 Prior to this fix, -determineObjectFromMIMEType:URL: would always return ObjectElementNone for Java applets (MIME type
3222 "application/x-java-applet"), which would cause Java applets embedded in <OBJECT> elements to not be loaded.
3224 This broke on 05-03-2005, when we changed how we handle fallback content for <OBJECT> elements so that we could pass the
3227 2005-09-28 Justin Garcia <justin.garcia@apple.com>
3231 Fixed <rdar://problem/4276596> multipart/x-mixed-replace: saved inline images appear only partially loaded
3232 Fixed <rdar://problem/4265439> progress bar should look complete even if there is some more multipart content being loaded
3234 * WebCoreSupport.subproj/WebSubresourceLoader.h:
3235 * WebCoreSupport.subproj/WebSubresourceLoader.m:
3236 (-[WebSubresourceLoader didReceiveResponse:]):
3237 Now calls signalFinish and saveResource.
3239 (-[WebSubresourceLoader signalFinish]):
3240 Added. Does the part of didFinishLoading that signals to the WebDataSource and load delegates that the load is finished.
3242 (-[WebSubresourceLoader didFinishLoading]):
3243 * WebView.subproj/WebLoader.h:
3244 * WebView.subproj/WebLoader.m:
3245 (-[NSURLProtocol signalFinish]):
3248 (-[NSURLProtocol didFinishLoading]):
3250 2005-09-28 Adele Peterson <adele@apple.com>
3254 Moved _downloadWithLoadingConnection and _downloadWithRequestfrom WebDownload.h to WebDownloadInternal.h
3256 * Misc.subproj/WebDownload.h:
3257 * Misc.subproj/WebDownloadInternal.h: Added.
3258 * WebKit.xcodeproj/project.pbxproj: Added WebDownloadInternal.h
3259 * WebView.subproj/WebMainResourceLoader.m: Added import of WebDownloadInternal.h
3260 * WebView.subproj/WebView.m: ditto.
3262 2005-09-27 Adele Peterson <adele@apple.com>
3266 Changed ints to size_t where appropriate.
3268 * Misc.subproj/WebCoreStatistics.h:
3269 * Misc.subproj/WebCoreStatistics.m:
3270 (+[WebCoreStatistics javaScriptObjectsCount]):
3271 (+[WebCoreStatistics javaScriptInterpretersCount]):
3272 (+[WebCoreStatistics javaScriptNoGCAllowedObjectsCount]):
3273 (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
3274 * WebView.subproj/WebPreferences.m:
3275 (-[WebPreferences _pageCacheSize]):
3276 (-[WebPreferences _objectCacheSize]):
3277 * WebView.subproj/WebPreferencesPrivate.h:
3279 2005-09-26 John Sullivan <sullivan@apple.com>
3281 Reviewed by Tim Omernick.
3283 - fixed <rdar://problem/4118126> Drag-and-drop text with text containing a colon causes a crash
3285 There were two problems here. One is that dragging and dropping text within the same WebTextView
3286 should have done nothing rather than try to navigate. The other is that navigating while processing
3287 the end of the drag would dealloc the drag-initiating WebTextView, leading to a crash. Fixing the
3288 former doesn't fix all cases of the latter, since dropping onto (e.g.) Safari's location field
3289 could cause a navigation during the drag. So these two issues needed to be fixed separately.
3291 * WebView.subproj/WebTextView.m:
3292 (-[WebTextView dragSelectionWithEvent:offset:slideBack:]):
3293 Before drag, retain self, and tell WebView that the drag is self-initiated. After drag, do the
3294 opposite. This is the same approach as WebImageView, but it can all be contained in one method
3295 here due to NSTextView's dragging API, which wraps up some of the drag-machinery guts.
3297 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
3299 Reviewed and landed by Darin.
3301 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5100
3302 -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
3304 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
3305 Set up a the CGContext with a matrix that flips the text if the view is not flipped.
3307 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
3309 Reviewed, tweaked a tiny bit, and landed by Darin.
3311 - fixed http://bugzilla.opendarwin.