=== Start merge of feature-branch 2007-10-12 ===
2007-10-03 Andrew Wellington
Reviewed by Mark Rowe.
Mac build fix for issue introduced in r26027
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface):
2007-10-01 Eric Seidel
Reviewed by Oliver Hunt.
SVG Subresources will not be saved when creating WebArchives
http://bugs.webkit.org/show_bug.cgi?id=15280
Implement _subresourceURLs methods for more SVGElement types
more such methods will be needed as we add support for other
external references (such as use, mpath, tref, etc.)
* DOM/WebDOMOperations.mm:
(-[DOMSVGScriptElement _subresourceURLs]): added.
(-[DOMSVGCursorElement _subresourceURLs]): added.
(-[DOMSVGFEImageElement _subresourceURLs]): added.
2007-10-01 Eric Seidel
Reviewed by Oliver Hunt.
WebArchives do not embed stylesheets referenced by xml-stylesheeet
http://bugs.webkit.org/show_bug.cgi?id=15320
* DOM/WebDOMOperations.mm:
(-[DOMProcessingInstruction _stylesheetURL]): needed to access [[self sheet] href]
(-[DOMProcessingInstruction _subresourceURLs]): call and return _stylesheetURL
2007-10-01 Eric Seidel
Reviewed by Oliver Hunt.
* DOM/WebDOMOperations.mm: added DOMSVGElementImage _subresources implementation
(-[DOMNode _URLsFromSelectors:]): now handles DOMSVGAnimatedString return values
(-[DOMSVGImageElement _subresourceURLs]): added.
* MigrateHeaders.make: copies DOMSVG* headers into WebKit/PrivateHeaders
2007-10-01 Oliver Hunt
Reviewed by Mark.
Enable Experimental SVG features by default when building from Xcode
* Configurations/WebKit.xcconfig:
=== End merge of feature-branch 2007-10-12 ===
2007-10-11 Mark Rowe
Reviewed by Tim Hatcher.
Fix for . Disable debugging symbols in production builds for 10.4
PowerPC to prevent a huge STABS section from being generated.
* Configurations/Base.xcconfig:
2007-10-10 Alice Liu
Reviewed by Geoff Garen.
Fixed Crash when running fast/frames/onload-remove-iframe-crash.html in DRT
createFrame() now returns a RefPtr instead of a raw Frame pointer.
Making this change improves the way we handle frames on Windows WebKit.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createFrame):
2007-10-04 Beth Dakin
Reviewed by John Sullivan.
Fix for REGRESSION (r25142, Tiger only):
Vertical scroll bar not redrawn properly when going back in history
(15033)
This fix if-defs r25142 to be Leopard-only since it causes
correctness issues on Tiger and does not seem to have any
performance impact on Tiger either.
* WebView/WebDynamicScrollBarsView.m:
(-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
(-[WebDynamicScrollBarsView reflectScrolledClipView:]):
2007-10-04 Mark Rowe
Reviewed by Oliver.
Switch to default level of debugging symbols to resolve .
The "full" level appears to offer no observable benefits even though the documentation
suggests it be used for dead code stripping. This should also decrease link times.
* Configurations/Base.xcconfig:
2007-10-04 Adele Peterson
Reviewed by Darin.
WebKit part of fix for REGRESSION: Can't tab to webview that doesn't have editable content
* WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Pass in the FocusDirection.
2007-10-04 Darin Adler
* WebView/WebHTMLView.mm: (-[WebHTMLView _updateActiveState]):
Removed a bogus comment.
2007-10-02 Kevin Decker
Reviewed by Mark Rowe.
Re-added _minimumRequiredSafariBuildNumber. It turns out older version of Safari still rely
on this method, so we need to keep it around at least until the next major Safari release.
* StringsNotToBeLocalized.txt:
* WebView/WebView.mm:
(+[WebView _minimumRequiredSafariBuildNumber]):
* WebView/WebViewPrivate.h:
2007-10-02 Kevin Decker
Reviewed by John Sullivan.
* WebView/WebView.mm: Removed -[WebView _minimumRequiredSafariBuildNumber] because newer
versions of Safari no longer use this method. This won't break existing Safaris because
they always use a respondsToSelector check before calling this.
* WebView/WebViewPrivate.h: Ditto.
2007-09-27 John Sullivan
Reviewed by Ollie
- fixed REGRESSION (5522-5523.9): Safari leaks every browser window
The leak started occurring when we removed the code to clear the delegates and the host window
from Safari as part of the fix for 5479443. But it turns out that Safari code was masking a
bug here in WebView: setHostWindow:nil needs to be called before setting _private->closed to
YES, or it will do nothing at all, causing a world leak due to a circular reference between
the window and the WebView.
I toyed with a more complex fix, but this is the simplest one that retains the fix for 5479443
while otherwise restoring the code order to be as close as possible to what it was before
5479443 was fixed.
* WebView/WebView.mm:
(-[WebView _close]):
Moved the call that sets _private->closed to YES to be after the code that clears the delegates
and the host window. Added a comment about this order.
2007-09-27 Kevin Decker
Rubber stamped by Darin.
* WebKit.order: Added.
* WebKit.xcodeproj/project.pbxproj: We're changing from using an order file built by
another team to using one we actually check into our project repository. Linker settings for
Symbol Ordering Flags have been updated accordingly.
2007-09-26 Geoffrey Garen
Reviewed by Adele Peterson.
Fixed Promote cache model SPI to API
Promoted cache model SPI to API. This was just a move, with some small
edits to the documentation (changing 'application' to 'WebView' in
some cases, since the interface is now per-WebView).
* WebView/WebPreferences.h:
* WebView/WebPreferences.m:
(-[WebPreferences setCacheModel:]):
(-[WebPreferences cacheModel]):
* WebView/WebPreferencesPrivate.h:
2007-09-24 Timothy Hatcher
Reviewed by Darin.
Photoshop CS3: Adobe Help Viewer 1.1 crashes in 9A553
WebKit started calling the mouseDidMoveOverElement delegate method with a nil dictionary in r14982.
We originally intended to call this delegate method sometimes with a nil dictionary, but due to
a bug dating back to WebKit 1.0 this delegate was never called with nil! Unfortunately we can't
start calling this with nil since it will break Adobe Help Viewer, and possibly other clients.
* WebView/WebView.mm:
(-[WebView _mouseDidMoveOverElement:modifierFlags:]):
2007-09-21 Kevin Decker
* Plugins/WebBaseNetscapePluginView.mm: Build fix.
The first argument of aglChoosePixelFormat() has changed from const AGLDevice *gdevs on Tiger to
const void *gdevs on Leopard.
2007-09-20 Kevin Decker
Reviewed by Darin Adler.
Reduced launch time by lazily linking both the AGL and OpenGL frameworks until they are really needed.
* Plugins/WebBaseNetscapePluginView.mm: Soft link all AGL and OpenGL functions used by
WebBaseNetscapePluginView.
* WebKit.xcodeproj/project.pbxproj: Removed AGL and OpenGL from the project.
2007-09-20 John Sullivan
Build fix for stoooopid old PPC gcc compiler
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::checkSpellingOfString):
replace perfectly valid ?: syntax with if/else
2007-09-19 John Sullivan
Reviewed by Darin Adler.
- WebKit part of speculative fix for , about crashes constructing a
String using the values filled in by checkSpellingOfString()
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::checkSpellingOfString):
convert NSNotFound to -1, since WebCore code expects -1 for this purpose. We already do this
in checkGrammarOfString.
2007-09-19 Kevin Decker
Reviewed by Darin Adler.
soft link Accelerate.framework
* Misc/WebGraphicsExtras.c:
(WebConvertBGRAToARGB): Improve launch time performance and reduce vsize
footprint by soft linking the Accelerate.framework.
* WebKit.xcodeproj/project.pbxproj: Remove no longer needed frameworks.
2007-09-18 Geoffrey Garen
Reviewed by Darin Adler.
Fixed In some cases, WebKit can make the
Foundation disk cache way too big or way too small
Use the actual location of the foundation disk cache, rather than
the user's home directory, when determining how big to make it.
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):
2007-09-17 Geoffrey Garen
Reviewed by Darin Adler.
Fixed a hang due to an infinite script running in the window's unload
event handler, which may be the cause of
REGRESSION: Hang due to infinite JS recursion on close @ engadget.com
(onunload-based ad)
* WebView/WebUIDelegatePrivate.h: Added FIXME.
* WebView/WebView.h: Clarified headerdoc ambiguity about when delegate
methods stop firing.
* WebView/WebView.mm:
(-[WebView _close]): The fix: don't nil out our delegates until after
detaching the FrameLoader, because the act of detaching the FrameLoader
might fire important delegate methods, like webViewShouldInterruptJavaScript:.
Don't do other tear-down either, because the unload event handler needs
to run in a fully constructed page.
This change is fairly low risk because niling out our delegates is a
very recent, never-shipped feature in WebKit, so it's unlikely that any
apps rely on it in a crazy way.
2007-09-15 Darin Adler
Reviewed by John Sullivan.
- fix REGRESSION: Can't drag images from Safari to applications
in the dock (Tiger Preview, others in Leopard)
* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
Re-implement code here that has been missing for the last couple of years since we
did some image refactoring. Was pretty easy now that we can freely call C++ code
in WebKit.
2007-09-14 Mark Rowe
Build fix for Tiger.
* WebView/WebArchive.m:
(-[WebArchive initWithCoder:]): Use @catch(id) rather than @catch(...).
* WebView/WebPreferences.m:
(-[WebPreferences initWithCoder:]): Ditto.
* WebView/WebResource.mm:
(-[WebResource initWithCoder:]): Ditto.
(-[WebResource _initWithPropertyList:]): Ditto.
2007-09-14 Darin Adler
Reviewed by Geoff Garen and Tim Hatcher.
- fixed initFromCoder: and initWithPropertyList: functions
should guard against incorrect types
* WebView/WebArchive.m:
(isArrayOfClass): Added helper function.
(-[WebArchive _initWithPropertyList:]): Tweaked function to remove the need for a
type cast.
(-[WebArchive initWithCoder:]): Added type checking for the main resource,
subresources array, and subframe archives array. Also replaced NS_DURING with @try.
* WebView/WebPreferences.m: (-[WebPreferences initWithCoder:]): Added type checking
for the identifier and the values dictionary, including ensuring that it's a mutable
dictionary.
* WebView/WebResource.mm:
(-[WebResource initWithCoder:]): Added type checking for all the fields.
(-[WebResource _initWithPropertyList:]): Added type checking for the NSURLResponse.
* WebKit.exp: Removed accidentally exported internal symbol; I checked and it's not
used anywhere.
2007-09-13 Darin Adler
Reviewed by Oliver.
- fix REGRESSION: Input method inline hole is mishandled in text
elements with maxlength limit
* WebView/WebHTMLView.mm:
(-[WebHTMLView _selectionChanged]): Tweaked code a bit.
(-[WebHTMLView markedRange]): Simplified logic, since markedTextNSRange works when there's
no composition range.
(-[WebHTMLView hasMarkedText]): Call directly to Editor instead of bridge.
(-[WebHTMLView unmarkText]): Call new confirmComposition to make it clear that this is
confirming text, not just unmarking it to discard it.
(extractUnderlines): Added. Converts directly from an NSAttributedString to the
CompositionUnderline vector that's used by WebCore.
(-[WebHTMLView setMarkedText:selectedRange:]): Changed to use the new setComposition.
(-[WebHTMLView insertText:]): Changed to use confirmComposition when appropriate, instead
of relying on special behavior of Editor::insertText.
(-[WebHTMLView _updateSelectionForInputManager]): Rewrote to use getCompositionSelection
and confirmCompositionWithoutDisturbingSelection.
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
Removed obsolete markedTextAbandoned function.
2007-09-12 David Kilzer
Rubber-stamped by Darin and reviewed by Adam.
Removed import of unused icon database headers.
* WebCoreSupport/WebFrameBridge.mm:
2007-09-11 Timothy Hatcher
Reviewed by Darin.
Remove the unused class_getMethodImplementation function.
* Misc/WebNSObjectExtras.h:
2007-09-11 Geoffrey Garen
Reviewed by Oliver Hunt.
Fixed CFNetwork version check so it actually works.
* Misc/WebKitVersionChecks.h:
* WebView/WebView.mm:
(+[WebView _setCacheModel:]): Don't use NSVersionOfLinkTimeLibrary because
we don't link against CFNetwork directly, so it returns -1. Also, use
the proper hex encoding instead of decimal numbers.
2007-09-11 Darin Adler
- redo fix for REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
* WebView/WebView.mm:
(getMethod): Added.
(-[WebView _cacheResourceLoadDelegateImplementations]): Use getMethod.
(-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
2007-09-11 Darin Adler
Rubber-stamped by Dave Harrison.
* WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
Removed wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
2007-09-11 Darin Adler
Reviewed by Mark Rowe.
- fix REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery
* Misc/WebNSObjectExtras.h:
(class_getMethodImplementation): Added.
(method_setImplementation): Added.
* WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]):
* Carbon/HIViewAdapter.m: (+[HIViewAdapter bindHIViewToNSView:nsView:]):
Remove old-ObjC code path, since WebNSObjectExtras.h now implements everything we need.
* WebView/WebView.mm:
(-[WebView _cacheResourceLoadDelegateImplementations]): Don't bother doing a separate
respondsToSelector call, since class_getMethodImplementation will return 0 for selectors
that we don't respond to. The bug fix is to actually set the cached pointer to 0.
Also get rid of the unnecessary use of a macro; instead use the functions from
WebNSObjectExtras.h on Tiger and the appropriate function directly on Leopard.
(-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
2007-09-11 Darin Adler
Reviewed by Sam, Ollie.
* WebView/WebView.mm: (+[WebView _setCacheModel:]): A slightly cleaner 64-bit
fix for the NSURLCache capacity code in this file.
2007-09-11 Darin Adler
Rubber-stamped by Mark Rowe.
* Misc/WebNSPasteboardExtras.mm: Fix incorrect strings in my last check-in.
The strings I checked in were wrong and were breaking layout tests too.
These new ones match what WebKitSystemInterface was returning.
2007-09-10 Geoffrey Garen
Fixed 64-bit build (I think).
* WebView/WebView.mm:
(max): Added. In 64-bit land, -diskCapacity magically starts returning
unsigned long instead of unsigned, so we define a custom max() that's
willing to compare unsigned to unsigned long.
2007-09-10 Darin Adler
Reviewed by Tim Hatcher.
- Removing WebURLPboardType from headers broke SPI-using applications
Rolled out my fix for bug 4582212 and fixed it in a much simpler way.
* Misc/WebNSPasteboardExtras.h:
* Misc/WebNSPasteboardExtras.mm:
* WebCoreSupport/WebPasteboardHelper.mm:
* WebKit.exp:
* WebView/WebHTMLView.mm:
* WebView/WebView.mm:
Rolled out the new PasteboardType functions and changed the PboardType globals to be initialized
with constant values.
2007-09-10 Timothy Hatcher
Reviewed by Darin.
Always animate when calling _scrollTo.
* WebView/WebFrameView.mm:
(-[WebFrameView _scrollVerticallyBy:]):
(-[WebFrameView _scrollHorizontallyBy:]):
2007-09-08 Brady Eidson
Reviewed by Darin
- Asynchronous Icon Database
WebKit side of things
Mainly, there are Notifications WebKit has to listen for now that tell it when to either call back into WebCore
for some purpose or to send the webView:didReceiveIcon: delegate call
Many smaller tweaks as well.
* Misc/WebIconDatabase.h:
* Misc/WebIconDatabase.mm:
(defaultClient):
(-[WebIconDatabase init]):
(+[WebIconDatabase delayDatabaseCleanup]): Accessor so clients can prevent the thread from cleaning up the database
before they've done all their necessary retaining of icons.
(+[WebIconDatabase allowDatabaseCleanup]):
(-[WebIconDatabase removeAllIcons]):
(-[WebIconDatabase _isEnabled]):
(-[WebIconDatabase _sendNotificationForURL:]):
(-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
(-[WebIconDatabase _databaseDirectory]):
(-[ThreadEnabler threadEnablingSelector:]): Quick and dirty class to enabled Cocoa multithreading
(+[ThreadEnabler enableThreading]):
(importToWebCoreFormat):
* Misc/WebIconDatabaseInternal.h: Expose the internal methods of WebIconDatabase that are required by WebIconDatabaseClient
* Misc/WebNSNotificationCenterExtras.h: Added. - Great utility class whose design was borrowed from Colloquy
that allows the posting of a Cocoa notification on the main thread from *any* thread
* Misc/WebNSNotificationCenterExtras.m: Added.
(-[NSNotificationCenter postNotificationOnMainThreadWithName:object:]):
(-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:]):
(-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]):
(+[NSNotificationCenter _postNotificationName:]):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveIcon): Send the webView:didReceiveIcon: delegate call
(WebFrameLoaderClient::registerForIconNotification):
* WebCoreSupport/WebIconDatabaseClient.h: Added.
* WebCoreSupport/WebIconDatabaseClient.mm: Added.
(WebIconDatabaseClient::performImport): Perform the Safari 2 icon import
(WebIconDatabaseClient::dispatchDidRemoveAllIcons): Send the NSNotification
(WebIconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
* WebView/WebView.mm:
(-[WebView _receivedIconChangedNotification:]): Check and see if this notification is for this WebView's current URL by
calling back into the IconDatabase
(-[WebView _registerForIconNotification:]): Support for WebIconDatabaseClient
(-[WebView _dispatchDidReceiveIconFromWebFrame:]): Dispatch this delegate call as well as unregister for the notification
* WebView/WebViewInternal.h:
* WebKit.xcodeproj/project.pbxproj:
2007-09-07 Geoffrey Garen
Suggested by Maciej Stachowiak.
Added wKiosk Browser to the browser list. Pretty sweet app.
* WebView/WebPreferences.m:
(cacheModelForMainBundle):
2007-09-07 Geoffrey Garen
Build fix.
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):
2007-09-05 Geoffrey Garen
Reviewed by Darin Adler, Maciej Stachowiak, Mark Rowe, Tim Hatcher.
Fixed Make non-browser WebKit clients have no
memory cache, or a very tiny one
High level explanation:
- Added SPI for specifying a cache model on a per-WebView basis.
(Hopefully, this will become API soon.) We balance competing
cache models simply by using the largest one that pertains at a
given time.
- Added heuristic for guessing a default cache model in WebViews
that don't specify one:
1) Default to DocumentViewer for apps linked on or after this
WebKit. Default to DocumentBrowser otherwise.
2) Assign specific defaults to well-known clients based on
bundle ID.
3) Grow the default to DocumentBrowser if a navigation takes
place.
- As a part of the DocumentBrowser & PrimaryWebBrowser settings:
1) Make the Foundation disk cache much much bigger than the
default 20MB, if space allows. (This is a hedge against a small
WebCore cache in DocumentBrowser mode, but also an all-around
win for page load speed.)
2) Scaled the Foundation memory cache's capacity with physical
RAM, just like we do with other caches. This is a small win on
low memory systems.
* Misc/WebKitSystemBits.h:
* Misc/WebKitSystemBits.m:
(WebMemorySize): Renamed from "WebSystemMainMemory."
(WebHomeDirectoryFreeSize): Added function to measure the free space
on the user's home directory. We use this as a factor in determining
the disk cache's cacpacity.
* Misc/WebKitVersionChecks.h: Support for linked on or after check.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::didPerformFirstNavigation): Implementation of
heuristic rule #3.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.m:
(cacheModelForMainBundle): Implementation of heuristic rule #2.
(-[NSMutableDictionary _web_checkLastReferenceForIdentifier:]): Added
notification for when a WebPreferences instance becomes inert. We use
this to shrink the cache model back down if possible. Moved this code
into a WebPreferences method, since it's not really a feature of
NSDictionary.
* WebView/WebPreferencesPrivate.h: SPI declarations.
* WebView/WebView.mm: Replaced manual notification posts with calls to
the _postPreferencesChangesNotification convenience method.
(-[WebView _preferencesChangedNotification:]): Merged dispersed code
for updating preferences-related settings into this one function. This
was needed for an earlier version of the patch, even though the
current version could probably do without it.
(+[WebView _preferencesChangedNotification:]): Added a class-level
listener for WebPreferences changes. This listener takes care of
modifying the class-level global cache model setting if necessary.
(+[WebPreferences standardPreferences]): Removed call to
_postPreferencesChangesNotification because the notification already
posts when you create the WebPreferences object. (I noticed this
inefficiency because my new _preferencesChangedNotification: method was
called excessively at startup.)
Also Added explicit tracking of WebPreferences clients, so we know when
a WebPreferences instance becomes inert:
(-[WebPreferences didRemoveFromWebView]):
(-[WebPreferences willAddToWebView]):
(+[WebView _setCacheModel:]): Translates a cache model into actual
settings in various APIs. Caches that have unbounded value grow
linearly relative to available space. Caches that have bounded value
grow inverse-squaredly relative to available space.
2007-09-05 Timothy Hatcher
Reviewed by Darin.
Uncaught Objective-C exceptions in WebKit clients lead to hard-to-diagnose crashes
Changed all the direct delegate calls to use helper functions that have direct access to
WebView's delegate objects. These helper methods will catch any ObjC exceptions and call
ReportDiscardedDelegateException to log the discarded exception. WebView's that have
catchesDelegateExceptions set to NO will not pay the cost of a @try/@catch. The delegate
forwarders also have the same behavior.
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
(ReportDiscardedDelegateException):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView loadPluginRequest:]):
* Plugins/WebNullPluginView.mm:
(-[WebNullPluginView viewDidMoveToWindow]):
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createWindow):
(WebChromeClient::createModalDialog):
(WebChromeClient::runModal):
(WebChromeClient::toolbarsVisible):
(WebChromeClient::statusbarVisible):
(WebChromeClient::addMessageToConsole):
(WebChromeClient::canRunBeforeUnloadConfirmPanel):
(WebChromeClient::runBeforeUnloadConfirmPanel):
(WebChromeClient::runJavaScriptAlert):
(WebChromeClient::runJavaScriptConfirm):
(WebChromeClient::runJavaScriptPrompt):
(WebChromeClient::shouldInterruptJavaScript):
(WebChromeClient::setStatusbarText):
(WebChromeClient::print):
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::getCustomMenuFromDefaultItems):
(WebContextMenuClient::contextMenuItemSelected):
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::startDrag):
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::textFieldDidBeginEditing):
(WebEditorClient::textFieldDidEndEditing):
(WebEditorClient::textDidChangeInTextField):
(WebEditorClient::doTextFieldCommandFromEvent):
(WebEditorClient::textWillBeDeletedInTextField):
(WebEditorClient::textDidChangeInTextArea):
* WebCoreSupport/WebFrameBridge.mm:
(-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
(WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebFrameLoaderClient::dispatchWillSendRequest):
(WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
(WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebFrameLoaderClient::willCacheResponse):
(WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebFrameLoaderClient::dispatchDidFinishLoading):
(WebFrameLoaderClient::dispatchDidFailLoading):
(WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebFrameLoaderClient::dispatchDidCancelClientRedirect):
(WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebFrameLoaderClient::dispatchWillClose):
(WebFrameLoaderClient::dispatchDidReceiveIcon):
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebFrameLoaderClient::dispatchDidCommitLoad):
(WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebFrameLoaderClient::dispatchDidFailLoad):
(WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebFrameLoaderClient::dispatchDidFinishLoad):
(WebFrameLoaderClient::dispatchDidFirstLayout):
(WebFrameLoaderClient::dispatchCreatePage):
(WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::dispatchDidLoadMainResource):
* WebView/WebHTMLView.mm:
(-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]):
(-[WebHTMLView validateUserInterfaceItem:]):
* WebView/WebPDFView.mm:
(-[WebPDFView validateUserInterfaceItem:]):
(-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
* WebView/WebView.mm:
(-[WebView _openNewWindowWithRequest:]):
(-[WebView _menuForElement:defaultItems:]):
(-[WebView _mouseDidMoveOverElement:modifierFlags:]):
(-[WebView _cacheResourceLoadDelegateImplementations]):
(-[WebView _cacheFrameLoadDelegateImplementations]):
(-[WebView _policyDelegateForwarder]):
(-[WebView _UIDelegateForwarder]):
(-[WebView _editingDelegateForwarder]):
(-[WebView _scriptDebugDelegateForwarder]):
(-[WebView _setCatchesDelegateExceptions:]):
(-[WebView _catchesDelegateExceptions]):
(-[_WebSafeForwarder initWithTarget:defaultTarget:]):
(-[_WebSafeForwarder forwardInvocation:]):
(-[_WebSafeForwarder methodSignatureForSelector:]):
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView validateUserInterfaceItem:]):
(-[WebView _headerHeight]):
(-[WebView _footerHeight]):
(-[WebView _drawHeaderInRect:]):
(-[WebView _drawFooterInRect:]):
(-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
(CallDelegate):
(CallDelegateReturningFloat):
(CallDelegateReturningBoolean):
(CallUIDelegate):
(CallUIDelegateReturningFloat):
(CallUIDelegateReturningBoolean):
(CallFrameLoadDelegate):
(CallResourceLoadDelegate):
(CallFormDelegate):
(CallFormDelegateReturningBoolean):
* WebView/WebViewInternal.h:
* WebView/WebViewPrivate.h:
2007-09-04 Timothy Hatcher
Reviewed by Darin.
NIBs saved in the Pre-10.2 format while Safari 3 installed do not work without Safari 3
This happened because we encoded a new field that the old WebKit does not know how to read.
And NSCoder throws an exception if initWithCoder finishes while there is still unread data in the archive.
The WebViewVersion is now 4 to distinguish that we do not encode/decode allowsUndo.
* WebView/WebView.mm:
(-[WebView initWithCoder:]): Only try to read allowsUndo if the version is 3.
(-[WebView encodeWithCoder:]): No longer encode allowsUndo.
2007-09-04 David Hyatt
Fix for , resizing iChat window is slower than in
Tiger. This patch implements a fast scaling mode that can be used by
WebViews, e.g., during window resizing.
Reviewed by John Sullivan
* WebView/WebView.mm:
(-[WebView _setUseFastImageScalingMode:]):
(-[WebView _inFastImageScalingMode]):
* WebView/WebViewPrivate.h:
2007-09-04 Darin Adler
Reviewed by Hyatt.
* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]): Added missing null check.
(-[WebView _setInitiatedDrag:]): Ditto.
(-[WebView _clearUndoRedoOperations]): Ditto.
(-[WebView encodeWithCoder:]): Ditto.
(-[WebView backForwardList]): Ditto.
(-[WebView setMaintainsBackForwardList:]): Ditto.
2007-09-04 Tristan O'Tierney
Reviewed by John Sullivan.
Can't reply to this message in Mail -- -[DOMRange webArchive] is throwing an exception
* WebView/WebArchiver.mm:
(+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
Guard the creation of WebResource by ensuring that the passed in
responseURL is never nil.
2007-09-03 Mark Rowe
Reviewed by Tim Hatcher.
Production build with in symbols directory has no debug info
Enable debug symbol generation on all build configurations. Production builds are stripped
of symbols by Xcode during deployment post-processing.
* Configurations/Base.xcconfig:
* WebKit.xcodeproj/project.pbxproj:
2007-09-02 Brady Eidson
Reviewed by John Sullivan and Mark Rowe
Groundwork for support for monitoring IconDatabase in-memory statistics
* Misc/WebCoreStatistics.h:
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics iconPageURLMappingCount]):
(+[WebCoreStatistics iconRetainedPageURLCount]):
(+[WebCoreStatistics iconRecordCount]):
(+[WebCoreStatistics iconsWithDataCount]):
2007-09-01 Oliver Hunt
Reviewed by Sam.
IME is incorrectly used for key events when on non-editable regions
EditorClient::setInputMethodState stub
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::setInputMethodState):
2007-08-30 Maciej Stachowiak
Reviewed by Tim.
REGRESSION: Cannot load feeds in widgets in Dashcode due to change in WebKit delegate methods
* WebView/WebFrame.mm:
(-[WebFrame _attachScriptDebugger]): Don't create the debugger object if the frame has not yet
created its script interpreter, to avoid premature dispatch of windowScriptObjectAvailable/Cleared
delegate methods. The script debugger will be created in any case when the window object does appear.
2007-08-29 Darin Adler
Reviewed by Tim Hatcher.
- fix WebKit inappropriately adds +initialize to
NSPasteboard via a category, prevents AppKit initialize
http://bugs.webkit.org/show_bug.cgi?id=9417
* Misc/WebNSPasteboardExtras.h: Got rid of the global data objects and replaced
them with global functions.
* Misc/WebNSPasteboardExtras.mm:
(initializePasteboardTypes): Changed the initialize method to be this function.
(WebURLPasteboardType): Added, calls the initialize function and then returns
the value of the global.
(WebURLNamePasteboardType): Ditto.
(+[NSPasteboard _web_writableTypesForURL]): Changed to call the new function instead
of getting at the global directly.
(+[NSPasteboard _web_dragTypesForURL]): Ditto.
(-[NSPasteboard _web_writeURL:andTitle:types:]): Ditto.
* WebCoreSupport/WebPasteboardHelper.mm:
(WebPasteboardHelper::urlFromPasteboard): Ditto.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
* WebView/WebView.mm:
(+[WebView initialize]): Added a call to one of the functions to take advantage
of the side effect that initializes the globals; this is to help out old versions
of Safari.
(+[WebView URLTitleFromPasteboard:]): Changed to call the new function instead
of getting at the global directly.
* WebKit.exp: Add exports of the new functions.
2007-08-29 Adele Peterson
Reviewed by Darin.
Fix for http://bugs.webkit.org/show_bug.cgi?id=15098
REGRESSION (9A530-9A534): Double scroll bar on pdfs
* WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::makeDocumentView):
Don't suppress scrollbars before the view creation if we're making the view for a non-html view
* WebView/WebFrameViewInternal.h: Make _scrollView return a WebDynamicScrollBarsView since so many clients were relying on it being that type anyway.
* WebView/WebFrameView.mm:
(-[WebFrameView _setDocumentView:]):
(-[WebFrameView _scrollView]):
(-[WebFrameView setAllowsScrolling:]):
(-[WebFrameView allowsScrolling]):
* WebView/WebView.mm:
(-[WebView setAlwaysShowVerticalScroller:]):
(-[WebView alwaysShowVerticalScroller]):
(-[WebView setAlwaysShowHorizontalScroller:]):
(-[WebView alwaysShowHorizontalScroller]):
2007-08-29 David Hyatt
The method that was swizzled to fix 5441281 does not exist on Tiger.
Tiger has to do a double swizzle instead (of resetCursorRects and NSCursor's
set method) in order to roughly achieve the same effect.
Reviewed by darin
* WebView/WebHTMLView.mm:
(resetCursorRects):
(setCursor):
(+[WebHTMLViewPrivate initialize]):
2007-08-29 Anders Carlsson
Fix 64-bit build.
* WebCoreSupport/WebFrameBridge.mm:
2007-08-29 David Hyatt
Fix for 5441281, remove our dependency on cursor rects and drag margins
in AppKit for a large performance boost on the PLT and iBench.
Reviewed by darin
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView sendNullEvent]):
(-[WebBaseNetscapePluginView mouseEntered:]):
(-[WebBaseNetscapePluginView mouseExited:]):
(-[WebBaseNetscapePluginView stop]):
Clean up cursor setting from Netscape plugins. Don't unconditionally mutate
the cursor when a plugin stops.
* WebView/WebFrameView.mm:
(-[WebFrameView _setDocumentView:]):
Suppress the resetting of drag margins while the new document view is being
added to the view hierarchy.
* WebView/WebHTMLView.mm:
(-[NSWindow _web_borderView]):
Expose the border view of the NSWindow so that it can be hit tested.
(setCursorForMouseLocation):
Apply a method swizzle to override the private AppKit method, _setCursorForMouseLocation.
We have to do this to suppress the cursor rect invalidation handling from resetting
the cursor for no reason.
The swizzle will do a hit test and allow the cursor set to occur if the mouse ends up
being over a plugin or over a view other than a WebHTMLView.
(+[WebHTMLViewPrivate initialize]):
The swizzle for setCursorForMouseLocation is set up here.
(-[WebHTMLView _frameOrBoundsChanged]):
Add a 100ms delay to the fake mouse moved event that fires when the view moves
under the mouse (without the mouse moving). This happens on iBench when the
pages get scrolled. By adding a delay we ensure that even with the mouse inside
the window, we don't experience cursor thrashing when pages are updating and
scrolling rapidly.
2007-08-28 Anders Carlsson
Reviewed by Darin.
Bottom portion of any Web Clip widget appears transparent
* WebCoreSupport/WebFrameBridge.mm:
Use the enum from FrameLoaderTypes.h.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::objectContentType):
Return ObjectContentNetscapePlugin and ObjectContentOtherPlugin depending on the plug-in type.
2007-08-28 Mark Rowe
Reviewed by Maciej Stachowiak.
Fix fallout from the fix for (Loading history containing 100,000 entries adds 20s to Safari's startup)
in r25275. The array of entries for each day was being maintained in the reverse of the order that was expected.
* History/WebHistory.mm:
(-[WebHistoryPrivate insertItem:forDateKey:]): Maintain the array of entries in descending order.
2007-08-28 Mark Rowe
Fix the buildbot build.
* History/WebHistory.mm:
(timeIntervalForBeginningOfDay): Explicitly cast to silence compiler warning.
2007-08-28 Mark Rowe
Reviewed by Darin Adler.
Loading history containing 100,000 entries adds 20s to Safari's startup
Move WebHistoryItemPrivate from using a sorted array of NSCalendarDate's that map to a sorted array of arrays
of WebHistoryItem's over to using a HashMap of NSTimeIntervals and arrays of WebHistoryItems. NSTimeInterval
uses less memory and is substantially cheaper during comparisons than NSCalendarDate. The use of the HashMap
avoids the needs to repeatedly search within an array to locate the array that corresponds to the given days
history items.
The result of these changes is that loading 100,000 history items drops from around 25s to 1.6s. Loading
100 items drops from 0.003s to 0.002s.
* History/WebHistory.mm:
(-[WebHistoryPrivate init]):
(-[WebHistoryPrivate dealloc]):
(timeIntervalForBeginningOfDay): Return the NSTimeInterval representing the beginning of the specified day.
(-[WebHistoryPrivate findKey:forDay:]):
(-[WebHistoryPrivate insertItem:forDateKey:]): Perform a binary search within the day's history items rather than a linear search.
(-[WebHistoryPrivate _removeItemFromDateCaches:]):
(-[WebHistoryPrivate _addItemToDateCaches:]):
(-[WebHistoryPrivate removeAllItems]):
(-[WebHistoryPrivate orderedLastVisitedDays]): Generate and cache the sorted NSArray of NSCalendarDate's exposed in the API.
This cache is invalidated by _removeItemFromDateCaches: and _addItemToDateCaches: when needed.
(-[WebHistoryPrivate orderedItemsLastVisitedOnDay:]):
(-[WebHistoryPrivate arrayRepresentation]):
(-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): Use an autorelease pool to keep the
number of live autoreleased objects generated to a reasonable level.
* History/WebHistoryItem.mm:
(-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
(-[WebHistoryItem initFromDictionaryRepresentation:]): Use the new HistoryItem constructor that accepts the alternate title
rather than setting it after construction. This prevents a modification notification from being sent for each WebHistoryItem that is loaded.
* History/WebHistoryItemInternal.h:
* History/WebHistoryPrivate.h:
* Misc/WebNSCalendarDateExtras.h: Removed as _webkit_compareDay: is no longer used.
* Misc/WebNSCalendarDateExtras.m: Removed.
* WebKit.xcodeproj/project.pbxproj:
2007-08-28 Anders Carlsson
Reviewed by Darin.
XMLHttpRequest readyState 3 & responseText buffer issues
Expose WKSetNSURLRequestShouldContentSniff to WebCore.
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface):
2007-08-24 Kevin McCullough
Reviewed by Darin.
1 credential object leaked for each call to credentialWithUser:password:persistence
- Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
(-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
2007-08-24 Adele Peterson
Fix by Darin, reviewed by Adele.
Fix for Upon quitting, WebKit loads the WebPlugin shared database and immediately closes it
* Plugins/WebPluginDatabase.h: Added closeSharedDatabase, which won't create a new database if we're just trying to close it.
* Plugins/WebPluginDatabase.m: (+[WebPluginDatabase closeSharedDatabase]): Added.
* WebView/WebView.mm:
(-[WebView _close]): Call closeSharedDatabase.
(+[WebView _applicationWillTerminate]): Call closeSharedDatabase.
2007-08-24 Timothy Hatcher
Reviewed by John Sullivan.
HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
This is a more localized fix for yesterday's change. Now explicitly call _web_layoutIfNeededRecursive inside the
HIWebView Draw() function. Adds a FIXME to explain that we need to do layout before Carbon has decided what regions to draw.
Doing layout in Draw() will potentially cause drawing to happen in two passes, but this has always been a problem in Carbon.
* Carbon/HIWebView.m:
(Draw): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
(SetFocusPart): Fix to work in ObjC++ (now that HIWebView.m is treated as a ObjC++ file.)
* WebView/WebView.mm: Removes the 4 displayIfNeeded methods from yesterday's change.
* WebKit.xcodeproj/project.pbxproj: Force the file type of HIWebView.m to ObjC++ so WebHTMLViewInternal.h can be included.
2007-08-23 Timothy Hatcher
Reviewed by Dave Hyatt.
HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
The Carbon HIWebView was relying on layout happening when displayIfNeededInRect: was called on the WebView.
This would happen on Tiger because _recursiveDisplayRectIfNeededIgnoringOpacity: would always do a layout if needed.
Doing a layout in _recursiveDisplayRectIfNeededIgnoringOpacity was removed in Leopard in favor of viewWillDraw, and
the fact that adding new dirty rects inside _recursiveDisplayRectIfNeededIgnoringOpacity on Leopard will not
cause a drawRect in the same display loop.
So any client on Leopard calling displayIfNeeded* on the WebView would get a layout and any new dirty rects. So
_web_layoutIfNeededRecursive needs to be called on the main frame's WebHTMLView to make sure we layout and
display anything that is really needed.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _layoutIfNeeded]):
(-[WebHTMLView _web_layoutIfNeededRecursive]):
* WebView/WebHTMLViewInternal.h:
* WebView/WebView.mm:
(-[WebView displayIfNeeded]): Call _web_layoutIfNeededRecursive on the main WebHTMLView.
(-[WebView displayIfNeededIgnoringOpacity]): Ditto.
(-[WebView displayIfNeededInRect:]): Ditto.
(-[WebView displayIfNeededInRectIgnoringOpacity:]): Ditto.
2007-08-22 Timothy Hatcher
Rolling out r25102 for until
is resolved.
* Carbon/CarbonUtils.m:
(WebInitForCarbon):
(PoolCleaner):
* Carbon/CarbonWindowAdapter.h:
* Carbon/CarbonWindowAdapter.m:
* Carbon/CarbonWindowContentView.h:
* Carbon/CarbonWindowContentView.m:
* Carbon/CarbonWindowFrame.h:
* Carbon/CarbonWindowFrame.m:
* Carbon/HIViewAdapter.h:
* Carbon/HIViewAdapter.m:
* Carbon/HIWebView.h:
* Carbon/HIWebView.m:
2007-08-20 John Sullivan
Reviewed by Adam Roben
WebKit part of fix for:
WebKit focus ring color no longer matches system focus rings
* Misc/WebNSAttributedStringExtras.mm:
now includes to account for moved declaration
* WebView/WebFrame.mm:
ditto
* WebView/WebViewPrivate.h:
* WebView/WebView.mm:
(+[WebView _setUsesTestModeFocusRingColor:]):
new SPI, calls through to new WebCore function. This is used by DumpRenderTree to make sure the
focus ring color is always the same when performing layout tests, regardless of OS X version.
(+[WebView _usesTestModeFocusRingColor]):
new SPI, calls through to new WebCore function
2007-08-20 Antti Koivisto
Reviewed by John.
Fix
Crash at Range::startContainer() when creating multiple ToDos on the same line
Null check range.
No layout test, this only happens with ObjC API.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _expandSelectionToGranularity:]):
2007-08-20 Maciej Stachowiak
Not reviewed, fix for crash on launch bug in last patch.
* WebView/WebHTMLView.mm:
(-[WebHTMLView setDataSource:]): Remove an assertion, fix code to work right in the
face of that condition.
2007-08-18 Maciej Stachowiak
Reviewed by Darin.
- fixed REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
There were three main cuases of extra time due to creating the initial empty document:
1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
2) Parsing the minimal markup for the initial document's contents.
3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
The WebKit part of the fixes addresses 1.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::makeDocumentView): When switching from the initial
empty document to the first real document, reuse the WebHTMLView.
It might actually be a significant performance improvement to always
reuse the WebHTMLView, but that is a much riskier change and not
needed to fix the regression right now.
2007-08-17 Maciej Stachowiak
Reviewed by Darin.
- WebKit part of fix to scrollbar suppression hack for Leopard
* WebView/WebDynamicScrollBarsView.m:
(-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
when scrollbars are suppressed.
(-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
here, when unsuppressing.
2007-08-17 Darin Adler
Reviewed by Maciej.
- fix Use root URL as origin URL when quarantining downloads
* WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::setOriginalURLForDownload):
Extract only the scheme and host name and make the originating URL from that.
* WebKit/StringsNotToBeLocalized.txt: Updated for recent changes.
2007-08-17 Timothy Hatcher
Reviewed by Darin.
Xcode threw mutation exception while enumerating subviews (GC only)
I was never able to reproduce this exception. But there can be cases where layout will
trigger JavaScript or plugin code that can modify the WebView view hierarchy during a
recursive enumeration of all the subviews.
This patch does two things:
1) Adds a check in debug builds that will LOG when any view is added or removed during layout.
Noting that added views will not recieve layout this round and might paint without first recieving layout.
2) Recursivly builds up an array of descendant WebHTMLViews before calling layout on them.
This matches the behavior of makeObjectsPerformSelector: in the non-GC case (making a copy
before enumerating.)
* WebView/WebHTMLView.mm:
(-[WebHTMLView _web_setPrintingModeRecursive]): Use _web_addDescendantWebHTMLViewsToArray to build up an array
of WebHTMLViews to enumerate.
(-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
(-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
(-[WebHTMLView _web_layoutIfNeededRecursive]): Ditto.
(-[WebHTMLView _layoutIfNeeded]): Moved to WebHTMLViewFileInternal category.
(-[WebHTMLView didAddSubview:]): LOG in debug builds.
(-[WebHTMLView willRemoveSubview:]): Ditto.
(-[NSView _web_addDescendantWebHTMLViewsToArray:]): Recursivly build an array of descendant WebHTMLViews.
* WebView/WebHTMLViewInternal.h: Added a BOOL in WebHTMLViewPrivate to track subview changes (debug only.)
2007-08-17 Anders Carlsson
Reviewed by Dave Hyatt.
REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
Pass the right size when creating the views.
* WebCoreSupport/WebFrameBridge.mm:
(-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPlugin):
2007-08-13 Geoffrey Garen
Reviewed by Dave Hyatt.
WebKit changes to support new cache eviction model in WebCore.
* WebView/WebPreferences.m:
(+[WebPreferences initialize]): Modified to reflect new API in WebCore.
* WebView/WebView.mm:
(+[WebView _initializeCacheSizesIfNecessary]): Slightly increased cache
size on low memory systems to avoid affecting the PLT for now.
2007-08-15 Timothy Hatcher
Reviewed by Darin.
HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized
HIWebViewCreate now just returns a HIViewRef created with HICocoaViewCreate. This eliminates lots of old code and
makes HIWebView a better citizen starting with Leopard. The old code paths are still needed for Tiger, so now
most of the files in the WebKit/Carbon directory are #ifdef BUILDING_ON_TIGER.
The Tiger code is unchanged and dosen't exhibit the invalidation problem when the window resizes.
* Carbon/CarbonUtils.m:
(WebInitForCarbon): #ifdef BUILDING_ON_TIGER portions of this code that is not needed on Leopard.
* Carbon/CarbonWindowAdapter.h: #ifdef BUILDING_ON_TIGER
* Carbon/CarbonWindowAdapter.m: Ditto.
* Carbon/CarbonWindowContentView.h: Ditto.
* Carbon/CarbonWindowContentView.m: Ditto.
* Carbon/CarbonWindowFrame.h: Ditto.
* Carbon/CarbonWindowFrame.m: Ditto.
* Carbon/HIViewAdapter.h: Ditto.
* Carbon/HIViewAdapter.m: Ditto.
* Carbon/HIWebView.h: Consolidate two #ifdef __OBJC__ blocks into one.
* Carbon/HIWebView.m: Implement Leopard specific HIWebViewCreate, HIWebViewCreateWithClass and HIWebViewGetWebView.
(HIWebViewCreate): Call HIWebViewCreateWithClass passing [WebView class].
(HIWebViewCreateWithClass): Call HICocoaViewCreate with an instance of the class passed in.
(HIWebViewGetWebView): Call HICocoaViewGetView.
2007-08-14 Brady Eidson
Reviewed by Darin, John, Maciej, Oliver, and Tim
- Crash on launch with corrupt icon database
Expose some new SPI to help recover from this case should it happen again
* Misc/WebIconDatabase.mm:
(-[WebIconDatabase init]): Use the new _databaseDirectory to determine where to open the database on disk
(+[WebIconDatabase _checkIntegrityBeforeOpening]): Tell the icon database to check integrity when it opens
(-[WebIconDatabase _databaseDirectory]): Moved the database-directory-determining logic here as it's now used in two places
* Misc/WebIconDatabasePrivate.h: Added _checkIntegrityBeforeOpening SPI for clients to give hints about when the
integrity check should run
2007-08-12 Alexey Proskuryakov
Reviewed by Darin.
http://bugs.webkit.org/show_bug.cgi?id=4648
Shockwave unable to load GZip'd text resources when server sends Content-Length header
* Plugins/WebBaseNetscapePluginStream.mm:
(-[WebBaseNetscapePluginStream startStreamWithResponse:]): Don't trust
-[NSURLResponse expectedContentLength] if Content-Encoding is not identity.
2007-08-10 Timothy Hatcher
Reviewed by Mark Rowe.
HIWebView.h should be #ifdefed out for 64-bit
* Carbon/HIWebView.h: #ifdef out the header in 64-bit. Adds a comment about 32-bit only.
* Carbon/CarbonUtils.h: Ditto.
2007-08-10 Timothy Hatcher
Reviewed by Adam.
Stop using some Carbon UI APIs for 64 bit
Disable NPObject use in 64-bit on Mac OS X. Also generate the 64-bit export file.
* Configurations/WebKit.xcconfig: Point to the generated 64-bit export file.
* Plugins/WebBasePluginPackage.h:
* Plugins/npfunctions.h: #ifdef out this header in 64-bit on Mac OS X.
* WebKit.LP64.exp: Removed.
* WebKit.xcodeproj/project.pbxproj: Generate the the 64-bit export file.
* WebKitPrefix.h: Define WTF_USE_NPOBJECT.
2007-08-10 Anders Carlsson
Reviewed by Geoff.
REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source
If the identifier is not in the map, just bail out instead of asserting. This is a better fix for
because WebCore shouldn't have to worry about the lifetime of WebKit objects.
* WebView/WebDocumentLoaderMac.mm:
(WebDocumentLoaderMac::decreaseLoadCount):
2007-08-10 Oliver Hunt
Reviewed by Darin.
Fixed REGRESSION: ATOK IM: reconvert returns incorrect symbol due to inconsistent range domains in TSM by working around [NSAttributedString(WebKitExtras) _web_attributedStringFromRange:] adds whitespace to the requested range
We truncate the returned string to the expected length.
* WebView/WebHTMLView.mm:
(-[WebHTMLView attributedSubstringFromRange:]):
2007-08-09 Mark Rowe
Reviewed by Antti.
Versioning in debug and release builds should include minor and tiny version before +
* Configurations/Version.xcconfig:
* WebKit.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
Version.xcconfig and Info.plist explicit to Xcode.
2007-08-08 Kevin Decker
Reviewed by Anders Carlsson.
Fixed: Stop using some Carbon UI APIs for 64 bit
#ifdef'd out Netscape style plug-ins on 64-bit because Mac OS X doesn't support 64-bit Carbon UI.
* Plugins/WebBaseNetscapePluginStream.h:
* Plugins/WebBaseNetscapePluginStream.mm:
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(+[WebBaseNetscapePluginView getCarbonEvent:]):
(TSMEventHandler):
* Plugins/WebBaseNetscapePluginViewInternal.h:
* Plugins/WebBaseNetscapePluginViewPrivate.h:
* Plugins/WebBasePluginPackage.m:
(+[WebBasePluginPackage pluginWithPath:]):
* Plugins/WebNetscapePluginEmbeddedView.h:
* Plugins/WebNetscapePluginEmbeddedView.mm:
* Plugins/WebNetscapePluginPackage.h:
* Plugins/WebNetscapePluginPackage.m:
* Plugins/WebNetscapePluginStream.h:
* Plugins/WebNetscapePluginStream.mm:
* Plugins/WebPluginDatabase.m:
(-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
* Plugins/npapi.m:
* WebCoreSupport/WebFrameBridge.mm:
(-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
* WebView/WebFrame.mm:
* WebView/WebFramePrivate.h:
* WebView/WebHTMLView.mm:
(-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
* WebView/WebHTMLViewInternal.h:
2007-08-07 David Hyatt
Fix a botched backout of the Quicktime plugin clipping fix that broke Java. The plugin view should not
be set to autosize with the parent view. Also, cleanup of script objects was removed accidentally as
well.
Reviewed by olliej
* Plugins/WebPluginController.mm:
(-[WebPluginController destroyPlugin:]):
(-[WebPluginController destroyAllPlugins]):
* WebCoreSupport/WebFrameBridge.mm:
(-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:loadManually:]):
2007-08-03 Brady Eidson
Reviewed by Oliver
Fix for http://bugs.webkit.org/show_bug.cgi?id=14824 and
When unregistering a MIMEType, remove it from the WebCore registry unconditionally
When registrying a MIMEType whose view class is WebHTMLView, add it to the WebCore registry
* WebView/WebView.mm:
(+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
(+[WebView _registerViewClass:representationClass:forURLScheme:]):
(+[WebView registerViewClass:representationClass:forMIMEType:]):
2007-08-03 Timothy Hatcher
Reviewed by Mark Rowe.
Correct the bundle version check to work in Debug and Release builds too.
* WebKit.xcodeproj/project.pbxproj:
2007-08-02 Brady Eidson
Reviewed by Tim
- setMIMETypesShownAsHTML mutates while enumerating
* WebView/WebView.mm:
(+[WebView setMIMETypesShownAsHTML:]): Copy the dictionary before we work with it.
2007-08-02 Alice Liu
Reviewed by Kevin McCullough.
fixed REGRESSION: javascript is mis-escaped at http://labs.zarate.org/passwd causing bookmarklet to break
* Misc/WebNSURLExtras.mm:
(+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
(-[NSURL _web_userVisibleString]):
(-[NSURL _web_URLWithLowercasedScheme]):
(-[NSURL _web_dataForURLComponentType:]):
These 4 changes are just casting changes.
(-[NSString _webkit_stringByReplacingValidPercentEscapes]):
This change replaces the call to an NSURL method with a webcore one that doesn't abort the escaping effort once an illegal character is encountered.
2007-08-01 Anders Carlsson
Fix build.
* Misc/WebNSURLExtras.mm:
(+[NSURL _web_URLWithUserTypedString:relativeToURL:]):
(-[NSURL _web_userVisibleString]):
(-[NSURL _web_URLWithLowercasedScheme]):
(-[NSURL _web_dataForURLComponentType:]):
2007-08-01 Alice Liu
Reviewed by .
Making WebNSURLExtras objc++
* Misc/WebNSURLExtras.m: Removed.
* Misc/WebNSURLExtras.mm: Copied from WebKit/Misc/WebNSURLExtras.m.
* WebKit.xcodeproj/project.pbxproj:
2007-08-01 Darin Adler
Reviewed by Anders Carlsson and Kevin Decker.
- fix Removal of MakeDataExecutable from 64-bit breaks WebKit build
The trick was to ifdef out more of the code that's only needed to support CFM, which exists
only for 32-bit PowerPC.
* Plugins/WebNetscapePluginPackage.h: Define a SUPPORT_CFM symbol in this internal header when
we support CFM. We support it only on 32-bit PowerPC. Only define the isBundle, isCFM, and
connID fields when SUPPORT_CFM is on. Also use ResFileRefNum instead of SInt16.
* Plugins/WebNetscapePluginPackage.m: Only compile the function pointer and transition vector
functions when SUPPORT_CFM is on.
(-[WebNetscapePluginPackage openResourceFile]): Put the non-bundle case inside a SUPPORT_CFM
ifdef, since all non-CFM plug-ins are bundles.
(-[WebNetscapePluginPackage closeResourceFile:]): Ditto.
(-[WebNetscapePluginPackage _initWithPath:]): Use SUPPORT_CFM to compile out the code for
non-bundle and bundle-based CFM plug-ins, and code that sets isBundle and isCFM.
(-[WebNetscapePluginPackage executableType]): Put the CFM case inside SUPPORT_CFM.
(-[WebNetscapePluginPackage load]): Put the non-bundle and CFM cases inside SUPPORT_CFM.
There was a bit of dead code here.
(-[WebNetscapePluginPackage _unloadWithShutdown:]): Put the non-bundle case inside
SUPPORT_CFM.
2007-07-31 Timothy Hatcher
Reviewed by Oliver and Beth.
ADOBE Leopard 9A410: At the first Launching InDesign after deactivate, EULA page gets blanked.
Check for more Adobe applications that need the frame reload quirk. Also cache the answer
so the version check dosen't happen more than once.
* WebView/WebView.mm:
(-[WebView _needsAdobeFrameReloadingQuirk]):
(-[WebView _updateWebCoreSettingsFromPreferences:]):
2007-07-30 Adele Peterson
Reviewed by Oliver.
Fix for REGRESSION: Command-N with Dvorak-Qwerty keyboard layout stopped working inside web page text fields
* WebView/WebHTMLView.mm: (-[WebHTMLView _handleStyleKeyEquivalent:]):
The input method may have modified the character we get, so don't use charactersIgnoringModifiers to interpret the character we get.
2007-07-30 John Sullivan
Reviewed by Darin
- fixed Need WebKit SPI to allow clients using embedded WebViews to avoid
clipping ends of some printed pages
This provides Mail, and other clients that print views that embed WebViews, a way to ensure that
the HTML is laid out for printing before pagination occurs.
* WebView/WebHTMLViewPrivate.h:
new SPI method -_layoutForPrinting
* WebView/WebHTMLView.mm:
(-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]):
new method, just like existing _web_setPrintingModeRecursive except passes YES for adjustViewSize
(-[WebHTMLView _layoutForPrinting]):
new SPI method, sets printing mode temporarily to adjust the view size for printing
(-[NSView _web_setPrintingModeRecursiveAndAdjustViewSize]):
new helper method to do the recursion
2007-07-30 Adele Peterson
Reviewed by Darin.
Fix for A crash occurs at WebCore::Frame::isFrameSet() when attempting to print a iframe before it loads at http://www.monster.com/
* WebView/WebHTMLView.mm: (-[WebHTMLView knowsPageRange:]): Nil check for frame.
2007-07-30 Anders Carlsson
Reviewed by Darin.
REGRESSION: After switching from Bookmark view, the Find Banner won't appear while displaying a PDF file
Implement hasHTMLView.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::hasHTMLView):
2007-07-30 Justin Garcia
Reviewed by Tristan.
Attachments are lost when they are moved into a ToDo after a delete
Mail needs to be asked if it is OK to do the content movement that happens
after a deleting in a situation like this one:

foo

^bar

so that they can prevent the move or so that they can save content that
will be stripped by the move. This could have been done with shouldInsertNode
and a new WebViewInsertAction for "moves", but WebKit clients like Mail and
DashCode think that a shouldInsert* means that the user pasted something and
perform actions only appropriate for pastes. This change is less risky because
it won't require those clients to change their code.
* DefaultDelegates/WebDefaultEditingDelegate.m:
(-[WebDefaultEditingDelegate webView:shouldMoveRangeAfterDelete:replacingRange:]):
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::shouldMoveRangeAfterDelete):
* WebView/WebEditingDelegatePrivate.h:
2007-07-29 Adele Peterson
Reviewed by John.
WebKit part of fix for REGRESSION: Can't tab to webview that doesn't have editable content
* WebView/WebHTMLView.mm: (-[WebHTMLView becomeFirstResponder]): Call new setInitialFocus method instead of advanceFocus.
2007-07-27 Darin Adler
- fix build
* WebKitPrefix.h: Removed the USING_WEBCORE_XXX definitions.
* WebView/WebHTMLView.mm:
(-[WebHTMLView delete:]): Fixed this to use WebCore again; I accidentally revived a dead
code path that didn't work in the last patch!
(-[WebHTMLView deleteToMark:]): Ditto.
(-[WebHTMLView copy:]): Removed the unused side of the ifdef.
(-[WebHTMLView cut:]): Ditto.
(-[WebHTMLView paste:]): Ditto.
2007-07-27 Darin Adler
Reviewed by Tim Hatcher and Oliver Hunt.
- fix webView:doCommandBySelector: isn't getting called for copy:
Added code so that webView:doCommandBySelector: is called for every command.
* WebView/WebHTMLView.mm: Made 44 of the commands use the WEBCORE_COMMAND macro instead
of being handwritten. For all the others, added invocation of COMMAND_PROLOGUE macro at
the start of the command.
(-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]): Added.
(-[WebHTMLView callWebCoreCommand:]): Added.
(-[WebHTMLView delete:]): Removed unused code path -- easy to bring back some day, but
we don't need it compiled in.
(-[WebHTMLView deleteBackwardByDecomposingPreviousCharacter:]): Changed so this doesn't
call deleteBackward: any more so we don't call the delegate two times.
(-[WebHTMLView deleteToMark:]): Changed so this doesn't call delete: any more so we don't
call the delegate two times.
(-[WebHTMLView selectToMark:]): Changed so this doesn't call setMark: any more so we don't
call the delegate two times.
(-[WebHTMLView doCommandBySelector:]): Added code to set the private variable
selectorForDoCommandBySelector. This allows callDelegateDoCommandBySelectorIfNeeded to
detect that we've already called the delegate and avoids calling it twice.
* WebView/WebHTMLViewInternal.h: Added the selectorForDoCommandBySelector field.
2007-07-26 Alexey Proskuryakov
Reviewed by Oliver.
http://bugs.webkit.org/show_bug.cgi?id=14733
Add a logging channel for text input
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
(WebKitInitializeLoggingChannelsIfNecessary):
* WebView/WebHTMLView.mm:
(-[WebHTMLView validAttributesForMarkedText]):
(-[WebHTMLView textStorage]):
(-[WebHTMLView characterIndexForPoint:]):
(-[WebHTMLView firstRectForCharacterRange:]):
(-[WebHTMLView selectedRange]):
(-[WebHTMLView markedRange]):
(-[WebHTMLView attributedSubstringFromRange:]):
(-[WebHTMLView hasMarkedText]):
(-[WebHTMLView unmarkText]):
(-[WebHTMLView setMarkedText:selectedRange:]):
(-[WebHTMLView doCommandBySelector:]):
(-[WebHTMLView insertText:]):
2007-07-26 Darin Adler
- fix Tiger build
* Misc/WebTypesInternal.h: For use inside the library, use NSInteger and
NSUInteger, just like on Leopard. WebNSInteger and WebNSUInteger are still
present, but they are used in public and private headers only.
* Carbon/CarbonWindowAdapter.m:
* Carbon/CarbonWindowFrame.m:
* DefaultDelegates/WebScriptDebugServer.m:
* History/WebBackForwardList.mm:
* Misc/WebDownload.m:
* Misc/WebSearchableTextView.m:
* Plugins/WebBaseNetscapePluginView.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebHTMLView.mm:
* WebView/WebPDFView.mm:
* WebView/WebView.mm:
* WebView/WebViewInternal.h:
Update all implementation files and internal headers to use NSInteger and
NSUInteger rather than WebNSInteger and WebNSUInteger.
2007-07-26 John Sullivan
Reviewed by Kevin Decker
- fixed Searching a pdf in some modes shows hilights for all instances
of the word, even those not on the current page
It turns out that there were three different issues here, all contributing to incorrect display
of multiple matches for PDF pages in certain display modes. (1) in non-continuous display modes,
we weren't updating the match rects when the displayed page is changed with page up/down (e.g.);
(2) the mechanism to update the match rects on scrolling was busted except for the first scroll
away from 0,0; (3) the PDFKit API returns selection bounds for non-displayed pages in non-continuous
modes just as if they were the displayed pages. This patch fixes all three issues.
* WebView/WebPDFView.h:
made ivar name even longer
* WebView/WebPDFView.mm:
(-[WebPDFView setPDFDocument:]):
updated for ivar name change
(-[WebPDFView viewDidMoveToWindow]):
observe page-change notifications as well as the others; this is necessary because in the
non-continuous modes the view can be completely updated without any scrolling involved (problem 1)
(-[WebPDFView viewWillMoveToWindow:]):
stop observing page-change notifications
(-[WebPDFView rectsForTextMatches]):
skip any pages that aren't visible; this avoids treating matches on non-displayed non-continous
modes as if they were on the displayed page (problem 3)
(-[WebPDFView _PDFDocumentViewMightHaveScrolled:]):
after checking whether scroll position has changed since we last checked it, remember the new
one (d'oh!) (problem 2)
(-[WebPDFView _scaleOrDisplayModeOrPageChanged:]):
renamed to include page changes
(-[WebPDFView _visiblePDFPages]):
new method, returns the set of pages that are at least partly visible
2007-07-24 Oliver Hunt
Reviewed by Adam and Justin.
WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
editableDOMRangeForPoint:, moveDragCaretToPoint:, and removeDragCaret now call directly into
WebCore without relying on bridge look up through the now removed _bridgeAtPoint:.
* WebKit.xcodeproj/project.pbxproj:
* WebView/WebView.mm:
(-[WebView moveDragCaretToPoint:]):
(-[WebView removeDragCaret]):
(-[WebView editableDOMRangeForPoint:]):
2007-07-24 Kevin Decker
Reviewed by Anders.
REGRESSION (Safari 2->Safari 3): Adobe Reader 7.0.8 plug-in doesn't work
* Plugins/WebNetscapePluginEmbeddedView.h: Added a #define that renames this class to "WebNetscapePluginDocumentView"
This is necessary because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named "WebNetscapePluginDocumentView"
and will not function correctly if it doesn't find a view in the hierarchy without the old class name.
2007-07-24 Mark Rowe
Reviewed by Antti.
NSMenuItem's seen leaking on buildbot
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::contextMenuItemSelected): Release platformItem as we were transferred its ownership by releasePlatformDescription.
2007-07-23 Oliver Hunt
Reviewed by Darin.
We have to be able to support insertText: followed by doCommandBySelector: in
order to support the 2- and 3-Set Korean and RuSwitcher IMs at least.
* WebView/WebHTMLView.mm:
(-[WebHTMLView insertText:]):
2007-07-23 Alice Liu
Reverting change 24535 now that a solution has been found that doesn't
involve exposing an interface unnecessarily.
* WebView/WebHTMLView.mm:
* WebView/WebHTMLViewPrivate.h:
2007-07-23 Alice Liu
Reviewed by Oliver Hunt.
Expose [WebHTMLView hasMarkedText] to
fix autocomplete breaks Japanese typing
* WebView/WebHTMLView.mm:
* WebView/WebHTMLViewPrivate.h:
2007-07-22 Darin Adler
* StringsNotToBeLocalized.txt: Updated for recent changes.
2007-07-21 Adam Roben
Fix REGRESSION: Right-click/control-click broken
http://bugs.webkit.org/show_bug.cgi?id=14658
Reviewed by Mitz.
* WebCoreSupport/WebContextMenuClient.mm:
(fixMenusToSendToOldClients): Update defaultItemsCount after removing
items from the defaultItems array.
2007-07-20 Oliver Hunt
Reviewed by Adele.
REGRESSION: Cannot paste into an active inline input area (14522)
http://bugs.webkit.org/show_bug.cgi?id=14522
AppKit sends noop: to -[WebHTMLView doCommandBySelector:] when an IM does not handle event,
we now check this as it is necessary to work around some IMs that do send messages
(such as insertText: rather than unmarkText: to confirm a composition)
* WebView/WebHTMLView.mm:
(-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
(-[WebHTMLView doCommandBySelector:]):
* WebView/WebHTMLViewInternal.h:
2007-07-20 Brady Eidson
Reviewed by Adele and Andersca
- WebBackForwardList created from scratch is unusable (always leads to crash)
* History/WebBackForwardList.mm:
(-[WebBackForwardList init]): Have a default initializer that uses an empty BackFowardList not associated with a page.
* WebView/WebFrame.mm:
(kit): For clarity's sake, this should return nil, not 0
2007-07-20 Justin Garcia
Reviewed by Darin.
Ctrl-click on word in non-editable text doesn't select it
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm: Removed the method
for enabling/disabling word selection on right click.
* WebView/WebView.mm: Ditto.
* WebView/WebViewPrivate.h: Removed the getter/setter entirely,
it was in a private Category for Mail, but wasn't used by Mail
on Tiger or Leopard, they apparently implement word selection on
their own.
2007-07-20 Timothy Hatcher
Reviewed by Darin.
WebView needs to adopt viewWillDraw (moving off of _propagateDirtyRectsToOpaqueAncestors)
REGRESSION: Scroller in Widget Manager splits down the middle while scrolling
On Leopard _propagateDirtyRectsToOpaqueAncestors is no longer called by AppKit. Also marking new dirty rects
underneath _recursiveDisplayRectIfNeededIgnoringOpacity will wait until the next runloop to draw them,
causing rendering to happen in two steps instead of one as WebCore expected.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _topHTMLView]): Move to the file internal category so we can use it in viewWillDraw.
(-[WebHTMLView _isTopHTMLView]): Ditto.
(-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]): #ifdef for Tiger only.
(-[WebHTMLView viewWillDraw]): Do a recursive layout if this is the top WebHTMLView.
(-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
Don't do layout here on Leopard since viewWillDraw handled it.
(-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]): Ditto.
2007-07-20 Beth Dakin
Reviewed by Tim and Geoff.
Fix for Mail crashes at
WebCore::RenderTableSection:paint + 846 when attempting to display
a HTML based message
After reapplying styles, the RenderView needs layout. However,
layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize used to
return early if the WebHTMLView itself does not need layout.
Because the WebHTMLView is not necessarily in synch with the
RenderTree, returning early here can get us into a bad situation
where we paint before laying out the Render Tree. This patch checks
both the WebHTMLView and the bridge (which checks the RenderView,
etc), so that we do not return early without laying out the Render
Tree.
Some day, we should phase out WebHTMLView keeping track of
needsLayout at all. But that is a bit beyond the scope of this fix.
* WebView/WebHTMLView.mm:
(-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
2007-07-20 John Sullivan
Reviewed by Darin Adler and David Harrison
- fixed REGRESSION: Bottom of some printed pages are truncated
The "avoid orphan" code I added a year ago was causing the page to be imaged to a larger
height (good), but not shrinking everything to compensate (bad). Bad one-year-ago me!
* WebView/WebHTMLViewInternal.h:
added avoidingPrintOrphan boolean
* WebView/WebHTMLView.mm:
(-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
clear _private->avoidingPrintOrphan when clearing _private->printing
(-[WebHTMLView _scaleFactorForPrintOperation:]):
take _private->avoidingPrintOrphan into account when computing the scale factor
(-[WebHTMLView knowsPageRange:]):
set _private->avoidingPrintOrphan when we're shrinking to avoid an orphan
2007-07-19 Adam Roben
Fix REGRESSION: A error dialog occurs when
attempting to ctrl-click in a iChat message window (webview)
Reviewed by Oliver.
* WebCoreSupport/WebContextMenuClient.mm:
(fixMenusToSendToOldClients): Don't check for the Inspect Element item
if we have fewer than 2 items.
2007-07-18 Geoffrey Garen
Reviewed by Dave Hyatt.
Reduced default WebCore cache size from 32 MB to 23 MB on systems below
512 MB RAM. This improves RPRVT usage in the Safari pageout test by
~10% on a system with 384 MB RAM.
At 23 MB, no extra resources are evicted from the cache during a PLT
run, so this is a safe change PLT-wise. 23 MB is also seems to be a
generous number in real world usage.
* WebView/WebPreferences.m:
(+[WebPreferences initialize]):
2007-07-18 Anders Carlsson
Reviewed by Geoff.
REGRESSION (Safari 2->Safari 3): DjVu plug-in doesn't load in Safari 3
The DjVu plug-in uses the size of the passed in NPNetscapeFuncs struct to copy it over to a NPNetscapeFuncs struct
whose size was determined when DjVu was compiled. This means that when we add extra functions to the vtable,
DjVu will segfault copying it into the (too small) destination struct.
Fix this by special-casing the DjVu plug-in and setting the NPNetscapeFuncs size to be the same size as what DjVu expects.
* Plugins/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage _applyDjVuWorkaround]):
(-[WebNetscapePluginPackage load]):
2007-07-18 Timothy Hatcher
Reviewed by Adam.
Should have a way to disable the Web Inspector
Adds a new DisableWebKitDeveloperExtras default that will force the Web Inspector to be disabled.
This overrides the WebKitDeveloperExtras and IncludeDebugMenu default. It also disables
the Web Inspector in Debug builds.
* WebView/WebView.mm:
(+[WebView _developerExtrasEnabled]): Check for the DisableWebKitDeveloperExtras default.
(-[WebView _commonInitializationWithFrameName:groupName:]): Make a new WebInspectorClient when making the Page.
2007-07-18 Anders Carlsson
Build fix.
* Misc/WebNSAttributedStringExtras.mm:
2007-07-18 Sam Weinig
Rubber-stamped by Adam Roben.
Update after renaming MimeTypeRegistry to MIMETypeRegistry.
* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
* WebCoreSupport/WebFrameBridge.mm:
(-[WebFrameBridge determineObjectFromMIMEType:URL:]):
* WebView/WebDataSource.mm:
(-[WebDataSource _documentFragmentWithArchive:]):
* WebView/WebHTMLRepresentation.mm:
(+[WebHTMLRepresentation supportedNonImageMIMETypes]):
(+[WebHTMLRepresentation supportedImageMIMETypes]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _imageExistsAtPaths:]):
2007-07-18 Tristan O'Tierney
Reviewed by Maciej Stachowiak.
Alt-clicking a link in Safari does not register original URL info with gatekeeper
REGRESSION: A hang occurs when attempting to open a attached file from a .Mac web mail message
* WebCoreSupport/WebFrameLoaderClient.h:
Added a new method, setOriginalURLForDownload, for both download()
and startDownload() to share.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::download):
Moved all the gatekeeper code into setOriginalURLForDownload.
(WebFrameLoaderClient::setOriginalURLForDownload):
Same code that was in download() but moved into a single place for both
startDownload and download to use. Also returned the boolean logic
for detecting _wasUserGesture back to it's previous state, since my prior change
was incorrect. Additionally I found a loop index bug with backListCount and fixed it.
(WebFrameLoaderClient::startDownload):
Calls out to setOriginalURLForDownload after a download is created.
* WebView/WebView.mm:
(-[WebView _downloadURL:]):
Changed to return the WebDownload object created inside _downloadURL
* WebView/WebViewInternal.h:
Changed _downloadURL to return the WebDownload it creates.
2007-07-17 Timothy Hatcher
Reviewed by Geoff.
loadData:MIMEType:textEncodingName:baseURL: doesn't like relative URLs
Get the absoluteURL from any user supplied NSURL before we pass it down to WebCore.
* WebView/WebFrame.mm:
(-[WebFrame _loadURL:referrer:intoChild:]):
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
* WebView/WebView.mm:
(-[WebView userAgentForURL:]):
2007-07-17 Adam Roben
Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
http://bugs.webkit.org/show_bug.cgi?id=14324
Only clients linking against new versions of WebKit will see the item.
I've maintained our behavior for old clients of not including the
Inspect Element item in the menu items passed to the UI delegate.
Reviewed by Tim.
* Misc/WebKitVersionChecks.h: Added a new constant.
* WebCoreSupport/WebContextMenuClient.mm:
(isPreInspectElementTagClient): Added.
(fixMenusToSendToOldClients): Return an array of items that should be
appended to the menu received from the delegate.
(fixMenusReceivedFromOldClients): Append the saved items to the array.
(WebContextMenuClient::getCustomMenuFromDefaultItems): Retain/release
the saved items.
2007-07-17 Adam Roben
Remove WebContextMenuClient::shouldIncludeInspectElementItem
Reviewed by Tim.
* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
2007-07-17 Adam Roben
Initialize Settings::developerExtrasEnabled
Reviewed by Tim.
* WebView/WebView.mm:
(-[WebView _updateWebCoreSettingsFromPreferences:]):
2007-07-17 Geoffrey Garen
Build fix.
* WebView/WebFrame.mm:
(-[WebFrame _loadURL:referrer:intoChild:]):
* WebView/WebFramePrivate.h:
2007-07-17 Tristan O'Tierney
Reviewed by Maciej Stachowiak.
Source of file is misrepresented if downloaded by typing in URL in Safari address bar
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::download):
Revised code to check the initial request's referrer before assuming it has a history to check.
2007-07-16 Brady Eidson
Reviewed by Adam
Begin the arduous task of localizing FTP directory listings while removing a global initializer!
* English.lproj/Localizable.strings:
* WebCoreSupport/WebViewFactory.mm:
(-[WebViewFactory unknownFileSizeText]):
2007-07-16 Adam Roben
Move printing from WebFrameBridge to WebChromeClient
Reviewed by Darin.
* WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::print): Moved code from WebFrameBridge.
* WebCoreSupport/WebFrameBridge.mm: Removed -print.
2007-07-16 Darin Adler
* StringsNotToBeLocalized.txt: Update for recent changes.
2007-07-16 John Sullivan
Reviewed by Kevin Decker and Darin Adler
- fixed Holes in Find banner overlay on PDF pages are left in wrong place after changing scale
* WebView/WebPDFView.mm:
(-[WebPDFView _scaleOrDisplayModeChanged:]):
tell UI delegate that the entire PDF view has been redrawn
2007-07-14 Brady Eidson
Reviewed by Sam Weinig
Initial check-in for - Supporting FTP directory listings in the browser
* WebView/WebPreferenceKeysPrivate.h: Added preference keys for the FTP template location, as well as to force
FTP directory listings, bypassing the policy delegate. This is necessary to test the new feature until browser
policy delegate support is added.
* WebView/WebPreferences.m:
(-[WebPreferences _setFTPDirectoryTemplatePath:]):
(-[WebPreferences _ftpDirectoryTemplatePath]):
(-[WebPreferences _setForceFTPDirectoryListings:]):
(-[WebPreferences _forceFTPDirectoryListings]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _updateWebCoreSettingsFromPreferences:]):
2007-07-13 Anders Carlsson
Reviewed by Maciej.
Assert failure when loading page with multipart resource
Don't try to call the delegate method if the resource object doesn't exist in the
identifier map. When a multipart resource has finished loading one part, it is removed from the
web view identifier map.
This is not an ideal fix, a better fix would be to special-case multipart resources and not remove
them when the first part has finished loading. I've filed to track doing that.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
(WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebFrameLoaderClient::willCacheResponse):
(WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebFrameLoaderClient::dispatchDidFinishLoading):
(WebFrameLoaderClient::dispatchDidFailLoading):
2007-07-13 Timothy Hatcher
Reviewed by Oliver Hunt.
Can't include WebEditingDelegatePrivate.h
* WebView/WebEditingDelegatePrivate.h: Changed the include to be a framework include,
so other projects can use this header.
2007-07-12 Anders Carlsson
Reviewed by Darin and Maciej.
panic after Safari stress test, caused by port leak
Replace uses of -[NSObject performSelector:withObject:afterDelay:] with CFRunLoopTimer. performSelector
causes the target (the WebHTMLView in this case) to be retained until the timer fires. Furthermore, when
running the PLT or iBench, the timers will not fire until the main loop is entered (usually after running all tests).
This means that the timers and ports will not be released until after the test has finished running.
* WebView/WebHTMLView.mm:
(-[WebHTMLViewPrivate dealloc]):
(-[WebHTMLView _cancelUpdateMouseoverTimer]):
(-[WebHTMLView _updateMouseoverWithFakeEvent]):
(-[WebHTMLView _updateMouseoverTimerCallback:]):
(-[WebHTMLView _frameOrBoundsChanged]):
(-[WebHTMLView _updateActiveState]):
(-[WebHTMLView _updateActiveStateTimerCallback:]):
(-[WebHTMLView viewWillMoveToWindow:]):
(-[WebHTMLView viewDidMoveToWindow]):
(-[WebHTMLView mouseDown:]):
(-[WebTextCompleteController dealloc]):
* WebView/WebHTMLViewInternal.h:
2007-07-13 Mark Rowe
Reviewed by Mitz.
Build fix. Stub out WebChromeClient::print.
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::print):
2007-07-11 Timothy Hatcher
Reviewed by Oliver.
WEBVIEW: Drawing artifacts when dragging in IB
Interface Builder 3 is relying on KVO notifications for frameOrigin and frameSize,
among other standard NSView keys. Change automaticallyNotifiesObserversForKey to
return NO only for keys WebView manually fires notifications for.
* WebView/WebView.mm:
(+[WebView automaticallyNotifiesObserversForKey:]): Selectivly return NO for keys we manually fire.
(-[WebView _declaredKeys]): Code clean up.
2007-07-10 Antti Koivisto
Reviewed by John.
Fix
Hang in layout/layoutBlock/layoutBlockChildren preparing to print certain Mail messages
When printing from Mail, WebHTMLView is a subview of the view that is actually printed and does not
receive calls that would set it to printing mode. Method adjustPageHeightNew is called repeatedly (for each page) during
printing and it enables printing mode temporarily for each call. This triggers two full style recalcs and layouts
each time making printing at least O(n^2).
Instead of enabling printing mode and resetting it back immediatly do the resetting asynchronously, after
all adjustPageHeightNew calls are done. Normal Safari printing is not affected as adjustPageHeightNew is only
called in case WebHTMLView is embedded in the view that is being printed.
No automatic test possible, requires printing and non-Safari client.
* WebView/WebHTMLView.mm:
(-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
2007-07-10 Geoffrey Garen
Reviewed by Maciej Stachowiak.
- Fixed REGRESSION(10.4.9-9A377a): REAP Suite
installer shows empty modal alert window (hangs) if user cancels during
"installing shared components" phase
Added Adobe installers to the family of apps that need a data load
loading quirk.
Added a linked-on-or-after check because this code is no longer
Tiger-only.
I tested this code on Tiger and Leopard.
* Misc/WebKitVersionChecks.h:
* WebKit.xcodeproj/project.pbxproj:
* WebView/WebDocumentLoaderMac.mm:
(needsDataLoadWorkaround):
(WebDocumentLoaderMac::setDataSource):
2007-07-10 Darin Adler
- fix build
* WebView/WebHTMLView.mm: Add include of ContextMenu.h.
2007-07-10 Darin Adler
Reviewed by John Sullivan.
- remove workaround for fixed AppKit mouse moved bug
* WebView/WebHTMLView.mm: Put the workaround for bug 3429631 inside an
ifdef BUILDING_ON_TIGER.
2007-07-09 Anders Carlsson
Reviewed by Oliver.
Acrobat 7 / Safari crash: CrashTracer: 99 crashes in Safari at
com.apple.WebCore: WebCore::NetscapePlugInStreamLoader::isDone const + 0
Add a new initWithFrameLoader: method to WebNetscapePluginStream which is to be used when
the stream is a "fake" stream for full frame plug-ins.
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
* Plugins/WebNetscapePluginStream.h:
* Plugins/WebNetscapePluginStream.mm:
(-[WebNetscapePluginStream initWithFrameLoader:]):
(-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
(-[WebNetscapePluginStream start]):
(-[WebNetscapePluginStream cancelLoadWithError:]):
(-[WebNetscapePluginStream stop]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createFrame):
2007-07-09 John Sullivan
Reviewed by Darin
- fixed WebKit should prevent Time Machine from backing up WebKit clients' icon databases
* Misc/WebIconDatabase.mm:
(-[WebIconDatabase init]):
Re-added the code to exclude the icon database from backups. We now do this at the same time we (try to) import
the old icon database format, which happens only once per icon database's lifetime.
(-[WebIconDatabase _importToWebCoreFormat]):
Assert that we haven't imported yet rather than bailing out. It's now the caller's responsibility to check
whether we've imported yet.
2007-07-08 John Sullivan
* Misc/WebIconDatabase.mm:
(-[WebIconDatabase init]):
Removed the code to exclude the icon database from backups. We still want to do this, but in a way
that only runs once ever, instead of once per launch, due to performance concerns.
2007-07-07 Darin Adler