summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/mac/WidgetMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/mac/WidgetMac.mm')
-rw-r--r--WebCore/platform/mac/WidgetMac.mm62
1 files changed, 6 insertions, 56 deletions
diff --git a/WebCore/platform/mac/WidgetMac.mm b/WebCore/platform/mac/WidgetMac.mm
index ebb47dc..e473053 100644
--- a/WebCore/platform/mac/WidgetMac.mm
+++ b/WebCore/platform/mac/WidgetMac.mm
@@ -31,12 +31,14 @@
#endif
#import "BlockExceptions.h"
+#import "Chrome.h"
#import "Cursor.h"
#import "Document.h"
#import "Font.h"
#import "FoundationExtras.h"
#import "Frame.h"
#import "GraphicsContext.h"
+#import "NotImplemented.h"
#import "Page.h"
#import "PlatformMouseEvent.h"
#import "ScrollView.h"
@@ -44,8 +46,6 @@
#import "WebCoreView.h"
#import <wtf/RetainPtr.h>
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
@interface NSWindow (WebWindowDetails)
- (BOOL)_needsToResetDragMargins;
- (void)_setNeedsToResetDragMargins:(BOOL)needs;
@@ -56,12 +56,8 @@
- (void)webPlugInSetIsSelected:(BOOL)isSelected;
@end
-#endif
-
namespace WebCore {
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
class WidgetPrivate {
public:
bool mustStayInWindow;
@@ -163,6 +159,9 @@ void Widget::setFrameRect(const IntRect& rect)
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSView *v = getOuterView();
+ if (!v)
+ return;
+
NSRect f = rect;
if (!NSEqualRects(f, [v frame])) {
[v setFrame:f];
@@ -198,7 +197,7 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
END_BLOCK_OBJC_EXCEPTIONS;
} else {
// This is the case of drawing into a bitmap context other than a window backing store. It gets hit beneath
- // -cacheDisplayInRect:toBitmapImageRep:.
+ // -cacheDisplayInRect:toBitmapImageRep:, and when painting into compositing layers.
// Transparent subframes are in fact implemented with scroll views that return YES from -drawsBackground (whenever the WebView
// itself is in drawsBackground mode). In the normal drawing code path, the scroll views are never asked to draw the background,
@@ -347,54 +346,5 @@ void Widget::retainPlatformWidget()
HardRetain(m_widget);
}
-#else // ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
-Widget::Widget(PlatformWidget widget)
-{
- init(widget);
-}
-
-Widget::~Widget()
-{
- ASSERT(!parent());
-}
-
-void Widget::show()
-{
-}
-
-void Widget::hide()
-{
-}
-
-void Widget::setCursor(const Cursor&)
-{
- notImplemented();
-}
-
-void Widget::paint(GraphicsContext*, const IntRect&)
-{
-}
-
-void Widget::setFocus()
-{
-}
-
-void Widget::setIsSelected(bool)
-{
-}
-
-IntRect Widget::frameRect() const
-{
- return m_frame;
-}
-
-void Widget::setFrameRect(const IntRect& rect)
-{
- m_frame = rect;
-}
-
-#endif
-
} // namespace WebCore