1 2009-05-18 Sam Weinig <sam@webkit.org>
3 <rdar://problem/6899044> Can't see Apple ad on nytimes.com unless I spoof the user agent
5 Add user agent hack for pointroll.com.
7 Reviewed by Steve Falkenburg.
10 (-[WebView WebCore::_userAgentForURL:WebCore::]):
12 2009-05-16 Anders Carlsson <andersca@apple.com>
14 Reviewed by Sam Weinig and Dan Bernstein.
16 Fix <rdar://problem/6889644>
18 * Plugins/Hosted/NetscapePluginHostManager.mm:
19 (WebKit::NetscapePluginHostManager::spawnPluginHost):
21 2009-05-16 Dan Bernstein <mitz@apple.com>
23 - revert an accidental change from r43802.
25 * WebInspector/WebInspector.mm:
27 2009-05-16 Anders Carlsson <andersca@apple.com>
29 Reviewed by Dan Bernstein.
31 <rdar://problem/6895347> Mouse wheeling in the QuickTime plug-in (incorrectly) scrolls the page
33 Fix logic. The plug-in returns true if it handled the event.
35 * Plugins/WebNetscapePluginView.mm:
36 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
38 2009-05-16 Dan Bernstein <mitz@apple.com>
40 Reviewed by Alexey Proskuryakov.
42 - fix <rdar://problem/6873305> Two distinct characters are not displayed
43 correctly with 2 of the font selections from the stickies widget
45 * WebView/WebHTMLView.mm:
46 (-[WebHTMLView _plainTextFromPasteboard:]): Return precomposed text.
47 This is consistent with
48 -_documentFragmentFromPasteboard:forType:inContext:subresources:.
50 2009-05-15 Anders Carlsson <andersca@apple.com>
52 Reviewed by Dan Bernstein.
54 Fix <rdar://problem/6875398>.
56 * Plugins/Hosted/NetscapePluginHostManager.mm:
57 (WebKit::NetscapePluginHostManager::instantiatePlugin):
58 If we failed to instantiate the plug-in, call cleanup() so that any streams created by the plug-in from its
59 NPP_New callback are destroyed.
61 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
62 Make cleanup() public.
64 2009-05-15 Darin Adler <darin@apple.com>
66 Reviewed by Anders Carlsson.
68 <rdar://problem/6889823> hash table iterator used after hash table modified in
69 ProxyInstance::fieldNamed() when viewing movie trailer
71 * Plugins/Hosted/ProxyInstance.mm:
72 (WebKit::ProxyInstance::methodsNamed): Move add call after the waitForReply call.
73 Anders says that by the time we return someone else might have done the same add
75 (WebKit::ProxyInstance::fieldNamed): Ditto.
77 2009-05-15 Anders Carlsson <andersca@apple.com>
79 Reviewed by Darin Adler.
81 <rdar://problem/6892055>
82 Replace WKN_GetLocation with WKN_ResolveURL (WKN_GetLocation was confusing and did not take the base URL into account)
84 * Plugins/Hosted/NetscapePluginHostProxy.mm:
88 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
89 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
90 (WebKit::NetscapePluginInstanceProxy::resolveURL):
91 Use FrameLoader::complete URL here.
93 * Plugins/Hosted/WebKitPluginClient.defs:
94 Add new MIG definition.
96 * Plugins/WebBaseNetscapePluginView.h:
97 * Plugins/WebBaseNetscapePluginView.mm:
98 (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
99 * Plugins/WebNetscapeContainerCheckPrivate.h:
100 * Plugins/WebNetscapeContainerCheckPrivate.mm:
101 (browserContainerCheckFuncs):
102 * Plugins/WebNetscapePluginView.h:
103 * Plugins/WebNetscapePluginView.mm:
104 (-[WebNetscapePluginView resolveURL:forTarget:]):
108 2009-05-15 Dan Bernstein <mitz@apple.com>
110 Reviewed by Darin Adler.
112 - fix <rdar://problem/6892052> WebTextIterator should not “emit
113 characters between all visible positions”
115 * WebView/WebTextIterator.mm:
116 (-[WebTextIterator initWithRange:]): Changed to construct a TextIterator
117 with emitCharactersBetweenAllVisiblePositions set to false.
119 2009-05-15 Mark Rowe <mrowe@apple.com>
121 Reviewed by Dave Kilzer.
123 Look for libWebKitSystemInterface.a in a more reasonable location.
125 * Configurations/DebugRelease.xcconfig:
127 2009-05-14 David Hyatt <hyatt@apple.com>
129 Reviewed by Tim Hatcher.
131 Fix for <rdar://problem/6886217> REGRESSION (S4 beta-ToT): Adium chat window contents no longer resize.
133 Technically this is a bug in Adium. It appears that Adium has subclassed the WebView and implemented
134 viewDidMoveToWindow in its subclass improperly. It doesn't call up to the base class WebView like it
135 should and so our boundsChanged notification never gets added.
137 Reduce the dependence on viewDidMoveToWindow by moving the registration of observers into
138 viewWillMoveToWindow instead.
140 * WebView/WebView.mm:
141 (-[WebView addSizeObserversForWindow:]):
142 (-[WebView removeWindowObservers]):
143 (-[WebView addWindowObserversForWindow:]):
144 (-[WebView viewWillMoveToWindow:]):
145 (-[WebView viewDidMoveToWindow]):
146 (-[WebView viewDidMoveToSuperview]):
148 2009-05-14 David Levin <levin@chromium.org>
150 Reviewed by Eric Seidel.
152 https://bugs.webkit.org/show_bug.cgi?id=24704
154 Allow the local cache directory to be set using a defaults key.
156 * Misc/WebKitNSStringExtras.h:
157 * Misc/WebKitNSStringExtras.m:
158 (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
161 2009-05-14 Darin Adler <darin@apple.com>
163 Reviewed by Adam Roben.
165 <rdar://problem/6879999> Automator actions that use WebKit on a background thread fail when run outside of Automator
167 * WebView/WebView.mm:
168 (clientNeedsWebViewInitThreadWorkaround): Added. Contains new broader rule.
169 (needsWebViewInitThreadWorkaround): Changed to call clientNeedsWebViewInitThreadWorkaround.
171 2009-05-14 Darin Adler <darin@apple.com>
173 Reviewed by John Sullivan.
175 Bug 24049: Second right-click crashes safari when alert invoked
176 https://bugs.webkit.org/show_bug.cgi?id=24049
177 rdar://problem/6878977
179 * WebView/WebHTMLView.mm:
180 (-[WebHTMLView rightMouseUp:]): Added a retain/autorelease of the event.
181 (-[WebHTMLView menuForEvent:]): Ditto. Also cleaned up the logic here and
182 eliminated some use of pointers that might be invalid after calling through
184 (-[WebHTMLView scrollWheel:]): Ditto.
185 (-[WebHTMLView acceptsFirstMouse:]): Ditto.
186 (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Ditto.
187 (-[WebHTMLView mouseDown:]): Ditto.
188 (-[WebHTMLView mouseDragged:]): Ditto.
189 (-[WebHTMLView mouseUp:]): Ditto.
190 (-[WebHTMLView keyDown:]): Ditto.
191 (-[WebHTMLView keyUp:]): Ditto.
192 (-[WebHTMLView flagsChanged:]): Ditto.
193 (-[WebHTMLView performKeyEquivalent:]): Ditto.
195 2009-05-14 Mark Rowe <mrowe@apple.com>
197 Rubber-stamped by Darin Adler.
199 <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2
201 The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode.
202 Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR
203 if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not.
205 * Configurations/Base.xcconfig:
207 2009-05-13 Anders Carlsson <andersca@apple.com>
209 Reviewed by Sam Weinig.
211 WebKit side of <rdar://problem/6884476>.
213 * Plugins/Hosted/NetscapePluginHostProxy.mm:
215 Forward this to the plug-in instance proxy.
217 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
218 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
219 (WebKit::NetscapePluginInstanceProxy::getLocation):
220 Ask the plug-in view for the location.
222 * Plugins/Hosted/WebKitPluginClient.defs:
225 * Plugins/WebBaseNetscapePluginView.h:
226 * Plugins/WebBaseNetscapePluginView.mm:
227 (-[WebBaseNetscapePluginView locationStringForTarget:]):
228 Return the URL for a given frame.
230 * Plugins/WebNetscapeContainerCheckPrivate.h:
231 Bump version. Add new declaration to the vtable.
233 * Plugins/WebNetscapeContainerCheckPrivate.mm:
234 (browserContainerCheckFuncs):
235 Add new declaration to the vtable.
237 * Plugins/WebNetscapePluginView.h:
238 * Plugins/WebNetscapePluginView.mm:
239 (-[WebNetscapePluginView locationForTarget:]):
240 Call the base class method.
244 Forward this to the plug-in view.
246 2009-05-13 Douglas R. Davidson <ddavidso@apple.com>
248 Reviewed by Darin Adler.
250 <rdar://problem/6871587> Smart Copy/Paste setting should persist as continuous
251 spell checking setting does
253 * WebView/WebPreferenceKeysPrivate.h: Added WebSmartInsertDeleteEnabled.
255 * WebView/WebView.mm:
256 (-[WebViewPrivate init]): Initialize based on WebSmartInsertDeleteEnabled
258 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
259 Removed code that initialized here.
260 (-[WebView setSmartInsertDeleteEnabled:]): Set default here was with
261 continuous spell checking setting.
263 2009-05-13 Darin Adler <darin@apple.com>
265 Revert the parser arena change. It was a slowdown, not a speedup.
266 Better luck next time (I'll break it up into pieces).
268 2009-05-13 Darin Adler <darin@apple.com>
270 Reviewed by Cameron Zwarich.
272 Bug 25674: syntax tree nodes should use arena allocation
273 https://bugs.webkit.org/show_bug.cgi?id=25674
275 * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
276 New ones needed due to reducing includes of JSDOMBinding.h.
277 * WebView/WebScriptDebugger.mm: Ditto.
279 2009-05-13 Douglas R. Davidson <ddavidso@apple.com>
281 Reviewed by Darin Adler.
283 <rdar://problem/6879145>
284 Generate a contextual menu item allowing autocorrections to
285 easily be changed back. Refrain from re-correcting items
286 that have already been autocorrected once.
288 * WebCoreSupport/WebViewFactory.mm:
289 (-[WebViewFactory contextMenuItemTagChangeBack:]):
290 * WebView/WebUIDelegatePrivate.h:
292 2009-05-12 Anders Carlsson <andersca@apple.com>
294 Reviewed by Dan Bernstein.
296 Fix <rdar://problem/6878105>.
298 When instantiating the QT plug-in under Dashboard, force "kiosk mode".
300 * Plugins/WebBaseNetscapePluginView.mm:
301 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
303 2009-05-12 Dan Bernstein <mitz@apple.com>
305 Reviewed by Darin Adler.
307 - declare a forgotten method
309 * DOM/WebDOMOperationsPrivate.h: Declare -[DOMNode markupString] in the
310 WebDOMNodeOperationsPendingPublic category.
312 2009-05-10 Alexey Proskuryakov <ap@webkit.org>
314 Reviewed by Dan Bernstein.
316 <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page
318 * Misc/WebDownload.m: Removed.
319 * Misc/WebDownload.mm: Copied from WebKit/mac/Misc/WebDownload.m.
320 (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Try to use
321 credentials from WebCore storage.
323 2009-05-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
325 Not reviewed. Fix clean builds, forgot to land name() -> formControlName() rename patch in WebKit. Only landed the WebCore side.
327 * WebView/WebHTMLRepresentation.mm:
328 (-[WebHTMLRepresentation elementWithName:inForm:]):
330 2009-05-08 Anders Carlsson <andersca@apple.com>
332 Reviewed by Kevin Decker.
334 - Fix <rdar://problem/6866712>.
336 Instead of just caching whether a plug-in object _has_ a field or method, also add an entry to the cache
337 if it _doesn't_ have a certain field or method. This way we have to make fewer calls to the plug-in host.
339 * Plugins/Hosted/ProxyInstance.mm:
340 (WebKit::ProxyInstance::methodsNamed):
341 (WebKit::ProxyInstance::fieldNamed):
343 2009-05-08 Douglas R. Davidson <ddavidso@apple.com>
345 Reviewed by Darin Adler.
347 Fixes for <rdar://problem/6852771>.
348 Disable text checking menu items if view is not editable.
350 * WebView/WebHTMLView.mm:
351 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
352 (-[WebHTMLView smartInsertDeleteEnabled]):
353 (-[WebHTMLView setSmartInsertDeleteEnabled:]):
354 (-[WebHTMLView toggleSmartInsertDelete:]):
355 * WebView/WebHTMLViewInternal.h:
357 2009-05-08 Alexey Proskuryakov <ap@webkit.org>
359 Reviewed by Maciej Stachowiak.
361 <rdar://problem/6868773> NPN_GetAuthenticationInfo does not work with non-permanent credentials
363 * Plugins/WebBaseNetscapePluginView.mm: (WebKit::getAuthenticationInfo): Ask WebCore for
364 credentials first (but also ask NSURLCredentialStorage, because WebCore won't know about
365 permanent credentials).
367 2009-05-05 Ben Murdoch <benm@google.com>
369 Reviewed by Eric Seidel.
371 Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds.
372 https://bugs.webkit.org/show_bug.cgi?id=24776
374 * Storage/WebDatabaseManager.mm:
375 * Storage/WebDatabaseManagerInternal.h:
376 * Storage/WebDatabaseManagerPrivate.h:
377 * Storage/WebDatabaseTrackerClient.h:
378 * Storage/WebDatabaseTrackerClient.mm:
379 * Storage/WebSecurityOrigin.mm:
380 (-[WebSecurityOrigin usage]):
381 (-[WebSecurityOrigin quota]):
382 (-[WebSecurityOrigin setQuota:]):
383 * Storage/WebSecurityOriginPrivate.h:
384 * WebCoreSupport/WebChromeClient.h:
385 * WebCoreSupport/WebChromeClient.mm:
386 * WebView/WebView.mm:
387 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
389 2009-05-04 Anders Carlsson <andersca@apple.com>
391 Reviewed by Kevin Decker.
393 Fix <rdar://problem/6797644>.
395 Make sure to send a reply even when an instance proxy can't be found.
397 * Plugins/Hosted/NetscapePluginHostProxy.mm:
406 2009-05-04 Darin Adler <darin@apple.com>
408 Reviewed by Eric Seidel.
410 Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
411 and NamedMappedAttrMap.h include of MappedAttribute.h
412 https://bugs.webkit.org/show_bug.cgi?id=24924
414 * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
417 2009-05-02 Geoffrey Garen <ggaren@apple.com>
419 Reviewed by Sam Weinig.
421 Simplified null-ish JSValues.
423 Replaced calls to noValue() with calls to JSValue() (which is what
424 noValue() returned). Removed noValue().
426 Removed "JSValue()" initialiazers, since default construction happens...
429 * WebView/WebScriptDebugDelegate.mm:
430 (-[WebScriptCallFrame evaluateWebScript:]):
432 2009-05-02 Alexey Proskuryakov <ap@webkit.org>
434 Reviewed by Dan Bernstein.
436 <rdar://problem/6741615> REGRESSION (r38629): Shortcut "Flag/Junk" in MobileMe does not work
437 when Kotoeri is used.
439 * WebView/WebHTMLView.mm: (-[WebHTMLView inputContext]): Return a nil input context when
440 focus is not in editable content.
442 2009-05-01 Geoffrey Garen <ggaren@apple.com>
444 Rubber Stamped by Sam Weinig.
446 Renamed JSValuePtr => JSValue.
448 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
449 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
450 (WebKit::NetscapePluginInstanceProxy::evaluate):
451 (WebKit::NetscapePluginInstanceProxy::invoke):
452 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
453 (WebKit::NetscapePluginInstanceProxy::construct):
454 (WebKit::NetscapePluginInstanceProxy::getProperty):
455 (WebKit::NetscapePluginInstanceProxy::setProperty):
456 (WebKit::NetscapePluginInstanceProxy::hasMethod):
457 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
458 (WebKit::NetscapePluginInstanceProxy::marshalValue):
459 (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
460 (WebKit::NetscapePluginInstanceProxy::demarshalValue):
461 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
462 * Plugins/Hosted/ProxyInstance.h:
463 * Plugins/Hosted/ProxyInstance.mm:
464 (WebKit::ProxyField::valueFromInstance):
465 (WebKit::ProxyField::setValueToInstance):
466 (WebKit::ProxyInstance::invoke):
467 (WebKit::ProxyInstance::invokeMethod):
468 (WebKit::ProxyInstance::invokeDefaultMethod):
469 (WebKit::ProxyInstance::invokeConstruct):
470 (WebKit::ProxyInstance::defaultValue):
471 (WebKit::ProxyInstance::stringValue):
472 (WebKit::ProxyInstance::numberValue):
473 (WebKit::ProxyInstance::booleanValue):
474 (WebKit::ProxyInstance::valueOf):
475 (WebKit::ProxyInstance::fieldValue):
476 (WebKit::ProxyInstance::setFieldValue):
477 * WebView/WebFrame.mm:
478 (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
479 * WebView/WebScriptDebugDelegate.mm:
480 (-[WebScriptCallFrame _convertValueToObjcValue:]):
481 (-[WebScriptCallFrame exception]):
482 (-[WebScriptCallFrame evaluateWebScript:]):
483 * WebView/WebView.mm:
485 (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
487 2009-05-01 Pavel Feldman <pfeldman@chromium.org>
489 Reviewed by Timothy Hatcher.
491 Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
493 https://bugs.webkit.org/show_bug.cgi?id=25347
495 * WebCoreSupport/WebFrameLoaderClient.h:
496 * WebCoreSupport/WebFrameLoaderClient.mm:
497 (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
499 2009-04-30 David Kilzer <ddkilzer@apple.com>
501 Provide a mechanism to create a quirks delegate for HTMLParser
503 Reviewed by David Hyatt.
505 * WebCoreSupport/WebChromeClient.h:
506 (WebChromeClient::createHTMLParserQuirks): Added. The default
507 implementation of this factory method returns 0.
509 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org>
511 Reviewed by Timothy Hatcher.
513 https://bugs.webkit.org/show_bug.cgi?id=25470
514 Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler.
516 * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define.
518 2009-04-30 Kevin Decker <kdecker@apple.com>
520 Reviewed by Anders Carlson.
522 <rdar://problem/6823049>
524 Fix an issue where some plug-ins would cause the application icon to constantly bounce
525 up and down in the Dock.
527 * Plugins/Hosted/NetscapePluginHostProxy.h: Change m_placeholderWindow ivar to be
528 a subclass of NSWindow, WebPlaceholderModalWindow.
529 * Plugins/Hosted/NetscapePluginHostProxy.mm: Added WebPlaceholderModalWindow NSWindow subclass.
530 (-[WebPlaceholderModalWindow _wantsUserAttention]): Prevent NSApp from calling requestUserAttention:
531 when the window is shown modally, even if the app is inactive.
532 (WebKit::NetscapePluginHostProxy::beginModal): NSWindow -> WebPlaceholderModalWindow.
534 2009-04-30 Pavel Feldman <pfeldman@chromium.org>
536 Reviewed by Dimitri Glazkov.
538 https://bugs.webkit.org/show_bug.cgi?id=25342
539 Add MessageSource and MessageLevel parameters to the ChromeClient::addMessageToConsole.
541 * WebCoreSupport/WebChromeClient.h:
542 * WebCoreSupport/WebChromeClient.mm:
543 (WebChromeClient::addMessageToConsole):
545 2009-04-29 Mark Rowe <mrowe@apple.com>
547 More build fixing after r43037.
549 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
550 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
551 (WebKit::NetscapePluginInstanceProxy::invoke):
552 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
553 (WebKit::NetscapePluginInstanceProxy::construct):
554 (WebKit::NetscapePluginInstanceProxy::demarshalValues):
556 2009-04-29 Dan Bernstein <mitz@apple.com>
558 Reviewed by Simon Fraser.
560 - WebKit part of <rdar://problem/6609509> Select All and then Delete
561 should put Mail editing back into the same state as a new message
563 * WebView/WebView.mm:
564 (-[WebView _selectionIsCaret]): Added.
565 (-[WebView _selectionIsAll]): Added. Returns whether the selection
566 encompasses the entire document.
567 * WebView/WebViewPrivate.h:
569 2009-04-29 Douglas Davidson <ddavidso@apple.com>
571 Reviewed by Justin Garcia.
573 <rdar://problem/6836921> Mail exhibits issues with text checking, e.g. menu items not always validated correctly
575 * WebView/WebHTMLView.mm:
576 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
577 (-[WebHTMLView orderFrontSubstitutionsPanel:]):
578 * WebView/WebView.mm:
579 (-[WebView validateUserInterfaceItemWithoutDelegate:]):
581 2009-04-29 David Hyatt <hyatt@apple.com>
583 Reviewed by Dan Bernstein.
585 Fix a bug in the bounds checking for setNeedsLayout dirtying when a WebView's size changes. The superview
586 of the WebView was being incorrectly checked instead of the WebView itself.
588 * WebView/WebView.mm:
589 (-[WebView _boundsChanged]):
591 2009-04-29 Kevin Decker <kdecker@apple.com>
593 Reviewed by Anders Carlson.
595 Allow WKN_CheckIfAllowedToLoadURL() to take an optional void* context parameter.
597 * Plugins/WebNetscapeContainerCheckContextInfo.h:
598 * Plugins/WebNetscapeContainerCheckContextInfo.mm:
599 (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
600 (-[WebNetscapeContainerCheckContextInfo callback]):
601 (-[WebNetscapeContainerCheckContextInfo context]):
602 * Plugins/WebNetscapeContainerCheckPrivate.h:
603 * Plugins/WebNetscapeContainerCheckPrivate.mm:
604 (browserContainerCheckFuncs):
605 * Plugins/WebNetscapePluginView.h:
606 * Plugins/WebNetscapePluginView.mm:
607 (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
608 (-[WebNetscapePluginView _containerCheckResult:contextInfo:]):
610 (WKN_CheckIfAllowedToLoadURL):
612 2009-04-29 David Hyatt <hyatt@apple.com>
614 Reviewed by John Sullivan.
616 Fix for <rdar://problem/6835573>, Find Banner turns invisible when WebView is resized. Make sure
617 not to resize the interior views of a WebView in response to its bounds changing when not using
618 viewless WebKit. Auto-resizing rules were already in place to handle size adjustments for us.
619 Just mark as needing layout and do nothing else.
621 This does mean viewless WebKit is broken with the Find Banner, and that will likely require a
622 Safari change (using a new API that will enable clients to define the edges of the content area as offsets
623 from the sides of the WebView).
625 * WebView/WebView.mm:
626 (-[WebView _boundsChanged]):
628 2009-04-28 Geoffrey Garen <ggaren@apple.com>
630 Rubber stamped by Beth Dakin.
632 Removed scaffolding supporting dynamically converting between 32bit and
633 64bit value representations.
635 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
636 (WebKit::NetscapePluginInstanceProxy::marshalValues):
638 2009-04-28 Anders Carlsson <andersca@apple.com>
640 Reviewed by Kevin Decker and Darin Adler.
642 Fix <rdar://problem/6836132>.
644 * Plugins/Hosted/NetscapePluginHostProxy.mm:
645 (WKPCCheckIfAllowedToLoadURL):
646 Call the instance proxy.
648 (WKPCCancelCheckIfAllowedToLoadURL):
651 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
652 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
653 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
654 Initialize the check ID counter.
656 (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURL):
657 Create a WebPluginContainerCheck, add it to the map, and start it.
659 (WebKit::NetscapePluginInstanceProxy::cancelCheckIfAllowedToLoadURL):
660 Remove the check from the map.
662 (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURLResult):
663 Call the WKPH MIG callback.
665 * Plugins/Hosted/WebHostedNetscapePluginView.h:
666 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
667 (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
668 Call the instance proxy.
670 (-[WebHostedNetscapePluginView _containerCheckResult:contextInfo:]):
673 * Plugins/Hosted/WebKitPluginClient.defs:
674 * Plugins/Hosted/WebKitPluginHost.defs:
675 Add MIG declarations.
677 2009-04-28 Dan Bernstein <mitz@apple.com>
679 Reviewed by John Sullivan.
681 - fix <rdar://problem/6786360> Make PDF an insertable pasteboard type
683 * WebCoreSupport/WebPasteboardHelper.mm:
684 (WebPasteboardHelper::insertablePasteboardTypes):
685 * WebView/WebHTMLView.mm:
686 (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
687 (+[WebHTMLView _insertablePasteboardTypes]):
688 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
690 2009-04-27 Douglas R. Davidson <ddavidso@apple.com>
692 Add the various switches and context menu items needed for
693 <rdar://problem/6724106> WebViews need to implement text checking
694 and adopt updatePanels in place of old SPI _updateGrammar.
696 Reviewed by Justin Garcia.
698 * WebCoreSupport/WebContextMenuClient.mm:
699 (fixMenusReceivedFromOldClients):
700 * WebCoreSupport/WebEditorClient.h:
701 * WebCoreSupport/WebEditorClient.mm:
702 (WebEditorClient::uppercaseWord):
703 (WebEditorClient::lowercaseWord):
704 (WebEditorClient::capitalizeWord):
705 (WebEditorClient::showSubstitutionsPanel):
706 (WebEditorClient::substitutionsPanelIsShowing):
707 (WebEditorClient::toggleSmartInsertDelete):
708 (WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
709 (WebEditorClient::toggleAutomaticQuoteSubstitution):
710 (WebEditorClient::isAutomaticLinkDetectionEnabled):
711 (WebEditorClient::toggleAutomaticLinkDetection):
712 (WebEditorClient::isAutomaticDashSubstitutionEnabled):
713 (WebEditorClient::toggleAutomaticDashSubstitution):
714 (WebEditorClient::isAutomaticTextReplacementEnabled):
715 (WebEditorClient::toggleAutomaticTextReplacement):
716 (WebEditorClient::isAutomaticSpellingCorrectionEnabled):
717 (WebEditorClient::toggleAutomaticSpellingCorrection):
718 (WebEditorClient::checkTextOfParagraph):
719 * WebCoreSupport/WebViewFactory.mm:
720 (-[WebViewFactory contextMenuItemTagShowColors]):
721 (-[WebViewFactory contextMenuItemTagCorrectSpellingAutomatically]):
722 (-[WebViewFactory contextMenuItemTagSubstitutionsMenu]):
723 (-[WebViewFactory contextMenuItemTagShowSubstitutions:]):
724 (-[WebViewFactory contextMenuItemTagSmartCopyPaste]):
725 (-[WebViewFactory contextMenuItemTagSmartQuotes]):
726 (-[WebViewFactory contextMenuItemTagSmartDashes]):
727 (-[WebViewFactory contextMenuItemTagSmartLinks]):
728 (-[WebViewFactory contextMenuItemTagTextReplacement]):
729 (-[WebViewFactory contextMenuItemTagTransformationsMenu]):
730 (-[WebViewFactory contextMenuItemTagMakeUpperCase]):
731 (-[WebViewFactory contextMenuItemTagMakeLowerCase]):
732 (-[WebViewFactory contextMenuItemTagCapitalize]):
733 * WebView/WebHTMLView.mm:
734 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
735 (-[WebHTMLView isAutomaticQuoteSubstitutionEnabled]):
736 (-[WebHTMLView setAutomaticQuoteSubstitutionEnabled:]):
737 (-[WebHTMLView toggleAutomaticQuoteSubstitution:]):
738 (-[WebHTMLView isAutomaticLinkDetectionEnabled]):
739 (-[WebHTMLView setAutomaticLinkDetectionEnabled:]):
740 (-[WebHTMLView toggleAutomaticLinkDetection:]):
741 (-[WebHTMLView isAutomaticDashSubstitutionEnabled]):
742 (-[WebHTMLView setAutomaticDashSubstitutionEnabled:]):
743 (-[WebHTMLView toggleAutomaticDashSubstitution:]):
744 (-[WebHTMLView isAutomaticTextReplacementEnabled]):
745 (-[WebHTMLView setAutomaticTextReplacementEnabled:]):
746 (-[WebHTMLView toggleAutomaticTextReplacement:]):
747 (-[WebHTMLView isAutomaticSpellingCorrectionEnabled]):
748 (-[WebHTMLView setAutomaticSpellingCorrectionEnabled:]):
749 (-[WebHTMLView toggleAutomaticSpellingCorrection:]):
750 * WebView/WebHTMLViewInternal.h:
751 * WebView/WebPreferenceKeysPrivate.h:
752 * WebView/WebUIDelegatePrivate.h:
753 * WebView/WebView.mm:
754 (-[WebViewPrivate init]):
755 (-[WebView validateUserInterfaceItemWithoutDelegate:]):
756 (-[WebView setGrammarCheckingEnabled:]):
757 (-[WebView isAutomaticQuoteSubstitutionEnabled]):
758 (-[WebView isAutomaticLinkDetectionEnabled]):
759 (-[WebView isAutomaticDashSubstitutionEnabled]):
760 (-[WebView isAutomaticTextReplacementEnabled]):
761 (-[WebView isAutomaticSpellingCorrectionEnabled]):
762 (-[WebView setAutomaticQuoteSubstitutionEnabled:]):
763 (-[WebView toggleAutomaticQuoteSubstitution:]):
764 (-[WebView setAutomaticLinkDetectionEnabled:]):
765 (-[WebView toggleAutomaticLinkDetection:]):
766 (-[WebView setAutomaticDashSubstitutionEnabled:]):
767 (-[WebView toggleAutomaticDashSubstitution:]):
768 (-[WebView setAutomaticTextReplacementEnabled:]):
769 (-[WebView toggleAutomaticTextReplacement:]):
770 (-[WebView setAutomaticSpellingCorrectionEnabled:]):
771 (-[WebView toggleAutomaticSpellingCorrection:]):
772 * WebView/WebViewPrivate.h:
774 2009-04-27 David Kilzer <ddkilzer@apple.com>
776 Consolidate runtime application checks for Apple Mail and Safari
778 Reviewed by Mark Rowe and Darin Adler.
780 * WebCoreSupport/WebContextMenuClient.mm:
781 (isAppleMail): Removed.
782 (fixMenusToSendToOldClients): Switched to use
783 applicationIsAppleMail().
784 * WebView/WebFrame.mm:
785 (-[WebFrame reload]): Switched to use applicationIsSafari().
786 * WebView/WebPDFView.mm:
787 (-[WebPDFView menuForEvent:]): Ditto.
788 * WebView/WebResource.mm:
789 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]):
790 Switched to use applicationIsAppleMail().
791 * WebView/WebView.mm:
792 (runningLeopardMail): Ditto.
793 (runningTigerMail): Ditto.
794 (-[WebView _needsKeyboardEventDisambiguationQuirks]): Switched
795 to use applicationIsSafari().
797 2009-04-27 Kevin Decker <kdecker@apple.com>
801 * Plugins/WebNetscapePluginView.mm: The base class of WebNetscapePluginView.mm, WebBaseNetscapePluginView, already implemented
802 the two methods below. But the Tiger compiler didn't know that.
803 (-[WebNetscapePluginView webView]):
804 (-[WebNetscapePluginView webFrame]):
806 2009-04-27 Kevin Decker <kdecker@apple.com>
808 Reviewed by Anders Carlsson.
810 <rdar://problem/6352982>
812 * Plugins/WebBaseNetscapePluginView.mm: Removed checkIfAllowedToLoadURL:frame:callbackFunc, cancelCheckIfAllowedToLoadURL, and
813 _webPluginContainerCancelCheckIfAllowedToLoadRequest from the base class. These methods now exist in the subclass WebNetscapePluginView.
815 Added WebNetscapeContainerCheckContextInfo, which is used as a "contextInfo" object in
816 -[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]
817 * Plugins/WebNetscapeContainerCheckContextInfo.h: Added.
818 * Plugins/WebNetscapeContainerCheckContextInfo.mm: Added.
819 (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:]): Added desiginated initializer.
820 (-[WebNetscapeContainerCheckContextInfo checkRequestID]): Added. Returns the checkRequestID.
821 (-[WebNetscapeContainerCheckContextInfo callback]): Added. Returns the callback.
823 * Plugins/WebNetscapePluginView.h: Added two new ivars: _containerChecksInProgress and _currentContainerCheckRequestID.
824 * Plugins/WebNetscapePluginView.mm: #import both WebPluginContainerCheck.h and WebNetscapeContainerCheckContextInfo.h
826 (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added. This is the implementation of WKN_CheckIfAllowedToLoadURL.
827 Here, we increment the request ID and start the container check.
829 (-[WebNetscapePluginView _containerCheckResult:contextInfo:]): Added. This is a callback method for WebPluginContainerCheck.
830 It's where we actually call into the plug-in and provide the allow-or-deny result.
832 (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Added. This is the implementation of WKN_CancelCheckIfAllowedToLoadURL.
833 Here we lookup the check, cancel it, and remove it from _containerChecksInProgress.
835 (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added. WebPluginContainerCheck automatically calls
836 this method after invoking our _containerCheckResult: selector. It works this way because calling -[WebPluginContainerCheck cancel] allows
837 it to do it's teardown process.
839 (-[WebNetscapePluginView fini]): Release _containerChecksInProgress ivar.
841 * Plugins/WebPluginContainerCheck.h: Removed initWithRequest: method from header; no client was using this method directly.
842 * Plugins/WebPluginContainerCheck.mm:
843 (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:contextInfo:]): Added optional contextInfo parameter.
844 (-[WebPluginContainerCheck _continueWithPolicy:]): If there's a contextInfo object, pass it as a parameter to resultSelector.
845 (-[WebPluginContainerCheck cancel]): Release _contextInfo ivar.
846 (-[WebPluginContainerCheck contextInfo]): Added new method. Returns the contextInfo object, if one so exists.
847 * Plugins/WebPluginController.mm:
848 (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Pass nil for contextInfo. WebKit-style
849 plug-ins do not need additional context information.
851 2009-04-25 Brady Eidson <beidson@apple.com>
853 Reviewed by Sam Weinig
855 Some *obvious* style cleanup in my last patch.
857 * History/WebBackForwardList.mm:
858 (bumperCarBackForwardHackNeeded):
860 2009-04-25 Brady Eidson <beidson@apple.com>
862 Reviewed by Oliver Hunt
864 <rdar://problem/6817607> BumperCar 2.2 crashes going back (invalid WebHistoryItem)
866 BumperCar was holding a pointer to a WebHistoryItem they never retain, then later
867 tried to go to it. In some cases it would be dealloc'ed first.
868 When WebHistoryItems were pure Objective-C they probably got away with this more often.
869 With the WebCore/Obj-C mixed WebHistoryItems it's more likely to crash.
871 * History/WebBackForwardList.mm:
872 (bumperCarBackForwardHackNeeded):
873 (-[WebBackForwardList backListWithLimit:]): If this is BumperCar, hang on to the
874 NSArray of WebHistoryItems until the next time this method is called.
875 (-[WebBackForwardList forwardListWithLimit:]): Ditto.
877 * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK.
879 2009-04-24 Anders Carlsson <andersca@apple.com>
881 Reviewed by Darin Adler.
883 Fix <rdar://problem/6761635>.
885 Make sure to keep an extra reference to the instance proxy in case the plug-in host crashes while
886 we're waiting for a reply.
888 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
889 (WebKit::NetscapePluginInstanceProxy::destroy):
891 2009-04-24 Brady Eidson <beidson@apple.com>
893 Reviewed by Dan Bernstein
895 Currently working on a bug where a WebHistoryItem was being used after being dealloc'ed.
896 I added this assertion to help catch the case as soon as it happens instead of random
897 issues downstream. Figured it's worth checking in by itself.
899 * History/WebHistoryItem.mm:
900 (core): ASSERT that the WebCore::HistoryItem inside this WebHistoryItem is supposed to have
901 this WebHistoryItem as a wrapper.
903 2009-04-23 Beth Dakin <bdakin@apple.com>
905 Reviewed by Darin Adler.
907 Fix for <rdar://problem/6333461> REGRESSION (r36864-r36869):
908 Dragging stocks widget scrollbar drags the whole widget
910 Look for our new WebCore scrollbars in the WebHTMLView and add
911 proper Dashboard regions for them.
913 * WebView/WebView.mm:
914 (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
915 (-[WebView _addScrollerDashboardRegions:from:]):
917 2009-04-23 John Sullivan <sullivan@apple.com>
919 fixed <rdar://problem/6822479> Assertion failure after Reset Safari in new history-writing code
921 Reviewed by Oliver Hunt
923 * History/WebHistory.mm:
924 (-[WebHistoryPrivate data]):
925 Return nil immediately if there are no entries; this matches a recent Windows-platform fix.
927 2009-04-23 Dimitri Glazkov <dglazkov@chromium.org>
929 Reviewed by Darin Adler.
931 https://bugs.webkit.org/show_bug.cgi?id=25313
932 Missing scroll bars in GMail.
934 * WebView/WebDynamicScrollBarsView.m:
935 (-[WebDynamicScrollBarsView updateScrollers]): Added check for the ScrollbarAlwaysOn
938 2009-04-23 Kevin Decker <kdecker@apple.com>
940 * Plugins/WebPluginContainerCheck.h: Fix the Tiger build.
942 2009-04-23 Anders Carlsson <andersca@apple.com>
944 Reviewed by Geoffrey Garen.
946 Fix <rdar://problem/6821992>
948 Add a new m_inDestroy member variable. Set it to true when in destroy, and have all NPRuntime functions return false
949 when m_inDestroy is true.
951 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
952 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
953 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
954 (WebKit::NetscapePluginInstanceProxy::destroy):
955 (WebKit::NetscapePluginInstanceProxy::invoke):
956 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
957 (WebKit::NetscapePluginInstanceProxy::construct):
958 (WebKit::NetscapePluginInstanceProxy::getProperty):
959 (WebKit::NetscapePluginInstanceProxy::setProperty):
960 (WebKit::NetscapePluginInstanceProxy::removeProperty):
961 (WebKit::NetscapePluginInstanceProxy::hasProperty):
962 (WebKit::NetscapePluginInstanceProxy::hasMethod):
963 (WebKit::NetscapePluginInstanceProxy::enumerate):
965 2009-04-23 David Hyatt <hyatt@apple.com>
969 Fix for <rdar://problem/6789879> REGRESSION (42464): Hitting assertion when loading message in Mail + TOT WebKit
971 Make the Mac platform the same as all the other platforms. Instead of (incorrectly) marking a FrameView for layout
972 when its underlying document view changes, just mark the outermost frame view for layout when the WebView's size changes.
974 * WebView/WebHTMLView.mm:
975 (-[WebHTMLView _frameOrBoundsChanged]):
976 (-[WebHTMLView addSuperviewObservers]):
977 * WebView/WebView.mm:
978 (-[WebView _boundsChanged]):
979 (-[WebView removeSizeObservers]):
980 (-[WebView addSizeObservers]):
982 2009-04-23 Kevin Decker <kdecker@apple.com>
984 Reviewed by Tim Hatcher.
986 Second part of the fix for <rdar://problem/6352982>
988 * Plugins/WebBaseNetscapePluginView.h: Make this class conform to WebPluginContainerCheckController
989 * Plugins/WebBaseNetscapePluginView.mm: Likewise.
990 (-[WebBaseNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added skeleton method.
991 * Plugins/WebPluginContainerCheck.h: Added protocol for <WebPluginContainerCheckController>
992 * Plugins/WebPluginContainerCheck.mm:
993 (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]):
994 * Plugins/WebPluginController.h: Make this class conform to WebPluginContainerCheckController
996 2009-04-23 Kevin Decker <kdecker@apple.com>
998 Reviewed by Anders Carlsson.
1000 First part of <rdar://problem/6352982>
1002 * Plugins/WebBaseNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h; Added two new method:
1003 checkIfAllowedToLoadURL:url:frame:callbackFunc: and cancelCheckIfAllowedToLoadURL:
1004 * Plugins/WebBaseNetscapePluginView.mm:
1005 (-[WebBaseNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added skeleton method, does nothing interesting
1007 (-[WebBaseNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Likewise.
1008 * Plugins/WebNetscapeContainerCheckPrivate.h: Added.
1009 * Plugins/WebNetscapeContainerCheckPrivate.mm: Added.
1010 (browserContainerCheckFuncs): Added.
1011 * Plugins/WebNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h;
1012 * Plugins/WebNetscapePluginView.mm: Imported #WebNetscapeContainerCheckPrivate.h; added WKN_CheckIfAllowedToLoadURL
1013 and WKN_CancelCheckIfAllowedToLoadURL functions.
1014 (-[WebNetscapePluginView getVariable:value:]): Return vtable for container check functions.
1016 (WKN_CheckIfAllowedToLoadURL): Added new private function.
1017 (WKN_CancelCheckIfAllowedToLoadURL): Ditto.
1019 2009-04-22 Oliver Hunt <oliver@apple.com>
1021 Reviewed by Darin Adler.
1023 <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
1025 Make mouseUP forward to the root view as we do for mouseMoves and mouseDragged:.
1027 * WebView/WebHTMLView.mm:
1028 (-[WebHTMLView mouseUp:]):
1030 2009-04-22 Oliver Hunt <oliver@apple.com>
1032 Reviewed by Darin Adler.
1034 <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
1036 Make mouseDragged forward to the root view as we do for mouseMoves.
1038 * WebView/WebHTMLView.mm:
1039 (-[WebHTMLView mouseDragged:]):
1041 2009-04-22 Anders Carlsson <andersca@apple.com>
1043 Reviewed by Oliver Hunt.
1045 Fix <rdar://problem/6792694>
1047 When we're trying to instantiate a plug-in and the plug-in host has died, we need to invalidate the
1048 instance so that it doesn't stick around and do bad things.
1050 * Plugins/Hosted/NetscapePluginHostManager.mm:
1051 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1053 2009-04-22 Sam Weinig <sam@webkit.org>
1055 Rubber-stamped by Darin Adler.
1057 Fix for <rdar://problem/6816957>
1058 Turn off Geolocation by default
1060 * Configurations/FeatureDefines.xcconfig:
1062 2009-04-21 Dan Bernstein <mitz@apple.com>
1064 Reviewed by Jon Honeycutt.
1066 - Mac part of fixing for <rdar://problem/6755137> Action dictionary for
1067 policy decision is missing keys when full-page zoom is used
1069 * WebCoreSupport/WebFrameLoaderClient.mm:
1070 (WebFrameLoaderClient::actionDictionary): Use absoluteLocation() instead
1071 of pageX() and pageY(), which are adjusted for zoom.
1073 2009-04-21 Anders Carlsson <andersca@apple.com>
1075 Reviewed by Darin Adler and Kevin Decker.
1077 WebKit side of <rdar://problem/6781642>.
1079 When we call resize with an actual changed size, block until the plug-in host is done.
1081 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1082 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1083 (WebKit::NetscapePluginInstanceProxy::resize):
1084 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1085 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1086 (-[WebHostedNetscapePluginView updateAndSetWindow]):
1087 * Plugins/Hosted/WebKitPluginHost.defs:
1089 2009-04-17 Timothy Hatcher <timothy@apple.com>
1091 Change how sudden termination works with WebView teardown.
1093 <rdar://problem/6383352&6383379&6383940>
1095 Reviewed by Darin Adler.
1097 * WebCoreSupport/WebChromeClient.h: Remove disableSuddenTermination/enableSuddenTermination.
1098 * WebCoreSupport/WebChromeClient.mm: Ditto.
1099 * WebView/WebFrame.mm:
1100 (-[WebFrame _pendingFrameUnloadEventCount]): Ask the DOMWindow.
1101 * WebView/WebView.mm:
1102 (+[WebView canCloseAllWebViews]): Call DOMWindow::dispatchAllPendingBeforeUnloadEvents.
1103 (+[WebView closeAllWebViews]): Call DOMWindow::dispatchAllPendingUnloadEvents and
1104 call close on all the WebViews.
1105 (-[WebView _closeWithFastTeardown]): Remove code for unload event dispatch.
1106 (-[WebView _close]): Correct a comment.
1107 (+[WebView _applicationWillTerminate]): Call closeAllWebViews.
1108 * WebView/WebViewPrivate.h: Add canCloseAllWebViews and closeAllWebViews.
1110 2009-04-21 Geoffrey Garen <ggaren@apple.com>
1112 Reviewed by Mark Rowe.
1114 Tiger crash fix: Put VM tags in their own header file, and fixed up the
1115 #ifdefs so they're not used on Tiger.
1117 * ForwardingHeaders/wtf/VMTags.h: Copied from ForwardingHeaders/wtf/HashTraits.h.
1119 2009-04-17 Anders Carlsson <andersca@apple.com>
1121 Reviewed by Sam Weinig.
1123 <rdar://problem/6722845>
1124 In the Cocoa event model, NPWindow's window field should be null
1126 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1128 Get the instance proxy and call it's convertPoint function.
1130 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1131 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1132 (WebKit::NetscapePluginInstanceProxy::convertPoint):
1133 Call convertPoint on the plug-in view.
1135 * Plugins/Hosted/WebKitPluginClient.defs:
1138 * Plugins/WebBaseNetscapePluginView.h:
1139 Add a declaration for convertFromX:andY:space:toX:andY:space:.
1141 * Plugins/WebBaseNetscapePluginView.mm:
1142 (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
1143 Convert a point from one coordinate system to another.
1145 * Plugins/WebNetscapePluginEventHandler.h:
1146 * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1147 * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1148 (WebNetscapePluginEventHandlerCarbon::drawRect):
1149 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1150 Add CGContextRef to drawRect.
1152 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1153 (WebNetscapePluginEventHandlerCocoa::drawRect):
1154 Set the passed in context.
1156 * Plugins/WebNetscapePluginPackage.mm:
1157 (-[WebNetscapePluginPackage _tryLoad]):
1158 Add NPN_ConvertPoint to the browserFuncs vtable.
1160 * Plugins/WebNetscapePluginView.mm:
1161 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1162 Only set the window for the Carbon event model.
1164 (-[WebNetscapePluginView restorePortState:]):
1165 It's OK for the window context to be null.
1167 (-[WebNetscapePluginView sendDrawRectEvent:]):
1168 Pass the CGContextRef to drawRect.
1172 Call the plug-in view method.
1174 2009-04-20 Sam Weinig <sam@webkit.org>
1176 Rubber-stamped by Tim Hatcher.
1178 Add licenses for xcconfig files.
1180 * Configurations/Base.xcconfig:
1181 * Configurations/DebugRelease.xcconfig:
1182 * Configurations/FeatureDefines.xcconfig:
1183 * Configurations/Version.xcconfig:
1184 * Configurations/WebKit.xcconfig:
1186 2009-04-20 Anders Carlsson <andersca@apple.com>
1188 Reviewed by Dan Bernstein.
1190 WebKit side of <rdar://problem/6781302>
1192 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1193 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1194 (WebKit::NetscapePluginInstanceProxy::keyEvent):
1195 Pass the event keyChar.
1197 (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
1200 (WebKit::NetscapePluginInstanceProxy::flagsChanged):
1203 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1204 (-[WebHostedNetscapePluginView flagsChanged:]):
1205 Call NetscapePluginInstanceProxy::flagsChanged.
1207 * Plugins/Hosted/WebKitPluginHost.defs:
1208 Add a keyChar argument.
1210 2009-04-19 Adele Peterson <adele@apple.com>
1212 Reviewed by Darin Adler.
1214 Fix for <rdar://problem/6804809> REGRESSION: In Mail, Home and End do not scroll message
1216 If no scrolling occurs, call tryToPerform on the next responder. Then our WebResponderChainSink
1217 will correctly detect if no responders handle the selector.
1219 * WebView/WebFrameView.mm:
1220 (-[WebFrameView _scrollToBeginningOfDocument]):
1221 (-[WebFrameView _scrollToEndOfDocument]):
1222 (-[WebFrameView scrollToBeginningOfDocument:]):
1223 (-[WebFrameView scrollToEndOfDocument:]):
1224 (-[WebFrameView scrollLineUp:]):
1225 (-[WebFrameView scrollLineDown:]):
1227 2009-04-19 David Kilzer <ddkilzer@apple.com>
1229 Make FEATURE_DEFINES completely dynamic
1231 Reviewed by Darin Adler.
1233 Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
1234 variables for each feature, making it possible to remove all
1235 knowledge of FEATURE_DEFINES from build-webkit.
1237 * Configurations/FeatureDefines.xcconfig: Extract a variable
1238 from FEATURE_DEFINES for each feature setting.
1240 2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
1242 Reviewed by Mark Rowe.
1244 <rdar://problem/6781295> video.buffered and video.seekable are not
1245 the same. video.buffered should return only what is buffered and
1246 not what is seekable
1248 * WebCoreSupport/WebSystemInterface.m:
1249 (InitWebCoreSystemInterface): Add wkQTMovieMaxTimeSeekable.
1251 2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com>
1253 Reviewed by Adele Peterson.
1255 <rdar://problem/6747241> work around QTKit no longer reaching
1256 QTMovieLoadStateComplete
1258 * WebCoreSupport/WebSystemInterface.m:
1259 (InitWebCoreSystemInterface): Init the new WKSI exported symbol.
1261 2009-04-17 Anders Carlsson <andersca@apple.com>
1263 Reviewed by Dan Bernstein.
1265 <rdar://problem/6714488>
1266 REGRESSION (Safari 3-4): Edit menu commands (cut/copy/paste/select all) do not work on Flash content
1268 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1269 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1270 (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
1271 Send a keyDown event to the plug-in host.
1273 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1274 (-[WebHostedNetscapePluginView sendModifierEventWithKeyCode:character:]):
1275 Call the plug-in instance proxy.
1277 * Plugins/WebBaseNetscapePluginView.mm:
1278 (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]):
1279 Add this. Subclasses are required to override it.
1281 (-[WebBaseNetscapePluginView cut:]):
1282 (-[WebBaseNetscapePluginView copy:]):
1283 (-[WebBaseNetscapePluginView paste:]):
1284 (-[WebBaseNetscapePluginView selectAll:]):
1285 Call sendModifierEventWithKeyCode.
1287 * Plugins/WebNetscapePluginEventHandler.h:
1288 Add syntheticKeyDownWithCommandModifier.
1290 * Plugins/WebNetscapePluginEventHandlerCarbon.h:
1291 * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1292 (WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier):
1293 Send the synthetic event.
1295 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
1296 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1297 (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
1298 Send the synthetic event.
1300 * Plugins/WebNetscapePluginView.mm:
1301 (-[WebNetscapePluginView sendModifierEventWithKeyCode:character:]):
1302 Call the event handler.
1304 2009-04-17 David Kilzer <ddkilzer@apple.com>
1306 Simplify FEATURE_DEFINES definition
1308 Reviewed by Darin Adler.
1310 This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
1311 variables to their own FeatureDefines.xcconfig file. It also
1312 extracts a new ENABLE_GEOLOCATION variable so that
1313 FEATURE_DEFINES only needs to be defined once.
1315 * Configurations/FeatureDefines.xcconfig: Added.
1316 * Configurations/WebKit.xcconfig: Removed definition of
1317 ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include
1318 of FeatureDefines.xcconfig.
1320 2009-04-17 Anders Carlsson <andersca@apple.com>
1322 Reviewed by Darin Adler.
1324 Fix crashes seen in regression tests with hosted plug-ins.
1326 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1327 (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Check the stream for 0,
1330 2009-04-17 Darin Adler <darin@apple.com>
1332 Reviewed by Antti Koivisto.
1334 Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
1335 https://bugs.webkit.org/show_bug.cgi?id=25210
1337 * DOM/WebDOMOperations.mm:
1338 (-[DOMNode markupString]): Use the core function instead of an Objective-C method.
1339 (-[DOMNode _subresourceURLs]): Ditto.
1340 (-[DOMDocument _focusableNodes]): Ditto.
1341 (-[DOMRange webArchive]): Ditto.
1342 (-[DOMRange markupString]): Ditto.
1344 * Misc/WebElementDictionary.mm: Added now-needed include since the core and kit
1345 functions now come from the internal headers from DOM bindings.
1346 * Misc/WebNSPasteboardExtras.mm: Ditto.
1347 * Plugins/WebNullPluginView.mm: Ditto.
1348 * Plugins/WebPluginController.mm: Ditto.
1349 * WebCoreSupport/WebChromeClient.mm: Ditto.
1350 * WebCoreSupport/WebInspectorClient.mm: Ditto.
1351 * WebCoreSupport/WebPasteboardHelper.mm: Ditto.
1352 * WebView/WebHTMLView.mm: Ditto.
1354 * WebCoreSupport/WebEditorClient.mm: Made kit function have internal linkage
1355 since it's only used in this file. Someone had instead added a declaration to
1356 suppress the warning you would otherwise get. Removed the core function.
1357 (WebEditorClient::textFieldDidBeginEditing): Added correct type checking.
1358 Previously the function would check only that something was an HTMLElement,
1359 but then cast it to HTMLInputElement. Also call kit instead of old wrap method.
1360 (WebEditorClient::textFieldDidEndEditing): Ditto.
1361 (WebEditorClient::textDidChangeInTextField): Ditto.
1362 (WebEditorClient::doTextFieldCommandFromEvent): Ditto.
1363 (WebEditorClient::textWillBeDeletedInTextField): Ditto.
1364 (WebEditorClient::textDidChangeInTextArea): Ditto, but for HTMLTextAreaElement.
1366 * WebView/WebFrame.mm: Removed the core and kit functions here which are no longer
1367 needed since they're automatically generated now.
1368 (-[WebFrame _nodesFromList:]): Use kit.
1369 (-[WebFrame _markupStringFromRange:nodes:]): Use core.
1370 (-[WebFrame _stringForRange:]): More of the same.
1371 (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
1372 (-[WebFrame _firstRectForDOMRange:]): Ditto.
1373 (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
1374 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1376 (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
1377 (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
1378 (-[WebFrame _markDOMRange]): Ditto.
1379 (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
1380 (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
1381 (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
1382 (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
1383 (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
1384 (-[WebFrame _characterRangeAtPoint:]): Ditto.
1385 (-[WebFrame _typingStyle]): Ditto.
1386 (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
1387 (-[WebFrame _pauseAnimation:onNode:atTime:]): Ditto.
1388 (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): Ditto.
1389 (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
1391 * WebView/WebFrameInternal.h: Removed the core and kit functions here which are no longer
1392 needed since they're automatically generated now.
1394 * WebView/WebHTMLRepresentation.mm:
1395 (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Use core.
1396 (formElementFromDOMElement): Ditto.
1397 (inputElementFromDOMElement): Ditto.
1398 * WebView/WebTextIterator.mm:
1399 (-[WebTextIterator initWithRange:]): Ditto.
1400 (-[WebTextIterator currentRange]): Ditto.
1401 (-[WebTextIterator currentNode]): Ditto.
1402 * WebView/WebView.mm:
1403 (-[WebView textIteratorForRect:]): Ditto.
1404 (-[WebView setSelectedDOMRange:affinity:]): Ditto.
1406 2009-04-17 Anders Carlsson <andersca@apple.com>
1408 Reviewed by Sam Weinig.
1410 WebKit side of <rdar://problem/6449642>.
1412 * Plugins/Hosted/HostedNetscapePluginStream.h:
1413 (WebKit::HostedNetscapePluginStream::create):
1414 New function that creates a stream from a frame loader.
1416 * Plugins/Hosted/HostedNetscapePluginStream.mm:
1417 (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
1418 Add the constructor that takes a frame loader.
1420 * Plugins/Hosted/NetscapePluginHostManager.h:
1421 * Plugins/Hosted/NetscapePluginHostManager.mm:
1422 (WebKit::NetscapePluginHostManager::instantiatePlugin):
1423 Pass "fullFrame" to the plug-in host.
1425 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1426 (WKPCCancelLoadURL):
1427 Call NetscapePluginInstanceProxy::cancelStreamLoad.
1429 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1430 (WebKit::NetscapePluginInstanceProxy::create):
1431 Pass "fullFrame" to the constructor.
1433 (WebKit::NetscapePluginInstanceProxy::manualStream):
1434 New getter for the manual stream.
1436 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1437 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
1438 Take the implicit request into account if we have a full frame plug-in.
1440 (WebKit::NetscapePluginInstanceProxy::setManualStream):
1441 Setter for the manual stream.
1443 (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
1444 Cancel the manual stream if necessary.
1446 * Plugins/Hosted/WebHostedNetscapePluginView.h:
1447 WebHostedNetscapePluginView now conforms to the WebPluginManualLoader protocol.
1449 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1450 (-[WebHostedNetscapePluginView createPlugin]):
1451 Pass "fullFrame" to instantiatePlugin.
1453 (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
1454 (-[WebHostedNetscapePluginView pluginView:receivedData:]):
1455 (-[WebHostedNetscapePluginView pluginView:receivedError:]):
1456 (-[WebHostedNetscapePluginView pluginViewFinishedLoading:]):
1457 Call the equivalent manual stream functions.
1459 * WebCoreSupport/WebFrameLoaderClient.mm:
1460 (WebFrameLoaderClient::createPlugin):
1461 Use a macro for getting the plug-in view type.
1463 2009-04-14 Simon Fraser <simon.fraser@apple.com>
1465 Reviewed by Dan Bernstein
1467 https://bugs.webkit.org/show_bug.cgi?id=25157
1469 Move the run loop observer cleanup from -close
1472 * WebView/WebView.mm:
1473 (-[WebView _close]):
1476 2009-04-14 Anders Carlsson <andersca@apple.com>
1478 Reviewed by Sam Weinig.
1480 - Speculative fix for <rdar://problem/6781422>
1482 Protect the plug-in instance proxy in case it's deleted while waiting for a reply.
1484 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1485 (WebKit::NetscapePluginInstanceProxy::wheelEvent):
1487 2009-04-14 Adele Peterson <adele@apple.com>
1491 Initialize WebKitSystemInterface in class methods that could get called before a WebView/WebFrame is set up. This was causing Mail to crash on launch.
1493 * Misc/WebCache.mm: (+[WebCache initialize]):
1494 * WebView/WebView.mm: (+[WebView initialize]):
1496 2009-04-13 Kevin Decker <kdecker@apple.com>
1500 <rdar://problem/6784955> REGRESSION: closing a tab containing a PDF causes world leaks
1502 Simplify the _trackFirstResponder method by just caching the value instead of retaining
1505 * WebView/WebPDFView.h: Eliminated trackedFirstResponder object and replaced it with
1506 a firstResponderIsPDFDocumentView boolean.
1507 * WebView/WebPDFView.mm:
1508 (-[WebPDFView dealloc]): Removed no longer necessary ASSERT.
1509 (-[WebPDFView viewWillMoveToWindow:]): Removed call to release and nil-out trackedFirstResponder,
1510 which no longer exists. In the new code all we do now is set firstResponderIsPDFDocumentView to NO.
1511 (-[WebPDFView _trackFirstResponder]): Rewrote this method to just cache the value instead
1512 of retaining an object.
1514 2009-04-13 David Hyatt <hyatt@apple.com>
1516 Reviewed by Sam Weinig.
1518 Fix for https://bugs.webkit.org/show_bug.cgi?id=25125. Rework scrolling so that a layout happens first when
1519 it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
1521 This patch also eliminates WebHTMLView's separate notion of needing a layout and just consolidates it with
1522 WebCore's notion of needing layout.
1524 * WebView/WebDynamicScrollBarsView.m:
1525 (-[WebDynamicScrollBarsView updateScrollers]):
1526 * WebView/WebHTMLView.mm:
1527 (-[WebHTMLView _frameOrBoundsChanged]):
1528 (-[WebHTMLView initWithFrame:]):
1529 (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1530 (-[WebHTMLView setNeedsLayout:]):
1531 (-[WebHTMLView _layoutIfNeeded]):
1532 (-[WebHTMLView _needsLayout]):
1533 * WebView/WebHTMLViewInternal.h:
1535 2009-04-13 Darin Adler <darin@apple.com>
1537 * WebView/WebViewPrivate.h: Updated comments.
1539 2009-04-13 Antti Koivisto <antti@apple.com>
1541 Reviewed by Darin Adler.
1543 <rdar://problem/6740294> Increase the connection count per host
1545 * WebCoreSupport/WebSystemInterface.m:
1546 (InitWebCoreSystemInterface):
1548 2009-04-13 Brady Eidson <beidson@apple.com>
1550 Reviewed by Tim Hatcher
1552 Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
1553 useful to developers/users.
1555 * WebView/WebFrame.mm:
1556 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
1557 perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
1558 (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
1560 (-[WebFrame loadHTMLString:baseURL:]): Ditto.
1561 (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
1563 2009-04-13 Brady Eidson <beidson@apple.com>
1565 Reviewed by Kevin Decker
1567 <rdar://problem/6712063> Garmin WebUpdater crashes
1569 * WebView/WebFrame.mm:
1570 (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not called on the main thread,
1571 add a ThreadViolationCheckRoundTwo() call to either log or raise an exception. In the case where it's
1572 only a log, reschedule the _loadData call to occur on the main thread.
1574 2009-04-10 Dan Bernstein <mitz@apple.com>
1576 Reviewed by Jon Honeycutt.
1578 - fix <rdar://problem/6752340> Light blue-green background in content
1581 * WebView/WebView.mm:
1582 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
1583 Use device white, rather than calibrated white, as the default
1586 2009-04-10 Darin Adler <darin@apple.com>
1588 Reviewed by Brady Eidson.
1590 <rdar://problem/6773515> crash in push_heap inside WebCore when printing
1592 The crash was due to manipulating a timer on a different thread than the one it was created on.
1594 * History/WebHistoryItem.mm:
1595 (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread.
1596 * WebView/WebHTMLView.mm:
1597 (-[WebHTMLView windowDidBecomeKey:]): Ditto.
1598 (-[WebHTMLView windowDidResignKey:]): Ditto.
1599 (-[WebHTMLView windowWillClose:]): Ditto.
1600 (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of
1601 our override of _windowChangedKeyState.
1602 (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if
1603 called on non-main thread.
1604 * WebView/WebPreferences.mm:
1605 (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called
1608 2009-04-10 Timothy Hatcher <timothy@apple.com>
1610 Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed.
1612 Rubber-stamped by Mark Rowe.
1614 * Misc/DOMDocumentPrivate.h: Removed.
1616 2009-04-10 Pierre d'Herbemont <pdherbemont@apple.com>
1618 Reviewed by Adele Peterson.
1620 <rdar://problem/6646998> Avoid starting QTKitServer if possible
1621 Add the requires symbol in the WebSystemInterface. It is used by
1624 * WebCoreSupport/WebSystemInterface.m:
1625 (InitWebCoreSystemInterface): Add wkQTIncludeOnlyModernMediaFileTypes.
1627 2009-04-09 Kevin Decker <kdecker@apple.com>
1631 <rdar://problem/4680397> tearing seen because deferred updates are disabled
1633 * WebView/WebFrameView.mm:
1634 (-[WebFrameView initWithFrame:]): Don't call WKDisableCGDeferredUpdates on post-Leopard if
1635 NSAppKitVersionNumberWithDeferredWindowDisplaySupport is defined.
1637 2009-04-09 John Sullivan <sullivan@apple.com>
1639 <rdar://problem/6775682> WebKit's support for SnowLeopard sudden termination for
1640 downloads is broken and should be removed
1642 Reviewed by Darin Adler
1644 * Misc/WebDownload.m:
1645 (-[WebDownloadInternal downloadDidBegin:]):
1646 remove disableSuddenTermination call
1647 (-[WebDownloadInternal downloadDidFinish:]):
1648 remove enableSuddenTermination call
1649 (-[WebDownloadInternal download:didFailWithError:]):
1650 remove enableSuddenTermination call
1652 2009-04-09 Darin Adler <darin@apple.com>
1654 Reviewed by Anders Carlsson and Sam Weinig.
1656 Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing
1658 Longer term solution is to change the design so Safari doesn't read and write all of history.
1659 This patch is step one: Do the serializing, which is done on the main thread, much faster.
1661 * History/WebHistory.mm:
1662 (-[WebHistoryPrivate data]): Added. Returns the NSData object containing serialized history.
1663 For creating new SPI so you can get the data in memory instead of on disk. Uses WebHistoryWriter.
1664 (-[WebHistoryPrivate saveToURL:error:]): Changed to call [self data
1665 (-[WebHistory _data]): Added.
1666 (WebHistoryWriter::WebHistoryWriter): Added.
1667 (WebHistoryWriter::writeHistoryItems): Added.
1669 * History/WebHistoryPrivate.h: Added a new _data method.
1671 2009-04-09 Mike Thole <mthole@apple.com>
1673 Rubber-stamped by Mark Rowe.
1677 * Panels/WebAuthenticationPanel.h:
1678 Declare the 'separateRealmLabel' IBOutlet as an NSTextField instead of 'id'.
1679 This fixes a duplicate method warning (setAutoresizingMask: on NSView and CALayer)
1681 2009-04-09 Mike Thole <mthole@apple.com>
1683 Reviewed by Ada Chan.
1685 <rdar://problem/5697111> Basic authentication dialog spoofing vulnerability
1687 * Panels/WebAuthenticationPanel.h:
1688 Added IBOutlet for separateRealmLabel
1689 * Panels/WebAuthenticationPanel.m:
1690 (-[WebAuthenticationPanel setUpForChallenge:]):
1691 In the realm case, decide if it is a simple or complex realm name. A realm name
1692 is considered complex if it has any whitespace or newline characters. Present
1693 alternative text and layout for the complex case, where the realm name isn't inline
1694 with the rest of the sheet's text.
1696 * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
1697 * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
1698 Updated the nib with a new 'separateRealmLabel' outlet.
1699 Updated the File's Owner to correctly be WebAuthenticationPanel.
1700 Fixed springs on the sheet's icon to keep it from moving during a resize.
1702 2009-04-09 David Kilzer <ddkilzer@apple.com>
1704 Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
1706 Rolled r42345 back in. The build failure was caused by an
1707 internal script which had not been updated the same way that
1708 build-webkit was updated.
1710 * Configurations/WebKit.xcconfig:
1711 * DOM/WebDOMOperations.mm:
1712 * MigrateHeaders.make:
1714 2009-04-09 Alexey Proskuryakov <ap@webkit.org>
1716 Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
1717 It broke Mac build, and I don't know how to fix it.
1719 * Configurations/WebKit.xcconfig:
1720 * DOM/WebDOMOperations.mm:
1721 * MigrateHeaders.make:
1723 2009-04-08 David Kilzer <ddkilzer@apple.com>
1725 <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
1727 Reviewed by Darin Adler and Maciej Stachowiak.
1729 Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
1730 that SVG DOM Objective-C bindings may be optionally disabled.
1732 * Configurations/WebKit.xcconfig: Added
1733 ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
1735 * DOM/WebDOMOperations.mm: Removed unused header.
1736 * MigrateHeaders.make: Switched from using ENABLE_SVG to using
1737 ENABLE_SVG_DOM_OBJC_BINDINGS.
1739 2009-04-08 David Hyatt <hyatt@apple.com>
1741 Reviewed by Adam Roben and Darin Adler
1743 Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, fixed positioned elements end up in
1744 inconsistent positions. Rewrite updateScrollers to improve the correctness.
1746 * WebView/WebDynamicScrollBarsView.h:
1747 * WebView/WebDynamicScrollBarsView.m:
1748 (-[WebDynamicScrollBarsView updateScrollers]):
1750 2009-04-07 Anders Carlsson <andersca@apple.com>
1752 Fix Tiger build for real this time.
1754 * Plugins/WebNetscapePluginView.h:
1755 * Plugins/WebNetscapePluginView.mm:
1756 (-[WebNetscapePluginView getVariable:forURL:value:length:]):
1757 (-[WebNetscapePluginView setVariable:forURL:value:length:]):
1758 (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
1760 (NPN_GetValueForURL):
1761 (NPN_SetValueForURL):
1763 2009-04-07 David Hyatt <hyatt@apple.com>
1765 Reviewed by Adam Roben
1767 Mac portion of fix to make DumpRenderTree always produce accurate scrollbar results. Change
1768 updateScrollers to call minimumContentsSize when a WebHTMLView is inside the WebDynamicScrollbarsView.
1770 * WebView/WebDynamicScrollBarsView.m:
1771 (-[WebDynamicScrollBarsView updateScrollers]):
1773 2009-04-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
1775 Reviewed by Anders Carlsson.
1777 Trying to fix Tiger build.
1779 * Plugins/WebNetscapePluginView.h:
1780 * Plugins/WebNetscapePluginView.mm:
1781 (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
1783 2009-04-07 Anders Carlsson <andersca@apple.com>
1785 Try to fix the Leopard build once more.
1787 * Plugins/WebBaseNetscapePluginView.h:
1788 * Plugins/WebBaseNetscapePluginView.mm:
1789 * Plugins/WebNetscapePluginView.mm:
1790 (-[WebNetscapePluginView getVariable:forURL:value:length:]):
1792 2009-04-07 Anders Carlsson <andersca@apple.com>
1794 ...and try to fix the Leopard build.
1797 (NPN_GetAuthenticationInfo):
1799 2009-04-07 Anders Carlsson <andersca@apple.com>
1801 Try to fix the Tiger build.
1803 * Plugins/WebBaseNetscapePluginView.mm:
1805 2009-04-07 Anders Carlsson <andersca@apple.com>
1807 Reviewed by Sam Weinig.
1809 <rdar://problem/6667001>
1810 NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
1812 * Plugins/Hosted/NetscapePluginHostProxy.mm:
1816 (WKPCGetAuthenticationInfo):
1817 New MIG functions to be used by the plug-in host.
1819 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1820 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1821 (WebKit::NetscapePluginInstanceProxy::getCookies):
1822 (WebKit::NetscapePluginInstanceProxy::setCookies):
1823 (WebKit::NetscapePluginInstanceProxy::getProxy):
1824 (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
1827 * Plugins/Hosted/WebKitPluginClient.defs:
1830 * Plugins/WebBaseNetscapePluginView.h:
1831 * Plugins/WebBaseNetscapePluginView.mm:
1832 (-[WebBaseNetscapePluginView URLWithCString:]):
1833 Factor this out of URLWithCString.
1835 (-[WebBaseNetscapePluginView requestWithURLCString:]):
1836 Call URLWithCString.
1838 (WebKit::proxiesForURL):
1839 Return a string representation of proxies for a given URL.
1841 (WebKit::getAuthenticationInfo):
1842 Get the authentication info for a given host/protocol/scheme/realm/port combination.
1844 * Plugins/WebNetscapePluginPackage.mm:
1845 (-[WebNetscapePluginPackage _tryLoad]):
1846 Initialize the new vtable functions.
1848 * Plugins/WebNetscapePluginView.h:
1849 * Plugins/WebNetscapePluginView.mm:
1850 (-[WebNetscapePluginView getVariable:forURL:value:length:]):
1851 (-[WebNetscapePluginView setVariable:forURL:value:length:]):
1852 (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
1856 (NPN_GetValueForURL):
1857 (NPN_SetValueForURL):
1858 (NPN_GetAuthenticationInfo):
1859 Call the plug-in view functions.
1861 2009-04-03 Kevin Decker <kdecker@apple.com>
1863 Reviewed by Anders Carlsson.
1865 <rdar://problem/6756512>
1867 * Plugins/Hosted/NetscapePluginHostManager.mm:
1868 (WebKit::NetscapePluginHostManager::spawnPluginHost): Tweaked the visibleName property.
1870 2009-04-03 John Sullivan <sullivan@apple.com>
1872 Reviewed by Ada Chan
1874 <rdar://problem/6755838> Removing all icons can delete other items from disk.
1876 * Misc/WebIconDatabase.mm:
1877 (importToWebCoreFormat):
1878 When snooping around in various directories looking for a directory full of Safari-2-style
1879 icon database information to convert and delete, bail out without doing the delete part if
1880 we didn't actually find any Safari-2-style icon database information.
1882 2009-04-03 John Sullivan <sullivan@apple.com>
1884 fixed <rdar://problem/6355573> [WebView _setCacheModel:] leaks the result of _CFURLCacheCopyCacheDirectory
1886 Reviewed by Adam Roben
1888 * WebView/WebView.mm:
1889 (+[WebView _setCacheModel:]):
1890 use WebCFAutorelease rather than autorelease on result of method that returns CFStringRef
1892 2009-04-03 Chris Marrin <cmarrin@apple.com>
1894 Reviewed by David Hyatt.
1896 Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
1898 This fix essentially does a -viewWillDraw call for layout. It adds
1899 a CFRunLoopObserver which performs layout just before drawing on the
1900 Mac platform. This makes sure layout is complete before rendering and
1903 * WebCoreSupport/WebChromeClient.h:
1904 * WebCoreSupport/WebChromeClient.mm:
1905 (WebChromeClient::attachRootGraphicsLayer):
1906 (WebChromeClient::setNeedsOneShotDrawingSynchronization):
1907 (WebChromeClient::scheduleViewUpdate):
1908 * WebView/WebView.mm:
1909 (-[WebViewPrivate _clearViewUpdateRunLoopObserver]):
1910 (-[WebView _viewWillDrawInternal]):
1911 (-[WebView viewWillDraw]):
1913 (viewUpdateRunLoopObserverCallBack):
1914 (-[WebView _scheduleViewUpdate]):
1915 * WebView/WebViewInternal.h:
1917 2009-04-03 Anders Carlsson <andersca@apple.com>
1919 Reviewed by Kevin Decker.
1921 WebKit side of <rdar://problem/6752953>.
1923 Pass the clip rect to the plug-in host.
1925 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1926 (WebKit::NetscapePluginInstanceProxy::resize):
1927 * Plugins/Hosted/WebKitPluginHost.defs:
1929 2009-04-02 Mark Rowe <mrowe@apple.com>
1931 Reviewed by Dan Bernstein and Timothy Hatcher.
1933 <rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file
1935 The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to
1936 our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those
1939 * WebView/WebView.mm:
1940 (-[WebView removeSizeObservers]): Nil-check _private before dereferencing it.
1941 (-[WebView addSizeObservers]): Ditto.
1943 2009-04-02 Adele Peterson <adele@apple.com>
1945 Reviewed by Darin Adler.
1947 Add a way to get a list of focusable nodes.
1949 * DOM/WebDOMOperations.mm:
1950 (-[DOMDocument _focusableNodes]):
1951 * DOM/WebDOMOperationsInternal.h: Added.
1952 * DOM/WebDOMOperationsPrivate.h: Make this a private header.
1953 Move old methods to WebDOMOperationsInternal.h
1954 * WebView/WebHTMLView.mm: Use methods from WebDOMOperationsInternal.h
1956 2009-04-01 Darin Adler <darin@apple.com>
1958 Reviewed by Geoff Garen.
1960 Bug 22378: Crash submitting a form when parsing an XHTML document
1961 https://bugs.webkit.org/show_bug.cgi?id=22378
1962 rdar://problem/6388377
1964 * History/WebHistoryItem.mm:
1965 (-[WebHistoryItem targetItem]): Call targetItem directly instead of callling
1966 isTargetItem, hasChildren, and recurseToFindTargetItem.
1968 * WebCoreSupport/WebFrameLoaderClient.mm:
1969 (WebFrameLoaderClient::dispatchWillSubmitForm): Updated for the new
1970 textFieldValues function in FormState.
1972 * WebView/WebPDFView.mm:
1973 (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Updated for name and
1974 argument change of loadFrameRequest.
1976 2009-04-01 Greg Bolsinga <bolsinga@apple.com>
1978 Reviewed by Mark Rowe.
1980 https://bugs.webkit.org/show_bug.cgi?id=24990
1981 Put SECTORDER_FLAGS into xcconfig files.
1983 * Configurations/Base.xcconfig:
1984 * Configurations/DebugRelease.xcconfig:
1986 2009-03-31 Anders Carlsson <andersca@apple.com>
1988 Reviewed by Adam Roben.
1990 WebKit side of <rdar://problem/6500266>.
1992 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1993 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1994 (WebKit::NetscapePluginInstanceProxy::wheelEvent):
1997 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1998 (-[WebHostedNetscapePluginView scrollWheel:]):
1999 Call NetscapePluginInstanceProxy::wheelEvent. If the plug-in processed the event, don't
2002 * Plugins/Hosted/WebKitPluginHost.defs:
2005 2009-03-31 Darin Adler <darin@apple.com>
2007 Reviewed by Adele Peterson.
2009 <rdar://problem/6740581> REGRESSION (r41793): Page Down and Page Up don’t work in Leopard Mail
2011 * WebView/WebHTMLView.mm:
2012 (-[WebResponderChainSink tryToPerform:with:]): Added. Without this we would think we had
2013 handled an event when we actually hadn't. Specifically, when -[WebFrameView scrollPageDown:]
2014 calls tryToPerform on the next responder.
2016 2009-03-30 Greg Bolsinga <bolsinga@apple.com>
2018 Reviewed by Simon Fraser.
2020 https://bugs.webkit.org/show_bug.cgi?id=24938
2022 Build fixes when building --no-svg
2024 DOMHTMLFrameElementPrivate.h and DOMHTMLIFrameElementPrivate.h are only available with ENABLE_SVG.
2026 * MigrateHeaders.make:
2028 2009-03-29 Darin Adler <darin@apple.com>
2030 Reviewed by Cameron Zwarich.
2032 * Plugins/WebNullPluginView.mm: Added now-needed includes.
2033 * WebView/WebHTMLRepresentation.mm: Ditto.
2034 * WebView/WebHTMLView.mm: Ditto.
2036 2009-03-27 Timothy Hatcher <timothy@apple.com>
2038 * MigrateHeaders.make: Remove DOMHTMLBodyElementPrivate.h since it
2039 is not generated anymore.
2041 2009-03-27 Adam Roben <aroben@apple.com>
2043 Don't include substitute data URLs in global history redirect chains
2047 Reviewed by Darin Adler.
2049 * WebCoreSupport/WebFrameLoaderClient.mm:
2050 (WebFrameLoaderClient::updateGlobalHistory): Don't call
2051 updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
2052 (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2053 Added an assertion to help catch cases where we might be adding a
2054 substitute data URL into a redirect chain.
2056 2009-03-27 Darin Adler <darin@apple.com>
2058 Reviewed by Adam Roben.
2060 <rdar://problem/6541923> REGRESSION (r38629): Tab cycle in empty tab is broken
2062 * WebView/WebHTMLView.mm:
2063 (-[WebHTMLView _wantsKeyDownForEvent:]): Only return YES when we have a Frame.
2065 2009-03-27 Darin Adler <darin@apple.com>
2067 Reviewed by John Sullivan and Anders Carlsson.
2069 <rdar://problem/5987442> Pasteboard not exposed to WebEditingDelegate for WebViewInsertActionPasted (needed for system services)
2071 Added SPI to tell which pasteboard is currently being inserted.
2072 I chose to put it on WebView to be forward-looking since we're migrating things
2073 from WebHTMLView to WebView in the future.
2075 * WebView/WebHTMLView.mm:
2076 (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Add calls to _setInsertionPasteboard.
2077 (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
2078 * WebView/WebView.mm:
2079 (-[WebViewPrivate dealloc]): Assert the pasteboard is nil.
2080 (-[WebViewPrivate finalize]): Ditto.
2081 (-[WebView _insertionPasteboard]): Return the pastebaord.
2082 (-[WebView _setInsertionPasteboard:]): Set the pasteboard.
2083 * WebView/WebViewInternal.h: Added _setInsertionPasteboard.
2084 * WebView/WebViewPrivate.h: Added _insertionPasteboard.
2086 2009-03-25 Timothy Hatcher <timothy@apple.com>
2088 Expose new DOM methods as public Objective-C API.
2090 <rdar://problem/5837350> Expose new DOM classes and methods
2091 as public API (match the additions to the JavaScript DOM)
2093 Reviewed by Mark Rowe and Darin Adler.
2095 * MigrateHeaders.make:
2096 * Misc/DOMDocumentPrivate.h: Added. Forwarding header for
2097 <rdar://problem/6730996>.
2099 2009-03-26 Jungshik Shin <jshin@chromium.org>
2101 Reviewed by Alexey Proskuryakov.
2103 Add WebPreferences for encoding autodetection on Mac.
2105 http://bugs.webkit.org/show_bug.cgi?id=16482
2107 * WebView/WebPreferenceKeysPrivate.h:
2108 * WebView/WebPreferences.mm:
2109 (+[WebPreferences initialize]):
2110 (-[WebPreferences usesEncodingDetector]):
2111 (-[WebPreferences setUsesEncodingDetector:]):
2112 * WebView/WebPreferencesPrivate.h:
2113 * WebView/WebView.mm:
2114 (-[WebView _preferencesChangedNotification:]):
2116 2009-03-26 Anders Carlsson <andersca@apple.com>
2118 Reviewed by Dan Bernstein.
2120 - Fix <rdar://problem/6687055> and <rdar://problem/6713639>.
2122 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2123 (WKPCInvalidateRect):
2124 Call NetscapePluginInstanceProxy::invalidateRect.
2126 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2127 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2128 (WebKit::NetscapePluginInstanceProxy::cleanup):
2129 Stop the request timer, set m_pluginView to nil.
2131 (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
2132 No need to set m_pluginView to nil here anymore, it's now done in cleanup().
2134 (WebKit::NetscapePluginInstanceProxy::performRequest):
2135 (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
2136 Assert that the plug-in view is not nil.
2138 (WebKit::NetscapePluginInstanceProxy::invalidateRect):
2139 Call setNeedsDisplayInRect here.
2141 2009-03-25 Anders Carlsson <andersca@apple.com>
2143 Reviewed by Darin Adler.
2145 <rdar://problem/6714964>
2146 CrashTracer: [REGRESSION] 51 crashes in Safari at com.apple.WebKit • WebNetscapePluginStream::deliverData + 775
2148 Don't release m_deliveryData since it's a RetainPtr. Also, use adoptNS instead of releasing newDeliveryData manually.
2150 * Plugins/WebBaseNetscapePluginStream.mm:
2151 (WebNetscapePluginStream::deliverData):
2153 2009-03-25 Mike Thole <mthole@apple.com>
2155 Reviewed by Kevin Decker.
2157 <rdar://problem/6453738> call SetWindow when user creates a new tab
2159 CoreGraphics plug-ins now receive an NPP_SetWindow call when moving to a background tab.
2160 Flash is excluded from this change in behavior, as it has historical WebKit-specific code
2161 that isn't compatible with this change.
2163 * Plugins/WebNetscapePluginView.h:
2164 Added an _isFlash ivar.
2165 * Plugins/WebNetscapePluginView.mm:
2166 (-[WebNetscapePluginView _createPlugin]):
2167 Set the new _isFlash ivar based on the bundle identifier.
2168 (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
2169 When using the CG drawing model and in a non-drawable state, set the portState
2170 to NULL and return early.
2171 (-[WebNetscapePluginView updateAndSetWindow]):
2172 When using the CG drawing model, call -setWindowIfNecessary even if the portState is NULL.
2173 Flash is an exception to this, due to its historical behavior.
2174 (-[WebNetscapePluginView setWindowIfNecessary]):
2175 Removed an assertion that was no longer true. The [NSView focus] view
2176 is no longer guaranteed to be 'self' at this point.
2177 Also modified the debug logging for CG plug-ins to include the size of the
2178 window's clipRect, which was useful in verifying the correct behavior of this patch.
2180 2009-03-24 Dan Bernstein <mitz@apple.com>
2182 Reviewed by Oliver Hunt.
2184 - speculative fix for <rdar://problem/6630134> Crash at
2185 Editor::compositionRange()
2187 * WebView/WebHTMLView.mm:
2188 (-[WebHTMLView markedRange]): Null-check the Frame like most other
2189 methods in this class.
2191 2009-03-23 Sam Weinig <sam@webkit.org>
2193 Reviewed by Dan Bernstein.
2195 Fix for <rdar://problem/6140966>
2196 Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
2199 (+[WebCache empty]):
2201 2009-03-23 Adele Peterson <adele@apple.com>
2203 Reviewed by Mark Rowe & Dave Hyatt.
2205 Merge some of the individual Mail quirks into two settings that we can check for future quirks.
2207 * WebView/WebView.mm:
2208 (runningLeopardMail):
2210 (-[WebView _preferencesChangedNotification:]):
2212 2009-03-23 Darin Adler <darin@apple.com>
2214 * WebView/WebTextIterator.h: Fixed a spelling error in a comment.
2216 2009-03-22 Dan Bernstein <mitz@apple.com>
2218 Reviewed by John Sullivan.
2220 - fix <rdar://problem/6640741> Messages not displaying after the
2221 Safari 4 beta was installed
2223 Mail assumes that if -[WebArchive subresources] is not nil, then it
2224 contains at least one object.
2226 * WebView/WebArchive.mm:
2227 (-[WebArchive subresources]): Preserve the behavior of returning nil
2228 if there are no subresources.
2230 2009-03-20 Adele Peterson <adele@apple.com>
2234 Reviewed by Darin Adler.
2236 * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]):
2238 2009-03-20 Timothy Hatcher <timothy@apple.com>
2240 Change how threading exceptions are checked so they are reported
2241 by what round they were added. That way WebKit can decided the
2242 behavior per-round based on linked-on-or-after checks.
2244 <rdar://problem/6626741&6648478&6635474&6674079>
2246 Reviewed by Darin Adler.
2248 * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
2249 * History/WebHistoryItem.mm: Ditto.
2250 * Misc/WebIconDatabase.mm: Ditto.
2252 * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro.
2253 * WebView/WebResource.mm: Ditto.
2254 (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version
2255 to truly decide if it is an old Mail client.
2256 * WebView/WebView.mm: Ditto.
2258 * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define.
2259 * WebView/WebFrameView.mm:
2260 (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round
2261 based on difference version checks and the Mail workaround check.
2263 2009-03-20 Darin Adler <darin@apple.com>
2265 Reviewed by Timothy Hatcher.
2267 * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls
2270 2009-03-20 Darin Adler <darin@apple.com>
2272 Reviewed by Adele Peterson.
2274 Use a better technique to handle finding out if something responds to a selector
2275 in WebHTMLView's doCommandBySelector method.
2277 * WebView/WebHTMLView.mm:
2278 (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame;
2279 this is already handled by coreCommandBySelector: so doesn't need to be checked
2280 twice. Got rid of initial value for eventWasHandled boolean to make it more clear.
2281 Use WebResponderChainSink to find out if a command is handled rather than walking
2282 the responder chain explicitly.
2283 (-[WebResponderChainSink initWithResponderChain:]): Added.
2284 (-[WebResponderChainSink detach]): Added.
2285 (-[WebResponderChainSink receivedUnhandledCommand]): Added.
2286 (-[WebResponderChainSink noResponderFor:]): Added.
2287 (-[WebResponderChainSink doCommandBySelector:]): Added.
2289 2009-03-19 Timothy Hatcher <timothy@apple.com>
2291 Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
2292 for Page, so the new RunLoopTimer in WebCore always gets a default mode.
2293 Fixes the layout test failures on the Tiger build bots.
2295 Reviewed by Mark Rowe.
2297 * WebView/WebView.mm:
2298 (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
2299 (-[WebView scheduleInRunLoop:forMode:]):
2300 (-[WebView unscheduleFromRunLoop:forMode:]):
2302 2009-03-18 Anders Carlsson <andersca@apple.com>
2304 Reviewed by Oliver Hunt.
2306 WebKit side of <rdar://problem/6688244>.
2308 Try reinitializing the vendor port if it's invalid.
2310 * Plugins/Hosted/NetscapePluginHostManager.mm:
2311 (WebKit::NetscapePluginHostManager::spawnPluginHost):
2313 2009-03-18 Anders Carlsson <andersca@apple.com>
2315 Reviewed by Darin Adler.
2317 <rdar://problem/6504776>
2318 CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
2320 If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
2321 causing the plug-in never to be stopped. Simplify the code by using a RAII object.
2323 * Plugins/WebBaseNetscapePluginStream.mm:
2324 (PluginStopDeferrer::PluginStopDeferrer):
2325 (PluginStopDeferrer::~PluginStopDeferrer):
2326 (WebNetscapePluginStream::startStream):
2327 (WebNetscapePluginStream::wantsAllStreams):
2328 (WebNetscapePluginStream::destroyStream):
2330 2009-03-17 Darin Adler <darin@apple.com>
2332 Reviewed by Adele Peterson.
2334 <rdar://problem/6687005> Need support for new move-left/right selectors.
2336 * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list.
2337 * WebView/WebView.mm: Ditto.
2339 2009-03-17 Darin Adler <darin@apple.com>
2341 Reviewed by Adele Peterson.
2343 Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
2344 https://bugs.webkit.org/show_bug.cgi?id=24477
2345 rdar://problem/6674184
2347 * WebView/WebHTMLView.mm:
2348 (responderChainRespondsToSelector): Added.
2349 (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
2350 can find a responder that responds to this selector rather than always assuming
2351 the selector will not be handled.
2353 2009-03-17 Mark Rowe <mrowe@apple.com>
2357 * Plugins/Hosted/HostedNetscapePluginStream.mm:
2359 2009-03-17 David Kilzer <ddkilzer@apple.com>
2361 Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
2363 Reviewed by Darin Adler.
2365 WebKit r30323 added -_webcore_MIMEType to fix issues with
2366 incorrect MIME types in NS[HTTP]URLResponse objects. However,
2367 uses of -[NSURLResponse MIMEType] still persist in WebKit that
2368 should be switched to use -_webcore_MIMEType. Note that
2369 -[WebDataSource _responseMIMEType] calls back into WebCore to
2370 get the MIME type from the ResourceResponse object, which has
2371 already retrieved it via -_webcore_MIMEType.
2373 * Plugins/Hosted/HostedNetscapePluginStream.mm:
2374 (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
2376 * Plugins/WebBaseNetscapePluginStream.mm:
2377 (WebNetscapePluginStream::didReceiveResponse): Ditto.
2378 * Plugins/WebNetscapePluginView.mm:
2379 (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
2380 * Plugins/WebPluginController.mm:
2381 (-[WebPluginController pluginView:receivedResponse:]): Ditto.
2382 * WebView/WebHTMLRepresentation.mm:
2383 (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
2384 -[WebDataSource _responseMIMEType] instead.
2385 * WebView/WebPDFRepresentation.m:
2386 (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
2387 * WebView/WebPDFView.mm:
2388 (-[WebPDFView menuForEvent:]): Ditto.
2390 2009-03-17 Simon Fraser <simon.fraser@apple.com>
2392 Reviewed by Darin Adler
2394 https://bugs.webkit.org/show_bug.cgi?id=24396
2396 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
2400 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
2402 Reviewed by Mark Rowe.
2404 Get BUILDING_ON_* defines from Platform.h.
2406 https://bugs.webkit.org/show_bug.cgi?id=24630
2410 2009-03-16 Darin Adler <darin@apple.com>
2412 Reviewed by Dan Bernstein.
2414 <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
2416 * WebCoreSupport/WebViewFactory.mm:
2417 (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
2418 post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
2419 (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
2421 2009-03-16 Anders Carlsson <andersca@apple.com>
2423 Reviewed by Oliver Hunt.
2425 Don't mig_deallocate random data in case an instance proxy method returns false.
2427 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2430 (WKPCInvokeDefault):
2434 2009-03-16 Anders Carlsson <andersca@apple.com>
2436 Reviewed by Oliver Hunt.
2438 <rdar://problem/6633944>
2439 REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
2441 Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
2443 * Plugins/WebPluginController.mm:
2444 (-[WebPluginController addPlugin:]):
2446 2009-03-16 Anders Carlsson <andersca@apple.com>
2448 Reviewed by Sam Weinig.
2450 Fix <rdar://problem/6622601>
2452 Make sure to update both the window frame and the plug-in frame.
2454 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2455 (-[WebHostedNetscapePluginView addWindowObservers]):
2457 2009-03-15 Dan Bernstein <mitz@apple.com>
2459 Reviewed by Adele Peterson.
2461 - fix <rdar://problem/6607773> WebKit should support the "Default"
2462 paragraph writing direction -- or at least validate the menu item
2465 Made WebHTMLView validate user interface items with the selector
2466 -makeBaseWritingDirectionNatural: by returning NO and, if the item is
2467 a menu item, setting its state to "off".
2469 Strictly speaking, since -makeBaseWritingDirectionNatural: is never
2470 valid for WebViews, WebHTMLView should not need to respond to it and
2471 validate it, however because other responders respond to all three
2472 -makeBaseWritingDirection*: messages and set the menu item state, having
2473 WebHTMLView do the same makes application developers' lives easier.
2475 * WebView/WebHTMLView.mm:
2476 (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
2477 (-[WebHTMLView makeBaseWritingDirectionNatural:]):
2479 2009-03-13 Mark Rowe <mrowe@apple.com>
2481 Rubber-stamped by Dan Bernstein.
2483 Take advantage of the ability of recent versions of Xcode to easily switch the active
2486 * Configurations/DebugRelease.xcconfig:
2488 2009-03-13 Anders Carlsson <andersca@apple.com>
2490 Reviewed by Kevin Decker and Geoffrey Garen.
2492 <rdar://problem/6590384>
2493 REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
2495 When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call,
2496 and thus calling -[WebView hostWindow] will crash since _private is nil.
2498 * WebView/WebView.mm:
2499 (-[WebView hostWindow]):
2501 2009-03-13 Anders Carlsson <andersca@apple.com>
2503 And yet another attempt...
2505 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
2506 (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
2507 (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
2508 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
2510 2009-03-13 Anders Carlsson <andersca@apple.com>
2512 Another attempt at fixing the build.
2514 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
2515 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
2517 2009-03-13 Anders Carlsson <andersca@apple.com>
2519 Try to fix the SL build.
2521 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
2522 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
2523 (WebNetscapePluginEventHandlerCocoa::keyDown):
2525 2009-03-13 Greg Bolsinga <bolsinga@apple.com>
2527 Reviewed by Simon Fraser.
2529 Update Geolocation perimission dialogs to be asynchronous.
2530 https://bugs.webkit.org/show_bug.cgi?id=24505
2532 WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
2533 coding style set by WebSecurityOrigin.
2535 WebChromeClient now calls the private UI delegate method
2536 -webView:frame:requestGeolocationPermission:securityOrigin:
2538 * WebCoreSupport/WebChromeClient.h:
2539 * WebCoreSupport/WebChromeClient.mm:
2540 (WebChromeClient::requestGeolocationPermissionForFrame):
2541 * WebCoreSupport/WebGeolocation.mm: Added.
2543 (-[WebGeolocation shouldClearCache]):
2544 (-[WebGeolocation setIsAllowed:]):
2545 (-[WebGeolocation dealloc]):
2546 * WebCoreSupport/WebGeolocationInternal.h: Added.
2547 * WebCoreSupport/WebGeolocationPrivate.h: Added.
2548 * WebView/WebUIDelegatePrivate.h:
2550 2009-03-13 Anders Carlsson <andersca@apple.com>
2552 Reviewed by Dan Bernstein.
2554 <rdar://problem/6610666> Revise the Cocoa event model text API
2556 Replace the text input API with a simpler API that uses a separate text input window.
2558 * Plugins/WebNetscapePluginEventHandlerCocoa.h:
2559 * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
2560 (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
2561 Initialize m_keyEventHandler to 0.
2563 (WebNetscapePluginEventHandlerCocoa::keyDown):
2564 If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
2566 (WebNetscapePluginEventHandlerCocoa::focusChanged):
2567 Install/remove the key event handler as needed.
2569 (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
2570 Get the text and send a TextInput event.
2572 * Plugins/WebNetscapePluginView.h:
2573 * Plugins/WebNetscapePluginView.mm:
2574 Remove the old text input API.
2576 (-[WebNetscapePluginView inputContext]):
2577 Always return nil here.
2580 * Plugins/nptextinput.h: Removed.
2582 2009-03-12 Anders Carlsson <andersca@apple.com>
2584 Reviewed by Mike Thole and Mark Rowe.
2586 Fix <rdar://problem/6624105>.
2588 Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
2590 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2591 (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
2593 2009-03-12 Anders Carlsson <andersca@apple.com>
2595 Reviewed by Geoffrey Garen.
2597 WebKit side of <rdar://problem/6607801>
2599 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2600 (WebKit::NetscapePluginInstanceProxy::destroy):
2601 Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
2603 * Plugins/Hosted/WebKitPluginHost.defs:
2604 Add requestID parameter.
2606 2009-03-12 Kevin Decker <kdecker@apple.com>
2608 Reviewed by Anders Carlsson.
2610 * Plugins/WebNetscapePluginPackage.mm:
2611 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
2613 2009-03-12 Kevin Decker <kdecker@apple.com>
2615 Reviewed by Anders Carlsson.
2617 Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
2619 This fix addresses crashes in both Silverlight and ChemDraw. This type of crash would occur because AppKit still
2620 had a reference to open windows that the plugin created (which no longer exist).
2622 * Plugins/WebNetscapePluginPackage.mm:
2623 (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown.
2625 2009-03-11 David Kilzer <ddkilzer@apple.com>
2627 Remove duplicate header include
2629 Rubber-stamped by Mark Rowe.
2631 * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
2632 Also realphabetized lowercase #include statements.
2634 2009-03-11 David Kilzer <ddkilzer@apple.com>
2636 Clarify comments regarding order of FEATURE_DEFINES
2638 Rubber-stamped by Mark Rowe.
2640 * Configurations/WebKit.xcconfig: Added warning about the
2641 consequences when FEATURE_DEFINES are not kept in sync.
2643 2009-03-11 Anders Carlsson <andersca@apple.com>
2645 Reviewed by Sam Weinig.
2647 WebKit side of <rdar://problem/6656147>.
2649 * Plugins/Hosted/NetscapePluginHostManager.mm:
2650 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2651 Pass the requestID to _WKPHInstantiatePlugin.
2653 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2654 Pass the requestID to setCurrentReply.
2656 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2657 (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
2658 Store the reply in a map with the requestID as the key.
2660 (WebKit::NetscapePluginInstanceProxy::waitForReply):
2661 Wait for a reply that matches the given requestID.
2663 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2664 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2665 Initialize member variables.
2667 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
2668 Delete all requests.
2670 (WebKit::NetscapePluginInstanceProxy::print):
2671 Pass the requestID to _WKPHPluginInstancePrint.
2673 (WebKit::NetscapePluginInstanceProxy::loadRequest):
2674 Rename m_currentRequestID to m_currentURLRequestID.
2676 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
2677 Process requests until we find a reply with the right requestID.
2679 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2680 Pass a requestID to the _WKPH function.
2682 (WebKit::NetscapePluginInstanceProxy::nextRequestID):
2685 * Plugins/Hosted/ProxyInstance.mm:
2686 Pass a requestID to the _WKPH functions.
2688 * Plugins/Hosted/WebKitPluginClient.defs:
2689 * Plugins/Hosted/WebKitPluginHost.defs:
2690 Add requestID parameters.
2692 2009-03-11 Anders Carlsson <andersca@apple.com>
2694 Reviewed by Darin Adler.
2696 Fix <rdar://problem/6620064>.
2698 * Plugins/WebPluginContainerPrivate.h:
2700 2009-03-10 Xan Lopez <xlopez@igalia.com>
2702 Build fix, no review.
2704 * WebView/WebFrame.mm:
2705 (-[WebFrame _smartDeleteRangeForProposedRange:]):
2707 2009-03-09 Anders Carlsson <andersca@apple.com>
2709 Reviewed by Kevin Decker.
2711 WebKit side of <rdar://problem/6530007>
2713 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2715 Call NetscapePluginInstanceProxy::enumerate.
2717 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2718 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2719 (WebKit::NetscapePluginInstanceProxy::enumerate):
2720 Enumerate the JS object and serialize its values.
2722 * Plugins/Hosted/ProxyInstance.h:
2723 * Plugins/Hosted/ProxyInstance.mm:
2724 (WebKit::ProxyInstance::getPropertyNames):
2725 Ask the plug-in host to get the property names and deserialize them.
2727 * Plugins/Hosted/WebKitPluginClient.defs:
2728 * Plugins/Hosted/WebKitPluginHost.defs:
2730 2009-03-09 Simon Fraser <simon.fraser@apple.com>
2732 Reviewed by Oliver Hunt and Cameron Zwarich
2734 https://bugs.webkit.org/show_bug.cgi?id=24440
2736 The sublayer added to WebHTMLView to host accelerated compositing layers needs to
2737 be a subclass of NSView which allows context menu clicks through.
2739 * WebView/WebHTMLView.mm:
2740 (-[WebLayerHostingView rightMouseDown:]):
2741 (-[WebHTMLView attachRootLayer:]):
2743 2009-03-08 Mark Rowe <mrowe@apple.com>
2745 Reviewed by Oliver Hunt.
2747 Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
2748 Frame.h no longer needs to include it. This cuts the size of the symbols
2749 for a debug build by around 3%.
2751 * Plugins/WebNetscapePluginView.mm:
2752 * WebView/WebFrame.mm:
2753 (-[WebFrame _scrollDOMRangeToVisible:]):
2754 (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
2755 (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
2756 * WebView/WebHTMLView.mm:
2757 (-[WebHTMLView jumpToSelection:]):
2758 (-[WebHTMLView centerSelectionInVisibleArea:]):
2760 2009-03-07 Dan Bernstein <mitz@apple.com>
2762 Reviewed by Alexey Proskuryakov.
2764 - fix a bug where debug builds were clearing the HTML5 application cache
2765 on application termination
2767 * WebView/WebView.mm:
2768 (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
2771 2009-03-06 Douglas R. Davidson <ddavidso@apple.com>
2773 Reviewed by Justin Garcia.
2775 https://bugs.webkit.org/show_bug.cgi?id=24108
2777 Update spelling and grammar checking to use the new combined text
2778 checking (with automatic language identification) on Snow Leopard.
2780 * WebCoreSupport/WebEditorClient.h:
2781 * WebCoreSupport/WebEditorClient.mm:
2782 (WebEditorClient::checkSpellingAndGrammarOfParagraph):
2784 2009-03-05 Adele Peterson <adele@apple.com>
2786 Reviewed by Darin Adler.
2788 Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
2789 <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
2790 <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
2792 * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
2793 If WebKit does not support the command, we need to pass the selector to super. In this case,
2794 we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:]
2795 can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no
2796 example of that happening and causing broken behavior.
2798 2009-03-04 Mark Rowe <mrowe@apple.com>
2800 Reviewed by Dan Bernstein.
2802 <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
2804 * WebView/WebHTMLView.mm:
2805 (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
2807 2009-03-04 Adam Barth <abath@webkit.org>
2809 Reviewed by Alexey Proskuryakov.
2811 https://bugs.webkit.org/show_bug.cgi?id=24356
2813 Fix WebKit style for allowUniversalAccessFromFileURLs.
2815 * WebView/WebPreferenceKeysPrivate.h:
2816 * WebView/WebPreferences.mm:
2817 (+[WebPreferences initialize]):
2818 (-[WebPreferences allowUniversalAccessFromFileURLs]):
2819 (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
2820 * WebView/WebPreferencesPrivate.h:
2821 * WebView/WebView.mm:
2822 (-[WebView _preferencesChangedNotification:]):
2824 2009-03-03 David Kilzer <ddkilzer@apple.com>
2826 <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
2828 Reviewed by Mark Rowe.
2830 The fix is to add INSTALLHDRS_COPY_PHASE = YES and
2831 INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
2832 make sure various build phase scripts work with the installhdrs
2835 * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
2836 based on PLATFORM_NAME to work around the missing definition on
2838 * Configurations/WebKit.xcconfig: Added
2839 WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
2840 UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
2841 Xcode project file. Added INSTALLHDRS_COPY_PHASE = YES and
2842 INSTALLHDRS_SCRIPT_PHASE = YES.
2844 2009-03-03 David Kilzer <ddkilzer@apple.com>
2846 Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
2848 Reviewed by Adam Roben.
2850 Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
2851 since NPAPI headers had migrated from JavaScriptCore to WebCore
2854 * Configurations/WebKit.xcconfig: Removed definition of
2855 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
2857 2009-03-03 Anders Carlsson <andersca@apple.com>
2859 Reviewed by Darin Adler.
2861 Fix <rdar://problem/6633834>.
2863 * Plugins/Hosted/NetscapePluginHostManager.mm:
2864 (WebKit::NetscapePluginHostManager::instantiatePlugin):
2865 Create a new plug-in instance if the plug-in host has crashed.
2867 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2868 (WebKit::NetscapePluginInstanceProxy::invalidate):
2869 Add a null check for the plug-in host proxy.
2871 2009-03-02 Sam Weinig <sam@webkit.org>
2873 Reviewed by Mark Rowe.
2875 Enable Geolocation (except on Tiger and Leopard).
2877 * Configurations/WebKit.xcconfig:
2879 2009-03-02 Anders Carlsson <andersca@apple.com>
2881 Reviewed by Dan Bernstein.
2883 WebKit part of <rdar://problem/6638658>.
2885 * Plugins/Hosted/NetscapePluginHostManager.h:
2886 * Plugins/Hosted/NetscapePluginHostManager.mm:
2887 (WebKit::NetscapePluginHostManager::createPropertyListFile):
2888 Spawn the plug-in host and wait for it to create the property list.
2890 * Plugins/WebBasePluginPackage.mm:
2891 (-[WebBasePluginPackage createPropertyListFile]):
2892 Factor code out into a new method.
2894 (-[WebBasePluginPackage pListForPath:createFile:]):
2895 Call the newly added createPropertyListFile method.
2897 * Plugins/WebNetscapePluginPackage.mm:
2898 (-[WebNetscapePluginPackage createPropertyListFile]):
2899 Tell the plug-in host manager to create a property list file for us.
2901 2009-03-02 Sam Weinig <sam@webkit.org>
2903 Reviewed by Geoffrey Garen.
2905 Fix for <rdar://problem/6507404> Add Geolocation support.
2907 This is not yet turned on for any Mac platform.
2909 Add SPI to ask the embedding application whether to allow
2910 Geolocation for an origin.
2912 * WebCoreSupport/WebChromeClient.h:
2913 * WebCoreSupport/WebChromeClient.mm:
2914 (WebChromeClient::shouldAllowGeolocationForFrame):
2915 * WebView/WebUIDelegatePrivate.h:
2917 2009-03-02 Anders Carlsson <andersca@apple.com>
2921 * Plugins/WebNetscapePluginPackage.mm:
2922 (-[WebNetscapePluginPackage _tryLoad]):
2924 2009-03-02 Anders Carlsson <andersca@apple.com>
2926 Reviewed by John Sullivan, Ada Chan.
2928 Factor loading code out into its own method and get rid of a bunch of gotos.
2930 * Plugins/WebNetscapePluginPackage.mm:
2931 (-[WebNetscapePluginPackage _tryLoad]):
2932 (-[WebNetscapePluginPackage load]):
2934 2009-03-02 Anders Carlsson <andersca@apple.com>
2938 * Plugins/WebNetscapeDeprecatedFunctions.h:
2940 2009-03-02 Anders Carlsson <andersca@apple.com>
2942 Reviewed by John Sullivan.
2944 Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
2946 * Plugins/WebNetscapePluginPackage.m: Removed.
2947 * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
2949 2009-03-01 Anders Carlsson <andersca@apple.com>
2951 Reviewed by Sam Weinig.
2953 WebKit side of <rdar://problem/6449689>
2955 Pass the visible name to the plug-in host.
2957 * Plugins/Hosted/NetscapePluginHostManager.mm:
2958 (WebKit::NetscapePluginHostManager::spawnPluginHost):
2960 2009-02-27 Alice Liu <alice.liu@apple.com>
2962 Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
2963 extension to images that already have .jpg extension
2965 Reviewed by Oliver Hunt.
2967 * WebView/WebHTMLView.mm:
2968 (-[NSString matchesExtensionEquivalent:]):
2969 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
2970 Relax the check for the proper extension to allow for known
2971 equivalents, special-cased in matchesExtensionEquivalent function.
2973 2009-02-27 Anders Carlsson <andersca@apple.com>
2975 Reviewed by Geoffrey Garen.
2977 <rdar://problem/6631436>
2978 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
2980 Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
2982 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2983 (WebKit::NetscapePluginInstanceProxy::evaluate):
2985 2009-02-27 Anders Carlsson <andersca@apple.com>
2987 Reviewed by Geoffrey Garen.
2989 WebKit side of <rdar://problem/6626814>.
2991 * Plugins/Hosted/NetscapePluginHostProxy.mm:
2992 (WKPCInvokeDefault):
2993 Make InvokeDefault async.
2995 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2996 (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2997 Handle passing NPObjects back to the plug-in host.
2999 * Plugins/Hosted/ProxyInstance.h:
3000 (WebKit::ProxyInstance::objectID):
3001 Add objectID getter.
3003 * Plugins/Hosted/WebKitPluginClient.defs:
3004 Make InvokeDefault a simpleroutine.
3006 2009-02-27 Timothy Hatcher <timothy@apple.com>
3008 Fixes an exception by null checking the WebResource before adding it to
3009 the subresources array.
3011 <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
3013 Reviewed by Geoff Garen and Anders Carlsson.
3015 * WebView/WebDataSource.mm:
3016 (-[WebDataSource subresources]): Null check the WebResource before adding it.
3018 2009-02-27 Timothy Hatcher <timothy@apple.com>
3020 Adds a workaround for Automator creating a WebView from a secondary thread.
3022 <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
3023 secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
3025 Reviewed by Geoff Garen.
3027 * WebView/WebView.mm:
3028 (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
3030 2009-02-27 Adam Barth <abarth@webkit.org>
3032 Reviewed by Eric Seidel.
3034 Add a preference to reduce the power of file:// URLs.
3036 * WebView/WebPreferenceKeysPrivate.h:
3037 * WebView/WebPreferences.mm:
3038 (+[WebPreferences initialize]):
3039 (-[WebPreferences allowUniversalAccessFromFileUrls]):
3040 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
3041 * WebView/WebPreferencesPrivate.h:
3042 * WebView/WebView.mm:
3043 (-[WebView _preferencesChangedNotification:]):
3045 2009-02-27 Simon Fraser <simon.fraser@apple.com>
3047 Reviewed by Anders Carlsson
3049 https://bugs.webkit.org/show_bug.cgi?id=24242
3051 setCursor(), and resetCursorRects() on Tiger, were using global, not local
3052 coordinates for elementAtPoint:
3054 * WebView/WebHTMLView.mm:
3058 2009-02-27 Adam Barth <abarth@webkit.org>
3060 Reviewed by Eric Seidel.
3062 Add a preference to reduce the power of file:// URLs.
3064 * WebView/WebPreferenceKeysPrivate.h:
3065 * WebView/WebPreferences.mm:
3066 (+[WebPreferences initialize]):
3067 (-[WebPreferences allowUniversalAccessFromFileUrls]):
3068 (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
3069 * WebView/WebPreferencesPrivate.h:
3070 * WebView/WebView.mm:
3071 (-[WebView _preferencesChangedNotification:]):
3073 2009-02-26 Adele Peterson <adele@apple.com>
3075 Reviewed by Geoff Garen.
3077 Fix for <rdar://problem/6618166>
3078 https://bugs.webkit.org/show_bug.cgi?id=24216
3079 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
3081 During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
3082 we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
3083 This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
3085 In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were
3086 fixed in r36919 and r38570 are still fixed.
3088 * WebView/WebHTMLView.mm:
3089 (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
3090 (-[WebHTMLView _isResigningFirstResponder]): Added.
3091 * WebView/WebHTMLViewInternal.h:
3092 * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
3093 if the document view is currently resigning first responder.
3095 2009-02-25 Anders Carlsson <andersca@apple.com>
3097 Reviewed by Kevin Decker.
3099 Fix <rdar://problem/6623697>.
3101 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3102 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3103 (WebKit::NetscapePluginInstanceProxy::print):
3104 Ask the plug-in host to print, create a CGImage of the returned bytes and draw
3105 the image into the passed in context.
3107 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3108 (-[WebHostedNetscapePluginView drawRect:]):
3109 When printing, call NetscapePluginInstanceProxy::print.
3111 * Plugins/Hosted/WebKitPluginHost.defs:
3113 2009-02-19 Alexey Proskuryakov <ap@webkit.org>
3115 Reviewed by Darin Adler.
3117 https://bugs.webkit.org/show_bug.cgi?id=24024
3118 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
3119 archiving a submission to about:blank
3121 I don't know how to make an automated test for this bug.
3123 * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
3124 Account for the fact that HTTP method may be non-empty for non-HTTP requests.
3126 2009-02-25 Chris Fleizach <cfleizach@apple.com>
3128 Reviewed by Beth Dakin.
3131 Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
3132 https://bugs.webkit.org/show_bug.cgi?id=24143
3134 * WebView/WebFrame.mm:
3135 (-[WebFrame _accessibilityTree]):
3137 2009-02-25 Simon Fraser <simon.fraser@apple.com>
3139 Build fix with ACCELERATED_COMPOSITING turned on.
3141 I missed a spot in my last commit in renaming to
3142 _stoppedAcceleratedCompositingForFrame:
3144 * WebView/WebHTMLView.mm:
3145 (-[WebHTMLView close]):
3147 2009-02-25 Simon Fraser <simon.fraser@apple.com>
3149 Reviewed by Dan Bernstein
3151 https://bugs.webkit.org/show_bug.cgi?id=23854
3153 Make an observable property, _isUsingAcceleratedCompositing, on
3154 WebView that DumpRenderTree can use to specialize behavior.
3156 This is implemented via a count of Frames that are using
3157 accelerated compositing.
3159 * WebView/WebHTMLView.mm:
3160 (-[WebHTMLViewPrivate clear]):
3161 (-[WebHTMLView close]):
3162 (-[WebHTMLView attachRootLayer:]):
3163 (-[WebHTMLView detachRootLayer]):
3164 * WebView/WebView.mm:
3165 (+[WebView automaticallyNotifiesObserversForKey:]):
3166 (-[WebView _startedAcceleratedCompositingForFrame:]):
3167 (-[WebView _stoppedAcceleratedCompositingForFrame:]):
3168 (-[WebView _isUsingAcceleratedCompositing]):
3169 * WebView/WebViewInternal.h:
3170 * WebView/WebViewPrivate.h:
3172 2009-02-24 Sam Weinig <sam@webkit.org>
3174 Reviewed by Geoffrey Garen.
3176 Related to <rdar://problem/6590295>
3177 Allow disabling javascript: urls.
3179 * WebView/WebView.mm:
3180 (-[WebView _setJavaScriptURLsAreAllowed:]):
3181 * WebView/WebViewPrivate.h:
3183 2009-02-24 Mark Rowe <mrowe@apple.com>
3185 Reviewed by Oliver Hunt.
3187 <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
3189 * Carbon/CarbonUtils.h:
3190 * Carbon/HIWebView.h:
3191 * Plugins/WebPlugin.h:
3192 * Plugins/WebPluginViewFactory.h:
3193 * WebView/WebUIDelegate.h:
3195 2009-02-24 Peter Ammon <pammon@apple.com>
3197 Reviewed by Mark Rowe.
3199 Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
3201 * WebView/WebHTMLView.mm:
3202 (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
3203 both the send and return type. We should also handle a nil send or return type by ignoring
3204 the argument and returning whether we can handle the other type passed in.
3206 2009-02-23 Anders Carlsson <andersca@apple.com>
3208 Reviewed by Geoffrey Garen and Darin Adler.
3210 WebKit side of <rdar://problem/6613151>.
3212 Make sure to vm_deallocate all memory we get from MIG callbacks.
3214 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3215 (DataDeallocator::DataDeallocator):
3216 (DataDeallocator::~DataDeallocator):
3217 Add a simple deallocator class.
3221 (WKPCBooleanAndDataReply):
3223 (WKPCGetStringIdentifier):
3225 (WKPCInvokeDefault):
3228 Use the new deallocator class.
3230 2009-02-23 Anders Carlsson <andersca@apple.com>
3232 Reviewed by Darin Adler.
3234 Fix <rdar://problem/6450656>.
3236 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3237 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3238 (WebKit::NetscapePluginInstanceProxy::insertText):
3239 Add insert text which just calls the new WKPH function.
3241 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3242 (-[WebHostedNetscapePluginView inputContext]):
3243 Get the input context from the shared input panel.
3245 (-[WebHostedNetscapePluginView keyDown:]):
3246 Let the shared input panel have a go at the event first.
3248 * Plugins/Hosted/WebKitPluginHost.defs:
3249 Add new InsertText function.
3251 2009-02-23 Mark Rowe <mrowe@apple.com>
3253 Fix the build after r41126.
3255 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3256 (WebKit::NetscapePluginInstanceProxy::invoke):
3257 (WebKit::NetscapePluginInstanceProxy::invokeDefault):
3258 (WebKit::NetscapePluginInstanceProxy::construct):
3260 2009-02-22 Dan Bernstein <mitz@apple.com>
3262 Reviewed by Darin Adler.
3264 - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
3266 * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
3267 in r30741, and assign the height value, rather than the width, to the
3270 2009-02-21 Anders Carlsson <andersca@apple.com>
3274 * Plugins/Hosted/WebTextInputWindowController.m:
3276 2009-02-20 Anders Carlsson <andersca@apple.com>
3278 Reviewed by Dan Bernstein.
3280 Add a shared floating text input window implementation, to be used by the hosted plug-in view.
3282 * Plugins/Hosted/WebTextInputWindowController.h: Added.
3283 * Plugins/Hosted/WebTextInputWindowController.m: Added.
3285 2009-02-20 Kevin Decker <kdecker@apple.com>
3287 Reviewed by andersca.
3289 <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
3291 Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
3292 we are trying to set. Depending on what other I/O is going on, it can take some time.
3294 * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
3295 (setMetaData): Added. Calls WKSetMetadataURL().
3296 (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread
3298 2009-02-19 Dan Bernstein <mitz@apple.com>
3300 Reviewed by Sam Weinig.
3302 - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
3303 Do not send loader callbacks during CSS styling
3305 * WebView/WebView.mm:
3306 (-[WebView _preferencesChangedNotification:]): Reverted the
3307 iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
3309 2009-02-18 Dan Bernstein <mitz@apple.com>
3311 Reviewed by Brady Eidson.
3313 - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
3315 * WebView/WebView.mm:
3316 (-[WebView _preferencesChangedNotification:]): Activate the WebCore
3317 workaround for this crash in iChat.
3319 2009-02-18 Anders Carlsson <andersca@apple.com>
3321 Reviewed by Sam Weinig.
3323 Fix for <rdar://problem/6542390>
3325 There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
3326 would cause a load to begin.
3328 * Plugins/WebNetscapePluginView.mm:
3329 (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3331 2009-02-18 Adam Roben <aroben@apple.com>
3333 Add SPI to get WebKit's custom pointing-hand cursor
3335 Reviewed by John Sullivan.
3337 * WebView/WebView.mm:
3338 (+[WebView _pointingHandCursor]): Added. Returns the custom
3339 pointing-hand cursor that WebKit uses.
3340 * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
3342 2009-02-17 Eric Carlson <eric.carlson@apple.com>
3344 Reviewed by Antti Koivisto.
3346 https://bugs.webkit.org/show_bug.cgi?id=23917
3347 Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
3350 * Plugins/WebPluginContainerPrivate.h:
3351 * Plugins/WebPluginController.mm:
3352 (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
3353 (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
3354 (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
3356 * WebCoreSupport/WebFrameLoaderClient.mm:
3357 (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
3358 file extension, only want a match for the new MIME type proxy plug-ins should have.
3360 2009-02-13 Anders Carlsson <andersca@apple.com>
3362 Reviewed by Kevin Decker.
3364 <rdar://problem/6584834> ESPN radio live stream link hangs Safari
3366 When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
3367 defer destruction until we're done executing the script.
3369 * Plugins/Hosted/NetscapePluginHostProxy.mm:
3370 (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
3371 (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
3372 Add a simple RAII object for deferring destruction of the plug-in instance.
3376 (WKPCInvokeDefault):
3380 (WKPCRemoveProperty):
3383 Use the PluginDestroyDeferrer.
3385 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3386 (WebKit::NetscapePluginInstanceProxy::pluginID):
3387 Assert that the plug-in ID is not 0 here.
3389 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3390 (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3391 Initialize the call depth.
3393 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
3394 Set the plug-in ID to 0 to aid debugging.
3396 (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
3397 Increment the call depth.
3399 (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
3400 Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
3402 (WebKit::NetscapePluginInstanceProxy::shouldStop):
3403 If we're called this with a non-zero call depth, set shouldStopSoon to true.
3405 * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3406 (-[WebHostedNetscapePluginView shouldStop]):
3409 2009-02-12 Brady Eidson <beidson@apple.com>
3411 Reviewed by Kevin Decker
3413 <rdar://problem/6582180> - Wrong HTTP method applied to history item.
3415 * WebCoreSupport/WebFrameLoaderClient.mm:
3416 (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
3419 2009-02-12 Anders Carlsson <andersca@apple.com>
3421 Reviewed by Kevin Decker.
3423 <rdar://problem/6579412>
3424 REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
3426 * Plugins/WebNetscapePluginView.h:
3427 * Plugins/WebNetscapePluginView.mm:
3428 (-[WebNetscapePluginView userAgent]):
3429 Apply workaround for Silverlight workaround.
3431 (-[WebNetscapePluginView _createPlugin]):
3432 Check if the plug-in that we're creating is the silverlight plug-in.
3434 2009-02-12 Brady Eidson <beidson@apple.com>
3436 Reviewed by Darin Adler
3438 Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
3440 * History/WebBackForwardList.mm:
3441 (-[WebBackForwardList dealloc]): Null check before deref()'ing.
3442 (-[WebBackForwardList finalize]): Ditto.
3444 * Misc/WebIconFetcher.mm:
3445 (-[WebIconFetcher dealloc]): Null check before deref()'ing.
3446 (-[WebIconFetcher finalize]): Ditto.
3448 * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
3449 (-[WebEditCommand initWithEditCommand:]):
3450 (-[WebEditCommand dealloc]):
3451 (-[WebEditCommand finalize]):
3452 (-[WebEditCommand command]):
3454 * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
3455 (-[WebArchivePrivate init]):
3456 (-[WebArchivePrivate initWithCoreArchive:]):
3457 (-[WebArchivePrivate coreArchive]):
3458 (-[WebArchivePrivate setCoreArchive:]):
3459 (-[WebArchivePrivate dealloc]):
3460 (-[WebArchivePrivate finalize]):
3462 * WebView/WebDataSource.mm:
3463 (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
3464 (-[WebDataSourcePrivate finalize]): Ditto.
3466 2009-02-12 Brady Eidson <beidson@apple.com>
3468 Reviewed by Kevin Decker
3470 <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
3472 NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would
3473 fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid
3474 WebArchive object, things started getting weird.
3476 * WebView/WebArchive.mm:
3477 (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
3478 (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
3479 (-[WebArchivePrivate finalize]): Ditto
3480 (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
3482 2009-02-11 Mark Rowe <mrowe@apple.com>
3486 * History/WebHistory.mm:
3487 (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
3489 2009-02-11 Brady Eidson <beidson@apple.com>
3491 Reviewed by Mark Rowe
3493 <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
3495 Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed
3496 and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice,
3497 which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
3499 * History/WebHistory.mm:
3500 (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
3501 (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
3502 if an entry for the URL already exists. Use that mode when reading the History.plist so only the most
3503 recent entry for a given URL will be used.
3504 (-[WebHistoryPrivate addItems:]):
3505 (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
3507 2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
3509 Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
3510 This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
3512 Reviewed by Timothy Hatcher.
3514 * WebCoreSupport/WebInspectorClient.h:
3515 * WebCoreSupport/WebInspectorClient.mm:
3516 (WebInspectorClient::hiddenPanels):
3518 2009-02-11 Alexey Proskuryakov <ap@webkit.org>
3520 Reviewed by Darin Adler.
3522 <rdar://problem/6562920> Pasted text should be normalized to NFC
3524 * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
3525 -[NSString precomposedStringWithCanonicalMapping].
3527 * WebCoreSupport/WebPasteboardHelper.mm:
3528 (WebPasteboardHelper::plainTextFromPasteboard): Ditto.
3530 * WebView/WebHTMLView.mm:
3531 (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
3532 Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
3533 precomposed already, and the conversion is performed outside WebKit for those anyway.
3535 2009-02-10 John Sullivan <sullivan@apple.com>
3537 Reviewed by Dan Bernstein
3539 <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
3540 Negative visit counts stored in History.plist aren't corrected.
3542 It's not clear how a huge negative visit count ended up in History.plist, but we can't
3543 trust data read from disk so we can at least reset this to something sane. WebCore has
3544 no guard against a visit count overflowing an int, but that seems very unlikely to have
3547 * History/WebHistoryItem.mm:
3548 (-[WebHistoryItem initFromDictionaryRepresentation:]):
3549 If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
3550 weekly visit count is in the dictionary, replace it with 0.
3552 2009-02-10 John Sullivan <sullivan@apple.com>
3554 Reviewed by Dan Bernstein
3556 <https://bugs.webkit.org/show_bug.cgi?id=23891>
3557 [WebHistoryItem _setVisitCount:] is unused and should be removed
3559 * History/WebHistoryItem.mm:
3560 (-[WebHistoryItem _setVisitCount:]):
3561 removed this unused method, which is a synonym for setVisitCount: that was introduced
3562 recently and abandoned even more recently
3564 * History/WebHistoryItemInternal.h:
3565 removed declaration of _setVisitCount:
3567 2009-02-10 Anders Carlsson <andersca@apple.com>
3569 Reviewed by Mark Rowe.
3571 <rdar://problem/6573916>
3572 CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
3574 * Plugins/Hosted/NetscapePluginHostManager.mm:
3575 (WebKit::NetscapePluginHostManager::instantiatePlugin):
3576 If we failed to instantiate the plug-in, invalidate the instance proxy.
3578 * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3579 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3580 (WebKit::NetscapePluginInstanceProxy::invalidate):
3581 Remove the instance from the plug-in host's set.
3583 (WebKit::NetscapePluginInstanceProxy::destroy):
3586 2009-02-09 Mark Rowe <mrowe@apple.com>
3588 Reviewed by Dan Bernstein.
3590 Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
3591 Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
3593 * WebView/WebHTMLView.mm:
3594 (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
3595 yet been initialized if this WebHTMLView was loaded from a nib.
3596 (-[WebHTMLView _removeSuperviewObservers]): Ditto.
3598 2009-02-09 Eric Seidel <eric@webkit.org>
3600 Reviewed by Dave Hyatt.
3602 Rename Selection to VisibleSelection to allow us to separate
3603 the selections the user works with from the ones used by
3604 the JS editing APIs.
3605 https://bugs.webkit.org/show_bug.cgi?id=23852
3607 * WebView/WebFrame.mm:
3608 (-[WebFrame _selectNSRange:]):
3609 * WebView/WebView.mm:
3610 (-[WebView textIteratorForRect:]):
3612 2009-02-06 Anders Carlsson <andersca@apple.com>
3614 Reviewed by Kevin Decker.
3616 Fix crash when plug-in host dies.
3618 * Plugins/Hosted/HostedNetscapePluginStream.mm:
3619 (WebKit::HostedNetscapePluginStream::didFail):
3621 2009-02-05 Eric Seidel <eric@webkit.org>
3623 Reviewed by Justin Garcia.
3625 DOMSelection.getRangeAt() returns a different range than the selection
3626 https://bugs.webkit.org/show_bug.cgi?id=23601
3628 Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
3630 * WebView/WebFrame.mm:
3631 (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
3632 (-[WebFrame _markDOMRange]):
3633 (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
3634 (-[WebFrame _selectedNSRange]):
3635 * WebView/WebHTMLView.mm:
3636 (-[WebHTMLView _selectedRange]):
3637 (-[WebTextCompleteController doCompletion]):
3638 (-[WebHTMLView selectedAttributedString]):
3639 * WebView/WebView.mm:
3640 (-[WebView textIteratorForRect:]):
3641 (-[WebView selectedDOMRange]):
3643 2009-02-06 Geoffrey Garen <ggaren@apple.com>
3645 Reviewed by Sam Weinig.
3647 Part III of <rdar://problem/6552272>.