1 2009-03-22 Dan Bernstein <mitz@apple.com>
3 Reviewed by John Sullivan.
5 - fix <rdar://problem/6640741> Messages not displaying after the
6 Safari 4 beta was installed
8 Mail assumes that if -[WebArchive subresources] is not nil, then it
9 contains at least one object.
11 * WebView/WebArchive.mm:
12 (-[WebArchive subresources]): Preserve the behavior of returning nil
13 if there are no subresources.
15 2009-03-20 Adele Peterson <adele@apple.com>
19 Reviewed by Darin Adler.
21 * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]):
23 2009-03-20 Timothy Hatcher <timothy@apple.com>
25 Change how threading exceptions are checked so they are reported
26 by what round they were added. That way WebKit can decided the
27 behavior per-round based on linked-on-or-after checks.
29 <rdar://problem/6626741&6648478&6635474&6674079>
31 Reviewed by Darin Adler.
33 * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
34 * History/WebHistoryItem.mm: Ditto.
35 * Misc/WebIconDatabase.mm: Ditto.
37 * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro.
38 * WebView/WebResource.mm: Ditto.
39 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version
40 to truly decide if it is an old Mail client.
41 * WebView/WebView.mm: Ditto.
43 * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define.
44 * WebView/WebFrameView.mm:
45 (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round
46 based on difference version checks and the Mail workaround check.
48 2009-03-20 Darin Adler <darin@apple.com>
50 Reviewed by Timothy Hatcher.
52 * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls
55 2009-03-20 Darin Adler <darin@apple.com>
57 Reviewed by Adele Peterson.
59 Use a better technique to handle finding out if something responds to a selector
60 in WebHTMLView's doCommandBySelector method.
62 * WebView/WebHTMLView.mm:
63 (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame;
64 this is already handled by coreCommandBySelector: so doesn't need to be checked
65 twice. Got rid of initial value for eventWasHandled boolean to make it more clear.
66 Use WebResponderChainSink to find out if a command is handled rather than walking
67 the responder chain explicitly.
68 (-[WebResponderChainSink initWithResponderChain:]): Added.
69 (-[WebResponderChainSink detach]): Added.
70 (-[WebResponderChainSink receivedUnhandledCommand]): Added.
71 (-[WebResponderChainSink noResponderFor:]): Added.
72 (-[WebResponderChainSink doCommandBySelector:]): Added.
74 2009-03-19 Timothy Hatcher <timothy@apple.com>
76 Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
77 for Page, so the new RunLoopTimer in WebCore always gets a default mode.
78 Fixes the layout test failures on the Tiger build bots.
80 Reviewed by Mark Rowe.
83 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
84 (-[WebView scheduleInRunLoop:forMode:]):
85 (-[WebView unscheduleFromRunLoop:forMode:]):
87 2009-03-18 Anders Carlsson <andersca@apple.com>
89 Reviewed by Oliver Hunt.
91 WebKit side of <rdar://problem/6688244>.
93 Try reinitializing the vendor port if it's invalid.
95 * Plugins/Hosted/NetscapePluginHostManager.mm:
96 (WebKit::NetscapePluginHostManager::spawnPluginHost):
98 2009-03-18 Anders Carlsson <andersca@apple.com>
100 Reviewed by Darin Adler.
102 <rdar://problem/6504776>
103 CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
105 If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
106 causing the plug-in never to be stopped. Simplify the code by using a RAII object.
108 * Plugins/WebBaseNetscapePluginStream.mm:
109 (PluginStopDeferrer::PluginStopDeferrer):
110 (PluginStopDeferrer::~PluginStopDeferrer):
111 (WebNetscapePluginStream::startStream):
112 (WebNetscapePluginStream::wantsAllStreams):
113 (WebNetscapePluginStream::destroyStream):
115 2009-03-17 Darin Adler <darin@apple.com>
117 Reviewed by Adele Peterson.
119 <rdar://problem/6687005> Need support for new move-left/right selectors.
121 * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list.
122 * WebView/WebView.mm: Ditto.
124 2009-03-17 Darin Adler <darin@apple.com>
126 Reviewed by Adele Peterson.
128 Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
129 https://bugs.webkit.org/show_bug.cgi?id=24477
130 rdar://problem/6674184
132 * WebView/WebHTMLView.mm:
133 (responderChainRespondsToSelector): Added.
134 (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
135 can find a responder that responds to this selector rather than always assuming
136 the selector will not be handled.
138 2009-03-17 Mark Rowe <mrowe@apple.com>
142 * Plugins/Hosted/HostedNetscapePluginStream.mm:
144 2009-03-17 David Kilzer <ddkilzer@apple.com>
146 Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
148 Reviewed by Darin Adler.
150 WebKit r30323 added -_webcore_MIMEType to fix issues with
151 incorrect MIME types in NS[HTTP]URLResponse objects. However,
152 uses of -[NSURLResponse MIMEType] still persist in WebKit that
153 should be switched to use -_webcore_MIMEType. Note that
154 -[WebDataSource _responseMIMEType] calls back into WebCore to
155 get the MIME type from the ResourceResponse object, which has
156 already retrieved it via -_webcore_MIMEType.
158 * Plugins/Hosted/HostedNetscapePluginStream.mm:
159 (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
161 * Plugins/WebBaseNetscapePluginStream.mm:
162 (WebNetscapePluginStream::didReceiveResponse): Ditto.
163 * Plugins/WebNetscapePluginView.mm:
164 (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
165 * Plugins/WebPluginController.mm:
166 (-[WebPluginController pluginView:receivedResponse:]): Ditto.
167 * WebView/WebHTMLRepresentation.mm:
168 (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
169 -[WebDataSource _responseMIMEType] instead.
170 * WebView/WebPDFRepresentation.m:
171 (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
172 * WebView/WebPDFView.mm:
173 (-[WebPDFView menuForEvent:]): Ditto.
175 2009-03-17 Simon Fraser <simon.fraser@apple.com>
177 Reviewed by Darin Adler
179 https://bugs.webkit.org/show_bug.cgi?id=24396
181 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
185 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
187 Reviewed by Mark Rowe.
189 Get BUILDING_ON_* defines from Platform.h.
191 https://bugs.webkit.org/show_bug.cgi?id=24630
195 2009-03-16 Darin Adler <darin@apple.com>
197 Reviewed by Dan Bernstein.
199 <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
201 * WebCoreSupport/WebViewFactory.mm:
202 (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
203 post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
204 (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
206 2009-03-16 Anders Carlsson <andersca@apple.com>
208 Reviewed by Oliver Hunt.
210 Don't mig_deallocate random data in case an instance proxy method returns false.
212 * Plugins/Hosted/NetscapePluginHostProxy.mm:
219 2009-03-16 Anders Carlsson <andersca@apple.com>
221 Reviewed by Oliver Hunt.
223 <rdar://problem/6633944>
224 REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
226 Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
228 * Plugins/WebPluginController.mm:
229 (-[WebPluginController addPlugin:]):
231 2009-03-16 Anders Carlsson <andersca@apple.com>
233 Reviewed by Sam Weinig.
235 Fix <rdar://problem/6622601>
237 Make sure to update both the window frame and the plug-in frame.
239 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
240 (-[WebHostedNetscapePluginView addWindowObservers]):
242 2009-03-15 Dan Bernstein <mitz@apple.com>
244 Reviewed by Adele Peterson.
246 - fix <rdar://problem/6607773> WebKit should support the "Default"
247 paragraph writing direction -- or at least validate the menu item
250 Made WebHTMLView validate user interface items with the selector
251 -makeBaseWritingDirectionNatural: by returning NO and, if the item is
252 a menu item, setting its state to "off".
254 Strictly speaking, since -makeBaseWritingDirectionNatural: is never
255 valid for WebViews, WebHTMLView should not need to respond to it and
256 validate it, however because other responders respond to all three
257 -makeBaseWritingDirection*: messages and set the menu item state, having
258 WebHTMLView do the same makes application developers' lives easier.
260 * WebView/WebHTMLView.mm:
261 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
262 (-[WebHTMLView makeBaseWritingDirectionNatural:]):
264 2009-03-13 Mark Rowe <mrowe@apple.com>
266 Rubber-stamped by Dan Bernstein.
268 Take advantage of the ability of recent versions of Xcode to easily switch the active
271 * Configurations/DebugRelease.xcconfig:
273 2009-03-13 Anders Carlsson <andersca@apple.com>
275 Reviewed by Kevin Decker and Geoffrey Garen.
277 <rdar://problem/6590384>
278 REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
280 When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call,
281 and thus calling -[WebView hostWindow] will crash since _private is nil.
283 * WebView/WebView.mm:
284 (-[WebView hostWindow]):
286 2009-03-13 Anders Carlsson <andersca@apple.com>
288 And yet another attempt...
290 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
291 (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
292 (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
293 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
295 2009-03-13 Anders Carlsson <andersca@apple.com>
297 Another attempt at fixing the build.
299 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
300 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
302 2009-03-13 Anders Carlsson <andersca@apple.com>
304 Try to fix the SL build.
306 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
307 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
308 (WebNetscapePluginEventHandlerCocoa::keyDown):
310 2009-03-13 Greg Bolsinga <bolsinga@apple.com>
312 Reviewed by Simon Fraser.
314 Update Geolocation perimission dialogs to be asynchronous.
315 https://bugs.webkit.org/show_bug.cgi?id=24505
317 WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
318 coding style set by WebSecurityOrigin.
320 WebChromeClient now calls the private UI delegate method
321 -webView:frame:requestGeolocationPermission:securityOrigin:
323 * WebCoreSupport/WebChromeClient.h:
324 * WebCoreSupport/WebChromeClient.mm:
325 (WebChromeClient::requestGeolocationPermissionForFrame):
326 * WebCoreSupport/WebGeolocation.mm: Added.
328 (-[WebGeolocation shouldClearCache]):
329 (-[WebGeolocation setIsAllowed:]):
330 (-[WebGeolocation dealloc]):
331 * WebCoreSupport/WebGeolocationInternal.h: Added.
332 * WebCoreSupport/WebGeolocationPrivate.h: Added.
333 * WebView/WebUIDelegatePrivate.h:
335 2009-03-13 Anders Carlsson <andersca@apple.com>
337 Reviewed by Dan Bernstein.
339 <rdar://problem/6610666> Revise the Cocoa event model text API
341 Replace the text input API with a simpler API that uses a separate text input window.
343 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
344 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
345 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
346 Initialize m_keyEventHandler to 0.
348 (WebNetscapePluginEventHandlerCocoa::keyDown):
349 If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
351 (WebNetscapePluginEventHandlerCocoa::focusChanged):
352 Install/remove the key event handler as needed.
354 (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
355 Get the text and send a TextInput event.
357 * Plugins/WebNetscapePluginView.h:
358 * Plugins/WebNetscapePluginView.mm:
359 Remove the old text input API.
361 (-[WebNetscapePluginView inputContext]):
362 Always return nil here.
365 * Plugins/nptextinput.h: Removed.
367 2009-03-12 Anders Carlsson <andersca@apple.com>
369 Reviewed by Mike Thole and Mark Rowe.
371 Fix <rdar://problem/6624105>.
373 Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
375 * Plugins/Hosted/NetscapePluginHostProxy.mm:
376 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
378 2009-03-12 Anders Carlsson <andersca@apple.com>
380 Reviewed by Geoffrey Garen.
382 WebKit side of <rdar://problem/6607801>
384 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
385 (WebKit::NetscapePluginInstanceProxy::destroy):
386 Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
388 * Plugins/Hosted/WebKitPluginHost.defs:
389 Add requestID parameter.
391 2009-03-12 Kevin Decker <kdecker@apple.com>
393 Reviewed by Anders Carlsson.
395 * Plugins/WebNetscapePluginPackage.mm:
396 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
398 2009-03-12 Kevin Decker <kdecker@apple.com>
400 Reviewed by Anders Carlsson.
402 Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
404 This fix addresses crashes in both Silverlight and ChemDraw. This type of crash would occur because AppKit still
405 had a reference to open windows that the plugin created (which no longer exist).
407 * Plugins/WebNetscapePluginPackage.mm:
408 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown.
410 2009-03-11 David Kilzer <ddkilzer@apple.com>
412 Remove duplicate header include
414 Rubber-stamped by Mark Rowe.
416 * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
417 Also realphabetized lowercase #include statements.
419 2009-03-11 David Kilzer <ddkilzer@apple.com>
421 Clarify comments regarding order of FEATURE_DEFINES
423 Rubber-stamped by Mark Rowe.
425 * Configurations/WebKit.xcconfig: Added warning about the
426 consequences when FEATURE_DEFINES are not kept in sync.
428 2009-03-11 Anders Carlsson <andersca@apple.com>
430 Reviewed by Sam Weinig.
432 WebKit side of <rdar://problem/6656147>.
434 * Plugins/Hosted/NetscapePluginHostManager.mm:
435 (WebKit::NetscapePluginHostManager::instantiatePlugin):
436 Pass the requestID to _WKPHInstantiatePlugin.
438 * Plugins/Hosted/NetscapePluginHostProxy.mm:
439 Pass the requestID to setCurrentReply.
441 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
442 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
443 Store the reply in a map with the requestID as the key.
445 (WebKit::NetscapePluginInstanceProxy::waitForReply):
446 Wait for a reply that matches the given requestID.
448 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
449 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
450 Initialize member variables.
452 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
455 (WebKit::NetscapePluginInstanceProxy::print):
456 Pass the requestID to _WKPHPluginInstancePrint.
458 (WebKit::NetscapePluginInstanceProxy::loadRequest):
459 Rename m_currentRequestID to m_currentURLRequestID.
461 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
462 Process requests until we find a reply with the right requestID.
464 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
465 Pass a requestID to the _WKPH function.
467 (WebKit::NetscapePluginInstanceProxy::nextRequestID):
470 * Plugins/Hosted/ProxyInstance.mm:
471 Pass a requestID to the _WKPH functions.
473 * Plugins/Hosted/WebKitPluginClient.defs:
474 * Plugins/Hosted/WebKitPluginHost.defs:
475 Add requestID parameters.
477 2009-03-11 Anders Carlsson <andersca@apple.com>
479 Reviewed by Darin Adler.
481 Fix <rdar://problem/6620064>.
483 * Plugins/WebPluginContainerPrivate.h:
485 2009-03-10 Xan Lopez <xlopez@igalia.com>
487 Build fix, no review.
489 * WebView/WebFrame.mm:
490 (-[WebFrame _smartDeleteRangeForProposedRange:]):
492 2009-03-09 Anders Carlsson <andersca@apple.com>
494 Reviewed by Kevin Decker.
496 WebKit side of <rdar://problem/6530007>
498 * Plugins/Hosted/NetscapePluginHostProxy.mm:
500 Call NetscapePluginInstanceProxy::enumerate.
502 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
503 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
504 (WebKit::NetscapePluginInstanceProxy::enumerate):
505 Enumerate the JS object and serialize its values.
507 * Plugins/Hosted/ProxyInstance.h:
508 * Plugins/Hosted/ProxyInstance.mm:
509 (WebKit::ProxyInstance::getPropertyNames):
510 Ask the plug-in host to get the property names and deserialize them.
512 * Plugins/Hosted/WebKitPluginClient.defs:
513 * Plugins/Hosted/WebKitPluginHost.defs:
515 2009-03-09 Simon Fraser <simon.fraser@apple.com>
517 Reviewed by Oliver Hunt and Cameron Zwarich
519 https://bugs.webkit.org/show_bug.cgi?id=24440
521 The sublayer added to WebHTMLView to host accelerated compositing layers needs to
522 be a subclass of NSView which allows context menu clicks through.
524 * WebView/WebHTMLView.mm:
525 (-[WebLayerHostingView rightMouseDown:]):
526 (-[WebHTMLView attachRootLayer:]):
528 2009-03-08 Mark Rowe <mrowe@apple.com>
530 Reviewed by Oliver Hunt.
532 Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
533 Frame.h no longer needs to include it. This cuts the size of the symbols
534 for a debug build by around 3%.
536 * Plugins/WebNetscapePluginView.mm:
537 * WebView/WebFrame.mm:
538 (-[WebFrame _scrollDOMRangeToVisible:]):
539 (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
540 (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
541 * WebView/WebHTMLView.mm:
542 (-[WebHTMLView jumpToSelection:]):
543 (-[WebHTMLView centerSelectionInVisibleArea:]):
545 2009-03-07 Dan Bernstein <mitz@apple.com>
547 Reviewed by Alexey Proskuryakov.
549 - fix a bug where debug builds were clearing the HTML5 application cache
550 on application termination
552 * WebView/WebView.mm:
553 (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
556 2009-03-06 Douglas R. Davidson <ddavidso@apple.com>
558 Reviewed by Justin Garcia.
560 https://bugs.webkit.org/show_bug.cgi?id=24108
562 Update spelling and grammar checking to use the new combined text
563 checking (with automatic language identification) on Snow Leopard.
565 * WebCoreSupport/WebEditorClient.h:
566 * WebCoreSupport/WebEditorClient.mm:
567 (WebEditorClient::checkSpellingAndGrammarOfParagraph):
569 2009-03-05 Adele Peterson <adele@apple.com>
571 Reviewed by Darin Adler.
573 Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
574 <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
575 <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
577 * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
578 If WebKit does not support the command, we need to pass the selector to super. In this case,
579 we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:]
580 can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no
581 example of that happening and causing broken behavior.
583 2009-03-04 Mark Rowe <mrowe@apple.com>
585 Reviewed by Dan Bernstein.
587 <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
589 * WebView/WebHTMLView.mm:
590 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
592 2009-03-04 Adam Barth <abath@webkit.org>
594 Reviewed by Alexey Proskuryakov.
596 https://bugs.webkit.org/show_bug.cgi?id=24356
598 Fix WebKit style for allowUniversalAccessFromFileURLs.
600 * WebView/WebPreferenceKeysPrivate.h:
601 * WebView/WebPreferences.mm:
602 (+[WebPreferences initialize]):
603 (-[WebPreferences allowUniversalAccessFromFileURLs]):
604 (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
605 * WebView/WebPreferencesPrivate.h:
606 * WebView/WebView.mm:
607 (-[WebView _preferencesChangedNotification:]):
609 2009-03-03 David Kilzer <ddkilzer@apple.com>
611 <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
613 Reviewed by Mark Rowe.
615 The fix is to add INSTALLHDRS_COPY_PHASE = YES and
616 INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
617 make sure various build phase scripts work with the installhdrs
620 * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
621 based on PLATFORM_NAME to work around the missing definition on
623 * Configurations/WebKit.xcconfig: Added
624 WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
625 UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
626 Xcode project file. Added INSTALLHDRS_COPY_PHASE = YES and
627 INSTALLHDRS_SCRIPT_PHASE = YES.
629 2009-03-03 David Kilzer <ddkilzer@apple.com>
631 Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
633 Reviewed by Adam Roben.
635 Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
636 since NPAPI headers had migrated from JavaScriptCore to WebCore
639 * Configurations/WebKit.xcconfig: Removed definition of
640 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
642 2009-03-03 Anders Carlsson <andersca@apple.com>
644 Reviewed by Darin Adler.
646 Fix <rdar://problem/6633834>.
648 * Plugins/Hosted/NetscapePluginHostManager.mm:
649 (WebKit::NetscapePluginHostManager::instantiatePlugin):
650 Create a new plug-in instance if the plug-in host has crashed.
652 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
653 (WebKit::NetscapePluginInstanceProxy::invalidate):
654 Add a null check for the plug-in host proxy.
656 2009-03-02 Sam Weinig <sam@webkit.org>
658 Reviewed by Mark Rowe.
660 Enable Geolocation (except on Tiger and Leopard).
662 * Configurations/WebKit.xcconfig:
664 2009-03-02 Anders Carlsson <andersca@apple.com>
666 Reviewed by Dan Bernstein.
668 WebKit part of <rdar://problem/6638658>.
670 * Plugins/Hosted/NetscapePluginHostManager.h:
671 * Plugins/Hosted/NetscapePluginHostManager.mm:
672 (WebKit::NetscapePluginHostManager::createPropertyListFile):
673 Spawn the plug-in host and wait for it to create the property list.
675 * Plugins/WebBasePluginPackage.mm:
676 (-[WebBasePluginPackage createPropertyListFile]):
677 Factor code out into a new method.
679 (-[WebBasePluginPackage pListForPath:createFile:]):
680 Call the newly added createPropertyListFile method.
682 * Plugins/WebNetscapePluginPackage.mm:
683 (-[WebNetscapePluginPackage createPropertyListFile]):
684 Tell the plug-in host manager to create a property list file for us.
686 2009-03-02 Sam Weinig <sam@webkit.org>
688 Reviewed by Geoffrey Garen.
690 Fix for <rdar://problem/6507404> Add Geolocation support.
692 This is not yet turned on for any Mac platform.
694 Add SPI to ask the embedding application whether to allow
695 Geolocation for an origin.
697 * WebCoreSupport/WebChromeClient.h:
698 * WebCoreSupport/WebChromeClient.mm:
699 (WebChromeClient::shouldAllowGeolocationForFrame):
700 * WebView/WebUIDelegatePrivate.h:
702 2009-03-02 Anders Carlsson <andersca@apple.com>
706 * Plugins/WebNetscapePluginPackage.mm:
707 (-[WebNetscapePluginPackage _tryLoad]):
709 2009-03-02 Anders Carlsson <andersca@apple.com>
711 Reviewed by John Sullivan, Ada Chan.
713 Factor loading code out into its own method and get rid of a bunch of gotos.
715 * Plugins/WebNetscapePluginPackage.mm:
716 (-[WebNetscapePluginPackage _tryLoad]):
717 (-[WebNetscapePluginPackage load]):
719 2009-03-02 Anders Carlsson <andersca@apple.com>
723 * Plugins/WebNetscapeDeprecatedFunctions.h:
725 2009-03-02 Anders Carlsson <andersca@apple.com>
727 Reviewed by John Sullivan.
729 Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
731 * Plugins/WebNetscapePluginPackage.m: Removed.
732 * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
734 2009-03-01 Anders Carlsson <andersca@apple.com>
736 Reviewed by Sam Weinig.
738 WebKit side of <rdar://problem/6449689>
740 Pass the visible name to the plug-in host.
742 * Plugins/Hosted/NetscapePluginHostManager.mm:
743 (WebKit::NetscapePluginHostManager::spawnPluginHost):
745 2009-02-27 Alice Liu <alice.liu@apple.com>
747 Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
748 extension to images that already have .jpg extension
750 Reviewed by Oliver Hunt.
752 * WebView/WebHTMLView.mm:
753 (-[NSString matchesExtensionEquivalent:]):
754 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
755 Relax the check for the proper extension to allow for known
756 equivalents, special-cased in matchesExtensionEquivalent function.
758 2009-02-27 Anders Carlsson <andersca@apple.com>
760 Reviewed by Geoffrey Garen.
762 <rdar://problem/6631436>
763 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
765 Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
767 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
768 (WebKit::NetscapePluginInstanceProxy::evaluate):
770 2009-02-27 Anders Carlsson <andersca@apple.com>
772 Reviewed by Geoffrey Garen.
774 WebKit side of <rdar://problem/6626814>.
776 * Plugins/Hosted/NetscapePluginHostProxy.mm:
778 Make InvokeDefault async.
780 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
781 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
782 Handle passing NPObjects back to the plug-in host.
784 * Plugins/Hosted/ProxyInstance.h:
785 (WebKit::ProxyInstance::objectID):
788 * Plugins/Hosted/WebKitPluginClient.defs:
789 Make InvokeDefault a simpleroutine.
791 2009-02-27 Timothy Hatcher <timothy@apple.com>
793 Fixes an exception by null checking the WebResource before adding it to
794 the subresources array.
796 <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
798 Reviewed by Geoff Garen and Anders Carlsson.
800 * WebView/WebDataSource.mm:
801 (-[WebDataSource subresources]): Null check the WebResource before adding it.
803 2009-02-27 Timothy Hatcher <timothy@apple.com>
805 Adds a workaround for Automator creating a WebView from a secondary thread.
807 <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
808 secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
810 Reviewed by Geoff Garen.
812 * WebView/WebView.mm:
813 (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
815 2009-02-27 Adam Barth <abarth@webkit.org>
817 Reviewed by Eric Seidel.
819 Add a preference to reduce the power of file:// URLs.
821 * WebView/WebPreferenceKeysPrivate.h:
822 * WebView/WebPreferences.mm:
823 (+[WebPreferences initialize]):
824 (-[WebPreferences allowUniversalAccessFromFileUrls]):
825 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
826 * WebView/WebPreferencesPrivate.h:
827 * WebView/WebView.mm:
828 (-[WebView _preferencesChangedNotification:]):
830 2009-02-27 Simon Fraser <simon.fraser@apple.com>
832 Reviewed by Anders Carlsson
834 https://bugs.webkit.org/show_bug.cgi?id=24242
836 setCursor(), and resetCursorRects() on Tiger, were using global, not local
837 coordinates for elementAtPoint:
839 * WebView/WebHTMLView.mm:
843 2009-02-27 Adam Barth <abarth@webkit.org>
845 Reviewed by Eric Seidel.
847 Add a preference to reduce the power of file:// URLs.
849 * WebView/WebPreferenceKeysPrivate.h:
850 * WebView/WebPreferences.mm:
851 (+[WebPreferences initialize]):
852 (-[WebPreferences allowUniversalAccessFromFileUrls]):
853 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
854 * WebView/WebPreferencesPrivate.h:
855 * WebView/WebView.mm:
856 (-[WebView _preferencesChangedNotification:]):
858 2009-02-26 Adele Peterson <adele@apple.com>
860 Reviewed by Geoff Garen.
862 Fix for <rdar://problem/6618166>
863 https://bugs.webkit.org/show_bug.cgi?id=24216
864 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
866 During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
867 we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
868 This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
870 In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
871 fixed in r36919 and r38570 are still fixed.
873 * WebView/WebHTMLView.mm:
874 (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
875 (-[WebHTMLView _isResigningFirstResponder]): Added.
876 * WebView/WebHTMLViewInternal.h:
877 * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
878 if the document view is currently resigning first responder.
880 2009-02-25 Anders Carlsson <andersca@apple.com>
882 Reviewed by Kevin Decker.
884 Fix <rdar://problem/6623697>.
886 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
887 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
888 (WebKit::NetscapePluginInstanceProxy::print):
889 Ask the plug-in host to print, create a CGImage of the returned bytes and draw
890 the image into the passed in context.
892 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
893 (-[WebHostedNetscapePluginView drawRect:]):
894 When printing, call NetscapePluginInstanceProxy::print.
896 * Plugins/Hosted/WebKitPluginHost.defs:
898 2009-02-19 Alexey Proskuryakov <ap@webkit.org>
900 Reviewed by Darin Adler.
902 https://bugs.webkit.org/show_bug.cgi?id=24024
903 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
904 archiving a submission to about:blank
906 I don't know how to make an automated test for this bug.
908 * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
909 Account for the fact that HTTP method may be non-empty for non-HTTP requests.
911 2009-02-25 Chris Fleizach <cfleizach@apple.com>
913 Reviewed by Beth Dakin.
916 Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
917 https://bugs.webkit.org/show_bug.cgi?id=24143
919 * WebView/WebFrame.mm:
920 (-[WebFrame _accessibilityTree]):
922 2009-02-25 Simon Fraser <simon.fraser@apple.com>
924 Build fix with ACCELERATED_COMPOSITING turned on.
926 I missed a spot in my last commit in renaming to
927 _stoppedAcceleratedCompositingForFrame:
929 * WebView/WebHTMLView.mm:
930 (-[WebHTMLView close]):
932 2009-02-25 Simon Fraser <simon.fraser@apple.com>
934 Reviewed by Dan Bernstein
936 https://bugs.webkit.org/show_bug.cgi?id=23854
938 Make an observable property, _isUsingAcceleratedCompositing, on
939 WebView that DumpRenderTree can use to specialize behavior.
941 This is implemented via a count of Frames that are using
942 accelerated compositing.
944 * WebView/WebHTMLView.mm:
945 (-[WebHTMLViewPrivate clear]):
946 (-[WebHTMLView close]):
947 (-[WebHTMLView attachRootLayer:]):
948 (-[WebHTMLView detachRootLayer]):
949 * WebView/WebView.mm:
950 (+[WebView automaticallyNotifiesObserversForKey:]):
951 (-[WebView _startedAcceleratedCompositingForFrame:]):
952 (-[WebView _stoppedAcceleratedCompositingForFrame:]):
953 (-[WebView _isUsingAcceleratedCompositing]):
954 * WebView/WebViewInternal.h:
955 * WebView/WebViewPrivate.h:
957 2009-02-24 Sam Weinig <sam@webkit.org>
959 Reviewed by Geoffrey Garen.
961 Related to <rdar://problem/6590295>
962 Allow disabling javascript: urls.
964 * WebView/WebView.mm:
965 (-[WebView _setJavaScriptURLsAreAllowed:]):
966 * WebView/WebViewPrivate.h:
968 2009-02-24 Mark Rowe <mrowe@apple.com>
970 Reviewed by Oliver Hunt.
972 <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
974 * Carbon/CarbonUtils.h:
975 * Carbon/HIWebView.h:
976 * Plugins/WebPlugin.h:
977 * Plugins/WebPluginViewFactory.h:
978 * WebView/WebUIDelegate.h:
980 2009-02-24 Peter Ammon <pammon@apple.com>
982 Reviewed by Mark Rowe.
984 Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
986 * WebView/WebHTMLView.mm:
987 (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
988 both the send and return type. We should also handle a nil send or return type by ignoring
989 the argument and returning whether we can handle the other type passed in.
991 2009-02-23 Anders Carlsson <andersca@apple.com>
993 Reviewed by Geoffrey Garen and Darin Adler.
995 WebKit side of <rdar://problem/6613151>.
997 Make sure to vm_deallocate all memory we get from MIG callbacks.
999 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1000 (DataDeallocator::DataDeallocator):
1001 (DataDeallocator::~DataDeallocator):
1002 Add a simple deallocator class.
1006 (WKPCBooleanAndDataReply):
1008 (WKPCGetStringIdentifier):
1010 (WKPCInvokeDefault):
1013 Use the new deallocator class.
1015 2009-02-23 Anders Carlsson <andersca@apple.com>
1017 Reviewed by Darin Adler.
1019 Fix <rdar://problem/6450656>.
1021 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1022 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1023 (WebKit::NetscapePluginInstanceProxy::insertText):
1024 Add insert text which just calls the new WKPH function.
1026 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1027 (-[WebHostedNetscapePluginView inputContext]):
1028 Get the input context from the shared input panel.
1030 (-[WebHostedNetscapePluginView keyDown:]):
1031 Let the shared input panel have a go at the event first.
1033 * Plugins/Hosted/WebKitPluginHost.defs:
1034 Add new InsertText function.
1036 2009-02-23 Mark Rowe <mrowe@apple.com>
1038 Fix the build after r41126.
1040 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1041 (WebKit::NetscapePluginInstanceProxy::invoke):
1042 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
1043 (WebKit::NetscapePluginInstanceProxy::construct):
1045 2009-02-22 Dan Bernstein <mitz@apple.com>
1047 Reviewed by Darin Adler.
1049 - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
1051 * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
1052 in r30741, and assign the height value, rather than the width, to the
1055 2009-02-21 Anders Carlsson <andersca@apple.com>
1059 * Plugins/Hosted/WebTextInputWindowController.m:
1061 2009-02-20 Anders Carlsson <andersca@apple.com>
1063 Reviewed by Dan Bernstein.
1065 Add a shared floating text input window implementation, to be used by the hosted plug-in view.
1067 * Plugins/Hosted/WebTextInputWindowController.h: Added.
1068 * Plugins/Hosted/WebTextInputWindowController.m: Added.
1070 2009-02-20 Kevin Decker <kdecker@apple.com>
1072 Reviewed by andersca.
1074 <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
1076 Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
1077 we are trying to set. Depending on what other I/O is going on, it can take some time.
1079 * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
1080 (setMetaData): Added. Calls WKSetMetadataURL().
1081 (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
1083 2009-02-19 Dan Bernstein <mitz@apple.com>
1085 Reviewed by Sam Weinig.
1087 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
1088 Do not send loader callbacks during CSS styling
1090 * WebView/WebView.mm:
1091 (-[WebView _preferencesChangedNotification:]): Reverted the
1092 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
1094 2009-02-18 Dan Bernstein <mitz@apple.com>
1096 Reviewed by Brady Eidson.
1098 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
1100 * WebView/WebView.mm:
1101 (-[WebView _preferencesChangedNotification:]): Activate the WebCore
1102 workaround for this crash in iChat.
1104 2009-02-18 Anders Carlsson <andersca@apple.com>
1106 Reviewed by Sam Weinig.
1108 Fix for <rdar://problem/6542390>
1110 There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
1111 would cause a load to begin.
1113 * Plugins/WebNetscapePluginView.mm:
1114 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
1116 2009-02-18 Adam Roben <aroben@apple.com>
1118 Add SPI to get WebKit's custom pointing-hand cursor
1120 Reviewed by John Sullivan.
1122 * WebView/WebView.mm:
1123 (+[WebView _pointingHandCursor]): Added. Returns the custom
1124 pointing-hand cursor that WebKit uses.
1125 * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
1127 2009-02-17 Eric Carlson <eric.carlson@apple.com>
1129 Reviewed by Antti Koivisto.
1131 https://bugs.webkit.org/show_bug.cgi?id=23917
1132 Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
1135 * Plugins/WebPluginContainerPrivate.h:
1136 * Plugins/WebPluginController.mm:
1137 (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
1138 (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
1139 (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
1141 * WebCoreSupport/WebFrameLoaderClient.mm:
1142 (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
1143 file extension, only want a match for the new MIME type proxy plug-ins should have.
1145 2009-02-13 Anders Carlsson <andersca@apple.com>
1147 Reviewed by Kevin Decker.
1149 <rdar://problem/6584834> ESPN radio live stream link hangs Safari
1151 When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
1152 defer destruction until we're done executing the script.
1154 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1155 (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
1156 (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
1157 Add a simple RAII object for deferring destruction of the plug-in instance.
1161 (WKPCInvokeDefault):
1165 (WKPCRemoveProperty):
1168 Use the PluginDestroyDeferrer.
1170 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1171 (WebKit::NetscapePluginInstanceProxy::pluginID):
1172 Assert that the plug-in ID is not 0 here.
1174 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1175 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
1176 Initialize the call depth.
1178 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
1179 Set the plug-in ID to 0 to aid debugging.
1181 (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
1182 Increment the call depth.
1184 (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
1185 Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
1187 (WebKit::NetscapePluginInstanceProxy::shouldStop):
1188 If we're called this with a non-zero call depth, set shouldStopSoon to true.
1190 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1191 (-[WebHostedNetscapePluginView shouldStop]):
1194 2009-02-12 Brady Eidson <beidson@apple.com>
1196 Reviewed by Kevin Decker
1198 <rdar://problem/6582180> - Wrong HTTP method applied to history item.
1200 * WebCoreSupport/WebFrameLoaderClient.mm:
1201 (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
1204 2009-02-12 Anders Carlsson <andersca@apple.com>
1206 Reviewed by Kevin Decker.
1208 <rdar://problem/6579412>
1209 REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
1211 * Plugins/WebNetscapePluginView.h:
1212 * Plugins/WebNetscapePluginView.mm:
1213 (-[WebNetscapePluginView userAgent]):
1214 Apply workaround for Silverlight workaround.
1216 (-[WebNetscapePluginView _createPlugin]):
1217 Check if the plug-in that we're creating is the silverlight plug-in.
1219 2009-02-12 Brady Eidson <beidson@apple.com>
1221 Reviewed by Darin Adler
1223 Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
1225 * History/WebBackForwardList.mm:
1226 (-[WebBackForwardList dealloc]): Null check before deref()'ing.
1227 (-[WebBackForwardList finalize]): Ditto.
1229 * Misc/WebIconFetcher.mm:
1230 (-[WebIconFetcher dealloc]): Null check before deref()'ing.
1231 (-[WebIconFetcher finalize]): Ditto.
1233 * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
1234 (-[WebEditCommand initWithEditCommand:]):
1235 (-[WebEditCommand dealloc]):
1236 (-[WebEditCommand finalize]):
1237 (-[WebEditCommand command]):
1239 * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
1240 (-[WebArchivePrivate init]):
1241 (-[WebArchivePrivate initWithCoreArchive:]):
1242 (-[WebArchivePrivate coreArchive]):
1243 (-[WebArchivePrivate setCoreArchive:]):
1244 (-[WebArchivePrivate dealloc]):
1245 (-[WebArchivePrivate finalize]):
1247 * WebView/WebDataSource.mm:
1248 (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
1249 (-[WebDataSourcePrivate finalize]): Ditto.
1251 2009-02-12 Brady Eidson <beidson@apple.com>
1253 Reviewed by Kevin Decker
1255 <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
1257 NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
1258 fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
1259 WebArchive object, things started getting weird.
1261 * WebView/WebArchive.mm:
1262 (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
1263 (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
1264 (-[WebArchivePrivate finalize]): Ditto
1265 (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
1267 2009-02-11 Mark Rowe <mrowe@apple.com>
1271 * History/WebHistory.mm:
1272 (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
1274 2009-02-11 Brady Eidson <beidson@apple.com>
1276 Reviewed by Mark Rowe
1278 <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
1280 Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
1281 and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
1282 which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
1284 * History/WebHistory.mm:
1285 (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
1286 (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
1287 if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
1288 recent entry for a given URL will be used.
1289 (-[WebHistoryPrivate addItems:]):
1290 (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
1292 2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
1294 Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
1295 This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
1297 Reviewed by Timothy Hatcher.
1299 * WebCoreSupport/WebInspectorClient.h:
1300 * WebCoreSupport/WebInspectorClient.mm:
1301 (WebInspectorClient::hiddenPanels):
1303 2009-02-11 Alexey Proskuryakov <ap@webkit.org>
1305 Reviewed by Darin Adler.
1307 <rdar://problem/6562920> Pasted text should be normalized to NFC
1309 * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
1310 -[NSString precomposedStringWithCanonicalMapping].
1312 * WebCoreSupport/WebPasteboardHelper.mm:
1313 (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
1315 * WebView/WebHTMLView.mm:
1316 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
1317 Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
1318 precomposed already, and the conversion is performed outside WebKit for those anyway.
1320 2009-02-10 John Sullivan <sullivan@apple.com>
1322 Reviewed by Dan Bernstein
1324 <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
1325 Negative visit counts stored in History.plist aren't corrected.
1327 It's not clear how a huge negative visit count ended up in History.plist, but we can't
1328 trust data read from disk so we can at least reset this to something sane. WebCore has
1329 no guard against a visit count overflowing an int, but that seems very unlikely to have
1332 * History/WebHistoryItem.mm:
1333 (-[WebHistoryItem initFromDictionaryRepresentation:]):
1334 If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
1335 weekly visit count is in the dictionary, replace it with 0.
1337 2009-02-10 John Sullivan <sullivan@apple.com>
1339 Reviewed by Dan Bernstein
1341 <https://bugs.webkit.org/show_bug.cgi?id=23891>
1342 [WebHistoryItem _setVisitCount:] is unused and should be removed
1344 * History/WebHistoryItem.mm:
1345 (-[WebHistoryItem _setVisitCount:]):
1346 removed this unused method, which is a synonym for setVisitCount: that was introduced
1347 recently and abandoned even more recently
1349 * History/WebHistoryItemInternal.h:
1350 removed declaration of _setVisitCount:
1352 2009-02-10 Anders Carlsson <andersca@apple.com>
1354 Reviewed by Mark Rowe.
1356 <rdar://problem/6573916>
1357 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
1359 * Plugins/Hosted/NetscapePluginHostManager.mm:
1360 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1361 If we failed to instantiate the plug-in, invalidate the instance proxy.
1363 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1364 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1365 (WebKit::NetscapePluginInstanceProxy::invalidate):
1366 Remove the instance from the plug-in host's set.
1368 (WebKit::NetscapePluginInstanceProxy::destroy):
1371 2009-02-09 Mark Rowe <mrowe@apple.com>
1373 Reviewed by Dan Bernstein.
1375 Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
1376 Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
1378 * WebView/WebHTMLView.mm:
1379 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
1380 yet been initialized if this WebHTMLView was loaded from a nib.
1381 (-[WebHTMLView _removeSuperviewObservers]): Ditto.
1383 2009-02-09 Eric Seidel <eric@webkit.org>
1385 Reviewed by Dave Hyatt.
1387 Rename Selection to VisibleSelection to allow us to separate
1388 the selections the user works with from the ones used by
1389 the JS editing APIs.
1390 https://bugs.webkit.org/show_bug.cgi?id=23852
1392 * WebView/WebFrame.mm:
1393 (-[WebFrame _selectNSRange:]):
1394 * WebView/WebView.mm:
1395 (-[WebView textIteratorForRect:]):
1397 2009-02-06 Anders Carlsson <andersca@apple.com>
1399 Reviewed by Kevin Decker.
1401 Fix crash when plug-in host dies.
1403 * Plugins/Hosted/HostedNetscapePluginStream.mm:
1404 (WebKit::HostedNetscapePluginStream::didFail):
1406 2009-02-05 Eric Seidel <eric@webkit.org>
1408 Reviewed by Justin Garcia.
1410 DOMSelection.getRangeAt() returns a different range than the selection
1411 https://bugs.webkit.org/show_bug.cgi?id=23601
1413 Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
1415 * WebView/WebFrame.mm:
1416 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1417 (-[WebFrame _markDOMRange]):
1418 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
1419 (-[WebFrame _selectedNSRange]):
1420 * WebView/WebHTMLView.mm:
1421 (-[WebHTMLView _selectedRange]):
1422 (-[WebTextCompleteController doCompletion]):
1423 (-[WebHTMLView selectedAttributedString]):
1424 * WebView/WebView.mm:
1425 (-[WebView textIteratorForRect:]):
1426 (-[WebView selectedDOMRange]):
1428 2009-02-06 Geoffrey Garen <ggaren@apple.com>
1430 Reviewed by Sam Weinig.
1432 Part III of <rdar://problem/6552272>.
1434 Refactored to use the redirect data WebCore makes available, instead of
1435 tracking loading state in WebKit.
1437 * History/WebHistory.mm:
1438 (-[WebHistoryPrivate dealloc]):
1439 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
1440 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
1441 * History/WebHistoryInternal.h:
1442 * WebCoreSupport/WebFrameLoaderClient.h:
1443 * WebCoreSupport/WebFrameLoaderClient.mm:
1444 (WebFrameLoaderClient::updateGlobalHistory):
1445 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1447 2009-02-06 Anders Carlsson <andersca@apple.com>
1449 Reviewed by Sam Weinig.
1451 <rdar://problem/6562220>
1452 CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
1454 Make the handling of crashes in the plug-in host more robust.
1456 * Plugins/Hosted/NetscapePluginHostProxy.h:
1459 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1460 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1461 Initialize m_portSet.
1463 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
1466 (WebKit::NetscapePluginHostProxy::processRequests):
1467 Listen for messages on the port set. If we get a message to the port death notification port,
1468 then call pluginHostDied. Otherwise, process the message.
1470 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1471 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1472 (WebKit::NetscapePluginInstanceProxy::cleanup):
1473 Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
1475 (WebKit::NetscapePluginInstanceProxy::destroy):
1478 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
1481 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1482 Call NetscapePluginHostProxy::processRequests.
1484 * Plugins/Hosted/ProxyInstance.mm:
1485 (WebKit::ProxyInstance::invalidate):
1486 Add a null check for the host proxy.
1488 2009-02-06 Dan Bernstein <mitz@apple.com>
1490 - try to fix the Tiger build
1492 * Misc/WebNSArrayExtras.h:
1494 2009-02-06 Anders Carlsson <andersca@apple.com>
1496 Reviewed by Dan Bernstein.
1498 <rdar://problem/6563650>
1499 Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
1501 * Plugins/WebNetscapePluginView.mm:
1502 (-[WebNetscapePluginView loadStream]):
1503 (-[WebNetscapePluginView pluginView:receivedData:]):
1504 (-[WebNetscapePluginView _shouldCancelSrcStream]):
1506 2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com>
1508 Reviewed by Dan Bernstein and Geoff Garen.
1510 - WebKit code to track per-day and per-week visit counts in history
1512 For now this data is only exposed via SPI for performance reasons.
1514 * History/WebHistoryItem.mm:
1515 (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
1517 (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
1518 (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
1519 (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
1520 (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
1521 * History/WebHistoryItemInternal.h: Declare new methods.
1522 * History/WebHistoryItemPrivate.h: Ditto.
1524 * History/WebHistory.mm:
1525 (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
1526 the new _recordInitialVisit method instead of setting visit count to 1.
1528 * Misc/WebNSArrayExtras.h:
1529 * Misc/WebNSArrayExtras.m:
1530 (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
1531 (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
1533 2009-02-05 Aaron Boodman <aa@chromium.org>
1535 Reviewed by Dave Hyatt.
1537 https://bugs.webkit.org/show_bug.cgi?id=23708
1538 Adds documentElementAvailable() callback to FrameLoaderClient.
1540 * WebCoreSupport/WebFrameLoaderClient.h:
1541 Stub out documentElementAvailable().
1542 * WebCoreSupport/WebFrameLoaderClient.mm:
1545 2009-02-05 Dan Bernstein <mitz@apple.com>
1549 * WebView/WebScriptDebugger.mm:
1550 (WebScriptDebugger::initGlobalCallFrame):
1552 2009-02-05 Beth Dakin <bdakin@apple.com>
1554 Reviewed by John Sullivan and Brady Eidson.
1556 Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a
1557 mail note message doesn't display it in Mail's preview pane
1559 This was failing because revision 36962 removed a version of
1560 setVerticalScrollingMode that mail calls. This patch simply adds
1563 * WebView/WebDynamicScrollBarsView.m:
1564 (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
1566 2009-02-04 Anders Carlsson <andersca@apple.com>
1570 * WebView/WebScriptDebugger.mm:
1571 (WebScriptDebugger::initGlobalCallFrame):
1573 2009-02-04 Anders Carlsson <andersca@apple.com>
1575 Reviewed by Sam Weinig.
1577 Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
1579 Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
1581 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1587 * Plugins/Hosted/WebKitPluginClient.defs:
1588 * Plugins/Hosted/WebKitPluginHost.defs:
1590 2009-02-04 Anders Carlsson <andersca@apple.com>
1592 Reviewed by Mark Rowe.
1596 * WebView/WebScriptDebugger.mm:
1597 (WebScriptDebugger::initGlobalCallFrame):
1599 2009-02-04 Geoffrey Garen <ggaren@apple.com>
1601 Reviewed by Mark Rowe.
1603 Part I of <rdar://problem/6552272>.
1605 Clear the redirectURLs entry when first visiting a site, so sites that
1606 only redirect you the first time you visit them can later learn that
1607 they don't redirect.
1609 * History/WebHistory.mm:
1610 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1612 2009-02-04 Timothy Hatcher <timothy@apple.com>
1614 Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
1616 <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
1618 Reviewed by Oliver Hunt.
1620 * WebView/WebScriptDebugDelegate.h:
1622 2009-02-04 Timothy Hatcher <timothy@apple.com>
1624 Switched over from using the WebSafeForwarder for the Script Debug
1625 delegate and added high performance CallScriptDebugDelegate functions.
1627 <rdar://problem/6508457> Launching widget in Dashcode debugger is
1628 super-slow due forwardInvocation: calling debug delegate
1630 Reviewed by Oliver Hunt.
1632 * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
1633 * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
1634 * WebView/WebScriptDebugger.mm:
1635 (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
1636 (WebScriptDebugger::sourceParsed): Ditto.
1637 (WebScriptDebugger::callEvent): Ditto.
1638 (WebScriptDebugger::atStatement): Ditto.
1639 (WebScriptDebugger::returnEvent): Ditto.
1640 (WebScriptDebugger::exception): Ditto.
1641 * WebView/WebView.mm:
1642 (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
1643 (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
1644 method implementations for the script debug delegate. Also caches what
1645 didParseSource method to use.
1646 (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
1647 WebScriptDebugDelegateImplementations structure.
1648 (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
1649 (CallDelegate): Added more overloaded versions that take different arguments.
1650 (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
1651 * WebView/WebViewInternal.h:
1653 2009-02-03 Simon Fraser <simon.fraser@apple.com>
1655 Reviewed by Dave Hyatt
1657 https://bugs.webkit.org/show_bug.cgi?id=23365
1659 Hook up accelerated compositing layers the native
1662 * WebCoreSupport/WebChromeClient.h:
1663 * WebCoreSupport/WebChromeClient.mm:
1664 (WebChromeClient::attachRootGraphicsLayer):
1665 (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1666 New methods to hook up the root GraphicsLayer to the native
1667 view system, and to synchronize layer changes with view-based
1668 drawing when layers come and go.
1670 * WebView/WebHTMLView.mm:
1671 (-[WebHTMLViewPrivate clear]):
1672 Clear the pointer to layerHostingView.
1674 (-[WebHTMLView _setAsideSubviews]):
1675 (-[WebHTMLView willRemoveSubview:]):
1676 Keep the special layer-hosting view in the subviews even
1677 when the rest of the subviews are ripped out for
1680 (-[WebHTMLView _isUsingAcceleratedCompositing]):
1681 New utility method for DumpRenderTree to know if we're
1684 (-[WebHTMLView drawRect:]):
1685 Call -disableScreenUpdatesUntilFlush if we have to
1686 synchronize layer changes with painting.
1688 (-[WebHTMLView attachRootLayer:]):
1689 (-[WebHTMLView detachRootLayer]):
1690 Attach and detach the root GraphicsLayer.
1692 * WebView/WebViewInternal.h:
1693 * WebView/WebHTMLViewInternal.h:
1694 * WebView/WebHTMLViewPrivate.h:
1695 New method declarations.
1697 * WebView/WebView.mm:
1698 (-[WebView _needsOneShotDrawingSynchronization]):
1699 (-[WebView _setNeedsOneShotDrawingSynchronization:]):
1700 Set the flag to say if we need to synchronize layer
1701 changes and painting on the next -drawRect: call.
1703 (-[WebView viewWillMoveToWindow:]):
1704 (-[WebView viewDidMoveToWindow]):
1705 Call new notifications that the view was added to or removed from
1706 the window, which are required by the layer hosting mechanism.
1708 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1712 * Plugins/WebPluginController.mm:
1713 (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
1715 2009-02-02 Geoffrey Garen <ggaren@apple.com>
1717 Reviewed by Sam Weinig.
1719 Track redirects in global history.
1721 * History/WebHistory.mm:
1722 (-[WebHistoryPrivate dealloc]):
1723 (-[WebHistoryPrivate lastVisitedEntry]):
1724 (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
1725 entry in case we're asked to add redirect information to it later.
1727 (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
1728 (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
1729 information in global history.
1731 * History/WebHistoryInternal.h:
1732 * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
1734 * WebCoreSupport/WebFrameLoaderClient.mm:
1735 (WebFrameLoaderClient::updateGlobalHistory):
1736 (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
1737 information in global history.
1739 * WebView/WebFrame.mm:
1740 (-[WebFrame loadRequest:]):
1741 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1742 * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
1744 2009-02-02 Anders Carlsson <andersca@apple.com>
1746 Reviewed by Dan Bernstein.
1748 Work around a limitation in MIG where two functions can't have the same name even if they're
1749 not in the same subsystem.
1751 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1752 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1753 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1754 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
1755 * Plugins/Hosted/WebKitPluginClient.defs:
1756 * Plugins/Hosted/WebKitPluginHost.defs:
1758 2009-02-02 Anders Carlsson <andersca@apple.com>
1760 Reviewed by Sam Weinig.
1762 Implement WKPCGetPluginElementObject.
1764 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1765 (WKPCGetPluginElementNPObject):
1766 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1767 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1768 (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1769 * Plugins/Hosted/WebKitPluginClient.defs:
1770 * Plugins/WebBaseNetscapePluginView.h:
1771 * Plugins/WebBaseNetscapePluginView.mm:
1772 (-[WebBaseNetscapePluginView WebCore::]):
1774 2009-02-02 Anders Carlsson <andersca@apple.com>
1778 * WebView/WebHTMLView.mm:
1780 2009-02-02 Anders Carlsson <andersca@apple.com>
1782 Reviewed by Dan Bernstein.
1784 Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
1786 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1787 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1788 (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1789 * Plugins/WebBaseNetscapePluginView.h:
1790 * Plugins/WebBaseNetscapePluginView.mm:
1791 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1792 (-[WebBaseNetscapePluginView _windowClipRect]):
1793 (-[WebBaseNetscapePluginView visibleRect]):
1794 (-[WebBaseNetscapePluginView dataSource]):
1795 * Plugins/WebKitPluginContainerView.h: Removed.
1796 * Plugins/WebKitPluginContainerView.mm: Removed.
1797 * Plugins/WebNetscapePluginView.h:
1798 * Plugins/WebNetscapePluginView.mm:
1799 (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1800 (-[WebNetscapePluginView getVariable:value:]):
1801 * WebCoreSupport/WebFrameLoaderClient.mm:
1802 (WebFrameLoaderClient::createPlugin):
1804 2009-02-02 Anders Carlsson <andersca@apple.com>
1806 Reviewed by Dan Bernstein.
1808 Update for changes to WebCore.
1810 * WebCoreSupport/WebFrameLoaderClient.h:
1811 * WebCoreSupport/WebFrameLoaderClient.mm:
1812 (WebFrameLoaderClient::createPlugin):
1814 2009-02-02 Anders Carlsson <andersca@apple.com>
1816 Reviewed by Oliver Hunt.
1818 When a new Web View was not created, report back to the plug-in host.
1820 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1821 (WebKit::NetscapePluginInstanceProxy::performRequest):
1822 * Plugins/Hosted/WebKitPluginHost.defs:
1824 2009-02-02 Anders Carlsson <andersca@apple.com>
1826 Reviewed by Kevin Decker.
1828 Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
1830 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1831 (-[WebHostedNetscapePluginView drawRect:]):
1833 2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org>
1835 Reviewed by Darin Adler.
1837 Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
1839 https://bugs.webkit.org/show_bug.cgi?id=23428
1841 FrameView::forceLayout could be killed but the comment might
1842 contain a value over the the plain FrameView::layout...
1844 Adjust the WebCore/WebKit consumers of these methods.
1846 * WebView/WebFrame.mm:
1847 (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1848 * WebView/WebHTMLView.mm:
1849 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1850 (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
1852 2009-01-31 John Sullivan <sullivan@apple.com>
1854 https://bugs.webkit.org/show_bug.cgi?id=23665
1856 Cleaned up code to add/remove NSNotification observers, to avoid performance hit
1857 of calling removeObserver with unspecified notifications, or calling removeObserver
1858 multiple times for the same notification.
1860 Reviewed by Darin Adler
1862 * WebView/WebHTMLView.mm:
1863 added observingMouseMovedNotifications, observingSuperviewNotifications, and
1864 observingWindowNotifications as BOOL ivars of _private object
1865 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
1866 moved to file-internal section of file, added leading underscore, now bails out
1867 if we aren't observing the relevant notifications, now records that we are no longer
1868 observing the relevant notifications
1869 (-[WebHTMLView _removeSuperviewObservers]):
1870 ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
1871 (-[WebHTMLView _removeWindowObservers]):
1873 (-[WebHTMLView close]):
1874 replace general removeObserver: call with three specific calls for all the notifications
1875 that this class actually observes
1876 (-[WebHTMLView addMouseMovedObserver]):
1877 bail out if already observing relevant notifications, now records that we are observing
1878 the relevant notifications
1879 (-[WebHTMLView removeMouseMovedObserver]):
1880 updated for name change
1881 (-[WebHTMLView addSuperviewObservers]):
1882 bail out if already observing relevant notifications, now records that we are observing
1883 the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var
1884 to avoid objc dispatch
1885 (-[WebHTMLView addWindowObservers]):
1887 (-[WebHTMLView viewWillMoveToSuperview:]):
1888 updated for name change
1889 (-[WebHTMLView viewWillMoveToWindow:]):
1890 updated for name changes
1892 2009-01-31 Darin Adler <darin@apple.com>
1894 Reviewed by Mark Rowe.
1896 Fix code that assumes all command selectors end in colons.
1897 rdar://problem/6545874
1899 * WebView/WebHTMLView.mm:
1900 (commandNameForSelector): Don't assert, just return a null string, when
1901 the selector doesn't end in a colon.
1903 2009-01-30 Adam Barth <abarth@webkit.org>
1905 Reviewed by Sam Weinig.
1907 Add a pref to disable web security.
1909 * WebView/WebPreferenceKeysPrivate.h:
1910 * WebView/WebPreferencesPrivate.h:
1911 * WebView/WebPreferences.mm:
1912 (+[WebPreferences initialize]):
1913 (-[WebPreferences isWebSecurityEnabled]):
1914 (-[WebPreferences setWebSecurityEnabled:]):
1915 * WebView/WebView.mm:
1916 (-[WebView _preferencesChangedNotification:]):
1918 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1920 Reviewed by Darin Adler.
1922 Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
1924 Carry out the move and catch up in two call sites.
1926 * WebView/WebHTMLView.mm:
1927 (-[WebHTMLView _frameOrBoundsChanged]):
1929 2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org>
1931 Reviewed by Darin Adler.
1933 isFrameSet was moved from Frame to Document. Update the
1936 * WebView/WebFrame.mm:
1937 (-[WebFrame _isFrameSet]):
1938 * WebView/WebHTMLView.mm:
1939 (-[WebHTMLView knowsPageRange:]):
1941 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1945 * WebView/WebFramePrivate.h:
1947 2009-01-30 Geoffrey Garen <ggaren@apple.com>
1949 Reviewed by Sam Weinig.
1951 Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
1952 preparation for setting them differently during a redirect.
1954 * WebView/WebPDFView.mm:
1955 (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1957 2009-01-30 Anders Carlsson <andersca@apple.com>
1959 Reviewed by Sam Weinig.
1961 Fix <rdar://problem/6544048>
1963 Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
1965 When the plug-in instance is destroyed, invalidate all proxy instances.
1967 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1968 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1969 (WebKit::NetscapePluginInstanceProxy::destroy):
1970 (WebKit::NetscapePluginInstanceProxy::addInstance):
1971 (WebKit::NetscapePluginInstanceProxy::removeInstance):
1972 * Plugins/Hosted/ProxyInstance.h:
1973 * Plugins/Hosted/ProxyInstance.mm:
1974 (WebKit::ProxyInstance::ProxyInstance):
1975 (WebKit::ProxyInstance::~ProxyInstance):
1976 (WebKit::ProxyInstance::invalidate):
1978 2009-01-30 Anders Carlsson <andersca@apple.com>
1980 Reviewed by Sam Weinig.
1982 Fix <rdar://problem/6490778>.
1984 Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
1985 validate IdentifierReps before dereferencing them.
1987 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1989 (WKPCGetStringIdentifier):
1990 (WKPCGetIntIdentifier):
1991 (identifierFromIdentifierRep):
1995 (WKPCRemoveProperty):
1998 (WKPCIdentifierInfo):
2000 2009-01-30 Brady Eidson <beidson@apple.com>
2002 Reviewed by Sam Weinig
2004 Remove FrameLoaderClient code that is now handled by FrameLoader itself
2006 * WebCoreSupport/WebFrameLoaderClient.mm:
2007 (WebFrameLoaderClient::frameLoadCompleted):
2009 2009-01-29 Stephanie Lewis <slewis@apple.com>
2013 Update the order files.
2017 2009-01-29 Sam Weinig <sam@webkit.org>
2019 Reviewed by Anders Carlsson.
2021 Second step in tracking the urls a HistoryItem was redirected through
2022 Add SPI to access the array of redirect urls associated with a HistoryItem.
2024 * History/WebHistoryItem.mm:
2025 (-[WebHistoryItem dictionaryRepresentation]):
2026 (-[WebHistoryItem _redirectURLs]):
2027 * History/WebHistoryItemPrivate.h:
2029 2009-01-29 Anders Carlsson <andersca@apple.com>
2031 Reviewed by Dan Bernstein.
2033 Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
2035 * Plugins/Hosted/NetscapePluginHostProxy.h:
2036 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2037 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2040 (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
2041 If we're modal, we should always bring the plug-in host process to the front.
2043 (WebKit::NetscapePluginHostProxy::beginModal):
2044 Add an observer for the NSApplicationWillBecomeActiveNotification callback.
2046 (WebKit::NetscapePluginHostProxy::endModal):
2047 Remove the observer.
2049 2009-01-29 Sam Weinig <sam@webkit.org>
2051 Reviewed by Mark Rowe.
2053 First step in tracking the urls a HistoryItem was redirected through.
2055 * History/WebHistoryItem.mm:
2056 (-[WebHistoryItem initFromDictionaryRepresentation:]):
2057 (-[WebHistoryItem dictionaryRepresentation]):
2058 * Misc/WebNSDictionaryExtras.h:
2059 * Misc/WebNSDictionaryExtras.m:
2060 (-[NSDictionary _webkit_arrayForKey:]): Add helper.
2062 2009-01-29 Anders Carlsson <andersca@apple.com>
2064 Reviewed by Sam Weinig.
2066 Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
2068 * Plugins/Hosted/NetscapePluginHostManager.h:
2069 * Plugins/Hosted/NetscapePluginHostManager.mm:
2070 (WebKit::NetscapePluginHostManager::hostForPackage):
2071 Get the current PSN and pass it to spawnPluginHost.
2073 (WebKit::NetscapePluginHostManager::spawnPluginHost):
2074 Pass the PSN to the "check in" function.
2076 * Plugins/Hosted/NetscapePluginHostProxy.h:
2077 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2078 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2080 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2081 Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
2083 (WebKit::NetscapePluginHostProxy::beginModal):
2084 (WebKit::NetscapePluginHostProxy::endModal):
2085 (WebKit::NetscapePluginHostProxy::setModal):
2086 Split out the code that does all of the work into beginModal and endModal methods.
2088 * Plugins/Hosted/WebKitPluginHost.defs:
2089 * Plugins/WebNetscapePluginView.mm:
2090 (-[WebNetscapePluginView loadStream]):
2092 2009-01-29 David Kilzer <ddkilzer@apple.com>
2094 Remove semi-colons from the end of ObjC method implementations
2096 Rubber-stamped by Adam Roben.
2098 $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
2100 * DefaultDelegates/WebDefaultUIDelegate.m:
2101 (-[WebDefaultUIDelegate webView:setResizable:]):
2102 (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
2103 (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
2104 (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
2105 * History/WebBackForwardList.mm:
2106 (-[WebBackForwardList addItem:]):
2107 (-[WebBackForwardList backListWithLimit:]):
2108 (-[WebBackForwardList forwardListWithLimit:]):
2109 * History/WebHistoryItem.mm:
2110 (-[WebHistoryItem alternateTitle]):
2111 (-[WebHistoryItem setViewState:]):
2112 * Misc/WebCoreStatistics.mm:
2113 (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
2114 * Misc/WebKitNSStringExtras.m:
2115 (-[NSString _web_drawAtPoint:font:textColor:]):
2116 * Plugins/WebNetscapePluginView.mm:
2117 (-[WebNetscapePluginView setAttributeKeys:andValues:]):
2118 * WebCoreSupport/WebEditorClient.mm:
2119 (-[WebEditCommand command]):
2120 * WebView/WebFrame.mm:
2121 (-[WebFrame _getVisibleRect:]):
2122 * WebView/WebHTMLRepresentation.mm:
2123 (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
2124 * WebView/WebHTMLView.mm:
2125 (-[WebHTMLView elementAtPoint:allowShadowContent:]):
2126 * WebView/WebPreferences.mm:
2127 (-[WebPreferences setAllowsAnimatedImages:]):
2128 (-[WebPreferences setAutosaves:]):
2129 (-[WebPreferences PDFDisplayMode]):
2130 * WebView/WebView.mm:
2131 (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2132 (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
2133 (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
2134 (+[WebView _registerViewClass:representationClass:forURLScheme:]):
2135 (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
2136 (-[WebView _insertNewlineInQuotedContent]):
2138 2009-01-28 Geoffrey Garen <ggaren@apple.com>
2140 Reviewed by Sam Weinig.
2142 Updated for WebCore rename.
2144 * WebView/WebView.mm:
2145 (-[WebView setCustomTextEncodingName:]):
2147 2009-01-28 David Kilzer <ddkilzer@apple.com>
2149 Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
2151 Reviewed by Dan Bernstein.
2153 * Misc/WebNSURLExtras.h:
2154 (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
2155 declaration after the implementation was added in r9258.
2157 2009-01-28 Sam Weinig <sam@webkit.org>
2159 Reviewed by Geoff Garen.
2161 Fix for <rdar://problem/6129678>
2162 REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
2164 * WebView/WebScriptDebugDelegate.mm:
2165 (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
2167 2009-01-27 Anders Carlsson <andersca@apple.com>
2169 Reviewed by Oliver Hunt.
2171 Fix two bugs with Core Animation based plug-ins.
2173 1. The plug-in view was marked as opaque even though it's not.
2174 (This would leave garbage in the plug-in view).
2175 2. The plug-in layer needs to have autoresizing turned on.
2177 * Plugins/WebNetscapePluginView.mm:
2178 (-[WebNetscapePluginView setLayer:]):
2180 2009-01-27 Brady Eidson <beidson@apple.com>
2182 Reviewed by Dan Bernstein
2184 Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
2186 * History/WebHistoryItem.mm:
2188 * WebCoreSupport/WebFrameLoaderClient.h:
2189 * WebCoreSupport/WebFrameLoaderClient.mm:
2190 (WebFrameLoaderClient::savePlatformDataToCachedFrame):
2191 (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
2194 2009-01-26 Anders Carlsson <andersca@apple.com>
2196 Reviewed by Dan Bernstein.
2198 Add the ability for plug-ins to make WebKit operate in "modal mode"
2200 * Plugins/Hosted/NetscapePluginHostProxy.h:
2201 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2202 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2203 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2204 If the plug-in crashes while we're modal, make sure to leave the modal mode.
2206 (WebKit::NetscapePluginHostProxy::setModal):
2208 * Plugins/Hosted/WebKitPluginClient.defs:
2210 2009-01-26 John Sullivan <sullivan@apple.com>
2212 fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets
2213 stuck in the Name field rather than cycling around
2215 Reviewed by Dan Bernstein
2217 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
2218 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
2219 The two static text fields and the last button all had their "next key view" outlets set to the
2220 name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
2221 selectable view have exactly one "next key view" set to it.
2223 2009-01-26 Anders Carlsson <andersca@apple.com>
2225 Reviewed by Sam Weinig.
2227 Add the ability for a plug-in to show or hide the menu bar.
2229 * Plugins/Hosted/NetscapePluginHostProxy.h:
2230 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2231 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2232 (WebKit::NetscapePluginHostProxy::pluginHostDied):
2233 (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
2234 (WKPCSetMenuBarVisible):
2235 * Plugins/Hosted/WebKitPluginClient.defs:
2237 2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2239 Reviewed by Gavin Barraclough.
2241 Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
2242 <https://bugs.webkit.org/show_bug.cgi?id=23552>
2243 <rdar://problem/6398839>
2245 Dashcode will crash when using the evaluator because it saves a global call
2246 frame, even after global code has finished executing, and then uses this as
2247 a launching pad to execute new JS in the evaluator. The fix is to detect
2248 when Dashcode is attempting to do this and execute code from a global call
2251 * ForwardingHeaders/runtime/Protect.h: Added.
2252 * WebView/WebScriptDebugDelegate.mm:
2253 (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
2254 Added debugger, a WebScriptDebugger* argument.
2255 (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
2256 a stale WebScriptCallFrame to execute new JS and evaluate it starting from
2257 the global object's global call frame instead.
2258 * WebView/WebScriptDebugger.h:
2259 (WebScriptDebugger::globalObject): Added.
2260 (WebScriptDebugger::globalCallFrame): Added.
2261 * WebView/WebScriptDebugger.mm:
2262 (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
2263 (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
2264 so that the global call frame can be saved immediately after being created.
2265 (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
2266 WebScriptCallFrame's _initWithGlobalObject method.
2268 2009-01-26 Anders Carlsson <andersca@apple.com>
2270 Reviewed by Oliver Hunt.
2272 Make WKPCInvoke a simpleroutine.
2274 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2276 * Plugins/Hosted/WebKitPluginClient.defs:
2278 2009-01-26 Anders Carlsson <andersca@apple.com>
2280 Reviewed by Sam Weinig.
2282 Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
2284 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2285 (WKPCBooleanAndDataReply):
2286 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2287 (WebKit::NetscapePluginInstanceProxy::Reply::):
2288 (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
2289 Rename NPObjectInvokeReply to BooleanAndDataReply.
2291 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2292 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2293 Fix a cut and paste error.
2295 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2298 * Plugins/Hosted/ProxyInstance.h:
2299 * Plugins/Hosted/ProxyInstance.mm:
2300 (WebKit::ProxyField::valueFromInstance):
2301 (WebKit::ProxyField::setValueToInstance):
2302 Call the ProxyInstance method.
2304 (WebKit::ProxyInstance::~ProxyInstance):
2305 Release the NPObject.
2307 (WebKit::ProxyInstance::supportsConstruct):
2308 Ask the plug-in host if an instance supports construct.
2310 (WebKit::ProxyInstance::fieldValue):
2311 (WebKit::ProxyInstance::setFieldValue):
2312 Call the plug-in host methods.
2314 * Plugins/Hosted/WebKitPluginHostTypes.h:
2315 Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
2317 2009-01-26 Mark Rowe <mrowe@apple.com>
2321 Remove -Wformat=2 from the warning flags as newer versions of GCC emit
2322 warnings about non-literal format strings for uses of our UI_STRING macro.
2324 * Configurations/Base.xcconfig:
2326 2009-01-26 Mark Rowe <mrowe@apple.com>
2328 Rubber-stamped by Sam Weinig.
2330 Clean up after r40240.
2332 * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
2333 * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
2334 is back in the build.
2336 2009-01-25 Darin Adler <darin@apple.com>
2338 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
2340 2009-01-25 Darin Adler <darin@apple.com>
2342 Discussed with Mark Rowe; not sure he reviewed it.
2344 * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
2345 -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
2347 2009-01-25 Mark Rowe <mrowe@apple.com>
2349 Rubber-stamped by Dan Bernstein.
2351 Improve the consistency of settings in our .xcconfig files.
2353 * Configurations/Base.xcconfig: Only dead code strip the normal variant.
2354 Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
2356 2009-01-25 Darin Adler <darin@apple.com>
2358 Reviewed by Sam Weinig.
2360 Bug 23522: use checked casts for render tree
2361 https://bugs.webkit.org/show_bug.cgi?id=23522
2363 Step one: RenderText.
2365 * WebView/WebRenderNode.mm:
2366 (copyRenderNode): Use toRenderText.
2368 2009-01-23 Brady Eidson <beidson@apple.com>
2370 Rubberstamped by Darin Adler
2372 Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
2374 * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
2375 (WebCachedFramePlatformData::WebCachedFramePlatformData):
2376 * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
2378 * WebCoreSupport/WebFrameLoaderClient.mm:
2379 (WebFrameLoaderClient::savePlatformDataToCachedPage):
2380 (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
2384 2009-01-23 Adele Peterson <adele@apple.com>
2388 Use new linesBoundingBox method instead of
2389 boundingBoxWidth and boundingBoxHeight for RenderText objects.
2391 * WebView/WebRenderNode.mm: (copyRenderNode):
2393 2009-01-23 Anders Carlsson <andersca@apple.com>
2397 * Plugins/Hosted/ProxyInstance.mm:
2398 (WebKit::proxyClass):
2400 2009-01-23 Anders Carlsson <andersca@apple.com>
2404 * Configurations/Base.xcconfig:
2406 2009-01-23 Anders Carlsson <andersca@apple.com>
2408 Reviewed by Sam Weinig.
2410 Turn on -Wmissing-prototypes and fix the resulting warnings.
2412 * Configurations/Base.xcconfig:
2413 * History/WebHistory.mm:
2414 (timeIntervalForBeginningOfDay):
2415 * History/WebHistoryItem.mm:
2416 (historyItemWrappers):
2417 * Misc/WebNSPasteboardExtras.mm:
2419 * WebView/WebFrame.mm:
2420 * WebView/WebScriptDebugger.mm:
2423 2009-01-22 Mark Rowe <mrowe@apple.com>
2425 Rubber-stamped by Anders Carlsson.
2427 Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
2429 Current versions of Xcode only respect it for C and Objective-C files,
2430 and our code doesn't currently compile if it is applied to C++ and
2431 Objective-C++ files.
2433 * Configurations/Base.xcconfig:
2435 2009-01-22 Anders Carlsson <andersca@apple.com>
2437 Reviewed by Sam Weinig.
2439 Add support for Invoke and InvokeDefault. Clean up code.
2441 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2443 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2444 (WebKit::NetscapePluginInstanceProxy::Reply::):
2445 (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
2446 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2447 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2448 * Plugins/Hosted/ProxyInstance.h:
2449 * Plugins/Hosted/ProxyInstance.mm:
2450 (WebKit::ProxyInstance::invoke):
2451 (WebKit::ProxyInstance::invokeMethod):
2452 (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
2453 (WebKit::ProxyInstance::invokeDefaultMethod):
2454 (WebKit::ProxyInstance::methodsNamed):
2455 (WebKit::ProxyInstance::fieldNamed):
2456 * Plugins/Hosted/WebKitPluginClient.defs:
2457 * Plugins/Hosted/WebKitPluginHost.defs:
2458 * Plugins/Hosted/WebKitPluginHostTypes.h:
2460 2009-01-22 Eric Roman <eroman@chromium.og>
2462 Reviewed by Eric Seidel.
2464 https://bugs.webkit.org/show_bug.cgi?id=20806
2465 Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
2467 * History/WebHistoryItem.mm:
2468 (-[WebHistoryItem RSSFeedReferrer]):
2469 (-[WebHistoryItem setRSSFeedReferrer:]):
2471 2009-01-22 Anders Carlsson <andersca@apple.com>
2473 Reviewed by Kevin Decker.
2475 Don't crash or hang when we fail to instantiate a plug-in.
2477 * Plugins/Hosted/NetscapePluginHostManager.mm:
2478 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2479 Return 0 on failure.
2481 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2482 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
2483 Null check for the proxy member.
2485 2009-01-21 David Hyatt <hyatt@apple.com>
2487 Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
2489 Reviewed by Eric Seidel and Darin Adler
2491 * WebView/WebRenderNode.mm:
2494 2009-01-21 Anders Carlsson <andersca@apple.com>
2496 Reviewed by Sam Weinig.
2498 More browser->plug-in scripting support.
2500 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2501 (WKPCNPObjectHasPropertyReply):
2502 (WKPCNPObjectHasMethodReply):
2503 (WKPCNPObjectInvokeReply):
2504 MIG reply functions.
2506 (WKPCIdentifierInfo):
2507 Return information about an identifier given its 64-bit value.
2509 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2510 Add new reply structs.
2512 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2513 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2514 Split out code that adds values to the arrays from marshalValue.
2516 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2517 Call addValueToArray.
2519 (WebKit::NetscapePluginInstanceProxy::marshalValues):
2520 Marshal a list of values.
2522 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2523 Actually create a proxy instance.
2525 * Plugins/Hosted/ProxyInstance.h:
2526 * Plugins/Hosted/ProxyInstance.mm:
2527 (WebKit::ProxyClass::methodsNamed):
2528 (WebKit::ProxyClass::fieldNamed):
2529 Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
2531 (WebKit::proxyClass):
2532 Shared proxyClass getter.
2534 (WebKit::ProxyField::ProxyField):
2535 (WebKit::ProxyField::valueFromInstance):
2536 (WebKit::ProxyField::setValueToInstance):
2537 Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
2539 (WebKit::ProxyMethod::ProxyMethod):
2540 (WebKit::ProxyMethod::serverIdentifier):
2541 (WebKit::ProxyMethod::numParameters):
2542 Add a dummy ProxyMethod class.
2544 (WebKit::ProxyInstance::invokeMethod):
2545 Call _WKPHNPObjectInvoke.
2547 (WebKit::ProxyInstance::defaultValue):
2548 (WebKit::ProxyInstance::stringValue):
2549 (WebKit::ProxyInstance::numberValue):
2550 (WebKit::ProxyInstance::booleanValue):
2551 (WebKit::ProxyInstance::valueOf):
2552 Add dummy implementations (taken from CInstance).
2554 (WebKit::ProxyInstance::methodsNamed):
2555 Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
2557 (WebKit::ProxyInstance::fieldNamed):
2558 Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
2560 * Plugins/Hosted/WebKitPluginClient.defs:
2561 * Plugins/Hosted/WebKitPluginHost.defs:
2562 Add new MIG definitions.
2564 2009-01-21 Mark Rowe <mrowe@apple.com>
2566 Reviewed by Tim Hatcher.
2568 Clean up how we force invocations of API that happened on background threads over to the main thread.
2570 This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
2571 and return values back from the function. The new approach is to use a proxy object that forwards an
2572 NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
2575 * Misc/WebNSObjectExtras.h:
2576 * Misc/WebNSObjectExtras.mm:
2577 (-[WebMainThreadInvoker initWithTarget:]):
2578 (-[WebMainThreadInvoker forwardInvocation:]):
2579 (-[WebMainThreadInvoker methodSignatureForSelector:]):
2580 (-[WebMainThreadInvoker handleException:]):
2581 (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
2582 raised back to the WebMainThreadInvoker.
2583 (-[NSObject _webkit_invokeOnMainThread]):
2585 The following methods are updated to use the proxy object to forward methods to the main thread:
2587 * WebView/WebArchive.mm:
2588 (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
2589 (-[WebArchive mainResource]):
2590 (-[WebArchive subresources]):
2591 (-[WebArchive subframeArchives]):
2592 * WebView/WebResource.mm:
2593 (-[WebResource data]):
2594 (-[WebResource URL]):
2595 (-[WebResource MIMEType]):
2596 (-[WebResource textEncodingName]):
2597 (-[WebResource frameName]):
2598 (-[WebResource _ignoreWhenUnarchiving]):
2599 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
2600 (-[WebResource _initWithData:URL:response:]):
2601 (-[WebResource _suggestedFilename]):
2602 (-[WebResource _response]):
2603 (-[WebResource _stringValue]):
2604 * WebView/WebView.mm:
2605 (-[WebView initWithFrame:frameName:groupName:]):
2606 (-[WebView initWithCoder:]):
2608 2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2610 Reviewed by George Staikos.
2612 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
2614 Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
2615 WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
2617 * WebCoreSupport/WebEditorClient.mm:
2618 (WebEditorClient::textFieldDidBeginEditing):
2619 (WebEditorClient::textFieldDidEndEditing):
2620 (WebEditorClient::textDidChangeInTextField):
2621 (WebEditorClient::doTextFieldCommandFromEvent):
2622 (WebEditorClient::textWillBeDeletedInTextField):
2623 (WebEditorClient::textDidChangeInTextArea):
2625 2009-01-19 Anders Carlsson <andersca@apple.com>
2627 Reviewed by Sam Weinig.
2629 Add and implement GetScriptableNPObject.
2631 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2632 (WKPCGetScriptableNPObjectReply):
2633 Create a new reply struct and set it as the current reply.
2636 Get rid of an unused variable.
2638 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2639 (WebKit::NetscapePluginInstanceProxy::Reply::):
2640 (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
2641 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2642 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2643 Call _WKPHGetScriptableNPObject and wait for a reply.
2645 * Plugins/Hosted/ProxyInstance.h: Added.
2646 * Plugins/Hosted/ProxyInstance.mm: Added.
2649 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2650 (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
2651 Call NetscapePluginInstanceProxy::createBindingsInstance.
2653 * Plugins/Hosted/WebKitPluginClient.defs:
2654 * Plugins/Hosted/WebKitPluginHost.defs:
2655 Add new declarations.
2657 2009-01-19 Sam Weinig <sam@webkit.org>
2659 Rubber-stamped by Gavin Barraclough.
2661 Remove temporary operator-> from JSValuePtr.
2663 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2664 (WebKit::NetscapePluginInstanceProxy::invoke):
2665 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2666 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2667 * WebView/WebFrame.mm:
2668 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2669 * WebView/WebView.mm:
2670 (aeDescFromJSValue):
2672 2009-01-19 Anders Carlsson <andersca@apple.com>
2674 Reviewed by Sam Weinig.
2676 Make Evaluate an asynchronous method that has a reply method.
2678 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2680 * Plugins/Hosted/WebKitPluginClient.defs:
2681 * Plugins/Hosted/WebKitPluginHost.defs:
2683 2009-01-19 Brady Eidson <beidson@apple.com>
2685 Rubberstamped by Tim Hatcher
2687 Fix long standing typo.
2689 * History/WebBackForwardList.h:
2691 2009-01-19 Mark Rowe <mrowe@apple.com>
2695 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2696 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2697 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2699 2009-01-18 Mark Rowe <mrowe@apple.com>
2701 Reviewed by Anders Carlsson.
2703 Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
2704 Bug 23414: Reproducible crash accessing View menu with plugins disabled
2706 * WebView/WebFrame.mm:
2707 (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
2709 2009-01-17 David Hyatt <hyatt@apple.com>
2711 Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
2712 are done in WebCore instead.
2714 Reviewed by Oliver Hunt
2716 * WebView/WebFrame.mm:
2717 (-[WebFrame _selectedString]):
2718 (-[WebFrame _stringForRange:]):
2720 2009-01-17 Eric Carlson <eric.carlson@apple.com>
2722 Reviewed by Adele Peterson
2724 Complete <rdar://problem/6293969>
2726 * WebCoreSupport/WebSystemInterface.m:
2727 (InitWebCoreSystemInterface): Remove UseSharedMediaUI
2729 2009-01-15 Brady Eidson <beidson@apple.com>
2731 Reviewed by Dan Bernstein
2733 Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
2735 * History/WebHistory.mm:
2736 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
2737 flag for all loads with an HTTP Method
2739 2009-01-14 Anders Carlsson <andersca@apple.com>
2741 Reviewed by Sam Weinig.
2743 Implement InvokeDefault, Construct, GetProperty and SetProperty.
2745 Fully implement marshalValue.
2747 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2748 (WKPCInvokeDefault):
2752 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2753 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2754 (WebKit::NetscapePluginInstanceProxy::evaluate):
2755 (WebKit::NetscapePluginInstanceProxy::invoke):
2756 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2757 (WebKit::NetscapePluginInstanceProxy::construct):
2758 (WebKit::NetscapePluginInstanceProxy::getProperty):
2759 (WebKit::NetscapePluginInstanceProxy::setProperty):
2760 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2761 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
2762 * Plugins/Hosted/WebKitPluginClient.defs:
2764 2009-01-14 Anders Carlsson <andersca@apple.com>
2766 Reviewed by Sam Weinig.
2768 Demarshal arguments and pass them to the JS call.
2770 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2772 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2773 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2774 (WebKit::NetscapePluginInstanceProxy::invoke):
2775 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
2776 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
2778 2009-01-14 Mark Rowe <mrowe@apple.com>
2780 Reviewed by Timothy Hatcher.
2782 <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
2784 Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
2787 * WebView/WebArchive.mm:
2788 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
2789 (-[WebArchive _initWithArguments:]):
2790 * WebView/WebResource.mm:
2791 (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
2793 2009-01-14 Darin Adler <darin@apple.com>
2795 Reviewed by Oliver Hunt.
2797 Fix crash I ran into while printing. I was unable to reproduce it, but also,
2798 it's clear there's no guarantee that the frame will be non-zero in this case,
2799 so it seems fine to check it.
2801 * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
2802 and don't do anything with it if it's zero.
2804 2009-01-14 Dan Bernstein <mitz@apple.com>
2806 Reviewed by John Sullivan.
2812 2009-01-12 Anders Carlsson <andersca@apple.com>
2814 Reviewed by Darin Adler.
2816 Add a bunch of methods to WebKitPluginClient.defs, and implement them.
2818 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2819 (WebKit::fromUTF8WithLatin1Fallback):
2820 If the length isn't specified, get it by calling strlen.
2823 Evaluate doesn't take any arguments.
2825 (WKPCGetIntIdentifier):
2826 Call _NPN_GetIntIdentifier.
2828 (identifierFromServerIdentifier):
2829 New helper function that returns a JSC Identifier from an NPIdentifier.
2832 Call identifierFromServerIdentifier.
2834 (WKPCRemoveProperty):
2837 Call NetscapePluginInstanceProxy.
2839 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2840 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2841 (WebKit::NetscapePluginInstanceProxy::removeProperty):
2842 (WebKit::NetscapePluginInstanceProxy::hasProperty):
2843 (WebKit::NetscapePluginInstanceProxy::hasMethod):
2845 * Plugins/Hosted/WebKitPluginClient.defs:
2846 Add new definitions.
2848 2009-01-13 Anders Carlsson <andersca@apple.com>
2852 * WebView/WebView.mm:
2853 (-[WebView _initWithArguments:]):
2855 2009-01-13 Timothy Hatcher <timothy@apple.com>
2857 Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
2859 <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
2861 Reviewed by Darin Adler.
2863 * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
2864 * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
2865 * Misc/WebNSObjectExtras.mm:
2866 (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
2867 Passes the optional object to the selector.
2868 (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
2869 Put the optional object into the arguments dictionary.
2870 (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
2871 * WebView/WebResource.mm:
2872 (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
2873 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
2874 _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
2875 * WebView/WebView.mm:
2876 (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
2877 (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
2878 (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
2879 to call _initWithArguments: passing the frame, frameName and groupName.
2880 (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
2882 2009-01-12 Gavin Barraclough <barraclough@apple.com>
2884 Reviewed by Oliver Hunt.
2886 Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough.
2888 * WebView/WebView.mm:
2889 (aeDescFromJSValue):
2891 2009-01-12 Brady Eidson <beidson@apple.com>
2893 Reviewed by Darin Adler
2895 <rdar://problem/6468274> - Track Non-get requests in global history
2897 * History/WebHistory.mm:
2898 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
2899 * History/WebHistoryInternal.h:
2901 * History/WebHistoryItem.mm:
2902 (-[WebHistoryItem initFromDictionaryRepresentation:]):
2903 (-[WebHistoryItem dictionaryRepresentation]):
2904 (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
2905 * History/WebHistoryItemPrivate.h:
2907 * WebCoreSupport/WebFrameLoaderClient.mm:
2908 (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
2910 2009-01-12 Anders Carlsson <andersca@apple.com>
2912 Reviewed by Sam Weinig.
2914 Move marshalling into NetscapePluginInstanceProxy.
2916 Add support for marshallin strings.
2918 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2921 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2922 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2923 (WebKit::NetscapePluginInstanceProxy::evaluate):
2924 (WebKit::NetscapePluginInstanceProxy::invoke):
2925 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2926 * Plugins/Hosted/WebKitPluginHostTypes.h:
2928 2009-01-12 Anders Carlsson <andersca@apple.com>
2930 Reviewed by Sam Weinig.
2932 Implement WKPCInvoke.
2934 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2937 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2938 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2939 (WebKit::NetscapePluginInstanceProxy::idForObject):
2940 (WebKit::NetscapePluginInstanceProxy::invoke):
2941 * Plugins/Hosted/WebKitPluginClient.defs:
2943 2009-01-12 Anders Carlsson <andersca@apple.com>
2945 Reviewed by Sam Weinig.
2947 Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
2949 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2951 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2952 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2953 (WebKit::NetscapePluginInstanceProxy::marshalValue):
2954 * Plugins/Hosted/WebKitPluginHostTypes.h:
2956 2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com>
2958 Reviewed by Darin Adler.
2960 Bug 22861: Turn the FontCache into a singleton
2961 https://bugs.webkit.org/show_bug.cgi?id=22861
2963 * Misc/WebCoreStatistics.mm:
2964 (+[WebCoreStatistics cachedFontDataCount]):
2965 (+[WebCoreStatistics cachedFontDataInactiveCount]):
2966 (+[WebCoreStatistics purgeInactiveFontData]):
2967 Redirected all the static calls to the global FontCache
2970 2009-01-11 Dmitry Titov <dimich@chromium.org>
2972 Reviewed by Darin Adler.
2974 https://bugs.webkit.org/show_bug.cgi?id=23207
2975 Moved currentTime() to from WebCore to WTF.
2977 * WebView/WebFrame.mm: a different header file included.
2979 2009-01-10 Darin Adler <darin@apple.com>
2981 Reviewed by Sam Weinig.
2983 <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
2984 because of change to -[HTMLObjectElement data]
2986 * WebView/WebView.mm:
2987 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
2988 violation check because I saw this being done off the main thread while testing Mail, and it
2989 caused problems. Put all the one time initialization under a single guard to make things just
2990 a little faster other times, and to make it clearer which things are one-time. Added a call to
2991 the new patchMailRemoveAttributesMethod function.
2992 (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
2993 because I assumed it would be slightly better to have a public method name in the violation
2994 message. This calls commonInitialization later, so it will hit that one eventually.
2995 (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
2996 (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
2997 a WebKit method and removes the patch again on the way out.
2998 (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
2999 applies the patch that fixes this bug.
3001 2009-01-09 Dan Bernstein <mitz@apple.com>
3003 Reviewed by Darin Adler.
3005 - fixed <rdar://problem/6234347> Add/change conditional key
3006 bindings for changing paragraph- and character-level writing
3007 direction (to match NSTextView)
3009 * WebView/WebHTMLView.mm:
3010 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
3011 code to validate makeBaseWritingDirectionLeftToRight: and
3012 makeBaseWritingDirectionRightToLeft:.
3013 (writingDirectionKeyBindingsEnabled): Changed this function to
3014 always return YES, except on Tiger and Leopard.
3015 (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
3016 changeBaseWritingDirectionToLTR: to this.
3017 (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
3018 changeBaseWritingDirectionToRTL: to this.
3019 (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
3020 makeBaseWritingDirectionLeftToRight:.
3021 (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
3022 makeBaseWritingDirectionRightToLeft:.
3023 * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
3024 and makeBaseWritingDirectionRightToLeft to
3025 FOR_EACH_RESPONDER_SELECTOR.
3027 2009-01-08 Anders Carlsson <andersca@apple.com>
3029 Reviewed by Sam Weinig.
3031 Add and implement WKPCGetStringIdentifier.
3033 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3034 (WKPCGetStringIdentifier):
3035 * Plugins/Hosted/WebKitPluginClient.defs:
3037 2009-01-08 Stephanie Lewis <slewis@gmail.com>
3041 * WebView/WebTextIterator.mm:
3043 2009-01-08 Anders Carlsson <andersca@apple.com>
3045 Reviewed by Sam Weinig.
3047 Add basic support for evaluating scripts.
3049 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3050 (WebKit::fromUTF8WithLatin1Fallback):
3051 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3052 (WKPCReleaseObject):
3055 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3056 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3057 (WebKit::NetscapePluginInstanceProxy::releaseObject):
3058 (WebKit::NetscapePluginInstanceProxy::evaluate):
3059 * Plugins/Hosted/WebKitPluginClient.defs:
3060 * Plugins/Hosted/WebKitPluginHostTypes.h:
3062 2009-01-08 David Hyatt <hyatt@apple.com>
3064 Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
3066 Add a new ChromeClient method for handling exposure of scrolled rects.
3068 Reviewed by Oliver Hunt
3070 * WebCoreSupport/WebChromeClient.h:
3071 * WebCoreSupport/WebChromeClient.mm:
3072 (WebChromeClient::scrollRectIntoView):
3074 2009-01-08 Darin Adler <darin@apple.com>
3076 Reviewed by Tim Hatcher.
3078 Bug 23185: add a currentRange method to the WebTextIterator SPI
3079 https://bugs.webkit.org/show_bug.cgi?id=23185
3080 rdar://problem/6455834
3082 I also noticed a garbage-collection-related threading issue that I fixed, and
3083 that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
3085 * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
3086 category. Added currentTextPointer and currentTextLength.
3088 * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
3089 used _textIterator to be consistent with ObjC rather than C++ naming.
3090 (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
3091 since the finalize method here works with main-thread only WebCore objects.
3092 (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
3093 (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
3094 since I don't think it provides much value.
3095 (-[WebTextIterator atEnd]): Ditto.
3096 (-[WebTextIterator currentRange]): Added.
3097 (-[WebTextIterator currentTextPointer]): Added.
3098 (-[WebTextIterator currentTextLength]): Added.
3099 (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
3100 (-[WebTextIterator currentText]): Ditto.
3102 2009-01-08 Eric Carlson <eric.carlson@apple.com>
3104 Reviewed by Adele Peterson.
3106 Simplify Mac interfaces for drawing media controller elements
3108 <rdar://problem/6293969>
3110 * WebCoreSupport/WebSystemInterface.m:
3111 (InitWebCoreSystemInterface): Update for changes to media controller functions
3113 2009-01-07 Anders Carlsson <andersca@apple.com>
3115 Reviewed by Dan Bernstein.
3119 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3120 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3121 (WebKit::NetscapePluginInstanceProxy::idForObject):
3123 2009-01-07 Anders Carlsson <andersca@apple.com>
3125 Reviewed by Dan Bernstein.
3127 Add a way for a plug-in to get a reference to the Window JS object.
3129 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3130 (WKPCGetWindowNPObject):
3131 Call the appropriate instance.
3133 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3134 Add object ID counter.
3136 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3137 (WebKit::NetscapePluginInstanceProxy::destroy):
3138 Clear the object ID map.
3140 (WebKit::NetscapePluginInstanceProxy::idForObject):
3141 New method that returns a unique ID for a given JS object.
3143 (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
3144 Return the object ID for the window JS object.
3146 * Plugins/Hosted/WebKitPluginClient.defs:
3147 Add GetWindowNPObject.
3149 2009-01-07 Darin Adler <darin@apple.com>
3151 Reviewed by Oliver Hunt.
3153 Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
3154 https://bugs.webkit.org/show_bug.cgi?id=23160
3156 * WebView/WebView.mm:
3157 (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
3158 (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
3159 * WebView/WebViewPrivate.h: Ditto.
3161 2009-01-05 Gavin Barraclough <baraclough@apple.com>
3163 Rubber Stamped by Oliver Hunt.
3165 Replace all uses of JSValue* with new wrapper class, JSValuePtr.
3166 See JavaScriptCore/ChangeLog for more detailed description.
3168 * WebView/WebFrame.mm:
3169 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3170 * WebView/WebScriptDebugDelegate.mm:
3171 (-[WebScriptCallFrame _convertValueToObjcValue:]):
3172 (-[WebScriptCallFrame exception]):
3173 (-[WebScriptCallFrame evaluateWebScript:]):
3174 * WebView/WebView.mm:
3175 (aeDescFromJSValue):
3176 (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
3178 2009-01-06 Pierre-Olivier Latour <pol@apple.com>
3180 Reviewed by Darin Adler.
3182 Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
3184 https://bugs.webkit.org/show_bug.cgi?id=23126
3186 * WebView/WebFrame.mm:
3187 (-[WebFrame _numberOfActiveAnimations]):
3188 * WebView/WebFramePrivate.h:
3190 2009-01-05 David Kilzer <ddkilzer@apple.com>
3192 Add SPI to enable, disable and check state of WebIconDatabase
3194 Reviewed by Darin Adler & Timothy Hatcher.
3196 Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
3197 SPI to make it possible to enable, disable and check the state of
3200 * Misc/WebIconDatabase.mm:
3201 (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
3202 (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
3203 -isEnabled instead of -_isEnabled.
3204 (-[WebIconDatabase iconURLForURL:]): Ditto.
3205 (-[WebIconDatabase retainIconForURL:]): Ditto.
3206 (-[WebIconDatabase releaseIconForURL:]): Ditto.
3207 (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
3208 WebInternal category.
3209 (-[WebIconDatabase setEnabled:]): Added. Takes care of changing
3210 the enabled/disabled state of the icon database.
3211 (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
3212 instead of -_isEnabled.
3213 (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from
3215 (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove
3216 observers when the icon database is disabled.
3217 * Misc/WebIconDatabaseInternal.h: Added declarations for
3218 -_startUpIconDatabase and -_shutDownIconDatabase.
3219 * Misc/WebIconDatabasePrivate.h: Added declarations for
3220 -isEnabled and -setEnabled:.
3222 2009-01-05 Brady Eidson <beidson@apple.com>
3224 Reviewed by Jon Honeycutt
3226 Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
3228 * History/WebHistoryItem.mm:
3229 (-[WebHistoryItem _setLastVisitWasFailure:]):
3230 * History/WebHistoryItemPrivate.h:
3232 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3234 Another blind mac build fix
3236 * WebCoreSupport/WebChromeClient.mm:
3237 (WebChromeClient::contentsSizeChanged):
3239 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3243 * WebCoreSupport/WebChromeClient.mm:
3245 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3249 * WebCoreSupport/WebChromeClient.h:
3251 2009-01-05 Adam Treat <adam.treat@torchmobile.com>
3253 Reviewed by George Staikos.
3255 Build fix for contentsSizeChanged
3257 * WebCoreSupport/WebChromeClient.h:
3258 * WebCoreSupport/WebChromeClient.mm:
3259 (WebChromeClient::contentsSizeChanged):
3261 2009-01-02 Darin Adler <darin@apple.com>
3263 Reviewed by Sam Weinig.
3265 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
3266 inside its web view when resizing its window
3267 https://bugs.webkit.org/show_bug.cgi?id=23072
3268 rdar://problem/6368028
3270 The first attempt at fixing this did not work.
3271 This time I was able to reproduce the bug and test the fix.
3273 * WebCoreSupport/WebFrameLoaderClient.mm:
3274 (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
3275 function names around a bit to make even less code at the call site.
3276 (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
3277 Dictionary application in here.
3278 (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
3279 applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
3280 when the script is cached. This fixes one of the two problems with the initial
3281 patch; the other fix is in WebCore.
3282 (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
3283 applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
3285 * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
3287 2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
3289 Reviewed by Darin Adler.
3291 Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
3292 <https://bugs.webkit.org/show_bug.cgi?id=23060>
3293 <rdar://problem/6467830>
3295 After r38629, all keyboard events get sent by Editor to the EditorClient, even
3296 if the selection is not editable. If the event's command is unsupported by
3297 WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
3298 was not. When using the page up / page down keys, the events generated are of
3299 the form scrollPageUp rather than movePageUp, so they are unsupported by
3300 WebHTMLView and cause this bug to occur.
3302 * WebView/WebHTMLView.mm:
3303 (-[WebHTMLView doCommandBySelector:]):
3305 2009-01-02 Darin Adler <darin@apple.com>
3307 Reviewed by Oliver Hunt.
3309 Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
3310 https://bugs.webkit.org/show_bug.cgi?id=23072
3311 rdar://problem/6368028
3313 * WebCoreSupport/WebFrameLoaderClient.mm:
3314 (isAppleDictionaryApplication): Added.
3315 (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
3316 a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
3317 (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
3318 apply the quirk when the relevant script is loaded.
3320 2008-12-26 Dan Bernstein <mitz@apple.com>
3322 Reviewed by Sam Weinig.
3324 - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
3325 global history after a successful visit
3327 * History/WebHistory.mm:
3328 (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
3329 update the wasFailure flag on the HistoryItem.
3331 2008-12-23 Darin Adler <darin@apple.com>
3333 Reviewed by Alexey Proskuryakov (a slightly earlier version).
3335 - fix https://bugs.webkit.org/show_bug.cgi?id=22976
3336 crash due to Mail's use of WebArchive and WebResource on non-main thread
3338 * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
3339 WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
3340 * Misc/WebKitLogging.m: Ditto.
3342 * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
3343 main thread workaround.
3345 * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
3346 which performs a selector on the main thread, waits for it to complete, and then
3347 returns the value on the caller thread.
3348 * Misc/WebNSObjectExtras.mm: Added.
3350 * WebView/WebArchive.mm:
3351 (-[WebArchive init]): Added WebCoreThreadViolationCheck.
3352 (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
3353 initialization on main thread if needMailThreadWorkaround is true.
3354 Also added WebCoreThreadViolationCheck.
3355 (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
3356 (-[WebArchive mainResource]): Get property on main thread if
3357 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3358 (-[WebArchive subresources]): Ditto.
3359 (-[WebArchive subframeArchives]): Ditto.
3360 (-[WebArchive data]): Ditto.
3361 (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
3362 (-[WebArchive _coreLegacyWebArchive]): Ditto.
3363 (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
3364 version of initWithMainResource above.
3366 * WebView/WebResource.mm:
3367 (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
3368 (-[WebResource data]): Get property on main thread if
3369 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3370 (-[WebResource URL]): Ditto.
3371 (-[WebResource MIMEType]): Ditto.
3372 (-[WebResource textEncodingName]): Ditto.
3373 (-[WebResource frameName]): Ditto.
3374 (-[WebResource _ignoreWhenUnarchiving]): Ditto.
3375 (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
3376 Perform initialization on main thread if needMailThreadWorkaround is true.
3377 Also added WebCoreThreadViolationCheck.
3378 (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
3379 (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
3380 getting at coreResource directly.
3381 (-[WebResource _response]): Get property on main thread if
3382 needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
3383 (-[WebResource _stringValue]): Ditto.
3384 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
3385 (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
3386 version of _initWithData above.
3388 * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
3389 clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
3390 and the needMainThreadWorkaround helper function.
3392 * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
3393 file. This probably fixes clean builds.
3394 * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
3396 * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
3397 since it's not actually used.
3398 * WebView/WebDataSource.mm: Ditto.
3399 * WebView/WebHTMLRepresentation.mm: Ditto.
3401 2008-12-23 Darin Adler <darin@apple.com>
3403 Reviewed by Dan Bernstein.
3405 - fix https://bugs.webkit.org/show_bug.cgi?id=22979
3406 crash seen in -[WebView drawsBackground] when quitting
3407 <rdar://problem/6464601>
3409 * WebView/WebView.mm:
3410 (-[WebView drawsBackground]): Added comment and a null check for _private.
3412 2008-12-22 Kevin Decker <kdecker@apple.com>
3414 Reviewed by Anders Carlsson.
3416 <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
3418 * Plugins/WebBaseNetscapePluginView.mm:
3419 (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
3421 2008-12-19 Geoffrey Garen <ggaren@apple.com>
3423 Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
3425 Added SPI for getting an unsorted vector of all items in history.
3427 * History/WebHistory.h:
3428 * History/WebHistory.mm:
3429 (-[WebHistory allItems]):
3431 2008-12-18 Dan Bernstein <mitz@apple.com>
3433 Reviewed by Sam Weinig.
3435 - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
3436 a new resource load delegae method.
3438 * WebCoreSupport/WebFrameLoaderClient.h:
3439 * WebCoreSupport/WebFrameLoaderClient.mm:
3440 (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
3441 delegate method. If the method is unimplemented, returns true for
3442 backwards compatibility.
3443 * WebView/WebView.mm:
3444 (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
3445 shouldUseCredentialStorageFunc member.
3446 (CallResourceLoadDelegateReturningBoolean): Added.
3447 * WebView/WebViewInternal.h:
3448 * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
3449 -webView:resource:shouldUseCredentialStorageForDataSource:.
3451 2008-12-18 Cameron Zwarich <zwarich@apple.com>
3453 Reviewed by Jonathan Honeycutt.
3455 Fix an apparent typo in r39385 that is causing lots of crashes.
3457 * WebCoreSupport/WebFrameLoaderClient.mm:
3458 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
3460 2008-12-18 Brady Eidson <beidson@apple.com>
3462 Reviewed by John Sullivan
3464 Initial visit to a website creates history items that start with a visit count of
3467 * History/WebHistory.mm:
3468 (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
3470 * History/WebHistoryItem.mm:
3471 (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
3472 * History/WebHistoryItemInternal.h:
3474 2008-12-18 Sam Weinig <sam@webkit.org>
3476 Reviewed by John Sullivan.
3478 Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
3479 a new private frame load delegate method.
3481 * WebCoreSupport/WebFrameLoaderClient.h:
3482 * WebCoreSupport/WebFrameLoaderClient.mm:
3483 (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
3484 * WebView/WebView.mm:
3485 (-[WebView _cacheFrameLoadDelegateImplementations]):
3486 * WebView/WebViewInternal.h:
3487 * WebView/WebViewPrivate.h:
3489 2008-12-16 Antti Koivisto <antti@apple.com>
3491 Reviewed by John Sullivan.
3493 Add version check for shift-reload behavior.
3495 * Misc/WebKitVersionChecks.h:
3496 * WebView/WebFrame.mm:
3497 (-[WebFrame reload]):
3499 2008-12-16 Anders Carlsson <andersca@apple.com>
3501 Reviewed by Dan Bernstein.
3503 Start sending keyboard events to the plug-in host.
3505 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3506 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3507 (WebKit::NetscapePluginInstanceProxy::keyEvent):
3508 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3509 (-[WebHostedNetscapePluginView keyDown:]):
3510 (-[WebHostedNetscapePluginView keyUp:]):
3511 * Plugins/Hosted/WebKitPluginHost.defs:
3513 2008-12-16 Anders Carlsson <andersca@apple.com>
3515 Reviewed by Kevin Decker.
3517 <rdar://problem/6450538>
3519 Fix flag enumeration.
3521 * Plugins/Hosted/WebKitPluginHostTypes.h:
3523 2008-12-16 Anders Carlsson <andersca@apple.com>
3525 Reviewed by Kevin Decker.
3527 Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
3529 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3531 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3532 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3533 (WebKit::NetscapePluginInstanceProxy::loadURL):
3534 * Plugins/Hosted/WebKitPluginClient.defs:
3535 * Plugins/Hosted/WebKitPluginHostTypes.h:
3537 2008-12-16 Anders Carlsson <andersca@apple.com>
3539 Reviewed by Kevin Decker.
3541 Add trailing null to headers to avoid a crash in the plug-in host.
3543 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3544 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3546 2008-12-15 Mark Rowe <mrowe@apple.com>
3548 Rubber-stamped by Cameron Zwarich.
3550 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
3552 * Configurations/Base.xcconfig:
3553 * Configurations/DebugRelease.xcconfig:
3555 2008-12-15 Stephanie Lewis <slewis@apple.com>
3559 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3561 2008-12-15 Anders Carlsson <andersca@apple.com>
3563 Reviewed by Sam Weinig.
3565 Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
3566 back into us while it's being instantiated.
3568 * Plugins/Hosted/NetscapePluginHostManager.mm:
3569 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3570 * Plugins/Hosted/NetscapePluginHostProxy.h:
3571 (WebKit::NetscapePluginHostProxy::clientPort):
3572 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3573 (WKPCInstantiatePluginReply):
3574 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3575 (WebKit::NetscapePluginInstanceProxy::Reply::):
3576 (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
3577 (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
3578 (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
3579 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
3580 (WebKit::NetscapePluginInstanceProxy::waitForReply):
3581 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3582 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3583 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
3584 * Plugins/Hosted/WebKitPluginClient.defs:
3585 * Plugins/Hosted/WebKitPluginHost.defs:
3587 2008-12-15 Anders Carlsson <andersca@apple.com>
3589 Reviewed by Darin Adler.
3591 Let WebKit generate a plug-in ID instead of having the plug-in host do it.
3593 * Plugins/Hosted/NetscapePluginHostManager.mm:
3594 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3595 Create the plug-in proxy before instantiating the plug-in.
3597 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3598 (WebKit::NetscapePluginInstanceProxy::create):
3599 (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
3600 (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
3601 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3602 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3603 * Plugins/Hosted/WebKitPluginHost.defs:
3605 2008-12-15 Anders Carlsson <andersca@apple.com>
3607 Reviewed by Sam Weinig.
3609 LoadURL doesn't need to be asynchronous.
3611 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3613 * Plugins/Hosted/WebKitPluginClient.defs:
3614 * Plugins/Hosted/WebKitPluginHost.defs:
3616 2008-12-15 Antti Koivisto <antti@apple.com>
3618 Reviewed by Darin Adler.
3620 - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
3621 - Add corresponding IBAction to WebView.
3622 - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
3624 * WebView/WebFrame.h:
3625 * WebView/WebFrame.mm:
3626 (-[WebFrame reload]):
3627 (-[WebFrame reloadFromOrigin]):
3628 * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
3629 * WebView/WebView.h:
3630 * WebView/WebView.mm:
3631 (-[WebView reloadFromOrigin:]):
3633 2008-12-14 Dan Bernstein <mitz@apple.com>
3635 Reviewed by Darin Adler.
3637 - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
3638 should add items to userInfo
3640 * History/WebHistory.mm:
3641 (-[WebHistoryPrivate allItems]): Added this helper method, which returns
3642 all values in the _entriesByURL dictionary.
3643 (-[WebHistory removeAllItems]): Changed to send the array of all items
3644 in the notification.
3646 2008-12-13 Darin Adler <darin@apple.com>
3648 - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
3650 * WebKit.exp: Added the class. We forgot to export it when we added
3651 the WebTextIterator SPI.
3653 2008-12-12 Darin Adler <darin@apple.com>
3655 Rubber stamped by Adam Roben.
3657 - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
3658 login sheet after clicking static text, due to AppKit key loop change
3660 * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
3661 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
3662 * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
3663 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
3664 Set nextKeyView of the selectable static texts to the editable text.
3667 2008-12-12 Stephanie Lewis <slewis@apple.com>
3669 Reviewed by Geoff Garen.
3673 * WebView/WebView.mm:
3674 (+[WebView _setCacheModel:]):
3676 2008-12-12 Anders Carlsson <andersca@apple.com>
3678 Reviewed by Tim Hatcher.
3680 Don't try to free the dummy "1" port state.
3682 * Plugins/WebNetscapePluginView.mm:
3683 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3684 (-[WebNetscapePluginView updateAndSetWindow]):
3686 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3688 Rubber-stamped by Mark Rowe.
3690 Roll out r39212 due to assertion failures during layout tests, multiple
3691 layout test failures, memory leaks, and obvious incorrectness.
3693 * WebView/WebPreferenceKeysPrivate.h:
3694 * WebView/WebPreferences.mm:
3695 (-[WebPreferences fullDocumentTeardownEnabled]):
3696 * WebView/WebPreferencesPrivate.h:
3698 2008-12-11 Stephanie Lewis <slewis@apple.com>
3702 * WebView/WebView.mm:
3704 2008-12-11 Stephanie Lewis <slewis@apple.com>
3706 Reviewed by Oliver Hunt.
3708 Empty Web cache before quitting a debug build in order
3709 to report accurate CachedResource leaks.
3711 * WebView/WebView.mm:
3712 (-[WebView _close]):
3714 2008-12-11 Anders Carlsson <andersca@apple.com>
3718 * Misc/WebNSDataExtras.h:
3720 2008-12-11 Anders Carlsson <andersca@apple.com>
3722 Reviewed by Cameron Zwarich.
3724 https://bugs.webkit.org/show_bug.cgi?id=22797
3725 REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
3727 Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
3729 * Plugins/WebBaseNetscapePluginStream.mm:
3730 (WebNetscapePluginStream::destroyStreamWithReason):
3732 2008-12-10 Glenn Wilson <gwilson@google.com>
3734 Reviewed by Adam Roben.
3736 Added new methods for overriding default WebPreference values
3737 and for resetting preferences to their defaults.
3738 https://bugs.webkit.org/show_bug.cgi?id=20534
3740 * WebView/WebPreferenceKeysPrivate.h:
3741 * WebView/WebPreferences.mm:
3742 (-[WebPreferences resetToDefaults]): new method
3743 (-[WebPreferences overridePreference:flag:]): new method
3744 * WebView/WebPreferencesPrivate.h: new method signatures
3746 2008-12-10 Anders Carlsson <andersca@apple.com>
3748 Reviewed by Darin Adler.
3750 Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
3752 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3755 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3756 (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3757 Factored out this from ::destroy.
3759 (WebKit::NetscapePluginInstanceProxy::destroy):
3760 Call stopAllStreams().
3762 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
3765 (WebKit::NetscapePluginInstanceProxy::loadURL):
3766 Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
3768 2008-12-10 Anders Carlsson <andersca@apple.com>
3770 Reviewed by Darin Adler.
3772 Move two NSData category methods to WebNSDataExtras.m.
3774 * Misc/WebNSDataExtras.h:
3775 * Misc/WebNSDataExtras.m:
3776 (-[NSData _web_startsWithBlankLine]):
3777 (-[NSData _web_locationAfterFirstBlankLine]):
3778 * Plugins/WebNetscapePluginView.mm:
3780 2008-12-10 Alice Liu <alice.liu@apple.com>
3782 fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3784 Reviewed by Darin Adler.
3786 * Misc/WebNSPasteboardExtras.mm:
3787 Ask image for its file extension instead of falling back on MIME type and file path.
3788 Also moved this code to before setting the pasteboard data so as not to set any if
3789 no extension can be determined.
3790 (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3792 * WebView/WebHTMLView.mm:
3793 Fixed a separate but related long-standing bug of how the filename for the promised
3794 drag data is determined by asking the image for a proper file extension.
3795 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
3797 2008-12-09 Anders Carlsson <andersca@apple.com>
3799 Reviewed by Darin Adler.
3803 * WebView/WebHTMLView.mm:
3804 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3806 2008-12-09 Anders Carlsson <andersca@apple.com>
3808 Reviewed by Darin Adler.
3810 Implement software rendering of hosted plug-ins.
3812 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3813 (WKPCInvalidateRect):
3814 New MiG function. This is called by the plug-in host when it has drawn something.
3816 * Plugins/Hosted/WebHostedNetscapePluginView.h:
3817 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3818 (-[WebHostedNetscapePluginView createPlugin]):
3819 Create a software renderer.
3821 (-[WebHostedNetscapePluginView destroyPlugin]):
3822 Destroy the software renderer.
3824 (-[WebHostedNetscapePluginView drawRect:]):
3825 Draw using the software renderer.
3827 * Plugins/Hosted/WebKitPluginClient.defs:
3830 2008-12-09 Brett Wilson <brettw@chromium.org>
3832 Reviewed by Dave Hyatt.
3834 https://bugs.webkit.org/show_bug.cgi?id=22177
3836 Add a callback on ChromeClient that the state of form elements on
3837 the page has changed. This is to allow clients implementing session
3838 saving to know when the current state is dirty.
3840 * WebCoreSupport/WebChromeClient.h:
3841 (WebChromeClient::formStateDidChange):
3843 2008-12-09 Anders Carlsson <andersca@apple.com>
3845 Reviewed by Dan Bernstein.
3847 Make sure to pause null events for hosted plug-ins as well.
3849 * WebView/WebHTMLView.mm:
3850 (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
3852 2008-12-09 Anders Carlsson <andersca@apple.com>
3854 Reviewed by Darin Adler.
3856 * Plugins/Hosted/NetscapePluginHostProxy.h:
3857 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3858 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3859 (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
3860 Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
3862 2008-12-09 Timothy Hatcher <timothy@apple.com>
3864 Implement a few methods needed to keep Dictionary.app working on Leopard.
3866 <rdar://problem/6002160> Internal changes to WebKit in Safari 4
3867 Developer Preview might break Dictionary
3869 Reviewed by Dan Bernstein.
3871 * WebView/WebFrame.mm:
3872 (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
3873 (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
3874 * WebView/WebHTMLView.mm:
3875 (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
3876 that Dictionary.app is using.
3878 2008-12-08 Anders Carlsson <andersca@apple.com>
3880 Reviewed by Darin Adler.
3882 More work towards getting NPN_GetURL working.
3884 * Plugins/Hosted/HostedNetscapePluginStream.h:
3885 Inherit from NetscapePlugInStreamLoaderClient.
3887 (WebKit::HostedNetscapePluginStream::streamID):
3888 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3889 (WebKit::HostedNetscapePluginStream::startStream):
3890 Keep track of the resposne URL and the MIME type. Pass the response URL to the
3893 (WebKit::HostedNetscapePluginStream::didFinishLoading):
3894 Disconnect the stream.
3896 (WebKit::HostedNetscapePluginStream::start):
3897 Create a plug-in stream loader and start loading.
3899 (WebKit::HostedNetscapePluginStream::stop):
3902 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3904 Fix the parameter order.
3906 (WKPCCancelLoadURL):
3907 New function that cancels a load of a stream with a given reason.
3909 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3910 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3911 (WebKit::NetscapePluginInstanceProxy::destroy):
3914 (WebKit::NetscapePluginInstanceProxy::pluginStream):
3915 Return a plug-in stream given a stream ID.
3917 (WebKit::NetscapePluginInstanceProxy::disconnectStream):
3918 Remove the stream from the streams map.
3920 (WebKit::NetscapePluginInstanceProxy::loadRequest):
3921 Create a stream and load it.
3923 * Plugins/Hosted/WebKitPluginClient.defs:
3926 * Plugins/Hosted/WebKitPluginHost.defs:
3927 Add responseURL to StartStream.
3929 * Plugins/WebBaseNetscapePluginView.h:
3930 * Plugins/WebBaseNetscapePluginView.mm:
3931 (-[WebBaseNetscapePluginView pluginPackage]):
3932 Move this down to the base class from WebNetscapePluginView.
3934 * Plugins/WebNetscapePluginView.h:
3935 * Plugins/WebNetscapePluginView.mm:
3937 2008-12-08 Dan Bernstein <mitz@apple.com>
3939 Reviewed by John Sullivan.
3941 - WebKit/mac part of tracking the global history item for a WebView
3943 * WebView/WebView.mm:
3944 (-[WebView _globalHistoryItem]): Added. Returns the page's global
3946 * WebView/WebViewPrivate.h:
3948 2008-12-06 Simon Fraser <simon.fraser@apple.com>
3950 Reviewed by Dave Hyatt
3952 https://bugs.webkit.org/show_bug.cgi?id=15671
3954 VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
3956 * WebView/WebFrame.mm:
3957 (-[WebFrame _caretRectAtNode:offset:affinity:]):
3959 2008-12-06 David Kilzer <ddkilzer@apple.com>
3961 Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
3963 <https://bugs.webkit.org/show_bug.cgi?id=22666>
3965 Reviewed by Darin Adler.
3967 * DOM/WebDOMOperations.mm:
3968 (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
3969 ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
3971 2008-12-05 Alexey Proskuryakov <ap@webkit.org>
3973 Reviewed by Darin Adler.
3975 <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3976 in Safari before opening a mail message in Mail
3978 * Carbon/CarbonWindowAdapter.m: Removed.
3979 * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
3980 (+[CarbonWindowAdapter initialize]):
3981 * History/WebBackForwardList.mm:
3982 (+[WebBackForwardList initialize]):
3983 * History/WebHistoryItem.mm:
3984 (+[WebHistoryItem initialize]):
3985 * Misc/WebElementDictionary.mm:
3986 (+[WebElementDictionary initialize]):
3987 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3988 (+[WebHostedNetscapePluginView initialize]):
3989 * Plugins/WebBaseNetscapePluginView.mm:
3990 * Plugins/WebBasePluginPackage.m: Removed.
3991 * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
3992 (+[WebBasePluginPackage initialize]):
3993 * Plugins/WebNetscapePluginView.mm:
3994 (+[WebNetscapePluginView initialize]):
3995 * WebCoreSupport/WebEditorClient.mm:
3996 (+[WebEditCommand initialize]):
3997 * WebCoreSupport/WebFrameLoaderClient.mm:
3998 * WebView/WebArchive.mm:
3999 (+[WebArchivePrivate initialize]):
4000 * WebView/WebDataSource.mm:
4001 (+[WebDataSourcePrivate initialize]):
4002 * WebView/WebHTMLView.mm:
4003 (+[WebHTMLViewPrivate initialize]):
4004 (+[WebHTMLView initialize]):
4005 * WebView/WebResource.mm:
4006 (+[WebResourcePrivate initialize]):
4007 * WebView/WebView.mm:
4008 (+[WebViewPrivate initialize]):
4009 Call JSC::initializeThreading();
4011 2008-12-04 Stephanie Lewis <slewis@apple.com>
4015 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4018 2008-12-04 Anders Carlsson <andersca@apple.com>
4020 Reviewed by Sam Weinig.
4022 More work on streams.
4024 * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
4025 (WebKit::HostedNetscapePluginStream::create):
4026 * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
4027 (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
4028 (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
4029 (WebKit::HostedNetscapePluginStream::startStream):
4030 (WebKit::HostedNetscapePluginStream::didReceiveData):
4031 (WebKit::HostedNetscapePluginStream::didFinishLoading):
4032 (WebKit::HostedNetscapePluginStream::didReceiveResponse):
4033 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4034 (WebKit::NetscapePluginInstanceProxy::pluginView):
4035 (WebKit::NetscapePluginInstanceProxy::hostProxy):
4036 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4037 (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
4038 (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
4039 (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
4040 (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
4041 (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
4042 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4043 (WebKit::NetscapePluginInstanceProxy::performRequest):
4044 (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
4045 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
4046 (WebKit::NetscapePluginInstanceProxy::loadRequest):
4047 * Plugins/Hosted/WebKitPluginHost.defs:
4049 2008-12-04 Anders Carlsson <andersca@apple.com>
4051 Reviewed by Sam Weinig.
4053 Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
4054 but once we have a more complete implementation of NPStreams we can start refactoring things so that the
4055 implementations can share more code.
4057 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4059 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4060 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4061 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4062 (WebKit::NetscapePluginInstanceProxy::loadURL):
4063 (WebKit::NetscapePluginInstanceProxy::performRequest):
4064 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
4065 (WebKit::NetscapePluginInstanceProxy::loadRequest):
4066 * Plugins/Hosted/WebKitPluginClient.defs:
4067 * Plugins/Hosted/WebKitPluginHost.defs:
4069 2008-12-04 Anders Carlsson <andersca@apple.com>
4071 Reviewed by Dan Bernstein.
4073 Move requestWithURLCString to WebBaseNetscapePluginView.
4075 * Plugins/WebBaseNetscapePluginView.h:
4076 * Plugins/WebBaseNetscapePluginView.mm:
4077 (-[WebBaseNetscapePluginView requestWithURLCString:]):
4078 * Plugins/WebNetscapePluginView.mm:
4080 2008-12-03 Anders Carlsson <andersca@apple.com>
4082 Reviewed by Sam Weinig.
4084 Move WebPluginRequest to its own file.
4086 * Plugins/WebNetscapePluginView.mm:
4087 * Plugins/WebPluginRequest.h: Added.
4088 * Plugins/WebPluginRequest.m: Added.
4089 (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
4090 (-[WebPluginRequest dealloc]):
4091 (-[WebPluginRequest request]):
4092 (-[WebPluginRequest frameName]):
4093 (-[WebPluginRequest isCurrentEventUserGesture]):
4094 (-[WebPluginRequest sendNotification]):
4095 (-[WebPluginRequest notifyData]):
4097 2008-12-03 Anders Carlsson <andersca@apple.com>
4099 Handle the CA model.
4101 * Plugins/WebNetscapePluginView.mm:
4102 (-[WebNetscapePluginView setWindowIfNecessary]):
4104 2008-12-03 Anders Carlsson <andersca@apple.com>
4106 Reviewed by Kevin Decker.
4108 <rdar://problem/6412293>
4109 Call NPP_SetWindow for CA plug-ins.
4111 * Plugins/WebNetscapePluginView.mm:
4112 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
4113 (-[WebNetscapePluginView restorePortState:]):
4114 (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
4115 (-[WebNetscapePluginView updateAndSetWindow]):
4116 (-[WebNetscapePluginView setWindowIfNecessary]):
4118 2008-12-03 Anders Carlsson <andersca@apple.com>
4120 Fix the release build.
4122 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4123 (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
4125 2008-12-03 Anders Carlsson <andersca@apple.com>
4127 Reviewed by Dan Bernstein.
4129 <rdar://problem/6412234>
4130 Don't crash if we can't launch the plug-in host.
4132 * Plugins/Hosted/NetscapePluginHostManager.mm:
4133 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4135 2008-12-02 Anders Carlsson <andersca@apple.com>
4137 Reviewed by Dan Bernstein.
4139 Start processing messages sent to the client port.
4141 * Plugins/Hosted/NetscapePluginHostProxy.h:
4142 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4143 Add a map from ports to plug-in proxies. Turn the set of instances into a map from
4144 pluginID to instance proxy.
4147 Look up the right instance proxy and call status().
4149 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4150 (WebKit::NetscapePluginInstanceProxy::pluginID):
4151 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4152 (WebKit::NetscapePluginInstanceProxy::status):
4155 * Plugins/Hosted/WebKitPluginClient.defs:
4156 Add the plug-in ID to StatusText.
4158 2008-12-02 Gregory Hughes <ghughes@apple.com>
4160 Reviewed by Beth Dakin.
4162 Bug 22513: ZOOM: text selection does not send correct zoom bounds
4164 When zoomed, text selection must send the zoom bounds in flipped
4167 * WebCoreSupport/WebViewFactory.mm:
4168 (-[WebViewFactory accessibilityConvertScreenRect:]):
4170 2008-12-02 Anders Carlsson <andersca@apple.com>
4172 Reviewed by Dan Bernstein.
4174 Create a client mach port and pass it to the plug-in host.
4176 * Plugins/Hosted/NetscapePluginHostManager.h:
4177 * Plugins/Hosted/NetscapePluginHostManager.mm:
4178 (WebKit::NetscapePluginHostManager::hostForPackage):
4179 (WebKit::NetscapePluginHostManager::spawnPluginHost):
4180 * Plugins/Hosted/NetscapePluginHostProxy.h:
4181 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4182 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4183 * Plugins/Hosted/WebKitPluginHost.defs:
4185 2008-12-02 Anders Carlsson <andersca@apple.com>
4187 Reviewed by Sam Weinig.
4189 Let the plug-in views know if the plug-in host crashes.
4191 * Plugins/Hosted/NetscapePluginHostManager.h:
4192 * Plugins/Hosted/NetscapePluginHostManager.mm:
4193 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4194 * Plugins/Hosted/NetscapePluginHostProxy.h:
4195 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4196 (WebKit::NetscapePluginHostProxy::pluginHostDied):
4197 (WebKit::NetscapePluginHostProxy::addPluginInstance):
4198 (WebKit::NetscapePluginHostProxy::removePluginInstance):
4200 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
4201 (WebKit::NetscapePluginInstanceProxy::create):
4202 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4203 Keep a pointer to the host proxy.
4205 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
4206 Add the instance to the host set.
4208 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
4209 Remove the instance form the host set.
4211 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
4212 Tell the plug-in view that the plug-in died.
4214 * Plugins/Hosted/WebHostedNetscapePluginView.h:
4215 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4216 (-[WebHostedNetscapePluginView createPlugin]):
4217 Pass the plug-in view to the instantiatePlugin.
4219 (-[WebHostedNetscapePluginView pluginHostDied]):
4220 Handle the plug-in host crashing.
4222 (-[WebHostedNetscapePluginView drawRect:]):
4223 Fill the plug-in view with a nice red shade if the plug-in crashes.
4225 2008-12-01 Anders Carlsson <andersca@apple.com>
4227 Reviewed by Dan Bernstein.
4229 Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
4231 * Plugins/Hosted/NetscapePluginHostManager.h:
4232 * Plugins/Hosted/NetscapePluginHostManager.mm:
4233 (WebKit::NetscapePluginHostManager::pluginHostDied):
4234 Remove the plug-in host from the map.
4236 (WebKit::NetscapePluginHostManager::instantiatePlugin):
4237 NetscapePluginHostProxy is no longer refcounted.
4239 * Plugins/Hosted/NetscapePluginHostProxy.h:
4240 This is no longer refcounted. Add a set of plug-in instances (unused for now).
4242 * Plugins/Hosted/NetscapePluginHostProxy.mm:
4243 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4244 Create a death notification port.