summaryrefslogtreecommitdiffstats
path: root/WebKit/mac
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac')
-rw-r--r--WebKit/mac/ChangeLog221
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/MigrateHeaders.make1
-rw-r--r--WebKit/mac/Misc/WebCache.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm3
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h12
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm3
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm6
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm2
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm7
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h4
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm4
-rw-r--r--WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm2
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.h6
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm34
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm12
-rw-r--r--WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm6
-rw-r--r--WebKit/mac/WebView/WebFrame.mm18
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebView.mm6
20 files changed, 295 insertions, 61 deletions
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index e7abf3d..8d54870 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,224 @@
+2010-11-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Plug-in views should not assume that plugins are RenderEmbeddedObjects
+ https://bugs.webkit.org/show_bug.cgi?id=49196
+ <rdar://problem/8638467>
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginHostDied]):
+
+2010-11-08 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=48685
+ Notify UI process about focused frame
+
+ Added an empty implementation of the new ChromeClient method.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::focusedFrameChanged):
+
+2010-11-08 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * MigrateHeaders.make:
+
+2010-11-08 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Remove use of HIGetScaleFactor
+ https://bugs.webkit.org/show_bug.cgi?id=49186
+ <rdar://problem/8618410>
+
+ Scale factors can vary on a display-by-display basis and it doesn't make sense
+ to compute scale factor event coordinates like this.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (getCarbonEvent):
+
+2010-11-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Allow applets to participate in accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=49117
+ <rdar://problem/8625819>
+
+ If Java is being loaded via the Netscape Plugin API, create a
+ NetscapePluginWidget so that it has an implementation of platformLayer().
+
+ Also clean up by using early returns.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-11-07 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Rename Cache to MemoryCache
+ https://bugs.webkit.org/show_bug.cgi?id=49159
+
+ * Misc/WebCache.mm:
+ (+[WebCache statistics]):
+ * WebCoreSupport/WebDeviceOrientationClient.mm:
+ (WebDeviceOrientationClient::setController):
+ * WebView/WebView.mm:
+
+2010-11-05 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=49100
+ ASSERT([self window]) fails in -[WebBaseNetscapePluginView restartTimers]
+
+ * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView restartTimers]):
+ Removed the assertion. Multiple callers provide no guarantee that the plug-in is still alive
+ (see bug comments), and there seems to be no harm in executing this function in that case.
+
+2010-11-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Move resumeAnimations/suspendAnimations from Frame to AnimationController.
+ https://bugs.webkit.org/show_bug.cgi?id=49073
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _suspendAnimations]):
+ (-[WebFrame _resumeAnimations]):
+
+2010-11-04 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=49008
+ <rdar://problem/7906226> Frequent crashes on mail.yahoo.co.jp
+
+ Callers of NetscapePluginInstanceProxy::waitForReply() are not prepared to be deleted during
+ the call, unless it returns 0. There are two reasons for NetscapePluginInstanceProxy to be
+ deleted during wait:
+ - plugin crashed;
+ - plugin was stopped (e.g. due to a DOM modification performed by another reply that came in
+ while waiting).
+
+ We didn't recognize the latter.
+
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ (WebKit::NetscapePluginInstanceProxy::waitForReply):
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
+
+2010-11-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make suspendAnimations/resumeAnimations and setCSSAnimations traverse through subframes and remember state
+ https://bugs.webkit.org/show_bug.cgi?id=46945
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _suspendAnimations]):
+ (-[WebFrame _resumeAnimations]):
+
+2010-11-04 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ reversion bubble in WebViews
+ https://bugs.webkit.org/show_bug.cgi?id=47630
+ <rdar://problem/8530960>
+
+ This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
+
+ * WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
+ * WebCoreSupport/WebEditorClient.mm: Adopted new signature of base class method. And code
+ change to use new reversion API in AppKit.
+ (WebEditorClient::WebEditorClient):
+ (WebEditorClient::~WebEditorClient):
+ (WebEditorClient::respondToChangedSelection):
+ (WebEditorClient::showCorrectionPanel):
+ (WebEditorClient::dismissCorrectionPanel):
+ (WebEditorClient::isShowingCorrectionPanel):
+
+2010-11-04 Mike Thole <mthole@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Title for images should use localized numerals
+ https://bugs.webkit.org/show_bug.cgi?id=49017
+
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::imageTitle): Use localized numerals on Snow Leopard or newer.
+
+2010-11-02 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Barth.
+
+ For unnamed frames, window.name returns a generated name
+ https://bugs.webkit.org/show_bug.cgi?id=6751
+
+ Part 1 of 2.
+
+ Substitute FrameTree::uniqueName() for FrameTree::name() in the Mac port.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame name]):
+
+2010-11-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
+ Context menu support for WebKit 2.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::showContextMenu):
+
+2010-10-29 Daniel Bates <dbates@rim.com>
+
+ No review, rolling out 70971.
+ http://trac.webkit.org/changeset/70971
+ https://bugs.webkit.org/show_bug.cgi?id=6751
+
+ Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
+ it caused layout test failures on all bots. In particular, the
+ child count in a generated frame name differs after this patch. We need
+ to look into this further.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame name]):
+
+2010-10-28 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Ojan Vafai.
+
+ Needs a "LinuxEditingBehavior", perhaps with a better name
+ https://bugs.webkit.org/show_bug.cgi?id=36627
+
+ Added the corresponding GTK+ setting to WebCore's EditingUnixBehavior: WebKitEditingUnixBehavior.
+
+ * WebView/WebFrame.mm:
+ (core):
+ * WebView/WebPreferencesPrivate.h:
+
+2010-10-29 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Barth.
+
+ For unnamed frames, window.name returns a generated name
+ https://bugs.webkit.org/show_bug.cgi?id=6751
+
+ Modified Mac-port to use FrameTree::uniqueName().
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame name]):
+
2010-10-29 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index 8739787..56baf78 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 11;
+MINOR_VERSION = 12;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 2e6f24a..d674d4d 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -222,7 +222,6 @@ all : \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedNumberList.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGAnimatedNumberListInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedPathData.h \
- $(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedPoints.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedPreserveAspectRatio.h \
$(INTERNAL_HEADERS_DIR)/DOMSVGAnimatedPreserveAspectRatioInternal.h \
$(PRIVATE_HEADERS_DIR)/DOMSVGAnimatedRect.h \
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm
index 747d213..0517bc4 100644
--- a/WebKit/mac/Misc/WebCache.mm
+++ b/WebKit/mac/Misc/WebCache.mm
@@ -31,7 +31,7 @@
#import "WebView.h"
#import "WebViewInternal.h"
#import <WebCore/ApplicationCacheStorage.h>
-#import <WebCore/Cache.h>
+#import <WebCore/MemoryCache.h>
#import <WebCore/CrossOriginPreflightResultCache.h>
@implementation WebCache
@@ -43,7 +43,7 @@
+ (NSArray *)statistics
{
- WebCore::Cache::Statistics s = WebCore::cache()->getStatistics();
+ WebCore::MemoryCache::Statistics s = WebCore::cache()->getStatistics();
return [NSArray arrayWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index 067b8bb..4506f03 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -74,7 +74,8 @@ public:
~PluginDestroyDeferrer()
{
- m_proxy->didCallPluginFunction();
+ bool stopped;
+ m_proxy->didCallPluginFunction(stopped);
}
private:
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 3081120..f784ade 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -153,7 +153,7 @@ public:
void invalidate();
void willCallPluginFunction();
- void didCallPluginFunction();
+ void didCallPluginFunction(bool& stopped);
bool shouldStop();
uint32_t nextRequestID();
@@ -262,8 +262,14 @@ public:
ASSERT(reply->m_type == T::ReplyType);
m_waitingForReply = false;
-
- didCallPluginFunction();
+
+ bool stopped = false;
+ didCallPluginFunction(stopped);
+ if (stopped) {
+ // The instance proxy may have been deleted from didCallPluginFunction(), so a null reply needs to be returned.
+ delete static_cast<T*>(reply);
+ return std::auto_ptr<T>();
+ }
return std::auto_ptr<T>(static_cast<T*>(reply));
}
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index a2d4a96..ecaa0d6 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -1455,7 +1455,7 @@ void NetscapePluginInstanceProxy::willCallPluginFunction()
m_pluginFunctionCallDepth++;
}
-void NetscapePluginInstanceProxy::didCallPluginFunction()
+void NetscapePluginInstanceProxy::didCallPluginFunction(bool& stopped)
{
ASSERT(m_pluginFunctionCallDepth > 0);
m_pluginFunctionCallDepth--;
@@ -1465,6 +1465,7 @@ void NetscapePluginInstanceProxy::didCallPluginFunction()
if (!m_pluginFunctionCallDepth && m_shouldStopSoon) {
m_shouldStopSoon = false;
[m_pluginView stop];
+ stopped = true;
}
}
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 63a7b6a..362dd97 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -380,9 +380,11 @@ extern "C" {
- (void)pluginHostDied
{
- RenderEmbeddedObject* renderer = toRenderEmbeddedObject(_element->renderer());
- if (renderer)
+ if (_element->renderer() && _element->renderer()->isEmbeddedObject()) {
+ // FIXME: The renderer could also be a RenderApplet, we should handle that.
+ RenderEmbeddedObject* renderer = toRenderEmbeddedObject(_element->renderer());
renderer->setShowsCrashedPluginIndicator();
+ }
_pluginLayer = nil;
_proxy = 0;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 708b017..b6b8b64 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -326,8 +326,6 @@ String WebHaltablePlugin::pluginName() const
- (void)restartTimers
{
- ASSERT([self window]);
-
[self stopTimers];
if (!_isStarted || [[self window] isMiniaturized])
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
index 3d2b68e..a3aca1f 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
@@ -49,8 +49,6 @@ static void getCarbonEvent(EventRecord* carbonEvent)
carbonEvent->when = TickCount();
GetGlobalMouse(&carbonEvent->where);
- carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
- carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
carbonEvent->modifiers = GetCurrentKeyModifiers();
if (!Button())
carbonEvent->modifiers |= btnState;
@@ -87,11 +85,8 @@ static EventModifiers modifiersForEvent(NSEvent *event)
static void getCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent)
{
- if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent)) {
- carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
- carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
+ if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent))
return;
- }
NSPoint where = [[cocoaEvent window] convertBaseToScreen:[cocoaEvent locationInWindow]];
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 209c2b9..a5f49e3 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -54,6 +54,7 @@ public:
virtual void takeFocus(WebCore::FocusDirection);
virtual void focusedNodeChanged(WebCore::Node*);
+ virtual void focusedFrameChanged(WebCore::Frame*);
virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
virtual void show();
@@ -178,6 +179,9 @@ public:
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
+#if ENABLE(CONTEXT_MENUS)
+ virtual void showContextMenu() { }
+#endif
private:
WebView *m_webView;
};
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 3610896..fe95989 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -200,6 +200,10 @@ void WebChromeClient::focusedNodeChanged(Node*)
{
}
+void WebChromeClient::focusedFrameChanged(Frame*)
+{
+}
+
Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
{
NSURLRequest *URLRequest = nil;
diff --git a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm
index f0c624d..3a4d5d7 100644
--- a/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebDeviceOrientationClient.mm
@@ -41,7 +41,7 @@ WebDeviceOrientationClient::WebDeviceOrientationClient(WebView* webView)
void WebDeviceOrientationClient::setController(DeviceOrientationController* controller)
{
// This is called by the Page constructor before our WebView has the provider set up.
- // Cache the controller for later use.
+ // MemoryCache the controller for later use.
m_controller = controller;
}
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index ad324b9..23cf312 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -133,8 +133,8 @@ public:
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- virtual void showCorrectionPanel(const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
- virtual void dismissCorrectionPanel(bool correctionAccepted);
+ virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
+ virtual void dismissCorrectionPanel(WebCore::CorrectionWasRejectedOrNot);
virtual bool isShowingCorrectionPanel();
#endif
private:
@@ -146,6 +146,6 @@ private:
bool m_haveUndoRedoOperations;
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- NSInteger m_correctionPanelTag;
+ BOOL m_correctionPanelIsShown;
#endif
};
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 2bf3259..39b511e 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -186,7 +186,7 @@ WebEditorClient::WebEditorClient(WebView *webView)
, m_undoTarget([[[WebEditorUndoTarget alloc] init] autorelease])
, m_haveUndoRedoOperations(false)
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- , m_correctionPanelTag(InvalidCorrectionPanelTag)
+ , m_correctionPanelIsShown(false)
#endif
{
}
@@ -194,7 +194,7 @@ WebEditorClient::WebEditorClient(WebView *webView)
WebEditorClient::~WebEditorClient()
{
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- dismissCorrectionPanel(true);
+ dismissCorrectionPanel(WebCore::CorrectionWasNotRejected);
#endif
}
@@ -310,10 +310,6 @@ void WebEditorClient::respondToChangedSelection()
{
[m_webView _selectionChanged];
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- dismissCorrectionPanel(true);
-#endif
-
// FIXME: This quirk is needed due to <rdar://problem/5009625> - We can phase it out once Aperture can adopt the new behavior on their end
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_APERTURE_QUIRK) && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Aperture"])
return;
@@ -860,8 +856,8 @@ void WebEditorClient::updateSpellingUIWithGrammarString(const String& badGrammar
}
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
-void WebEditorClient::showCorrectionPanel(const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, Editor* editor) {
- dismissCorrectionPanel(true);
+void WebEditorClient::showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, Editor* editor) {
+ dismissCorrectionPanel(WebCore::CorrectionWasNotRejected);
NSRect boundingBoxAsNSRect = boundingBoxOfReplacedString;
NSRect webViewFrame = m_webView.frame;
@@ -871,25 +867,33 @@ void WebEditorClient::showCorrectionPanel(const FloatRect& boundingBoxOfReplaced
NSString *replacedStringAsNSString = replacedString;
NSString *replacementStringAsNSString = replacementString;
- m_correctionPanelTag = [[NSSpellChecker sharedSpellChecker] showCorrection:replacementStringAsNSString forStringInRect:boundingBoxAsNSRect view:m_webView completionHandler:^(BOOL accepted) {
- if (!accepted) {
+ m_correctionPanelIsShown = YES;
+ NSCorrectionBubbleType bubbleType = panelType == WebCore::CorrectionPanelInfo::PanelTypeCorrection ? NSCorrectionBubbleTypeCorrection : NSCorrectionBubbleTypeReversion;
+ [[NSSpellChecker sharedSpellChecker] showCorrectionBubbleOfType:bubbleType primaryString:replacementStringAsNSString alternativeStrings:nil forStringInRect:boundingBoxAsNSRect view:m_webView completionHandler:^(NSString *acceptedString) {
+ if (!acceptedString && bubbleType == NSCorrectionBubbleTypeCorrection) {
[[NSSpellChecker sharedSpellChecker] recordResponse:NSCorrectionResponseRejected toCorrection:replacementStringAsNSString forWord:replacedStringAsNSString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]];
editor->handleRejectedCorrection();
+ } else if (acceptedString && bubbleType == NSCorrectionBubbleTypeReversion) {
+ [[NSSpellChecker sharedSpellChecker] recordResponse:NSCorrectionResponseReverted toCorrection:replacedStringAsNSString forWord:replacementStringAsNSString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]];
+ editor->handleRejectedCorrection();
}
}];
}
-void WebEditorClient::dismissCorrectionPanel(bool correctionAccepted)
+void WebEditorClient::dismissCorrectionPanel(WebCore::CorrectionWasRejectedOrNot correctionWasRejectedOrNot)
{
- if (m_correctionPanelTag != InvalidCorrectionPanelTag) {
- [[NSSpellChecker sharedSpellChecker] dismissCorrection:m_correctionPanelTag acceptCorrection:correctionAccepted];
- m_correctionPanelTag = InvalidCorrectionPanelTag;
+ if (isShowingCorrectionPanel()) {
+ if (correctionWasRejectedOrNot == CorrectionWasRejected)
+ [[NSSpellChecker sharedSpellChecker] cancelCorrectionBubbleForView:m_webView];
+ else
+ [[NSSpellChecker sharedSpellChecker] dismissCorrectionBubbleForView:m_webView];
+ m_correctionPanelIsShown = NO;
}
}
bool WebEditorClient::isShowingCorrectionPanel()
{
- return m_correctionPanelTag != InvalidCorrectionPanelTag;
+ return m_correctionPanelIsShown;
}
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 3053b49..7ca27c0 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -1752,6 +1752,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
[values addObject:[NSString stringWithFormat:@"%d", size.height()]];
}
view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, names, values, baseURL, kit(element), NO);
+ if (view)
+ return adoptRef(new PluginWidget(view));
}
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
@@ -1764,6 +1766,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
attributeValues:kit(paramValues)
loadManually:NO
element:element] autorelease];
+ if (view)
+ return adoptRef(new NetscapePluginWidget(view));
} else {
ASSERT_NOT_REACHED();
}
@@ -1781,15 +1785,9 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
}
}
- ASSERT(view);
- return adoptRef(new PluginWidget(view));
-
END_BLOCK_OBJC_EXCEPTIONS;
-
- return adoptRef(new PluginWidget);
-#else
- return 0;
#endif // ENABLE(JAVA_BRIDGE)
+ return 0;
}
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
index 9d8fd11..f95594a 100644
--- a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
+++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
@@ -660,7 +660,13 @@ String WebPlatformStrategies::unknownFileSizeText()
String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size)
{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ NSString *widthString = [NSNumberFormatter localizedStringFromNumber:[NSNumber numberWithInt:size.width()] numberStyle:NSNumberFormatterDecimalStyle];
+ NSString *heightString = [NSNumberFormatter localizedStringFromNumber:[NSNumber numberWithInt:size.height()] numberStyle:NSNumberFormatterDecimalStyle];
+ return [NSString localizedStringWithFormat:UI_STRING("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, widthString, heightString];
+#else
return [NSString stringWithFormat:UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, size.width(), size.height()];
+#endif
}
String WebPlatformStrategies::mediaElementLoadingStateText()
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 4f8c1ba..fb6d69c 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -203,6 +203,8 @@ WebCore::EditingBehaviorType core(WebKitEditingBehavior behavior)
return WebCore::EditingMacBehavior;
case WebKitEditingWinBehavior:
return WebCore::EditingWindowsBehavior;
+ case WebKitEditingUnixBehavior:
+ return WebCore::EditingUnixBehavior;
}
ASSERT_NOT_REACHED();
return WebCore::EditingMacBehavior;
@@ -1134,12 +1136,8 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
Frame* frame = core(self);
if (!frame)
return;
-
- AnimationController* controller = frame->animation();
- if (!controller)
- return;
-
- controller->suspendAnimations(frame->document());
+
+ frame->animation()->suspendAnimations();
}
- (void) _resumeAnimations
@@ -1148,11 +1146,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!frame)
return;
- AnimationController* controller = frame->animation();
- if (!controller)
- return;
-
- controller->resumeAnimations(frame->document());
+ frame->animation()->resumeAnimations();
}
- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
@@ -1406,7 +1400,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
Frame* coreFrame = _private->coreFrame;
if (!coreFrame)
return nil;
- return coreFrame->tree()->name();
+ return coreFrame->tree()->uniqueName();
}
- (WebFrameView *)frameView
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 2ec08e8..2ee07d7 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -45,7 +45,8 @@ typedef enum {
typedef enum {
WebKitEditingMacBehavior,
- WebKitEditingWinBehavior
+ WebKitEditingWinBehavior,
+ WebKitEditingUnixBehavior
} WebKitEditingBehavior;
extern NSString *WebPreferencesChangedNotification;
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 7456898..49bb451 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -111,7 +111,7 @@
#import <WebCore/AbstractDatabase.h>
#import <WebCore/ApplicationCacheStorage.h>
#import <WebCore/BackForwardListImpl.h>
-#import <WebCore/Cache.h>
+#import <WebCore/MemoryCache.h>
#import <WebCore/ColorMac.h>
#import <WebCore/CSSComputedStyleDeclaration.h>
#import <WebCore/Cursor.h>
@@ -2611,9 +2611,9 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
Frame* frame = core([self mainFrame]);
if (suspended)
- frame->animation()->suspendAnimations(frame->document());
+ frame->animation()->suspendAnimations();
else
- frame->animation()->resumeAnimations(frame->document());
+ frame->animation()->resumeAnimations();
}
+ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme