Commit e618cf50 authored by mjs@apple.com's avatar mjs@apple.com
Browse files

2008-11-03 Maciej Stachowiak <mjs@apple.com>

        Reviewed by Kevin Decker.
        
        - fix release build (and unitialized variable for CG drawing model!)

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): initialize portState in all code paths



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5777147d
2008-11-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Kevin Decker.
- fix release build (and unitialized variable for CG drawing model!)
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): initialize portState in all code paths
2008-11-03 Kevin Decker <kdecker@apple.com>
Reviewed by Anders Carlsson.
......
......@@ -640,18 +640,14 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// Can only send drawRect (updateEvt) to CoreGraphics plugins when actually drawing
ASSERT((drawingModel != NPDrawingModelCoreGraphics) || !eventIsDrawRect || [NSView focusView] == self);
PortState portState;
PortState portState = NULL;
if (drawingModel == NPDrawingModelCoreAnimation) {
portState = NULL;
} else {
if ((drawingModel == NPDrawingModelQuickDraw) || eventIsDrawRect) {
// In CoreGraphics mode, the port state only needs to be saved/set when redrawing the plug-in view.
// The plug-in is not allowed to draw at any other time.
portState = [self saveAndSetNewPortStateForUpdate:eventIsDrawRect];
// We may have changed the window, so inform the plug-in.
[self setWindowIfNecessary];
}
if ((drawingModel == NPDrawingModelQuickDraw) || (drawingModel != NPDrawingModelCoreAnimation && eventIsDrawRect)) {
// In CoreGraphics mode, the port state only needs to be saved/set when redrawing the plug-in view.
// The plug-in is not allowed to draw at any other time.
portState = [self saveAndSetNewPortStateForUpdate:eventIsDrawRect];
// We may have changed the window, so inform the plug-in.
[self setWindowIfNecessary];
}
#if !defined(NDEBUG) && !defined(NP_NO_QUICKDRAW)
......
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