1 2006-02-03 Timothy Hatcher <timothy@apple.com>
5 Renamed configuration names to Debug, Release and Production.
7 * WebKit.xcodeproj/project.pbxproj:
9 2006-02-02 David Hyatt <hyatt@apple.com>
11 Fix for bug 6957, rewrite image rendering in C++ and move it to
12 WebCore. Animation now stops lazily and just uses the CachedObject
13 notification system to push updates so that rects no longer need to
14 be cached (or sets of animating renderers in specific views).
18 * Misc.subproj/WebNSPasteboardExtras.h:
19 * Misc.subproj/WebNSPasteboardExtras.m:
20 (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
21 (-[NSPasteboard _web_declareAndWriteDragImage:element:URL:title:archive:source:]):
22 * Misc.subproj/WebNSViewExtras.h:
23 * Misc.subproj/WebNSViewExtras.m:
24 (-[NSView _web_dragImage:element:rect:event:pasteboard:source:offset:]):
25 * WebCoreSupport.subproj/WebImageData.m:
26 (-[WebImageData init]):
27 * WebCoreSupport.subproj/WebImageRendererFactory.m:
28 (+[WebImageRendererFactory shouldUseThreadedDecoding]):
29 (+[WebImageRendererFactory setShouldUseThreadedDecoding:]):
30 (-[WebImageRendererFactory setPatternPhaseForContext:inUserSpace:]):
31 (-[WebImageRendererFactory imageDataForName:]):
32 * WebView.subproj/WebHTMLView.m:
33 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
34 (-[NSArray elementAtPoint:]):
35 * WebView.subproj/WebImageView.m:
36 (-[WebImageView writeImageToPasteboard:types:]):
37 (-[WebImageView elementAtPoint:]):
38 (-[WebImageView mouseDragged:]):
39 * WebView.subproj/WebView.m:
40 (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
42 2006-01-31 John Sullivan <sullivan@apple.com>
44 Reviewed by Tim Omernick.
46 - fixed <rdar://problem/4267144> REGRESSION (10.4.2): Safari pages auto-scroll too easily
47 during drag over content [5853]
49 There were two issues here:
50 (1) dragging over a non-editable webview (such as a typical Safari page) should not have
51 auto-scrolled at all; the fact that it did was an uninentional side effect of making
52 auto-scroll work for editable webviews a la Blot.
53 (2) the speed & hot area of the auto-scroll changed between 10.4.1 and 10.4.2.
55 I have a fix for (1), which is the much more important issue. I'll modify the bugzilla bug
56 to be about the remaining issue.
58 * WebView.subproj/WebView.m:
59 (-[WebView _autoscrollForDraggingInfo:timeDelta:]):
60 do nothing if not editable
61 (-[WebView _shouldAutoscrollForDraggingInfo:]):
62 return NO if not editable
64 2006-01-31 John Sullivan <sullivan@apple.com>
66 Reviewed by Tim Omernick.
68 Support for programmatic scrolling one line at a time for PDFs. (We already had support for
69 programmatic scrolling one page at a time, and to top/end.)
71 * WebView.subproj/WebPDFView.m:
72 (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
74 (-[WebPDFView scrollLineDown:]):
75 pass a faked arrow-down key event
76 (-[WebPDFView scrollLineUp:]):
77 pass a faked arrow-up key event
79 2006-01-31 Darin Adler <darin@apple.com>
83 * WebCoreSupport.subproj/WebFrameBridge.m:
84 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
85 Updated for name change.
87 2006-01-30 Timothy Hatcher <timothy@apple.com>
91 Add -Wno-deprecated-declarations to the compile flags for WebNetscapePluginPackage.m.
92 <rdar://problem/4427068> LMGetCurApRefNum, CloseConnection and GetDiskFragment now deprecated.
93 When we workaround these we can remove this compile flag.
95 * WebKit.xcodeproj/project.pbxproj:
97 2006-01-30 Timothy Hatcher <timothy@apple.com>
101 Remove the only use of -[NSFont glyphPacking]. This method was deprecated in Tiger
102 and always returns NSNativeShortGlyphPacking.
104 * WebCoreSupport.subproj/WebTextRenderer.m:
105 (-[WebTextRenderer initWithFont:]):
107 2006-01-28 David Hyatt <hyatt@apple.com>
109 Clean up RenderImage, eliminating unneeded members and methods.
113 * WebCoreSupport.subproj/WebImageRenderer.h:
114 * WebCoreSupport.subproj/WebImageRenderer.m:
115 (-[WebImageRenderer copyWithZone:]):
116 (-[WebImageRenderer size]):
117 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
119 2006-01-26 Tim Omernick <timo@apple.com>
121 Reviewed by John Sullivan.
123 <rdar://problem/4422365>
125 * WebView.subproj/WebHTMLView.m:
126 (-[NSArray addSuperviewObservers]):
127 In addition to registering for frame/bounds change notifications, call -_frameOrBoundsChanged.
128 It will check the current size/scroll against the previous layout's size/scroll. We need to
129 do this here to catch the case where the WebView is laid out at one size, removed from its
130 window, resized, and inserted into another window. Our frame/bounds changed notifications
131 will not be sent in that situation, since we only watch for changes while in the view hierarchy.
133 I have verified that this does not cause unnecessary layouts while running the PLT.
135 2006-01-25 Vicki Murley <vicki@apple.com>
137 Reviewed by Beth Dakin.
139 - fix <rdar://problem/4351664> REGRESSION (420+): extra URL in b/f list - navigating back to
140 previous page fails at apple.com/retail/)
142 * WebView.subproj/WebFrame.m:
143 (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): grab the
144 redirect flag of the current load before calling _loadURL, which clears this flag,
145 (-[WebFrame _transitionToCommitted:]): remove misleading comment
146 * History.subproj/WebHistoryItem.m:
147 (-[WebHistoryItem setURL:]): release resources in the page cache when setting
148 the URL on a WebHistoryItem
150 2006-01-25 Timothy Hatcher <timothy@apple.com>
152 Move off of -[NSFont widthOfString:] since it is now deprecated.
153 Use the NSStringDrawing -[NSString sizeWithAttributes:] API.
155 * WebCoreSupport.subproj/WebFileButton.m:
156 (-[WebFileChooserButton bestVisualFrameSizeForCharacterCount:]):
158 2006-01-23 Darin Adler <darin@apple.com>
160 - fixed some small localizable strings issues
162 * WebInspector.subproj/WebInspector.m:
163 (-[DOMNode _nodeTypeName]): Changed so we don't have two localizable strings that
164 are both "Document". I'm not sure we want to localize the DOM inspector UI at all,
165 but this fixes things for now.
166 (-[DOMNode _displayName]): Ditto.
168 * English.lproj/Localizable.strings: Updated.
169 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
171 2006-01-23 Justin Garcia <justin.garcia@apple.com>
175 Turned on -O2 for B&I build.
177 * WebKit.xcodeproj/project.pbxproj:
179 2006-01-22 Timothy Hatcher <timothy@apple.com>
181 Reviewed by Anders Carlsson.
183 Makes the Inspector's Style pane take !important into account
184 when marking overloaded properties.
186 * WebInspector.subproj/webInspector/inspector.js:
188 2006-01-21 Timothy Hatcher <timothy@apple.com>
190 Reviewed by Anders Carlsson.
192 Make sure shorthand properties get striked-out if
193 all the properties they expand into are overloaded.
195 * WebInspector.subproj/webInspector/inspector.js:
197 2006-01-21 Timothy Hatcher <timothy@apple.com>
201 Adds computed style to the Web Inspector.
202 Adds a "mapped style" link to the mapped attributes.
204 * WebInspector.subproj/webInspector/inspector.css:
205 * WebInspector.subproj/webInspector/inspector.html:
206 * WebInspector.subproj/webInspector/inspector.js:
208 2006-01-20 Timothy Hatcher <timothy@apple.com>
210 Reviewed by John, some parts by Darin.
212 Removes the old WebDebugDOMNode code, superseded by the ObjC DOM and the Web Inspector.
213 Since Safari 2.0 still relies on these classes for the Debug menu's "Show DOM Tree", we remove
214 that menu item to prevent a crash.
216 * WebKit.exp: adds WebInspector, removes WebDebugDOMNode
217 * 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
218 * WebView.subproj/WebDebugDOMNode.h: Removed.
219 * WebView.subproj/WebDebugDOMNode.m: Removed.
220 * WebView.subproj/WebView.m:
221 (+[WebView initialize]): check if we are in Safari and IncludeDebugMenu is true then observe for NSApplicationDidFinishLaunchingNotification and call _finishedLaunching
222 (+[WebView _finishedLaunching]): observe for NSMenuDidAddItemNotification now that the main menu is loaded and wait for the Debug menu to be added
223 (+[WebView _removeDOMTreeMenuItem:]): when the debug menu is added remove the "Show DOM Tree" item
225 2006-01-20 Timothy Hatcher <timothy@apple.com>
229 Corrects the cascade order for mapped attributes.
230 Shows "inline stylesheet" rather than "null" for rules in <style> tags.
232 * WebInspector.subproj/webInspector/inspector.js:
234 2006-01-19 Timothy Hatcher <timothy@apple.com>
238 Adds inline style reporting and mapped attribute support to the Inspector Style pane.
239 Cleans up the node attributes area with a more natural attr = "value" look.
240 Slight optimization to only update visible scrollbars during a window resize.
242 * WebInspector.subproj/webInspector/inspector.css:
243 * WebInspector.subproj/webInspector/inspector.js:
245 2006-01-19 Timothy Hatcher <timothy@apple.com>
249 http://bugzilla.opendarwin.org/show_bug.cgi?id=6631
250 Inspector window has inappropriate maximum height
252 * WebInspector.subproj/WebInspector.m:
253 (-[WebInspector window]): removes the maximum size constraint
255 2006-01-19 John Sullivan <sullivan@apple.com>
257 Reviewed by Tim Omernick.
259 * WebKit.xcodeproj/project.pbxproj:
260 made WebNSUserDefaultsExtras.h private (SPI) so its one method can be called from
261 Safari, so Safari can stop calling the similar method in Foundation.
263 2006-01-19 John Sullivan <sullivan@apple.com>
265 Reviewed by Tim Omernick.
267 Made _webKit_guessedMIMEType SPI so Safari can use it in order to stop using
268 the similar SPI method in Foundation. This involved splitting it out of the file
269 it was in, to avoid creating any other new SPI here. Poor svn diff got mighty
270 confused in the process.
272 * Misc.subproj/WebNSDataExtras.h:
273 removed _webkit_guessedMIMEType from here
274 * Misc.subproj/WebNSDataExtrasPrivate.h:
275 Added. Contains only _webkit_guessedMIMEType. This file is private (SPI), whereas
276 WebNSDataExtras.h is project-internal. I could have renamed WebNSDateExtras.h to
277 WebNSDateExtrasInternal.h also, but I minimized the gratuitous change level here
280 * Misc.subproj/WebNSDataExtras.m:
281 Despite the great confusion of svn diff, all I actually did here was move
282 _webkit_guessedMIMEType and its helper _webkit_guessedMIMETypeForXML into a new
283 category. No lines of code were harmed while creating this patch.
285 * WebKit.xcodeproj/project.pbxproj:
288 * WebView.subproj/WebView.m:
289 Added #import for new file since WebView uses _webkit_guessedMIMEType
291 2006-01-19 John Sullivan <sullivan@apple.com>
293 Reviewed by Tim Omernick.
295 * Misc.subproj/WebNSURLExtras.h:
296 added declaration of _webkit_rangeOfURLScheme so Safari can call it as a step
297 towards weaning Safari from Foundation SPI.
299 2006-01-17 Justin Garcia <justin.garcia@apple.com>
303 Deployment builds now use -O2
305 * WebKit.xcodeproj/project.pbxproj:
307 2006-01-17 Beth Dakin <bdakin@apple.com>
311 Fix for <rdar://problem/4112029> With Quartz scaling on, Safari incorrectly
312 handles mouseover effects
314 The location of an event in the window should be converted to the superview
315 of the contentView to do accurate hitTesting.
317 * WebView.subproj/WebHTMLView.m:
318 (-[WebHTMLView _updateMouseoverWithEvent:]): Convert the point to the
319 contentView's superview from nil.
321 2006-01-16 Timothy Hatcher <timothy@apple.com>
323 Rubber stamped by Maciej.
325 Check for a new "WebKitDeveloperExtras" default when
326 including the "Inspect Element" context menu item.
327 We should retire the other one eventually.
329 * WebView.subproj/WebView.m:
330 (-[WebView _menuForElement:defaultItems:]):
332 2006-01-17 Anders Carlsson <andersca@mac.com>
334 Reviewed by Timothy Hatcher.
336 - http://bugzilla.opendarwin.org/show_bug.cgi?id=6594
337 Web Inspector: finish node attributes
339 * WebInspector.subproj/webInspector/inspector.css:
340 * WebInspector.subproj/webInspector/inspector.html:
341 * WebInspector.subproj/webInspector/inspector.js:
342 Add initial support for element attributes.
344 2006-01-16 John Sullivan <sullivan@apple.com>
346 Reviewed by Vicki Murley.
348 - fixed <rdar://problem/4409288> REGRESSION (TOT): When no selection is present on page,
349 Jump to Selection doesn't beep
351 * WebView.subproj/WebHTMLView.m:
352 (-[WebHTMLView _hasInsertionPoint]):
354 (-[NSArray validateUserInterfaceItem:]):
355 Don't validate this menu item (or a couple of others) if the selection is a caret and
356 the page isn't editable. In that state, there is no visible selection so this menu item
357 doesn't make sense. I suspect this was broken by some editing-related change that makes
358 selectionState return WebSelectionStateCaret here where it used to return WebSelectionStateNone.
360 2006-01-16 Tim Omernick <timo@apple.com>
362 Reviewed by John Sullivan.
364 WebKit part of <rdar://problem/4211707> NPAPI ref count behavior differs with Mozilla
366 * Plugins.subproj/WebBaseNetscapePluginView.m:
367 (-[WebBaseNetscapePluginView getVariable:value:]):
368 The returned window script object is expected to be retained, as described here:
369 <http://www.mozilla.org/projects/plugins/npruntime.html#browseraccess>
371 2006-01-16 Anders Carlsson <andersca@mac.com>
375 * WebInspector.subproj/webInspector/inspector.js:
376 Use defined NodeType values instead of integers.
378 2006-01-15 Timothy Hatcher <timothy@apple.com>
382 New DOM Inspector that lives in WebKit and is accessible from any WebView.
383 Accessible from a contextual menu when the WebKitEnableInspectElementContextMenuItem default is
384 true or you have a development build. Browsing the tree, serialized HTML and CSS rules work.
386 To always enable enter the following in the Terminal (change the bundle id to affect other WebKit apps):
387 defaults write com.apple.Safari WebKitEnableInspectElementContextMenuItem -bool true
389 http://bugzilla.opendarwin.org/show_bug.cgi?id=6571
391 * English.lproj/Localizable.strings:
392 * English.lproj/StringsNotToBeLocalized.txt: reorder of the entries
393 * Misc.subproj/WebKitNSStringExtras.h:
394 * Misc.subproj/WebKitNSStringExtras.m:
395 (-[NSString _webkit_stringByCollapsingWhitespaceCharacters]): collapses consecutive whitespace into a single space
396 * WebCoreSupport.subproj/WebFrameBridge.m:
397 (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): cleanup
398 (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]): call the new UI delegate method
399 * WebInspector.subproj: Added.
400 * WebInspector.subproj/WebInspector.h: Added.
401 * WebInspector.subproj/WebInspector.m: Added.
402 (+[WebInspector sharedWebInspector]):
403 (-[WebInspector init]):
404 (-[WebInspector initWithWebFrame:]):
405 (-[WebInspector dealloc]):
406 (-[WebInspector window]):
407 (-[WebInspector windowDidLoad]):
408 (-[WebInspector windowWillClose:]):
409 (-[WebInspector showWindow:]):
410 (-[WebInspector setWebFrame:]):
411 (-[WebInspector webFrame]):
412 (-[WebInspector setRootDOMNode:]):
413 (-[WebInspector rootDOMNode]):
414 (-[WebInspector setFocusedDOMNode:]):
415 (-[WebInspector focusedDOMNode]):
416 (-[WebInspector setSearchQuery:]):
417 (-[WebInspector searchQuery]):
418 (-[WebInspector searchResults]):
419 (-[WebInspector showOptionsMenu]):
420 (-[WebInspector selectNewRoot:]):
421 (-[WebInspector resizeTopArea:]):
422 (-[WebInspector treeViewScrollTo:]):
423 (-[WebInspector treeViewOffsetTop]):
424 (-[WebInspector treeViewScrollHeight]):
425 (-[WebInspector traverseTreeBackward]):
426 (-[WebInspector traverseTreeForward]):
427 (-[WebInspector _toggleIgnoreWhitespace:]):
428 (-[WebInspector _highlightNode:]):
429 (-[WebInspector _nodeHighlightExpired:]):
430 (-[WebInspector _focusRootNode:]):
431 (-[WebInspector _revealAndSelectNodeInTree:]):
432 (-[WebInspector _showSearchResults:]):
433 (-[WebInspector _refreshSearch]):
434 (-[WebInspector _update]):
435 (-[WebInspector _updateRoot]):
436 (-[WebInspector _updateTreeScrollbar]):
437 (+[WebInspector isSelectorExcludedFromWebScript:]):
438 (+[WebInspector webScriptNameForSelector:]):
439 (+[WebInspector isKeyExcludedFromWebScript:]):
440 (-[WebInspector handleEvent:]):
441 (-[WebInspector webView:didFinishLoadForFrame:]):
442 (-[WebInspector webView:plugInViewWithArguments:]):
443 (-[WebInspector outlineView:numberOfChildrenOfItem:]):
444 (-[WebInspector outlineView:isItemExpandable:]):
445 (-[WebInspector outlineView:child:ofItem:]):
446 (-[WebInspector outlineView:objectValueForTableColumn:byItem:]):
447 (-[WebInspector outlineView:willDisplayOutlineCell:forTableColumn:item:]):
448 (-[WebInspector outlineViewItemDidCollapse:]):
449 (-[WebInspector outlineViewSelectionDidChange:]):
450 (-[WebInspectorPrivate dealloc]):
451 (-[DOMHTMLElement _addClassName:]): Helper method for the Inspector to append style classes
452 (-[DOMHTMLElement _removeClassName:]): Helper method for the Inspector to remove style classes
453 (-[DOMNode _contentPreview]):
454 (-[DOMNode _isAncestorOfNode:]):
455 (-[DOMNode _isDescendantOfNode:]):
456 (-[DOMNode _isWhitespace]):
457 (-[DOMNode _lengthOfChildNodesIgnoringWhitespace]):
458 (-[DOMNode _childNodeAtIndexIgnoringWhitespace:]):
459 (-[DOMNode _nextSiblingSkippingWhitespace]):
460 (-[DOMNode _previousSiblingSkippingWhitespace]):
461 (-[DOMNode _firstChildSkippingWhitespace]):
462 (-[DOMNode _lastChildSkippingWhitespace]):
463 (-[DOMNode _firstAncestorCommonWithNode:]):
464 (-[DOMNode _traverseNextNodeStayingWithin:]):
465 (-[DOMNode _traverseNextNodeSkippingWhitespaceStayingWithin:]):
466 (-[DOMNode _traversePreviousNode]):
467 (-[DOMNode _traversePreviousNodeSkippingWhitespace]):
468 (-[DOMNode _nodeTypeName]):
469 (-[DOMNode _shortDisplayName]):
470 (-[DOMNode _displayName]):
471 * WebInspector.subproj/WebInspectorInternal.h: Added.
472 * WebInspector.subproj/WebInspectorOutlineView.h: Added.
473 * WebInspector.subproj/WebInspectorOutlineView.m: Added.
474 (-[WebInspectorOutlineView isOpaque]):
475 (-[WebInspectorOutlineView _highlightColorForCell:]):
476 (-[WebInspectorOutlineView _highlightRow:clipRect:]):
477 (-[WebInspectorOutlineView drawBackgroundInClipRect:]):
478 * WebInspector.subproj/WebInspectorPanel.h: Added.
479 * WebInspector.subproj/WebInspectorPanel.m: Added.
480 (-[WebInspectorPanel canBecomeKeyWindow]):
481 (-[WebInspectorPanel canBecomeMainWindow]):
482 (-[WebInspectorPanel moveWindow:]):
483 (-[WebInspectorPanel resizeWindow:]):
484 (-[WebInspectorPanel sendEvent:]):
485 * WebInspector.subproj/WebNodeHighlight.h: Added.
486 * WebInspector.subproj/WebNodeHighlight.m: Added.
487 (-[WebNodeHighlight initWithBounds:andRects:forView:]):
488 (-[WebNodeHighlight dealloc]):
489 (-[WebNodeHighlight fractionComplete]):
490 (-[WebNodeHighlight expire]):
491 (-[WebNodeHighlight redraw:]):
492 * WebInspector.subproj/WebNodeHighlightView.h: Added.
493 * WebInspector.subproj/WebNodeHighlightView.m: Added.
494 (-[WebNodeHighlightView roundedRect:withRadius:]):
495 (-[WebNodeHighlightView initWithHighlight:andRects:forView:]):
496 (-[WebNodeHighlightView dealloc]):
497 (-[WebNodeHighlightView isOpaque]):
498 (-[WebNodeHighlightView drawRect:]):
499 * WebInspector.subproj/webInspector: Added.
500 * WebInspector.subproj/webInspector/Images: Added.
501 * WebInspector.subproj/webInspector/Images/close.png: Added.
502 * WebInspector.subproj/webInspector/Images/closePressed.png: Added.
503 * WebInspector.subproj/webInspector/Images/downTriangle.png: Added.
504 * WebInspector.subproj/webInspector/Images/menu.png: Added.
505 * WebInspector.subproj/webInspector/Images/menuPressed.png: Added.
506 * WebInspector.subproj/webInspector/Images/popupFill.png: Added.
507 * WebInspector.subproj/webInspector/Images/popupFillPressed.png: Added.
508 * WebInspector.subproj/webInspector/Images/popupLeft.png: Added.
509 * WebInspector.subproj/webInspector/Images/popupLeftPressed.png: Added.
510 * WebInspector.subproj/webInspector/Images/popupRight.png: Added.
511 * WebInspector.subproj/webInspector/Images/popupRightPressed.png: Added.
512 * WebInspector.subproj/webInspector/Images/rightTriangle.png: Added.
513 * WebInspector.subproj/webInspector/Images/scrollThumbBottom.png: Added.
514 * WebInspector.subproj/webInspector/Images/scrollThumbMiddle.png: Added.
515 * WebInspector.subproj/webInspector/Images/scrollThumbTop.png: Added.
516 * WebInspector.subproj/webInspector/Images/scrollTrackBottom.png: Added.
517 * WebInspector.subproj/webInspector/Images/scrollTrackMiddle.png: Added.
518 * WebInspector.subproj/webInspector/Images/scrollTrackTop.png: Added.
519 * WebInspector.subproj/webInspector/Images/squareButtonRight.png: Added.
520 * WebInspector.subproj/webInspector/Images/squareButtonRightPressed.png: Added.
521 * WebInspector.subproj/webInspector/Images/upTriangle.png: Added.
522 * WebInspector.subproj/webInspector/inspector.css: Added.
523 * WebInspector.subproj/webInspector/inspector.html: Added.
524 * WebInspector.subproj/webInspector/inspector.js: Added.
525 * WebKit.xcodeproj/project.pbxproj: Adds Web Inspector files
526 * WebView.subproj/WebUIDelegatePrivate.h: new UI delegate method to supply a replacement view for plugins
527 * WebView.subproj/WebView.m:
528 (-[WebView _menuForElement:defaultItems:]): Add a new context menu item for inspecting
529 (-[WebView _inspectElement:]): Context menu item target for inspecting
531 2006-01-14 Alexey Proskuryakov <ap@nypop.com>
535 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6531
536 document.cookie="killmenothing" doesn't set the cookie
538 * WebCoreSupport.subproj/WebCookieAdapter.m: (-[WebCookieAdapter setCookies:forURL:policyBaseURL:]):
539 Append an '=' to the cookie string if it has none, so that
540 +[NSHTTPCookie cookiesWithResponseHeaderFields:forURL:] can parse it.
542 2006-01-14 Maciej Stachowiak <mjs@apple.com>
546 - added bridging infrastructure for Page class
548 * WebCoreSupport.subproj/WebPageBridge.h: Added.
549 * WebCoreSupport.subproj/WebPageBridge.m: Added.
550 (-[WebPageBridge initWithMainFrameName:view:]): New class, somewhat obvious.
551 * WebKit.xcodeproj/project.pbxproj:
552 * WebView.subproj/WebView.m:
553 (-[WebViewPrivate dealloc]): Don't use _mainFrameBrige, use _pageBridge
554 (-[WebView _close]): ditto
555 (-[WebView _commonInitializationWithFrameName:groupName:]): ditto
556 (-[WebView mainFrame]): ditto
558 2006-01-12 Maciej Stachowiak <mjs@apple.com>
560 Rubber stamped by Eric.
562 - rename WebBridge to WebFrameBridge
564 - also removed all tabs from WebFrameBridge.m
566 * DOM.subproj/WebDOMOperations.m:
567 (-[DOMNode _bridge]):
568 (-[DOMNode webArchive]):
569 (-[DOMRange _bridge]):
570 (-[DOMRange webArchive]):
571 * DOM.subproj/WebDOMOperationsPrivate.h:
572 * English.lproj/StringsNotToBeLocalized.txt:
573 * Misc.subproj/WebCoreStatistics.m:
574 * Misc.subproj/WebNSViewExtras.h:
575 * Misc.subproj/WebNSViewExtras.m:
577 * Plugins.subproj/WebBaseNetscapePluginView.m:
578 * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
579 * Plugins.subproj/WebNetscapePluginStream.m:
580 (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
581 * Plugins.subproj/WebPluginContainerCheck.m:
582 (-[WebPluginContainerCheck _isForbiddenFileLoad]):
583 * Plugins.subproj/WebPluginController.h:
584 * Plugins.subproj/WebPluginController.m:
585 (-[WebPluginController bridge]):
586 * WebCoreSupport.subproj/WebBridge.h: Removed.
587 * WebCoreSupport.subproj/WebBridge.m: Removed.
588 * WebCoreSupport.subproj/WebFileButton.h:
589 * WebCoreSupport.subproj/WebFileButton.m:
590 (-[WebFileChooserButton initWithBridge:delegate:]):
591 * WebCoreSupport.subproj/WebFrameBridge.h: Added.
592 * WebCoreSupport.subproj/WebFrameBridge.m: Added.
593 (-[WebFrameBridge mainFrame]):
594 (-[WebFrameBridge createWindowWithURL:frameName:]):
595 (-[WebFrameBridge canTargetLoadInFrame:]):
596 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
598 (-[WebFrameBridge createModalDialogWithURL:]):
599 * WebCoreSupport.subproj/WebSubresourceLoader.m:
600 * WebCoreSupport.subproj/WebTextRendererFactory.m:
601 * WebCoreSupport.subproj/WebViewFactory.m:
602 (-[WebViewFactory bridgeForView:]):
603 * WebKit.xcodeproj/project.pbxproj:
604 * WebView.subproj/WebDataSource.m:
605 (-[WebDataSource _bridge]):
606 (-[WebDataSource _receivedMainResourceError:complete:]):
607 (-[WebDataSource _stringWithData:]):
608 * WebView.subproj/WebDataSourcePrivate.h:
609 * WebView.subproj/WebDebugDOMNode.m:
610 * WebView.subproj/WebDefaultContextMenuDelegate.m:
611 * WebView.subproj/WebFrame.m:
612 (-[WebFrame _traverseNextFrameStayWithin::]):
614 (-[WebFrame _detachFromParent]):
615 (-[WebFrame _bridge]):
616 (-[WebFrame _initWithWebFrameView:webView:bridge:]):
617 * WebView.subproj/WebFrameInternal.h:
618 * WebView.subproj/WebFramePrivate.h:
619 * WebView.subproj/WebFrameView.m:
620 (-[WebFrameView webCoreBridge]):
621 (-[WebFrameView _bridge]):
622 * WebView.subproj/WebHTMLRepresentation.m:
623 (+[WebHTMLRepresentation supportedMIMETypes]):
624 (-[WebHTMLRepresentation _bridge]):
625 (-[WebHTMLRepresentation documentSource]):
626 * WebView.subproj/WebHTMLRepresentationPrivate.h:
627 * WebView.subproj/WebHTMLView.m:
628 (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
629 (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]):
630 (-[WebHTMLView updateFocusState]):
631 (-[NSArray validateUserInterfaceItem:]):
632 (-[NSArray attributedString]):
633 (-[NSArray selectedAttributedString]):
634 (-[NSArray concludeDragForDraggingInfo:actionMask:]):
635 (-[NSArray keyDown:]):
636 (-[NSArray _alterCurrentSelection:direction:granularity:]):
637 (-[NSArray _alterCurrentSelection:verticalDistance:]):
638 (-[NSArray _expandSelectionToGranularity:]):
640 (-[NSArray _applyStyleToSelection:withUndoAction:]):
641 (-[NSArray _applyParagraphStyleToSelection:withUndoAction:]):
642 (-[NSArray pasteAsPlainText:]):
643 (-[NSArray insertNewline:]):
644 (-[NSArray insertLineBreak:]):
645 (-[NSArray insertParagraphSeparator:]):
646 (-[NSArray _changeWordCaseWithSelector:]):
647 (-[NSArray startSpeaking:]):
648 (-[NSArray selectToMark:]):
649 (-[NSArray swapWithMark:]):
650 (-[NSArray transpose:]):
651 (-[WebHTMLView characterIndexForPoint:]):
652 (-[WebHTMLView firstRectForCharacterRange:]):
653 (-[WebHTMLView selectedRange]):
654 (-[WebHTMLView attributedSubstringFromRange:]):
655 (-[WebHTMLView _selectMarkedText]):
656 (-[WebHTMLView _selectRangeInMarkedText:]):
657 (-[WebHTMLView setMarkedText:selectedRange:]):
658 (-[WebHTMLView _selectionIsInsideMarkedText]):
659 (-[WebTextCompleteController _insertMatch:]):
660 (-[WebTextCompleteController doCompletion]):
661 (-[WebTextCompleteController endRevertingChange:moveLeft:]):
662 * WebView.subproj/WebHTMLViewPrivate.h:
663 * WebView.subproj/WebImageView.m:
664 * WebView.subproj/WebMainResourceLoader.m:
665 * WebView.subproj/WebRenderNode.m:
666 * WebView.subproj/WebResource.m:
667 (-[WebResource _stringValue]):
668 * WebView.subproj/WebScriptDebugDelegate.m:
669 * WebView.subproj/WebTextView.m:
670 * WebView.subproj/WebView.m:
671 (-[WebView _createFrameNamed:inParent:allowsScrolling:]):
672 (-[WebView _commonInitializationWithFrameName:groupName:]):
673 (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
674 (-[WebView moveDragCaretToPoint:]):
675 (-[WebView shouldClose]):
676 (-[WebView editableDOMRangeForPoint:]):
677 (-[WebView setEditable:]):
678 (-[WebView deleteSelection]):
679 (-[WebView _bridgeForSelectedOrMainFrame]):
680 (-[WebView _bridgeAtPoint:]):
682 2006-01-13 Darin Adler <darin@apple.com>
684 - Replaced tabs with spaces in source files that had less than 10 lines with tabs.
685 - Set allow-tabs Subversion property in source files that have more than 10 lines with tabs.
687 2006-01-12 John Sullivan <sullivan@apple.com>
691 - fixed <rdar://problem/4406994> REGRESSION (TOT): zooming window at cnn.com
692 makes window fill width of screen
694 * WebView.subproj/WebFrameView.m:
695 (-[WebFrameView _largestChildWithScrollBars]):
696 now skips zero-area frames, used by some evil ads
698 2006-01-10 John Sullivan <sullivan@apple.com>
702 - fixed <rdar://problem/4265966> PDFs continue to show a (secondary) selection
703 when the focus moves elsewhere
705 * WebView.subproj/WebPDFView.h:
706 added trackedFirstResponder ivar
708 * WebView.subproj/WebPDFView.m:
709 (-[WebPDFView dealloc]):
710 assert that trackedFirstResponder is nil, as it was released/cleared in viewWillMoveToWindow:
711 (-[WebPDFView _trackFirstResponder]):
712 If the tracked first responder was the PDFView's documentView, and the current first responder isn't,
713 deselect all. This is equivalent to overriding resignFirstResponder in the PDFView's
714 documentView and deselecting all there, as other web document view classes do. Also, keep track of
715 the new first responder for next time.
716 (-[WebPDFView viewWillMoveToWindow:]):
717 stop observing NSWindowDidUpdateNotification on the old window
718 (-[WebPDFView viewDidMoveToWindow]):
719 start observing NSWindowDidUpdateNotification on the new window, with _trackFirstResponder
720 as the callback. Ideally we'd use a notification that tells us that the first responder is
721 changing, but there is no such notification, so we have to use this very frequent one instead.
722 The archaic 2573089 tracks the desire to have a responder-changed notification.
723 (-[WebPDFView becomeFirstResponder]):
724 removed comment about this bug that's now obsolete
726 2006-01-11 Darin Adler <darin@apple.com>
728 * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
730 2006-01-09 Darin Adler <darin@apple.com>
732 * Makefile.am: Removed.
734 2006-01-09 John Sullivan <sullivan@apple.com>
736 Reviewed by Beth Dakin.
738 - fixed <rdar://problem/4302263> CrashTracer: 504 crashes in Safari at
739 com.apple.AppKit: NSTargetForSendAction + 1060
741 The problem was that back/forward/stop/reload context menu items had nil targets,
742 and thus were relying on AppKit to start from the context menu target (the clicked-upon
743 view) and use the responder chain to find the WebView to act as the target. In Tiger,
744 context menus don't retain their implicit target (the clicked-upon view again), and
745 there was a race condition where the WebHTMLView could be dealloc'ed while the menu item
746 was being processed, eventually crashing in AppKit. The fix is to explicitly set the
747 target of these four menu items to the WebView, since the WebView is not dealloc'ed
748 in the loading process.
750 This might be fixed in a future version of AppKit by making the context menu retain its
751 implicit target until it is dismissed, but with this change it will be fixed regardless
752 of potential AppKit changes.
754 * WebView.subproj/WebDefaultContextMenuDelegate.m:
755 (-[WebDefaultUIDelegate menuItemWithTag:target:]):
756 Added target: parameter and removed code that set the target for some menu items; now the
757 caller is responsible for supplying the target.
758 (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]):
759 Supply target (or nil) in calls to menuItemWithTag:target:. This matches existing behavior
760 except for Back/Forward/Stop/Reload, which used to supply no target but now supply the
761 WebView as the target.
762 (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]):
763 Supply target (or nil) in calls to menuItemWithTag:target:
765 2006-01-09 Geoffrey Garen <ggaren@apple.com>
769 - Second cut at fixing <rdar://problem/4268278> Submitting a form
770 in onUnload event handler causes crash in
771 -[WebDataSource(WebPrivate) _commitIfReady:].)
773 - Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=6331
774 REGRESSION: form events don't fire after back/forward navigation,
775 due to inconsistent load state
777 * WebView.subproj/WebDataSource.m:
778 (-[WebDataSource _stopLoading]):
779 (1) If there are no resource loaders to signal the WebView that we've
780 been canceled, manufacture the signal. Otherwise, the cancel gets
781 ignored and nobody cleans up after the load. (We signal the WebView but
782 not the WebFrame because we don't want the WebFrame to tear down the
783 data source. Unlike most canceled data sources, this one has valid data
784 because it's in the back/forward cache.)
785 (2) Update _private->stopping before returning because if the
786 data source is in the back/forward cache it can be reused, so it
787 needs to be in a consistent state. (We never encountered this
788 situation before because we would always crash first.)
789 (-[WebDataSource _commitLoadWithData:]): Move _commitIfReady call
790 inside retain block because the commit may cause an unload event
791 to fire, which may start a new load, deallocating the current
792 data source. (This is the same reason the rest of the function is
793 in the retain block.)
794 * WebView.subproj/WebFrame.m:
795 (-[WebFrame _transitionToCommitted:]): If the unload handler
796 started a new load, return early to avoid stomping it.
797 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
798 Undo previous incorrect fix.
799 (-[WebFrame stopLoading]): Remove misleading comment. Setting
800 provisionalDataSource to nil is not optional but required for
801 internal consistency.
803 2006-01-09 Alexey Proskuryakov <ap@nypop.com>
807 Affects many layout tests (when running with primary Russian language).
809 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4759
810 'ex' length unit calculation (Some layout tests fail if the system primary language is Russian)
812 * WebCoreSupport.subproj/WebTextRenderer.m:
813 (-[WebTextRenderer xHeight]): Use glyphForCharacter() instead of -[NSFont glyphWithName:].
815 2006-01-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
817 Reviewed by Darin, landed by ap.
819 Test: fast/text/atsui-small-caps-punctuation-size.html
821 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6397
822 ATSUI small caps use small punctuation
824 * WebCoreSupport.subproj/WebTextRenderer.m:
825 (createATSULayoutParameters): Changed the characters for which size must
826 not change from !u_isbase() to the M* categories.
828 2006-01-06 John Sullivan <sullivan@apple.com>
830 Reviewed by Vicki Murley (full credit) and Tim Omernick (half credit).
832 - fixed <rdar://problem/4401102> REGRESSION (420+): When displaying a PDF, tabbing around stops working after reaching page
834 * WebView.subproj/WebPDFView.m:
835 (-[WebPDFView setNextKeyView:]):
836 Use [PDFSubview documentView] rather than PDFSubview here, since that's the view that we now hand off first-responderhood to.
838 2006-01-05 Tim Omernick <timo@apple.com>
842 <rdar://problem/4400804> Client-side redirect to a non-HTTP URL confuses Safari
844 * WebView.subproj/WebFrame.m:
845 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
846 If we were waiting for a quick redirect, but the policy delegate decided to ignore it, then we
847 need to report that the client redirect was cancelled.
849 2006-01-05 John Sullivan <sullivan@apple.com>
851 * WebView.subproj/WebPDFView.m:
852 (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
853 Just added a FIXME comment about how to clean up this minor hack in the future.
855 2006-01-05 John Sullivan <sullivan@apple.com>
860 <rdar://problem/3021785> page up/down don't work on frameset pages unless you click
861 <rdar://problem/3021788> Page Up/Down moves an unscrollable frame if you click on it first
863 and the WebKit part of this (need new Safari too for complete fix):
864 <rdar://problem/4378905> Page up/down don't work in PDFs when address field is focused
866 I moved some logic down from Safari that dealt with finding the largest scrollable child frame in a frameset,
867 and added support for standard scrolling-related selectors to WebPDFView. The latter was needed for 4378905;
868 the former was needed due to side effects of the Safari part of the change. As long as I was doing the former,
869 I also used that logic to fix 3021785 and 3021788.
871 * WebView.subproj/WebFrameViewPrivate.h:
872 new currently-private methods _hasScrollBars and _largestChildWithScrollBars
874 * WebView.subproj/WebFrameView.m:
875 (-[WebFrameView scrollToBeginningOfDocument:]):
876 if we don't have scroll bars, operate on our largest child with scroll bars instead
877 (-[WebFrameView scrollToEndOfDocument:]):
879 (-[WebFrameView _pageVertically:]):
881 (-[WebFrameView _pageHorizontally:]):
883 (-[WebFrameView _scrollLineVertically:]):
885 (-[WebFrameView _scrollLineHorizontally:]):
887 (-[WebFrameView keyDown:]):
888 where we were bailing out if ![self allowsScrolling], also check for whether there's a
889 child with scroll bars, and don't bail out if so
890 (-[WebFrameView _area]):
891 new helper method used to implement _largestChildWithScrollBars (code moved from Safari)
892 (-[WebFrameView _hasScrollBars]):
893 new method, just returns YES if either scroll bar is showing (code moved from Safari)
894 (-[WebFrameView _largestChildWithScrollBars]):
895 new method, returns the child with the largest area that is showing at least one scroll bar
896 (code moved from Safari and tweaked a little)
898 * WebView.subproj/WebPDFView.m:
899 (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
900 new method, hackaround for the fact that PDFView handles key downs from standard scrolling keys
901 but does not implement the standard responder selectors
902 (-[WebPDFView scrollPageDown:]):
903 use _fakeKeyEventWithFunctionKey: to get the PDFView to scroll appropriately
904 (-[WebPDFView scrollPageUp:]):
906 (-[WebPDFView scrollToBeginningOfDocument:]):
908 (-[WebPDFView scrollToEndOfDocument:]):
911 * WebView.subproj/WebView.m:
912 add scrollToBeginningOfDocument and scrollToEndOfDocument to the list of responder operations
913 that we hand off appropriately to the responder chain. These two aren't defined in any header
914 but are generated by Home and End keys and used by the text system.
916 2006-01-05 Geoffrey Garen <ggaren@apple.com>
920 - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6361
921 Add plugin support to DumpRenderTree
923 * WebKit.exp: export WebPluginDatabase class, which DumpRenderTree
924 needs to add plugins to the runtime.
926 2006-01-03 Maciej Stachowiak <mjs@apple.com>
930 - move frame management and finding code from WebKit to WebCore
931 http://bugzilla.opendarwin.org/show_bug.cgi?id=6368
933 * Plugins.subproj/WebBaseNetscapePluginView.m:
934 (-[WebBaseNetscapePluginView loadPluginRequest:]): Set frame name straight on the bridge,
935 instead of having it bubble through the view and frame.
936 * WebCoreSupport.subproj/WebBridge.m:
937 (-[WebBridge initWithFrameName:view:]): don't pass name to frame, we own it now; set it
938 on ourselves directly
939 (-[WebBridge findFrameNamed:]): removed
940 (-[WebBridge createWindowWithURL:frameName:]): set name on bridge, not webview
941 (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
942 (-[WebBridge runModal]): remove excess braces
943 * WebKit.xcodeproj/project.pbxproj:
944 * WebView.subproj/WebControllerSets.h: Removed.
945 * WebView.subproj/WebControllerSets.m: Removed.
946 * WebView.subproj/WebFrame.m:
947 (-[WebFramePrivate name]): removed
948 (-[WebFramePrivate setName:]): removed
949 (-[WebFramePrivate dealloc]): don't release name, we no longer have one
950 (-[WebFrame _appendChild:]): removed
951 (-[WebFrame _removeChild:]): removed
952 (-[WebFrame _createItem:]): removed stray space
953 (-[WebFrame _immediateChildFrameNamed:]): Just call the bridge
954 (-[WebFrame _setName:]): removed
955 (-[WebFrame _detachFromParent]): remove bridge from parent note self
956 (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
957 (-[WebFrame _addChild:]): Call appendChild: on bridge, not self
958 (-[WebFrame _nextFrameWithWrap:]): just call bridge (and moved helpers there)
959 (-[WebFrame _previousFrameWithWrap:]): just call bridge (and moved helpers there)
960 (-[WebFrame _initWithWebFrameView:webView:bridge:]): don't take a name any more
961 (-[WebFrame _setFrameNamespace:]): just call bridge
962 (-[WebFrame _frameNamespace]): just call bridge
963 (-[WebFrame _hasSelection]): remove excess braces
964 (-[WebFrame _clearSelection]): ditto
965 (-[WebFrame initWithName:webFrameView:webView:]): no more name
966 (-[WebFrame name]): just call bridge
967 (-[WebFrame findFrameNamed:]): just call bridge (and moved helpers there)
968 (-[WebFrame parentFrame]): fixed for new style
969 * WebView.subproj/WebFrameInternal.h:
970 * WebView.subproj/WebFramePrivate.h:
971 * WebView.subproj/WebView.m:
972 * WebView.subproj/WebViewPrivate.h:
974 2006-01-03 Darin Adler <darin@apple.com>
978 This is a fix for <rdar://problem/3710994> HiDPI: Link underlines are
979 still one pixel high even if the UI resolution is > 100%
981 This fix refactors -drawLineForCharacters to make its organization
982 more logical. It changes behavior when printing to the screen by
983 rounding the parameters of the line (x- and y-values, width, and
984 thickness) to integer boundaries in device space. Previously,
985 this part of the routine just hardcoded a 1 pixel line.
987 * WebCoreSupport.subproj/WebTextRenderer.m:
988 (drawHorizontalLine): This just takes care of drawing the line once everything
989 has been calculated in -drawLineForCharacters
990 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
991 Now takes device space into account. Calls drawHorizontalLine
993 2006-01-03 Maciej Stachowiak <mjs@apple.com>
997 - moved frame traversal code across from bridge, also dropped the children
1000 * WebCoreSupport.subproj/WebBridge.h:
1001 * WebCoreSupport.subproj/WebBridge.m:
1002 (-[WebBridge dealloc]): Don't release children array, that was moved
1004 (-[WebBridge saveDocumentState:]):
1005 - many methods moved to WebCore.
1006 * WebView.subproj/WebFrame.m:
1007 (Frame): New convenience method to get a WebFrame * from a method that
1008 returns WebCoreBridge *.
1009 (-[WebFrame _firstChildFrame]): use Frame()
1010 (-[WebFrame _lastChildFrame]): ditto
1011 (-[WebFrame _previousSiblingFrame]): ditto
1012 (-[WebFrame _nextSiblingFrame]): ditto
1013 (-[WebFrame _traverseNextFrameStayWithin:]): ditto
1015 2006-01-03 Anders Carlsson <andersca@mac.com>
1019 - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6357
1020 REGRESSION: iframe and target is broken
1022 * WebView.subproj/WebFrame.m:
1023 (-[WebFrame _descendantFrameNamed:sourceFrame:]):
1024 Return the correct frame.
1026 2006-01-02 Maciej Stachowiak <mjs@apple.com>
1030 - moved frame traversal logic from WebFrame to WebBridge
1031 http://bugzilla.opendarwin.org/show_bug.cgi?id=6341
1033 To do this, I had to invert the ownership so that WebBridge now
1034 owns WebFrame instead of vice versa. As a result, WebView now owns
1035 a WebBridge pointer and does not have a direct WebFrame pointer.
1037 * WebCoreSupport.subproj/WebBridge.h:
1038 * WebCoreSupport.subproj/WebBridge.m:
1039 (-[WebBridge initWithFrameName:view:]): The initializer is now responsible for creating
1040 the frame, so pass it what it needs to do that.
1041 (-[WebBridge dealloc]): The bridge now owns the frame, so release it.
1042 (-[WebBridge close]): ditto
1043 (-[WebBridge firstChild]): Moved from WebFrame
1044 (-[WebBridge lastChild]): ditto
1045 (-[WebBridge childCount]): ditto
1046 (-[WebBridge previousSibling]): ditto
1047 (-[WebBridge nextSibling]): ditto
1048 (-[WebBridge isDescendantOfFrame:]): ditto
1049 (-[WebBridge traverseNextFrameStayWithin:]): ditto
1050 (-[WebBridge appendChild:]): ditto
1051 (-[WebBridge removeChild:]): ditto
1052 * WebView.subproj/WebFrame.m:
1053 (-[WebFrame _removeChild::]): Call WebBridge version
1054 (-[WebFramePrivate dealloc]): ditto
1055 (-[WebFrame _firstChildFrame]): ditto
1056 (-[WebFrame _lastChildFrame]): ditto
1057 (-[WebFrame _childFrameCount]): ditto
1058 (-[WebFrame _previousSiblingFrame]): ditto
1059 (-[WebFrame _nextSiblingFrame]): ditto
1060 (-[WebFrame _traverseNextFrameStayWithin:]): ditto
1061 (-[WebFrame _appendChild:]): ditto
1062 (-[WebFrame _removeChild:]): ditto
1063 (-[WebFrame _isDescendantOfFrame:]): ditto,
1064 (-[WebFrame _detachFromParent]): reorder a bit to avoid losing our bridge
1065 pointer before the bridge is due to release us, and don't release the
1066 bridge any more since it now owns us
1067 (-[WebFrame _initWithName:webFrameView:webView:bridge:]): new initializer,
1068 we no longer create the bridge, instead it is passed in
1069 (-[WebFrame initWithName:webFrameView:webView:]): Call the new designated
1070 initializer, but this method is no longer viable and should be deprecated.
1071 * WebView.subproj/WebFrameInternal.h:
1073 * WebView.subproj/WebView.m: WebView was changed to hold onto
1074 the WebBridge for the main frame instead of the WebFrame.
1076 (-[WebViewPrivate dealloc]): update for the fact that we hold
1077 a bridge now, not a frame.
1078 (-[WebView _close]): ditto
1079 (-[WebView _createFrameNamed:inParent:allowsScrolling:]): Create
1080 a bridge, not a frame.
1081 (-[WebView _commonInitializationWithFrameName:groupName:]): ditto.
1082 (-[WebView setDefersCallbacks:]): get mainFrame via method
1083 (-[WebView mainFrame]): Update to get the main frame properly
1085 2005-12-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
1087 Reviewed by Darin, landed by ap.
1089 Test: fast/text/justified-text-rect.html
1091 - WebKit part of fix for
1092 http://bugzilla.opendarwin.org/show_bug.cgi?id=5461
1093 Text width measured incorrectly when text-align: justify
1095 * WebCoreSupport.subproj/WebTextRenderer.m:
1096 (-[WebTextRenderer selectionRectForRun:style:geometry:]): Added.
1097 (CG_drawHighlight): Use new function CG_selectionRect.
1098 (CG_selectionRect): New function to compute the selection rect.
1099 Eliminated rounding hackery that was required for keeping the highlight
1100 rect within the selection rect computed by
1101 InlineTextBox::selectionRect, since the latter uses this function now.
1102 The new selection rect is wider and matches AppKit more closely,
1103 although the right hand side is roundf()ed instead of cielf()ed for
1104 optimal caret positioning.
1105 (ATSU_drawHighlight): Use new function ATSU_selectionRect.
1106 (ATSU_selectionRect): New function to compute the selection rect.
1107 Much like CG_selectionRect.
1109 2005-12-29 Geoffrey Garen <ggaren@apple.com>
1113 Manual testcase added:
1114 WebCore/manual-tests/onunload-form-submit-crash.html
1116 - Fixed <rdar://problem/4268278> Submitting a form in onUnload event
1117 handler causes crash in -[WebDataSource(WebPrivate) _commitIfReady:]
1119 The problem is that the form submission in the unload event kicks off
1120 a new load in the midst of the load that caused the unload event to
1121 fire in the first place, so the two loads stomp each other.
1123 The solution is to cancel the first load and let the unload handler's
1124 load win. (Firefox does the same.)
1126 * WebView.subproj/WebFrame.m:
1127 (-[WebFrame _transitionToCommitted:]): Moved call to -closeURL up
1128 the call stack to _continueLoadRequest. (See below.) This has the
1129 side-effect of always firing the unload event, even if the new
1130 datasource never becomes committed, which seems like a good thing.
1132 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
1133 Call -closeURL here, instead of in _transitionToCommitted, so that the
1134 unload handler can fire before we initialize any part of the load.
1136 Check provisionalDataSource for nil to discover if the unload event
1137 kicked off its own load.
1139 Cleared up some coments.
1141 (-[WebFrame _detachFromParent]):
1142 It turns out that if you close the window instead of just navigating
1143 to a new page, you get an alternate assertion failure/crash because
1144 the load kicked off by the unload event handler generates resource
1145 loader callbacks after the associated WebFrame/WebView has disappeared.
1147 The nifty solution here is just to reverse the order of calls to
1148 -stopLoading and -closeURL, thus guaranteeing that -stopLoading has the
1149 last word when you close a window.
1151 2005-12-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
1153 Reviewed by Eric, committed by Maciej.
1155 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6288
1156 HEAD build broken 12/29/2005
1158 * WebCoreSupport.subproj/WebTextRenderer.m:
1159 (overrideLayoutOperation): Use previous character from the buffer
1160 instead of ch which may be uninitialized on the first iteration.
1162 2005-12-29 Maciej Stachowiak <mjs@apple.com>
1166 - finished frame traversal cleanup
1167 http://bugzilla.opendarwin.org/show_bug.cgi?id=6293
1169 * WebCoreSupport.subproj/WebBridge.m:
1170 (-[WebBridge childFrames]): Removed (this was unused)
1171 * WebView.subproj/WebFrame.m:
1172 (-[WebFrame _removeChild::]): Moved to FrameTraversal category.
1173 (-[WebFrame _childFrameCount]): New frame traversal method to avoid
1174 getting the count from the array directly.
1175 (-[WebFrame _appendChild:]): Factored out the parts of addChild: that
1176 seem directly relevant to adding a child.
1177 (-[WebFrame _removeChild:]): Moved to FrameTraversal category.
1178 (-[WebFrame _detachChildren]): Don't deallocate children array because
1179 there's no particular need to.
1180 (-[WebFrame _setDataSource:]): make the assert use _childFrameCount
1181 (-[WebFrame _opened]):
1182 (-[WebFrame _checkLoadComplete]): Instead of checking all frames starting
1183 from the main frame, check this frame and all ancestors. If a resource
1184 for a frame completes, that con only possibly finish loading for that
1185 frame and its ancestors, not any other frame in the tree.
1186 (-[WebFrame _recursiveCheckLoadComplete]): Removed, no longer needed.
1187 (-[WebFrame _childFramesMatchItem:]): Get child frame count in the new
1189 (-[WebFrame _internalChildFrames]): removed
1190 (-[WebFrame _addChild:]): Use _appendChild: for most of the work.
1191 (-[WebFrame _generateFrameName]): Get child frame count in the new
1193 (-[WebFrame _stopLoadingSubframes]): Use new frame traversal mechanisms,
1194 upon further consideration there's no need to copy part of the frame tree here.
1195 (-[WebFrame findFrameNamed:]): Remove extra braces.
1196 (-[WebFrame childFrames]): Make a new array using the frame traversal methods.
1197 * WebView.subproj/WebFramePrivate.h: Remove some methods.
1198 * WebView.subproj/WebMainResourceLoader.m:
1199 (-[WebMainResourceLoader didReceiveResponse:]): Do _checkLoadComplete on the current
1200 frame not the main frame (before there was no difference and now the new version is
1202 * WebView.subproj/WebView.m:
1203 (-[WebView _finishedLoadingResourceFromDataSource:]): Remove stray space
1204 (-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]): Remove stray spaces
1205 and update FIXME comment.
1206 (-[WebView _receivedError:fromDataSource:]): Remove stray space
1208 2005-12-29 Maciej Stachowiak <mjs@apple.com>
1212 - abstract frame traversal in WebFrame more
1213 http://bugzilla.opendarwin.org/show_bug.cgi?id=6283
1215 Rewrote most of the frame traversal code in WebFrame to use DOM-style
1216 first/last/next/previous methods, to abstract access better in preparation
1219 As an added bonus, many formerly recursive methods are now iterative.
1221 * WebKit.xcodeproj/project.pbxproj: Use gnu99 dialect of C, so that
1222 variables can be declared in for loop initializers.
1224 - added new frame traversal methods, to avoid dealing with the children array
1227 * WebView.subproj/WebFrame.m:
1228 (-[WebFrame _firstChildFrame]): New method.
1229 (-[WebFrame _lastChildFrame]): New method.
1230 (-[WebFrame _previousSiblingFrame]): New method.
1231 (-[WebFrame _nextSiblingFrame]): New method.
1232 (-[WebFrame _traverseNextFrameStayWithin:]): Like traverseNextNode() in the DOM;
1233 uses some of the previous.
1235 - apply the new methods
1237 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): Rewrite loop
1238 to use new traversal methods.
1239 (-[WebFrame _immediateChildFrameNamed:]): ditto, also added FIXME
1240 (-[WebFrame _setName:]): Improved comment, removed gratuitous brace
1241 (-[WebFrame _isDescendantOfFrame:]): Rewrote to chase parent pointers instead
1242 of looking in child arrays (duh)
1243 (-[WebFrame _detachChildren]): Rewrite loop to use new traversal methods,
1244 still walk backwards for now.
1245 (-[WebFrame _closeOldDataSources]): Rewrite using new traversal methods.
1246 (-[WebFrame _childFramesMatchItem:]): ditto
1247 (-[WebFrame _defersCallbacksChanged]): ditto
1248 (-[WebFrame _viewWillMoveToHostWindow:]): ditto
1249 (-[WebFrame _viewDidMoveToHostWindow]): ditto
1250 (-[WebFrame _addChild:]): don't use childFrames method
1251 (-[WebFrame _removeChild:]): Clear out the sibling pointers after unlinking from the list,
1252 not obvious if anything needs this but it seems like the right thing to do.
1253 (-[WebFrame _generateFrameName]): don't bother to nil-check children array, since
1254 calling count on nil still gives 0.
1255 (-[WebFrame _saveDocumentAndScrollState]): Rewrite to use frame traversal methods
1256 (-[WebFrame _deepLastChildFrame]): renamed from _lastChildFrame, rewrite to use child
1258 (-[WebFrame _nextFrameWithWrap:]): Use new frame traversal stuff (mostly just
1259 a thin wrapper on _traverseNextFrameStayWithin:
1260 (-[WebFrame _previousFrameWithWrap:]): Use new traversal functions
1261 (-[WebFrame _numPendingOrLoadingRequests:]): Rewrite loop with new tracrsal functions
1262 (-[WebFrame _reloadForPluginChanges]): ditto
1263 (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): ditto
1264 (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): ditto
1265 (-[WebFrame _documentViews]): ditto
1266 (-[WebFrame _updateDrawsBackground]): ditto
1267 (-[WebFrame _unmarkAllMisspellings]): ditto
1268 (-[WebFrame _atMostOneFrameHasSelection]): ditto
1269 (-[WebFrame _findFrameWithSelection]): ditto
1270 (-[WebFrame _stopLoadingSubframes]): ditto
1271 (-[WebFrame _subframeIsLoading]): ditto
1272 (-[WebFrame _descendantFrameNamed:sourceFrame:]): ditto
1274 2005-12-29 Darin Adler <darin@apple.com>
1276 * WebView.subproj/WebFrameView.m: (-[WebFrameViewPrivate dealloc]):
1277 Removed unused "draggingTypes" instance variable.
1279 2005-12-29 Mitz Pettel <opendarwin.org@mitzpettel.com>
1283 Test: fast/text/atsui-spacing-features.html
1285 - WebKit part of fix for
1286 http://bugzilla.opendarwin.org/show_bug.cgi?id=3922
1287 Variable word/letter spacing and full justification not supported for
1290 * WebCoreSupport.subproj/WebTextRenderer.m:
1291 (overrideLayoutOperation): Add letter- and word-spacing and padding for
1293 (createATSULayoutParameters): Compute padding per space.
1295 2005-12-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
1297 Reviewed by Maciej, landed by Darin.
1299 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4844
1300 Render "simple" Hebrew using the CG codepath
1302 * WebCoreSupport.subproj/WebTextRenderer.m: (shouldUseATSU): Exclude Hebrew letters and maqaf.
1304 2005-12-25 Maciej Stachowiak <mjs@apple.com>
1308 - Remove WebFrame's parent frame pointer, instead rely on WebCore's parent concept
1309 http://bugzilla.opendarwin.org/show_bug.cgi?id=6241
1311 * WebCoreSupport.subproj/WebBridge.h:
1312 * WebCoreSupport.subproj/WebBridge.m:
1313 (-[WebBridge canTargetLoadInFrame:]): Use bridge parent method instead of needlessly
1314 asking for parent via WebFrame
1315 (-[WebBridge frameDetached]): Don't call _removeChild on the parent frame any more
1316 because WebFame's _detachFromParent takes care of that now.
1317 * WebView.subproj/WebFrame.m:
1318 (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]): Fix stray spaces
1319 (-[WebFrame _detachChildren]): Don't remove children as we loop any more, they
1320 can remove themselves.
1321 (-[WebFrame _detachFromParent]): Remove self from parent; don't nil out bridge
1322 until we are done with it.
1323 (-[WebFrame _transitionToCommitted:]): Remove some extra braces.
1324 (-[WebFrame _goToItem:withLoadType:]): Use parentFrame method in assert instead of parent
1326 (-[WebFrame _addChild:]): Don't poke at parent frame pointer in _private
1327 since it is not there any more.
1328 (-[WebFrame _removeChild:]): Remove extra braces and don't clear parent pointer
1329 explicitly any more.
1330 (-[WebFrame _addFramePathToString:]): Get parentFrame from method, not field.
1331 (-[WebFrame _loadDataSource:withLoadType:formState:]): Remove extra braces.
1332 (-[WebFrame _nextFrameWithWrap:]): Get parent in the proper way and clean up the
1334 (-[WebFrame _previousFrameWithWrap:]): Ditto.
1335 (-[WebFrame parentFrame]): Get parent from the bridge.
1337 2005-12-25 Maciej Stachowiak <mjs@apple.com>
1341 - fixed REGRESSION: world leak of WebDataSource
1342 http://bugzilla.opendarwin.org/show_bug.cgi?id=6242
1344 * WebView.subproj/WebDataSource.m:
1345 (-[WebDataSource _stopLoading]): don't retain self until after
1346 the possible early return.
1348 2005-12-24 Maciej Stachowiak <mjs@apple.com>
1352 - rearrange some code in WebDataSource so that more of the frame traversal logic
1353 is in WebFrame, in preparation for moving it down to WebBridge.
1354 http://bugzilla.opendarwin.org/show_bug.cgi?id=6239
1356 * WebView.subproj/WebDataSource.m:
1357 (-[WebDataSource _archiveWithMarkupString:nodes:]): Assert that the
1358 data source is committed, doesn't make sense to archive otherwise.
1359 (-[WebDataSource _subframeArchivesWithCurrentState:]): New helper method.
1360 (-[WebDataSource _archiveWithCurrentState:]): Assert that the data source
1361 is committed. Use the helper.
1362 (-[WebDataSource _setWebView:]): Comment that we won't tell subframes that
1363 defers callback changed.
1364 (-[WebDataSource _startLoading]): Remove stray space.
1365 (-[WebDataSource _stopLoading]): Only handle local _stopLoading business.
1366 Cound on WebFrame to tell subframes to stop loading. Fold in _stopLoadingInternal
1367 and remove _recursiveStopLoading.
1368 (-[WebDataSource _startLoading:]): Clean up an assert slightly.
1369 (-[WebDataSource _setTitle:]): Remove stray spaces.
1370 (-[WebDataSource _defersCallbacksChanged]): Don't call subframes. WebFrame
1372 (-[WebDataSource isLoading]): Move checking of subframes down to WebFrame.
1373 (-[WebDataSource webArchive]): Return nil if the data source is not yet
1374 committed. It makes no sense to archive a provisional data source since it
1376 (-[WebDataSource addSubresource:]): Replace an assert with an early return,
1377 ASSERT is not an appropriate way to flag problems with the argument of a public
1379 * WebView.subproj/WebDataSourcePrivate.h:
1380 * WebView.subproj/WebFrame.m:
1381 (-[WebFrame _setLoadType:]): Remove stray space.
1382 (-[WebFrame _checkLoadCompleteForThisFrame]): Stop loading subframes
1383 manually and add a FIXME about confusingness of stopping loading here.
1384 (-[WebFrame _defersCallbacksChanged]): Tell our subframes.
1385 (-[WebFrame _addChild:]): Remove stray space.
1386 (-[WebFrame _stopLoadingSubframes]): New helper method.
1387 (-[WebFrame _subframeIsLoading]): New helper method, code moved
1389 (-[WebFrame stopLoading]): Tell subframes to stop loading.
1390 (-[WebFrame reload]): Remove extra braces.
1391 * WebView.subproj/WebFrameInternal.h:
1393 2005-12-23 Maciej Stachowiak <mjs@apple.com>
1397 - move more frame tree traversal code from WebView to WebFrame
1399 * WebView.subproj/WebFrame.m:
1400 (-[WebFrame _atMostOneFrameHasSelection]): Moved this debug
1401 method from WebView, renamed it and changed it to return a boolean
1402 so it is appropriate for use in assertions instead of giving its own
1404 (-[WebFrame _accumulateFramesWithSelection:]): Helper for the above.
1405 (-[WebFrame _findFrameWithSelection]): Moved from WebView and renamed from
1406 _findSelectedFrame, also removed the skipping variant.
1407 (-[WebFrame _clearSelectionInOtherFrames]): Moved from WebView and
1408 changed how the logic works. Instead of clearing selection in any frame
1409 but the focus frame, it clears selection in all but this one.
1410 * WebView.subproj/WebFrameInternal.h:
1411 * WebView.subproj/WebHTMLView.m:
1412 (-[WebHTMLView becomeFirstResponder]): Call _clearSelectionInOtherFrames
1413 * WebView.subproj/WebPDFView.m:
1414 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Stop getting WebFrame
1415 in needlessly roundabout way.
1416 (-[WebPDFView becomeFirstResponder]): Call _clearSelectionInOtherFrames
1417 * WebView.subproj/WebTextView.m:
1418 (-[WebTextView _webFrame]): New helper method.
1419 (-[WebTextView _elementAtWindowPoint:]): Use it.
1420 (-[WebTextView becomeFirstResponder]): Call _clearSelectionInOtherFrames
1421 (-[WebTextView resignFirstResponder]): Fix style issue
1422 (-[WebTextView clickedOnLink:atIndex:]): Use new helkper
1423 * WebView.subproj/WebView.m:
1424 (-[WebView selectedFrame]): Call to WebFrame as appropriate
1425 (-[WebView _selectedOrMainFrame]): Fix style issue
1426 * WebView.subproj/WebViewInternal.h:
1428 2005-12-22 Maciej Stachowiak <mjs@apple.com>
1432 - move a few more methods from WebView to WebFrame.
1434 * WebView.subproj/WebFrame.m:
1435 (-[WebFrame _hasSelection]): Renamed from _frameIsSelected: and moved from
1437 (-[WebFrame _clearSelection]): Renamed from _deselectFrame: and moved from
1439 * WebView.subproj/WebFrameInternal.h:
1440 * WebView.subproj/WebView.m:
1441 (-[WebView searchFor:direction:caseSensitive:wrap:]): Update for renames.
1442 (-[WebView _findSelectedFrameStartingFromFrame:skippingFrame:]): Ditto.
1443 (-[WebView _debugCollectSelectedFramesIntoArray:startingFromFrame:]): Ditto.
1444 (-[WebView _selectedFrameDidChange]):
1446 2005-12-21 Timothy Hatcher <timothy@apple.com>
1448 * WebKit.xcodeproj/project.pbxproj:
1449 Set tab width to 8, indent width to 4 and uses tabs to false per file.
1451 2005-12-20 Alexey Proskuryakov <ap@nypop.com>
1455 <http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
1456 -[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
1458 * WebView.subproj/WebHTMLView.m:
1459 (-[WebHTMLView firstRectForCharacterRange:]):
1460 Handle some large unsigned values the way NSTextView does.
1461 Actually use the range passed in instead of _selectedRange,
1462 use of _selectedRange was a workaround that is no longer necessary.
1464 2005-12-20 John Sullivan <sullivan@apple.com>
1466 Reviewed by Darin Adler.
1468 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6146
1469 (REGRESSION: Bold font used for Google search result pages is too thick)
1471 This is a problem with a particular font that was installed by Microsoft Office X. Though the
1472 font and/or lower levels of font-handling code in the system are buggy, this bad symptom will
1473 occur for users of Safari and other WebKit clients who happen to have one of these bad fonts.
1474 This adds a workaround to avoid the problem.
1476 * WebCoreSupport.subproj/WebTextRendererFactory.m:
1477 (-[WebTextRendererFactory fontWithFamilies:traits:size:]):
1478 When we're going to synthesize bold or italic, yet the font we looked up was apparently a
1479 match for the traits, try to look up a font that without the to-be-synthesized traits.
1480 This way, instead of applying synthetic bold over Arial Bold, we'll apply synthetic
1481 bold over Arial Regular, which is uglier than just using Arial Bold, but far less ugly
1482 than using Arial Bold with synthetic bold too.
1484 2005-12-16 Justin Garcia <justin.garcia@apple.com>
1486 <rdar://problem/4103393> Frequent Safari crash on lexisnexus.com (khtml::Selection::xPosForVerticalArrowNavigation)
1487 <rdar://problem/4330451> CrashTracer: [REGRESSION] 2235 crashes in Safari at com.apple.WebCore: khtml::Selection::xPosForVerticalArrowNavigation const 436
1491 WebCore will crash when a selection that starts or ends in a node
1492 that has been removed from the document is modify()d. This can occur:
1493 (1) in non-editable regions (4103393 and 4330451), (2) in editable
1494 regions (4383146) as the result of arbitrary DOM operations, and (3) in
1495 Mail (4099739) as the result of an editing operation that sets a
1496 bad ending selection.
1498 Crashes of type (1) can occur when the user uses the arrow keys
1499 to interact with a web app, or when the user tries to use
1500 command-shift-arrow to switch tabs (this is a depricated
1501 combo that will work if no one else responds to it). The easiest
1502 way to fix these crashes is to disallow editing'ish selection changes
1503 like moveDown:, selectWord:, pageDown:, etc, when the selection
1504 is in a non-editable region.
1506 Crashes of type (2) will require a more complicated fix (but occur
1507 much less often than type (1)). Crashes of type (3) must be
1508 fixed by tracking down the editing operation that sets bad selections.
1510 Added a layout-test:
1511 * editing/selection/selection-actions.html
1513 * WebView.subproj/WebHTMLView.m:
1514 (-[WebHTMLView _canAlterCurrentSelection]):
1515 (-[WebHTMLView _alterCurrentSelection:direction:granularity:]):
1516 (-[WebHTMLView _alterCurrentSelection:verticalDistance:]):
1517 (-[WebHTMLView _expandSelectionToGranularity:]):
1518 * WebView.subproj/WebHTMLViewPrivate.h:
1520 2005-12-20 Justin Garcia <justin.garcia@apple.com>
1524 Fixed more uninitialized variable warnings, and
1525 removed an extra semicolon.
1527 * WebCoreSupport.subproj/WebTextRenderer.m:
1528 (overrideLayoutOperation):
1529 (createATSULayoutParameters):
1531 2005-12-20 Maciej Stachowiak <mjs@apple.com>
1535 - push more of frame lookup and management from WebView to
1536 WebFrame, this is in preparation for shifting this to WebCore
1537 http://bugzilla.opendarwin.org/show_bug.cgi?id=6163
1539 * WebCoreSupport.subproj/WebBridge.m:
1540 (-[WebBridge closeWindowSoon]): Adjust for change to WebFrameNamespaces
1541 (-[WebBridge runModal]): ditto
1542 * WebView.subproj/WebControllerSets.h:
1543 * WebView.subproj/WebControllerSets.m:
1544 (+[WebFrameNamespaces addFrame:toNamespace:]): This now operates in terms
1545 of WebFrames (expected to be the main frame) not WebViews.
1546 (+[WebFrameNamespaces framesInNamespace:]): Ditto.
1547 * WebView.subproj/WebFrame.m:
1548 (-[WebFrame _setFrameNamespace:]): Set self, not WebView.
1549 (-[WebFrame _shouldAllowAccessFrom:]): Moved this code above use
1550 to avoid prototyping the method.
1551 (-[WebFrame _descendantFrameNamed:sourceFrame:]): Ditto.
1552 (-[WebFrame _frameInAnyWindowNamed:sourceFrame:]): Copied logic
1554 (-[WebFrame findFrameNamed:]): Do it all here, don't call WebView.
1555 * WebView.subproj/WebFramePrivate.h:
1556 * WebView.subproj/WebView.m:
1557 * WebView.subproj/WebViewPrivate.h:
1559 2005-12-20 Geoffrey Garen <ggaren@apple.com>
1563 Fixed build failure due to missing 'b's in my last checkin.
1565 * WebCoreSupport.subproj/WebBridge.m:
1566 (-[WebBridge isStatusbarVisible]): changed 'B' to 'b'
1567 (-[WebBridge setStatusbarVisible:]): ditto
1569 2005-12-20 Mitz Pettel <opendarwin.org@mitzpettel.com>
1571 Reviewed by Darin, committed by Adele.
1573 - fix deployment builds broken by the ATSUI multiple renderers patch
1574 http://bugzilla.opendarwin.org/show_bug.cgi?id=6153
1576 * WebCoreSupport.subproj/WebTextRenderer.m:
1577 (createATSULayoutParameters): Assign initial values, which will never be used,
1578 to substituteRenderer and firstSmallCap, to avoid uninitialized variable warnings.
1580 2005-12-20 Geoffrey Garen <ggaren@apple.com>
1584 Part of fix for <rdar://problem/4310363> JavaScript window.open: Height
1585 is 1 pixel short, and related bugs. See WebCore ChageLog.
1587 * WebCoreSupport.subproj/WebBridge.m:
1588 (-[WebBridge webView]): Added method.
1590 2005-12-20 Eric Seidel <eseidel@apple.com>
1594 Development-only build fix.
1596 * WebView.subproj/WebFrame.m:
1597 (-[WebFramePrivate dealloc]): fixed typo
1599 2005-12-20 Maciej Stachowiak <mjs@apple.com>
1603 - revert accidental commit of this file.
1605 2005-12-19 Maciej Stachowiak <mjs@apple.com>
1609 - Move handling of frame namespaces down to WebFrame.
1610 - Put some internal class declarations in the implementation file.
1612 * WebView.subproj/WebControllerSets.m:
1613 (+[WebFrameNamespaces addWebView:toFrameNamespace:]):
1614 (+[WebFrameNamespaces webViewsInFrameNamespace:]):
1615 * WebView.subproj/WebFrame.m:
1616 (-[WebFramePrivate dealloc]):
1617 (-[WebFrame _setFrameNamespace:]):
1618 (-[WebFrame _frameNamespace]):
1619 * WebView.subproj/WebFrameInternal.h:
1620 * WebView.subproj/WebFramePrivate.h:
1621 * WebView.subproj/WebView.m:
1622 (-[WebView _close]):
1623 (-[WebView _findFrameNamed:sourceFrame:]):
1624 (-[WebView setGroupName:]):
1625 (-[WebView groupName]):
1626 * WebView.subproj/WebViewInternal.h:
1628 2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
1630 Reviewed by Darin, committed by Adele.
1632 Test: fast/text/atsui-multiple-renderers.html
1634 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6139
1635 ATSUI code path should implement small caps, synthetic bold and oblique and correct metrics for fallback fonts
1637 * WebCoreSupport.subproj/WebTextRenderer.m:
1638 (overrideLayoutOperation): Fetch renderer info from the renderers array;
1639 add synthetic bold offset; render only synthetic bold in the synthetic bold pass.
1640 (drawGlyphs): Replaced 14 with new SYNTHETIC_OBLIQUE_ANGLE define.
1641 (initializeATSUStyle): Apply a skewing transform for synthetic oblique.
1642 (createATSUTextLayout): Merged into createATSUTextLayout.
1643 (createATSULayoutParameters): Merged in createATSUTextLayout; allocate
1644 and fill a renderers array and a character buffer for small caps and mirroring;
1645 (applyMirroringToRun): Merged into createATSULayoutParameters.
1646 (ATSU_drawHighlight): Deleted mirroring code.
1647 (ATSU_draw): Deleted mirroring code; added second pass for synthetic bold.
1648 (ATSU_pointToOffset): Deleted mirroring code.
1650 2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
1652 Reviewed by Darin, committed by Adele.
1654 Test: fast/text/atsui-kerning-and-ligatures.html
1656 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6137
1657 Disable kerning and some ligatures in the ATSUI code path
1659 * WebCoreSupport.subproj/WebTextRenderer.m:
1660 (initializeATSUStyle): Disable kerning; disable ligatures unless the font
1661 does not contain 'a', in which case it is assumed to never be rendered
1662 by the CG code path.
1664 2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
1666 Reviewed by Darin, committed by Adele.
1668 Test: fast/text/should-use-atsui.html
1670 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6132
1671 Incorrect selection highlighting for ATSUI text when selected range is "CG-safe"
1673 * WebCoreSupport.subproj/WebTextRenderer.m:
1674 (shouldUseATSU): Always start scanning from 0 since drawing and
1675 highlighting also measure everything up to run->from.
1677 2005-12-17 Maciej Stachowiak <mjs@apple.com>
1679 Rubber stamped by Eric.
1681 - remove some unused SPI headers.
1683 * DOM.subproj/WebDOMDocument.h: Removed.
1684 * DOM.subproj/WebDOMElement.h: Removed.
1685 * DOM.subproj/WebDOMNode.h: Removed.
1686 * WebKit.xcodeproj/project.pbxproj:
1688 2005-12-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
1690 Reviewed and landed by Darin.
1692 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5479
1693 Can't select text with RTL override rendered by ATSUI
1695 * WebCoreSupport.subproj/WebTextRenderer.m:
1696 (overrideLayoutOperation): Update since the layout only includes from -> to now.
1697 (-[WebTextRenderer pointToOffset:style:position:includePartialGlyphs:]): Remove
1699 (CG_floatWidthForRun): Add code to handle RTL case.
1700 (addDirectionalOverride): Put the override around the entire run.
1701 (ATSU_drawHighlight): Rearrange and reuse ATSU_floatWidthForRun for more of the work.
1703 (ATSU_pointToOffset): Remove reversed parameter and run swapping.
1704 (CG_pointToOffset): Remove reversed parameter, using rtl flag in style instead.
1706 2005-12-16 Evan Gross <evan@rainmakerinc.com>
1708 Reviewed and landed by Darin.
1710 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4680
1711 WebHTMLView (WebNSTextInputSupport) - attributedSubstringFromRange "not yet implemented"
1713 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView attributedSubstringFromRange:]):
1714 Implement by calling the same RTF conversion used when copying to the pasteboard.
1716 2005-12-16 Mitz Pettel <opendarwin.org@mitzpettel.com>
1718 Reviewed and landed by Darin.
1720 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6090
1721 REGRESSION: Assertion failure when choosing Copy from a WebImageView's contextual menu
1723 * WebView.subproj/WebImageView.m:
1724 (-[WebImageView elementAtPoint:]): Use WebCoreElementImageRendererKey
1725 for the image renderer and WebElementImageKey for the image.
1727 2005-12-15 Maciej Stachowiak <mjs@apple.com>
1731 - remove _frameForView: method from WebView and replace with a direct pointer on the WebFrameView in the WebFrame
1733 * Misc.subproj/WebNSViewExtras.m:
1734 * WebView.subproj/WebFrame.m:
1735 (-[WebFrame _detachFromParent]):
1736 (-[WebFrame _loadDataSource:withLoadType:formState:]):
1737 (-[WebFrame initWithName:webFrameView:webView:]):
1738 * WebView.subproj/WebFrameView.m:
1739 (-[WebFrameView _setWebFrame:]):
1740 (-[WebFrameView webFrame]):
1741 * WebView.subproj/WebFrameViewInternal.h:
1742 * WebView.subproj/WebView.m:
1743 * WebView.subproj/WebViewPrivate.h:
1745 2005-12-13 Maciej Stachowiak <mjs@apple.com>
1749 - remove the dead _frameForDataSource: method (WebDataSource now knows its WebFrame)
1750 http://bugzilla.opendarwin.org/show_bug.cgi?id=6072
1752 * WebView.subproj/WebView.m:
1753 * WebView.subproj/WebViewPrivate.h:
1755 === Safari-521~5 ===
1757 2005-12-12 Timothy Hatcher <timothy@apple.com>
1759 Reviewed by nobody, simple build fix.
1761 Fixes a couple ambiguous selector build errors when building with GCC 3.3.
1763 * Misc.subproj/WebIconDatabase.m:
1764 (-[WebIconDatabase releaseIconForURL:]):
1765 * WebView.subproj/WebHTMLView.m:
1766 (-[NSView _web_layoutIfNeededRecursive:testDirtyRect:]):
1767 (-[NSArray elementAtPoint:]):
1769 2005-12-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
1771 Reviewed and checked in by John Sullivan.
1773 Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=6053
1774 WebIconDatabase returns the Accessibility Verifier app icon instead of
1775 a generic document icon
1777 * Misc.subproj/WebIconDatabase.m:
1778 (-[WebIconDatabase _iconForFileURL:withSize:]):
1779 use file type iconForFileType:NSFileTypeForHFSTypeCode(kGenericDocumentIcon) instead of '????'
1780 to get the generic document icon.
1782 2005-12-12 John Sullivan <sullivan@apple.com>
1784 Reviewed by Tim Omernick.
1786 - Made protocol <WebDocumentSelection> include protocol <WebDocumentText>, for clarity.
1787 This required moving some methods from WebTextView, which conformed to <WebDocumentText>,
1788 up into superclass WebSearchableTextView, which conformed to <WebDocumentSelection>.
1790 * Misc.subproj/WebSearchableTextView.m:
1791 (-[NSString supportsTextEncoding]):
1792 moved this method (unchanged) from subclass WebTextView
1793 (-[NSString string]):
1795 (-[NSString attributedString]):
1797 (-[NSString selectedString]):
1799 (-[NSString selectedAttributedString]):
1801 (-[NSString selectAll]):
1803 (-[NSString deselectAll]):
1806 * WebView.subproj/WebDocumentPrivate.h:
1807 made <WebDocumentSelection> incorporate <WebDocumentText> rather than just <NSObject>
1808 * WebView.subproj/WebHTMLView.h:
1809 removed <WebDocumentText> from protocol list since it's covered by <WebDocumentSelection>
1810 * WebView.subproj/WebPDFView.h:
1812 * WebView.subproj/WebTextView.h:
1814 * WebView.subproj/WebTextView.m:
1815 removed the methods that were moved into WebSearchableTextView.m
1817 2005-12-10 Darin Adler <darin@apple.com>
1819 Reviewed by John Sullivan.
1821 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6032
1822 REGRESSION: Uncaught exception when image is dragged out of webpage
1824 * WebView.subproj/WebHTMLView.m:
1825 (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
1826 Pass the image renderer, not the NSImage.
1827 (-[WebHTMLView elementAtPoint:]): Add an NSImage to the dictionary, which now comes from
1828 WebCore with only an image renderer.
1829 * WebView.subproj/WebView.m: (-[WebView _writeImageElement:withPasteboardTypes:toPasteboard:]):
1830 Pass the image renderer, not the NSImage.
1832 2005-12-10 Darin Adler <darin@apple.com>
1834 Was getting build failures related to "count" methods.
1835 Made Tim's build fix Leopard-only.
1837 * WebView.subproj/WebPreferencesPrivate.h: Go back to <PDFKit/PDFKit.h> on Tiger.
1839 2005-12-09 John Sullivan <sullivan@apple.com>
1841 Reviewed by Adele Peterson.
1843 - fixed <rdar://problem/4373905> Cannot paste in Tiger Mail using TOT WebKit
1845 * WebView.subproj/WebView.m:
1846 (-[WebView _frameForCurrentSelection]):
1847 I removed this method many moons ago when restructuring the code involving frames and selection.
1848 Too bad Mail was still using it (d'oh!). In Leopard Mail has updated to use newer SPI (which should
1849 become API), but to continue to work with Mail on Tiger we need this method to be around. Now it's
1850 just a cover for the method _selectedOrMainFrame, to which it was renamed so very long ago.
1852 2005-12-09 Tim Omernick <timo@apple.com>
1854 Reviewed by John Sullivan.
1856 * Carbon.subproj/HIWebView.m:
1857 (UpdateCommandStatus):
1858 Don't call -performSelector:withObject: on a method that returns a BOOL; this is not guaranteed to work on all architectures.
1859 -performSelector:withObject:'s return value should only be checked if the method returns an object.
1861 2005-12-09 Timothy Hatcher <timothy@apple.com>
1863 Reviewed by nobody, build fix.
1865 Using <PDFKit/PDFKit.h> was causing build failures for the Mail team.
1866 The comment about getting an ambiguous signature conflict anywhere the
1867 method "count" is used seems to no longer be an issue.
1869 * WebView.subproj/WebPreferencesPrivate.h: Use <Quartz/Quartz.h>
1871 2005-12-08 John Sullivan <sullivan@apple.com>
1873 Reviewed by Tim Hatcher.
1875 Some cleanup of how selection rects are associated with NSViews.
1877 * WebView.subproj/WebDocumentPrivate.h:
1878 Added a -selectionView method to <WebDocumentSelection>, and clarified that the
1879 selectionRect is in the coordinate system of this view.
1881 * Misc.subproj/WebSearchableTextView.m:
1882 (-[WebSearchableTextView selectionView]):
1883 new method, returns self
1885 * WebView.subproj/WebHTMLView.m:
1886 (-[WebHTMLView selectionView]):
1887 new method, returns self
1889 * WebView.subproj/WebPDFView.m:
1890 (-[WebPDFView selectionRect]):
1891 translate result into coordinate system of [PDFSubview documentView]
1892 (-[WebPDFView selectionView]):
1893 new method, returns [PDFSubview documentView]
1895 2005-12-08 John Sullivan <sullivan@apple.com>
1897 Reviewed by Tim Omernick and Dave Hyatt.
1899 - fixed these semi-legendary bugs:
1900 <rdar://problem/4032405> Inline PDF doesn't get keyboard focus like web pages do, so can't scroll with keys without clicking
1901 <rdar://problem/4265684> PDFs use secondary selection when displaying found text (4748)
1903 * WebView.subproj/WebPDFView.m:
1904 (-[WebPDFView becomeFirstResponder]):
1905 Discovered that there is indeed PDFKit API for accessing the view that becomes focused; now
1906 passes the focus down to that view.
1908 2005-12-08 John Sullivan <sullivan@apple.com>
1910 Reviewed by Tim Omernick.
1912 - Added WebKit mechanism to help correctly pass the first responder into the PDF view hierarchy,
1913 in order to start addressing keyboard focus and selection highlight issues. Unfortunately this
1914 doesn't actually have any user effect yet due to problems that must be fixed in PDFKit.
1916 * WebView.subproj/WebPDFView.m:
1917 (-[WebPDFView acceptsFirstResponder]):
1918 Overridden to returns YES. Needed so NSClipView knows it's OK to pass focus down to this level.
1919 (-[WebPDFView becomeFirstResponder]):
1920 With setNextKeyView:, splices the PDF view into the focus-passing mechanism in much the same
1921 way as NSScrollView and NSClipView.
1922 (-[WebPDFView setNextKeyView:]):
1923 With becomeFirstResponder:, splices the PDF view into the focus-passing mechanism in much the same
1924 way as NSScrollView and NSClipView.
1925 (-[WebPDFView resignFirstResponder]):
1926 Removed this method because the WebPDFView itself is never first responder except transiently.
1928 2005-12-08 Maciej Stachowiak <mjs@apple.com>
1932 - some small changes towards frame tree refactoring
1934 Renamed WebViewSets to WebFrameNamespaces, and put the method for
1935 performing a selector on all extant WebViews to WebView itself,
1936 with a separate set tracking live WebViews. This should allow
1937 moving the storage of this info down to WebCore more easily.
1939 * WebCoreSupport.subproj/WebBridge.m:
1940 (-[WebBridge closeWindowSoon]):
1941 (-[WebBridge runModal]):
1942 * WebCoreSupport.subproj/WebViewFactory.m:
1943 (-[WebViewFactory refreshPlugins:]):
1944 * WebView.subproj/WebControllerSets.h:
1945 * WebView.subproj/WebControllerSets.m:
1946 (+[WebFrameNamespaces addWebView:toFrameNamespace:]):
1948 (+[WebFrameNamespaces webViewsInFrameNamespace:]):
1949 * WebView.subproj/WebView.m:
1950 (+[WebView _makeAllWebViewsPerformSelector:]):
1951 (-[WebView _removeFromAllWebViewsSet]):
1952 (-[WebView _addToAllWebViewsSet]):
1953 (-[WebView _close]):
1954 (-[WebView _findFrameNamed:sourceFrame:]):
1955 (-[WebView _commonInitializationWithFrameName:groupName:]):
1956 (-[WebView setGroupName:]):
1957 * WebView.subproj/WebViewInternal.h:
1959 2005-12-08 Darin Adler <darin@apple.com>
1963 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5689
1964 add support for CSS "custom cursors" (cursor images)
1966 * WebCoreSupport.subproj/WebImageRenderer.h: Remove declaration of TIFFRepresentation and
1967 image methods since both are required by the WebCoreImageRenderer protocol now and we don't
1968 have to re-declare them.
1970 * Misc.subproj/WebNSPasteboardExtras.m: Add an import of the WebCoreImageRenderer.h file
1971 since we need to use methods inherited from that protocol.
1972 * Misc.subproj/WebNSViewExtras.m: Ditto.
1973 * WebCoreSupport.subproj/WebImageRenderer.m: Ditto. (Use and implement.)
1975 2005-12-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
1977 Reviewed by Maciej, landed by Darin.
1979 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5878
1980 REGRESSION (WebTextRenderer.m r1.201): pointToOffset always takes the CG code path
1982 * WebCoreSupport.subproj/WebTextRenderer.m:
1983 (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]):
1984 Added the missing "return".
1986 2005-12-07 John Sullivan <sullivan@apple.com>
1988 Reviewed by Tim Omernick.
1990 - <rdar://problem/4331488> TOT Assertion failure in -[WebHTMLView nextValidKeyView]
1993 * WebView.subproj/WebHTMLView.m:
1994 (-[NSArray nextValidKeyView]):
1995 Removed assert that I added a while back. In this case at least, the assertion is
1996 overzealous, and I can't recreate the tortured chain of logic that led me to adding
1997 this assertion in the first place.
1999 2005-12-06 David Harrison <harrison@apple.com>
2003 - fix <rdar://problem/4365308> Glendale Regression: Floating dictionary doesn't work well in Safari text areas/fields
2005 Add use of NSAccessibilityHitTest to the list of exceptions.
2007 * WebView.subproj/WebHTMLView.m:
2008 (-[WebHTMLView hitTest:]): check for NSFlagsChanged event.
2010 2005-12-05 John Sullivan <sullivan@apple.com>
2012 Reviewed by Darin Adler.
2014 * WebView.subproj/WebHTMLView.m:
2015 (-[NSArray validateUserInterfaceItem:]):
2016 one more tweak: moved jumpToSelection: to be validated the same way as
2017 centerSelectionInVisibleArea:, since it now calls the same code. Might not
2018 make a difference in any real code, but you never know.
2020 2005-12-05 John Sullivan <sullivan@apple.com>
2022 Reviewed by Darin Adler.
2024 * WebView.subproj/WebHTMLView.m:
2025 (-[NSArray validateUserInterfaceItem:]):
2026 removed double handling of centerSelectionInVisibleArea
2028 2005-12-05 John Sullivan <sullivan@apple.com>
2030 Reviewed by Tim Omernick.
2032 - WebKit part of fix for
2033 <rdar://problem/4365690> Find > Jump to Selection does nothing on plain-text documents (inc. source HTML)
2035 * WebView.subproj/WebHTMLView.m:
2036 (-[WebHTMLView jumpToSelection:]):
2037 Reimplement jumpToSelection: to call centerSelectionInVisibleArea:, and added a comment explaining why
2038 jumpToSelection: exists at all. Note that centerSelectionInVisibleArea: was already implemented here; it
2039 was added as part of HTML editing implementation without us realizing that it was the API replacement
2040 for jumpToSelection:.
2041 (-[WebHTMLView validateUserInterfaceItem:]):
2042 validate centerSelectionInVisibleArea: the same way we validate jumpToSelection: (we should have done
2043 this when centerSelectionInVisibleArea: was implemented)
2045 * WebView.subproj/WebPDFView.m:
2046 (-[WebPDFView centerSelectionInVisibleArea:]):
2047 new method, same code that jumpToSelection: used to have
2048 (-[WebPDFView jumpToSelection:]):
2049 now calls centerSelectionInVisibleArea:, and there's now a comment about why it exists at all.
2050 (-[WebPDFView validateUserInterfaceItem:]):
2051 validate centerSelectionInVisibleArea: the same way we validate jumpToSelection:
2053 2005-12-04 Tim Omernick <timo@apple.com>
2055 Reviewed by Dave Harrison, John Sullivan.
2057 <rdar://problem/4364847> REGRESSION: QuickTime movies open without controller or don't open at all (5928)
2059 I changed WebFrameView on 2005-11-29 so that it avoids creating duplicate WebPluginDocumentViews.
2060 Unfortunately, this change caused a regression due to the fact that it subtly changed when plugins are
2061 initialized. Certain plugins (e.g. QuickTime) expect to be initialized after the WebPluginDocumentView
2062 has been "committed" (inserted into the view hierarchy).
2064 My fix is to ensure that the plugin is initialized where we previously would have created that second
2065 WebPluginDocumentView -- that is, the plugin is created after the WebPluginDocumentView has been committed.
2067 * Plugins.subproj/WebPluginDocumentView.m:
2068 (-[WebPluginDocumentView setDataSource:]):
2069 Don't initialize the plugin if the WebPluginDocumentView has not been inserted into the view hierarchy.
2070 We assume here that a later call to -setDataSource: will pass this conditional, once the WebDocumentView
2073 2005-12-02 Justin Garcia <justin.garcia@apple.com>
2075 <rdar://problem/4345030>
2076 Denver REGRESSION (10.4.2-10.4.3): Two identical warnings on "Back" from Amazon's package tracker
2078 Before checking the navigation policy for a request, the request is compared
2079 against the last checked request. If the two are the same, no check is done.
2080 In the bug, the two requests are identical except for the boolean on
2081 NSURLRequests that tells Foundation to support multipart loads for that request.
2082 One request was the one that was used to start servicing "Back" operation, and
2083 the second was being used to start loading the page (it needed to be reloaded
2084 because it was the result of a form submission). Set the boolean on all
2085 NSURLRequests, not just one's that are about to be used to start a load.
2087 Reviewed by harrison
2089 * WebView.subproj/WebDataSource.m:
2090 (-[WebDataSource _startLoading:]):
2091 (-[WebDataSource initWithRequest:]):
2092 * WebView.subproj/WebDataSourcePrivate.h:
2094 2005-12-01 Darin Adler <darin@apple.com>
2098 - fix <rdar://problem/4349721> Regression: Hovering over menu item doesn't highlight menu item or
2099 mousing up on menu item in applet does not open URL in new window at smartmoney.com
2101 Since Java depends on doing a hit test inside it's mouse moved handling, let hit testing on Java
2102 applets go through the standard NSView code path. Since this should only happen for Java, add a global
2103 so that we can Use our own WebHTMLView hit testing when calling from _updateMouseoverWithEvent.
2105 * WebView.subproj/WebHTMLView.m:
2106 (-[WebHTMLView _hitViewForEvent:]): rename forceRealHitTest to forceNSViewHitTest
2107 (-[WebHTMLView _updateMouseoverWithEvent:]): set global variable to force a WebHTMLView-style hit test from here
2108 (-[WebHTMLView hitTest:]): perform the appropriate hit test based on global variables
2110 2005-11-29 Andrew Wellington <proton@wiretapped.net>
2112 Reviewed by darin. Committed by eseidel.
2114 Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=4726
2115 Drop of multiple non-image file URLs only yields one item
2117 * WebView.subproj/WebHTMLView.m:
2118 (-[WebHTMLView _documentFragmentWithPaths:]):
2120 2005-11-29 Tim Omernick <timo@apple.com>
2122 Reviewed by John Sullivan, Eric Seidel
2124 <rdar://problem/4340787> Safari & Dashcode create 2 instances of the QC plug-in
2126 * WebView.subproj/WebFrameView.m:
2127 (-[WebFrameView _makeDocumentViewForDataSource:]):
2128 Instead of creating a new WebDocumentView, use the WebDataSource's representation if it is a WebDocumentView
2129 of the appropriate class. Right now, this can only happen when the loading document is a standalone WebKit
2130 plugin, because WebPluginDocumentView is both the WebDocumentView and the WebDocumentRepresentation for that
2133 I have verified that this does not affect other kinds of page loads; in all other cases, the representation
2134 class is distinct from the document view class.
2136 I talked with Chris Blumenberg about this change (he knows this code), and he agreed that this is the right
2139 2005-11-28 Alexey Proskuryakov <ap@nypop.com>
2141 Reviewed by Darin. Committed by Maciej.
2143 - fixed "Word completion doesn't work at end of word (unless last word)"
2144 (http://bugzilla.opendarwin.org/show_bug.cgi?id=4062)
2146 * WebView.subproj/WebHTMLView.m:
2147 (-[WebTextCompleteController doCompletion]):
2149 2005-11-28 John Sullivan <sullivan@apple.com>
2151 Reviewed by Tim Omernick.
2153 Probable fix for <rdar://problem/4356060> crash in -[WebHistoryItem _mergeAutoCompleteHints:]
2155 * History.subproj/WebHistory.m:
2156 (-[WebHistoryPrivate addItem:]):
2157 retain/release oldEntry until we're done with it, since removing it from dictionary might
2158 cause it to be dealloc'ed otherwise.
2160 * History.subproj/WebHistoryItem.m:
2161 (-[WebHistoryItem _mergeAutoCompleteHints:]):
2164 2005-11-26 Alexey Proskuryakov <ap@nypop.com>
2166 Reviewed by mjs. Committed by eseidel.
2168 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5230
2169 "characterIndexForPoint: not yet implemented"
2171 * WebView.subproj/WebHTMLView.m:
2172 (-[WebHTMLView characterIndexForPoint:]):
2173 (-[WebHTMLView firstRectForCharacterRange:]):
2175 2005-11-22 Darin Adler <darin@apple.com>
2177 * WebView.subproj/WebView.h: Fixed incorrect comment in public header.
2179 2005-11-18 Vicki Murley <vicki@apple.com>
2181 Changes by Tim H, reviewed by Vicki.
2183 - call shouldClose on the bridge for the main frame
2185 * WebView.subproj/WebView.m:
2186 (-[WebView shouldClose]):
2188 2005-11-18 Vicki Murley <vicki@apple.com>
2190 Changes by Darin, reviewed by Beth and Vicki.
2192 - fix <rdar://problem/3939265> support "before unload" event and onbeforeunload handler (supported by both IE and Mozilla)
2194 * WebCoreSupport.subproj/WebBridge.m:
2195 (-[WebBridge canRunBeforeUnloadConfirmPanel]):
2196 (-[WebBridge runBeforeUnloadConfirmPanelWithMessage:]):
2197 * WebView.subproj/WebFrame.m:
2198 (-[WebFrame _checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
2199 (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]):
2200 * WebView.subproj/WebUIDelegatePrivate.h:
2201 * WebView.subproj/WebView.m:
2202 (-[WebView shouldClose]):
2203 * WebView.subproj/WebViewPrivate.h:
2205 2005-11-10 Maciej Stachowiak <mjs@apple.com>
2207 Build fix, not reviewed.
2209 * Plugins.subproj/WebBaseNetscapePluginViewInternal.h: Added.
2211 2005-11-10 Tim Omernick <timo@apple.com>
2215 <rdar://problem/4237941> Dashboard needs a way to stop Netscape plug-ins from getting null events
2217 * Plugins.subproj/WebBaseNetscapePluginViewInternal.h: Added.
2218 Added WebInternal category, with -stopNullEvents and -restartNullEvents. These methods already exist on WebBaseNetscapePluginView.
2219 I am just exposing them to callers elsewhere within WebKit.
2221 * WebKit.xcodeproj/project.pbxproj:
2222 Added WebBaseNetscapePluginViewInternal.h.
2224 * WebView.subproj/WebFrame.m:
2225 (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
2226 Walks down the web frame hierarchy and calls -_pauseNullEventsForAllNetscapePlugins on each WebHTMLView.
2227 (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
2228 Same as above, but calls -_resumeNullEventsForAllNetscapePlugins.
2230 * WebView.subproj/WebFramePrivate.h:
2231 Declared -_recursive_pauseNullEventsForAllNetscapePlugins and -_recursive_pauseNullEventsForAllNetscapePlugins.
2233 * WebView.subproj/WebHTMLView.m:
2234 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
2235 Checks subviews for WebBaseNetscapePluginViews, and calls -stopNullEvents on them.
2236 (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
2237 Same as above, but calls -restartNullEvents.
2239 * WebView.subproj/WebHTMLViewInternal.h:
2240 Declared -_pauseNullEventsForAllNetscapePlugins and -_resumeNullEventsForAllNetscapePlugins.
2242 2005-11-07 Geoffrey Garen <ggaren@apple.com>
2244 Darin reviewed this a while back.
2246 - Fixed <rdar://problem/4161660> window.close followed by window.print
2247 in onload handler crashes Safari in KJS::ScopeChain::bottom
2248 (redmccombstoyota.com)
2250 Added a call to stopLoading inside closeWindowSoon to prevent load
2251 events from firing after a window has torn down.
2253 Manual test case: WebCore/manual-tests/window-close-during-parsing.html
2255 * WebCoreSupport.subproj/WebBridge.m:
2256 (-[WebBridge closeWindowSoon]):
2258 2005-11-03 Timothy Hatcher <timothy@apple.com>
2260 Reviewed by Darin and Vicki.
2262 * WebKit.xcodeproj/project.pbxproj:
2263 Change to use $(SYSTEM_LIBRARY_DIR) consistently and place
2264 $(NEXT_ROOT) in a few spots to make build-root work.
2266 2005-11-01 Tim Omernick <timo@apple.com>
2268 Reviewed by John Sullivan.
2270 <rdar://problem/4318632>
2272 I've added a new notification, WebPluginWillPresentNativeUserInterfaceNotification. Plugins are expected to post this
2273 notification before presenting "native UI", such as dialog boxes. A Dashboard client can observe this notification to
2274 hide the Dashboard layer when plugins present external UI.
2276 * English.lproj/StringsNotToBeLocalized.txt:
2277 Added "WebPluginWillPresentNativeUserInterface".
2279 * Plugins.subproj/WebPluginsPrivate.h: Added.
2280 * Plugins.subproj/WebPluginsPrivate.m: Added.
2281 Declare WebPluginWillPresentNativeUserInterfaceNotification.
2283 * WebKit.xcodeproj/project.pbxproj:
2284 Added WebPluginsPrivate.[hm]
2287 Added _WebPluginWillPresentNativeUserInterfaceNotification.
2289 2005-11-01 John Sullivan <sullivan@apple.com>
2291 Reviewed by Darin Adler.
2293 fixed deployment build by hiding local variables used only in ASSERTs on builds for
2294 which ASSERT_DISABLED is true.
2296 * History.subproj/WebHistory.m:
2297 (-[WebHistoryPrivate removeItemForURLString:]):
2298 (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]):
2300 2005-11-01 John Sullivan <sullivan@apple.com>
2302 Reviewed by Tim Omernick.
2304 - fixed <rdar://problem/4324104> Assertion failure (foundDate) in WebHistory
2306 WebFrame was updating the last visited date on a WebHistoryItem behind WebHistory's
2307 back, causing WebHistory's caches of items by date to get out of sync with reality.
2308 Changed to set the date through WebHistory rather than directly.
2310 * History.subproj/WebHistory.m:
2311 (-[WebHistoryPrivate _removeItemFromDateCaches:]):
2312 New method, extracted from removeItemForURLString.
2313 (-[WebHistoryPrivate removeItemForURLString:]):
2314 Now calls extracted method. Cleaned up white space a little.
2315 (-[WebHistoryPrivate _addItemToDateCaches:]):
2316 New method, extracted from addItem:
2317 (-[WebHistoryPrivate addItem:]):
2318 Now calls extracted method. Cleaned up white space a little.
2319 (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]):
2320 New method, removes item from date caches, changes date, then adds item back to
2321 date caches and sends notification.
2322 (-[WebHistory setLastVisitedTimeInterval:forItem:]):
2323 New method, cover for WebHistoryPrivate version.
2325 * History.subproj/WebHistoryItem.m:
2326 (-[WebHistoryItem _setLastVisitedTimeInterval:]):
2327 Don't send notification here; send from new WebHistory method instead.
2329 * History.subproj/WebHistoryItemPrivate.h:
2330 Added comment about avoiding incorrect use of _setLastVisitedTimeInterval:
2331 * History.subproj/WebHistoryPrivate.h:
2332 Added declarations for WebHistory and WebHistoryPrivate versions of
2333 setLastVisitedTimeInterval:forItem:
2335 * WebView.subproj/WebFrame.m:
2336 (-[WebFrame _transitionToCommitted:]):
2337 change history item's date via new WebHistory method rather than directly
2339 2005-10-25 Timothy Hatcher <timothy@apple.com>
2343 Remove the use of a stamp file in the Frameworks symlink build phase.
2344 This lets us pass the build verification.
2346 * WebKit.xcodeproj/project.pbxproj:
2348 2005-10-24 Darin Adler <darin@apple.com>
2352 - change internal methods in WebTextRenderer to be functions in case this
2353 has any effect on speed (also makes things a bit clearer, in my opinion)
2355 * WebCoreSupport.subproj/WebTextRenderer.h: Made all fields public, which is
2356 OK since this is really a private class. Made setAlwaysUseATSU: class method
2357 public too for the same reason.
2359 * WebCoreSupport.subproj/WebTextRenderer.m: Change all methods to functions.
2360 (destroy): Function name for method free.
2361 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]): Removed code to first subtract
2362 lineSpacing - descent, then later add it back.
2363 (getSmallCapsRenderer): Function name for method smallCapsRenderer.
2364 (findSubstituteFont): Function name for method substituteFontForString:families:.
2365 (findSubstituteRenderer): Function name for method substituteRendererForCharacters:length:families:.
2366 (updateGlyphMapEntry): Function name for method updateGlyphEntryForCharacter:glyphID:substituteRenderer:.
2367 (extendGlyphMap): Function name for method extendCharacterToGlyphMapToInclude:.
2368 (extendWidthMap): Function name for method extendGlyphToWidthMapToInclude:.
2369 (getTextBounds): Function name for method trapezoidForRun:style:atPoint:.
2371 2005-10-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
2373 Reviewed by Darin. Committed by David Harrison.
2375 http://bugzilla.opendarwin.org/show_bug.cgi?id=5415
2376 "Left border of selection highlight leaves behind a trail"
2378 * manual-tests/drag_select_highlighting.html: Added.
2379 (this test case was added to WebCore)
2381 * WebCoreSupport.subproj/WebTextRenderer.m:
2382 (overrideLayoutOperation):
2383 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]):
2384 (-[WebTextRenderer ATSU_drawHighlightForRun:style:geometry:]):
2385 (advanceWidthIterator):
2388 2005-10-23 Tim Omernick <tomernick@apple.com>
2390 Reviewed by Dave Hyatt.
2392 <http://bugzilla.opendarwin.org/show_bug.cgi?id=5365>
2394 Send -webPlugInStop (or -pluginStop) and -webPluginDestroy (or -pluginDestroy)
2395 to complying plugins right when they're removed from the WebHTMLView, and also
2396 release them from the plugin controller's arrays.
2398 I think this patch makes WebKit behave more like plugins expect it to, which is
2399 the way it already behaves with Netscape plugins.
2401 I expect complying plugins to stop making noise when receiving the stop
2402 message, but QuickTime doesn't. If it's lucky, then it will be deallocated
2403 because of the release and will stop then. However, JS, for one, can retain the
2404 plugin (e.g. if you execute <javascript:document.getElementById('obj').width;>
2405 before clicking Remove OBJECT), in which case it will just keep playing.
2407 * Plugins.subproj/WebPluginController.h:
2408 * Plugins.subproj/WebPluginController.m:
2409 (-[WebPluginController destroyPlugin:]):
2410 Stop and destroy the plugin.
2411 * WebView.subproj/WebHTMLView.m:
2412 (-[NSArray willRemoveSubview:]):
2413 Destroy plugins when they are removed from the HTML view.
2415 2005-10-23 Geoffrey Garen <ggaren@apple.com>
2419 For better abstraction, made the tokenizer -- instead of the
2420 data source -- responsible for calling [WebFrame _checkLoadComplete]
2421 when the tokenizer stops.
2423 * WebView.subproj/WebDataSource.m:
2424 (-[WebDataSource _stopLoadingInternal]):
2426 2005-10-21 Geoffrey Garen <ggaren@apple.com>
2430 WebKit side of the fix for <rdar://problem/4184719> window.print() followed by
2431 window.close() causes world leak
2433 No test case added because I have another reviewed patch that will include a test
2434 for this bug as well as many others.
2436 Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading]
2437 to false, so the didFInishLoad delegates never fired.
2439 The reason isLoading didn't become false was that the tokenizer was still running.
2440 The fix here is to move the call to [WebCoreBridge stopLoading] above the early return
2441 inside [WebDataSource stopLoading] -- since the tokenizer may still be running even if the
2442 loader is finished loading -- and then to call [WebFrame _checkLoadComplete] to
2443 give the frame a chance to fire its delegates.
2445 * WebView.subproj/WebDataSource.m:
2446 (-[WebDataSource _stopLoadingInternal]):
2448 2005-10-21 Beth Dakin <bdakin@apple.com>
2452 Fix for <rdar://problem/3853672> Malformed HTML using crashes Safari in NSFireTimer
2454 The webFrame was being deleted prematurely by a call to stop(), so we changed it
2455 so that the calls to _receivedMainResourceError and _mainReceivedError happen
2456 before the stop(), and we retain the bridge.
2458 * WebView.subproj/WebDataSource.m:
2459 (-[WebDataSource _receivedMainResourceError:complete:]):
2461 2005-10-21 Geoffrey Garen <ggaren@apple.com>
2463 Patch by TimO, Reviewed by hyatt, tested and landed by me.
2465 Found what appears to be a misguided optimization that actually causes a measurable performance problem.
2466 A fixed-size buffer was allocated on the stack to pass into CFURLGetBytes(), presumably to avoid malloc()
2467 for URLs less than 2048 bytes. There was also a fallback which malloc()'ed a buffer in case the fixed-size
2468 buffer was too small to hold the URL's bytes. This malloc()'ed buffer was then wrapped in an NSData using
2469 +dataWithBytesNoCopy:length:, avoiding a memory copy (yay!)
2471 The problem with this approach is two-fold:
2473 1. Regardless of how the buffer was allocated and filled, it is immediately wrapped in an NSData using
2474 +dataWithBytes:length:, which copies the input bytes. This is pretty much unavoidable; we need to get
2475 the data into a malloc()'ed buffer to return it to the caller, unless the caller provides its own storage
2476 (which would be super inconvenient).
2478 2. The size of the fixed buffer was large enough that it fit most (if not all) URLs involved in our Page
2479 Load Test. This means the unintentionally-inefficient case was by far the most *common* case!
2481 My fix is to malloc() the buffer from the start, and then use +[NSData dataWithBytes:length:freeWhenDone:]
2482 to wrap the buffer in an NSData. This avoids a memory copy for the normal case where a URL is less than
2483 2048 bytes, and keeps the efficient behavior for the uncommon long URL case.
2485 * Misc.subproj/WebNSURLExtras.m:
2486 (-[NSURL _web_originalData]):
2488 2005-10-21 Mitz Pettel <opendarwin.org@mitzpettel.com>
2490 Reviewed and landed by Darin.
2492 - fixed a couple regressions caused by my last check-in
2493 http://bugzilla.opendarwin.org/show_bug.cgi?id=5437
2494 http://bugzilla.opendarwin.org/show_bug.cgi?id=5443
2496 * WebCoreSupport.subproj/WebTextRenderer.m:
2497 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]): Compute background width
2498 correctly, by subtracting position after run from position before run.
2499 (addDirectionalOverride): Make the range include only the characters between the
2500 directional override characters, not the directional override characters themselves.
2501 (initializeWidthIterator): Correctly compute "widthToStart" based on the offset to
2502 the beginning of the run, not to the end of the run!
2504 2005-10-19 Darin Adler <darin@apple.com>
2508 - optimizations for a total of about 1% speed-up on PLT
2510 * WebCoreSupport.subproj/WebTextRenderer.h: Updated to use bool instead of BOOL,
2511 since BOOL is a signed char (which is not so efficient, at least on PPC).
2512 * WebCoreSupport.subproj/WebTextRenderer.m:
2513 (isSpace): Changed BOOL to bool and UniChar to UChar32. This actually fixes a
2514 potential bug when the passed-in character is a non-BMP character (> FFFF).
2515 (isRoundingHackCharacter): Ditto.
2516 (widthForGlyph): Merged getUncachedWidth, widthFromMap, and widthForGlyph into
2517 one function. Marked it inline. Changed to include syntheticBoldOffset in the
2518 cached widths to save an add in the cached case. Instead of the special constant
2519 UNINITIALIZED_GLYPH_WIDTH, just check for a width >= 0. This allows us to use
2520 a negative number or NAN for the uninitialized width value -- I chose NAN.
2521 (overrideLayoutOperation): Use bool instead of Boolean in one place.
2522 (-[WebTextRenderer initWithFont:]): Use lroundf instead of ROUND_TO_INT.
2523 (-[WebTextRenderer floatWidthForRun:style:]): Put the code to choose the ATSU
2524 vs. CG code path back in here, because there are no callers inside the class
2525 that need to call both.
2526 (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
2527 Use bool instead of BOOL.
2528 (+[WebTextRenderer setAlwaysUseATSU:]): Ditto.
2529 (fontContainsString): Ditto.
2530 (-[WebTextRenderer computeWidthForSpace]): Ditto. Also use roundf instead of
2532 (-[WebTextRenderer setUpFont]): Use bool instead of BOOL.
2533 (drawGlyphs): Ditto.
2534 (-[WebTextRenderer CG_drawHighlightForRun:style:geometry:]): Restructure the
2535 code so it can use the new advanceWidthIterator function instead of the old
2536 widthForNextCharacter function.
2537 (-[WebTextRenderer CG_drawRun:style:geometry:]): Use malloc instead of calloc
2538 since we don't need initialization. Call CG_floatWidthForRun instead of
2539 floatWidthForRun -- no need to re-check whether to use the CG or ATSU code path.
2540 Removed code to handle a renderer of 0 since we no longer generate that in
2541 the renderers array in advanceWidthIterator.
2542 (CG_floatWidthForRun): Changed to call the new advanceWidthIterator instead of
2543 the old widthForNextCharacter.
2544 (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]): Use malloc instead of
2545 calloc and explicitly initialize the one field that needs it. Fixed a potential
2546 storage leak by adding a call to WKClearGlyphVector. Initialize the renderers
2547 to self instead of to 0.
2548 (-[WebTextRenderer extendGlyphToWidthMapToInclude:]): Initialize the widths to
2549 NAN instead of UNINITIALIZED_GLYPH_WIDTH.
2550 (addDirectionalOverride): Fixed bug where the first and last character in the buffer
2551 could be uninitialized and where characters before and after the direction override
2553 (-[WebTextRenderer ATSU_drawRun:style:geometry:]): Use bool instead of BOOL.
2554 (-[WebTextRenderer ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2556 (advanceWidthIteratorOneCharacter): Added new helper function for CG_pointToOffset.
2557 (-[WebTextRenderer CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):
2558 Reimplemented to use advanceWidthIteratorOneCharacter instead of widthForNextCharacter.
2559 Also call CG_floatWidthForRun instead of floatWidthForRun since we don't need to
2560 reconsider whether to use CG or ATSU.
2561 (glyphForCharacter): Removed the map parameter and changed the renderer parameter to
2562 be an in-out one. Removed uneeded special case for when map is 0 and always get the
2563 renderer from the map. Also call extendCharacterToGlyphMapToInclude in here instead of
2564 making that the caller's responsibility.
2565 (initializeWidthIterator): Renamed to make the name shorter (removed "Character").
2566 Streamlned common cases like "no padding" and removed some unneeded casts. Changed to
2567 use advanceWidthIterator to compute width fo the first part of the run.
2568 (normalizeVoicingMarks): Factored this out into a separate function, since it's not part
2570 (advanceWidthIterator): Changed widthForNextCharacter to this, eliminating per-character
2571 function overhead for iterating past a few characters. Merged the handling of surrogate
2572 pairs and of voicing marks so that we typically only have to do one "if" to rule out both.
2573 Merged the mirroring for RTL and uppercasing for small caps into a single boolean so that
2574 we only need one "if" to rule out both. Call the new glyphForCharacter. Check for the
2575 character '\t' first since that's cheaper than looking at tabWidth. Check tabWidth for 0
2576 first so that we don't have to convert it to floating point when not using it. Changed
2577 the special case for spaces to first check width, so that we don't bother with the rest
2578 of the code for glyphs not the same width as spaces. Fixed substitution code to call
2579 CG_floatWidthForRun -- no need to reconsider whether to use CG or ATSU. Also changed to
2580 properly get width from the result of that function. Merged the handling of letter spacing,
2581 padding, and word spacing into a single boolean so that we typically only have to do one
2582 "if" to rule out all three. Check for letterSpacing of 0 first so that we don't have to
2583 convert it to floating point when not using it. Same for padding and wordSpacing.
2584 Move the work from ceilCurrentWidth in line into this function. Assume that either we have
2585 all three pointers (widths, renderers, glyphs), or none of the three, to cut down on branches.
2586 (fillStyleWithAttributes): Use bool instead of BOOL.
2587 (shouldUseATSU): Ditto.
2589 * Misc.subproj/WebKitNSStringExtras.m: (-[NSString _web_widthWithFont:]): Update since
2590 the floatWidthForRun method no longer takes a widths parameter.
2591 * Misc.subproj/WebStringTruncator.m: (stringWidth): Ditto.
2593 2005-10-19 Tim Omernick <tomernick@apple.com>
2595 Reviewed by eseidel & darin.
2597 Changed some of the run measurement methods to C functions
2598 to avoid overhead associated with objc_msgSend().
2600 * WebCoreSupport.subproj/WebTextRenderer.m:
2601 (-[WebTextRenderer floatWidthForRun:style:widths:]):
2602 Updated to call new run measurement functions instead
2603 of calling ObjC methods.
2604 (-[WebTextRenderer CG_drawRun:style:geometry:]): ditto
2605 (floatWidthForRun): ditto
2606 (CG_floatWidthForRun): ditto
2607 (ATSU_floatWidthForRun): ditto
2608 (widthForNextCharacter): ditto
2610 2005-10-14 Vicki Murley <vicki@apple.com>
2612 Changes by Mitz Pettel, reviewed by Maciej.
2614 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5029 (Assertion failure in -[NSPasteboard(WebExtras)
2615 _web_writeImage:URL:title:archive:types:] when trying to drag an image from a site with no favicon)
2617 * Misc.subproj/WebNSPasteboardExtras.m:
2618 (-[NSPasteboard _web_writeImage:URL:title:archive:types:]): Prefer the main resource if it is an image
2620 2005-10-12 Vicki Murley <vicki@apple.com>
2624 - fix <rdar://problem/4043643> iframe swallows events for overlapping elements (3449)
2626 * WebView.subproj/WebHTMLView.m:
2627 (-[WebHTMLView hitTest:]):
2628 (-[WebHTMLView _updateMouseoverWithEvent:]): eliminate _hitViewForEvent hackery and self
2629 dependency from this function
2631 2005-10-12 Timothy Hatcher <timothy@apple.com>
2635 Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
2636 Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
2638 * WebView.subproj/WebDefaultResourceLoadDelegate.m:
2639 (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
2640 * WebView.subproj/WebFrame.m:
2641 (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
2642 * WebView.subproj/WebLoader.m:
2643 (-[NSURLProtocol didReceiveData:lengthReceived:]):
2644 * WebView.subproj/WebResourceLoadDelegate.h:
2645 * WebView.subproj/WebUIDelegate.h:
2646 * WebView.subproj/WebView.h:
2647 * WebView.subproj/WebView.m:
2648 (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
2649 (-[WebView spellCheckerDocumentTag]):
2650 * WebView.subproj/WebViewInternal.h:
2651 * WebView.subproj/WebViewPrivate.h:
2653 2005-10-12 Darin Adler <darin@apple.com>
2655 * WebView.subproj/WebPolicyDelegate.h: Fix a comment.
2657 2005-10-11 Timothy Hatcher <timothy@apple.com>
2661 Test for 10.4 because of <rdar://problem/4243463>
2663 * WebView.subproj/WebHTMLView.m:
2664 (-[WebHTMLView conversationIdentifier]):
2666 2005-10-11 Adele Peterson <adele@apple.com>
2668 Rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
2671 REGRESSION text areas draw focus ring around each glyph, no caret in text fields
2672 http://bugzilla.opendarwin.org/show_bug.cgi?id=5335
2674 * WebView.subproj/WebHTMLView.m:
2675 (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
2676 (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2677 (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
2679 2005-10-09 Darin Adler <darin@apple.com>
2683 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
2684 Would like API to flush rendering of pending DOM changes
2686 This was actually a Tiger regression. When AppKit added a new code path for rendering
2687 NSView, our special hack for doing layout when we draw didn't work any more. So we
2688 were able to fix this without adding any API.
2690 * WebView.subproj/WebHTMLView.m:
2691 (-[WebHTMLView _recursiveDisplayRectIgnoringOpacity:inContext:topView:]): Added.
2692 Does the same thing that other _recursiveDisplay methods do.
2694 2005-10-08 Alexey Proskuryakov <ap@nypop.com>
2698 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5187
2699 UTF-8 in long text files breaks at some point
2701 * WebView.subproj/WebTextRepresentation.m:
2702 (-[WebTextRepresentation finishedLoadingWithDataSource:]):
2703 Call flushReceivedData on the WebTextView so it can decode any final bytes.
2705 * WebView.subproj/WebTextView.h: Added WebCoreTextDecoder field and flushReceivedData method.
2706 * WebView.subproj/WebTextView.m:
2707 (-[WebTextView dealloc]): Release WebCoreTextDecoder.
2708 (-[WebTextView appendReceivedData:fromDataSource:]): Create a WebCoreTextDecoder to decode
2709 the text; use the textEncodingName from the data source. Use it to decode instead of the
2710 data source's stringWithData.
2711 (-[WebTextView flushReceivedData]): Call flush on the decoder and append any last bytes to
2714 2005-10-07 John Sullivan <sullivan@apple.com>
2716 Reviewed by Tim Omernick.
2718 WebKit support for allowing clients to know which frame originated a particular JavaScript alert/dialog.
2720 * WebView.subproj/WebUIDelegatePrivate.h:
2721 New optional delegate methods for the three JavaScript alert/dialogs. These are just like the existing
2722 ones in WebUIDelegate.h except that each adds a parameter specifying the frame that the JavaScript was
2723 running in. Eventually we'll deprecate the old three methods in favor of these in the public API.
2725 * WebCoreSupport.subproj/WebBridge.m:
2726 (-[WebBridge runJavaScriptAlertPanelWithMessage:]):
2727 Call version of the delegate method that has the frame parameter if the delegate supports it.
2728 (-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
2730 (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
2733 * WebView.subproj/WebDefaultUIDelegate.m:
2734 (-[WebDefaultUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
2735 Now implements the new version of the delegate method that includes the frame parameter. (Still
2736 doesn't do anything though.)
2737 (-[WebDefaultUIDelegate webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:]):
2738 Now implements the new version of the delegate method that includes the frame parameter. (Still
2739 doesn't do anything though.)
2740 (-[WebDefaultUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):
2741 Now implements the new version of the delegate method that includes the frame parameter. Doesn't
2742 actually use the frame parameter here yet though.
2744 2005-10-06 Darin Adler <darin@apple.com>
2746 - fixed compiling on Deployment
2748 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer initWithFont:]):
2749 Put initialFont inside !LOG_DISABLED.
2751 2005-10-06 Darin Adler <darin@apple.com>
2755 - tweaked formatting
2757 * WebCoreSupport.subproj/WebTextRenderer.m: Changed function names to remove underscores;
2758 fixed formatting to match our coding guidelines, other related tweaks.
2760 2005-10-06 Darin Adler <darin@apple.com>
2764 - fixed regression in drawing of text in non-flipped contexts from my last check-in
2766 * WebCoreSupport.subproj/WebTextRenderer.m:
2767 (drawGlyphs): Only flip the matrix if the NSGraphicsContext is flipped.
2768 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use -[NSGraphicsContext isFlipped]
2769 instead of [[NSView focusView] isFlipped].
2771 2005-10-06 Darin Adler <darin@apple.com>
2775 - fixed <rdar://problem/3217793> Monaco bold comes out as Helvetica bold, very bad if you choose Monaco as your fixed-width font
2776 - fixed <rdar://problem/3256269> CSS1: bold/italic font styles not programmatically created if font doesn't include them (3231)
2777 also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3231>
2779 * WebCoreSupport.subproj/WebTextRenderer.h: Removed public declarations of private structures that are not
2780 used in the header. Removed the separate 16-bit character map; the difference in code size is only a few
2781 bytes per page and there's no measurable performance difference by always using the 32-bit character version.
2782 Removed substitute font width maps altogether, since we now use the width map in the substitute font's renderer.
2783 Also removed a few more now-unused fields and methods. Changed initWithFont to take WebCoreFont. Changed
2784 the setAlwaysUseATSU: method to remove the underscore prefix.
2786 * WebCoreSupport.subproj/WebTextRenderer.m:
2787 (getUncachedWidth): Get font from WebCoreFont directly instead of taking a parameter, since we now use only
2788 one NSFont per WebTextRenderer.
2789 (widthFromMap): Removed NSFont parameter for same reason as above; simplified.
2790 (widthForGlyph): Ditto.
2791 (overrideLayoutOperation): Updated for change to WebCoreFont.
2792 (-[WebTextRenderer initWithFont:]): Changed to use WebCoreFont. Removed code to deal with substitute font maps.
2793 Changed lineGap computation to use floats instead of doubles. Added code to compute a synthetic bold offset.
2794 Currently this is the font size divided by 24 and then rounded up to an integer.
2795 (-[WebTextRenderer dealloc]): Updated for change to WebCoreFont and other related changes.
2796 (-[WebTextRenderer finalize]): Ditto.
2797 (-[WebTextRenderer xHeight]): Ditto.
2798 (-[WebTextRenderer drawRun:style:geometry:]): Remove small caps case here; no longer needed. Also updated as above.
2799 (-[WebTextRenderer floatWidthForRun:style:widths:]): Ditto.
2800 (-[WebTextRenderer drawHighlightForRun:style:geometry:]): Ditto.
2801 (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]): Ditto.
2802 (+[WebTextRenderer setAlwaysUseATSU:]): Renamed to remove underscore prefix.
2803 (-[WebTextRenderer smallCapsRenderer]): Ditto. Changed to create a renderer for the smaller sized font.
2804 (-[WebTextRenderer _substituteFontForString:families:]): Reorganized this to be more readable and to call
2805 the new rendererForAlternateFont method.
2806 (-[WebTextRenderer rendererForAlternateFont:]): Added. Used to select an alternate font taking into account
2807 bold and italic synthesis.
2808 (-[WebTextRenderer substituteRendererForCharacters:length:families:]): Renamed to remove underscore prefix.
2809 Updated to use rendererForAlternateFont.
2810 (-[WebTextRenderer _computeWidthForSpace]): Updated for name changes and to remove unnecessary parameters.
2811 (-[WebTextRenderer setUpFont]): Renamed to remove underscore prefix. Added code to get printer or screen
2812 font as specified by WebCoreFont so calers don't need to do this.
2813 (drawGlyphs): Renamed to remove underscore prefix. Added code for synthetic oblique (14 degree slant), and
2814 synthetic bold (add offset and draw text a second time).
2815 (-[WebTextRenderer _CG_drawRun:style:geometry:]): Keep an array of substitute renderers instead of fonts.
2816 Changed around the loop to reverse the run to be a single loop instead of 3.
2817 (-[WebTextRenderer floatWidthForRun:style:widths:substituteRenderers:glyphs:startPosition:numGlyphs:]):
2818 Renamed to remove the underscore prefix.
2819 (-[WebTextRenderer _CG_floatWidthForRun:style:widths:substituteRenderers:glyphs:startPosition:numGlyphs:]):
2820 Changed to use subsitute renderers rather than fonts.
2821 (-[WebTextRenderer updateGlyphEntryForCharacter:glyphID:substituteRenderer:]): Renamed to remove underscore
2822 prefix and changed to use a substitute renderer rather than a substitute NSFont.
2823 (-[WebTextRenderer extendCharacterToGlyphMapToInclude:]): Updated to work with all characters, both ones
2824 that fit into 16-bit and ones that don't.
2825 (-[WebTextRenderer _extendGlyphToWidthMapToInclude:]): Removed NSFont parameter and simplified. This fixes
2826 a bug where numberOfGlyphs was accidentally used from the main font instead of "subFont".
2827 (glyphForCharacter): Changed to use subsitute renderers instead of substitute fonts.
2828 (widthForNextCharacter): Ditto. Also removed small caps code no longer needed here and replaced it with
2829 simpler small caps code that no longer assumes glyphs match.
2830 (shouldUseATSU): Changed the code to check ranges in order to slightly reduce the number of cases and
2831 to create earlier exit for lower character codes.
2833 * WebCoreSupport.subproj/WebTextRendererFactory.h: Added caches for synthesized font and oblique
2834 variants so we can still use the NSFont as the dictionary key. Removed coalesceTextDrawing methods.
2835 Changed methods to use WebCoreFont as the parameters and results instead of NSFont.
2836 * WebCoreSupport.subproj/WebTextRendererFactory.m:
2837 (-[WebTextRendererFactory clearCaches]): Clear all 8 caches.
2838 (-[WebTextRendererFactory isFontFixedPitch:]): Changed code slightly so there's only one call to
2839 the CFDictionarySetValue function.
2840 (-[WebTextRendererFactory init]): Create all 8 caches.
2841 (-[WebTextRendererFactory dealloc]): Release all 8 caches.
2842 (-[WebTextRendererFactory rendererWithFont:]): Select the appropriate cache based on 3 booleans:
2843 synthetic bold, synthetic oblique, and printer. Use WebCoreFont instead of NSFont.
2844 (-[WebTextRendererFactory fontWithFamilies:traits:size:]): Set the synthetic bold and oblique flags
2845 when returning a WebCoreFont based on requested traits that are not present in the NSFont.
2846 (acceptableChoice): Ignore the synthesizable traits when deciding if a chosen font is acceptable.
2847 (betterChoice): Rather than assuming that every font has all the desired traits, implement a rule
2848 that says a font with an unwanted trait loses out over a font that does not have an unwanted trait.
2849 This lets us chose a bold font over a non-bold font that could use synthesized bold but treat both
2852 * WebCoreSupport.subproj/WebGlyphBuffer.h: Removed.
2853 * WebCoreSupport.subproj/WebGlyphBuffer.m: Removed.
2854 * WebKit.xcodeproj/project.pbxproj: Removed WebGlyphBuffer source files.
2856 * Misc.subproj/WebKitNSStringExtras.m:
2857 (-[NSString _web_drawAtPoint:font:textColor:]): Update to use WebCoreFont.
2858 (-[NSString _web_widthWithFont:]): Ditto.
2859 * Misc.subproj/WebStringTruncator.m:
2860 (truncateString): Ditto.
2861 (+[WebStringTruncator widthOfString:font:]): Ditto.
2863 * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]): Removed text drawing coalesce method calls.
2864 * WebView.subproj/WebTextView.m: (-[WebTextView setFixedWidthFont]): Updated to use cachedFontFromFamily
2865 method, which we still have, rather than fontWithFamilies method which we don't (since it now uses WebCoreFont).
2866 * WebView.subproj/WebView.m: (+[WebView _setAlwaysUseATSU:]): Updated for name change to underlying method.
2868 2005-10-05 Maciej Stachowiak <mjs@apple.com>
2872 <rdar://problem/4158439> Safari appears to hang when sending synchronous XMLHttpRequest that gets no server response
2874 No testcase - not testable w/o network.
2876 * WebCoreSupport.subproj/WebBridge.m:
2877 (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Set a timeout of 10.
2879 2005-10-04 Beth Dakin <bdakin@apple.com>
2883 Fix for <rdar://problem/4285538> TOT fix for Denver Regression: Drawing glitch in the transparent dialog's cancel/ok
2884 button in the widget manager.
2886 * WebCoreSupport.subproj/WebImageData.m: Calls WKSetPatternPhaseInUserSpace() which is a new function that lies in
2887 WebKitSystemInterface that and takes care of pattern-setting. Prevents
2888 regression that occurred with image tiling in transparency layers.
2889 (-[WebImageData tileInRect:fromPoint:context:]):
2891 2005-10-03 Tim Omernick <tomernick@apple.com>
2893 Reviewed by John Sullivan.
2895 <rdar://problem/4281095> Denver regression: Seed: Safari HTML 4.01 <object ...> tag problem
2897 * WebCoreSupport.subproj/WebBridge.m:
2898 (-[WebBridge determineObjectFromMIMEType:URL:]):
2899 If no view class is registered to handle the MIME type, check to see if there is a plugin registered which can handle it.
2900 This check is required because the Java plugin does not register an NSView class, so that Java files are downloaded when
2903 Prior to this fix, -determineObjectFromMIMEType:URL: would always return ObjectElementNone for Java applets (MIME type
2904 "application/x-java-applet"), which would cause Java applets embedded in <OBJECT> elements to not be loaded.
2906 This broke on 05-03-2005, when we changed how we handle fallback content for <OBJECT> elements so that we could pass the
2909 2005-09-28 Justin Garcia <justin.garcia@apple.com>
2913 Fixed <rdar://problem/4276596> multipart/x-mixed-replace: saved inline images appear only partially loaded
2914 Fixed <rdar://problem/4265439> progress bar should look complete even if there is some more multipart content being loaded
2916 * WebCoreSupport.subproj/WebSubresourceLoader.h:
2917 * WebCoreSupport.subproj/WebSubresourceLoader.m:
2918 (-[WebSubresourceLoader didReceiveResponse:]):
2919 Now calls signalFinish and saveResource.
2921 (-[WebSubresourceLoader signalFinish]):
2922 Added. Does the part of didFinishLoading that signals to the WebDataSource and load delegates that the load is finished.
2924 (-[WebSubresourceLoader didFinishLoading]):
2925 * WebView.subproj/WebLoader.h:
2926 * WebView.subproj/WebLoader.m:
2927 (-[NSURLProtocol signalFinish]):
2930 (-[NSURLProtocol didFinishLoading]):
2932 2005-09-28 Adele Peterson <adele@apple.com>
2936 Moved _downloadWithLoadingConnection and _downloadWithRequestfrom WebDownload.h to WebDownloadInternal.h
2938 * Misc.subproj/WebDownload.h:
2939 * Misc.subproj/WebDownloadInternal.h: Added.
2940 * WebKit.xcodeproj/project.pbxproj: Added WebDownloadInternal.h
2941 * WebView.subproj/WebMainResourceLoader.m: Added import of WebDownloadInternal.h
2942 * WebView.subproj/WebView.m: ditto.
2944 2005-09-27 Adele Peterson <adele@apple.com>
2948 Changed ints to size_t where appropriate.
2950 * Misc.subproj/WebCoreStatistics.h:
2951 * Misc.subproj/WebCoreStatistics.m:
2952 (+[WebCoreStatistics javaScriptObjectsCount]):
2953 (+[WebCoreStatistics javaScriptInterpretersCount]):
2954 (+[WebCoreStatistics javaScriptNoGCAllowedObjectsCount]):
2955 (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
2956 * WebView.subproj/WebPreferences.m:
2957 (-[WebPreferences _pageCacheSize]):
2958 (-[WebPreferences _objectCacheSize]):
2959 * WebView.subproj/WebPreferencesPrivate.h:
2961 2005-09-26 John Sullivan <sullivan@apple.com>
2963 Reviewed by Tim Omernick.
2965 - fixed <rdar://problem/4118126> Drag-and-drop text with text containing a colon causes a crash
2967 There were two problems here. One is that dragging and dropping text within the same WebTextView
2968 should have done nothing rather than try to navigate. The other is that navigating while processing
2969 the end of the drag would dealloc the drag-initiating WebTextView, leading to a crash. Fixing the
2970 former doesn't fix all cases of the latter, since dropping onto (e.g.) Safari's location field
2971 could cause a navigation during the drag. So these two issues needed to be fixed separately.
2973 * WebView.subproj/WebTextView.m:
2974 (-[WebTextView dragSelectionWithEvent:offset:slideBack:]):
2975 Before drag, retain self, and tell WebView that the drag is self-initiated. After drag, do the
2976 opposite. This is the same approach as WebImageView, but it can all be contained in one method
2977 here due to NSTextView's dragging API, which wraps up some of the drag-machinery guts.
2979 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
2981 Reviewed and landed by Darin.
2983 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5100
2984 -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
2986 * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
2987 Set up a the CGContext with a matrix that flips the text if the view is not flipped.
2989 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
2991 Reviewed, tweaked a tiny bit, and landed by Darin.
2993 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4940
2994 CG and ATSUI give different width to the same text
2996 * WebCoreSupport.subproj/WebTextRenderer.m:
2997 (overrideLayoutOperation): Added. ATSU callback to do the rounding.
2998 (-[WebTextRenderer _trapezoidForRun:style:atPoint:]): Use the new createATSULayoutParameters
2999 function instead of calling _createATSUTextLayoutForRun.
3000 (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Use createATSULayoutParameters,
3001 and also compute the width in a way that works for any direction combination.
3002 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): Use createATSULayoutParameters.
3003 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
3004 Use createATSULayoutParameters. Also put in code that seems to work around an ATSU bug.
3005 (createATSULayoutParameters): Added.
3006 (disposeATSULayoutParameters): Added.
3008 2005-09-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
3013 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4862
3014 Incorrect layout of bidi overrides
3016 * WebCoreSupport.subproj/WebTextRenderer.m:
3017 (addDirectionalOverride): Renamed, and made it work in both directions.
3018 (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Updated to call addDirectionalOverride.
3019 (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): More of the same.
3020 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]): Ditto.
3022 2005-09-24 Alexey Proskuryakov <ap@nypop.com>
3024 Tweaked, reviewed, and landed by Darin.
3026 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4394
3027 Mouse clicks ignored in inline input areas
3029 * WebView.subproj/WebHTMLView.m:
3030 (-[NSArray mouseDown:]): Removed misleading comment and added code to send mouse event to input manager.
3031 (-[NSArray mouseDragged:]): Added code to send mouse event to input manager.
3032 (-[NSArray mouseUp:]): Ditto.
3033 (-[WebHTMLView _discardMarkedText]): Umnmark text before calling markedTextAbandoned: to match behavior
3034 of NSTextView (not sure why we did things in the opposite order before).
3035 (-[WebHTMLView _updateSelectionForInputManager]): Ditto.
3039 * WebView.subproj/WebView.m:
3040 (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:newScaleFactor:]):
3041 Fix typecast that used ... for no good reason.
3043 2005-09-23 Duncan Wilcox <duncan@mclink.it>
3045 Reviewed and landed by Darin.
3047 - name changes to prepare for fixing bugzilla bug 4582
3049 * WebView.subproj/WebHTMLView.m: Changed names to match WebCore changes.
3051 2005-09-20 John Sullivan <sullivan@apple.com>
3053 Reviewed by Tim Omernick.
3055 - fixed <rdar://problem/3228554> We should enforce one selection per WebView instead of per window
3057 Note that this checkin does not mean that we will always maintain a selection in a WebView when
3058 the focus is elsewhere. Instead it means that there should never be more than one frame containing
3059 a selection in a WebView, and that it's possible to maintain a selection in a WebView when the focus
3062 * WebView.subproj/WebView.m:
3063 (-[WebView searchFor:direction:caseSensitive:wrap:]):
3064 removed unnecessary and somewhat confusing comment
3065 (-[WebView selectedFrame]):
3066 now calls the extracted method -_focusedFrame
3067 (-[WebView _focusedFrame]):
3068 new method, extracted from -selectedFrame; returns frame containing first responder, if any
3069 (-[WebView _findSelectedFrameStartingFromFrame:skippingFrame:]):
3070 added skippingFrame parameter, which is never returned
3071 (-[WebView _findSelectedFrameSkippingFrame:]):
3072 new method, starts from main frame and passes a frame to skip
3073 (-[WebView _findSelectedFrame]):
3074 now calls _findSelectedFrameSkippingFrame:nil
3075 (-[WebView _selectedFrameDidChange]):
3076 new method, called by WebDocumentText protocol implementors; calls -deselectAll on frame that
3077 formerly displayed a selection, if any
3079 * WebView.subproj/WebViewInternal.h:
3080 added category WebDocumentSelectionExtras, with the one method _selectedFrameDidChange
3082 * WebView.subproj/WebHTMLView.m:
3083 (-[WebHTMLView becomeFirstResponder]):
3084 call -[WebView _selectedFrameDidChange]
3086 * WebView.subproj/WebPDFView.m:
3087 (-[WebPDFView becomeFirstResponder]):
3088 call -[WebView _selectedFrameDidChange]
3089 (-[WebPDFView resignFirstResponder]):
3090 deselect all unless webview says not to; note that this doesn't work in all cases due to:
3091 <rdar://problem/4265966> PDFs continue to show a (secondary) selection when the focus moves elsewhere
3093 * WebView.subproj/WebTextView.m:
3094 (-[WebTextView becomeFirstResponder]):
3095 call -[WebView _selectedFrameDidChange]
3096 (-[WebTextView resignFirstResponder]):
3097 deselect all unless webview says not to
3099 2005-09-20 Eric Seidel <eseidel@apple.com>
3103 Moved MIME type support from a hard coded list
3104 (in two places) to single lists in the corresponding
3105 *Representation classes. Also moved the list of types
3106 supported by WebCore (WebHTMLRepresentation) into WebCore.
3107 http://bugzilla.opendarwin.org/show_bug.cgi?id=5037
3109 * WebView.subproj/WebDataSource.m:
3110 (addTypesFromClass): new inline function
3111 (+[WebDataSource _repTypesAllowImageTypeOmission:]):
3112 * WebView.subproj/WebFrameView.m:
3113 (addTypesFromClass): new inline function
3114 (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
3115 * WebView.subproj/WebHTMLRepresentation.h:
3116 * WebView.subproj/WebHTMLRepresentation.m:
3117 (+[WebHTMLRepresentation supportedMIMETypes]):
3118 * WebView.subproj/WebHTMLView.m:
3119 (+[WebHTMLView supportedMIMETypes]):
3120 * WebView.subproj/WebHTMLViewPrivate.h:
3121 * WebView.subproj/WebImageRepresentation.h:
3122 * WebView.subproj/WebImageRepresentation.m:
3123 (+[WebImageRepresentation supportedMIMETypes]):
3124 * WebView.subproj/WebImageView.h:
3125 * WebView.subproj/WebImageView.m:
3126 (+[WebImageView supportedMIMETypes]):
3127 * WebView.subproj/WebPDFRepresentation.h:
3128 * WebView.subproj/WebPDFRepresentation.m:
3129 (+[WebPDFRepresentation supportedMIMETypes]):
3130 * WebView.subproj/WebPDFView.h:
3131 * WebView.subproj/WebPDFView.m:
3132 (+[WebPDFView supportedMIMETypes]):
3133 * WebView.subproj/WebTextRepresentation.h:
3134 * WebView.subproj/WebTextRepresentation.m:
3135 (+[WebTextRepresentation supportedMIMETypes]):
3136 * WebView.subproj/WebTextView.h:
3137 * WebView.subproj/WebTextView.m:
3138 (+[WebTextView supportedMIMETypes]):
3139 * WebView.subproj/WebView.m:
3140 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
3141 (+[WebView MIMETypesShownAsHTML]): updated to match style
3142 (+[WebView setMIMETypesShownAsHTML:]): ditto
3144 2005-09-16 John Sullivan <sullivan@apple.com>
3146 * WebView.subproj/WebImageView.m:
3147 (-[WebImageView copy:]):
3148 fixed build-breaking silly error in previous checkin
3150 2005-09-16 John Sullivan <sullivan@apple.com>
3152 Reviewed by Tim Omernick
3154 - fixed <rdar://problem/4256557> CrashTracer: 238 crashes in Safari at
3155 com.apple.AppKit: -[NSPasteboard setData:forType:] + 188
3157 * WebView.subproj/WebImageView.m:
3158 (-[WebImageView copy:]):
3159 declare types to pasteboard before starting to set their data
3160 (-[WebImageView writeSelectionToPasteboard:types:]):
3163 2005-09-16 Adele Peterson <adele@apple.com>
3165 Rolling out the fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4924
3166 QPainter should use CGContext as much as possible rather than NSGraphicsContext
3167 since it caused a performance regression.
3169 2005-09-16 Adele Peterson <adele@apple.com>
3171 Change by Darin, reviewed by me and Maciej.
3173 Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=4547
3174 use int instead of long for 32-bit (to prepare for LP64 compiling)
3176 * Plugins.subproj/npapi.m: changed types to match those defined in npapi.h
3179 (NPN_PostURLNotify):
3183 2005-09-14 Justin Garcia <justin.garcia@apple.com>
3187 Fixes <rdar://problem/4237479> REGRESSION (Cambridge-Denver): old QuickTime movie continues to play sound after reload
3188 We were adding the movie to the document twice after the changes were added to handle fallback content.
3189 There are some errors for which we should not render fall back content
3191 * Misc.subproj/WebKitErrorsPrivate.h:
3192 Introduced WebKitErrorPlugInWillHandleLoad to represent the cancel we do
3193 to prevent loading plugin content twice
3195 * Plugins.subproj/WebPluginDocumentView.m:
3196 (-[WebPluginDocumentView dataSourceUpdated:]): Ditto
3198 * WebView.subproj/WebDataSource.m:
3199 (-[WebDataSource _receivedMainResourceError:complete:]):
3200 Don't handleFallbackContent on WebKitErrorPlugInWillHandleLoad or on a user cancel
3202 2005-09-14 Timothy Hatcher <thatcher@apple.com>
3206 * WebKit.xcodeproj/project.pbxproj:
3207 made WebDashboardRegion.h a private header
3209 2005-09-14 Darin Adler <darin@apple.com>
3213 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4924
3214 QPainter should use CGContext as much as possible rather than NSGraphicsContext
3216 * WebCoreSupport.subproj/WebImageRendererFactory.m: Remove setCGCompositeOperationFromString
3217 method, no longer needed.
3219 2005-09-13 Tim Omernick <tomernick@apple.com>
3221 Reviewed by Justin Garcia, Darin Adler.
3223 - <rdar://problem/3163393> Safari does not support Windowless mode in Flash
3225 * Plugins.subproj/WebBaseNetscapePluginView.h:
3226 Added 'isTransparent' instance variable.
3228 * Plugins.subproj/WebBaseNetscapePluginView.m:
3229 (-[WebBaseNetscapePluginView saveAndSetPortStateForUpdate:]):
3230 When updating a plugin in "windowless" (transparent) mode, clip drawing to the dirty
3231 region of the opaque ancestor. This means that a partially-transparent plugin, which
3232 by definition does not clear its port on redraw, will not overdraw the valid parts
3234 (-[WebBaseNetscapePluginView sendEvent:]):
3235 Disabled the "green debug background" for transparent plugins -- since they are not
3236 expected to cover their entire port every redraw, this debug code makes no sense.
3237 (-[WebBaseNetscapePluginView setVariable:value:]):
3238 Implemented -setVariable:value:, which is called from NPN_SetValue() (previously
3240 Right now we only handle NPPVpluginTransparentBool; if we choose to handle the other
3241 plugin variables, then we may do so here.
3242 * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
3243 Added SPI for -[WebBaseNetscapePluginView setVariable:value].
3244 * Plugins.subproj/npapi.m:
3246 Implemented this function so that plugins may set state (such as window mode).
3248 2005-09-11 Mark Rowe <opendarwin.org@bdash.net.nz>
3250 Reviewed, tweaked, and landed by Darin.
3252 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4286
3253 .Mac prefpane crashes when Safari using CVS WebKit is running
3255 * WebView.subproj/WebView.m: (-[WebView initWithFrame:frameName:groupName:]):
3256 If ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH, and WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
3257 is set in the environment, then unset DYLD_FRAMEWORK_PATH.
3259 * WebKit.xcodeproj/project.pbxproj: Set ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
3260 in configurations other than Default -- we don't want that code in production
3261 builds, but we want it in builds we do ourselves and nightly builds.
3263 2005-09-10 Ingmar J Stein <IngmarStein@gmail.com>
3265 Reviewed and landed by Darin.
3267 * WebCoreSupport.subproj/WebImageRenderer.m:
3268 (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
3269 Removed unused local variable.
3271 2005-09-09 Tim Omernick <tomernick@apple.com>
3273 Reviewed by John Sullivan.
3275 * History.subproj/WebBackForwardList.m:
3276 (-[WebBackForwardList removeItem:]):
3277 SPI to remove a given WebHistoryItem.
3279 * History.subproj/WebBackForwardListPrivate.h: Added.
3281 * WebKit.xcodeproj/project.pbxproj:
3282 Added WebBackForwardListPrivate.h as a private header.
3284 2005-09-09 John Sullivan <sullivan@apple.com>
3286 Reviewed by Tim Omernick.
3288 fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4070:
3289 Find in plain text won't find only occurrence if it overlaps selection
3291 * Misc.subproj/WebSearchableTextView.m:
3292 (-[NSString findString:selectedRange:options:wrap:]):
3293 in the wrap case, extend the search range far enough that text overlapping the
3294 selection (including the exact-match case) will be considered.
3296 2005-09-08 Justin Garcia <justin.garcia@apple.com>
3300 WebKit portion of multipart/x-mixed-replace support
3302 * WebCoreSupport.subproj/WebSubresourceLoader.m:
3303 (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
3304 Subresource case: Check for Foundation level multipart support
3305 (-[WebSubresourceLoader didReceiveResponse:]):
3306 Send previously received data in a multipart section to the coreLoader
3307 (-[WebSubresourceLoader didReceiveData:lengthReceived:]):
3308 Don't send data to the coreLoader until it has been completely received
3309 * WebView.subproj/WebDataSource.m:
3310 (-[WebDataSource _startLoading:]):
3311 Main resource case: check for Foundation level multipart support
3312 (+[WebDataSource _repTypesAllowImageTypeOmission:]):
3313 Some server apps send data right after declaring content multipart/x-mixed-replace, and expect it to be treated as html
3314 (-[WebDataSource _commitIfReady:]):
3315 Don't ask the WebFrame to close its old WebDataSource when loading a multipart section, because we're going to reuse it
3316 (-[WebDataSource _receivedData:]):
3317 For non text/html multipart sections, we commit the data all at once, at the end
3318 (-[WebDataSource _doesProgressiveLoadWithMIMEType:]):
3319 Added heuristic for when to commit the load incrementally
3320 (-[WebDataSource _commitLoadWithData:]):
3321 Moved from _receivedData into its own function
3322 (-[WebDataSource _revertToProvisionalState]):
3323 (-[WebDataSource _setupForReplaceByMIMEType:]):
3324 Commits the data received for the previous multipart section if it wasn't loaded progresively, clears out the WebFrame and WebDatasource for the next multipart section
3325 * WebView.subproj/WebDataSourcePrivate.h:
3326 * WebView.subproj/WebFrame.m:
3327 (-[WebFrame _transitionToCommitted:]):
3328 The very first multipart section is treated as a normal load, so that the back/forward list and history are updated.
3329 All later sections have a new load type, WebFrameLoadTypeReplace, and are treated like reloads
3330 (-[WebFrame _checkLoadCompleteForThisFrame]): Ditto
3331 (-[WebFrame _itemForRestoringDocState]): Ditto
3332 (-[WebFrame _setupForReplace]):
3333 Clears out the WebFrame for the next multipart section
3334 * WebView.subproj/WebFrameInternal.h:
3335 * WebView.subproj/WebFramePrivate.h:
3336 * WebView.subproj/WebFrameView.m:
3337 (+[WebFrameView _viewTypesAllowImageTypeOmission:]): See above
3338 * WebView.subproj/WebLoader.h:
3339 * WebView.subproj/WebLoader.m:
3340 (-[NSURLProtocol clearResourceData]):
3341 (-[NSURLProtocol setSupportsMultipartContent:]):
3342 * WebView.subproj/WebMainResourceLoader.m: Straightforward
3343 (-[WebMainResourceLoader didReceiveResponse:]):
3345 2005-09-06 Geoffrey Garen <ggaren@apple.com>
3347 - fixed build bustage from last checkin.
3351 * History.subproj/WebBackForwardList.m:
3352 (-[WebBackForwardList pageCacheSize]): updated debug printf since we no
3353 longer have a variable called 'multiplier'
3355 2005-09-06 David Hyatt <hyatt@apple.com>
3357 Reduce the # of cached pages for a back/forward list. The old cache would cache the
3359 > 1gb memory = 16 pages per tab/window
3360 > 512mb memory = 8 pages per tab/window
3361 <= 512mb memory = 4 pages per tab/window
3363 This consumes far too much memory and is way too aggressive. The new cache sizes are
3365 >= 1gb memory = 3 pages per tab/window
3366 >= 512mb memory = 2 pages per tab/window
3367 < 512mb memory = 1 page per tab/window
3371 * History.subproj/WebBackForwardList.m:
3372 (-[WebBackForwardList pageCacheSize]):
3373 * WebView.subproj/WebPreferences.m:
3374 (+[WebPreferences initialize]):
3376 2005-09-05 Darin Adler <darin@apple.com>
3378 Reviewed by John Sullivan.
3380 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4846
3381 REGRESSION: Carbon WebKit applications don't work at all
3383 * Carbon.subproj/HIWebView.m: Remove lots of unneeded declarations of private stuff.
3384 (Draw): Call WKNSWindowOverrideCGContext and WKNSWindowRestoreCGContext rather
3385 than calling a non-existent setCGContext: method on the context.
3387 2005-09-05 John Sullivan <sullivan@apple.com>
3389 Reviewed by Dave Hyatt.
3391 - change related to <rdar://problem/4211999> Safari quits when click-drag-hold an image
3392 that is set to automatically change.
3394 * WebView.subproj/WebHTMLView.m:
3395 (-[NSArray namesOfPromisedFilesDroppedAtDestination:]):
3396 handle nil wrapper with ERROR and early return rather than ASSERT, since we now know
3397 of a way to reproduce this (written up as 4244861)
3399 2005-09-05 Darin Adler <darin@apple.com>
3401 Reviewed by John Sullivan.
3403 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4357
3404 crash related to animated GIFs, reproducible in non-Safari WebKit application
3406 * WebCoreSupport.subproj/WebImageData.m:
3407 (removeAnimatingRendererFromView): Added.
3408 (removeFromDictionary): Added.
3409 (-[WebImageData removeAnimatingRenderer:]): Rewrote using CF functions rather than
3410 NS functions so that we never retain the views, since this can be called from
3411 a view's dealloc method.
3412 (setNeedsDisplayInAnimationRect): Added.
3413 (-[WebImageData _nextFrame:]): Rewrote as above, even though in this case it can't
3414 be called from the dealloc method.
3416 2005-08-26 David Hyatt <hyatt@apple.com>
3418 Add support for a new scaling and tiling function so that border images from CSS3
3423 * WebCoreSupport.subproj/WebImageData.h:
3424 * WebCoreSupport.subproj/WebImageData.m:
3425 (-[WebImageData scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
3426 * WebCoreSupport.subproj/WebImageRenderer.m:
3427 (-[WebImageRenderer scaleAndTileInRect:fromRect:withHorizontalTileRule:withVerticalTileRule:context:]):
3428 (-[WebImageRenderer setAnimationRect:]):
3429 * WebView.subproj/WebHTMLView.m:
3430 (-[WebHTMLView updateFocusState]):
3432 2005-08-26 Adele Peterson <adele@apple.com>
3436 * WebKit.xcodeproj/project.pbxproj: Changed WebKit.Framework to WebKit.framework in UMBRELLA_FRAMEWORK.
3438 2005-08-25 David Harrison <harrison@apple.com>
3442 <rdar://problem/4227734> Denver Regression: WebCore selection bug on lines starting with tab (clownfish)
3444 The text is in a DIV styled with "white-space:pre", and uses newline characters as linebreaks.
3445 WebKit's text renderer is erroneously considering the width of the lines leading up to the tab
3446 character when calculating the width of the tab.
3447 Easily fixed by having widthForNextCharacter ignore the widthToStart when working with tabWidth.
3448 Any prior text that fits in the same line is already factored into the xpos, which is paid attention to.
3450 * WebCoreSupport.subproj/WebTextRenderer.m:
3451 (widthForNextCharacter):
3452 Ignore the widthToStart when working with tabWidth.
3454 2005-08-23 John Sullivan <sullivan@apple.com>
3456 Reviewed by Beth Dakin.
3458 - fixed <rdar://problem/4229167> 14 leaks of WebFileButton and associated objects,
3459 seen after running webkit layout tests
3461 * WebCoreSupport.subproj/WebBridge.m:
3462 (-[WebBridge fileButtonWithDelegate:]):
3463 this method was returning a retained object; I added an autorelease
3465 2005-08-23 Darin Adler <darin@apple.com>
3467 * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
3469 2005-08-23 Mitz Pettel <opendarwin.org@mitzpettel.com>
3471 Reviewed and landed by Darin.
3473 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4604
3474 LEAK -[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:] leaks an ATSUTextLayout
3475 <rdar://problem/4228787> ATSUTextLayout leak in _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs: (4604)
3477 * WebCoreSupport.subproj/WebTextRenderer.m:
3478 (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
3479 Added missing call to ATSUDisposeTextLayout.
3481 2005-08-22 Geoffrey Garen <ggaren@apple.com>
3483 - fixed <rdar://problem/4227011> Debugger SPI should be removed from WebView.h API
3485 Reviewed by mjs and adele.
3487 Cut and pasted debugging SPI from WebView to WebView(WebPendingPublic)
3489 * WebView.subproj/WebView.h:
3490 * WebView.subproj/WebView.m:
3491 (-[WebView setScriptDebugDelegate:]):
3492 (-[WebView scriptDebugDelegate]):
3493 * WebView.subproj/WebViewPrivate.h:
3495 2005-08-20 John Sullivan <sullivan@apple.com>
3497 Reviewed by Darin Adler.
3499 - WebKit part of fix for
3500 <rdar://problem/3977607> ER: Safari should check framework versions at launch
3502 * WebView.subproj/WebViewPrivate.h:
3503 * WebView.subproj/WebView.m: