+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6610666> Revise the Cocoa event model text API
+
+ Add a NPCocoaEventTextInput event type. Remove the text input variables.
+
+ * bridge/npapi.h:
+ (_NPCocoaEvent::):
+
2009-03-13 Kevin Decker <kdecker@apple.com>
Reviewed by Anders.
NPPVpluginDrawingModel = 1000,
/* Used for negotiating event models */
NPPVpluginEventModel = 1001,
- /* The plug-in text input vtable */
- NPPVpluginTextInputFuncs = 1002,
/* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */
NPPVpluginCoreAnimationLayer = 1003
#endif
#endif
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
- , NPNVbrowserTextInputFuncs = 1002 /* The browser text input vtable */
#endif /* XP_MACOSX */
} NPNVariable;
NPCocoaEventFocusChanged,
NPCocoaEventWindowFocusChanged,
NPCocoaEventScrollWheel,
+ NPCocoaEventTextInput
} NPCocoaEventType;
typedef struct _NPNSString NPNSString;
} draw;
struct {
NPBool hasFocus;
- } focus;
+ } focus;
+ struct {
+ NPNSString *text;
+ } text;
} data;
} NPCocoaEvent;
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6610666> Revise the Cocoa event model text API
+
+ Remove nptextinput.h
+
+ * WebKit.xcodeproj/project.pbxproj:
+
2009-03-03 David Kilzer <ddkilzer@apple.com>
<rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
1A74A28F0F4F75400082E228 /* WebTextInputWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A74A28D0F4F75400082E228 /* WebTextInputWindowController.m */; };
1A77B02E0EE7730500C8A1F9 /* WebPluginRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A77B02C0EE7730500C8A1F9 /* WebPluginRequest.h */; };
1A77B02F0EE7730500C8A1F9 /* WebPluginRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */; };
- 1A7F9C4C0DD3DDEA0028F8A5 /* nptextinput.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7F9C4B0DD3DDEA0028F8A5 /* nptextinput.h */; settings = {ATTRIBUTES = (Public, ); }; };
1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */; };
1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */; };
1AAF58940EDCCF15008D883D /* WebKitPluginAgent.defs in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF588A0EDCCEA3008D883D /* WebKitPluginAgent.defs */; settings = {ATTRIBUTES = (Private, ); }; };
1A74A28D0F4F75400082E228 /* WebTextInputWindowController.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = WebTextInputWindowController.m; sourceTree = "<group>"; };
1A77B02C0EE7730500C8A1F9 /* WebPluginRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginRequest.h; sourceTree = "<group>"; };
1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebPluginRequest.m; sourceTree = "<group>"; };
- 1A7F9C4B0DD3DDEA0028F8A5 /* nptextinput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nptextinput.h; sourceTree = "<group>"; };
1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostedNetscapePluginStream.h; sourceTree = "<group>"; };
1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HostedNetscapePluginStream.mm; sourceTree = "<group>"; };
1AAF588A0EDCCEA3008D883D /* WebKitPluginAgent.defs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.mig; path = WebKitPluginAgent.defs; sourceTree = "<group>"; };
1A77B02C0EE7730500C8A1F9 /* WebPluginRequest.h */,
1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */,
F5F717230288493C018635CA /* npapi.mm */,
- 1A7F9C4B0DD3DDEA0028F8A5 /* nptextinput.h */,
);
name = "Netscape Plug-ins";
sourceTree = "<group>";
939810460824BF01008DF038 /* WebViewFactory.h in Headers */,
9398109B0824BF01008DF038 /* WebViewInternal.h in Headers */,
939810710824BF01008DF038 /* WebViewPrivate.h in Headers */,
- 1A7F9C4C0DD3DDEA0028F8A5 /* nptextinput.h in Headers */,
1A2DBE9F0F251E3A0036F8A6 /* ProxyInstance.h in Headers */,
1A74A28E0F4F75400082E228 /* WebTextInputWindowController.h in Headers */,
);
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6610666> Revise the Cocoa event model text API
+
+ Replace the text input API with a simpler API that uses a separate text input window.
+
+ * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+ * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+ (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
+ Initialize m_keyEventHandler to 0.
+
+ (WebNetscapePluginEventHandlerCocoa::keyDown):
+ If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
+
+ (WebNetscapePluginEventHandlerCocoa::focusChanged):
+ Install/remove the key event handler as needed.
+
+ (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
+ Get the text and send a TextInput event.
+
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ Remove the old text input API.
+
+ (-[WebNetscapePluginView inputContext]):
+ Always return nil here.
+
+ * Plugins/npapi.mm:
+ * Plugins/nptextinput.h: Removed.
+
2009-03-12 Anders Carlsson <andersca@apple.com>
Reviewed by Mike Thole and Mark Rowe.
virtual void focusChanged(bool hasFocus);
virtual void* platformWindow(NSWindow*);
+
private:
bool sendMouseEvent(NSEvent*, NPCocoaEventType);
bool sendKeyEvent(NSEvent*, NPCocoaEventType);
bool sendEvent(NPCocoaEvent*);
+
+ void installKeyEventHandler();
+ void removeKeyEventHandler();
+
+ static OSStatus TSMEventHandler(EventHandlerCallRef, EventRef, void *eventHandler);
+ OSStatus handleTSMEvent(EventRef);
+
+ EventHandlerRef m_keyEventHandler;
};
#endif //WebNetscapePluginEventHandlerCocoa_h
#import "WebNetscapePluginEventHandlerCocoa.h"
+#import "WebKitSystemInterface.h"
#import "WebNetscapePluginView.h"
+#import <wtf/Vector.h>
WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa(WebNetscapePluginView* pluginView)
: WebNetscapePluginEventHandler(pluginView)
+ , m_keyEventHandler(0)
{
}
bool retval = sendKeyEvent(event, NPCocoaEventKeyDown);
// If the plug-in did not handle the event, pass it on to the Input Manager.
- if (!retval)
- [m_pluginView interpretKeyEvents:[NSArray arrayWithObject:event]];
+ if (retval)
+ WKSendKeyEventToTSM(event);
}
void WebNetscapePluginEventHandlerCocoa::keyUp(NSEvent *event)
event.data.focus.hasFocus = hasFocus;
sendEvent(&event);
+
+ if (hasFocus)
+ installKeyEventHandler();
+ else
+ removeKeyEventHandler();
}
void* WebNetscapePluginEventHandlerCocoa::platformWindow(NSWindow* window)
return result;
}
+void WebNetscapePluginEventHandlerCocoa::installKeyEventHandler()
+{
+ static const EventTypeSpec TSMEvents[] =
+ {
+ { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }
+ };
+
+ if (!m_keyEventHandler)
+ InstallEventHandler(GetWindowEventTarget((WindowRef)[[m_pluginView window] windowRef]),
+ NewEventHandlerUPP(TSMEventHandler),
+ GetEventTypeCount(TSMEvents),
+ TSMEvents,
+ this,
+ &m_keyEventHandler);
+}
+
+void WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler()
+{
+ if (m_keyEventHandler) {
+ RemoveEventHandler(m_keyEventHandler);
+ m_keyEventHandler = 0;
+ }
+}
+
+OSStatus WebNetscapePluginEventHandlerCocoa::TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef event, void* eventHandler)
+{
+ return static_cast<WebNetscapePluginEventHandlerCocoa*>(eventHandler)->handleTSMEvent(event);
+}
+
+OSStatus WebNetscapePluginEventHandlerCocoa::handleTSMEvent(EventRef eventRef)
+{
+ ASSERT(GetEventKind(eventRef) == kEventTextInputUnicodeForKeyEvent);
+
+ // Get the text buffer size.
+ ByteCount size;
+ OSStatus result = GetEventParameter(eventRef, kEventParamTextInputSendText, typeUnicodeText, 0, 0, &size, 0);
+ if (result != noErr)
+ return result;
+
+ unsigned length = size / sizeof(UniChar);
+ Vector<UniChar, 16> characters(length);
+
+ // Now get the actual text.
+ result = GetEventParameter(eventRef, kEventParamTextInputSendText, typeUnicodeText, 0, size, 0, characters.data());
+ if (result != noErr)
+ return result;
+
+ RetainPtr<CFStringRef> text(AdoptCF, CFStringCreateWithCharacters(0, characters.data(), length));
+
+ NPCocoaEvent event;
+
+ initializeEvent(&event, NPCocoaEventTextInput);
+ event.data.text.text = (NPNSString*)text.get();
+
+ sendEvent(&event);
+
+ return noErr;
+}
+
#endif // ENABLE(NETSCAPE_PLUGIN_API)
NP_CGContext cgPort;
} PluginPort;
-typedef struct _NPPluginTextInputFuncs NPPluginTextInputFuncs;
-
// Because the Adobe 7.x Acrobat plug-in has a hard coded check for a view named
// "WebNetscapePluginDocumentView", this class must retain the old name in order
// for the plug-in to function correctly. (rdar://problem/4699455)
#define WebNetscapePluginView WebNetscapePluginDocumentView
-@interface WebNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader, NSTextInput>
+@interface WebNetscapePluginView : WebBaseNetscapePluginView<WebPluginManualLoader>
{
RefPtr<WebNetscapePluginStream> _manualStream;
#ifndef BUILDING_ON_TIGER
RetainPtr<NSMutableDictionary> _pendingFrameLoads;
BOOL _isSilverlight;
-
- NPPluginTextInputFuncs *textInputFuncs;
}
+ (WebNetscapePluginView *)currentPluginView;
#import <WebCore/ScriptController.h>
#import <WebCore/SoftLinking.h>
#import <WebCore/WebCoreObjCExtras.h>
-#import <WebKit/nptextinput.h>
#import <WebKit/DOMPrivate.h>
#import <WebKit/WebUIDelegate.h>
#import <runtime/InitializeThreading.h>
// Create the event handler
_eventHandler.set(WebNetscapePluginEventHandler::create(self));
-
- // Get the text input vtable
- if (eventModel == NPEventModelCocoa) {
- [self willCallPlugInFunction];
- {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
- NPPluginTextInputFuncs *value = 0;
- if (![_pluginPackage.get() pluginFuncs]->getvalue(plugin, NPPVpluginTextInputFuncs, &value) == NPERR_NO_ERROR && value)
- textInputFuncs = value;
- }
- [self didCallPlugInFunction];
- }
-
+
return YES;
}
[_pluginPackage.get() close];
_eventHandler.clear();
-
- textInputFuncs = 0;
}
- (NPEventModel)eventModel
_manualStream->didFinishLoading(0);
}
-#pragma mark NSTextInput implementation
-
- (NSTextInputContext *)inputContext
{
-#ifndef NP_NO_CARBON
- if (!_isStarted || eventModel == NPEventModelCarbon)
- return nil;
-#endif
-
- return [super inputContext];
-}
-
-- (BOOL)hasMarkedText
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->hasMarkedText)
- return textInputFuncs->hasMarkedText(plugin);
-
- return NO;
-}
-
-- (void)insertText:(id)aString
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->insertText)
- textInputFuncs->insertText(plugin, aString);
-}
-
-- (NSRange)markedRange
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->markedRange)
- return textInputFuncs->markedRange(plugin);
-
- return NSMakeRange(NSNotFound, 0);
-}
-
-- (NSRange)selectedRange
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->selectedRange)
- return textInputFuncs->selectedRange(plugin);
-
- return NSMakeRange(NSNotFound, 0);
-}
-
-- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->setMarkedText)
- textInputFuncs->setMarkedText(plugin, aString, selRange);
-}
-
-- (void)unmarkText
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->unmarkText)
- textInputFuncs->unmarkText(plugin);
-}
-
-- (NSArray *)validAttributesForMarkedText
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->validAttributesForMarkedText)
- return textInputFuncs->validAttributesForMarkedText(plugin);
-
- return [NSArray array];
-}
-
-- (NSAttributedString *)attributedSubstringFromRange:(NSRange)theRange
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->attributedSubstringFromRange)
- return textInputFuncs->attributedSubstringFromRange(plugin, theRange);
-
return nil;
}
-- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->characterIndexForPoint) {
- // Convert the point to window coordinates
- NSPoint point = [[self window] convertScreenToBase:thePoint];
-
- // And view coordinates
- point = [self convertPoint:point fromView:nil];
-
- return textInputFuncs->characterIndexForPoint(plugin, point);
- }
-
- return NSNotFound;
-}
-
-- (void)doCommandBySelector:(SEL)aSelector
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->doCommandBySelector)
- textInputFuncs->doCommandBySelector(plugin, aSelector);
-}
-
-- (NSRect)firstRectForCharacterRange:(NSRange)theRange
-{
- ASSERT(eventModel == NPEventModelCocoa);
- ASSERT(_isStarted);
-
- if (textInputFuncs && textInputFuncs->firstRectForCharacterRange) {
- NSRect rect = textInputFuncs->firstRectForCharacterRange(plugin, theRange);
-
- // Convert the rect to window coordinates
- rect = [self convertRect:rect toView:nil];
-
- // Convert the rect location to screen coordinates
- rect.origin = [[self window] convertBaseToScreen:rect.origin];
-
- return rect;
- }
-
- return NSZeroRect;
-}
-
-// test for 10.4 because of <rdar://problem/4243463>
-#ifdef BUILDING_ON_TIGER
-- (long)conversationIdentifier
-{
- return (long)self;
-}
-#else
-- (NSInteger)conversationIdentifier
-{
- return (NSInteger)self;
-}
-#endif
-
@end
@implementation WebNetscapePluginView (WebNPPCallbacks)
[[self window] displayIfNeeded];
}
-static NPBrowserTextInputFuncs *browserTextInputFuncs()
-{
- static NPBrowserTextInputFuncs inputFuncs = {
- 0,
- sizeof(NPBrowserTextInputFuncs),
- NPN_MarkedTextAbandoned,
- NPN_MarkedTextSelectionChanged
- };
-
- return &inputFuncs;
-}
-
- (NPError)getVariable:(NPNVariable)variable value:(void *)value
{
switch (variable) {
*(NPBool *)value = TRUE;
return NPERR_NO_ERROR;
}
-
- case NPNVbrowserTextInputFuncs:
- {
- if (eventModel == NPEventModelCocoa) {
- *(NPBrowserTextInputFuncs **)value = browserTextInputFuncs();
- return NPERR_NO_ERROR;
- }
- }
+
default:
break;
}
#if ENABLE(NETSCAPE_PLUGIN_API)
#import <WebKit/npapi.h>
-#import <WebKit/nptextinput.h>
#import "WebNetscapePluginView.h"
#import "WebKitLogging.h"
return [pluginViewForInstance(instance) popUpContextMenu:menu];
}
-void NPN_MarkedTextAbandoned(NPP instance)
-{
- WebNetscapePluginView *pluginView = pluginViewForInstance(instance);
-
- [[NSInputManager currentInputManager] markedTextAbandoned:pluginView];
-}
-
-void NPN_MarkedTextSelectionChanged(NPP instance, NSRange newSel)
-{
- WebNetscapePluginView *pluginView = pluginViewForInstance(instance);
-
- [[NSInputManager currentInputManager] markedTextSelectionChanged:newSel client:pluginView];
-}
-
#endif
+++ /dev/null
-/*
- * Copyright (C) 2008, Apple Inc. and The Mozilla Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the names of Apple Inc. ("Apple") or The Mozilla
- * Foundation ("Mozilla") nor the names of their contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR
- * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-#ifndef __OBJC__
-#error "npinput.h can only be included from Objective-C code."
-#endif
-
-#ifndef _NP_TEXTINPUT_H_
-#define _NP_TEXTINPUT_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <WebKit/npapi.h>
-
-#import <Cocoa/Cocoa.h>
-
-typedef void (*NPP_InsertTextFunc)(NPP npp, id aString);
-typedef void (*NPP_DoCommandBySelectorFunc)(NPP npp, SEL aSelector);
-typedef void (*NPP_SetMarkedTextFunc)(NPP npp, id aString, NSRange selRange);
-typedef void (*NPP_UnmarkTextFunc)(NPP npp);
-typedef BOOL (*NPP_HasMarkedTextFunc)(NPP npp);
-typedef NSAttributedString * (*NPP_AttributedSubstringFromRangeFunc)(NPP npp, NSRange theRange);
-typedef NSRange (*NPP_MarkedRangeFunc)(NPP npp);
-typedef NSRange (*NPP_SelectedRangeFunc)(NPP npp);
-typedef NSRect (*NPP_FirstRectForCharacterRangeFunc)(NPP npp, NSRange theRange);
-typedef unsigned long long (*NPP_CharacterIndexForPointFunc)(NPP npp, NSPoint thePoint);
-typedef NSArray *(*NPP_ValidAttributesForMarkedTextFunc)(NPP npp);
-
-typedef struct _NPPluginTextInputFuncs {
- uint16 size;
- uint16 version;
-
- NPP_InsertTextFunc insertText;
- NPP_DoCommandBySelectorFunc doCommandBySelector;
- NPP_SetMarkedTextFunc setMarkedText;
- NPP_UnmarkTextFunc unmarkText;
- NPP_HasMarkedTextFunc hasMarkedText;
- NPP_AttributedSubstringFromRangeFunc attributedSubstringFromRange;
- NPP_MarkedRangeFunc markedRange;
- NPP_SelectedRangeFunc selectedRange;
- NPP_FirstRectForCharacterRangeFunc firstRectForCharacterRange;
- NPP_CharacterIndexForPointFunc characterIndexForPoint;
- NPP_ValidAttributesForMarkedTextFunc validAttributesForMarkedText;
-} NPPluginTextInputFuncs;
-
-void NPP_InsertText(NPP npp, id aString);
-void NPP_DoCommandBySelector(NPP npp, SEL aSelector);
-void NPP_SetMarkedText(NPP npp, id aString, NSRange selRange);
-void NPP_UnmarkText(NPP npp);
-BOOL NPP_HasMarkedText(NPP npp);
-NSAttributedString *NPP_AttributedSubstringFromRange(NPP npp, NSRange theRange);
-NSRange NPP_MarkedRange(NPP npp);
-NSRange NPP_SelectedRange(NPP npp);
-NSRect NPP_FirstRectForCharacterRange(NPP npp, NSRange theRange);
-unsigned long long NPP_CharacterIndexForPoint(NPP npp, NSPoint thePoint);
-NSArray *NPP_ValidAttributesForMarkedText(NPP npp);
-
-typedef void (*NPN_MarkedTextAbandonedFunc)(NPP npp);
-typedef void (*NPN_MarkedTextSelectionChangedFunc)(NPP npp, NSRange newSel);
-
-typedef struct _NPBrowserTextInputFuncs {
- uint16 size;
- uint16 version;
-
- NPN_MarkedTextAbandonedFunc markedTextAbandoned;
- NPN_MarkedTextSelectionChangedFunc markedTextSelectionChanged;
-} NPBrowserTextInputFuncs;
-
-void NPN_MarkedTextAbandoned(NPP npp);
-void NPN_MarkedTextSelectionChanged(NPP npp, NSRange newSel);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6610666> Revise the Cocoa event model text API
+
+ Add a case statement for NPCocoaEventTextInput.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (handleEventCocoa):
+
2009-03-12 Kevin Ollivier <kevino@theolliviers.com>
wx build fix. Let DerivedSources.make know we want database APIs.
case NPCocoaEventMouseExited:
case NPCocoaEventMouseDragged:
case NPCocoaEventScrollWheel:
+ case NPCocoaEventTextInput:
return 1;
}