1 2009-03-17 Darin Adler <darin@apple.com>
3 Reviewed by Adele Peterson.
5 Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
6 https://bugs.webkit.org/show_bug.cgi?id=24477
9 * WebView/WebHTMLView.mm:
10 (responderChainRespondsToSelector): Added.
11 (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
12 can find a responder that responds to this selector rather than always assuming
13 the selector will not be handled.
15 2009-03-17 Mark Rowe <mrowe@apple.com>
19 * Plugins/Hosted/HostedNetscapePluginStream.mm:
21 2009-03-17 David Kilzer <ddkilzer@apple.com>
23 Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
25 Reviewed by Darin Adler.
27 WebKit r30323 added -_webcore_MIMEType to fix issues with
28 incorrect MIME types in NS[HTTP]URLResponse objects. However,
29 uses of -[NSURLResponse MIMEType] still persist in WebKit that
30 should be switched to use -_webcore_MIMEType. Note that
31 -[WebDataSource _responseMIMEType] calls back into WebCore to
32 get the MIME type from the ResourceResponse object, which has
33 already retrieved it via -_webcore_MIMEType.
35 * Plugins/Hosted/HostedNetscapePluginStream.mm:
36 (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
38 * Plugins/WebBaseNetscapePluginStream.mm:
39 (WebNetscapePluginStream::didReceiveResponse): Ditto.
40 * Plugins/WebNetscapePluginView.mm:
41 (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
42 * Plugins/WebPluginController.mm:
43 (-[WebPluginController pluginView:receivedResponse:]): Ditto.
44 * WebView/WebHTMLRepresentation.mm:
45 (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
46 -[WebDataSource _responseMIMEType] instead.
47 * WebView/WebPDFRepresentation.m:
48 (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
49 * WebView/WebPDFView.mm:
50 (-[WebPDFView menuForEvent:]): Ditto.
52 2009-03-17 Simon Fraser <simon.fraser@apple.com>
54 Reviewed by Darin Adler
56 https://bugs.webkit.org/show_bug.cgi?id=24396
58 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
62 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
64 Reviewed by Mark Rowe.
66 Get BUILDING_ON_* defines from Platform.h.
68 https://bugs.webkit.org/show_bug.cgi?id=24630
72 2009-03-16 Darin Adler <darin@apple.com>
74 Reviewed by Dan Bernstein.
76 <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
78 * WebCoreSupport/WebViewFactory.mm:
79 (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
80 post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
81 (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
83 2009-03-16 Anders Carlsson <andersca@apple.com>
85 Reviewed by Oliver Hunt.
87 Don't mig_deallocate random data in case an instance proxy method returns false.
89 * Plugins/Hosted/NetscapePluginHostProxy.mm:
96 2009-03-16 Anders Carlsson <andersca@apple.com>
98 Reviewed by Oliver Hunt.
100 <rdar://problem/6633944>
101 REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
103 Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
105 * Plugins/WebPluginController.mm:
106 (-[WebPluginController addPlugin:]):
108 2009-03-16 Anders Carlsson <andersca@apple.com>
110 Reviewed by Sam Weinig.
112 Fix <rdar://problem/6622601>
114 Make sure to update both the window frame and the plug-in frame.
116 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
117 (-[WebHostedNetscapePluginView addWindowObservers]):
119 2009-03-15 Dan Bernstein <mitz@apple.com>
121 Reviewed by Adele Peterson.
123 - fix <rdar://problem/6607773> WebKit should support the "Default"
124 paragraph writing direction -- or at least validate the menu item
127 Made WebHTMLView validate user interface items with the selector
128 -makeBaseWritingDirectionNatural: by returning NO and, if the item is
129 a menu item, setting its state to "off".
131 Strictly speaking, since -makeBaseWritingDirectionNatural: is never
132 valid for WebViews, WebHTMLView should not need to respond to it and
133 validate it, however because other responders respond to all three
134 -makeBaseWritingDirection*: messages and set the menu item state, having
135 WebHTMLView do the same makes application developers' lives easier.
137 * WebView/WebHTMLView.mm:
138 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
139 (-[WebHTMLView makeBaseWritingDirectionNatural:]):
141 2009-03-13 Mark Rowe <mrowe@apple.com>
143 Rubber-stamped by Dan Bernstein.
145 Take advantage of the ability of recent versions of Xcode to easily switch the active
148 * Configurations/DebugRelease.xcconfig:
150 2009-03-13 Anders Carlsson <andersca@apple.com>
152 Reviewed by Kevin Decker and Geoffrey Garen.
154 <rdar://problem/6590384>
155 REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
157 When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call,
158 and thus calling -[WebView hostWindow] will crash since _private is nil.
160 * WebView/WebView.mm:
161 (-[WebView hostWindow]):
163 2009-03-13 Anders Carlsson <andersca@apple.com>
165 And yet another attempt...
167 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
168 (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
169 (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
170 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
172 2009-03-13 Anders Carlsson <andersca@apple.com>
174 Another attempt at fixing the build.
176 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
177 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
179 2009-03-13 Anders Carlsson <andersca@apple.com>
181 Try to fix the SL build.
183 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
184 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
185 (WebNetscapePluginEventHandlerCocoa::keyDown):
187 2009-03-13 Greg Bolsinga <bolsinga@apple.com>
189 Reviewed by Simon Fraser.
191 Update Geolocation perimission dialogs to be asynchronous.
192 https://bugs.webkit.org/show_bug.cgi?id=24505
194 WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
195 coding style set by WebSecurityOrigin.
197 WebChromeClient now calls the private UI delegate method
198 -webView:frame:requestGeolocationPermission:securityOrigin:
200 * WebCoreSupport/WebChromeClient.h:
201 * WebCoreSupport/WebChromeClient.mm:
202 (WebChromeClient::requestGeolocationPermissionForFrame):
203 * WebCoreSupport/WebGeolocation.mm: Added.
205 (-[WebGeolocation shouldClearCache]):
206 (-[WebGeolocation setIsAllowed:]):
207 (-[WebGeolocation dealloc]):
208 * WebCoreSupport/WebGeolocationInternal.h: Added.
209 * WebCoreSupport/WebGeolocationPrivate.h: Added.
210 * WebView/WebUIDelegatePrivate.h:
212 2009-03-13 Anders Carlsson <andersca@apple.com>
214 Reviewed by Dan Bernstein.
216 <rdar://problem/6610666> Revise the Cocoa event model text API
218 Replace the text input API with a simpler API that uses a separate text input window.
220 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
221 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
222 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
223 Initialize m_keyEventHandler to 0.
225 (WebNetscapePluginEventHandlerCocoa::keyDown):
226 If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
228 (WebNetscapePluginEventHandlerCocoa::focusChanged):
229 Install/remove the key event handler as needed.
231 (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
232 Get the text and send a TextInput event.
234 * Plugins/WebNetscapePluginView.h:
235 * Plugins/WebNetscapePluginView.mm:
236 Remove the old text input API.
238 (-[WebNetscapePluginView inputContext]):
239 Always return nil here.
242 * Plugins/nptextinput.h: Removed.
244 2009-03-12 Anders Carlsson <andersca@apple.com>
246 Reviewed by Mike Thole and Mark Rowe.
248 Fix <rdar://problem/6624105>.
250 Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
252 * Plugins/Hosted/NetscapePluginHostProxy.mm:
253 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
255 2009-03-12 Anders Carlsson <andersca@apple.com>
257 Reviewed by Geoffrey Garen.
259 WebKit side of <rdar://problem/6607801>
261 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
262 (WebKit::NetscapePluginInstanceProxy::destroy):
263 Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
265 * Plugins/Hosted/WebKitPluginHost.defs:
266 Add requestID parameter.
268 2009-03-12 Kevin Decker <kdecker@apple.com>
270 Reviewed by Anders Carlsson.
272 * Plugins/WebNetscapePluginPackage.mm:
273 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
275 2009-03-12 Kevin Decker <kdecker@apple.com>
277 Reviewed by Anders Carlsson.
279 Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
281 This fix addresses crashes in both Silverlight and ChemDraw. This type of crash would occur because AppKit still
282 had a reference to open windows that the plugin created (which no longer exist).
284 * Plugins/WebNetscapePluginPackage.mm:
285 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown.
287 2009-03-11 David Kilzer <ddkilzer@apple.com>
289 Remove duplicate header include
291 Rubber-stamped by Mark Rowe.
293 * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
294 Also realphabetized lowercase #include statements.
296 2009-03-11 David Kilzer <ddkilzer@apple.com>
298 Clarify comments regarding order of FEATURE_DEFINES
300 Rubber-stamped by Mark Rowe.
302 * Configurations/WebKit.xcconfig: Added warning about the
303 consequences when FEATURE_DEFINES are not kept in sync.
305 2009-03-11 Anders Carlsson <andersca@apple.com>
307 Reviewed by Sam Weinig.
309 WebKit side of <rdar://problem/6656147>.
311 * Plugins/Hosted/NetscapePluginHostManager.mm:
312 (WebKit::NetscapePluginHostManager::instantiatePlugin):
313 Pass the requestID to _WKPHInstantiatePlugin.
315 * Plugins/Hosted/NetscapePluginHostProxy.mm:
316 Pass the requestID to setCurrentReply.
318 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
319 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
320 Store the reply in a map with the requestID as the key.
322 (WebKit::NetscapePluginInstanceProxy::waitForReply):
323 Wait for a reply that matches the given requestID.
325 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
326 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
327 Initialize member variables.
329 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
332 (WebKit::NetscapePluginInstanceProxy::print):
333 Pass the requestID to _WKPHPluginInstancePrint.
335 (WebKit::NetscapePluginInstanceProxy::loadRequest):
336 Rename m_currentRequestID to m_currentURLRequestID.
338 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
339 Process requests until we find a reply with the right requestID.
341 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
342 Pass a requestID to the _WKPH function.
344 (WebKit::NetscapePluginInstanceProxy::nextRequestID):
347 * Plugins/Hosted/ProxyInstance.mm:
348 Pass a requestID to the _WKPH functions.
350 * Plugins/Hosted/WebKitPluginClient.defs:
351 * Plugins/Hosted/WebKitPluginHost.defs:
352 Add requestID parameters.
354 2009-03-11 Anders Carlsson <andersca@apple.com>
356 Reviewed by Darin Adler.
358 Fix <rdar://problem/6620064>.
360 * Plugins/WebPluginContainerPrivate.h:
362 2009-03-10 Xan Lopez <xlopez@igalia.com>
364 Build fix, no review.
366 * WebView/WebFrame.mm:
367 (-[WebFrame _smartDeleteRangeForProposedRange:]):
369 2009-03-09 Anders Carlsson <andersca@apple.com>
371 Reviewed by Kevin Decker.
373 WebKit side of <rdar://problem/6530007>
375 * Plugins/Hosted/NetscapePluginHostProxy.mm:
377 Call NetscapePluginInstanceProxy::enumerate.
379 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
380 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
381 (WebKit::NetscapePluginInstanceProxy::enumerate):
382 Enumerate the JS object and serialize its values.
384 * Plugins/Hosted/ProxyInstance.h:
385 * Plugins/Hosted/ProxyInstance.mm:
386 (WebKit::ProxyInstance::getPropertyNames):
387 Ask the plug-in host to get the property names and deserialize them.
389 * Plugins/Hosted/WebKitPluginClient.defs:
390 * Plugins/Hosted/WebKitPluginHost.defs:
392 2009-03-09 Simon Fraser <simon.fraser@apple.com>
394 Reviewed by Oliver Hunt and Cameron Zwarich
396 https://bugs.webkit.org/show_bug.cgi?id=24440
398 The sublayer added to WebHTMLView to host accelerated compositing layers needs to
399 be a subclass of NSView which allows context menu clicks through.
401 * WebView/WebHTMLView.mm:
402 (-[WebLayerHostingView rightMouseDown:]):
403 (-[WebHTMLView attachRootLayer:]):
405 2009-03-08 Mark Rowe <mrowe@apple.com>
407 Reviewed by Oliver Hunt.
409 Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
410 Frame.h no longer needs to include it. This cuts the size of the symbols
411 for a debug build by around 3%.
413 * Plugins/WebNetscapePluginView.mm:
414 * WebView/WebFrame.mm:
415 (-[WebFrame _scrollDOMRangeToVisible:]):
416 (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
417 (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
418 * WebView/WebHTMLView.mm:
419 (-[WebHTMLView jumpToSelection:]):
420 (-[WebHTMLView centerSelectionInVisibleArea:]):
422 2009-03-07 Dan Bernstein <mitz@apple.com>
424 Reviewed by Alexey Proskuryakov.
426 - fix a bug where debug builds were clearing the HTML5 application cache
427 on application termination
429 * WebView/WebView.mm:
430 (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
433 2009-03-06 Douglas R. Davidson <ddavidso@apple.com>
435 Reviewed by Justin Garcia.
437 https://bugs.webkit.org/show_bug.cgi?id=24108
439 Update spelling and grammar checking to use the new combined text
440 checking (with automatic language identification) on Snow Leopard.
442 * WebCoreSupport/WebEditorClient.h:
443 * WebCoreSupport/WebEditorClient.mm:
444 (WebEditorClient::checkSpellingAndGrammarOfParagraph):
446 2009-03-05 Adele Peterson <adele@apple.com>
448 Reviewed by Darin Adler.
450 Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
451 <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
452 <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
454 * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
455 If WebKit does not support the command, we need to pass the selector to super. In this case,
456 we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:]
457 can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no
458 example of that happening and causing broken behavior.
460 2009-03-04 Mark Rowe <mrowe@apple.com>
462 Reviewed by Dan Bernstein.
464 <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
466 * WebView/WebHTMLView.mm:
467 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
469 2009-03-04 Adam Barth <abath@webkit.org>
471 Reviewed by Alexey Proskuryakov.
473 https://bugs.webkit.org/show_bug.cgi?id=24356
475 Fix WebKit style for allowUniversalAccessFromFileURLs.
477 * WebView/WebPreferenceKeysPrivate.h:
478 * WebView/WebPreferences.mm:
479 (+[WebPreferences initialize]):
480 (-[WebPreferences allowUniversalAccessFromFileURLs]):
481 (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
482 * WebView/WebPreferencesPrivate.h:
483 * WebView/WebView.mm:
484 (-[WebView _preferencesChangedNotification:]):
486 2009-03-03 David Kilzer <ddkilzer@apple.com>
488 <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
490 Reviewed by Mark Rowe.
492 The fix is to add INSTALLHDRS_COPY_PHASE = YES and
493 INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
494 make sure various build phase scripts work with the installhdrs
497 * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
498 based on PLATFORM_NAME to work around the missing definition on
500 * Configurations/WebKit.xcconfig: Added
501 WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
502 UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
503 Xcode project file. Added INSTALLHDRS_COPY_PHASE = YES and
504 INSTALLHDRS_SCRIPT_PHASE = YES.
506 2009-03-03 David Kilzer <ddkilzer@apple.com>
508 Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
510 Reviewed by Adam Roben.
512 Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
513 since NPAPI headers had migrated from JavaScriptCore to WebCore
516 * Configurations/WebKit.xcconfig: Removed definition of
517 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
519 2009-03-03 Anders Carlsson <andersca@apple.com>
521 Reviewed by Darin Adler.
523 Fix <rdar://problem/6633834>.
525 * Plugins/Hosted/NetscapePluginHostManager.mm:
526 (WebKit::NetscapePluginHostManager::instantiatePlugin):
527 Create a new plug-in instance if the plug-in host has crashed.
529 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
530 (WebKit::NetscapePluginInstanceProxy::invalidate):
531 Add a null check for the plug-in host proxy.
533 2009-03-02 Sam Weinig <sam@webkit.org>
535 Reviewed by Mark Rowe.
537 Enable Geolocation (except on Tiger and Leopard).
539 * Configurations/WebKit.xcconfig:
541 2009-03-02 Anders Carlsson <andersca@apple.com>
543 Reviewed by Dan Bernstein.
545 WebKit part of <rdar://problem/6638658>.
547 * Plugins/Hosted/NetscapePluginHostManager.h:
548 * Plugins/Hosted/NetscapePluginHostManager.mm:
549 (WebKit::NetscapePluginHostManager::createPropertyListFile):
550 Spawn the plug-in host and wait for it to create the property list.
552 * Plugins/WebBasePluginPackage.mm:
553 (-[WebBasePluginPackage createPropertyListFile]):
554 Factor code out into a new method.
556 (-[WebBasePluginPackage pListForPath:createFile:]):
557 Call the newly added createPropertyListFile method.
559 * Plugins/WebNetscapePluginPackage.mm:
560 (-[WebNetscapePluginPackage createPropertyListFile]):
561 Tell the plug-in host manager to create a property list file for us.
563 2009-03-02 Sam Weinig <sam@webkit.org>
565 Reviewed by Geoffrey Garen.
567 Fix for <rdar://problem/6507404> Add Geolocation support.
569 This is not yet turned on for any Mac platform.
571 Add SPI to ask the embedding application whether to allow
572 Geolocation for an origin.
574 * WebCoreSupport/WebChromeClient.h:
575 * WebCoreSupport/WebChromeClient.mm:
576 (WebChromeClient::shouldAllowGeolocationForFrame):
577 * WebView/WebUIDelegatePrivate.h:
579 2009-03-02 Anders Carlsson <andersca@apple.com>
583 * Plugins/WebNetscapePluginPackage.mm:
584 (-[WebNetscapePluginPackage _tryLoad]):
586 2009-03-02 Anders Carlsson <andersca@apple.com>
588 Reviewed by John Sullivan, Ada Chan.
590 Factor loading code out into its own method and get rid of a bunch of gotos.
592 * Plugins/WebNetscapePluginPackage.mm:
593 (-[WebNetscapePluginPackage _tryLoad]):
594 (-[WebNetscapePluginPackage load]):
596 2009-03-02 Anders Carlsson <andersca@apple.com>
600 * Plugins/WebNetscapeDeprecatedFunctions.h:
602 2009-03-02 Anders Carlsson <andersca@apple.com>
604 Reviewed by John Sullivan.
606 Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
608 * Plugins/WebNetscapePluginPackage.m: Removed.
609 * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
611 2009-03-01 Anders Carlsson <andersca@apple.com>
613 Reviewed by Sam Weinig.
615 WebKit side of <rdar://problem/6449689>
617 Pass the visible name to the plug-in host.
619 * Plugins/Hosted/NetscapePluginHostManager.mm:
620 (WebKit::NetscapePluginHostManager::spawnPluginHost):
622 2009-02-27 Alice Liu <alice.liu@apple.com>
624 Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
625 extension to images that already have .jpg extension
627 Reviewed by Oliver Hunt.
629 * WebView/WebHTMLView.mm:
630 (-[NSString matchesExtensionEquivalent:]):
631 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
632 Relax the check for the proper extension to allow for known
633 equivalents, special-cased in matchesExtensionEquivalent function.
635 2009-02-27 Anders Carlsson <andersca@apple.com>
637 Reviewed by Geoffrey Garen.
639 <rdar://problem/6631436>
640 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
642 Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
644 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
645 (WebKit::NetscapePluginInstanceProxy::evaluate):
647 2009-02-27 Anders Carlsson <andersca@apple.com>
649 Reviewed by Geoffrey Garen.
651 WebKit side of <rdar://problem/6626814>.
653 * Plugins/Hosted/NetscapePluginHostProxy.mm:
655 Make InvokeDefault async.
657 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
658 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
659 Handle passing NPObjects back to the plug-in host.
661 * Plugins/Hosted/ProxyInstance.h:
662 (WebKit::ProxyInstance::objectID):
665 * Plugins/Hosted/WebKitPluginClient.defs:
666 Make InvokeDefault a simpleroutine.
668 2009-02-27 Timothy Hatcher <timothy@apple.com>
670 Fixes an exception by null checking the WebResource before adding it to
671 the subresources array.
673 <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
675 Reviewed by Geoff Garen and Anders Carlsson.
677 * WebView/WebDataSource.mm:
678 (-[WebDataSource subresources]): Null check the WebResource before adding it.
680 2009-02-27 Timothy Hatcher <timothy@apple.com>
682 Adds a workaround for Automator creating a WebView from a secondary thread.
684 <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
685 secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
687 Reviewed by Geoff Garen.
689 * WebView/WebView.mm:
690 (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
692 2009-02-27 Adam Barth <abarth@webkit.org>
694 Reviewed by Eric Seidel.
696 Add a preference to reduce the power of file:// URLs.
698 * WebView/WebPreferenceKeysPrivate.h:
699 * WebView/WebPreferences.mm:
700 (+[WebPreferences initialize]):
701 (-[WebPreferences allowUniversalAccessFromFileUrls]):
702 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
703 * WebView/WebPreferencesPrivate.h:
704 * WebView/WebView.mm:
705 (-[WebView _preferencesChangedNotification:]):
707 2009-02-27 Simon Fraser <simon.fraser@apple.com>
709 Reviewed by Anders Carlsson
711 https://bugs.webkit.org/show_bug.cgi?id=24242
713 setCursor(), and resetCursorRects() on Tiger, were using global, not local
714 coordinates for elementAtPoint:
716 * WebView/WebHTMLView.mm:
720 2009-02-27 Adam Barth <abarth@webkit.org>
722 Reviewed by Eric Seidel.
724 Add a preference to reduce the power of file:// URLs.
726 * WebView/WebPreferenceKeysPrivate.h:
727 * WebView/WebPreferences.mm:
728 (+[WebPreferences initialize]):
729 (-[WebPreferences allowUniversalAccessFromFileUrls]):
730 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
731 * WebView/WebPreferencesPrivate.h:
732 * WebView/WebView.mm:
733 (-[WebView _preferencesChangedNotification:]):
735 2009-02-26 Adele Peterson <adele@apple.com>
737 Reviewed by Geoff Garen.
739 Fix for <rdar://problem/6618166>
740 https://bugs.webkit.org/show_bug.cgi?id=24216
741 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
743 During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
744 we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
745 This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
747 In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
748 fixed in r36919 and r38570 are still fixed.
750 * WebView/WebHTMLView.mm:
751 (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
752 (-[WebHTMLView _isResigningFirstResponder]): Added.
753 * WebView/WebHTMLViewInternal.h:
754 * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
755 if the document view is currently resigning first responder.
757 2009-02-25 Anders Carlsson <andersca@apple.com>
759 Reviewed by Kevin Decker.
761 Fix <rdar://problem/6623697>.
763 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
764 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
765 (WebKit::NetscapePluginInstanceProxy::print):
766 Ask the plug-in host to print, create a CGImage of the returned bytes and draw
767 the image into the passed in context.
769 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
770 (-[WebHostedNetscapePluginView drawRect:]):
771 When printing, call NetscapePluginInstanceProxy::print.
773 * Plugins/Hosted/WebKitPluginHost.defs:
775 2009-02-19 Alexey Proskuryakov <ap@webkit.org>
777 Reviewed by Darin Adler.
779 https://bugs.webkit.org/show_bug.cgi?id=24024
780 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
781 archiving a submission to about:blank
783 I don't know how to make an automated test for this bug.
785 * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
786 Account for the fact that HTTP method may be non-empty for non-HTTP requests.
788 2009-02-25 Chris Fleizach <cfleizach@apple.com>
790 Reviewed by Beth Dakin.
793 Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
794 https://bugs.webkit.org/show_bug.cgi?id=24143
796 * WebView/WebFrame.mm:
797 (-[WebFrame _accessibilityTree]):
799 2009-02-25 Simon Fraser <simon.fraser@apple.com>
801 Build fix with ACCELERATED_COMPOSITING turned on.
803 I missed a spot in my last commit in renaming to
804 _stoppedAcceleratedCompositingForFrame:
806 * WebView/WebHTMLView.mm:
807 (-[WebHTMLView close]):
809 2009-02-25 Simon Fraser <simon.fraser@apple.com>
811 Reviewed by Dan Bernstein
813 https://bugs.webkit.org/show_bug.cgi?id=23854
815 Make an observable property, _isUsingAcceleratedCompositing, on
816 WebView that DumpRenderTree can use to specialize behavior.
818 This is implemented via a count of Frames that are using
819 accelerated compositing.
821 * WebView/WebHTMLView.mm:
822 (-[WebHTMLViewPrivate clear]):
823 (-[WebHTMLView close]):
824 (-[WebHTMLView attachRootLayer:]):
825 (-[WebHTMLView detachRootLayer]):
826 * WebView/WebView.mm:
827 (+[WebView automaticallyNotifiesObserversForKey:]):
828 (-[WebView _startedAcceleratedCompositingForFrame:]):
829 (-[WebView _stoppedAcceleratedCompositingForFrame:]):
830 (-[WebView _isUsingAcceleratedCompositing]):
831 * WebView/WebViewInternal.h:
832 * WebView/WebViewPrivate.h:
834 2009-02-24 Sam Weinig <sam@webkit.org>
836 Reviewed by Geoffrey Garen.
838 Related to <rdar://problem/6590295>
839 Allow disabling javascript: urls.
841 * WebView/WebView.mm:
842 (-[WebView _setJavaScriptURLsAreAllowed:]):
843 * WebView/WebViewPrivate.h:
845 2009-02-24 Mark Rowe <mrowe@apple.com>
847 Reviewed by Oliver Hunt.
849 <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
851 * Carbon/CarbonUtils.h:
852 * Carbon/HIWebView.h:
853 * Plugins/WebPlugin.h:
854 * Plugins/WebPluginViewFactory.h:
855 * WebView/WebUIDelegate.h:
857 2009-02-24 Peter Ammon <pammon@apple.com>
859 Reviewed by Mark Rowe.
861 Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
863 * WebView/WebHTMLView.mm:
864 (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
865 both the send and return type. We should also handle a nil send or return type by ignoring
866 the argument and returning whether we can handle the other type passed in.
868 2009-02-23 Anders Carlsson <andersca@apple.com>
870 Reviewed by Geoffrey Garen and Darin Adler.
872 WebKit side of <rdar://problem/6613151>.
874 Make sure to vm_deallocate all memory we get from MIG callbacks.
876 * Plugins/Hosted/NetscapePluginHostProxy.mm:
877 (DataDeallocator::DataDeallocator):
878 (DataDeallocator::~DataDeallocator):
879 Add a simple deallocator class.
883 (WKPCBooleanAndDataReply):
885 (WKPCGetStringIdentifier):
890 Use the new deallocator class.
892 2009-02-23 Anders Carlsson <andersca@apple.com>
894 Reviewed by Darin Adler.
896 Fix <rdar://problem/6450656>.
898 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
899 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
900 (WebKit::NetscapePluginInstanceProxy::insertText):
901 Add insert text which just calls the new WKPH function.
903 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
904 (-[WebHostedNetscapePluginView inputContext]):
905 Get the input context from the shared input panel.
907 (-[WebHostedNetscapePluginView keyDown:]):
908 Let the shared input panel have a go at the event first.
910 * Plugins/Hosted/WebKitPluginHost.defs:
911 Add new InsertText function.
913 2009-02-23 Mark Rowe <mrowe@apple.com>
915 Fix the build after r41126.
917 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
918 (WebKit::NetscapePluginInstanceProxy::invoke):
919 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
920 (WebKit::NetscapePluginInstanceProxy::construct):
922 2009-02-22 Dan Bernstein <mitz@apple.com>
924 Reviewed by Darin Adler.
926 - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
928 * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
929 in r30741, and assign the height value, rather than the width, to the
932 2009-02-21 Anders Carlsson <andersca@apple.com>
936 * Plugins/Hosted/WebTextInputWindowController.m:
938 2009-02-20 Anders Carlsson <andersca@apple.com>
940 Reviewed by Dan Bernstein.
942 Add a shared floating text input window implementation, to be used by the hosted plug-in view.
944 * Plugins/Hosted/WebTextInputWindowController.h: Added.
945 * Plugins/Hosted/WebTextInputWindowController.m: Added.
947 2009-02-20 Kevin Decker <kdecker@apple.com>
949 Reviewed by andersca.
951 <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
953 Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
954 we are trying to set. Depending on what other I/O is going on, it can take some time.
956 * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
957 (setMetaData): Added. Calls WKSetMetadataURL().
958 (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
960 2009-02-19 Dan Bernstein <mitz@apple.com>
962 Reviewed by Sam Weinig.
964 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
965 Do not send loader callbacks during CSS styling
967 * WebView/WebView.mm:
968 (-[WebView _preferencesChangedNotification:]): Reverted the
969 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
971 2009-02-18 Dan Bernstein <mitz@apple.com>
973 Reviewed by Brady Eidson.
975 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
977 * WebView/WebView.mm:
978 (-[WebView _preferencesChangedNotification:]): Activate the WebCore
979 workaround for this crash in iChat.
981 2009-02-18 Anders Carlsson <andersca@apple.com>
983 Reviewed by Sam Weinig.
985 Fix for <rdar://problem/6542390>
987 There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
988 would cause a load to begin.
990 * Plugins/WebNetscapePluginView.mm:
991 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
993 2009-02-18 Adam Roben <aroben@apple.com>
995 Add SPI to get WebKit's custom pointing-hand cursor
997 Reviewed by John Sullivan.
999 * WebView/WebView.mm:
1000 (+[WebView _pointingHandCursor]): Added. Returns the custom
1001 pointing-hand cursor that WebKit uses.
1002 * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
1004 2009-02-17 Eric Carlson <eric.carlson@apple.com>
1006 Reviewed by Antti Koivisto.
1008 https://bugs.webkit.org/show_bug.cgi?id=23917
1009 Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
1012 * Plugins/WebPluginContainerPrivate.h:
1013 * Plugins/WebPluginController.mm:
1014 (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
1015 (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
1016 (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
1018 * WebCoreSupport/WebFrameLoaderClient.mm:
1019 (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
1020 file extension, only want a match for the new MIME type proxy plug-ins should have.
1022 2009-02-13 Anders Carlsson <andersca@apple.com>
1024 Reviewed by Kevin Decker.
1026 <rdar://problem/6584834> ESPN radio live stream link hangs Safari
1028 When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
1029 defer destruction until we're done executing the script.
1031 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1032 (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
1033 (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
1034 Add a simple RAII object for deferring destruction of the plug-in instance.
1038 (WKPCInvokeDefault):
1042 (WKPCRemoveProperty):
1045 Use the PluginDestroyDeferrer.
1047 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1048 (WebKit::NetscapePluginInstanceProxy::pluginID):
1049 Assert that the plug-in ID is not 0 here.
1051 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1052 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
1053 Initialize the call depth.
1055 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
1056 Set the plug-in ID to 0 to aid debugging.
1058 (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
1059 Increment the call depth.
1061 (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
1062 Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
1064 (WebKit::NetscapePluginInstanceProxy::shouldStop):
1065 If we're called this with a non-zero call depth, set shouldStopSoon to true.
1067 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1068 (-[WebHostedNetscapePluginView shouldStop]):
1071 2009-02-12 Brady Eidson <beidson@apple.com>
1073 Reviewed by Kevin Decker
1075 <rdar://problem/6582180> - Wrong HTTP method applied to history item.
1077 * WebCoreSupport/WebFrameLoaderClient.mm:
1078 (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
1081 2009-02-12 Anders Carlsson <andersca@apple.com>
1083 Reviewed by Kevin Decker.
1085 <rdar://problem/6579412>
1086 REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
1088 * Plugins/WebNetscapePluginView.h:
1089 * Plugins/WebNetscapePluginView.mm:
1090 (-[WebNetscapePluginView userAgent]):
1091 Apply workaround for Silverlight workaround.
1093 (-[WebNetscapePluginView _createPlugin]):
1094 Check if the plug-in that we're creating is the silverlight plug-in.
1096 2009-02-12 Brady Eidson <beidson@apple.com>
1098 Reviewed by Darin Adler
1100 Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
1102 * History/WebBackForwardList.mm:
1103 (-[WebBackForwardList dealloc]): Null check before deref()'ing.
1104 (-[WebBackForwardList finalize]): Ditto.
1106 * Misc/WebIconFetcher.mm:
1107 (-[WebIconFetcher dealloc]): Null check before deref()'ing.
1108 (-[WebIconFetcher finalize]): Ditto.
1110 * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
1111 (-[WebEditCommand initWithEditCommand:]):
1112 (-[WebEditCommand dealloc]):
1113 (-[WebEditCommand finalize]):
1114 (-[WebEditCommand command]):
1116 * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
1117 (-[WebArchivePrivate init]):
1118 (-[WebArchivePrivate initWithCoreArchive:]):
1119 (-[WebArchivePrivate coreArchive]):
1120 (-[WebArchivePrivate setCoreArchive:]):
1121 (-[WebArchivePrivate dealloc]):
1122 (-[WebArchivePrivate finalize]):
1124 * WebView/WebDataSource.mm:
1125 (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
1126 (-[WebDataSourcePrivate finalize]): Ditto.
1128 2009-02-12 Brady Eidson <beidson@apple.com>
1130 Reviewed by Kevin Decker
1132 <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
1134 NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
1135 fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
1136 WebArchive object, things started getting weird.
1138 * WebView/WebArchive.mm:
1139 (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
1140 (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
1141 (-[WebArchivePrivate finalize]): Ditto
1142 (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
1144 2009-02-11 Mark Rowe <mrowe@apple.com>
1148 * History/WebHistory.mm:
1149 (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
1151 2009-02-11 Brady Eidson <beidson@apple.com>
1153 Reviewed by Mark Rowe
1155 <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
1157 Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
1158 and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
1159 which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
1161 * History/WebHistory.mm:
1162 (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
1163 (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
1164 if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
1165 recent entry for a given URL will be used.
1166 (-[WebHistoryPrivate addItems:]):
1167 (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
1169 2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
1171 Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
1172 This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
1174 Reviewed by Timothy Hatcher.
1176 * WebCoreSupport/WebInspectorClient.h:
1177 * WebCoreSupport/WebInspectorClient.mm:
1178 (WebInspectorClient::hiddenPanels):
1180 2009-02-11 Alexey Proskuryakov <ap@webkit.org>
1182 Reviewed by Darin Adler.
1184 <rdar://problem/6562920> Pasted text should be normalized to NFC
1186 * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
1187 -[NSString precomposedStringWithCanonicalMapping].
1189 * WebCoreSupport/WebPasteboardHelper.mm:
1190 (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
1192 * WebView/WebHTMLView.mm:
1193 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
1194 Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
1195 precomposed already, and the conversion is performed outside WebKit for those anyway.
1197 2009-02-10 John Sullivan <sullivan@apple.com>
1199 Reviewed by Dan Bernstein
1201 <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
1202 Negative visit counts stored in History.plist aren't corrected.
1204 It's not clear how a huge negative visit count ended up in History.plist, but we can't
1205 trust data read from disk so we can at least reset this to something sane. WebCore has
1206 no guard against a visit count overflowing an int, but that seems very unlikely to have
1209 * History/WebHistoryItem.mm:
1210 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1211 If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
1212 weekly visit count is in the dictionary, replace it with 0.
1214 2009-02-10 John Sullivan <sullivan@apple.com>
1216 Reviewed by Dan Bernstein
1218 <https://bugs.webkit.org/show_bug.cgi?id=23891>
1219 [WebHistoryItem _setVisitCount:] is unused and should be removed
1221 * History/WebHistoryItem.mm:
1222 (-[WebHistoryItem _setVisitCount:]):
1223 removed this unused method, which is a synonym for setVisitCount: that was introduced
1224 recently and abandoned even more recently
1226 * History/WebHistoryItemInternal.h:
1227 removed declaration of _setVisitCount:
1229 2009-02-10 Anders Carlsson <andersca@apple.com>
1231 Reviewed by Mark Rowe.
1233 <rdar://problem/6573916>
1234 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
1236 * Plugins/Hosted/NetscapePluginHostManager.mm:
1237 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1238 If we failed to instantiate the plug-in, invalidate the instance proxy.
1240 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1241 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1242 (WebKit::NetscapePluginInstanceProxy::invalidate):
1243 Remove the instance from the plug-in host's set.
1245 (WebKit::NetscapePluginInstanceProxy::destroy):
1248 2009-02-09 Mark Rowe <mrowe@apple.com>
1250 Reviewed by Dan Bernstein.
1252 Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
1253 Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
1255 * WebView/WebHTMLView.mm:
1256 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
1257 yet been initialized if this WebHTMLView was loaded from a nib.
1258 (-[WebHTMLView _removeSuperviewObservers]): Ditto.
1260 2009-02-09 Eric Seidel <eric@webkit.org>
1262 Reviewed by Dave Hyatt.
1264 Rename Selection to VisibleSelection to allow us to separate
1265 the selections the user works with from the ones used by
1266 the JS editing APIs.
1267 https://bugs.webkit.org/show_bug.cgi?id=23852
1269 * WebView/WebFrame.mm:
1270 (-[WebFrame _selectNSRange:]):
1271 * WebView/WebView.mm:
1272 (-[WebView textIteratorForRect:]):
1274 2009-02-06 Anders Carlsson <andersca@apple.com>
1276 Reviewed by Kevin Decker.
1278 Fix crash when plug-in host dies.
1280 * Plugins/Hosted/HostedNetscapePluginStream.mm:
1281 (WebKit::HostedNetscapePluginStream::didFail):
1283 2009-02-05 Eric Seidel <eric@webkit.org>
1285 Reviewed by Justin Garcia.
1287 DOMSelection.getRangeAt() returns a different range than the selection
1288 https://bugs.webkit.org/show_bug.cgi?id=23601
1290 Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
1292 * WebView/WebFrame.mm:
1293 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1294 (-[WebFrame _markDOMRange]):
1295 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
1296 (-[WebFrame _selectedNSRange]):
1297 * WebView/WebHTMLView.mm:
1298 (-[WebHTMLView _selectedRange]):
1299 (-[WebTextCompleteController doCompletion]):
1300 (-[WebHTMLView selectedAttributedString]):
1301 * WebView/WebView.mm:
1302 (-[WebView textIteratorForRect:]):
1303 (-[WebView selectedDOMRange]):
1305 2009-02-06 Geoffrey Garen <ggaren@apple.com>
1307 Reviewed by Sam Weinig.
1309 Part III of <rdar://problem/6552272>.
1311 Refactored to use the redirect data WebCore makes available, instead of
1312 tracking loading state in WebKit.
1314 * History/WebHistory.mm:
1315 (-[WebHistoryPrivate dealloc]):
1316 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
1317 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
1318 * History/WebHistoryInternal.h:
1319 * WebCoreSupport/WebFrameLoaderClient.h:
1320 * WebCoreSupport/WebFrameLoaderClient.mm:
1321 (WebFrameLoaderClient::updateGlobalHistory):
1322 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1324 2009-02-06 Anders Carlsson <andersca@apple.com>
1326 Reviewed by Sam Weinig.
1328 <rdar://problem/6562220>
1329 CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
1331 Make the handling of crashes in the plug-in host more robust.
1333 * Plugins/Hosted/NetscapePluginHostProxy.h:
1336 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1337 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1338 Initialize m_portSet.
1340 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
1343 (WebKit::NetscapePluginHostProxy::processRequests):
1344 Listen for messages on the port set. If we get a message to the port death notification port,
1345 then call pluginHostDied. Otherwise, process the message.
1347 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1348 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1349 (WebKit::NetscapePluginInstanceProxy::cleanup):
1350 Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
1352 (WebKit::NetscapePluginInstanceProxy::destroy):
1355 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
1358 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1359 Call NetscapePluginHostProxy::processRequests.
1361 * Plugins/Hosted/ProxyInstance.mm:
1362 (WebKit::ProxyInstance::invalidate):
1363 Add a null check for the host proxy.
1365 2009-02-06 Dan Bernstein <mitz@apple.com>
1367 - try to fix the Tiger build
1369 * Misc/WebNSArrayExtras.h:
1371 2009-02-06 Anders Carlsson <andersca@apple.com>
1373 Reviewed by Dan Bernstein.
1375 <rdar://problem/6563650>
1376 Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
1378 * Plugins/WebNetscapePluginView.mm:
1379 (-[WebNetscapePluginView loadStream]):
1380 (-[WebNetscapePluginView pluginView:receivedData:]):
1381 (-[WebNetscapePluginView _shouldCancelSrcStream]):
1383 2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com>
1385 Reviewed by Dan Bernstein and Geoff Garen.
1387 - WebKit code to track per-day and per-week visit counts in history
1389 For now this data is only exposed via SPI for performance reasons.
1391 * History/WebHistoryItem.mm:
1392 (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
1394 (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
1395 (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
1396 (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
1397 (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
1398 * History/WebHistoryItemInternal.h: Declare new methods.
1399 * History/WebHistoryItemPrivate.h: Ditto.
1401 * History/WebHistory.mm:
1402 (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
1403 the new _recordInitialVisit method instead of setting visit count to 1.
1405 * Misc/WebNSArrayExtras.h:
1406 * Misc/WebNSArrayExtras.m:
1407 (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
1408 (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
1410 2009-02-05 Aaron Boodman <aa@chromium.org>
1412 Reviewed by Dave Hyatt.
1414 https://bugs.webkit.org/show_bug.cgi?id=23708
1415 Adds documentElementAvailable() callback to FrameLoaderClient.
1417 * WebCoreSupport/WebFrameLoaderClient.h:
1418 Stub out documentElementAvailable().
1419 * WebCoreSupport/WebFrameLoaderClient.mm:
1422 2009-02-05 Dan Bernstein <mitz@apple.com>
1426 * WebView/WebScriptDebugger.mm:
1427 (WebScriptDebugger::initGlobalCallFrame):
1429 2009-02-05 Beth Dakin <bdakin@apple.com>
1431 Reviewed by John Sullivan and Brady Eidson.
1433 Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a
1434 mail note message doesn't display it in Mail's preview pane
1436 This was failing because revision 36962 removed a version of
1437 setVerticalScrollingMode that mail calls. This patch simply adds
1440 * WebView/WebDynamicScrollBarsView.m:
1441 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
1443 2009-02-04 Anders Carlsson <andersca@apple.com>
1447 * WebView/WebScriptDebugger.mm:
1448 (WebScriptDebugger::initGlobalCallFrame):
1450 2009-02-04 Anders Carlsson <andersca@apple.com>
1452 Reviewed by Sam Weinig.
1454 Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
1456 Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
1458 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1464 * Plugins/Hosted/WebKitPluginClient.defs:
1465 * Plugins/Hosted/WebKitPluginHost.defs:
1467 2009-02-04 Anders Carlsson <andersca@apple.com>
1469 Reviewed by Mark Rowe.
1473 * WebView/WebScriptDebugger.mm:
1474 (WebScriptDebugger::initGlobalCallFrame):
1476 2009-02-04 Geoffrey Garen <ggaren@apple.com>
1478 Reviewed by Mark Rowe.
1480 Part I of <rdar://problem/6552272>.
1482 Clear the redirectURLs entry when first visiting a site, so sites that
1483 only redirect you the first time you visit them can later learn that
1484 they don't redirect.
1486 * History/WebHistory.mm:
1487 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1489 2009-02-04 Timothy Hatcher <timothy@apple.com>
1491 Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
1493 <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
1495 Reviewed by Oliver Hunt.
1497 * WebView/WebScriptDebugDelegate.h:
1499 2009-02-04 Timothy Hatcher <timothy@apple.com>
1501 Switched over from using the WebSafeForwarder for the Script Debug
1502 delegate and added high performance CallScriptDebugDelegate functions.
1504 <rdar://problem/6508457> Launching widget in Dashcode debugger is
1505 super-slow due forwardInvocation: calling debug delegate
1507 Reviewed by Oliver Hunt.
1509 * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
1510 * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
1511 * WebView/WebScriptDebugger.mm:
1512 (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
1513 (WebScriptDebugger::sourceParsed): Ditto.
1514 (WebScriptDebugger::callEvent): Ditto.
1515 (WebScriptDebugger::atStatement): Ditto.
1516 (WebScriptDebugger::returnEvent): Ditto.
1517 (WebScriptDebugger::exception): Ditto.
1518 * WebView/WebView.mm:
1519 (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
1520 (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
1521 method implementations for the script debug delegate. Also caches what
1522 didParseSource method to use.
1523 (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
1524 WebScriptDebugDelegateImplementations structure.
1525 (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
1526 (CallDelegate): Added more overloaded versions that take different arguments.
1527 (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
1528 * WebView/WebViewInternal.h:
1530 2009-02-03 Simon Fraser <simon.fraser@apple.com>
1532 Reviewed by Dave Hyatt
1534 https://bugs.webkit.org/show_bug.cgi?id=23365
1536 Hook up accelerated compositing layers the native
1539 * WebCoreSupport/WebChromeClient.h:
1540 * WebCoreSupport/WebChromeClient.mm:
1541 (WebChromeClient::attachRootGraphicsLayer):
1542 (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1543 New methods to hook up the root GraphicsLayer to the native
1544 view system, and to synchronize layer changes with view-based
1545 drawing when layers come and go.
1547 * WebView/WebHTMLView.mm:
1548 (-[WebHTMLViewPrivate clear]):
1549 Clear the pointer to layerHostingView.
1551 (-[WebHTMLView _setAsideSubviews]):
1552 (-[WebHTMLView willRemoveSubview:]):
1553 Keep the special layer-hosting view in the subviews even
1554 when the rest of the subviews are ripped out for
1557 (-[WebHTMLView _isUsingAcceleratedCompositing]):
1558 New utility method for DumpRenderTree to know if we're
1561 (-[WebHTMLView drawRect:]):
1562 Call -disableScreenUpdatesUntilFlush if we have to
1563 synchronize layer changes with painting.
1565 (-[WebHTMLView attachRootLayer:]):
1566 (-[WebHTMLView detachRootLayer]):
1567 Attach and detach the root GraphicsLayer.
1569 * WebView/WebViewInternal.h:
1570 * WebView/WebHTMLViewInternal.h:
1571 * WebView/WebHTMLViewPrivate.h:
1572 New method declarations.
1574 * WebView/WebView.mm:
1575 (-[WebView _needsOneShotDrawingSynchronization]):
1576 (-[WebView _setNeedsOneShotDrawingSynchronization:]):
1577 Set the flag to say if we need to synchronize layer
1578 changes and painting on the next -drawRect: call.
1580 (-[WebView viewWillMoveToWindow:]):
1581 (-[WebView viewDidMoveToWindow]):
1582 Call new notifications that the view was added to or removed from
1583 the window, which are required by the layer hosting mechanism.
1585 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1589 * Plugins/WebPluginController.mm:
1590 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
1592 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1594 Reviewed by Sam Weinig.
1596 Track redirects in global history.
1598 * History/WebHistory.mm:
1599 (-[WebHistoryPrivate dealloc]):
1600 (-[WebHistoryPrivate lastVisitedEntry]):
1601 (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
1602 entry in case we're asked to add redirect information to it later.
1604 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1605 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
1606 information in global history.
1608 * History/WebHistoryInternal.h:
1609 * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
1611 * WebCoreSupport/WebFrameLoaderClient.mm:
1612 (WebFrameLoaderClient::updateGlobalHistory):
1613 (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
1614 information in global history.
1616 * WebView/WebFrame.mm:
1617 (-[WebFrame loadRequest:]):
1618 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1619 * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
1621 2009-02-02 Anders Carlsson <andersca@apple.com>
1623 Reviewed by Dan Bernstein.
1625 Work around a limitation in MIG where two functions can't have the same name even if they're
1626 not in the same subsystem.
1628 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1629 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1630 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1631 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1632 * Plugins/Hosted/WebKitPluginClient.defs:
1633 * Plugins/Hosted/WebKitPluginHost.defs:
1635 2009-02-02 Anders Carlsson <andersca@apple.com>
1637 Reviewed by Sam Weinig.
1639 Implement WKPCGetPluginElementObject.
1641 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1642 (WKPCGetPluginElementNPObject):
1643 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1644 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1645 (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1646 * Plugins/Hosted/WebKitPluginClient.defs:
1647 * Plugins/WebBaseNetscapePluginView.h:
1648 * Plugins/WebBaseNetscapePluginView.mm:
1649 (-[WebBaseNetscapePluginView WebCore::]):
1651 2009-02-02 Anders Carlsson <andersca@apple.com>
1655 * WebView/WebHTMLView.mm:
1657 2009-02-02 Anders Carlsson <andersca@apple.com>
1659 Reviewed by Dan Bernstein.
1661 Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
1663 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1664 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1665 (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1666 * Plugins/WebBaseNetscapePluginView.h:
1667 * Plugins/WebBaseNetscapePluginView.mm:
1668 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1669 (-[WebBaseNetscapePluginView _windowClipRect]):
1670 (-[WebBaseNetscapePluginView visibleRect]):
1671 (-[WebBaseNetscapePluginView dataSource]):
1672 * Plugins/WebKitPluginContainerView.h: Removed.
1673 * Plugins/WebKitPluginContainerView.mm: Removed.
1674 * Plugins/WebNetscapePluginView.h:
1675 * Plugins/WebNetscapePluginView.mm:
1676 (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1677 (-[WebNetscapePluginView getVariable:value:]):
1678 * WebCoreSupport/WebFrameLoaderClient.mm:
1679 (WebFrameLoaderClient::createPlugin):
1681 2009-02-02 Anders Carlsson <andersca@apple.com>
1683 Reviewed by Dan Bernstein.
1685 Update for changes to WebCore.
1687 * WebCoreSupport/WebFrameLoaderClient.h:
1688 * WebCoreSupport/WebFrameLoaderClient.mm:
1689 (WebFrameLoaderClient::createPlugin):
1691 2009-02-02 Anders Carlsson <andersca@apple.com>
1693 Reviewed by Oliver Hunt.
1695 When a new Web View was not created, report back to the plug-in host.
1697 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1698 (WebKit::NetscapePluginInstanceProxy::performRequest):
1699 * Plugins/Hosted/WebKitPluginHost.defs:
1701 2009-02-02 Anders Carlsson <andersca@apple.com>
1703 Reviewed by Kevin Decker.
1705 Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
1707 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1708 (-[WebHostedNetscapePluginView drawRect:]):
1710 2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org>
1712 Reviewed by Darin Adler.
1714 Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
1716 https://bugs.webkit.org/show_bug.cgi?id=23428
1718 FrameView::forceLayout could be killed but the comment might
1719 contain a value over the the plain FrameView::layout...
1721 Adjust the WebCore/WebKit consumers of these methods.
1723 * WebView/WebFrame.mm:
1724 (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1725 * WebView/WebHTMLView.mm:
1726 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1727 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
1729 2009-01-31 John Sullivan <sullivan@apple.com>
1731 https://bugs.webkit.org/show_bug.cgi?id=23665
1733 Cleaned up code to add/remove NSNotification observers, to avoid performance hit
1734 of calling removeObserver with unspecified notifications, or calling removeObserver
1735 multiple times for the same notification.
1737 Reviewed by Darin Adler
1739 * WebView/WebHTMLView.mm:
1740 added observingMouseMovedNotifications, observingSuperviewNotifications, and
1741 observingWindowNotifications as BOOL ivars of _private object
1742 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
1743 moved to file-internal section of file, added leading underscore, now bails out
1744 if we aren't observing the relevant notifications, now records that we are no longer
1745 observing the relevant notifications
1746 (-[WebHTMLView _removeSuperviewObservers]):
1747 ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
1748 (-[WebHTMLView _removeWindowObservers]):
1750 (-[WebHTMLView close]):
1751 replace general removeObserver: call with three specific calls for all the notifications
1752 that this class actually observes
1753 (-[WebHTMLView addMouseMovedObserver]):
1754 bail out if already observing relevant notifications, now records that we are observing
1755 the relevant notifications
1756 (-[WebHTMLView removeMouseMovedObserver]):
1757 updated for name change
1758 (-[WebHTMLView addSuperviewObservers]):
1759 bail out if already observing relevant notifications, now records that we are observing
1760 the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var
1761 to avoid objc dispatch
1762 (-[WebHTMLView addWindowObservers]):
1764 (-[WebHTMLView viewWillMoveToSuperview:]):
1765 updated for name change
1766 (-[WebHTMLView viewWillMoveToWindow:]):
1767 updated for name changes
1769 2009-01-31 Darin Adler <darin@apple.com>
1771 Reviewed by Mark Rowe.
1773 Fix code that assumes all command selectors end in colons.
1774 rdar://problem/6545874
1776 * WebView/WebHTMLView.mm:
1777 (commandNameForSelector): Don't assert, just return a null string, when
1778 the selector doesn't end in a colon.
1780 2009-01-30 Adam Barth <abarth@webkit.org>
1782 Reviewed by Sam Weinig.
1784 Add a pref to disable web security.
1786 * WebView/WebPreferenceKeysPrivate.h:
1787 * WebView/WebPreferencesPrivate.h:
1788 * WebView/WebPreferences.mm:
1789 (+[WebPreferences initialize]):
1790 (-[WebPreferences isWebSecurityEnabled]):
1791 (-[WebPreferences setWebSecurityEnabled:]):
1792 * WebView/WebView.mm:
1793 (-[WebView _preferencesChangedNotification:]):
1795 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1797 Reviewed by Darin Adler.
1799 Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
1801 Carry out the move and catch up in two call sites.
1803 * WebView/WebHTMLView.mm:
1804 (-[WebHTMLView _frameOrBoundsChanged]):
1806 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1808 Reviewed by Darin Adler.
1810 isFrameSet was moved from Frame to Document. Update the
1813 * WebView/WebFrame.mm:
1814 (-[WebFrame _isFrameSet]):
1815 * WebView/WebHTMLView.mm:
1816 (-[WebHTMLView knowsPageRange:]):
1818 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1822 * WebView/WebFramePrivate.h:
1824 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1826 Reviewed by Sam Weinig.
1828 Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
1829 preparation for setting them differently during a redirect.
1831 * WebView/WebPDFView.mm:
1832 (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1834 2009-01-30 Anders Carlsson <andersca@apple.com>
1836 Reviewed by Sam Weinig.
1838 Fix <rdar://problem/6544048>
1840 Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
1842 When the plug-in instance is destroyed, invalidate all proxy instances.
1844 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1845 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1846 (WebKit::NetscapePluginInstanceProxy::destroy):
1847 (WebKit::NetscapePluginInstanceProxy::addInstance):
1848 (WebKit::NetscapePluginInstanceProxy::removeInstance):
1849 * Plugins/Hosted/ProxyInstance.h:
1850 * Plugins/Hosted/ProxyInstance.mm:
1851 (WebKit::ProxyInstance::ProxyInstance):
1852 (WebKit::ProxyInstance::~ProxyInstance):
1853 (WebKit::ProxyInstance::invalidate):
1855 2009-01-30 Anders Carlsson <andersca@apple.com>
1857 Reviewed by Sam Weinig.
1859 Fix <rdar://problem/6490778>.
1861 Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
1862 validate IdentifierReps before dereferencing them.
1864 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1866 (WKPCGetStringIdentifier):
1867 (WKPCGetIntIdentifier):
1868 (identifierFromIdentifierRep):
1872 (WKPCRemoveProperty):
1875 (WKPCIdentifierInfo):
1877 2009-01-30 Brady Eidson <beidson@apple.com>
1879 Reviewed by Sam Weinig
1881 Remove FrameLoaderClient code that is now handled by FrameLoader itself
1883 * WebCoreSupport/WebFrameLoaderClient.mm:
1884 (WebFrameLoaderClient::frameLoadCompleted):
1886 2009-01-29 Stephanie Lewis <slewis@apple.com>
1890 Update the order files.
1894 2009-01-29 Sam Weinig <sam@webkit.org>
1896 Reviewed by Anders Carlsson.
1898 Second step in tracking the urls a HistoryItem was redirected through
1899 Add SPI to access the array of redirect urls associated with a HistoryItem.
1901 * History/WebHistoryItem.mm:
1902 (-[WebHistoryItem dictionaryRepresentation]):
1903 (-[WebHistoryItem _redirectURLs]):
1904 * History/WebHistoryItemPrivate.h:
1906 2009-01-29 Anders Carlsson <andersca@apple.com>
1908 Reviewed by Dan Bernstein.
1910 Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
1912 * Plugins/Hosted/NetscapePluginHostProxy.h:
1913 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1914 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1917 (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
1918 If we're modal, we should always bring the plug-in host process to the front.
1920 (WebKit::NetscapePluginHostProxy::beginModal):
1921 Add an observer for the NSApplicationWillBecomeActiveNotification callback.
1923 (WebKit::NetscapePluginHostProxy::endModal):
1924 Remove the observer.
1926 2009-01-29 Sam Weinig <sam@webkit.org>
1928 Reviewed by Mark Rowe.
1930 First step in tracking the urls a HistoryItem was redirected through.
1932 * History/WebHistoryItem.mm:
1933 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1934 (-[WebHistoryItem dictionaryRepresentation]):
1935 * Misc/WebNSDictionaryExtras.h:
1936 * Misc/WebNSDictionaryExtras.m:
1937 (-[NSDictionary _webkit_arrayForKey:]): Add helper.
1939 2009-01-29 Anders Carlsson <andersca@apple.com>
1941 Reviewed by Sam Weinig.
1943 Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
1945 * Plugins/Hosted/NetscapePluginHostManager.h:
1946 * Plugins/Hosted/NetscapePluginHostManager.mm:
1947 (WebKit::NetscapePluginHostManager::hostForPackage):
1948 Get the current PSN and pass it to spawnPluginHost.
1950 (WebKit::NetscapePluginHostManager::spawnPluginHost):
1951 Pass the PSN to the "check in" function.
1953 * Plugins/Hosted/NetscapePluginHostProxy.h:
1954 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1955 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1957 (WebKit::NetscapePluginHostProxy::pluginHostDied):
1958 Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
1960 (WebKit::NetscapePluginHostProxy::beginModal):
1961 (WebKit::NetscapePluginHostProxy::endModal):
1962 (WebKit::NetscapePluginHostProxy::setModal):
1963 Split out the code that does all of the work into beginModal and endModal methods.
1965 * Plugins/Hosted/WebKitPluginHost.defs:
1966 * Plugins/WebNetscapePluginView.mm:
1967 (-[WebNetscapePluginView loadStream]):
1969 2009-01-29 David Kilzer <ddkilzer@apple.com>
1971 Remove semi-colons from the end of ObjC method implementations
1973 Rubber-stamped by Adam Roben.
1975 $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
1977 * DefaultDelegates/WebDefaultUIDelegate.m:
1978 (-[WebDefaultUIDelegate webView:setResizable:]):
1979 (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
1980 (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
1981 (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
1982 * History/WebBackForwardList.mm:
1983 (-[WebBackForwardList addItem:]):
1984 (-[WebBackForwardList backListWithLimit:]):
1985 (-[WebBackForwardList forwardListWithLimit:]):
1986 * History/WebHistoryItem.mm:
1987 (-[WebHistoryItem alternateTitle]):
1988 (-[WebHistoryItem setViewState:]):
1989 * Misc/WebCoreStatistics.mm:
1990 (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
1991 * Misc/WebKitNSStringExtras.m:
1992 (-[NSString _web_drawAtPoint:font:textColor:]):
1993 * Plugins/WebNetscapePluginView.mm:
1994 (-[WebNetscapePluginView setAttributeKeys:andValues:]):
1995 * WebCoreSupport/WebEditorClient.mm:
1996 (-[WebEditCommand command]):
1997 * WebView/WebFrame.mm:
1998 (-[WebFrame _getVisibleRect:]):
1999 * WebView/WebHTMLRepresentation.mm:
2000 (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
2001 * WebView/WebHTMLView.mm:
2002 (-[WebHTMLView elementAtPoint:allowShadowContent:]):
2003 * WebView/WebPreferences.mm:
2004 (-[WebPreferences setAllowsAnimatedImages:]):
2005 (-[WebPreferences setAutosaves:]):
2006 (-[WebPreferences PDFDisplayMode]):
2007 * WebView/WebView.mm:
2008 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2009 (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2010 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
2011 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
2012 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
2013 (-[WebView _insertNewlineInQuotedContent]):
2015 2009-01-28 Geoffrey Garen <ggaren@apple.com>
2017 Reviewed by Sam Weinig.
2019 Updated for WebCore rename.
2021 * WebView/WebView.mm:
2022 (-[WebView setCustomTextEncodingName:]):
2024 2009-01-28 David Kilzer <ddkilzer@apple.com>
2026 Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
2028 Reviewed by Dan Bernstein.
2030 * Misc/WebNSURLExtras.h:
2031 (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
2032 declaration after the implementation was added in r9258.
2034 2009-01-28 Sam Weinig <sam@webkit.org>
2036 Reviewed by Geoff Garen.
2038 Fix for <rdar://problem/6129678>
2039 REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
2041 * WebView/WebScriptDebugDelegate.mm:
2042 (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
2044 2009-01-27 Anders Carlsson <andersca@apple.com>
2046 Reviewed by Oliver Hunt.
2048 Fix two bugs with Core Animation based plug-ins.
2050 1. The plug-in view was marked as opaque even though it's not.
2051 (This would leave garbage in the plug-in view).
2052 2. The plug-in layer needs to have autoresizing turned on.
2054 * Plugins/WebNetscapePluginView.mm:
2055 (-[WebNetscapePluginView setLayer:]):
2057 2009-01-27 Brady Eidson <beidson@apple.com>
2059 Reviewed by Dan Bernstein
2061 Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
2063 * History/WebHistoryItem.mm:
2065 * WebCoreSupport/WebFrameLoaderClient.h:
2066 * WebCoreSupport/WebFrameLoaderClient.mm:
2067 (WebFrameLoaderClient::savePlatformDataToCachedFrame):
2068 (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
2071 2009-01-26 Anders Carlsson <andersca@apple.com>
2073 Reviewed by Dan Bernstein.
2075 Add the ability for plug-ins to make WebKit operate in "modal mode"
2077 * Plugins/Hosted/NetscapePluginHostProxy.h:
2078 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2079 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2080 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2081 If the plug-in crashes while we're modal, make sure to leave the modal mode.
2083 (WebKit::NetscapePluginHostProxy::setModal):
2085 * Plugins/Hosted/WebKitPluginClient.defs:
2087 2009-01-26 John Sullivan <sullivan@apple.com>
2089 fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets
2090 stuck in the Name field rather than cycling around
2092 Reviewed by Dan Bernstein
2094 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
2095 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
2096 The two static text fields and the last button all had their "next key view" outlets set to the
2097 name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
2098 selectable view have exactly one "next key view" set to it.
2100 2009-01-26 Anders Carlsson <andersca@apple.com>
2102 Reviewed by Sam Weinig.
2104 Add the ability for a plug-in to show or hide the menu bar.
2106 * Plugins/Hosted/NetscapePluginHostProxy.h:
2107 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2108 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2109 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2110 (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
2111 (WKPCSetMenuBarVisible):
2112 * Plugins/Hosted/WebKitPluginClient.defs:
2114 2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2116 Reviewed by Gavin Barraclough.
2118 Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
2119 <https://bugs.webkit.org/show_bug.cgi?id=23552>
2120 <rdar://problem/6398839>
2122 Dashcode will crash when using the evaluator because it saves a global call
2123 frame, even after global code has finished executing, and then uses this as
2124 a launching pad to execute new JS in the evaluator. The fix is to detect
2125 when Dashcode is attempting to do this and execute code from a global call
2128 * ForwardingHeaders/runtime/Protect.h: Added.
2129 * WebView/WebScriptDebugDelegate.mm:
2130 (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
2131 Added debugger, a WebScriptDebugger* argument.
2132 (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
2133 a stale WebScriptCallFrame to execute new JS and evaluate it starting from
2134 the global object's global call frame instead.
2135 * WebView/WebScriptDebugger.h:
2136 (WebScriptDebugger::globalObject): Added.
2137 (WebScriptDebugger::globalCallFrame): Added.
2138 * WebView/WebScriptDebugger.mm:
2139 (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
2140 (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
2141 so that the global call frame can be saved immediately after being created.
2142 (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
2143 WebScriptCallFrame's _initWithGlobalObject method.
2145 2009-01-26 Anders Carlsson <andersca@apple.com>
2147 Reviewed by Oliver Hunt.
2149 Make WKPCInvoke a simpleroutine.
2151 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2153 * Plugins/Hosted/WebKitPluginClient.defs:
2155 2009-01-26 Anders Carlsson <andersca@apple.com>
2157 Reviewed by Sam Weinig.
2159 Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
2161 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2162 (WKPCBooleanAndDataReply):
2163 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2164 (WebKit::NetscapePluginInstanceProxy::Reply::):
2165 (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
2166 Rename NPObjectInvokeReply to BooleanAndDataReply.
2168 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2169 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2170 Fix a cut and paste error.
2172 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2175 * Plugins/Hosted/ProxyInstance.h:
2176 * Plugins/Hosted/ProxyInstance.mm:
2177 (WebKit::ProxyField::valueFromInstance):
2178 (WebKit::ProxyField::setValueToInstance):
2179 Call the ProxyInstance method.
2181 (WebKit::ProxyInstance::~ProxyInstance):
2182 Release the NPObject.
2184 (WebKit::ProxyInstance::supportsConstruct):
2185 Ask the plug-in host if an instance supports construct.
2187 (WebKit::ProxyInstance::fieldValue):
2188 (WebKit::ProxyInstance::setFieldValue):
2189 Call the plug-in host methods.
2191 * Plugins/Hosted/WebKitPluginHostTypes.h:
2192 Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
2194 2009-01-26 Mark Rowe <mrowe@apple.com>
2198 Remove -Wformat=2 from the warning flags as newer versions of GCC emit
2199 warnings about non-literal format strings for uses of our UI_STRING macro.
2201 * Configurations/Base.xcconfig:
2203 2009-01-26 Mark Rowe <mrowe@apple.com>
2205 Rubber-stamped by Sam Weinig.
2207 Clean up after r40240.
2209 * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
2210 * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
2211 is back in the build.
2213 2009-01-25 Darin Adler <darin@apple.com>
2215 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
2217 2009-01-25 Darin Adler <darin@apple.com>
2219 Discussed with Mark Rowe; not sure he reviewed it.
2221 * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
2222 -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
2224 2009-01-25 Mark Rowe <mrowe@apple.com>
2226 Rubber-stamped by Dan Bernstein.
2228 Improve the consistency of settings in our .xcconfig files.
2230 * Configurations/Base.xcconfig: Only dead code strip the normal variant.
2231 Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
2233 2009-01-25 Darin Adler <darin@apple.com>
2235 Reviewed by Sam Weinig.
2237 Bug 23522: use checked casts for render tree
2238 https://bugs.webkit.org/show_bug.cgi?id=23522
2240 Step one: RenderText.
2242 * WebView/WebRenderNode.mm:
2243 (copyRenderNode): Use toRenderText.
2245 2009-01-23 Brady Eidson <beidson@apple.com>
2247 Rubberstamped by Darin Adler
2249 Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
2251 * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
2252 (WebCachedFramePlatformData::WebCachedFramePlatformData):
2253 * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
2255 * WebCoreSupport/WebFrameLoaderClient.mm:
2256 (WebFrameLoaderClient::savePlatformDataToCachedPage):
2257 (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
2261 2009-01-23 Adele Peterson <adele@apple.com>
2265 Use new linesBoundingBox method instead of
2266 boundingBoxWidth and boundingBoxHeight for RenderText objects.
2268 * WebView/WebRenderNode.mm: (copyRenderNode):
2270 2009-01-23 Anders Carlsson <andersca@apple.com>
2274 * Plugins/Hosted/ProxyInstance.mm:
2275 (WebKit::proxyClass):
2277 2009-01-23 Anders Carlsson <andersca@apple.com>
2281 * Configurations/Base.xcconfig:
2283 2009-01-23 Anders Carlsson <andersca@apple.com>
2285 Reviewed by Sam Weinig.
2287 Turn on -Wmissing-prototypes and fix the resulting warnings.
2289 * Configurations/Base.xcconfig:
2290 * History/WebHistory.mm:
2291 (timeIntervalForBeginningOfDay):
2292 * History/WebHistoryItem.mm:
2293 (historyItemWrappers):
2294 * Misc/WebNSPasteboardExtras.mm:
2296 * WebView/WebFrame.mm:
2297 * WebView/WebScriptDebugger.mm:
2300 2009-01-22 Mark Rowe <mrowe@apple.com>
2302 Rubber-stamped by Anders Carlsson.
2304 Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
2306 Current versions of Xcode only respect it for C and Objective-C files,
2307 and our code doesn't currently compile if it is applied to C++ and
2308 Objective-C++ files.
2310 * Configurations/Base.xcconfig:
2312 2009-01-22 Anders Carlsson <andersca@apple.com>
2314 Reviewed by Sam Weinig.
2316 Add support for Invoke and InvokeDefault. Clean up code.
2318 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2320 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2321 (WebKit::NetscapePluginInstanceProxy::Reply::):
2322 (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
2323 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2324 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2325 * Plugins/Hosted/ProxyInstance.h:
2326 * Plugins/Hosted/ProxyInstance.mm:
2327 (WebKit::ProxyInstance::invoke):
2328 (WebKit::ProxyInstance::invokeMethod):
2329 (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
2330 (WebKit::ProxyInstance::invokeDefaultMethod):
2331 (WebKit::ProxyInstance::methodsNamed):
2332 (WebKit::ProxyInstance::fieldNamed):
2333 * Plugins/Hosted/WebKitPluginClient.defs:
2334 * Plugins/Hosted/WebKitPluginHost.defs:
2335 * Plugins/Hosted/WebKitPluginHostTypes.h:
2337 2009-01-22 Eric Roman <eroman@chromium.og>
2339 Reviewed by Eric Seidel.
2341 https://bugs.webkit.org/show_bug.cgi?id=20806
2342 Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
2344 * History/WebHistoryItem.mm:
2345 (-[WebHistoryItem RSSFeedReferrer]):
2346 (-[WebHistoryItem setRSSFeedReferrer:]):
2348 2009-01-22 Anders Carlsson <andersca@apple.com>
2350 Reviewed by Kevin Decker.
2352 Don't crash or hang when we fail to instantiate a plug-in.
2354 * Plugins/Hosted/NetscapePluginHostManager.mm:
2355 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2356 Return 0 on failure.
2358 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2359 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
2360 Null check for the proxy member.
2362 2009-01-21 David Hyatt <hyatt@apple.com>
2364 Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
2366 Reviewed by Eric Seidel and Darin Adler
2368 * WebView/WebRenderNode.mm:
2371 2009-01-21 Anders Carlsson <andersca@apple.com>
2373 Reviewed by Sam Weinig.
2375 More browser->plug-in scripting support.
2377 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2378 (WKPCNPObjectHasPropertyReply):
2379 (WKPCNPObjectHasMethodReply):
2380 (WKPCNPObjectInvokeReply):
2381 MIG reply functions.
2383 (WKPCIdentifierInfo):
2384 Return information about an identifier given its 64-bit value.
2386 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2387 Add new reply structs.
2389 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2390 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2391 Split out code that adds values to the arrays from marshalValue.
2393 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2394 Call addValueToArray.
2396 (WebKit::NetscapePluginInstanceProxy::marshalValues):
2397 Marshal a list of values.
2399 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2400 Actually create a proxy instance.
2402 * Plugins/Hosted/ProxyInstance.h:
2403 * Plugins/Hosted/ProxyInstance.mm:
2404 (WebKit::ProxyClass::methodsNamed):
2405 (WebKit::ProxyClass::fieldNamed):
2406 Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
2408 (WebKit::proxyClass):
2409 Shared proxyClass getter.
2411 (WebKit::ProxyField::ProxyField):
2412 (WebKit::ProxyField::valueFromInstance):
2413 (WebKit::ProxyField::setValueToInstance):
2414 Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
2416 (WebKit::ProxyMethod::ProxyMethod):
2417 (WebKit::ProxyMethod::serverIdentifier):
2418 (WebKit::ProxyMethod::numParameters):
2419 Add a dummy ProxyMethod class.
2421 (WebKit::ProxyInstance::invokeMethod):
2422 Call _WKPHNPObjectInvoke.
2424 (WebKit::ProxyInstance::defaultValue):
2425 (WebKit::ProxyInstance::stringValue):
2426 (WebKit::ProxyInstance::numberValue):
2427 (WebKit::ProxyInstance::booleanValue):
2428 (WebKit::ProxyInstance::valueOf):
2429 Add dummy implementations (taken from CInstance).
2431 (WebKit::ProxyInstance::methodsNamed):
2432 Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
2434 (WebKit::ProxyInstance::fieldNamed):
2435 Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
2437 * Plugins/Hosted/WebKitPluginClient.defs:
2438 * Plugins/Hosted/WebKitPluginHost.defs:
2439 Add new MIG definitions.
2441 2009-01-21 Mark Rowe <mrowe@apple.com>
2443 Reviewed by Tim Hatcher.
2445 Clean up how we force invocations of API that happened on background threads over to the main thread.
2447 This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
2448 and return values back from the function. The new approach is to use a proxy object that forwards an
2449 NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
2452 * Misc/WebNSObjectExtras.h:
2453 * Misc/WebNSObjectExtras.mm:
2454 (-[WebMainThreadInvoker initWithTarget:]):
2455 (-[WebMainThreadInvoker forwardInvocation:]):
2456 (-[WebMainThreadInvoker methodSignatureForSelector:]):
2457 (-[WebMainThreadInvoker handleException:]):
2458 (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
2459 raised back to the WebMainThreadInvoker.
2460 (-[NSObject _webkit_invokeOnMainThread]):
2462 The following methods are updated to use the proxy object to forward methods to the main thread:
2464 * WebView/WebArchive.mm:
2465 (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
2466 (-[WebArchive mainResource]):
2467 (-[WebArchive subresources]):
2468 (-[WebArchive subframeArchives]):
2469 * WebView/WebResource.mm:
2470 (-[WebResource data]):
2471 (-[WebResource URL]):
2472 (-[WebResource MIMEType]):
2473 (-[WebResource textEncodingName]):
2474 (-[WebResource frameName]):
2475 (-[WebResource _ignoreWhenUnarchiving]):
2476 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2477 (-[WebResource _initWithData:URL:response:]):
2478 (-[WebResource _suggestedFilename]):
2479 (-[WebResource _response]):
2480 (-[WebResource _stringValue]):
2481 * WebView/WebView.mm:
2482 (-[WebView initWithFrame:frameName:groupName:]):
2483 (-[WebView initWithCoder:]):
2485 2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2487 Reviewed by George Staikos.
2489 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
2491 Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
2492 WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
2494 * WebCoreSupport/WebEditorClient.mm:
2495 (WebEditorClient::textFieldDidBeginEditing):
2496 (WebEditorClient::textFieldDidEndEditing):
2497 (WebEditorClient::textDidChangeInTextField):
2498 (WebEditorClient::doTextFieldCommandFromEvent):
2499 (WebEditorClient::textWillBeDeletedInTextField):
2500 (WebEditorClient::textDidChangeInTextArea):
2502 2009-01-19 Anders Carlsson <andersca@apple.com>
2504 Reviewed by Sam Weinig.
2506 Add and implement GetScriptableNPObject.
2508 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2509 (WKPCGetScriptableNPObjectReply):
2510 Create a new reply struct and set it as the current reply.
2513 Get rid of an unused variable.
2515 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2516 (WebKit::NetscapePluginInstanceProxy::Reply::):
2517 (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
2518 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2519 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2520 Call _WKPHGetScriptableNPObject and wait for a reply.
2522 * Plugins/Hosted/ProxyInstance.h: Added.
2523 * Plugins/Hosted/ProxyInstance.mm: Added.
2526 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2527 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
2528 Call NetscapePluginInstanceProxy::createBindingsInstance.
2530 * Plugins/Hosted/WebKitPluginClient.defs:
2531 * Plugins/Hosted/WebKitPluginHost.defs:
2532 Add new declarations.
2534 2009-01-19 Sam Weinig <sam@webkit.org>
2536 Rubber-stamped by Gavin Barraclough.
2538 Remove temporary operator-> from JSValuePtr.
2540 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2541 (WebKit::NetscapePluginInstanceProxy::invoke):
2542 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2543 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2544 * WebView/WebFrame.mm:
2545 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2546 * WebView/WebView.mm:
2547 (aeDescFromJSValue):
2549 2009-01-19 Anders Carlsson <andersca@apple.com>
2551 Reviewed by Sam Weinig.
2553 Make Evaluate an asynchronous method that has a reply method.
2555 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2557 * Plugins/Hosted/WebKitPluginClient.defs:
2558 * Plugins/Hosted/WebKitPluginHost.defs:
2560 2009-01-19 Brady Eidson <beidson@apple.com>
2562 Rubberstamped by Tim Hatcher
2564 Fix long standing typo.
2566 * History/WebBackForwardList.h:
2568 2009-01-19 Mark Rowe <mrowe@apple.com>
2572 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2573 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2574 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2576 2009-01-18 Mark Rowe <mrowe@apple.com>
2578 Reviewed by Anders Carlsson.
2580 Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
2581 Bug 23414: Reproducible crash accessing View menu with plugins disabled
2583 * WebView/WebFrame.mm:
2584 (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
2586 2009-01-17 David Hyatt <hyatt@apple.com>
2588 Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
2589 are done in WebCore instead.
2591 Reviewed by Oliver Hunt
2593 * WebView/WebFrame.mm:
2594 (-[WebFrame _selectedString]):
2595 (-[WebFrame _stringForRange:]):
2597 2009-01-17 Eric Carlson <eric.carlson@apple.com>
2599 Reviewed by Adele Peterson
2601 Complete <rdar://problem/6293969>
2603 * WebCoreSupport/WebSystemInterface.m:
2604 (InitWebCoreSystemInterface): Remove UseSharedMediaUI
2606 2009-01-15 Brady Eidson <beidson@apple.com>
2608 Reviewed by Dan Bernstein
2610 Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
2612 * History/WebHistory.mm:
2613 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
2614 flag for all loads with an HTTP Method
2616 2009-01-14 Anders Carlsson <andersca@apple.com>
2618 Reviewed by Sam Weinig.
2620 Implement InvokeDefault, Construct, GetProperty and SetProperty.
2622 Fully implement marshalValue.
2624 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2625 (WKPCInvokeDefault):
2629 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2630 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2631 (WebKit::NetscapePluginInstanceProxy::evaluate):
2632 (WebKit::NetscapePluginInstanceProxy::invoke):
2633 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2634 (WebKit::NetscapePluginInstanceProxy::construct):
2635 (WebKit::NetscapePluginInstanceProxy::getProperty):
2636 (WebKit::NetscapePluginInstanceProxy::setProperty):
2637 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2638 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2639 * Plugins/Hosted/WebKitPluginClient.defs:
2641 2009-01-14 Anders Carlsson <andersca@apple.com>
2643 Reviewed by Sam Weinig.
2645 Demarshal arguments and pass them to the JS call.
2647 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2649 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2650 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2651 (WebKit::NetscapePluginInstanceProxy::invoke):
2652 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2653 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2655 2009-01-14 Mark Rowe <mrowe@apple.com>
2657 Reviewed by Timothy Hatcher.
2659 <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
2661 Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
2664 * WebView/WebArchive.mm:
2665 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
2666 (-[WebArchive _initWithArguments:]):
2667 * WebView/WebResource.mm:
2668 (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
2670 2009-01-14 Darin Adler <darin@apple.com>
2672 Reviewed by Oliver Hunt.
2674 Fix crash I ran into while printing. I was unable to reproduce it, but also,
2675 it's clear there's no guarantee that the frame will be non-zero in this case,
2676 so it seems fine to check it.
2678 * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
2679 and don't do anything with it if it's zero.
2681 2009-01-14 Dan Bernstein <mitz@apple.com>
2683 Reviewed by John Sullivan.
2689 2009-01-12 Anders Carlsson <andersca@apple.com>
2691 Reviewed by Darin Adler.
2693 Add a bunch of methods to WebKitPluginClient.defs, and implement them.
2695 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2696 (WebKit::fromUTF8WithLatin1Fallback):
2697 If the length isn't specified, get it by calling strlen.
2700 Evaluate doesn't take any arguments.
2702 (WKPCGetIntIdentifier):
2703 Call _NPN_GetIntIdentifier.
2705 (identifierFromServerIdentifier):
2706 New helper function that returns a JSC Identifier from an NPIdentifier.
2709 Call identifierFromServerIdentifier.
2711 (WKPCRemoveProperty):
2714 Call NetscapePluginInstanceProxy.
2716 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2717 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2718 (WebKit::NetscapePluginInstanceProxy::removeProperty):
2719 (WebKit::NetscapePluginInstanceProxy::hasProperty):
2720 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2722 * Plugins/Hosted/WebKitPluginClient.defs:
2723 Add new definitions.
2725 2009-01-13 Anders Carlsson <andersca@apple.com>
2729 * WebView/WebView.mm:
2730 (-[WebView _initWithArguments:]):
2732 2009-01-13 Timothy Hatcher <timothy@apple.com>
2734 Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
2736 <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
2738 Reviewed by Darin Adler.
2740 * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
2741 * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
2742 * Misc/WebNSObjectExtras.mm:
2743 (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
2744 Passes the optional object to the selector.
2745 (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
2746 Put the optional object into the arguments dictionary.
2747 (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
2748 * WebView/WebResource.mm:
2749 (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
2750 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
2751 _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
2752 * WebView/WebView.mm:
2753 (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
2754 (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
2755 (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
2756 to call _initWithArguments: passing the frame, frameName and groupName.
2757 (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
2759 2009-01-12 Gavin Barraclough <barraclough@apple.com>
2761 Reviewed by Oliver Hunt.
2763 Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough.
2765 * WebView/WebView.mm:
2766 (aeDescFromJSValue):
2768 2009-01-12 Brady Eidson <beidson@apple.com>
2770 Reviewed by Darin Adler
2772 <rdar://problem/6468274> - Track Non-get requests in global history
2774 * History/WebHistory.mm:
2775 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2776 * History/WebHistoryInternal.h:
2778 * History/WebHistoryItem.mm:
2779 (-[WebHistoryItem initFromDictionaryRepresentation:]):
2780 (-[WebHistoryItem dictionaryRepresentation]):
2781 (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
2782 * History/WebHistoryItemPrivate.h:
2784 * WebCoreSupport/WebFrameLoaderClient.mm:
2785 (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
2787 2009-01-12 Anders Carlsson <andersca@apple.com>
2789 Reviewed by Sam Weinig.
2791 Move marshalling into NetscapePluginInstanceProxy.
2793 Add support for marshallin strings.
2795 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2798 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2799 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2800 (WebKit::NetscapePluginInstanceProxy::evaluate):
2801 (WebKit::NetscapePluginInstanceProxy::invoke):
2802 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2803 * Plugins/Hosted/WebKitPluginHostTypes.h:
2805 2009-01-12 Anders Carlsson <andersca@apple.com>
2807 Reviewed by Sam Weinig.
2809 Implement WKPCInvoke.
2811 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2814 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2815 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2816 (WebKit::NetscapePluginInstanceProxy::idForObject):
2817 (WebKit::NetscapePluginInstanceProxy::invoke):
2818 * Plugins/Hosted/WebKitPluginClient.defs:
2820 2009-01-12 Anders Carlsson <andersca@apple.com>
2822 Reviewed by Sam Weinig.
2824 Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
2826 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2828 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2829 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2830 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2831 * Plugins/Hosted/WebKitPluginHostTypes.h:
2833 2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com>
2835 Reviewed by Darin Adler.
2837 Bug 22861: Turn the FontCache into a singleton
2838 https://bugs.webkit.org/show_bug.cgi?id=22861
2840 * Misc/WebCoreStatistics.mm:
2841 (+[WebCoreStatistics cachedFontDataCount]):
2842 (+[WebCoreStatistics cachedFontDataInactiveCount]):
2843 (+[WebCoreStatistics purgeInactiveFontData]):
2844 Redirected all the static calls to the global FontCache
2847 2009-01-11 Dmitry Titov <dimich@chromium.org>
2849 Reviewed by Darin Adler.
2851 https://bugs.webkit.org/show_bug.cgi?id=23207
2852 Moved currentTime() to from WebCore to WTF.
2854 * WebView/WebFrame.mm: a different header file included.
2856 2009-01-10 Darin Adler <darin@apple.com>
2858 Reviewed by Sam Weinig.
2860 <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
2861 because of change to -[HTMLObjectElement data]
2863 * WebView/WebView.mm:
2864 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
2865 violation check because I saw this being done off the main thread while testing Mail, and it
2866 caused problems. Put all the one time initialization under a single guard to make things just
2867 a little faster other times, and to make it clearer which things are one-time. Added a call to
2868 the new patchMailRemoveAttributesMethod function.
2869 (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
2870 because I assumed it would be slightly better to have a public method name in the violation
2871 message. This calls commonInitialization later, so it will hit that one eventually.
2872 (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
2873 (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
2874 a WebKit method and removes the patch again on the way out.
2875 (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
2876 applies the patch that fixes this bug.
2878 2009-01-09 Dan Bernstein <mitz@apple.com>
2880 Reviewed by Darin Adler.
2882 - fixed <rdar://problem/6234347> Add/change conditional key
2883 bindings for changing paragraph- and character-level writing
2884 direction (to match NSTextView)
2886 * WebView/WebHTMLView.mm:
2887 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
2888 code to validate makeBaseWritingDirectionLeftToRight: and
2889 makeBaseWritingDirectionRightToLeft:.
2890 (writingDirectionKeyBindingsEnabled): Changed this function to
2891 always return YES, except on Tiger and Leopard.
2892 (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
2893 changeBaseWritingDirectionToLTR: to this.
2894 (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
2895 changeBaseWritingDirectionToRTL: to this.
2896 (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
2897 makeBaseWritingDirectionLeftToRight:.
2898 (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
2899 makeBaseWritingDirectionRightToLeft:.
2900 * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
2901 and makeBaseWritingDirectionRightToLeft to
2902 FOR_EACH_RESPONDER_SELECTOR.
2904 2009-01-08 Anders Carlsson <andersca@apple.com>
2906 Reviewed by Sam Weinig.
2908 Add and implement WKPCGetStringIdentifier.
2910 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2911 (WKPCGetStringIdentifier):
2912 * Plugins/Hosted/WebKitPluginClient.defs:
2914 2009-01-08 Stephanie Lewis <slewis@gmail.com>
2918 * WebView/WebTextIterator.mm:
2920 2009-01-08 Anders Carlsson <andersca@apple.com>
2922 Reviewed by Sam Weinig.
2924 Add basic support for evaluating scripts.
2926 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2927 (WebKit::fromUTF8WithLatin1Fallback):
2928 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
2929 (WKPCReleaseObject):
2932 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2933 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2934 (WebKit::NetscapePluginInstanceProxy::releaseObject):
2935 (WebKit::NetscapePluginInstanceProxy::evaluate):
2936 * Plugins/Hosted/WebKitPluginClient.defs:
2937 * Plugins/Hosted/WebKitPluginHostTypes.h:
2939 2009-01-08 David Hyatt <hyatt@apple.com>
2941 Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
2943 Add a new ChromeClient method for handling exposure of scrolled rects.
2945 Reviewed by Oliver Hunt
2947 * WebCoreSupport/WebChromeClient.h:
2948 * WebCoreSupport/WebChromeClient.mm:
2949 (WebChromeClient::scrollRectIntoView):
2951 2009-01-08 Darin Adler <darin@apple.com>
2953 Reviewed by Tim Hatcher.
2955 Bug 23185: add a currentRange method to the WebTextIterator SPI
2956 https://bugs.webkit.org/show_bug.cgi?id=23185
2957 rdar://problem/6455834
2959 I also noticed a garbage-collection-related threading issue that I fixed, and
2960 that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
2962 * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
2963 category. Added currentTextPointer and currentTextLength.
2965 * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
2966 used _textIterator to be consistent with ObjC rather than C++ naming.
2967 (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
2968 since the finalize method here works with main-thread only WebCore objects.
2969 (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
2970 (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
2971 since I don't think it provides much value.
2972 (-[WebTextIterator atEnd]): Ditto.
2973 (-[WebTextIterator currentRange]): Added.
2974 (-[WebTextIterator currentTextPointer]): Added.
2975 (-[WebTextIterator currentTextLength]): Added.
2976 (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
2977 (-[WebTextIterator currentText]): Ditto.
2979 2009-01-08 Eric Carlson <eric.carlson@apple.com>
2981 Reviewed by Adele Peterson.
2983 Simplify Mac interfaces for drawing media controller elements
2985 <rdar://problem/6293969>
2987 * WebCoreSupport/WebSystemInterface.m:
2988 (InitWebCoreSystemInterface): Update for changes to media controller functions
2990 2009-01-07 Anders Carlsson <andersca@apple.com>
2992 Reviewed by Dan Bernstein.
2996 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2997 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2998 (WebKit::NetscapePluginInstanceProxy::idForObject):
3000 2009-01-07 Anders Carlsson <andersca@apple.com>
3002 Reviewed by Dan Bernstein.
3004 Add a way for a plug-in to get a reference to the Window JS object.
3006 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3007 (WKPCGetWindowNPObject):
3008 Call the appropriate instance.
3010 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3011 Add object ID counter.
3013 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3014 (WebKit::NetscapePluginInstanceProxy::destroy):
3015 Clear the object ID map.
3017 (WebKit::NetscapePluginInstanceProxy::idForObject):
3018 New method that returns a unique ID for a given JS object.
3020 (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
3021 Return the object ID for the window JS object.
3023 * Plugins/Hosted/WebKitPluginClient.defs:
3024 Add GetWindowNPObject.
3026 2009-01-07 Darin Adler <darin@apple.com>
3028 Reviewed by Oliver Hunt.
3030 Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
3031 https://bugs.webkit.org/show_bug.cgi?id=23160
3033 * WebView/WebView.mm:
3034 (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
3035 (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
3036 * WebView/WebViewPrivate.h: Ditto.
3038 2009-01-05 Gavin Barraclough <baraclough@apple.com>
3040 Rubber Stamped by Oliver Hunt.
3042 Replace all uses of JSValue* with new wrapper class, JSValuePtr.
3043 See JavaScriptCore/ChangeLog for more detailed description.
3045 * WebView/WebFrame.mm:
3046 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3047 * WebView/WebScriptDebugDelegate.mm:
3048 (-[WebScriptCallFrame _convertValueToObjcValue:]):
3049 (-[WebScriptCallFrame exception]):
3050 (-[WebScriptCallFrame evaluateWebScript:]):
3051 * WebView/WebView.mm:
3052 (aeDescFromJSValue):
3053 (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
3055 2009-01-06 Pierre-Olivier Latour <pol@apple.com>
3057 Reviewed by Darin Adler.
3059 Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
3061 https://bugs.webkit.org/show_bug.cgi?id=23126
3063 * WebView/WebFrame.mm:
3064 (-[WebFrame _numberOfActiveAnimations]):
3065 * WebView/WebFramePrivate.h:
3067 2009-01-05 David Kilzer <ddkilzer@apple.com>
3069 Add SPI to enable, disable and check state of WebIconDatabase
3071 Reviewed by Darin Adler & Timothy Hatcher.
3073 Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
3074 SPI to make it possible to enable, disable and check the state of
3077 * Misc/WebIconDatabase.mm:
3078 (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
3079 (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
3080 -isEnabled instead of -_isEnabled.
3081 (-[WebIconDatabase iconURLForURL:]): Ditto.
3082 (-[WebIconDatabase retainIconForURL:]): Ditto.
3083 (-[WebIconDatabase releaseIconForURL:]): Ditto.
3084 (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
3085 WebInternal category.
3086 (-[WebIconDatabase setEnabled:]): Added. Takes care of changing
3087 the enabled/disabled state of the icon database.
3088 (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
3089 instead of -_isEnabled.
3090 (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from
3092 (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove
3093 observers when the icon database is disabled.
3094 * Misc/WebIconDatabaseInternal.h: Added declarations for
3095 -_startUpIconDatabase and -_shutDownIconDatabase.
3096 * Misc/WebIconDatabasePrivate.h: Added declarations for
3097 -isEnabled and -setEnabled:.
3099 2009-01-05 Brady Eidson <beidson@apple.com>
3101 Reviewed by Jon Honeycutt
3103 Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
3105 * History/WebHistoryItem.mm:
3106 (-[WebHistoryItem _setLastVisitWasFailure:]):
3107 * History/WebHistoryItemPrivate.h:
3109 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3111 Another blind mac build fix
3113 * WebCoreSupport/WebChromeClient.mm:
3114 (WebChromeClient::contentsSizeChanged):
3116 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3120 * WebCoreSupport/WebChromeClient.mm:
3122 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3126 * WebCoreSupport/WebChromeClient.h:
3128 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3130 Reviewed by George Staikos.
3132 Build fix for contentsSizeChanged
3134 * WebCoreSupport/WebChromeClient.h:
3135 * WebCoreSupport/WebChromeClient.mm:
3136 (WebChromeClient::contentsSizeChanged):
3138 2009-01-02 Darin Adler <darin@apple.com>
3140 Reviewed by Sam Weinig.
3142 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
3143 inside its web view when resizing its window
3144 https://bugs.webkit.org/show_bug.cgi?id=23072
3145 rdar://problem/6368028
3147 The first attempt at fixing this did not work.
3148 This time I was able to reproduce the bug and test the fix.
3150 * WebCoreSupport/WebFrameLoaderClient.mm:
3151 (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
3152 function names around a bit to make even less code at the call site.
3153 (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
3154 Dictionary application in here.
3155 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
3156 applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
3157 when the script is cached. This fixes one of the two problems with the initial
3158 patch; the other fix is in WebCore.
3159 (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
3160 applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
3162 * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
3164 2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
3166 Reviewed by Darin Adler.
3168 Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
3169 <https://bugs.webkit.org/show_bug.cgi?id=23060>
3170 <rdar://problem/6467830>
3172 After r38629, all keyboard events get sent by Editor to the EditorClient, even
3173 if the selection is not editable. If the event's command is unsupported by
3174 WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
3175 was not. When using the page up / page down keys, the events generated are of
3176 the form scrollPageUp rather than movePageUp, so they are unsupported by
3177 WebHTMLView and cause this bug to occur.
3179 * WebView/WebHTMLView.mm:
3180 (-[WebHTMLView doCommandBySelector:]):
3182 2009-01-02 Darin Adler <darin@apple.com>
3184 Reviewed by Oliver Hunt.
3186 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
3187 https://bugs.webkit.org/show_bug.cgi?id=23072
3188 rdar://problem/6368028
3190 * WebCoreSupport/WebFrameLoaderClient.mm:
3191 (isAppleDictionaryApplication): Added.
3192 (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
3193 a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
3194 (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
3195 apply the quirk when the relevant script is loaded.
3197 2008-12-26 Dan Bernstein <mitz@apple.com>
3199 Reviewed by Sam Weinig.
3201 - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
3202 global history after a successful visit
3204 * History/WebHistory.mm:
3205 (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
3206 update the wasFailure flag on the HistoryItem.
3208 2008-12-23 Darin Adler <darin@apple.com>
3210 Reviewed by Alexey Proskuryakov (a slightly earlier version).
3212 - fix https://bugs.webkit.org/show_bug.cgi?id=22976
3213 crash due to Mail's use of WebArchive and WebResource on non-main thread
3215 * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
3216 WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
3217 * Misc/WebKitLogging.m: Ditto.
3219 * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
3220 main thread workaround.
3222 * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
3223 which performs a selector on the main thread, waits for it to complete, and then
3224 returns the value on the caller thread.
3225 * Misc/WebNSObjectExtras.mm: Added.
3227 * WebView/WebArchive.mm:
3228 (-[WebArchive init]): Added WebCoreThreadViolationCheck.
3229 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
3230 initialization on main thread if needMailThreadWorkaround is true.
3231 Also added WebCoreThreadViolationCheck.
3232 (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
3233 (-[WebArchive mainResource]): Get property on main thread if
3234 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3235 (-[WebArchive subresources]): Ditto.
3236 (-[WebArchive subframeArchives]): Ditto.
3237 (-[WebArchive data]): Ditto.
3238 (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
3239 (-[WebArchive _coreLegacyWebArchive]): Ditto.
3240 (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
3241 version of initWithMainResource above.
3243 * WebView/WebResource.mm:
3244 (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
3245 (-[WebResource data]): Get property on main thread if
3246 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3247 (-[WebResource URL]): Ditto.
3248 (-[WebResource MIMEType]): Ditto.
3249 (-[WebResource textEncodingName]): Ditto.
3250 (-[WebResource frameName]): Ditto.
3251 (-[WebResource _ignoreWhenUnarchiving]): Ditto.
3252 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
3253 Perform initialization on main thread if needMailThreadWorkaround is true.
3254 Also added WebCoreThreadViolationCheck.
3255 (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
3256 (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
3257 getting at coreResource directly.
3258 (-[WebResource _response]): Get property on main thread if
3259 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3260 (-[WebResource _stringValue]): Ditto.
3261 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
3262 (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
3263 version of _initWithData above.
3265 * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
3266 clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
3267 and the needMainThreadWorkaround helper function.
3269 * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
3270 file. This probably fixes clean builds.
3271 * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
3273 * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
3274 since it's not actually used.
3275 * WebView/WebDataSource.mm: Ditto.
3276 * WebView/WebHTMLRepresentation.mm: Ditto.
3278 2008-12-23 Darin Adler <darin@apple.com>
3280 Reviewed by Dan Bernstein.
3282 - fix https://bugs.webkit.org/show_bug.cgi?id=22979
3283 crash seen in -[WebView drawsBackground] when quitting
3284 <rdar://problem/6464601>
3286 * WebView/WebView.mm:
3287 (-[WebView drawsBackground]): Added comment and a null check for _private.
3289 2008-12-22 Kevin Decker <kdecker@apple.com>
3291 Reviewed by Anders Carlsson.
3293 <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
3295 * Plugins/WebBaseNetscapePluginView.mm:
3296 (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
3298 2008-12-19 Geoffrey Garen <ggaren@apple.com>
3300 Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
3302 Added SPI for getting an unsorted vector of all items in history.
3304 * History/WebHistory.h:
3305 * History/WebHistory.mm:
3306 (-[WebHistory allItems]):
3308 2008-12-18 Dan Bernstein <mitz@apple.com>
3310 Reviewed by Sam Weinig.
3312 - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
3313 a new resource load delegae method.
3315 * WebCoreSupport/WebFrameLoaderClient.h:
3316 * WebCoreSupport/WebFrameLoaderClient.mm:
3317 (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
3318 delegate method. If the method is unimplemented, returns true for
3319 backwards compatibility.
3320 * WebView/WebView.mm:
3321 (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
3322 shouldUseCredentialStorageFunc member.
3323 (CallResourceLoadDelegateReturningBoolean): Added.
3324 * WebView/WebViewInternal.h:
3325 * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
3326 -webView:resource:shouldUseCredentialStorageForDataSource:.
3328 2008-12-18 Cameron Zwarich <zwarich@apple.com>
3330 Reviewed by Jonathan Honeycutt.
3332 Fix an apparent typo in r39385 that is causing lots of crashes.
3334 * WebCoreSupport/WebFrameLoaderClient.mm:
3335 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
3337 2008-12-18 Brady Eidson <beidson@apple.com>
3339 Reviewed by John Sullivan
3341 Initial visit to a website creates history items that start with a visit count of
3344 * History/WebHistory.mm:
3345 (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
3347 * History/WebHistoryItem.mm:
3348 (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
3349 * History/WebHistoryItemInternal.h:
3351 2008-12-18 Sam Weinig <sam@webkit.org>
3353 Reviewed by John Sullivan.
3355 Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
3356 a new private frame load delegate method.
3358 * WebCoreSupport/WebFrameLoaderClient.h:
3359 * WebCoreSupport/WebFrameLoaderClient.mm:
3360 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
3361 * WebView/WebView.mm:
3362 (-[WebView _cacheFrameLoadDelegateImplementations]):
3363 * WebView/WebViewInternal.h:
3364 * WebView/WebViewPrivate.h:
3366 2008-12-16 Antti Koivisto <antti@apple.com>
3368 Reviewed by John Sullivan.
3370 Add version check for shift-reload behavior.
3372 * Misc/WebKitVersionChecks.h:
3373 * WebView/WebFrame.mm:
3374 (-[WebFrame reload]):
3376 2008-12-16 Anders Carlsson <andersca@apple.com>
3378 Reviewed by Dan Bernstein.
3380 Start sending keyboard events to the plug-in host.
3382 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3383 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3384 (WebKit::NetscapePluginInstanceProxy::keyEvent):
3385 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3386 (-[WebHostedNetscapePluginView keyDown:]):
3387 (-[WebHostedNetscapePluginView keyUp:]):
3388 * Plugins/Hosted/WebKitPluginHost.defs:
3390 2008-12-16 Anders Carlsson <andersca@apple.com>
3392 Reviewed by Kevin Decker.
3394 <rdar://problem/6450538>
3396 Fix flag enumeration.
3398 * Plugins/Hosted/WebKitPluginHostTypes.h:
3400 2008-12-16 Anders Carlsson <andersca@apple.com>
3402 Reviewed by Kevin Decker.
3404 Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
3406 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3408 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3409 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3410 (WebKit::NetscapePluginInstanceProxy::loadURL):
3411 * Plugins/Hosted/WebKitPluginClient.defs:
3412 * Plugins/Hosted/WebKitPluginHostTypes.h:
3414 2008-12-16 Anders Carlsson <andersca@apple.com>
3416 Reviewed by Kevin Decker.
3418 Add trailing null to headers to avoid a crash in the plug-in host.
3420 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3421 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3423 2008-12-15 Mark Rowe <mrowe@apple.com>
3425 Rubber-stamped by Cameron Zwarich.
3427 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
3429 * Configurations/Base.xcconfig:
3430 * Configurations/DebugRelease.xcconfig:
3432 2008-12-15 Stephanie Lewis <slewis@apple.com>
3436 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3438 2008-12-15 Anders Carlsson <andersca@apple.com>
3440 Reviewed by Sam Weinig.
3442 Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
3443 back into us while it's being instantiated.
3445 * Plugins/Hosted/NetscapePluginHostManager.mm:
3446 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3447 * Plugins/Hosted/NetscapePluginHostProxy.h:
3448 (WebKit::NetscapePluginHostProxy::clientPort):
3449 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3450 (WKPCInstantiatePluginReply):
3451 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3452 (WebKit::NetscapePluginInstanceProxy::Reply::):
3453 (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
3454 (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
3455 (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
3456 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
3457 (WebKit::NetscapePluginInstanceProxy::waitForReply):
3458 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3459 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3460 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
3461 * Plugins/Hosted/WebKitPluginClient.defs:
3462 * Plugins/Hosted/WebKitPluginHost.defs:
3464 2008-12-15 Anders Carlsson <andersca@apple.com>
3466 Reviewed by Darin Adler.
3468 Let WebKit generate a plug-in ID instead of having the plug-in host do it.
3470 * Plugins/Hosted/NetscapePluginHostManager.mm:
3471 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3472 Create the plug-in proxy before instantiating the plug-in.
3474 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3475 (WebKit::NetscapePluginInstanceProxy::create):
3476 (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
3477 (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
3478 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3479 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3480 * Plugins/Hosted/WebKitPluginHost.defs:
3482 2008-12-15 Anders Carlsson <andersca@apple.com>
3484 Reviewed by Sam Weinig.
3486 LoadURL doesn't need to be asynchronous.
3488 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3490 * Plugins/Hosted/WebKitPluginClient.defs:
3491 * Plugins/Hosted/WebKitPluginHost.defs:
3493 2008-12-15 Antti Koivisto <antti@apple.com>
3495 Reviewed by Darin Adler.
3497 - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
3498 - Add corresponding IBAction to WebView.
3499 - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
3501 * WebView/WebFrame.h:
3502 * WebView/WebFrame.mm:
3503 (-[WebFrame reload]):
3504 (-[WebFrame reloadFromOrigin]):
3505 * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
3506 * WebView/WebView.h:
3507 * WebView/WebView.mm:
3508 (-[WebView reloadFromOrigin:]):
3510 2008-12-14 Dan Bernstein <mitz@apple.com>
3512 Reviewed by Darin Adler.
3514 - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
3515 should add items to userInfo
3517 * History/WebHistory.mm:
3518 (-[WebHistoryPrivate allItems]): Added this helper method, which returns
3519 all values in the _entriesByURL dictionary.
3520 (-[WebHistory removeAllItems]): Changed to send the array of all items
3521 in the notification.
3523 2008-12-13 Darin Adler <darin@apple.com>
3525 - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
3527 * WebKit.exp: Added the class. We forgot to export it when we added
3528 the WebTextIterator SPI.
3530 2008-12-12 Darin Adler <darin@apple.com>
3532 Rubber stamped by Adam Roben.
3534 - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
3535 login sheet after clicking static text, due to AppKit key loop change
3537 * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
3538 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
3539 * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
3540 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3541 Set nextKeyView of the selectable static texts to the editable text.
3544 2008-12-12 Stephanie Lewis <slewis@apple.com>
3546 Reviewed by Geoff Garen.
3550 * WebView/WebView.mm:
3551 (+[WebView _setCacheModel:]):
3553 2008-12-12 Anders Carlsson <andersca@apple.com>
3555 Reviewed by Tim Hatcher.
3557 Don't try to free the dummy "1" port state.
3559 * Plugins/WebNetscapePluginView.mm:
3560 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3561 (-[WebNetscapePluginView updateAndSetWindow]):
3563 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3565 Rubber-stamped by Mark Rowe.
3567 Roll out r39212 due to assertion failures during layout tests, multiple
3568 layout test failures, memory leaks, and obvious incorrectness.
3570 * WebView/WebPreferenceKeysPrivate.h:
3571 * WebView/WebPreferences.mm:
3572 (-[WebPreferences fullDocumentTeardownEnabled]):
3573 * WebView/WebPreferencesPrivate.h:
3575 2008-12-11 Stephanie Lewis <slewis@apple.com>
3579 * WebView/WebView.mm:
3581 2008-12-11 Stephanie Lewis <slewis@apple.com>
3583 Reviewed by Oliver Hunt.
3585 Empty Web cache before quitting a debug build in order
3586 to report accurate CachedResource leaks.
3588 * WebView/WebView.mm:
3589 (-[WebView _close]):
3591 2008-12-11 Anders Carlsson <andersca@apple.com>
3595 * Misc/WebNSDataExtras.h:
3597 2008-12-11 Anders Carlsson <andersca@apple.com>
3599 Reviewed by Cameron Zwarich.
3601 https://bugs.webkit.org/show_bug.cgi?id=22797
3602 REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
3604 Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
3606 * Plugins/WebBaseNetscapePluginStream.mm:
3607 (WebNetscapePluginStream::destroyStreamWithReason):
3609 2008-12-10 Glenn Wilson <gwilson@google.com>
3611 Reviewed by Adam Roben.
3613 Added new methods for overriding default WebPreference values
3614 and for resetting preferences to their defaults.
3615 https://bugs.webkit.org/show_bug.cgi?id=20534
3617 * WebView/WebPreferenceKeysPrivate.h:
3618 * WebView/WebPreferences.mm:
3619 (-[WebPreferences resetToDefaults]): new method
3620 (-[WebPreferences overridePreference:flag:]): new method
3621 * WebView/WebPreferencesPrivate.h: new method signatures
3623 2008-12-10 Anders Carlsson <andersca@apple.com>
3625 Reviewed by Darin Adler.
3627 Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
3629 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3632 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3633 (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3634 Factored out this from ::destroy.
3636 (WebKit::NetscapePluginInstanceProxy::destroy):
3637 Call stopAllStreams().
3639 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3642 (WebKit::NetscapePluginInstanceProxy::loadURL):
3643 Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
3645 2008-12-10 Anders Carlsson <andersca@apple.com>
3647 Reviewed by Darin Adler.
3649 Move two NSData category methods to WebNSDataExtras.m.
3651 * Misc/WebNSDataExtras.h:
3652 * Misc/WebNSDataExtras.m:
3653 (-[NSData _web_startsWithBlankLine]):
3654 (-[NSData _web_locationAfterFirstBlankLine]):
3655 * Plugins/WebNetscapePluginView.mm:
3657 2008-12-10 Alice Liu <alice.liu@apple.com>
3659 fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3661 Reviewed by Darin Adler.
3663 * Misc/WebNSPasteboardExtras.mm:
3664 Ask image for its file extension instead of falling back on MIME type and file path.
3665 Also moved this code to before setting the pasteboard data so as not to set any if
3666 no extension can be determined.
3667 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3669 * WebView/WebHTMLView.mm:
3670 Fixed a separate but related long-standing bug of how the filename for the promised
3671 drag data is determined by asking the image for a proper file extension.
3672 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3674 2008-12-09 Anders Carlsson <andersca@apple.com>
3676 Reviewed by Darin Adler.
3680 * WebView/WebHTMLView.mm:
3681 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3683 2008-12-09 Anders Carlsson <andersca@apple.com>
3685 Reviewed by Darin Adler.
3687 Implement software rendering of hosted plug-ins.
3689 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3690 (WKPCInvalidateRect):
3691 New MiG function. This is called by the plug-in host when it has drawn something.
3693 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3694 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3695 (-[WebHostedNetscapePluginView createPlugin]):
3696 Create a software renderer.
3698 (-[WebHostedNetscapePluginView destroyPlugin]):
3699 Destroy the software renderer.
3701 (-[WebHostedNetscapePluginView drawRect:]):
3702 Draw using the software renderer.
3704 * Plugins/Hosted/WebKitPluginClient.defs:
3707 2008-12-09 Brett Wilson <brettw@chromium.org>
3709 Reviewed by Dave Hyatt.
3711 https://bugs.webkit.org/show_bug.cgi?id=22177
3713 Add a callback on ChromeClient that the state of form elements on
3714 the page has changed. This is to allow clients implementing session
3715 saving to know when the current state is dirty.
3717 * WebCoreSupport/WebChromeClient.h:
3718 (WebChromeClient::formStateDidChange):
3720 2008-12-09 Anders Carlsson <andersca@apple.com>
3722 Reviewed by Dan Bernstein.
3724 Make sure to pause null events for hosted plug-ins as well.
3726 * WebView/WebHTMLView.mm:
3727 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3729 2008-12-09 Anders Carlsson <andersca@apple.com>
3731 Reviewed by Darin Adler.
3733 * Plugins/Hosted/NetscapePluginHostProxy.h:
3734 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3735 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3736 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3737 Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
3739 2008-12-09 Timothy Hatcher <timothy@apple.com>
3741 Implement a few methods needed to keep Dictionary.app working on Leopard.
3743 <rdar://problem/6002160> Internal changes to WebKit in Safari 4
3744 Developer Preview might break Dictionary
3746 Reviewed by Dan Bernstein.
3748 * WebView/WebFrame.mm:
3749 (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
3750 (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
3751 * WebView/WebHTMLView.mm:
3752 (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
3753 that Dictionary.app is using.
3755 2008-12-08 Anders Carlsson <andersca@apple.com>
3757 Reviewed by Darin Adler.
3759 More work towards getting NPN_GetURL working.
3761 * Plugins/Hosted/HostedNetscapePluginStream.h:
3762 Inherit from NetscapePlugInStreamLoaderClient.
3764 (WebKit::HostedNetscapePluginStream::streamID):
3765 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3766 (WebKit::HostedNetscapePluginStream::startStream):
3767 Keep track of the resposne URL and the MIME type. Pass the response URL to the
3770 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3771 Disconnect the stream.
3773 (WebKit::HostedNetscapePluginStream::start):
3774 Create a plug-in stream loader and start loading.
3776 (WebKit::HostedNetscapePluginStream::stop):
3779 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3781 Fix the parameter order.
3783 (WKPCCancelLoadURL):
3784 New function that cancels a load of a stream with a given reason.
3786 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3787 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3788 (WebKit::NetscapePluginInstanceProxy::destroy):
3791 (WebKit::NetscapePluginInstanceProxy::pluginStream):
3792 Return a plug-in stream given a stream ID.
3794 (WebKit::NetscapePluginInstanceProxy::disconnectStream):
3795 Remove the stream from the streams map.
3797 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3798 Create a stream and load it.
3800 * Plugins/Hosted/WebKitPluginClient.defs:
3803 * Plugins/Hosted/WebKitPluginHost.defs:
3804 Add responseURL to StartStream.
3806 * Plugins/WebBaseNetscapePluginView.h:
3807 * Plugins/WebBaseNetscapePluginView.mm:
3808 (-[WebBaseNetscapePluginView pluginPackage]):
3809 Move this down to the base class from WebNetscapePluginView.
3811 * Plugins/WebNetscapePluginView.h:
3812 * Plugins/WebNetscapePluginView.mm:
3814 2008-12-08 Dan Bernstein <mitz@apple.com>
3816 Reviewed by John Sullivan.
3818 - WebKit/mac part of tracking the global history item for a WebView
3820 * WebView/WebView.mm:
3821 (-[WebView _globalHistoryItem]): Added. Returns the page's global
3823 * WebView/WebViewPrivate.h:
3825 2008-12-06 Simon Fraser <simon.fraser@apple.com>
3827 Reviewed by Dave Hyatt
3829 https://bugs.webkit.org/show_bug.cgi?id=15671
3831 VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
3833 * WebView/WebFrame.mm:
3834 (-[WebFrame _caretRectAtNode:offset:affinity:]):
3836 2008-12-06 David Kilzer <ddkilzer@apple.com>
3838 Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
3840 <https://bugs.webkit.org/show_bug.cgi?id=22666>
3842 Reviewed by Darin Adler.
3844 * DOM/WebDOMOperations.mm:
3845 (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
3846 ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
3848 2008-12-05 Alexey Proskuryakov <ap@webkit.org>
3850 Reviewed by Darin Adler.
3852 <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3853 in Safari before opening a mail message in Mail
3855 * Carbon/CarbonWindowAdapter.m: Removed.
3856 * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
3857 (+[CarbonWindowAdapter initialize]):
3858 * History/WebBackForwardList.mm:
3859 (+[WebBackForwardList initialize]):
3860 * History/WebHistoryItem.mm:
3861 (+[WebHistoryItem initialize]):
3862 * Misc/WebElementDictionary.mm:
3863 (+[WebElementDictionary initialize]):
3864 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3865 (+[WebHostedNetscapePluginView initialize]):
3866 * Plugins/WebBaseNetscapePluginView.mm:
3867 * Plugins/WebBasePluginPackage.m: Removed.
3868 * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
3869 (+[WebBasePluginPackage initialize]):
3870 * Plugins/WebNetscapePluginView.mm:
3871 (+[WebNetscapePluginView initialize]):
3872 * WebCoreSupport/WebEditorClient.mm:
3873 (+[WebEditCommand initialize]):
3874 * WebCoreSupport/WebFrameLoaderClient.mm:
3875 * WebView/WebArchive.mm:
3876 (+[WebArchivePrivate initialize]):
3877 * WebView/WebDataSource.mm:
3878 (+[WebDataSourcePrivate initialize]):
3879 * WebView/WebHTMLView.mm:
3880 (+[WebHTMLViewPrivate initialize]):
3881 (+[WebHTMLView initialize]):
3882 * WebView/WebResource.mm:
3883 (+[WebResourcePrivate initialize]):
3884 * WebView/WebView.mm:
3885 (+[WebViewPrivate initialize]):
3886 Call JSC::initializeThreading();
3888 2008-12-04 Stephanie Lewis <slewis@apple.com>
3892 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3895 2008-12-04 Anders Carlsson <andersca@apple.com>
3897 Reviewed by Sam Weinig.
3899 More work on streams.
3901 * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
3902 (WebKit::HostedNetscapePluginStream::create):
3903 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
3904 (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3905 (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
3906 (WebKit::HostedNetscapePluginStream::startStream):
3907 (WebKit::HostedNetscapePluginStream::didReceiveData):
3908 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3909 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3910 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3911 (WebKit::NetscapePluginInstanceProxy::pluginView):
3912 (WebKit::NetscapePluginInstanceProxy::hostProxy):
3913 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3914 (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
3915 (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
3916 (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
3917 (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
3918 (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
3919 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3920 (WebKit::NetscapePluginInstanceProxy::performRequest):
3921 (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3922 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3923 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3924 * Plugins/Hosted/WebKitPluginHost.defs:
3926 2008-12-04 Anders Carlsson <andersca@apple.com>
3928 Reviewed by Sam Weinig.
3930 Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
3931 but once we have a more complete implementation of NPStreams we can start refactoring things so that the
3932 implementations can share more code.
3934 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3936 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3937 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3938 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3939 (WebKit::NetscapePluginInstanceProxy::loadURL):
3940 (WebKit::NetscapePluginInstanceProxy::performRequest):
3941 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
3942 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3943 * Plugins/Hosted/WebKitPluginClient.defs:
3944 * Plugins/Hosted/WebKitPluginHost.defs:
3946 2008-12-04 Anders Carlsson <andersca@apple.com>
3948 Reviewed by Dan Bernstein.
3950 Move requestWithURLCString to WebBaseNetscapePluginView.
3952 * Plugins/WebBaseNetscapePluginView.h:
3953 * Plugins/WebBaseNetscapePluginView.mm:
3954 (-[WebBaseNetscapePluginView requestWithURLCString:]):
3955 * Plugins/WebNetscapePluginView.mm:
3957 2008-12-03 Anders Carlsson <andersca@apple.com>
3959 Reviewed by Sam Weinig.
3961 Move WebPluginRequest to its own file.
3963 * Plugins/WebNetscapePluginView.mm:
3964 * Plugins/WebPluginRequest.h: Added.
3965 * Plugins/WebPluginRequest.m: Added.
3966 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
3967 (-[WebPluginRequest dealloc]):
3968 (-[WebPluginRequest request]):
3969 (-[WebPluginRequest frameName]):
3970 (-[WebPluginRequest isCurrentEventUserGesture]):
3971 (-[WebPluginRequest sendNotification]):
3972 (-[WebPluginRequest notifyData]):
3974 2008-12-03 Anders Carlsson <andersca@apple.com>
3976 Handle the CA model.
3978 * Plugins/WebNetscapePluginView.mm:
3979 (-[WebNetscapePluginView setWindowIfNecessary]):
3981 2008-12-03 Anders Carlsson <andersca@apple.com>
3983 Reviewed by Kevin Decker.
3985 <rdar://problem/6412293>
3986 Call NPP_SetWindow for CA plug-ins.
3988 * Plugins/WebNetscapePluginView.mm:
3989 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3990 (-[WebNetscapePluginView restorePortState:]):
3991 (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
3992 (-[WebNetscapePluginView updateAndSetWindow]):
3993 (-[WebNetscapePluginView setWindowIfNecessary]):
3995 2008-12-03 Anders Carlsson <andersca@apple.com>
3997 Fix the release build.
3999 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4000 (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
4002 2008-12-03 Anders Carlsson <andersca@apple.com>
4004 Reviewed by Dan Bernstein.
4006 <rdar://problem/6412234>
4007 Don't crash if we can't launch the plug-in host.
4009 * Plugins/Hosted/NetscapePluginHostManager.mm:
4010 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4012 2008-12-02 Anders Carlsson <andersca@apple.com>
4014 Reviewed by Dan Bernstein.
4016 Start processing messages sent to the client port.
4018 * Plugins/Hosted/NetscapePluginHostProxy.h:
4019 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4020 Add a map from ports to plug-in proxies. Turn the set of instances into a map from
4021 pluginID to instance proxy.
4024 Look up the right instance proxy and call status().
4026 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4027 (WebKit::NetscapePluginInstanceProxy::pluginID):
4028 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4029 (WebKit::NetscapePluginInstanceProxy::status):
4032 * Plugins/Hosted/WebKitPluginClient.defs:
4033 Add the plug-in ID to StatusText.
4035 2008-12-02 Gregory Hughes <ghughes@apple.com>
4037 Reviewed by Beth Dakin.
4039 Bug 22513: ZOOM: text selection does not send correct zoom bounds
4041 When zoomed, text selection must send the zoom bounds in flipped
4044 * WebCoreSupport/WebViewFactory.mm:
4045 (-[WebViewFactory accessibilityConvertScreenRect:]):
4047 2008-12-02 Anders Carlsson <andersca@apple.com>
4049 Reviewed by Dan Bernstein.
4051 Create a client mach port and pass it to the plug-in host.
4053 * Plugins/Hosted/NetscapePluginHostManager.h:
4054 * Plugins/Hosted/NetscapePluginHostManager.mm:
4055 (WebKit::NetscapePluginHostManager::hostForPackage):
4056 (WebKit::NetscapePluginHostManager::spawnPluginHost):
4057 * Plugins/Hosted/NetscapePluginHostProxy.h:
4058 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4059 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4060 * Plugins/Hosted/WebKitPluginHost.defs:
4062 2008-12-02 Anders Carlsson <andersca@apple.com>
4064 Reviewed by Sam Weinig.
4066 Let the plug-in views know if the plug-in host crashes.
4068 * Plugins/Hosted/NetscapePluginHostManager.h:
4069 * Plugins/Hosted/NetscapePluginHostManager.mm:
4070 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4071 * Plugins/Hosted/NetscapePluginHostProxy.h:
4072 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4073 (WebKit::NetscapePluginHostProxy::pluginHostDied):
4074 (WebKit::NetscapePluginHostProxy::addPluginInstance):
4075 (WebKit::NetscapePluginHostProxy::removePluginInstance):
4077 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4078 (WebKit::NetscapePluginInstanceProxy::create):
4079 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4080 Keep a pointer to the host proxy.
4082 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4083 Add the instance to the host set.
4085 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
4086 Remove the instance form the host set.
4088 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
4089 Tell the plug-in view that the plug-in died.
4091 * Plugins/Hosted/WebHostedNetscapePluginView.h:
4092 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4093 (-[WebHostedNetscapePluginView createPlugin]):
4094 Pass the plug-in view to the instantiatePlugin.
4096 (-[WebHostedNetscapePluginView pluginHostDied]):
4097 Handle the plug-in host crashing.
4099 (-[WebHostedNetscapePluginView drawRect:]):
4100 Fill the plug-in view with a nice red shade if the plug-in crashes.
4102 2008-12-01 Anders Carlsson <andersca@apple.com>
4104 Reviewed by Dan Bernstein.
4106 Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
4108 * Plugins/Hosted/NetscapePluginHostManager.h:
4109 * Plugins/Hosted/NetscapePluginHostManager.mm:
4110 (WebKit::NetscapePluginHostManager::pluginHostDied):
4111 Remove the plug-in host from the map.
4113 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4114 NetscapePluginHostProxy is no longer refcounted.
4116 * Plugins/Hosted/NetscapePluginHostProxy.h:
4117 This is no longer refcounted. Add a set of plug-in instances (unused for now).
4119 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4120 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4121 Create a death notification port.
4123 (WebKit::NetscapePluginHostProxy::pluginHostDied):
4124 Tell the manager that we're gone and delete ourselves.
4126 (WebKit::NetscapePluginHostProxy::deathPortCallback):
4127 New CFMachPort callback.
4129 2008-12-01 Anders Carlsson <andersca@apple.com>
4131 Reviewed by Dan Bernstein.
4133 Move instantiatePlugin to NetscapePluginHostManager.
4135 * Plugins/Hosted/NetscapePluginHostManager.h:
4136 * Plugins/Hosted/NetscapePluginHostManager.mm:
4137 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4138 * Plugins/Hosted/NetscapePluginHostProxy.h:
4139 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4140 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4141 (-[WebHostedNetscapePluginView createPlugin]):
4143 2008-12-01 Anders Carlsson <andersca@apple.com>
4145 Reviewed by Dan Bernstein.
4147 Pass the plug-in host port directly to the instance proxy.
4149 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4150 (WebKit::NetscapePluginHostProxy::instantiatePlugin):
4151 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4152 (WebKit::NetscapePluginInstanceProxy::create):
4153 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4154 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4155 (WebKit::NetscapePluginInstanceProxy::resize):
4156 (WebKit::NetscapePluginInstanceProxy::destroy):
4157 (WebKit::NetscapePluginInstanceProxy::focusChanged):
4158 (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
4159 (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
4160 (WebKit::NetscapePluginInstanceProxy::startTimers):
4161 (WebKit::NetscapePluginInstanceProxy::mouseEvent):
4162 (WebKit::NetscapePluginInstanceProxy::stopTimers):
4164 2008-12-01 Anders Carlsson <andersca@apple.com>
4166 Try to fix the Tiger build.
4168 * Plugins/WebNetscapePluginView.mm:
4170 2008-12-01 Anders Carlsson <andersca@apple.com>
4172 Rename _layer to _pluginLayer where I forgot to do so.
4174 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4175 (-[WebHostedNetscapePluginView destroyPlugin]):
4176 * Plugins/WebNetscapePluginView.h:
4177 * Plugins/WebNetscapePluginView.mm:
4178 (-[WebNetscapePluginView createPlugin]):
4179 (-[WebNetscapePluginView setLayer:]):
4180 (-[WebNetscapePluginView destroyPlugin]):
4182 2008-12-01 Anders Carlsson <andersca@apple.com>
4184 Reviewed by Adam Roben.
4186 Make sure to re-insert layers as needed so they won't be lost when the layer backed
4187 view is removed from the view hierarchy.
4189 * Plugins/Hosted/WebHostedNetscapePluginView.h:
4190 Add _pluginLayer ivar.
4192 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4193 (-[WebHostedNetscapePluginView createPlugin]):
4194 Don't add the layer here.
4196 (-[WebHostedNetscapePluginView setLayer:]):
4197 Instead, add it here.
4199 (-[WebHostedNetscapePluginView destroyPlugin]):
4200 Set _pluginLayer to 0.
4202 * Plugins/WebNetscapePluginView.mm:
4203 (-[WebNetscapePluginView createPlugin]):
4204 Don't add the layer here.
4206 (-[WebNetscapePluginView setLayer:]):
4209 2008-11-30 Antti Koivisto <antti@apple.com>
4211 Reviewed by Mark Rowe.
4213 https://bugs.webkit.org/show_bug.cgi?id=22557
4215 Report free size in central and thread caches too.
4217 * Misc/WebCoreStatistics.mm:
4218 (+[WebCoreStatistics memoryStatistics]):
4220 2008-11-29 Antti Koivisto <antti@apple.com>
4222 Reviewed by Dan Bernstein.
4224 https://bugs.webkit.org/show_bug.cgi?id=22557
4225 Add statistics for JavaScript GC heap.
4227 * Misc/WebCoreStatistics.mm:
4228 (+[WebCoreStatistics javaScriptObjectsCount]):
4229 (+[WebCoreStatistics memoryStatistics]):
4231 2008-11-29 Antti Koivisto <antti@apple.com>
4233 Reviewed by Alexey Proskuryakov.
4235 https://bugs.webkit.org/show_bug.cgi?id=22557
4237 - Add purgeable memory statistics to cache statistics.
4238 - Add method for getting fastMalloc statistics.
4239 - Add method to force returning free memory back to system.
4242 (+[WebCache statistics]):
4243 * Misc/WebCoreStatistics.h:
4244 * Misc/WebCoreStatistics.mm:
4245 (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]):
4246 (+[WebCoreStatistics memoryStatistics]):
4247 (+[WebCoreStatistics returnFreeMemoryToSystem]):
4249 2008-11-26 Mark Rowe <mrowe@apple.com>