Commit 9b4c9743 authored by andersca@apple.com's avatar andersca@apple.com

2008-11-04 Anders Carlsson <andersca@apple.com>

        Reviewed by Kevin Decker.
        
        https://bugs.webkit.org/show_bug.cgi?id=22065
        
        Remove some old, unused plug-in code.
        
        * Plugins/WebBaseNetscapePluginView.h:
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
        (-[WebBaseNetscapePluginView start]):
        (-[WebBaseNetscapePluginView setVariable:value:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c65d3288
2008-11-04 Anders Carlsson <andersca@apple.com>
Reviewed by Kevin Decker.
https://bugs.webkit.org/show_bug.cgi?id=22065
Remove some old, unused plug-in code.
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
(-[WebBaseNetscapePluginView start]):
(-[WebBaseNetscapePluginView setVariable:value:]):
2008-11-04 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt
......
......@@ -99,7 +99,6 @@ typedef struct _NPPluginTextInputFuncs NPPluginTextInputFuncs;
BOOL isStarted;
BOOL inSetWindow;
BOOL hasFocus;
BOOL isTransparent;
BOOL isCompletelyObscured;
BOOL shouldStopSoon;
......
......@@ -333,6 +333,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
#endif
window.type = NPWindowTypeWindow;
window.x = (int32)boundsInWindow.origin.x;
window.y = (int32)boundsInWindow.origin.y;
window.width = static_cast<uint32>(NSWidth(boundsInWindow));
......@@ -662,7 +663,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// Draw green to help debug.
// If we see any green we know something's wrong.
// Note that PaintRect() only works for QuickDraw plugins; otherwise the current QD port is undefined.
if (isDrawingModelQuickDraw(drawingModel) && !isTransparent && eventIsDrawRect) {
if (isDrawingModelQuickDraw(drawingModel) && eventIsDrawRect) {
ForeColor(greenColor);
const ::Rect bigRect = { -10000, -10000, 10000, 10000 };
PaintRect(&bigRect);
......@@ -1180,10 +1181,6 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// Initialize eventModel to an invalid value so that we can detect when the plugin does not specify an event model.
eventModel = (NPEventModel)-1;
// Plug-ins are "windowed" by default. On MacOS, windowed plug-ins share the same window and graphics port as the main
// browser window. Windowless plug-ins are rendered off-screen, then copied into the main browser window.
window.type = NPWindowTypeWindow;
NPError npErr = [self _createPlugin];
if (npErr != NPERR_NO_ERROR) {
LOG_ERROR("NPP_New failed with error: %d", npErr);
......@@ -2567,30 +2564,6 @@ static NPBrowserTextInputFuncs *browserTextInputFuncs()
- (NPError)setVariable:(NPPVariable)variable value:(void *)value
{
switch (variable) {
case NPPVpluginWindowBool:
{
NPWindowType newWindowType = (value ? NPWindowTypeWindow : NPWindowTypeDrawable);
// Redisplay if window type is changing (some drawing models can only have their windows set while updating).
if (newWindowType != window.type)
[self setNeedsDisplay:YES];
window.type = newWindowType;
}
case NPPVpluginTransparentBool:
{
BOOL newTransparent = (value != 0);
// Redisplay if transparency is changing
if (isTransparent != newTransparent)
[self setNeedsDisplay:YES];
isTransparent = newTransparent;
return NPERR_NO_ERROR;
}
case NPPVpluginDrawingModel:
{
// Can only set drawing model inside NPP_New()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment