2006-08-01 Maciej Stachowiak Reviewed by Geoff. - some refactoring in preparation for moving more stuff to WebFrameLoader. * WebView/WebFrame.m: (-[WebFrame _clearDataSource]): (-[WebFrame _detachFromParent]): (-[WebFrame _commitProvisionalLoad]): (-[WebFrame _transitionToCommitted:]): (-[WebFrame _clearProvisionalLoad]): (-[WebFrame _markLoadComplete]): (-[WebFrame _checkLoadCompleteForThisFrame]): (-[WebFrame _startProvisionalLoad:]): (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): (-[WebFrame stopLoading]): 2006-07-31 Maciej Stachowiak Reviewed by Tim Hatcher. - renamed TransferJob to ResourceLoader in WebCore * COM/WebFrame.cpp: (WebFrame::loadDataSource): (WebFrame::receivedRedirect): (WebFrame::receivedResponse): (WebFrame::receivedData): (WebFrame::receivedAllData): (WebFrame::setStatusText): * COM/WebFrame.h: 2006-07-31 Darin Adler Reviewed by Maciej. - omit the margin and padding boxes for display types where they are ignored - use CSS instead of properties for table spacing and padding as suggested by Tim H. * WebInspector/webInspector/inspector.css: Added rules for spacing and padding. Added rules that hide the margin and padding boxes (borders and all but the center cell) when the hide attribute is present. * WebInspector/webInspector/inspector.html: Added classes for the rules above. Removed cellpadding and cellspacing attributes. * WebInspector/webInspector/inspector.js: Added code to hide/show the margin and padding boxes based on the display type. 2006-07-31 Duncan Wilcox Reviewed by Darin. Fixes "REGRESSION: delegate returning no menu elements crashes webkit" No automated test, because there's no way to programmatically open a context menu, no manual test because there's no way to customize the context menu delegate. * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]): Make sure the context menu returned some menu items before accessing the first one. 2006-07-31 Timothy Hatcher Reviewed by John. REGRESSION: "Search in Google" and "Search in Spotlight" fail to work on text selected in a frame Use selectedFrame to get the frame with the text selection. * WebView/WebView.m: (-[WebView _searchWithGoogleFromMenu:]): (-[WebView _searchWithSpotlightFromMenu:]): 2006-07-31 Darin Adler Reviewed by Tim Hatcher. - http://bugzilla.opendarwin.org/show_bug.cgi?id=10168 add a first cut at a Metrics pane to the inspector * WebInspector/webInspector/inspector.css: Add styles for the new metrics pane. * WebInspector/webInspector/inspector.html: Add the new metrics pane, starting with the table to show the box model. * WebInspector/webInspector/inspector.js: Add the new metrics pane. Add back some "title" attributes so we have more tooltips. Removed the optional parameter to getComputedStyle. 2006-07-31 Anders Carlsson Reviewed by John. * Plugins/WebPluginDatabase.m: (-[WebPluginDatabase refresh]): Create a mutable set instead of a mutable array. 2006-07-30 Darin Adler Reviewed by Tim Hatcher. * WebInspector/webInspector/inspector.js: Fix bug where a null property value leads to an empty style pane. 2006-07-30 Darin Adler Reviewed by Tim Hatcher. - http://bugzilla.opendarwin.org/show_bug.cgi?id=10163 some improvements for the inspector * WebInspector/WebInspector.m: (+[WebInspector sharedWebInspector:]): Fixed bug that could cause the inspector to be garbage collected if used in an application with GC enabled. (-[WebInspector dealloc]): Removed a call to a non-existent close method. (-[WebInspector window]): Added a custom WebPreferences object and called setPrivateBrowsingEnabled:YES so the inspector won't appear in the history menu. Also call setProhibitsMainFrameScrolling:YES to try to get rid of trouble where the inspector scrolls when dragging. * WebInspector/webInspector/inspector.css: Added style for the new color swatch, and JavaScript properties. More of the style should be shared between the panes, but this should be OK for now. * WebInspector/webInspector/inspector.html: Added a first cut at a JavaScript properties pane. Needs work, but better than nothing. * WebInspector/webInspector/inspector.js: Lots of improvements: - Omit "typical" property values from computed style display, making it much shorter. - Use the words "black", "white", and "transparent" when appropriate for color values. - Refactored the loaded() function to get rid of repetitive scrollbar setup. - Added a new scrollarea for the JavaScript properties pane. - Simplified refreshScrollbars() -- we now refresh all scrollbars every time, which does no harm. - Removed unused resultsWithXpathQuery(). - Use [] instead of "new Array()" and {} instead of "new Object()". - Removed unused xpathForNode(). - Changed style pane to display the style for a text node's parent instead of saying it can't display the style for text. - Fixed regression I caused a while back by checking the length of a computed style and not trying to display anything if its length is 0. Before this change and the corresponding change in WebCore, we'd see a complete list of all styles with the empty string as the value for each one. - Changed the name of the computedStyle flag on the style rules array to isComputedStyle to make it easier to understand it's a boolean. - Fixed an error in the code that does !important scanning where it was trying to do a special case for computed style, but was checking the computed style flag on the wrong object. - Added populateStyleListItem() function to factor out things in common between the items in the top level list and the expanded tree for shorthand properties. - Added code to make a color swatch next to the textual representation for any property that contains a color. - Implemented a first cut at a simple JavaScript properties pane. 2006-07-29 Darin Adler - Removed tabs from these source files that still had them. We don't use them; that way source files look fine in editors that have tabs set to 8 spaces or to 4 spaces. - Removed allow-tabs Subversion property from the files too. * DefaultDelegates/WebDefaultPolicyDelegate.m: * History/WebHistory.m: * Misc/WebDownload.m: * Misc/WebIconDatabase.m: * Misc/WebKitErrors.m: * Misc/WebKitLogging.m: * Misc/WebNSDataExtras.m: * Misc/WebNSFileManagerExtras.m: * Panels/WebPanelAuthenticationHandler.m: * Plugins/WebBaseNetscapePluginView.m: * Plugins/npfunctions.h: * WebCoreSupport/WebSubresourceLoader.m: * WebView/WebMainResourceLoader.m: * WebView/WebView.h: * WebView/WebView.m: 2006-07-29 Sam Weinig Reviewed by Darin. - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080 Adopt pedantic changes from the Unity project to improve cross-compiler compatibility Changes include: * Adding missing newline to the end of the file. * Turning on gcc warning for missing newline at the end of a source file (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc). * WebKit.xcodeproj/project.pbxproj: * WebView/WebResourcePrivate.h: 2006-07-29 Mitz Pettel Reviewed by John Sullivan. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9984 ASSERTION FAILURE: _private->mouseDownEvent != nil (WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask]) * WebView/WebHTMLView.m: (-[WebHTMLView _setMouseDownEvent:]): Moved into the WebHTMLViewFileInternal category and changed to accept nil. (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): Copy the hit HTMLView's mouse down event to the top HTMLView. (-[WebHTMLView acceptsFirstMouse:]): Added a call to _setMouseDownEvent:nil before returning. (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Added a call to _setMouseDownEvent:nil before returning. (-[WebHTMLView mouseUp:]): Added a call to _setMouseDownEvent:nil to clear the event set in mouseDown: (and used during dragging). (-[WebHTMLView _delegateDragSourceActionMask]): Copy the hit HTMLView's mouse down event to the top HTMLView. 2006-07-28 Timothy Hatcher Reviewed by John. REGRESSION: Spell check not available from contextual menu in Mail The context menu code should be checking isContentEditable on DOMNode not just DOMElement. This is needed because DOMText will be the node class of any text that is clicked. * DefaultDelegates/WebDefaultContextMenuDelegate.m: (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): 2006-07-25 Geoffrey Garen Reviewed by Maciej, inspired by John. - Fixed 1% REGRESSION on iBench HTML due to repeated requests for non-existent favicon An optimization to avoid serializing favicon data for missing icons had stomped an optimization to avoid GETing a missing favicon more than once. The solution is a happy marriage of optimizations, ensuring that we *retain* the missing favicon's "i am missing" data without posting a notification or saving it to disk. * Misc/WebIconDatabase.m: (-[WebIconDatabase _setIconURL:forURL:]): 2006-07-25 David Harrison Reviewed by timo and Darin. "Paste and Match Style" is not working in Mail (add SPI) * WebKit.xcodeproj/project.pbxproj: * WebView/WebView.m: (-[WebView replaceSelectionWithNode:]): (-[WebView _replaceSelectionWithNode:matchStyle:]): * WebView/WebViewPrivate.h: (-[WebView _replaceSelectionWithNode:matchStyle::]): New SPI that is same as replaceSelectionWithNode: with added parameter whether to match existing style. 2006-07-24 Darin Adler Reviewed by Adele and Justin. - update for change to require context when creating fragments from text (needed to handle whitespace properly) * WebView/WebHTMLView.m: (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]): Added context parameter, pass through to bridge. (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Pass selection range as context when calling above method. (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Pass drag caret as context when calling above method. 2006-07-24 Maciej Stachowiak Reviewed by Geoff. - fix Help Viewer loads empty window (not getting didFailLoadingWithError: callback) (without re-introducing http://bugzilla.opendarwin.org/show_bug.cgi?id=10062 ) * WebView/WebLoader.h: * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader receivedError:]): Copy in some code from the base class to do it in the proper order, surrounding the call to [ds _receivedMainResourceError:error complete:YES]. 2006-07-24 Anders Carlsson Reviewed by Tim O. * Misc/WebIconDatabase.m: (-[WebIconDatabase removeAllIcons]): Make an array of the keys and iterate through it to avoid modifying the dictionary while enumerating it. 2006-07-24 Timothy Hatcher Reviewed by John and Darin. Cannot selectively install a custom scroller that differs from the default Aqua frame size. Adds two new private methods to WebFrameView that allows an application to set a custom scroll view class. This is needed if the application wants to install a custom scroller that is wider than the typical scroller, because NSScrollView does the content rect calculations in a class method (ignoring custom scrollers.) The _setScrollViewClass method requires the class to be a subclass of WebDynamicScrollBarView, or nil can be passed to reset to the default class. A new scroll view of the specified class will then replace the previous one without the need to reload content of the frame. * WebView/WebFrameView.m: (-[WebFrameView _customScrollViewClass]): (-[WebFrameView _setCustomScrollViewClass:]): * WebView/WebFrameViewPrivate.h: 2006-07-24 Alexey Proskuryakov Reviewed by Darin. Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009 REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames) * WebView/WebView.m: (+[WebView _viewClass:andRepresentationClass:forMIMEType:]): If we've got a type supported by WebPDFView, make sure to initialize the plugin database, in case a plugin wants to handle it. 2006-07-23 Mark Rowe Reviewed by Maciej. Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions http://bugzilla.opendarwin.org/show_bug.cgi?id=9686 WebKit portion of the fix. * DefaultDelegates/WebDefaultScriptDebugDelegate.m: (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]): * DefaultDelegates/WebScriptDebugServer.h: * DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer webView:exceptionWasRaised:sourceId:line:forWebFrame:]): Notify listeners that an exception has been raised. * WebView/WebScriptDebugDelegate.h: * WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame exceptionRaised:sourceId:line:]): Dispatch through to delegate and WebScriptDebugServer. 2006-07-23 Adele Peterson Reviewed by Darin. - Fix for CrashTracer: 7 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 155 * WebView/WebHTMLView.m: (-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]): needsDisplay was returning NO even though the view has a dirty rect (see ). Since we know about the dirty rect, we don't actually need to check needsDisplay. 2006-07-22 Timothy Hatcher Rolling out r15572. Bug 10062: REGRESSION: dom/xhtml/level2/html/HTMLIFrameElement11.xhtml asserts/crashes http://bugzilla.opendarwin.org/show_bug.cgi?id=10062 2006-07-21 Timothy Hatcher Reviewed by Maciej. Help Viewer loads empty window (not getting didFailLoadingWithError: callback) Call super's didFailWithError before _receivedMainResourceError because _receivedMainResourceError will cause the datasource's frame to be set to nil before the didFailLoadingWithError delegate callback is sent. (This order is needed now that WebDataSource does not hold on to the WebView; it uses the WebFrame to get to the WebView. If the WebFrame is nil we can't get to the WebView's resource load delegate.) * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader receivedError:]): 2006-07-22 Timothy Hatcher Reviewed by Adele. REGRESSION: Ctrl-clicking on a selection containing a word doesn't display a complete contextual menu Show the editing context menu if the WebView is editible. The original change only checked if the DOM element was editable, and isContentEditable returns NO if entire WebView is editable. * DefaultDelegates/WebDefaultContextMenuDelegate.m: (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): 2006-07-21 Timothy Hatcher Reviewed by Maciej. Help Viewer loads empty window (not getting didFailLoadingWithError: callback) Call super's didFailWithError before _receivedMainResourceError because _receivedMainResourceError will cause the datasource's frame to be set to nil before the didFailLoadingWithError delegate callback is sent. (This order is needed now that WebDataSource does not hold on to the WebView; it uses the WebFrame to get to the WebView. If the WebFrame is nil we can't get to the WebView's resource load delegate.) * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader receivedError:]): === Safari-521.20 === 2006-07-21 Timothy Hatcher Reviewed by John. REGRESSION (521.10.1 - 521.13): most context menu items missing when a form field is focused (common on google.com) (9680) Do not use _isEditable call since that only checks if the current selection or frame is editible. We now check if the currently clicked element is a content editible area, a textarea, an isindex or an input element that return YES to _isTextField. * DefaultDelegates/WebDefaultContextMenuDelegate.m: (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): 2006-07-20 John Sullivan Reviewed by Maciej - WebKit part of fix for: REGRESSION (419.3-521.19): repro Safari world leak involving closing tabs after clicking in a web page * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge textViewWasFirstResponderAtMouseDownTime:]): renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:) * WebView/WebHTMLViewInternal.h: * WebView/WebHTMLView.m: (-[WebTextCompleteController dealloc]): updated for name change (-[NSArray _setMouseDownEvent:]): Now only retains the first responder if it's a textView, since that's the only case that the only client actually cares about. This avoids a reference cycle caused by retaining self. This is the only substantive part of the patch; all the rest is just renaming for clarity, and comments. (-[NSArray mouseDown:]): updated for name change (-[WebHTMLView _textViewWasFirstResponderAtMouseDownTime:]): renamed to be more specific (formerly _wasFirstResponderAtMouseDownTime:) 2006-07-19 Tim Omernick Reviewed by Darin. safari crashed right after disabling "block pop up windows" (or other WebPreferences changes) * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]): Stop the plug-in when it is removed from its superview. It is not sufficient to do this in -viewWillMoveToWindow:nil, because the WebView might still has a hostWindow at that point, which prevents the plug-in from being destroyed. There is no need to start the plug-in when moving into a superview. -viewDidMoveToWindow takes care of that. === Safari-521.19 === 2006-07-17 Tim Omernick Reviewed by Maciej. need a way to prevent pages from scrolling to reveal elements that are focused by script * WebView/WebViewPrivate.h: * WebView/WebView.m: (-[WebView setProhibitsMainFrameScrolling:]): New method. Prohibits scrolling in the WebView's main frame. Used to "lock" a WebView to a specific scroll position. 2006-07-17 Timothy Hatcher Reviewed by Darin. REGRESSION: WebKit should call windowScriptObjectAvailable before attaching the script debugger * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge windowObjectCleared]): 2006-07-17 Timothy Hatcher Reviewed by Maciej. WebScriptObject and WebUndefined are no longer defined by WebKit Copy WebScriptObject.h from WebCore's private headers, not JavaScriptCore. * WebKit.xcodeproj/project.pbxproj: 2006-07-17 John Sullivan Reviewed by Tim Omernick. - fixed Orange Find highlight displays text in wrong size on PDF pages if they're not at "actual size" To match WebHTMLView, I made the methods that return attributed strings take the view's scale factor into account. * WebView/WebPDFView.m: (-[WebPDFView _scaledAttributedString:]): new helper method, takes an attributed string and returns one that's scaled by the view's current scale factor (-[WebPDFView attributedString]): pass result through _scaledAttributedString: (-[WebPDFView selectedAttributedString]): ditto 2006-07-17 Justin Garcia Reviewed by levi Rolled the first fix for: GMail Editor: Operations that use drop down menus blow away the selection back in and removed the call to _clearSelectionInOtherFrames from -[WebHTMLView becomeFirstResponder] to fix the bug. * WebView/WebHTMLView.m: (-[NSArray maintainsInactiveSelection]): (-[NSArray becomeFirstResponder]): * WebView/WebView.m: (-[WebView maintainsInactiveSelection]): 2006-07-15 Darin Adler Reviewed by John Sullivan. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928 REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix) * WebView/WebHTMLView.m: (-[WebHTMLView _documentRange]): Moved into WebHTMLViewFileInternal category. (-[WebHTMLView selectionRect]): Moved into WebDocumentPrivateProtocols category. (-[WebHTMLView selectionView]): Ditto. (-[WebHTMLView selectionImageForcingWhiteText:]): Ditto. (-[WebHTMLView selectionImageRect]): Ditto. (-[WebHTMLView pasteboardTypesForSelection]): Ditto. (-[WebHTMLView selectAll]): Ditto. (-[WebHTMLView deselectAll]): Ditto. (-[WebHTMLView string]): Ditto. (-[WebHTMLView _attributeStringFromDOMRange:]): Ditto. (-[WebHTMLView attributedString]): Ditto. (-[WebHTMLView selectedString]): Ditto. (-[WebHTMLView selectedAttributedString]): Ditto. (-[WebHTMLView supportsTextEncoding]): Ditto. (-[WebHTMLView _canProcessDragWithDraggingInfo:]): Moved into WebDocumentInternalProtocols. (-[WebHTMLView _isMoveDrag]): Ditto. (-[WebHTMLView _isNSColorDrag:]): Ditto. (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Ditto. (-[WebHTMLView draggingCancelledWithDraggingInfo:]): Ditto. (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Ditto. (-[WebHTMLView elementAtPoint:]): Ditto. (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto. * WebKit.xcodeproj/project.pbxproj: Let Xcode 2.3 do its thing. === Safari-521.17 === 2006-07-14 Timothy Hatcher Rolling out this fix from r15358 since it isn't resolved. 2006-07-11 Justin Garcia Reviewed by levi & thatcher GMail Editor: Operations that use drop down menus blow away the selection * WebView/WebHTMLView.m: (-[WebHTMLView maintainsInactiveSelection]): Maintain an inactive selection when resigning as first responder if the selection is editable or if the WebView tells us to. * WebView/WebView.m: (-[WebView maintainsInactiveSelection]): Just because a WebView is editable doesn't mean selections inside subframes will be. Return NO by default. 2006-07-14 Timothy Hatcher SWB: gcc-5412 (new?) objc warning causes WebCore project failure Build fix with the new GCC. Removes forward declarations of protocols. * Misc/WebSearchableTextView.h: * WebCoreSupport/WebSubresourceLoader.h: * WebKit.xcodeproj/project.pbxproj: * WebView/WebDocumentInternal.h: * WebView/WebDocumentPrivate.h: * WebView/WebHTMLView.h: * WebView/WebPDFView.h: * WebView/WebScriptDebugDelegatePrivate.h: 2006-06-28 Darin Adler Reviewed by Adele. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9625 REGRESSION: Focus not removed from password field after ctrl-click in text field * WebView/WebHTMLView.m: (-[WebHTMLView menuForEvent:]): Set handlingMouseDownEvent to YES while calling sendContextMenuEvent: on the bridge. 2006-07-14 Timothy Hatcher Reviewed by Maciej. Moved JavaScriptCore to be a public framework. * WebKit.xcodeproj/project.pbxproj: 2006-07-13 Mitz Pettel Reviewed by Darin. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9795 REGRESSION: Crash in [WebHTMLView(WebPrivate) _updateMouseoverWithEvent:] and http://bugzilla.opendarwin.org/show_bug.cgi?id=9850 REGRESSION: Assertion failure (SHOULD NEVER BE REACHED) in - [WebHTMLView(WebPrivate) removeTrackingRect:] * WebView/WebHTMLView.m: (-[WebHTMLView _updateMouseoverWithEvent:]): Return immediately if the view has already been closed. 2006-07-13 David Harrison Reviewed by Justin and Levi. REGRESSION: Option-Delete doesn't delete words during typing * Tests: editing/deleting/delete-by-word-001.html editing/deleting/delete-by-word-002.html * WebView/WebHTMLView.m: (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:granularity:]): 2006-07-13 Timothy Hatcher Rolling out this earlier change (r15378) now that it is fixed on AGL's end. Fixes Restore 64-bit OpenGL plug-in support once AGL is 64-bit AGL isn't 64-bit yet; temporarily remove it from WebKit 64-bit build * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.m: 2006-07-13 Timothy Hatcher Reviewed by Darin. REGRESSION: tabbing in mail moves focus to next control instead of inserting a tab space. Change editible WebView's tabKeyCyclesThroughElements to NO only if the setTabKeyCyclesThroughElements SPI wasn't called. * WebView/WebView.m: (-[WebView setEditable:]): 2006-07-12 Anders Carlsson Reviewed by Darin. http://bugzilla.opendarwin.org/show_bug.cgi?id=9624 REGRESSION: After ctrl-clicking in a EMPTY input or textarea field, the contextual menu shows "Search in Google" and "Search in Spotlight" as active menu items * DefaultDelegates/WebDefaultContextMenuDelegate.m: (-[WebDefaultUIDelegate editingContextMenuItemsForElement:defaultMenuItems:]): Don't create Dictionary, Spotlight or Google lookup items if there's no selection. 2006-07-12 Mark Rowe Reviewed by Timothy. http://bugzilla.opendarwin.org/show_bug.cgi?id=9868 Applications shown in Drosera's "Attach" window remain after exit * DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer init]): Register for NSApplicationWillTerminateNotification so we will know when the application is being exited. (-[WebScriptDebugServer dealloc]): Unregister notification before we are deallocated. (-[WebScriptDebugServer applicationTerminating:]): Inform anyone listening that we are going away. 2006-07-12 Tim Omernick Reviewed by Tim Hatcher. AGL isn't 64-bit yet; temporarily remove it from WebKit 64-bit build Also, fixed a LOG_ERROR() so that it uses the CGL error instead of the AGL error; Tim H missed this in his build fix from earlier. * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.m: 2006-07-11 John Sullivan Reviewed by Kevin and Tim O - added support for creating a selection image with white text * WebView/WebDocumentPrivate.h: added -selectionImageForcingWhiteText: and -selectionImageRect to the private protocol * Misc/WebSearchableTextView.m: (-[NSString selectionImageForcingWhiteText:]): added stub for this new method to this obsolete class to satisfy the compiler (-[NSString selectionImageRect]): ditto * WebView/WebHTMLView.m: (-[WebHTMLView _selectionDraggingImage]): now calls -selectionImageForcingWhiteText:NO instead of just -selectionImage (-[WebHTMLView _selectionDraggingRect]): now calls selectionImageRect, to which the implementation moved (-[WebHTMLView selectionImageForcingWhiteText:]): implemented this new method by calling through to new bridge method selectionImageForcingWhiteText: (-[WebHTMLView selectionImageRect]): implemented this new method by using existing _selectionDraggingRect implementation * WebView/WebPDFView.m: (-[WebPDFView selectionImageForcingWhiteText:]): implemented by using code that was formerly in Safari (-[WebPDFView selectionImageRect]): implemented by returning selectionRect 2006-07-11 Tim Omernick Reviewed by Geoff. : Give Netscape plug-ins access to their own DOM element * Plugins/WebBaseNetscapePluginView.h: * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView dealloc]): Release DOM element. (-[WebBaseNetscapePluginView getVariable:value:]): Return NPObject for plugin DOM element. * Plugins/WebNetscapePluginEmbeddedView.h: * Plugins/WebNetscapePluginEmbeddedView.m: (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): Now takes a DOMElement, in much the same way that WebKit plug-in views take a DOMElement. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]): Pass DOMElement to Netscape plug-ins. (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]): ditto 2006-07-11 Justin Garcia Reviewed by levi & thatcher GMail Editor: Operations that use drop down menus blow away the selection * WebView/WebHTMLView.m: (-[WebHTMLView maintainsInactiveSelection]): Maintain an inactive selection when resigning as first responder if the selection is editable or if the WebView tells us to. * WebView/WebView.m: (-[WebView maintainsInactiveSelection]): Just because a WebView is editable doesn't mean selections inside subframes will be. Return NO by default. 2006-07-11 Tim Omernick Reviewed by Tim Hatcher. WebKit now uses deprecated AGL functions * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView _createWindowedAGLContext]): aglSetDrawable() is deprecated in AGL 3.0. Use aglSetWindowRef() instead. (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): aglSetOffScreen() is deprecated in AGL 3.0. Use CGLSetOffScreen(), which does the same thing. 2006-07-11 Alexey Proskuryakov Reviewed by Tim O. - http://bugzilla.opendarwin.org/show_bug.cgi?id=7808 Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL * Plugins/WebNetscapePluginStream.m: (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]): Remove the early return when requesting an invalid (unsupported) URL. === Safari-521.16 === 2006-07-10 Mitz Pettel Reviewed by John Sullivan. - fix , aka REGRESSION (r14968-r14977): View Source doesn't work for pages from the back/forward cache * WebView/WebDataSource.m: (-[WebDataSource _setPrimaryLoadComplete:]): Set our data only if the frame loader is has just loaded it (when coming from the back/forward cache, it hasn't). 2006-07-10 Brady Eidson Reviewed by Alexey Resolved the console error messages people got from the new DB even if they didn't have it enabled * Misc/WebIconDatabase.m: (-[WebIconDatabase init]): Disabled initializing the IconDatabaseBridge if user is living on the old DB 2006-07-10 Darin Adler - try to fix Windows build * COM/WebFrame.h: Qualify DeprecatedString and KURL with WebCore:: prefixes. 2006-07-09 Darin Adler - try to fix Windows build * COM/WebFrame.cpp: Rename QChar to DeprecatedChar. 2006-07-09 Darin Adler - fix newlines to be consistent for all files in the COM directory (many had mixed style) and set the EOL style to "native" on them. * COM/*: Set properties and changed files. 2006-07-09 Tim Omernick Reviewed by Maciej. Netscape plug-in mouse events broken in HiDPI Multiply global mouse coordinates by the window scale factor so that plug-ins can use GlobalToLocal() in HiDPI. This fixes many bugs involving plug-in mouse event handling in HiDPI. Most notably, the Flash player will now correctly respond to clicks. * Plugins/WebBaseNetscapePluginView.m: (+[WebBaseNetscapePluginView getCarbonEvent:]): (-[WebBaseNetscapePluginView getCarbonEvent:withEvent:]): 2006-07-09 Darin Adler Reviewed by Tim Hatcher. - fix assertion firing in plug-in layout tests * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView restartNullEvents]): Don't start null events if the plug-in is not in the started state. This happens when the plug-in moves within its view hierarchy after it has been stopped. 2006-07-09 Timothy Hatcher Reviewed by Darin. Bug 9820: Move new DOM API that has been through API review to public headers http://bugzilla.opendarwin.org/show_bug.cgi?id=9820 * Misc/WebElementDictionary.m: include DOMExtensions.h * Misc/WebNSViewExtras.m: include DOMExtensions.h * WebKit.xcodeproj/project.pbxproj: make DOMXPath.h public 2006-07-09 Timothy Hatcher Reviewed by Kevin. Bug 9818: move new UIDelegate API that has been through API review to public headers http://bugzilla.opendarwin.org/show_bug.cgi?id=9818 API: Remove webView:setContentRect: & webViewContentRect: delegate methods? The fix for 4310363 removed the only use of webViewContentRect: in our code. webView:setContentRect: was never used to begin with. There's no harm in leaving these around in the API, but they'll cruft it up. Also removes the never used webViewPrint: SPI that was replaced by webView:printFrameView:. * DefaultDelegates/WebDefaultUIDelegate.m: * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge print]): * WebView/WebFrameView.h: * WebView/WebFrameView.m: * WebView/WebFrameViewPrivate.h: * WebView/WebUIDelegate.h: * WebView/WebUIDelegatePrivate.h: 2006-07-09 Timothy Hatcher Reviewed by Darin. Bug 9814: Move new WebView API that has been through API review to public headers http://bugzilla.opendarwin.org/show_bug.cgi?id=9814 * WebView/WebView.h: * WebView/WebView.m: (-[WebView close]): (-[WebView setShouldCloseWithWindow:]): (-[WebView shouldCloseWithWindow]): (-[WebView selectedFrame]): (-[WebView setMainFrameURL:]): (-[WebView mainFrameURL]): (-[WebView isLoading]): (-[WebView mainFrameTitle]): (-[WebView mainFrameIcon]): (-[WebView mainFrameDocument]): (-[WebView setDrawsBackground:]): (-[WebView drawsBackground]): (-[WebView toggleSmartInsertDelete:]): (-[WebView toggleContinuousSpellChecking:]): (-[WebView canMakeTextStandardSize]): (-[WebView makeTextStandardSize:]): (-[WebView maintainsInactiveSelection]): * WebView/WebViewPrivate.h: 2006-07-09 Timothy Hatcher Reviewed by Maciej. Bug 9487: The XPath section should be removed and/or moved. http://bugzilla.opendarwin.org/show_bug.cgi?id=9487 * WebInspector/webInspector/inspector.css: * WebInspector/webInspector/inspector.html: * WebInspector/webInspector/inspector.js: 2006-07-09 Anders Carlsson Reviewed by Tim O. * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Initialize wkPathFromFont. 2006-07-09 Darin Adler - fix release build * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView restorePortState:]): Cast inside the assertion so that we don't have an unused variable in versions with assertions disabled. The alternative would be to wrap the whole thing in an #if statement. 2006-07-08 Tim Omernick Reviewed by John Sullivan. * Plugins/WebBaseNetscapePluginView.h: - Added ivars for OpenGL support. Someday it would be nice to refactor this class so that each drawing model is encapsulated in a class; this would allow WebBaseNetscapePluginView to make more efficient use of space, for example by not keeping OpenGL-related ivars for Quickdraw plug-ins. * Plugins/WebBaseNetscapePluginView.m: - Declared a bunch of internal methods for OpenGL support (see below). - Removed "forUpdate" from CoreGraphics port state struct; it was always set to "YES", so I just cleaned up the silly code that used it. - Declared OpenGL port state struct. (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): - Moved a CoreGraphics-related assertion down to the big "switch" statement. - Don't set window.type here -- according to the Netscape Plug-in API docs, the plug-in should default to "windowed" mode, and may call NPN_SetValue() during its NPN_New() to request that the browser use a "windowless" (offscreen) context instead. - Moved the assertion from the top of this method here; removed a less restrictive assertion that is now obsolete. - Removed "forUpdate" flag from CoreGraphics port state struct. - Fill in OpenGL port state struct. Set up the viewport appropriately for both windowed and windowless OpenGL plug-ins. Windowed plug-ins need to have their GL viewport transformed by the amount the plug-in is clipped; windowless plug-ins are drawn off-screen into a surface whose geometry is never changed or clipped, so they may always draw with a viewport origin of (0, 0). (-[WebBaseNetscapePluginView restorePortState:]): - Removed "forUpdate" flag from CoreGraphics port state struct. - Restore the old OpenGL context saved by -saveAndSetNewPortStateForUpdate:. (-[WebBaseNetscapePluginView sendEvent:]): - Updated an assertion to also include OpenGL. To ensure that attached plug-in window movements happen atomically with web page redisplays, we assert that the plug-in's window is set only while the plug-in view is redrawing. - Same deal as with the assertion; only save/set port state when redrawing the plug-in view. Plug-ins that use the new drawing models are only allowed to draw when the web page draws. I might consider changing this for windowed OpenGL plug-ins, since they always obscure the page content anyway. (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): - Compare new NP_GLContext structs. (-[WebBaseNetscapePluginView updateAndSetWindow]): - In OpenGL mode, can only set window when updating plug-in view. (-[WebBaseNetscapePluginView setWindowIfNecessary]): - ditto - Updated logging for OpenGL drawing mode. (-[WebBaseNetscapePluginView addWindowObservers]): - No need to observe frame/bounds change notifications for this and all parent views. See -renewGState comments below. (-[WebBaseNetscapePluginView removeWindowObservers]): - Don't need to remove frame/bounds observers anymore. (-[WebBaseNetscapePluginView start]): - Plug-ins are "windowed" by default. This is not a change from our previous behavior, but this is a better place to set the default value as it allows the plug-in to override it later. (-[WebBaseNetscapePluginView stop]): - Destroy AGL context when the plug-in stops. (-[WebBaseNetscapePluginView dealloc]): - Assert that the AGL stuff has been cleaned up. (-[WebBaseNetscapePluginView drawRect:]): - If this is a windowless OpenGL plugin, blit its contents back into this view. (-[WebBaseNetscapePluginView renewGState]): - This method is called when the view or one of its parents is moved or resized (see comments). (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): - Hide the AGL window if the plug-in view is about to be removed from its window. (-[WebBaseNetscapePluginView viewHasMoved:]): - Renamed and moved to the "Internal" category. (-[WebBaseNetscapePluginView invalidateRegion:]): - Style changes. - Add support for OpenGL (uses the same region type as CoreGraphics). (-[WebBaseNetscapePluginView getVariable:value:]): - Style changes. - Implemented NPNVsupportsOpenGLBool; returns YES since we now support the OpenGL drawing model. (-[WebBaseNetscapePluginView setVariable:value:]): - Implemented NPPVpluginWindowBool, which allows plug-ins to specify whether they should be rendered in "windowed" or "windowless" mode. This is an older part of the Netscape Plug-in API that was never implemented in WebKit. "Windowed" Quickdraw plug-ins do not actually reside in a separate window, and can already do many of the same things (such as transparency) that only "windowless" plug-ins can do on other platforms. However, we need the "windowed" vs. "windowless" distinction for OpenGL plug-ins so that they have some way of specifying whether they should be rendered on an accelerated overlay surface, composited into the browser window. - Support for setting the drawing model to OpenGL. (-[WebBaseNetscapePluginView _viewHasMoved]): - Renamed from -viewHasMoved:, and moved down in the file. - None of this work is necessary when the plug-in is not in a window; the plug-in's state will be properly restored when it is moved back into a window. - Reshape OpenGL surface window here. (-[WebBaseNetscapePluginView _createAGLContextIfNeeded]): - Creates the AGL context of the appropriate type (windowed/windowless). (-[WebBaseNetscapePluginView _createWindowedAGLContext]): - Creates a windowed AGL context, which is an AGL context attached to a child window. This is the only way to get true hardware acceleration. (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): - Creates a windowless AGL context, which is an AGL context attached to an offscreen buffer. This buffer can then be blitted back into the browser window with a different alpha, or scaled, or whatever. (-[WebBaseNetscapePluginView _cglContext]): - Returns the underlying CGL context from the AGL context. We give the plug-in access to the CGL context because CGL is the more primitive of the GL drawable APIs and allows for finer control over the context. (-[WebBaseNetscapePluginView _getAGLOffscreenBuffer:width:height:]): - Returns the buffer allocated for the offscreen AGL context, if there is one. (-[WebBaseNetscapePluginView _destroyAGLContext]): - Destroys the AGL context, as well as the associated offscreen buffer or child window. (-[WebBaseNetscapePluginView _reshapeAGLWindow]): - Positions the AGL window over the browser window. (-[WebBaseNetscapePluginView _hideAGLWindow]): - Hides the AGL window. (-[WebBaseNetscapePluginView _aglOffscreenImageForDrawingInRect:]): - Returns an NSImage representation of the offscreen AGL context's framebuffer. This is used to draw the offscreen bits back into the plug-in view. This is kind of tricky because it has to convert the offscreen buffer in-place from BGRA to RGBA so that it can be wrapped in an NSBitmapImageRep. See comments. * WebKit.xcodeproj/project.pbxproj: Link OpenGL and AGL. 2006-07-09 Brady Eidson Reviewed by Maciej The ICONDEBUG flag now chooses either the new icon database or the old one No longer any need to live side by side to compare results * Misc/WebIconDatabase.m: (-[NSMutableDictionary iconURLForURL:]): (-[NSMutableDictionary retainIconForURL:]): (-[NSMutableDictionary releaseIconForURL:]): (-[WebIconDatabase _setHaveNoIconForIconURL:]): (-[WebIconDatabase _setIconURL:forURL:]): (-[WebIconDatabase _resetCachedWebPreferences:]): 2006-07-08 Timothy Hatcher Reviewed by Maciej. Bug 5312: comments aren't available via DOM http://bugzilla.opendarwin.org/show_bug.cgi?id=5312 Makes the Web Inspector show comment node contents. * WebInspector/WebInspector.m: (-[DOMNode _displayName]): return the contents of the comment * WebInspector/webInspector/inspector.js: check for comment nodes 2006-07-09 Alexey Proskuryakov Reviewed by Darin. - http://bugzilla.opendarwin.org/show_bug.cgi?id=9572 Add application/xhtml+xml to the Accept header * WebView/WebFrame.m: (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): Add an Accept header to main resource requests. * English.lproj/StringsNotToBeLocalized.txt: Added new strings. 2006-07-08 Darin Adler * DefaultDelegates/WebDefaultContextMenuDelegate.m: (-[WebDefaultUIDelegate contextMenuItemsForElement:defaultMenuItems:]): Removed misleading old comment. === Safari-521.15 === 2006-07-07 Levi Weintraub Reviewed by justin Finished moving deletion selection expansion across the bridge... say that 3 times fast. * WebView/WebHTMLView.m: Pass granularity to WebCore to handle expansion (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:granularity:]): (-[WebHTMLView _deleteSelection]): (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): (-[WebHTMLView deleteToMark:]): 2006-07-07 Brady Eidson Reviewed by John Changed an ASSERT to a LOG_ERROR for an error that could be handled gracefully, but whose assertion was reproducibly causing a build bot failure * Misc/WebIconDatabase.m: (-[WebIconDatabase _releaseIconForIconURLString:]): 2006-07-06 Levi Weintraub Reviewed by justin Improved table editing * WebCoreSupport/WebFrameBridge.m: Added method to allow WebCore to trigger deletion editing delegate (-[WebFrameBridge shouldDeleteSelectedDOMRange:]): * WebView/WebHTMLView.m: Moved code that expanded a selection when the delete key is pressed over to WebCore so we can be more intelligent about how to handle it (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): 2006-07-07 John Sullivan Reviewed by Tim Hatcher - fixed WebKit: WebPreferencesChangedNotification not exported * WebKit.exp: added surprisingly missing _WebPreferencesChangedNotification, defined in WebPreferences.h 2006-07-06 Brady Eidson Reviewed by John. Small fix to my previous small fix that only lets the ASSERT off the hook if the DB is closing * Misc/WebIconDatabase.m: (-[WebIconDatabase _releaseIconForIconURLString:]): 2006-07-05 Brady Eidson Reviewed by Maciej Small fix that prevents an assertion from triggering if the DB is being cleaned up (ie, the app being shut down) * Misc/WebIconDatabase.h: * Misc/WebIconDatabase.m: (-[NSMutableDictionary init]): (-[WebIconDatabase _applicationWillTerminate:]): (-[WebIconDatabase _releaseIconForIconURLString:]): 2006-07-05 Adele Peterson Reviewed by Maciej and Hyatt. WebKit part of initial popup menu implementation. * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Initialize WKPopupMenu. 2006-07-05 Anders Carlsson Reviewed by Maciej. http://bugzilla.opendarwin.org/show_bug.cgi?id=3581 iFrames set to display:none are Missing from frames array * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]): Modify to pass the owner element instead of the owner renderer. * WebView/WebHTMLView.m: (-[WebHTMLView _topHTMLView]): Remove assertion, it's not valid anymore. 2006-07-05 Timothy Hatcher Reviewed by Harrison. HIViewAdapter used but not defined Adds a new export file to fix the build. * WebKit.LP64.exp: Added. * WebKit.xcodeproj/project.pbxproj: 2006-07-04 Timothy Hatcher Reviewed by Maciej. Bug 9731: [Drosera] crash when trying to access the scope chain http://bugzilla.opendarwin.org/show_bug.cgi?id=9731 Because of the WebScriptObject, _globalObj, that WebCoreScriptDebugger holds is unprotected each time the page changes. This causes Drosera to crash Safari when trying to access the scope chain. We simply need to detach and re-attach the debugger when the window script object is cleared until 4608404 is fixed. This change also attaches the debugger before we call the windowScriptObjectAvailable: delegate method, so the debugger is ready before anyone might use the window object. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge windowObjectCleared]): 2006-07-04 Timothy Hatcher Reviewed by Darin. Bug 9732: [Drosera] calling removeListener to many times will cause WebKit's listener count to underflow/wraparound http://bugzilla.opendarwin.org/show_bug.cgi?id=9732 Adds a check to make sure the listener was in our listeners set before decrementing the global listener count. Also checks for nil in addListner to prevent a possible exception when adding the object to the set. * DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer addListener:]): (-[WebScriptDebugServer removeListener:]): 2006-07-04 Alexey Proskuryakov Reviewed by Maciej. - http://bugzilla.opendarwin.org/show_bug.cgi?id=8210 Conditional XMLHttpRequest gets should pass 304 responses unchanged Test: http/tests/xmlhttprequest/cache-override.html * Misc/WebNSURLRequestExtras.h: Added _web_isConditionalRequest * Misc/WebNSURLRequestExtras.m: (-[NSURLRequest _web_isConditionalRequest]): * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Bypass the cache for conditional requests. * WebCoreSupport/WebSubresourceLoader.m: (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]): Ditto. 2006-07-01 David Kilzer Reviewed by NOBODY (fixed Tim's build fix). * WebView/WebView.m: Added back missing '/' at the beginning of the file. 2006-07-01 Tim Omernick Reviewed by NOBODY (build fix) * WebView/WebView.m: (-[WebView _isMIMETypeRegisteredAsPlugin:]): Changed nil to NO (typo). === Safari-521.14 === 2006-06-30 Timothy Hatcher Reviewed by Darin. Only enable shouldCloseWithWindow when ObjC GC is enabled. This maintains backwards compatibility with applications that expect a WebView to be usable after the window closes. * WebView/WebView.m: (-[WebViewPrivate init]): 2006-06-30 Timothy Hatcher Reviewed by Anders. Call _close in dealloc to ensure we cleanup for backwards compatibility. This will safeguard and cleanup even if the application doesn't use the new close API yet, like Mail. * WebView/WebView.m: (-[WebView dealloc]): 2006-06-29 Timothy Hatcher Reviewed by Darin. WebKit leaks, improper tear-down -[WebBackForwardList finalize] is incorrect; design change needed -[WebFrame finalize] is incorrect; design change needed -[WebHTMLView finalize] is incorrect; design change needed Adds a close method to WebView, this needs to be called when the WebView is no longer needed. To make this easier for the common cases there is now an "auto close" on WebView that listens to the view's parent window. If the parent window closes and the WebView has no hostWindow then the WebView is automatically closed if autoClose is YES. To manage WebView closing yourself call setAutoClose: and pass NO. When a WebView closes it will tear-down and not be usable anymore. Close will will called on various other internal objects as a part of this, to ensure proper tear-down in GC without relying on finalize. * History/WebBackForwardList.m: (-[WebBackForwardList dealloc]): (-[WebBackForwardList finalize]): (-[WebBackForwardList _close]): * History/WebHistoryItem.m: (+[WebHistoryItem _closeObjectsInPendingPageCaches]): (+[WebHistoryItem _releaseAllPendingPageCaches]): * History/WebHistoryItemPrivate.h: * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge close]): (-[WebFrameBridge saveDocumentToPageCache:]): (-[WebFrameBridge canGoBackOrForward:]): * WebView/WebFrame.m: (-[WebFrame _detachFromParent]): (-[WebFrame dealloc]): (-[WebFrame finalize]): * WebView/WebFrameView.m: (-[WebFrameView _setWebFrame:]): (-[WebFrameView finalize]): * WebView/WebHTMLView.m: (-[WebHTMLView close]): (-[WebHTMLView dealloc]): (-[WebHTMLView finalize]): * WebView/WebHTMLViewInternal.h: * WebView/WebHTMLViewPrivate.h: * WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]): (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]): (-[WebScriptCallFrame enteredFrame:sourceId:line:]): (-[WebScriptCallFrame hitStatement:sourceId:line:]): (-[WebScriptCallFrame leavingFrame:sourceId:line:]): * WebView/WebScriptDebugDelegatePrivate.h: * WebView/WebView.m: (-[WebViewPrivate init]): (-[WebView _close]): (-[WebView dealloc]): (-[WebView finalize]): (-[WebView viewWillMoveToWindow:]): (-[WebView _windowWillClose:]): (-[WebView setPreferencesIdentifier:]): (-[WebView mainFrame]): (-[WebView setHostWindow:]): (-[WebView searchFor:direction:caseSensitive:wrap:]): (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]): (-[WebView close]): (-[WebView setAutoClose:]): (-[WebView autoClose]): (-[WebView _frameViewAtWindowPoint:]): * WebView/WebViewPrivate.h: 2006-06-29 Kevin Decker Reviewed by mjs and timo. Fixed: handleAuthenticationFromResource was removed; needed by the Dashboard * WebView/WebViewPrivate.h: Added handleAuthenticationFromResource back into the header. Needed by the Dashboard, but was removed in r.14028 on 2006-04-23. 2006-06-29 Tim Omernick Reviewed by Kevin Decker. REGRESSION: reproducible crash in +[WebCoreFrameBridge supportedImageMIMETypes] * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase setAdditionalWebPlugInPaths:]): One might be tempted to add additionalWebPlugInPaths to the global WebPluginDatabase here. For backward compatibility with earlier versions of the +setAdditionalWebPlugInPaths: SPI, we need to save a copy of the additional paths and not cause a refresh of the plugin DB at this time. (-[WebPluginDatabase _plugInPaths]): Include additionalWebPlugInPaths if this is the global DB. (-[WebPluginDatabase refresh]): Call -_plugInPaths to get the modified array of paths. This is similar to what the old code (before we had per-WebView plugin search paths). 2006-06-29 Tim Omernick Reviewed by John Sullivan. WebHistoryItem now supports getting and setting arbitrary properties via _transientPropertyForKey: and -_setTransientProperty:forKey:. For now, these properties do not persist with the rest of the history data. They are intended to hold transient per-history-item state, which is something that was until now difficult for a WebKit client app to do. * History/WebHistoryItemPrivate.h: * History/WebHistoryItem.m: (-[WebHistoryItemPrivate dealloc]): (-[WebHistoryItem _transientPropertyForKey:]): (-[WebHistoryItem _setTransientProperty:forKey:]): 2006-06-29 Timothy Hatcher Reviewed by Harrison. Smart insert and delete, continuous spell checking and autoscroll can now be used for any WebView, not just editable ones. All of these make sense for documents that might contain content editable areas or our new text fields. Autoscroll is usefull for dragging for file input controls also. Added a SPI to toggle WebViews tab key behavior, tabKeyCyclesThroughElements. WebHTMLView's _interceptEditingKeyEvent now uses WebView's tabKeyCyclesThroughElements state to determine whether or not to process tab key events. The idea here is that tabKeyCyclesThroughElements will be YES when this WebView is being used in a browser, and we desire the behavior where tab moves to the next element in tab order. If tabKeyCyclesThroughElements is NO, it is likely that the WebView is being embedded as the whole view, as in Mail, and tabs should input tabs as expected in a text editor. Using Option-Tab always cycles through elements. * WebView/WebHTMLRepresentation.m: (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): * WebView/WebHTMLView.m: (-[WebHTMLView _interceptEditingKeyEvent:]): * WebView/WebView.m: (-[WebViewPrivate init]): (-[WebView _autoscrollForDraggingInfo:timeDelta:]): (-[WebView _shouldAutoscrollForDraggingInfo:]): (-[WebView validateUserInterfaceItem:]): (-[WebView toggleSmartInsertDelete:]): (-[WebView toggleContinuousSpellChecking:]): (-[WebView setTabKeyCyclesThroughElements:]): (-[WebView tabKeyCyclesThroughElements]): * WebView/WebViewPrivate.h: 2006-06-29 Anders Carlsson Reviewed by Tim O. * WebKit.xcodeproj/project.pbxproj: Add DOMXPath.h header. 2006-06-28 David Hyatt Fix custom highlighting so that you can paint the entire line (and go outside the bounds of the line). Reviewed by harrison * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge customHighlightRect:forLine:]): (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:entireLine:]): * WebKit.xcodeproj/project.pbxproj: * WebView/WebHTMLViewPrivate.h: 2006-06-28 Maciej Stachowiak Reviewed by Anders. - fix Frame leak on layout tests * WebCoreSupport/WebPageBridge.m: (-[WebPageBridge outerView]): Return WebFrameView for main frame instead of WebView to avoid reference cycle between WebView and Page. 2006-06-28 Timothy Hatcher Prefer the Stabs debugging symbols format until DWARF bugs are fixed. * WebKit.xcodeproj/project.pbxproj: 2006-06-28 Levi Weintraub Reviewed by justin http://bugzilla.opendarwin.org/show_bug.cgi?id=7568 Bug 7568: Implement Indent/Outdent Added undo action strings and enum values * English.lproj/Localizable.strings: * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge nameForUndoAction:]): 2006-06-27 Brady Eidson Reviewed by Maciej Hookup the new semi-functional SQLite icon database. For now, it is living side-by-side with the old DB so one can compare the two for debugging purposes. Also, it is disabled (in WebKit) by default unless you compile with ICONDEBUG #defined. Note: To repeat that, if you want to try the new DB, #define ICONDEBUG (WebKitPrefix.h is a good place to do it) * Misc/WebIconDatabase.m: (-[NSMutableDictionary iconForURL:withSize:cache:]): (-[NSMutableDictionary iconURLForURL:]): (-[NSMutableDictionary retainIconForURL:]): (-[NSMutableDictionary releaseIconForURL:]): (-[WebIconDatabase _setHaveNoIconForIconURL:]): (-[WebIconDatabase _setIconURL:forURL:]): (-[WebIconDatabase _hasIconForIconURL:]): (-[WebIconDatabase _resetCachedWebPreferences:]): * Misc/WebIconLoader.m: (-[WebIconLoader didFinishLoading]): * WebKit.xcodeproj/project.pbxproj: 2006-06-26 David Hyatt Fix for 9538, support syntax highlighting for HTML source. Reviewed by darin * WebKit.xcodeproj/project.pbxproj: * WebView/WebView.m: (-[WebView _setInViewSourceMode:]): (-[WebView _inViewSourceMode]): * WebView/WebViewPrivate.h: 2006-06-25 Timothy Hatcher Reviewed by Darin. Bug 9574: Drosera should show inline scripts within the original HTML http://bugzilla.opendarwin.org/show_bug.cgi?id=9574 * Adds a new version of the didParseSource delegate callback with base line number. * Adds a new delegate callback for when a script fails to parse. * These new callbacks use NSURLs for the url parameter. * Adds a new script listener callback to notify when the main resource loads. * Adds a WebScriptErrorDomian and other keys for use with NSError. * DefaultDelegates/WebDefaultScriptDebugDelegate.m: (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]): (-[WebDefaultScriptDebugDelegate webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]): * DefaultDelegates/WebScriptDebugServer.h: * DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer webView:didLoadMainResourceForDataSource:]): (-[WebScriptDebugServer webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]): (-[WebScriptDebugServer webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]): * DefaultDelegates/WebScriptDebugServerPrivate.h: * WebKit.exp: * WebView/WebDataSource.m: (-[WebDataSource _setPrimaryLoadComplete:]): * WebView/WebScriptDebugDelegate.h: * WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]): 2006-06-24 David Kilzer Reviewed by Timothy. * Info.plist: Fixed copyright to include 2003-2006. 2006-06-24 Alexey Proskuryakov Reviewed by Darin. - http://bugzilla.opendarwin.org/show_bug.cgi?id=9418 WebKit will not build when Space exists in path * WebKit.xcodeproj/project.pbxproj: Enclose search paths in quotes. 2006-06-23 Tim Omernick Reviewed by John Sullivan. * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView sendEvent:]): Fixed a bug I found in the CoreGraphics drawing model that was preventing certain types of events from being dispatched to the plugin, unless the plugin was being updated. The check for portState was only required to call -setWindowIfNecessary, not required for the entire event dispatch. Also, don't paint the green debug rect unless this is a QuickDraw plugin. Otherwise the current QD port is not set, and the green rect fills the entire screen. Pretty awesome looking, but not intended behavior. (-[WebBaseNetscapePluginView setWindowIfNecessary]): Improved the logging here to include the NPWindow's width and height. 2006-06-23 Timothy Hatcher Reviewed by Tim O. Adds back SPI that Mail is still depending on. * WebView/WebDataSource.m: (-[WebDataSource _addSubframeArchives:]): * WebView/WebDataSourcePrivate.h: === WebKit-521.13 === 2006-06-23 Timothy Hatcher Reviewed by Geoff. script debugger should only attach to JavaScriptCore when there are listeners http://bugzilla.opendarwin.org/show_bug.cgi?id=9552 Attaches the debugger to all WebFrames when the first listener is added. Detaches when the last listener is removed. Also detach when the script debug delegate is set to nil. * DefaultDelegates/WebScriptDebugServer.m: (+[WebScriptDebugServer listenerCount]): (-[WebScriptDebugServer dealloc]): (-[WebScriptDebugServer attachScriptDebuggerToAllWebViews]): (-[WebScriptDebugServer detachScriptDebuggerFromAllWebViews]): (-[WebScriptDebugServer listenerConnectionDidDie:]): (-[WebScriptDebugServer addListener:]): (-[WebScriptDebugServer removeListener:]): * DefaultDelegates/WebScriptDebugServerPrivate.h: * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge windowObjectCleared]): * WebView/WebFrame.m: (-[WebFrame _attachScriptDebugger]): (-[WebFrame _detachScriptDebugger]): * WebView/WebFramePrivate.h: * WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame parsedSource:fromURL:sourceId:]): (-[WebScriptCallFrame enteredFrame:sourceId:line:]): (-[WebScriptCallFrame hitStatement:sourceId:line:]): (-[WebScriptCallFrame leavingFrame:sourceId:line:]): * WebView/WebView.m: (-[WebView _attachScriptDebuggerToAllFrames]): (-[WebView _detachScriptDebuggerFromAllFrames]): (-[WebView setScriptDebugDelegate:]): * WebView/WebViewPrivate.h: 2006-06-22 John Sullivan Reviewed by Tim Omernick - added support for UIDelegate to be notified of scrolling in any WebHTMLView - cleaned up recently-added UIDelegate code * WebView/WebUIDelegatePrivate.h: declared webView:didScrollDocumentInFrameView: method * DefaultDelegates/WebDefaultUIDelegate.m: (-[NSApplication webView:didDrawRect:]): provide default (empty) implementation of this recently-added method, so the DelegateForwarder mechanism will work for it (-[NSApplication webView:didScrollDocumentInFrameView:]): same thing for the new method * WebView/WebHTMLView.m: (-[WebHTMLView _frameOrBoundsChanged]): use _UIDelegateForwarder mechanism to notify delegate that scrolling occurred (-[WebHTMLView drawSingleRect:]): use _UIDelegateForwarder mechanism instead of checking respondsToSelector stuff here (that's packaged up nicely by the forwarder mechanism) 2006-06-22 Tim Omernick Reviewed by NOBODY (build fix) * WebView/WebFrameLoader.m: Import WebMainResourceLoader instead of using @class so that we can call WebMainResourceLoader methods. 2006-06-22 Tim Omernick Reviewed by NOBODY (build fix) * WebView/WebFrameLoader.m: Import JavaScriptCore/Assertions.h instead of WebKit/WebAssertions.h (which no longer exists) 2006-06-22 Maciej Stachowiak Reviewed by Adele. - start moving loading logic to new WebFrameLoader class; move management of WebLoaders there * Misc/WebIconLoader.h: * Misc/WebIconLoader.m: (-[WebIconLoader didFinishLoading]): * WebKit.xcodeproj/project.pbxproj: * WebView/WebDataSource.m: (-[WebDataSourcePrivate dealloc]): (-[WebDataSource _updateLoading]): (-[WebDataSource _loadIcon]): (-[WebDataSource _setPrimaryLoadComplete:]): (-[WebDataSource _stopLoading]): (-[WebDataSource _startLoading]): (-[WebDataSource _addSubresourceLoader:]): (-[WebDataSource _removeSubresourceLoader:]): (-[WebDataSource _addPlugInStreamLoader:]): (-[WebDataSource _removePlugInStreamLoader:]): (-[WebDataSource _iconLoaderReceivedPageIcon:]): (-[WebDataSource _defersCallbacksChanged]): (-[WebDataSource _stopLoadingWithError:]): (-[WebDataSource _setupForReplaceByMIMEType:]): (-[WebDataSource initWithRequest:]): (-[WebDataSource dealloc]): (-[WebDataSource finalize]): (-[WebDataSource data]): (-[WebDataSource isLoading]): * WebView/WebFrameLoader.h: Added. * WebView/WebFrameLoader.m: Added. (-[WebFrameLoader initWithDataSource:]): (-[WebFrameLoader dealloc]): (-[WebFrameLoader hasIconLoader]): (-[WebFrameLoader loadIconWithRequest:]): (-[WebFrameLoader stopLoadingIcon]): (-[WebFrameLoader addPlugInStreamLoader:]): (-[WebFrameLoader removePlugInStreamLoader:]): (-[WebFrameLoader setDefersCallbacks:]): (-[WebFrameLoader stopLoadingPlugIns]): (-[WebFrameLoader isLoadingMainResource]): (-[WebFrameLoader isLoadingSubresources]): (-[WebFrameLoader isLoading]): (-[WebFrameLoader stopLoadingSubresources]): (-[WebFrameLoader addSubresourceLoader:]): (-[WebFrameLoader removeSubresourceLoader:]): (-[WebFrameLoader mainResourceData]): (-[WebFrameLoader releaseMainResourceLoader]): (-[WebFrameLoader cancelMainResourceLoad]): (-[WebFrameLoader startLoadingMainResourceWithRequest:identifier:]): (-[WebFrameLoader stopLoadingWithError:]): 2006-06-21 Brady Eidson Reviewed by Maciej The WebCoreIconDatabaseBridge was getting messages sent to it after it had been closed, resulting in a crash on an ASSERT(). After closing the databaseBridge, we simply set it to nil so this can't happen. anymore. * Misc/WebIconDatabase.m: (-[WebIconDatabase _applicationWillTerminate:]): 2006-06-21 Tim Omernick Reviewed by Geoff Garen. WebPluginDatabase setAdditionalWebPlugInPaths needs to be per WebView Added some WebView SPI so that individual WebViews may have different plugin search paths. There are some limitations with the approach taken here: - JavaScript may only access the global plugin DB. - When this SPI is in use, certain WebView methods may not give accurate results, such as +canShowMIMEType:. - This only works for plugins referenced using the or tags; plugins that reside in non-standard file system locations may not be loaded directly into frames. None of these issues are important to the client that needs this SPI. Rather than re-architect our entire plugin database, I think it is better to simply accept these limitations for now. * Plugins/WebPluginDatabase.h: Added "plugInPaths" ivar, so different plugin databases can have different search paths. * Plugins/WebPluginDatabase.m: (+[WebPluginDatabase installedPlugins]): Give the global plugin database the default plugin search paths. (+[WebPluginDatabase setAdditionalWebPlugInPaths:]): Removed static global; this method now sets the plugin paths on the global plugin database. (-[WebPluginDatabase setPlugInPaths:]): Setter method for plugin paths. (-[WebPluginDatabase close]): New method; called when the plugin database is no longer needed (when its WebView is being destroyed). (-[WebPluginDatabase init]): Don't refresh in -init, so that callers can set the DB's plugin path array before it refreshes. (-[WebPluginDatabase dealloc]): Moved here from near the bottom of the file. Release new ivar. (-[WebPluginDatabase refresh]): Use the plugInPaths ivar instead of calling pluginLocations(). Notify plugin packages when they are added to and removed from a plugin database. A plugin package will unload itself when it is removed from all of its plugin databases. The only really tricky thing here is that the global MIME <-> view class registrations are only modified by the shared plugin DB. (+[WebPluginDatabase _defaultPlugInPaths]): Refactored from the old pluginLocations() function; returns the default set of plugin search paths. * Plugins/WebBasePluginPackage.h: * Plugins/WebBasePluginPackage.m: (-[WebBasePluginPackage dealloc]): Assert that this package has been removed from all of its containing plugin databases. (-[WebBasePluginPackage finalize]): ditto (-[WebBasePluginPackage wasAddedToPluginDatabase:]): Add plugin database to set. (-[WebBasePluginPackage wasRemovedFromPluginDatabase:]): Remove plugin database from set. If it was the last DB, then unload the plugin package. * WebView/WebViewInternal.h: Added instance methods to find the view class or plugin package, given a MIME type or file extension. * WebView/WebViewPrivate.h: Added SPI to set plugin search paths per WebView. * WebView/WebView.m: (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): New method; tries the global MIME <-> view map first; failing that, it checks the WebView's plugin DB. (-[WebView _close]): Close the plugin DB. (-[WebView _setAdditionalWebPlugInPaths:]): Create the plugin DB if necessary, and set its plugin paths. (-[WebView _pluginForMIMEType:]): Checks global plugin DB, falls back on WebView DB. (-[WebView _pluginForExtension:]): ditto (-[WebView _isMIMETypeRegisteredAsPlugin:]): ditto * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]): Use new WebView instance methods to look for plugins. (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]): ditto (-[WebFrameBridge determineObjectFromMIMEType:URL:]): ditto 2006-06-20 Brady Eidson Reviewed by Maciej Added calls through to the WebCoreIconDatabaseBridge for all the major WebIconDatabase API. For now these calls are wrapped with #ifdef's and are for debugging only. * Misc/WebIconDatabase.h: * Misc/WebIconDatabase.m: (-[NSMutableDictionary _scaleIcon:toSize:]): (-[NSMutableDictionary init]): (-[NSMutableDictionary iconForURL:withSize:cache:]): (-[NSMutableDictionary iconURLForURL:]): (-[NSMutableDictionary retainIconForURL:]): (-[NSMutableDictionary releaseIconForURL:]): (-[WebIconDatabase _setHaveNoIconForIconURL:]): (-[WebIconDatabase _setIconURL:forURL:]): (-[WebIconDatabase _hasIconForIconURL:]): * Misc/WebIconLoader.m: (-[WebIconLoader didFinishLoading]): * Misc/WebKitLogging.h: Added a logging channel for WebIconDatabase debugging * Misc/WebKitLogging.m: (WebKitInitializeLoggingChannelsIfNecessary): 2006-06-20 Adele Peterson Reviewed by Tim Hatcher. * WebView/WebMainResourceLoader.m: Added missing header to fix build on Leopard. 2006-06-20 Timothy Hatcher Reviewed by Darin. Removes the @try/@catch from the callbacks to improve performance, simply check if the proxy object's connection is still valid first. Listener objects are now required to be NSDistantObjects. Adds pause, resume and step support. The debugger process use to handle this, but it caused problems when there were multiple listeners. Sends the bundle identifier in the notification userInfo dictionary along with process name and process ID. * DefaultDelegates/WebScriptDebugServer.h: * DefaultDelegates/WebScriptDebugServer.m: (-[WebScriptDebugServer serverQuery:]): (-[WebScriptDebugServer addListener:]): (-[WebScriptDebugServer removeListener:]): (-[WebScriptDebugServer step]): (-[WebScriptDebugServer pause]): (-[WebScriptDebugServer resume]): (-[WebScriptDebugServer isPaused]): (-[WebScriptDebugServer suspendProcessIfPaused]): (-[WebScriptDebugServer webView:didParseSource:fromURL:sourceId:forWebFrame:]): (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]): (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]): (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]): * DefaultDelegates/WebScriptDebugServerPrivate.h: * WebKit.exp: 2006-06-19 Alexey Proskuryakov Reviewed by Darin. - http://bugzilla.opendarwin.org/show_bug.cgi?id=5499 Page reload does not send any cache control headers * WebView/WebFrame.m: (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): Set a proper Cache-Control header for reload requests. (-[WebFrame loadRequest:]): Reset loadType to WebFrameLoadTypeStandard (after a reload, it stayed at WebFrameLoadTypeReload, so _addExtraFieldsToRequest erroneously added a Cache-Control header to them). 2006-06-19 John Sullivan Reviewed by Darin. - added mechanism to notify UIDelegate when part of the webview is redrawn. For now, it only works for HTML views. * WebView/WebUIDelegatePrivate.h: Define a new UIDelegate method -webView:didDrawRect: * WebView/WebHTMLView.m: (-[WebView drawSingleRect:]): Call through to UIDelegate if it implements that method. I tested that this does not impact PLT numbers in the case where the delegate implements the method but does nothing in it. 2006-06-19 Mitz Pettel Reviewed by Maciej. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9452 Assertion failure in -[WebFramePrivate setProvisionalDataSource:] * WebView/WebFrame.m: (-[WebFrame _checkLoadCompleteForThisFrame]): Avoid re-entering the delegate's -[webView:didFailProvisionalLoadWithError:forFrame]. 2006-06-18 Mitz Pettel Reviewed by xenon. - http://bugzilla.opendarwin.org/show_bug.cgi?id=9479 Disassociate the inspector from the frame when it detaches from its parent * WebInspector/WebInspector.m: (-[NSWindow setWebFrame:]): Added code to (de)register with the WebFrame the inspector is (no longer) targeting. (-[WebInspector _webFrameDetached:]): Added. Moved the code that was previously in -[inspectedWindowWillClose:] here. This is called by the WebFrame when it is detached from its parent. * WebInspector/WebInspectorInternal.h: * WebView/WebFrame.m: (-[WebFramePrivate dealloc]): (-[WebFrame _detachFromParent]): Added code to notify all registered inspectors that the WebFrame is detaching. (-[WebFrame _addInspector:]): Added. (-[WebFrame _removeInspector:]): Added. * WebView/WebFrameInternal.h: 2006-06-18 Anders Carlsson Reviewed by Geoff. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge shouldInterruptJavaScript]): Ask the UI delegate if the script should be interrupted. * WebView/WebUIDelegatePrivate.h: Declare webViewShouldInterruptJavaScript: delegate method 2006-06-17 Mitz Pettel Reviewed by Darin. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9466 Assertion failure when dragging an image from the document into Safari's address bar * WebView/WebFrameView.m: (-[WebFrameView _setDocumentView:]): Reset the WebView's initiatedDrag flag when the document view is changed. * WebView/WebHTMLView.m: (-[WebHTMLView draggedImage:endedAt:operation:]): Changed the ASSERT to allow for drags that end after the view has been removed from the WebView. 2006-06-16 Timothy Hatcher Reviewed by Tim O. Exposes a distributed objects server for clients to register for script debugger calls. For preformance concerns this is disabled by default, you will need to enable this per application. To enable for Safari do this: defaults write com.apple.Safari WebKitScriptDebuggerEnabled -bool true Clients will need to listen to the following distributed notification to discover servers: WebScriptDebugServerDidLoadNotification To discover servers that previously loaded before the client, the client needs to send the following notification: WebScriptDebugServerQueryNotification All servers will reply with the WebScriptDebugServerQueryReplyNotification notification that contains the registered server connection name to use with distributed objects. * DefaultDelegates/WebScriptDebugServer.h: Added. * DefaultDelegates/WebScriptDebugServer.m: Added. (+[WebScriptDebugServer sharedScriptDebugServer]): (-[WebScriptDebugServer init]): (-[WebScriptDebugServer dealloc]): (-[WebScriptDebugServer serverQuery:]): (-[WebScriptDebugServer listenerConnectionDidDie:]): (-[WebScriptDebugServer addListener:]): (-[WebScriptDebugServer removeListener:]): (-[WebScriptDebugServer webView:didParseSource:fromURL:sourceId:forWebFrame:]): (-[WebScriptDebugServer webView:didEnterCallFrame:sourceId:line:forWebFrame:]): (-[WebScriptDebugServer webView:willExecuteStatement:sourceId:line:forWebFrame:]): (-[WebScriptDebugServer webView:willLeaveCallFrame:sourceId:line:forWebFrame:]): * DefaultDelegates/WebScriptDebugServerPrivate.h: Added. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge windowObjectCleared]): * WebKit.exp: * WebKit.xcodeproj/project.pbxproj: * WebView/WebScriptDebugDelegate.m: (-[WebScriptCallFrame parsedSource:fromURL:sourceId:]): (-[WebScriptCallFrame enteredFrame:sourceId:line:]): (-[WebScriptCallFrame hitStatement:sourceId:line:]): (-[WebScriptCallFrame leavingFrame:sourceId:line:]): * WebView/WebView.m: (+[WebView _developerExtrasEnabled]): (+[WebView _scriptDebuggerEnabled]): (-[WebView _menuForElement:defaultItems:]): (-[WebView _commonInitializationWithFrameName:groupName:]): * WebView/WebViewPrivate.h: 2006-06-16 Adele Peterson Reviewed by Alice. Added initialization for WKDrawBezeledTextArea. * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): 2006-06-15 Timothy Hatcher Reviewed by Geoff and Darin. Prefer the DWARF debugging symbols format for use in Xcode 2.3. * WebKit.xcodeproj/project.pbxproj: 2006-06-15 John Sullivan Reviewed by Tim O. Fixed bug in WebKit support for computing but not highlighting rects for text matches. * WebView/WebView.m: (-[WebView rectsForTextMatches]): leave out empty rects, and convert rects to WebView coordinates. Since this makes a batch of autoreleased NSValue objects, use a local autorelease pool 2006-02-11 David Kilzer Reviewed by John Sullivan. * Plugins/WebPluginController.m: (-[WebPluginController _cancelOutstandingChecks]): add nil check before calling CFSetApplyFunction 2006-06-14 Levi Weintraub Reviewed by justin TinyMCE: Implement execCommand(formatBlock, ...) * English.lproj/Localizable.strings: * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge nameForUndoAction:]): 2006-06-14 Tim Omernick Reviewed by John Sullivan. GC: WebPluginController uses inefficient resurrecting enumeration * Plugins/WebPluginController.m: (cancelOutstandingCheck): (-[WebPluginController _cancelOutstandingChecks]): Use CFSetApplyFunction() instead of an enumerator to guard against modifications to the set while enumerating. 2006-06-13 John Sullivan Reviewed by Tim O. - fixed REGRESSION (417.8-420+): 3 missing items (but extra separators) in context menu in Mail message body * WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]): Add special-case hackery to recover from this SPI -> API mismatch. 2006-06-13 Tim Omernick Reviewed by Anders. Fixed a recently-introduced assertion failure when handling 404 errors. * WebView/WebDataSource.m: (-[WebDataSource _handleFallbackContent]): Use the -[WebFrame _bridge] instead of -[WebDataSource _bridge]. The former is not valid until the data source has been committed, which is not the case when the resource fails to load. The latter is safe to call at any time. This broke last night with Maciej's change to WebFrameResourceLoader. The old code used to call -[WebFrame _bridge]. 2006-06-13 Anders Carlsson Reviewed by Geoff. http://bugzilla.opendarwin.org/show_bug.cgi?id=9406 REGRESSION: fix for bug 9390 broke two layout tests * Plugins/WebPluginDatabase.h: (-[WebPluginDatabase isMIMETypeRegistered:]): Add new function isMIMETypeRegistered which returns whether a given MIME type has a plugin registered. * Plugins/WebPluginDatabase.m: (-[WebPluginDatabase init]): Init set of registered MIME types. (-[WebPluginDatabase refresh]): Add and remove MIME types from the set of registered MIME types when registering and unregistering plugin MIME types. (-[WebPluginDatabase dealloc]): Release set of registered MIME types. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge determineObjectFromMIMEType:URL:]): Use isMIMETypeRegistered here. 2006-06-12 Maciej Stachowiak - fix for cocoa exception (whoops) * WebView/WebView.m: (+[WebView _generatedMIMETypeForURLScheme:]): put this back * WebView/WebDataSource.m: (+[WebDataSource _generatedMIMETypeForURLScheme:]): call WebView 2006-06-12 Maciej Stachowiak Reviewed by Darin. - remove use of WebView and related from WebMainResourceLoader * WebKit.xcodeproj/project.pbxproj: * WebView/WebDataSource.m: (+[WebDataSource _generatedMIMETypeForURLScheme:]): (+[WebDataSource _representationExistsForURLScheme:]): (+[WebDataSource _canShowMIMEType:]): (-[WebDataSource _handleFallbackContent]): (-[WebDataSource _decidePolicyForMIMEType:decisionListener:]): * WebView/WebDataSourceInternal.h: * WebView/WebFrame.m: (-[WebFrame _isMainFrame]): * WebView/WebFrameInternal.h: * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader willSendRequest:redirectResponse:]): (-[WebMainResourceLoader continueAfterContentPolicy:response:]): (-[WebMainResourceLoader checkContentPolicyForResponse:]): (-[WebMainResourceLoader loadWithRequestNow:]): * WebView/WebView.m: 2006-06-12 Tim Omernick Reviewed by Maciej. intermittent assertion failure in -[WebBasePluginPackage dealloc] running layout tests * Plugins/WebNetscapePluginPackage.m: (-[WebNetscapePluginPackage _initWithPath:]): Renamed from -initWithPath:. Instead of releasing/deallocating self on error, return NO. (-[WebNetscapePluginPackage initWithPath:]): Call the new -_initWithPath:. If it returns NO, unload the plugin package before deallocating it. 2006-06-11 Darin Adler - try to fix Windows build * COM/WebKitDLL.cpp: (loadResourceIntoArray): Use Vector instead of DeprecatedByteArray. 2006-06-11 Mitz Pettel Reviewed by Tim H. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8672 Red outline from web inspector reappears after inspector is closed * WebInspector/WebInspector.m: (-[NSWindow windowWillClose:]): Added a call to setWebFrame to avoid further load progress notifications. (-[NSWindow setWebFrame:]): Changed to resign the WebView's hostWindow rather than its window for close notifications, to avoid resigning from all windows' close notifications (including the inspector window's) when the WebView is in a hidden tab. Also changed to prevent highlighting the initial focused node. 2006-06-11 Anders Carlsson Reviewed by Tim. http://bugzilla.opendarwin.org/show_bug.cgi?id=9390 Move full-frame plugins to WebCore * Plugins/WebBaseNetscapePluginStream.h: * Plugins/WebBaseNetscapePluginStream.m: (-[WebBaseNetscapePluginStream instance]): Add instance method which returns the plugin instance. * Plugins/WebBasePluginPackage.h: Add WebPluginManualLoader protocol * Plugins/WebNetscapePluginDocumentView.h: Removed. * Plugins/WebNetscapePluginDocumentView.m: Removed. * Plugins/WebNetscapePluginEmbeddedView.h: * Plugins/WebNetscapePluginEmbeddedView.m: (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:]): (-[WebNetscapePluginEmbeddedView dealloc]): (-[WebNetscapePluginEmbeddedView didStart]): (-[WebNetscapePluginEmbeddedView pluginView:receivedResponse:]): (-[WebNetscapePluginEmbeddedView pluginView:receivedData:]): (-[WebNetscapePluginEmbeddedView pluginView:receivedError:]): (-[WebNetscapePluginEmbeddedView pluginViewFinishedLoading:]): (-[WebNetscapePluginEmbeddedView redeliverStream]): Make WebNetscapePluginEmbeddedView support the WebPluginManualLoader protocol. It creates a plugin stream and feeds the data manually. Much of this code has been copied from WebNetscapePluginRepresentation. * Plugins/WebNetscapePluginRepresentation.h: Removed. * Plugins/WebNetscapePluginRepresentation.m: Removed. * Plugins/WebPluginController.h: * Plugins/WebPluginController.m: (-[WebPluginController pluginView:receivedResponse:]): (-[WebPluginController pluginView:receivedData:]): (-[WebPluginController pluginView:receivedError:]): (-[WebPluginController pluginViewFinishedLoading:]): Make WebPluginController support the WebPluginManualLoader protocol so it can feed data manually to WebKit plugins. * Plugins/WebPluginDatabase.m: (-[WebPluginDatabase refresh]): Use WebHTMLView and WebHTMLRepresentation when registering/unregistering plug-in MIME types. * Plugins/WebPluginDocumentView.h: Removed. * Plugins/WebPluginDocumentView.m: Removed. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]): (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]): Add loadManually argument. (-[WebFrameBridge redirectDataToPlugin:]): Call down to the HTML representation. (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]): Pass NO to loadManually. (-[WebFrameBridge determineObjectFromMIMEType:URL:]): Explicitly check if the MIME type is supported by a plug-in instead of checking the view class. * WebCoreSupport/WebViewFactory.m: (-[WebViewFactory pluginSupportsMIMEType:]): New function which returns whether any plugins support a given MIME type. * WebKit.xcodeproj/project.pbxproj: Update for removed files. * WebView/WebFrame.m: (-[WebFrame _reloadForPluginChanges]): Remove view type checks. (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Remove FIXME comments. * WebView/WebHTMLRepresentation.m: (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]): New function which redirects incoming data to a manual loader. (-[WebHTMLRepresentation receivedData:withDataSource:]): (-[WebHTMLRepresentation receivedError:withDataSource:]): (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Optionally redirect incoming data. * WebView/WebHTMLRepresentationPrivate.h: 2006-06-09 John Sullivan Reviewed by Tim Omernick and Dave Hyatt. WebKit support for computing but not highlighting rects for text matches. * WebView/WebHTMLViewPrivate.h: added markedTextMatchesAreHighlighted/setMarkedTextMatchesAreHighlighted and rectsForTextMatches, and renamed related methods for clarity/consistency * WebView/WebHTMLView.m: (-[WebHTMLView markAllMatchesForText:caseSensitive:]): renamed, calls similarly-renamed method (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): new method, calls through to bridge (-[WebHTMLView markedTextMatchesAreHighlighted]): ditto (-[WebHTMLView unmarkAllTextMatches]): renamed (-[WebHTMLView rectsForTextMatches]): new method, calls through to bridge * WebView/WebViewPrivate.h: added rectsForTextMatches, renamed other methods (and added highlight: parameter) * WebView/WebView.m: (-[WebView markAllMatchesForText:caseSensitive:highlight:]): renamed for clarity/consistency, and now has highlight: parameter, which is passed down (-[WebView unmarkAllTextMatches]): renamed for clarity/consistency, and calls similarly-renamed method lower down. diff got confused with the end of this and the end of the next method. (-[WebView rectsForTextMatches]): new method, calls through to WebHTMLView as related methods currently do 2006-06-10 Graham Dennis WebView's initWithCoder: method does not set useBackForwardList correctly Reviewed by John Sullivan. * WebView/WebView.m: (-[WebView initWithCoder:]): Make sure that the function variable useBackForwardList is correctly set, so that the copy in the _private ivar is set. 2006-06-09 David Hyatt Rename updateFocusState to updateActiveState. * WebView/WebHTMLView.m: (-[WebHTMLView _updateActiveState]): (-[WebHTMLView viewDidMoveToWindow]): (-[WebHTMLView windowDidBecomeKey:]): (-[WebHTMLView windowDidResignKey:]): (-[WebHTMLView becomeFirstResponder]): (-[WebHTMLView resignFirstResponder]): (-[WebHTMLView _formControlIsBecomingFirstResponder:]): (-[WebHTMLView _formControlIsResigningFirstResponder:]): * WebView/WebHTMLViewPrivate.h: 2006-06-09 David Hyatt Rename displaysWithFocusAttributes to isActive. Reviewed by sfalken * WebKit.xcodeproj/project.pbxproj: * WebView/WebHTMLView.m: (-[WebHTMLView _updateFocusState]): 2006-06-08 Justin Garcia Reviewed by levi Implement execCommand(Insert{Un}OrderedList) * WebView/WebFrame.m: (-[WebFrame _findFrameWithSelection]): Removed an assertion that we only have one frame with a selection. * WebView/WebView.m: (-[WebView selectedFrame]): Ditto. 2006-06-08 Timothy Hatcher Reviewed by Darin and John. API: please add a way to turn vertical scrollbar always on (for Mail, to avoid reflow when typing) Adds new methods to lock the scrolling mode on WebDynamicScrollBarsView. Locking the scroll mode prevents WebCore from changing it as needed. Also adds an SPI on WebView that will lock the "always on" mode for each scroller. * WebKit.xcodeproj/project.pbxproj: * WebView/WebDynamicScrollBarsView.h: * WebView/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView setAllowsScrolling:]): (-[WebDynamicScrollBarsView allowsScrolling]): (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): (-[WebDynamicScrollBarsView setScrollingMode:]): (-[WebDynamicScrollBarsView setHorizontalScrollingModeLocked:]): (-[WebDynamicScrollBarsView setVerticalScrollingModeLocked:]): (-[WebDynamicScrollBarsView setScrollingModesLocked:]): (-[WebDynamicScrollBarsView horizontalScrollingModeLocked]): (-[WebDynamicScrollBarsView verticalScrollingModeLocked]): * WebView/WebView.m: (-[WebView setAlwaysShowVerticalScroller:]): (-[WebView alwaysShowVerticalScroller]): (-[WebView setAlwaysShowHorizontalScroller:]): (-[WebView alwaysShowHorizontalScroller]): * WebView/WebViewPrivate.h: 2006-06-08 Darin Adler Reviewed by Justin. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8616 REGRESSION: TinyMCE: Crash on Undo * WebView/WebHTMLView.m: (-[WebHTMLView _topHTMLView]): Added. (-[WebHTMLView _isTopHTMLView]): Added. (-[WebHTMLView _insideAnotherHTMLView]): Changed to use _topHTMLView. (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): Forward to the top HTML view, so that only the top view ever starts a dragging operation. Change dragging code to not assume that the dragged node is in the current view's document. Added checks that the node is an element in a couple places and coordinate conversions. (-[WebHTMLView _mayStartDragAtEventLocation:]): Forward to the top HTML view. (-[WebHTMLView addMouseMovedObserver]): Change to do nothing when the dataSource field is 0, since we now use the dataSource field to get to the WebView. (-[WebHTMLView removeMouseMovedObserver]): Added a comment. (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Forward to the top HTML view. (-[WebHTMLView draggingSourceOperationMaskForLocal:]): Assert that it's the top HTML view. (-[WebHTMLView draggedImage:movedTo:]): Ditto. (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto. (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto. (-[WebHTMLView _canProcessDragWithDraggingInfo:]): Ditto. (-[WebHTMLView _isMoveDrag]): Ditto. (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Ditto. (-[WebHTMLView draggingCancelledWithDraggingInfo:]): Ditto. (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Ditto. Also added code to work with the appropriate bridge when receiving a drag. This fixes the problem where the top level frame got a selection intended for the inner frame; the source of the bug. (-[WebHTMLView elementAtPoint:allowShadowContent:]): Added code to convert the coordinates so this works properly when returning an element from an inner frame. (-[WebHTMLView setDataSource:]): Added a call to addMouseMovedObserver, needed now that addMouseMovedObserver won't do anything if called when dataSource is nil. (-[WebHTMLView _delegateDragSourceActionMask]): Forward to the top HTML view. * WebView/WebView.m: (-[WebViewPrivate dealloc]): Removed code to release dragCaretBridge since that field is now gone. (-[WebView moveDragCaretToPoint:]): Always call the main frame's bridge, since the drag caret is now a page-level item. Later we'll move it to the page bridge. (-[WebView removeDragCaret]): Ditto. 2006-06-07 David Hyatt Add support for custom highlighting to WebKit. Reviewed by justin * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:]): * WebView/WebHTMLView.m: (-[WebHTMLView _highlighterForType:]): * WebView/WebHTMLViewInternal.h: * WebView/WebHTMLViewPrivate.h: 2006-06-07 Adele Peterson Reviewed by Hyatt. Added resources for missingImage and textAreaResizeCorner. * COM/WebKitDLL.cpp: (loadResourceIntoArray): Added. Returns a DeprecatedByteArray with the resource's data. * WebKit.vcproj/WebKit.rc: Added missing image and resize pngs as resources. * WebKit.vcproj/WebKit.vcproj: Added pngs. * WebKit.vcproj/missingImage.png: Added. * WebKit.vcproj/resource.h: Added entries for pngs. * WebKit.vcproj/textAreaResizeCorner.png: Added. 2006-06-07 David Hyatt Add SPI for setting and removing custom highlighters. Reviewed by Tim H * WebView/WebHTMLView.m: (-[WebTextCompleteController dealloc]): (-[WebHTMLView _setHighlighter:ofType:]): (-[WebHTMLView _removeHighlighterOfType:]): * WebView/WebHTMLViewInternal.h: * WebView/WebHTMLViewPrivate.h: 2006-06-06 Adele Peterson Reviewed by Justin. * COM/WebView.cpp: (WebView::keyPress): Added case for VK_RETURN. 2006-06-06 Anders Carlsson Reviewed by John. * WebView/WebFrame.m: (-[WebFrame _reloadForPluginChanges]): Don't traverse the view hierarchy looking for plugin views. Instead, just ask the frame whether it contains any plugins. 2006-06-03 Steve Falkenburg Reviewed by hyatt. Add implementation of loadHTMLString for Spinneret * COM/WebFrame.cpp: (WebFrame::loadHTMLString): 2006-06-02 Steve Falkenburg Reviewed by darin. New hosting for Spinneret to avoid static linking * COM: Added. * COM/Interfaces: Added. * COM/Interfaces/DOMCSS.idl: Added. * COM/Interfaces/DOMCore.idl: Added. * COM/Interfaces/DOMHTML.idl: Added. * COM/Interfaces/DOMRange.idl: Added. * COM/Interfaces/IWebArchive.idl: Added. * COM/Interfaces/IWebAttributedString.idl: Added. * COM/Interfaces/IWebBackForwardList.idl: Added. * COM/Interfaces/IWebDataSource.idl: Added. * COM/Interfaces/IWebDocument.idl: Added. * COM/Interfaces/IWebDownload.idl: Added. * COM/Interfaces/IWebEditingDelegate.idl: Added. * COM/Interfaces/IWebError.idl: Added. * COM/Interfaces/IWebFrame.idl: Added. * COM/Interfaces/IWebFrameLoadDelegate.idl: Added. * COM/Interfaces/IWebFrameView.idl: Added. * COM/Interfaces/IWebHistoryItem.idl: Added. * COM/Interfaces/IWebIconDatabase.idl: Added. * COM/Interfaces/IWebImage.idl: Added. * COM/Interfaces/IWebMutableURLRequest.idl: Added. * COM/Interfaces/IWebNotification.idl: Added. * COM/Interfaces/IWebPolicyDelegate.idl: Added. * COM/Interfaces/IWebPreferences.idl: Added. * COM/Interfaces/IWebResource.idl: Added. * COM/Interfaces/IWebResourceLoadDelegate.idl: Added. * COM/Interfaces/IWebScriptObject.idl: Added. * COM/Interfaces/IWebUIDelegate.idl: Added. * COM/Interfaces/IWebURLAuthenticationChallenge.idl: Added. * COM/Interfaces/IWebURLRequest.idl: Added. * COM/Interfaces/IWebURLResponse.idl: Added. * COM/Interfaces/IWebUndoManager.idl: Added. * COM/Interfaces/IWebView.idl: Added. * COM/Interfaces/WebKit.idl: Added. * COM/WebBackForwardList.cpp: Added. (WebBackForwardList::WebBackForwardList): (WebBackForwardList::~WebBackForwardList): (WebBackForwardList::createInstance): (WebBackForwardList::QueryInterface): (WebBackForwardList::AddRef): (WebBackForwardList::Release): (WebBackForwardList::addItem): (WebBackForwardList::goBack): (WebBackForwardList::goForward): (WebBackForwardList::goToItem): (WebBackForwardList::backItem): (WebBackForwardList::currentItem): (WebBackForwardList::forwardItem): (WebBackForwardList::backListWithLimit): (WebBackForwardList::forwardListWithLimit): (WebBackForwardList::capacity): (WebBackForwardList::setCapacity): (WebBackForwardList::backListCount): (WebBackForwardList::forwardListCount): (WebBackForwardList::containsItem): (WebBackForwardList::itemAtIndex): (WebBackForwardList::setPageCacheSize): (WebBackForwardList::pageCacheSize): * COM/WebBackForwardList.h: Added. * COM/WebDataSource.cpp: Added. (WebDataSource::WebDataSource): (WebDataSource::~WebDataSource): (WebDataSource::createInstance): (WebDataSource::QueryInterface): (WebDataSource::AddRef): (WebDataSource::Release): (WebDataSource::initWithRequest): (WebDataSource::data): (WebDataSource::representation): (WebDataSource::webFrame): (WebDataSource::initialRequest): (WebDataSource::request): (WebDataSource::response): (WebDataSource::textEncodingName): (WebDataSource::isLoading): (WebDataSource::pageTitle): (WebDataSource::unreachableURL): (WebDataSource::webArchive): (WebDataSource::mainResource): (WebDataSource::subresources): (WebDataSource::subresourceForURL): (WebDataSource::addSubresource): * COM/WebDataSource.h: Added. * COM/WebFrame.cpp: Added. (WebFrame::WebFramePrivate::WebFramePrivate): (WebFrame::WebFramePrivate::~WebFramePrivate): (WebFrame::WebFrame): (WebFrame::~WebFrame): (WebFrame::createInstance): (WebFrame::QueryInterface): (WebFrame::AddRef): (WebFrame::Release): (WebFrame::initWithName): (WebFrame::name): (WebFrame::webView): (WebFrame::frameView): (WebFrame::DOMDocument): (WebFrame::frameElement): (WebFrame::loadRequest): (WebFrame::loadData): (WebFrame::loadHTMLString): (WebFrame::loadAlternateHTMLString): (WebFrame::loadArchive): (WebFrame::dataSource): (WebFrame::provisionalDataSource): (WebFrame::stopLoading): (WebFrame::reload): (WebFrame::findFrameNamed): (WebFrame::parentFrame): (WebFrame::childFrames): (WebFrame::paint): (WebFrame::impl): (WebFrame::loadDataSource): (WebFrame::loading): (WebFrame::goToItem): (WebFrame::loadItem): (WebSystemMainMemory): (WebFrame::getObjectCacheSize): (WebFrame::receivedRedirect): (WebFrame::receivedResponse): (WebFrame::receivedData): (WebFrame::receivedAllData): (WebFrame::openURL): (WebFrame::submitForm): (WebFrame::setTitle): (WebFrame::setStatusText): * COM/WebFrame.h: Added. * COM/WebHistoryItem.cpp: Added. (WebHistoryItem::WebHistoryItem): (WebHistoryItem::~WebHistoryItem): (WebHistoryItem::createInstance): (WebHistoryItem::QueryInterface): (WebHistoryItem::AddRef): (WebHistoryItem::Release): (WebHistoryItem::initWithURLString): (WebHistoryItem::originalURLString): (WebHistoryItem::URLString): (WebHistoryItem::title): (WebHistoryItem::lastVisitedTimeInterval): (WebHistoryItem::setAlternateTitle): (WebHistoryItem::alternateTitle): (WebHistoryItem::icon): * COM/WebHistoryItem.h: Added. * COM/WebIconDatabase.cpp: Added. (WebIconDatabase::WebIconDatabase): (WebIconDatabase::~WebIconDatabase): (WebIconDatabase::createInstance): (WebIconDatabase::QueryInterface): (WebIconDatabase::AddRef): (WebIconDatabase::Release): (WebIconDatabase::sharedIconDatabase): (WebIconDatabase::iconForURL): (WebIconDatabase::defaultIconWithSize): (WebIconDatabase::retainIconForURL): (WebIconDatabase::releaseIconForURL): (WebIconDatabase::delayDatabaseCleanup): (WebIconDatabase::allowDatabaseCleanup): * COM/WebIconDatabase.h: Added. * COM/WebKitClassFactory.cpp: Added. (WebKitClassFactory::WebKitClassFactory): (WebKitClassFactory::~WebKitClassFactory): (WebKitClassFactory::QueryInterface): (WebKitClassFactory::AddRef): (WebKitClassFactory::Release): (WebKitClassFactory::CreateInstance): (WebKitClassFactory::LockServer): * COM/WebKitClassFactory.h: Added. * COM/WebKitDLL.cpp: Added. (DllMain): (DllGetClassObject): (DllCanUnloadNow): (DllUnregisterServer): (DllRegisterServer): * COM/WebKitDLL.h: Added. * COM/WebMutableURLRequest.cpp: Added. (WebMutableURLRequest::WebMutableURLRequest): (WebMutableURLRequest::~WebMutableURLRequest): (WebMutableURLRequest::createInstance): (WebMutableURLRequest::QueryInterface): (WebMutableURLRequest::AddRef): (WebMutableURLRequest::Release): (WebMutableURLRequest::requestWithURL): (WebMutableURLRequest::allHTTPHeaderFields): (WebMutableURLRequest::cachePolicy): (WebMutableURLRequest::HTTPBody): (WebMutableURLRequest::HTTPBodyStream): (WebMutableURLRequest::HTTPMethod): (WebMutableURLRequest::HTTPShouldHandleCookies): (WebMutableURLRequest::initWithURL): (WebMutableURLRequest::mainDocumentURL): (WebMutableURLRequest::timeoutInterval): (WebMutableURLRequest::URL): (WebMutableURLRequest::valueForHTTPHeaderField): (WebMutableURLRequest::addValue): (WebMutableURLRequest::setAllHTTPHeaderFields): (WebMutableURLRequest::setCachePolicy): (WebMutableURLRequest::setHTTPBody): (WebMutableURLRequest::setHTTPBodyStream): (WebMutableURLRequest::setHTTPMethod): (WebMutableURLRequest::setHTTPShouldHandleCookies): (WebMutableURLRequest::setMainDocumentURL): (WebMutableURLRequest::setTimeoutInterval): (WebMutableURLRequest::setURL): (WebMutableURLRequest::setValue): (WebMutableURLRequest::setFormData): (WebMutableURLRequest::formData): * COM/WebMutableURLRequest.h: Added. * COM/WebView.cpp: Added. (WebView::WebView): (WebView::~WebView): (WebView::createInstance): (WebView::mouseMoved): (WebView::mouseDown): (WebView::mouseUp): (WebView::mouseDoubleClick): (WebView::keyPress): (registerWebView): (WebViewWndProc): (calculateScrollDelta): (scrollMessageForKey): (WebView::goToItem): (WebView::QueryInterface): (WebView::AddRef): (WebView::Release): (WebView::canShowMIMEType): (WebView::canShowMIMETypeAsHTML): (WebView::MIMETypesShownAsHTML): (WebView::setMIMETypesShownAsHTML): (WebView::URLFromPasteboard): (WebView::URLTitleFromPasteboard): (WebView::initWithFrame): (WebView::setUIDelegate): (WebView::uiDelegate): (WebView::setResourceLoadDelegate): (WebView::resourceLoadDelegate): (WebView::setDownloadDelegate): (WebView::downloadDelegate): (WebView::setFrameLoadDelegate): (WebView::frameLoadDelegate): (WebView::setPolicyDelegate): (WebView::policyDelegate): (WebView::mainFrame): (WebView::backForwardList): (WebView::setMaintainsBackForwardList): (WebView::goBack): (WebView::goForward): (WebView::goToBackForwardItem): (WebView::setTextSizeMultiplier): (WebView::textSizeMultiplier): (WebView::setApplicationNameForUserAgent): (WebView::applicationNameForUserAgent): (WebView::setCustomUserAgent): (WebView::customUserAgent): (WebView::userAgentForURL): (WebView::supportsTextEncoding): (WebView::setCustomTextEncodingName): (WebView::customTextEncodingName): (WebView::setMediaStyle): (WebView::mediaStyle): (WebView::stringByEvaluatingJavaScriptFromString): (WebView::windowScriptObject): (WebView::setPreferences): (WebView::preferences): (WebView::setPreferencesIdentifier): (WebView::preferencesIdentifier): (WebView::setHostWindow): (WebView::hostWindow): (WebView::searchFor): (WebView::registerViewClass): (WebView::takeStringURLFrom): (WebView::stopLoading): (WebView::reload): (WebView::canGoBack): (WebView::canGoForward): (WebView::canMakeTextLarger): (WebView::makeTextLarger): (WebView::canMakeTextSmaller): (WebView::makeTextSmaller): (WebView::computedStyleForElement): (WebView::editableDOMRangeForPoint): (WebView::setSelectedDOMRange): (WebView::selectedDOMRange): (WebView::selectionAffinity): (WebView::setEditable): (WebView::isEditable): (WebView::setTypingStyle): (WebView::typingStyle): (WebView::setSmartInsertDeleteEnabled): (WebView::smartInsertDeleteEnabled): (WebView::setContinuousSpellCheckingEnabled): (WebView::isContinuousSpellCheckingEnabled): (WebView::spellCheckerDocumentTag): (WebView::undoManager): (WebView::setEditingDelegate): (WebView::editingDelegate): (WebView::styleDeclarationWithText): (WebView::replaceSelectionWithNode): (WebView::replaceSelectionWithText): (WebView::replaceSelectionWithMarkupString): (WebView::replaceSelectionWithArchive): (WebView::deleteSelection): (WebView::applyStyle): (WebView::copy): (WebView::cut): (WebView::paste): (WebView::copyFont): (WebView::pasteFont): (WebView::delete_): (WebView::pasteAsPlainText): (WebView::pasteAsRichText): (WebView::changeFont): (WebView::changeAttributes): (WebView::changeDocumentBackgroundColor): (WebView::changeColor): (WebView::alignCenter): (WebView::alignJustified): (WebView::alignLeft): (WebView::alignRight): (WebView::checkSpelling): (WebView::showGuessPanel): (WebView::performFindPanelAction): (WebView::startSpeaking): (WebView::stopSpeaking): (WebView::viewWindow): * COM/WebView.h: Added. * WebKit.vcproj: Added. * WebKit.vcproj/Interfaces.vcproj: Added. * WebKit.vcproj/WebKit.def: Added. * WebKit.vcproj/WebKit.rc: Added. * WebKit.vcproj/WebKit.sln: Added. * WebKit.vcproj/WebKit.vcproj: Added. * WebKit.vcproj/WebKitGUID.vcproj: Added. * WebKit.vcproj/autoversion.h: Added. * WebKit.vcproj/resource.h: Added. 2006-06-02 Darin Adler * WebCoreSupport/WebImageRendererFactory.m: Fix crash on Safari startup by include NSObject as a superclass (oops!). 2006-06-01 Darin Adler Reviewed by Maciej. - WebCore doesn't need to load WebKit images any more; removed code for that * Resources/missing_image.tiff: Removed. * WebCoreSupport/WebImageRendererFactory.h: Removed. * WebCoreSupport/WebImageRendererFactory.m: Moved @interface in here. Removed all but the "threaded decoding" calls that older Safari calls. This file can go altogether when compatibility with that older Safari is no longer needed. * WebKit.xcodeproj/project.pbxproj: Removed WebImageRendererFactory.h and missing_image.tiff. * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Removed call to [WebImageRendererFactory createSharedFactory]. 2006-06-01 Brady Eidson Reviewed by Maciej. Simple changes to hook up the new WebCore based Icon Database for testing. * ChangeLog: * Misc/WebIconDatabase.m: (-[WebIconDatabase _applicationWillTerminate:]): * Misc/WebIconDatabasePrivate.h: * WebKit.xcodeproj/project.pbxproj: 2006-06-01 Anders Carlsson Reviewed by Darin. http://bugzilla.opendarwin.org/show_bug.cgi?id=6309 multiple problems prevent bookmarking/back button technique for AJAX/DHTML applications from working * Misc/WebNSURLExtras.m: (-[NSString _webkit_URLFragment]): Don't include the "#" character in the fragment. * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge historyURL:]): New function, returns the history URL for a given position in the back/forward list * WebView/WebFrame.m: (-[WebFrame _loadItem:withLoadType:]): Always call scrollToAnchorWithURL, even if there is no fragment. This way we keep the WebCore frame's URL up-to-date. 2006-06-01 Maciej Stachowiak Reviewed by Anders. - fixed "REGRESSION: Can't order from Pizza Hut (ToT, 05/24/06)" http://bugzilla.opendarwin.org/show_bug.cgi?id=9103 * WebView/WebDataSource.m: (-[WebDataSource _willSendRequest:forResource:redirectResponse:]): Set up the User-Agent header. * WebView/WebDataSourceInternal.h: * WebView/WebLoader.m: (-[NSURLProtocol willSendRequest:redirectResponse:]): Pass a mutable URL request so the above can work. 2006-06-01 Anders Carlsson Reviewed by Darin. * WebView/WebFrameView.m: (+[WebFrameView _canShowMIMETypeAsHTML:]): Use _webkit_objectForMIMEType here so we'll get an object back for "text/". 2006-05-31 David Hyatt Make programmatic focus/blur actually work on sub-frames. Make the top-level UI delegate get called for deactivation of windows. Reviewed by darin * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge activateWindow]): (-[WebFrameBridge deactivateWindow]): (-[WebFrameBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): (-[WebFrameBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): * WebKit.xcodeproj/project.pbxproj: === WebKit-521.12 === 2006-05-26 David Harrison Reviewed by John Sullivan. Add a list type parameter and a return value to _increaseSelectionListLevel * WebView/WebHTMLView.m: (-[WebHTMLView _increaseSelectionListLevel]): - Now returns DOMNode* (-[WebHTMLView _increaseSelectionListLevelOrdered]): (-[WebHTMLView _increaseSelectionListLevelUnordered]): - Added. These also return DOMNode* * WebView/WebHTMLViewPrivate.h: - Updated as above 2006-05-25 Tim Omernick Reviewed by Anders. REGRESSION: Flash movie audible but not visible until window is resized * Plugins/WebNetscapePluginDocumentView.m: (-[WebNetscapePluginDocumentView dataSourceUpdated:]): Layout if needed here. Maciej recently removed the "LayoutAcceptable" frame state, which used to cause plugin document views to lay out immediately upon receiving data. This call to -layout has the same effect. === WebKit-521.11.1 === 2006-05-25 Timothy Hatcher Reviewed by Tim O. WebKit fails to compile for ppc64 64-bit: WebKit uses FSSpec which is not available in 64-bit Gets WebKit building under 64-bit. Rename WebNSInt and WebNSUInt to WebNSInteger and WebNSUInteger. Start using WebNSInteger where we need to match AppKit API usage of NSInteger. HIWebView and a couple of helper functions are disabled until they can be moved off of QuickDraw. HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit * Carbon/CarbonUtils.m: disabled this file in 64-bit * Carbon/CarbonWindowAdapter.m: (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]): * Carbon/CarbonWindowFrame.m: (+[CarbonWindowFrame frameRectForContentRect:styleMask:]): (+[CarbonWindowFrame contentRectForFrameRect:styleMask:]): (+[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]): (-[CarbonWindowFrame frameRectForContentRect:styleMask:]): (-[CarbonWindowFrame contentRectForFrameRect:styleMask:]): (-[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]): * Carbon/HIViewAdapter.m: disabled this file in 64-bit * Carbon/HIWebView.m: disabled this file in 64-bit (HIWebViewEventHandler): * DefaultDelegates/WebDefaultResourceLoadDelegate.m: (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]): * History/WebBackForwardList.m: (-[WebBackForwardList removeItem:]): (-[WebBackForwardList goToItem:]): * Misc/WebDownload.m: (-[WebDownloadInternal download:didReceiveDataOfLength:]): * Misc/WebFileDatabase.m: (UniqueFilePathForKey): * Misc/WebIconDatabase.m: (-[NSMutableDictionary retainIconForURL:]): (-[NSMutableDictionary releaseIconForURL:]): (-[WebIconDatabase _totalRetainCountForIconURLString:]): (-[WebIconDatabase _retainIconForIconURLString:]): (-[WebIconDatabase _releaseIconForIconURLString:]): * Misc/WebSearchableTextView.m: (-[NSString selectionRect]): * Misc/WebTypesInternal.h: Added. * Plugins/WebBaseNetscapePluginStream.m: (-[WebBaseNetscapePluginStream _destroyStream]): (CarbonPathFromPOSIXPath): * Plugins/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView sendActivateEvent:]): (-[WebBaseNetscapePluginView sendUpdateEvent]): (TSMEventHandler): (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]): (-[WebBaseNetscapePluginView _printedPluginBitmap]): (-[NSData _web_locationAfterFirstBlankLine]): * Plugins/WebBasePluginPackage.m: (-[WebBasePluginPackage hash]): * Plugins/WebNetscapePluginPackage.m: (-[WebNetscapePluginPackage load]): (functionPointerForTVector): * WebInspector/WebInspector.m: (-[WebInspector _updateSystemColors]): * WebKit.xcodeproj/project.pbxproj: * WebView/WebDataSource.m: (-[WebDataSource _didReceiveData:contentLength:forResource:]): * WebView/WebFrame.m: (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]): * WebView/WebHTMLView.m: (-[WebHTMLView drawRect:]): (-[WebHTMLView characterIndexForPoint:]): (-[WebHTMLView conversationIdentifier]): * WebView/WebResourceLoadDelegate.h: * WebView/WebUIDelegate.h: * WebView/WebView.h: * WebView/WebView.m: (-[WebView _mouseDidMoveOverElement:modifierFlags:]): (-[WebView spellCheckerDocumentTag]): * WebView/WebViewInternal.h: * WebView/WebViewPrivate.h: === WebKit-521.11 === 2006-05-23 Maciej Stachowiak Reviewed by Tim. - more loader refactoring to simplify things and remove knowledge of WebView from WebSubresourceLoader * WebCoreSupport/WebSubresourceLoader.m: (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]): (-[WebSubresourceLoader didReceiveResponse:]): * WebView/WebDataSource.m: (-[WebDataSource _loadIcon]): (-[WebDataSource _startLoading]): * WebView/WebFrame.m: (-[WebFrame _loadRequest:archive:]): (-[WebFrame _loadItem:withLoadType:]): (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): (-[WebFrame _addExtraFieldsToRequest:mainResource:alwaysFromRequest:]): * WebView/WebFrameInternal.h: * WebView/WebFramePrivate.h: * WebView/WebLoader.h: * WebView/WebLoader.m: * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader initWithDataSource:]): (-[WebMainResourceLoader didReceiveResponse:]): 2006-05-23 Tim Omernick Reviewed by John Sullivan. REGRESSION (420+): After clearing history and closing bookmark view window, attempting to select Safari's menu bar results in a crash * Misc/WebNSWindowExtras.m: (replacementPostWindowNeedsDisplay): My fix yesterday for 4557117 was not quite good enough. Now that we cancel the display timer for a window *before* it deallocates, we need to make sure that while a window deallocates, no new display timers are scheduled for that window. This is actually possible, as 4558301 demonstrates. Luckily, NSWindow sets a handy "windowDying" flag when it deallocates, so we can just check that flag and bail out of the throttle hack if it is set. This should fix the last of the crashes involving display timers scheduled for deallocated or deallocating windows. 2006-05-23 Maciej Stachowiak Reviewed by Eric. - remove knowledge of WebView from WebLoader in preparation for moving the code down * WebView/WebDataSource.m: (-[WebDataSource _defersCallbacks]): (-[WebDataSource _identifierForInitialRequest:]): (-[WebDataSource _willSendRequest:forResource:redirectResponse:]): (-[WebDataSource _didReceiveAuthenticationChallenge:forResource:]): (-[WebDataSource _didCancelAuthenticationChallenge:forResource:]): (-[WebDataSource _didReceiveResponse:forResource:]): (-[WebDataSource _didReceiveData:contentLength:forResource:]): (-[WebDataSource _didFinishLoadingForResource:]): (-[WebDataSource _didFailLoadingWithError:forResource:]): (-[WebDataSource _downloadWithLoadingConnection:request:response:proxy:]): (-[WebDataSource _privateBrowsingEnabled]): * WebView/WebDataSourceInternal.h: * WebView/WebLoader.h: * WebView/WebLoader.m: (-[WebLoader releaseResources]): (-[WebLoader setDataSource:]): (-[WebLoader willSendRequest:redirectResponse:]): (-[WebLoader didReceiveAuthenticationChallenge:]): (-[WebLoader didCancelAuthenticationChallenge:]): (-[WebLoader didReceiveResponse:]): (-[WebLoader didReceiveData:lengthReceived:]): (-[WebLoader signalFinish]): (-[WebLoader didFinishLoading]): (-[WebLoader didFailWithError:]): (-[WebLoader willCacheResponse:]): (-[WebLoader cancelWithError:]): * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader continueAfterContentPolicy:response:]): * WebView/WebView.m: (-[WebView _incrementProgressForIdentifier:response:]): (-[WebView _incrementProgressForIdentifier:data:]): (-[WebView _completeProgressForIdentifier:]): * WebView/WebViewInternal.h: === WebKit-521.10 === 2006-05-22 Tim Omernick Reviewed by Geoff. TOT REGRESSION: Repro crash in cancelPendingWindowDisplay --> _timerRelease when opening file from file open dialog Note that I could not reproduce this situation at all on any of my machines; I had to debug this on Geoff's machine. * Misc/WebNSWindowExtras.m: (replacementDealloc): Cancel display timer before dealloc, not after. Cancelling the timer can cause a message to be sent to the window; best to do that before the window deallocates. (replacementFinalize): ditto 2006-05-20 Maciej Stachowiak Reviewed by Beth. - fix assertion failure on layout tests * WebView/WebDataSource.m: (-[WebDataSource _mainReceivedError:complete:]): Don't do anything if this data source is no longer connected to a frame. Used to be this couldn't happen because the WebView would have been nil, but we no longer go through the WebView. 2006-05-20 Timothy Hatcher Reviewed by Anders. Bug 9018: REGRESSION: resizing the top area of the inspector does not grow as expected http://bugzilla.opendarwin.org/show_bug.cgi?id=9018 Use clientHeight now that offsetHeight includes the border and padding. clientHeight should have been used initially. * WebInspector/WebInspector.m: (-[WebInspector resizeTopArea]): 2006-05-18 Maciej Stachowiak Reviewed by Eric. - remove loading-related code from WebView http://bugzilla.opendarwin.org/show_bug.cgi?id=8981 * Plugins/WebNetscapePluginStream.m: (-[WebNetscapePlugInStreamLoader didFinishLoading]): (-[WebNetscapePlugInStreamLoader didFailWithError:]): * WebCoreSupport/WebSubresourceLoader.m: (-[WebSubresourceLoader receivedError:]): (-[WebSubresourceLoader signalFinish]): * WebView/WebDataSource.m: (-[WebDataSource _stopLoading]): (-[WebDataSource _receivedMainResourceError:complete:]): (-[WebDataSource _finishedLoadingResource]): (-[WebDataSource _mainReceivedBytesSoFar:complete:]): (-[WebDataSource _receivedError:]): (-[WebDataSource _mainReceivedError:complete:]): * WebView/WebDataSourceInternal.h: * WebView/WebFrame.m: (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]): * WebView/WebMainResourceLoader.m: (-[WebMainResourceLoader didReceiveData:lengthReceived:]): (-[WebMainResourceLoader didFinishLoading]): * WebView/WebView.m: * WebView/WebViewInternal.h: 2006-05-18 Tim Omernick Reviewed by John Sullivan. More options needed for window display throttle We decided to play it safe and leave our window flushing behavior unchanged from the previous public release. By default, CoreGraphics deferred updates are once again OFF, and the window display throttle is OFF. Individual applications should set the WebKitThrottleWindowDisplayPreferenceKey and WebKitEnableDeferredUpdatesPreferenceKey defaults to suit their needs. Old behavior (like 10.4.6): WebKitThrottleWindowDisplayPreferenceKey=0 (or unset), WebKitEnableDeferredUpdatesPreferenceKey (or unset). Tear-free scrolling/animations: WebKitThrottleWindowDisplayPreferenceKey=0 (or unset), WebKitEnableDeferredUpdatesPreferenceKey=1. While this configuration fixes the tearing issues caused by over-flushing, some applications will experience performance problems as over-flushing with CG deferred updates enabled will cause the app to block. Tear-free scrolling/animations, high performance: WebKitThrottleWindowDisplayPreferenceKey=1, WebKitEnableDeferredUpdatesPreferenceKey=1. This is the riskiest configuration in that it enables the window display throttle "feature", potentially breaking applications' assumptions about when displays occur. However, it provides the "best of both worlds", in that updates are tear-free, and performance impact should me minimal. * WebView/WebPreferenceKeysPrivate.h: Declared WebKitThrottleWindowDisplayPreferenceKey and WebKitEnableDeferredUpdatesPreferenceKey. * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Turn off CG deferred updates if WebKitEnableDeferredUpdatesPreferenceKey is NO or has no value. Added some comments. 2006-05-18 John Sullivan Reviewed by Darin Adler. - fixed REGRESSION: WebFrameView no longer responds to responder methods sent by Safari code * WebView/WebView.m: (-[WebView _responderForResponderOperations]): Treat sibling views of the main frameView the same as views outside of the webview for the purposes of this mechanism. 2006-05-18 Tim Omernick Reviewed by John Sullivan. Make disabling window throttle safer * Misc/WebNSWindowExtras.m: (+[NSWindow _webkit_enableWindowDisplayThrottle]): Don't assume that +_webkit_disableWindowDisplayThrottle restored the NSWindow method implementations; now we'll only swizzle them once, and our replacement IMPs will call the old IMPs when the window throttle is disabled. This is a safer approach when other components/"haxies" override the same methods that we are overriding, as it allows the overrides to "chain" properly. Moved the dictionary initialization code down a bit. The order doesn't matter here. (disableWindowDisplayThrottleApplierFunction): Noticed that this could have been written safer with respect to the timer having the last reference to the window. I never experienced a crash here, but this code is definitely safer. (+[NSWindow _webkit_disableWindowDisplayThrottle]): Don't restore NSWindow method implementations; just clear the flag, flush pending displays, and destroy the dictionary. (replacementPostWindowNeedsDisplay): If throttling is disabled, just call the original IMP. (clearWindowDisplayInfo): Added an assert. (replacementDealloc): Don't call clearWindowDisplayInfo() when throttling is disabled. (replacementFinalize): ditto (cancelPendingWindowDisplay): Removed an unnecessary assertion. 2006-05-17 Tim Omernick Reviewed by Kevin Decker and John Sullivan. REGRESSION: Window throttle code can sometimes leak NSWindows The window display throttle depended on windows being closed before they were deallocated; this is not guaranteed by AppKit. Windows that were being released without being closed were getting stuck in our NSWindow -> WindowDisplayInfo dictionary. * Misc/WebNSWindowExtras.m: (+[NSWindow _webkit_enableWindowDisplayThrottle]): Don't retain the NSWindow keys in the window display info dictionary. Instead of overriding -close, override -dealloc and -finalize so that we can remove the NSWindow -> WindowDisplayInfo mapping when a window deallocates. (+[NSWindow _webkit_disableWindowDisplayThrottle]): Restore -dealloc and -finalize. (clearWindowDisplayInfo): Factored the WindowDisplayInfo cleanup code out of the now-defunct replacementClose(). (replacementClose): Removed; no longer needed. (replacementDealloc): Clear the WindowDisplayInfo for the window after deallocation. (replacementFinalize): ditto (-[NSWindow _webkit_doPendingPostWindowNeedsDisplay:]): Rewrote this method to be safe in the case where the firing display timer has the last reference to the window. Added comments. 2006-05-17 bradeeoh Reviewed by Tim Hatcher Consolidated WebDatabase base class into WebFileDatabase as the inheritance relationship became obsolete. This improves readability and sets the stage for a further in-depth rewrite of the WebIcon* code. * Misc/WebDatabase.h: Removed. * Misc/WebDatabase.m: Removed. * Misc/WebFileDatabase.h: * Misc/WebFileDatabase.m: (-[WebFileDatabaseOp dealloc]): (-[WebFileDatabase dealloc]): (-[WebFileDatabase path]): (-[WebFileDatabase isOpen]): (-[WebFileDatabase sizeLimit]): * WebKit.xcodeproj/project.pbxproj: 2006-05-17 Adele Peterson Reviewed by Hyatt. WebKit part of initial checkin to prepare for http://bugzilla.opendarwin.org/show_bug.cgi?id=8948 Switch to use new text field implementation for