Diff
Modified: trunk/Source/WebCore/ChangeLog (156920 => 156921)
--- trunk/Source/WebCore/ChangeLog 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebCore/ChangeLog 2013-10-04 22:46:15 UTC (rev 156921)
@@ -1,3 +1,18 @@
+2013-10-04 Anders Carlsson <[email protected]>
+
+ Remove some unneeded code from WidgetMac
+ https://bugs.webkit.org/show_bug.cgi?id=122355
+
+ Reviewed by Dan Bernstein.
+
+ Remove code to manage the visible rect, it's not needed anymore.
+
+ * platform/Widget.h:
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::~Widget):
+ (WebCore::Widget::setFrameRect):
+ (WebCore::Widget::setPlatformWidget):
+
2013-10-04 Daniel Bates <[email protected]>
[iOS] Upstream disk image cache
Modified: trunk/Source/WebCore/platform/Widget.h (156920 => 156921)
--- trunk/Source/WebCore/platform/Widget.h 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebCore/platform/Widget.h 2013-10-04 22:46:15 UTC (rev 156921)
@@ -84,7 +84,6 @@
class GraphicsContext;
class PlatformMouseEvent;
class ScrollView;
-class WidgetPrivate;
enum WidgetNotification { WillPaintFlattened, DidPaintFlattened };
@@ -229,10 +228,6 @@
IntRect m_frame; // Not used when a native widget exists.
-#if PLATFORM(MAC)
- WidgetPrivate* m_data;
-#endif
-
#if PLATFORM(EFL)
Evas_Object* m_evasObject;
#endif
Modified: trunk/Source/WebCore/platform/mac/WidgetMac.mm (156920 => 156921)
--- trunk/Source/WebCore/platform/mac/WidgetMac.mm 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebCore/platform/mac/WidgetMac.mm 2013-10-04 22:46:15 UTC (rev 156921)
@@ -59,16 +59,6 @@
namespace WebCore {
-class WidgetPrivate {
-public:
- WidgetPrivate()
- : previousVisibleRect(NSZeroRect)
- {
- }
-
- NSRect previousVisibleRect;
-};
-
static void safeRemoveFromSuperview(NSView *view)
{
// If the the view is the first responder, then set the window's first responder to nil so
@@ -86,14 +76,12 @@
}
Widget::Widget(NSView *view)
- : m_data(new WidgetPrivate)
{
init(view);
}
Widget::~Widget()
{
- delete m_data;
}
// FIXME: Should move this to Chrome; bad layering that this knows about Frame.
@@ -165,6 +153,7 @@
m_frame = rect;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
NSView *outerView = getOuterView();
if (!outerView)
return;
@@ -173,15 +162,12 @@
// code, which can deref it.
Ref<Widget> protect(*this);
- NSRect visibleRect = [outerView visibleRect];
- NSRect f = rect;
- if (!NSEqualRects(f, [outerView frame])) {
- [outerView setFrame:f];
- [outerView setNeedsDisplay:NO];
- } else if (!NSEqualRects(visibleRect, m_data->previousVisibleRect) && [outerView respondsToSelector:@selector(visibleRectDidChange)])
- [outerView visibleRectDidChange];
+ NSRect frame = rect;
+ if (!NSEqualRects(frame, outerView.frame)) {
+ outerView.frame = frame;
+ outerView.needsDisplay = NO;
+ }
- m_data->previousVisibleRect = visibleRect;
END_BLOCK_OBJC_EXCEPTIONS;
}
@@ -346,7 +332,6 @@
return;
m_widget = widget;
- m_data->previousVisibleRect = NSZeroRect;
}
} // namespace WebCore
Modified: trunk/Source/WebKit/mac/ChangeLog (156920 => 156921)
--- trunk/Source/WebKit/mac/ChangeLog 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-10-04 22:46:15 UTC (rev 156921)
@@ -1,3 +1,16 @@
+2013-10-04 Anders Carlsson <[email protected]>
+
+ Remove some unneeded code from WidgetMac
+ https://bugs.webkit.org/show_bug.cgi?id=122355
+
+ Reviewed by Dan Bernstein.
+
+ Remove code to handle the visible rect changing, it's not needed anymore since we always put Netscape plug-ins into their own layers now.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+
2013-10-04 Daniel Bates <[email protected]>
[iOS] Upstream disk image cache
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm (156920 => 156921)
--- trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm 2013-10-04 22:46:15 UTC (rev 156921)
@@ -446,12 +446,6 @@
[self invalidatePluginContentRect:[self bounds]];
}
-- (void)visibleRectDidChange
-{
- [super visibleRectDidChange];
- WKSyncSurfaceToView(self);
-}
-
- (void)drawRect:(NSRect)rect
{
if (_cachedSnapshot) {
Modified: trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h (156920 => 156921)
--- trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h 2013-10-04 22:46:15 UTC (rev 156921)
@@ -46,11 +46,6 @@
class HTMLPlugInElement;
}
-// Also declared in WebCore/WidgetMac.mm
-@interface NSView (Widget)
-- (void)visibleRectDidChange;
-@end
-
@interface WebBaseNetscapePluginView : NSView
{
RetainPtr<WebNetscapePluginPackage> _pluginPackage;
Modified: trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm (156920 => 156921)
--- trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm 2013-10-04 22:45:37 UTC (rev 156920)
+++ trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm 2013-10-04 22:46:15 UTC (rev 156921)
@@ -304,11 +304,6 @@
return NSIntersectionRect([self convertRect:[self _windowClipRect] fromView:nil], [super visibleRect]);
}
-- (void)visibleRectDidChange
-{
- [self renewGState];
-}
-
- (BOOL)acceptsFirstResponder
{
return YES;