Get rid of Widget::setBoundsSize
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 17:09:22 +0000 (17:09 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 17:09:22 +0000 (17:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68491

Reviewed by Sam Weinig.

This basically reverts http://trac.webkit.org/changeset/79167 and http://trac.webkit.org/changeset/75897
which were added to make zoom gestures work with WebKit1, but since we don't support zoom gestures in WebKit1
anymore, it's better for code cleanliness to get rid of Widget::setBoundsSize and the associated code. While this
will unfortunately break transformed iframes in WebKit1, but Simon says that it's an acceptable tradeoff.

Source/WebCore:

* WebCore.exp.in:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::open):
* page/FrameView.cpp:
(WebCore::FrameView::create):
* platform/ScrollView.cpp:
(WebCore::ScrollView::visibleContentRect):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
* platform/Widget.cpp:
* platform/Widget.h:
(WebCore::Widget::resize):
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::refresh):
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::visibleContentRect):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::setWidget):
(WebCore::RenderWidget::updateWidgetPosition):
* rendering/RenderWidget.h:

Source/WebKit/mac:

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView updateAndSetWindow]):
* WebView/WebFrameView.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h
Source/WebCore/platform/Widget.cpp
Source/WebCore/platform/Widget.h
Source/WebCore/platform/chromium/PopupContainer.cpp
Source/WebCore/platform/gtk/ScrollViewGtk.cpp
Source/WebCore/platform/mac/WidgetMac.mm
Source/WebCore/rendering/RenderWidget.cpp
Source/WebCore/rendering/RenderWidget.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
Source/WebKit/mac/WebView/WebFrameView.mm

index 1bdc1b9..8edf740 100644 (file)
@@ -1,3 +1,40 @@
+2011-09-22  Anders Carlsson  <andersca@apple.com>
+
+        Get rid of Widget::setBoundsSize
+        https://bugs.webkit.org/show_bug.cgi?id=68491
+
+        Reviewed by Sam Weinig.
+
+        This basically reverts http://trac.webkit.org/changeset/79167 and http://trac.webkit.org/changeset/75897
+        which were added to make zoom gestures work with WebKit1, but since we don't support zoom gestures in WebKit1
+        anymore, it's better for code cleanliness to get rid of Widget::setBoundsSize and the associated code. While this
+        will unfortunately break transformed iframes in WebKit1, but Simon says that it's an acceptable tradeoff.
+
+        * WebCore.exp.in:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::open):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::create):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::visibleContentRect):
+        (WebCore::ScrollView::updateScrollbars):
+        (WebCore::ScrollView::wheelEvent):
+        * platform/ScrollView.h:
+        * platform/Widget.cpp:
+        * platform/Widget.h:
+        (WebCore::Widget::resize):
+        * platform/chromium/PopupContainer.cpp:
+        (WebCore::PopupContainer::refresh):
+        * platform/gtk/ScrollViewGtk.cpp:
+        (WebCore::ScrollView::visibleContentRect):
+        * platform/mac/WidgetMac.mm:
+        (WebCore::Widget::paint):
+        * rendering/RenderWidget.cpp:
+        (WebCore::RenderWidget::setWidgetGeometry):
+        (WebCore::RenderWidget::setWidget):
+        (WebCore::RenderWidget::updateWidgetPosition):
+        * rendering/RenderWidget.h:
+
 2011-09-21  David Hyatt  <hyatt@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=68590
index b0660d5..3f3d1e0 100644 (file)
@@ -825,7 +825,6 @@ __ZN7WebCore6Region9translateERKNS_7IntSizeE
 __ZN7WebCore6RegionC1ERKNS_7IntRectE
 __ZN7WebCore6RegionC1Ev
 __ZN7WebCore6Widget12setFrameRectERKNS_7IntRectE
-__ZN7WebCore6Widget13setBoundsSizeERKNS_7IntSizeE
 __ZN7WebCore6Widget16removeFromParentEv
 __ZN7WebCore6Widget17frameRectsChangedEv
 __ZN7WebCore6Widget17setPlatformWidgetEP6NSView
index 5af67f5..5e4bd2b 100644 (file)
@@ -2061,11 +2061,8 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
     view->setWasScrolledByUser(false);
 
     // Use the current ScrollView's frame rect.
-    if (m_frame->view()) {
-        IntRect rect = m_frame->view()->frameRect();
-        view->setFrameRect(rect);
-        view->setBoundsSize(rect.size());
-    }
+    if (m_frame->view())
+        view->setFrameRect(m_frame->view()->frameRect());
     m_frame->setView(view);
     
     m_frame->setDocument(document);
index f38040b..305c0f8 100644 (file)
@@ -162,7 +162,6 @@ PassRefPtr<FrameView> FrameView::create(Frame* frame, const IntSize& initialSize
 {
     RefPtr<FrameView> view = adoptRef(new FrameView(frame));
     view->Widget::setFrameRect(LayoutRect(view->location(), initialSize));
-    view->setInitialBoundsSize(initialSize);
     view->show();
     return view.release();
 }
index 7a43a6d..6b2082c 100644 (file)
@@ -237,8 +237,8 @@ IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
         && !includeScrollbars ? horizontalScrollbar()->height() : 0;
 
     return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()),
-                   IntSize(max(0, m_boundsSize.width() - verticalScrollbarWidth), 
-                           max(0, m_boundsSize.height() - horizontalScrollbarHeight)));
+                   IntSize(max(0, width() - verticalScrollbarWidth), 
+                           max(0, height() - horizontalScrollbarHeight)));
 }
 #endif
 
@@ -470,7 +470,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
         bool sendContentResizedNotification = false;
         
         IntSize docSize = contentsSize();
-        IntSize frameSize = m_boundsSize;
+        IntSize frameSize = frameRect().size();
 
         if (hScroll == ScrollbarAuto) {
             newHasHorizontalScrollbar = docSize.width() > visibleWidth();
@@ -532,8 +532,8 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
         int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
         IntRect oldRect(m_horizontalScrollbar->frameRect());
         IntRect hBarRect = IntRect(0,
-                                   m_boundsSize.height() - m_horizontalScrollbar->height(),
-                                   m_boundsSize.width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),
+                                   height() - m_horizontalScrollbar->height(),
+                                   width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),
                                    m_horizontalScrollbar->height());
         m_horizontalScrollbar->setFrameRect(hBarRect);
         if (!m_scrollbarsSuppressed && oldRect != m_horizontalScrollbar->frameRect())
@@ -552,10 +552,10 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
         m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
         int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
         IntRect oldRect(m_verticalScrollbar->frameRect());
-        IntRect vBarRect = IntRect(m_boundsSize.width() - m_verticalScrollbar->width(), 
+        IntRect vBarRect = IntRect(width() - m_verticalScrollbar->width(), 
                                    0,
                                    m_verticalScrollbar->width(),
-                                   m_boundsSize.height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));
+                                   height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));
         m_verticalScrollbar->setFrameRect(vBarRect);
         if (!m_scrollbarsSuppressed && oldRect != m_verticalScrollbar->frameRect())
             m_verticalScrollbar->invalidate();
@@ -827,30 +827,6 @@ void ScrollView::setFrameRect(const IntRect& newRect)
     frameRectsChanged();
 }
 
-void ScrollView::setBoundsSize(const IntSize& newSize)
-{
-    if (newSize == m_boundsSize)
-        return;
-
-    Widget::setBoundsSize(newSize);
-    m_boundsSize = newSize;
-
-    if (platformWidget())
-        return;
-
-    updateScrollbars(m_scrollOffset);
-    if (!m_useFixedLayout)
-        contentsResized();
-
-    positionScrollbarLayers();
-}
-
-void ScrollView::setInitialBoundsSize(const IntSize& newSize)
-{
-    ASSERT(m_boundsSize.isZero());
-    m_boundsSize = newSize;
-}
-
 void ScrollView::frameRectsChanged()
 {
     if (platformWidget())
@@ -921,18 +897,18 @@ IntRect ScrollView::scrollCornerRect() const
     if (hasOverlayScrollbars())
         return cornerRect;
 
-    if (m_horizontalScrollbar && m_boundsSize.width() - m_horizontalScrollbar->width() > 0) {
+    if (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) {
         cornerRect.unite(IntRect(m_horizontalScrollbar->width(),
-                                 m_boundsSize.height() - m_horizontalScrollbar->height(),
-                                 m_boundsSize.width() - m_horizontalScrollbar->width(),
+                                 height() - m_horizontalScrollbar->height(),
+                                 width() - m_horizontalScrollbar->width(),
                                  m_horizontalScrollbar->height()));
     }
 
-    if (m_verticalScrollbar && m_boundsSize.height() - m_verticalScrollbar->height() > 0) {
-        cornerRect.unite(IntRect(m_boundsSize.width() - m_verticalScrollbar->width(),
+    if (m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0) {
+        cornerRect.unite(IntRect(width() - m_verticalScrollbar->width(),
                                  m_verticalScrollbar->height(),
                                  m_verticalScrollbar->width(),
-                                 m_boundsSize.height() - m_verticalScrollbar->height()));
+                                 height() - m_verticalScrollbar->height()));
     }
     
     return cornerRect;
@@ -1132,8 +1108,8 @@ bool ScrollView::isPointInScrollbarCorner(const IntPoint& windowPoint)
 
 bool ScrollView::scrollbarCornerPresent() const
 {
-    return (m_horizontalScrollbar && m_boundsSize.width() - m_horizontalScrollbar->width() > 0) ||
-           (m_verticalScrollbar && m_boundsSize.height() - m_verticalScrollbar->height() > 0);
+    return (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0)
+        || (m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0);
 }
 
 IntRect ScrollView::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect& localRect) const
index 3787540..dcce942 100644 (file)
@@ -227,7 +227,6 @@ public:
     
     // Widget override to update our scrollbars and notify our contents of the resize.
     virtual void setFrameRect(const IntRect&);
-    virtual void setBoundsSize(const IntSize&);
 
     // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32).
     Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint);
@@ -302,9 +301,6 @@ protected:
 
     IntRect fixedVisibleContentRect() const { return m_fixedVisibleContentRect; }
 
-    IntSize boundsSize() const { return m_boundsSize; }
-    void setInitialBoundsSize(const IntSize&);
-
     // These functions are used to create/destroy scrollbars.
     void setHasHorizontalScrollbar(bool);
     void setHasVerticalScrollbar(bool);
@@ -363,8 +359,6 @@ private:
 
     bool m_containsScrollableAreaWithOverlayScrollbars;
 
-    IntSize m_boundsSize;
-
     void init();
     void destroy();
 
index 9a980c0..77560ff 100644 (file)
@@ -106,10 +106,6 @@ IntPoint Widget::convertToContainingWindow(const IntPoint& localPoint) const
 }
 
 #if !PLATFORM(MAC)
-void Widget::setBoundsSize(const IntSize&)
-{
-}
-
 IntRect Widget::convertFromRootToContainingWindow(const Widget*, const IntRect& rect)
 {
     return rect;
index 35190cb..21f99c7 100644 (file)
@@ -149,12 +149,11 @@ public:
     IntPoint location() const { return frameRect().location(); }
 
     virtual void setFrameRect(const IntRect&);
-    virtual void setBoundsSize(const IntSize&);
     virtual IntRect frameRect() const;
     IntRect boundsRect() const { return IntRect(0, 0, width(),  height()); }
 
-    void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); setBoundsSize(IntSize(w, h)); }
-    void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); setBoundsSize(s); }
+    void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); }
+    void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); }
     void move(int x, int y) { setFrameRect(IntRect(x, y, width(), height())); }
     void move(const IntPoint& p) { setFrameRect(IntRect(p, size())); }
 
index 73deed3..a0a5a8b 100644 (file)
@@ -409,7 +409,6 @@ void PopupContainer::refresh(const IntRect& targetControlRect)
     location.move(0, targetControlRect.height());
 
     listBox()->setBaseWidth(max(m_originalFrameRect.width() - kBorderSize * 2, 0));
-    setBoundsSize(m_originalFrameRect.size());
 
     listBox()->updateFromElement();
     // Store the original size to check if we need to request the location.
index 91b5bd0..f983583 100644 (file)
@@ -70,8 +70,8 @@ IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
     // scrollbar width should be.
     if (!shouldCreateMainFrameScrollbar(this)) {
         return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()),
-                       IntSize(max(0, m_boundsSize.width() - (verticalScrollbar() && !includeScrollbars ? verticalScrollbar()->width() : 0)),
-                               max(0, m_boundsSize.height() - (horizontalScrollbar() && !includeScrollbars ? horizontalScrollbar()->height() : 0))));
+                       IntSize(max(0, width() - (verticalScrollbar() && !includeScrollbars ? verticalScrollbar()->width() : 0)),
+                               max(0, height() - (horizontalScrollbar() && !includeScrollbars ? horizontalScrollbar()->height() : 0))));
     }
 
     // We don't have a parent, so we are the main frame and thus have
index 790f2b3..1c08bef 100644 (file)
@@ -31,7 +31,6 @@
 #import "Chrome.h"
 #import "Cursor.h"
 #import "Document.h"
-#import "FloatConversion.h"
 #import "Font.h"
 #import "Frame.h"
 #import "GraphicsContext.h"
@@ -185,25 +184,6 @@ void Widget::setFrameRect(const IntRect& rect)
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
-void Widget::setBoundsSize(const IntSize& size)
-{
-    NSSize nsSize = size;
-
-    BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    NSView *outerView = getOuterView();
-    if (!outerView)
-        return;
-
-    // Take a reference to this Widget, because sending messages to outerView can invoke arbitrary
-    // code, which can deref it.
-    RefPtr<Widget> protectedThis(this);
-    if (!NSEqualSizes(nsSize, [outerView bounds].size)) {
-        [outerView setBoundsSize:nsSize];
-        [outerView setNeedsDisplay:NO];
-    }
-    END_BLOCK_OBJC_EXCEPTIONS;
-}
-
 NSView *Widget::getOuterView() const
 {
     NSView *view = platformWidget();
@@ -228,30 +208,11 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
     // code, which can deref it.
     RefPtr<Widget> protectedThis(this);
 
-    IntPoint transformOrigin = frameRect().location();
-    AffineTransform widgetToViewTranform = makeMapBetweenRects(IntRect(IntPoint(), frameRect().size()), [view bounds]);
-
     NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
     if (currentContext == [[view window] graphicsContext] || ![currentContext isDrawingToScreen]) {
         // This is the common case of drawing into a window or printing.
         BEGIN_BLOCK_OBJC_EXCEPTIONS;
-        
-        CGContextRef context = (CGContextRef)[currentContext graphicsPort];
-
-        CGContextSaveGState(context);
-        CGContextTranslateCTM(context, transformOrigin.x(), transformOrigin.y());
-        CGContextScaleCTM(context, narrowPrecisionToFloat(widgetToViewTranform.xScale()), narrowPrecisionToFloat(widgetToViewTranform.yScale()));
-        CGContextTranslateCTM(context, -transformOrigin.x(), -transformOrigin.y());
-
-        IntRect dirtyRect = r;
-        dirtyRect.moveBy(-transformOrigin);
-        if (![view isFlipped])
-            dirtyRect.setY([view bounds].size.height - dirtyRect.maxY());
-
-        [view displayRectIgnoringOpacity:dirtyRect];
-
-        CGContextRestoreGState(context);
-
+        [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]]];
         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
@@ -276,10 +237,6 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
         ASSERT(cgContext == [currentContext graphicsPort]);
         CGContextSaveGState(cgContext);
 
-        CGContextTranslateCTM(cgContext, transformOrigin.x(), transformOrigin.y());
-        CGContextScaleCTM(cgContext, narrowPrecisionToFloat(widgetToViewTranform.xScale()), narrowPrecisionToFloat(widgetToViewTranform.yScale()));
-        CGContextTranslateCTM(cgContext, -transformOrigin.x(), -transformOrigin.y());
-
         NSRect viewFrame = [view frame];
         NSRect viewBounds = [view bounds];
         // Set up the translation and (flipped) orientation of the graphics context. In normal drawing, AppKit does it as it descends down
@@ -287,15 +244,10 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
         CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewFrame.size.height + viewBounds.origin.y);
         CGContextScaleCTM(cgContext, 1, -1);
 
-        IntRect dirtyRect = r;
-        dirtyRect.moveBy(-transformOrigin);
-        if (![view isFlipped])
-            dirtyRect.setY([view bounds].size.height - dirtyRect.maxY());
-
         BEGIN_BLOCK_OBJC_EXCEPTIONS;
         {
             NSGraphicsContext *nsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES];
-            [view displayRectIgnoringOpacity:dirtyRect inContext:nsContext];
+            [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]] inContext:nsContext];
         }
         END_BLOCK_OBJC_EXCEPTIONS;
 
index 784a3bf..7295fe7 100644 (file)
@@ -140,7 +140,7 @@ RenderWidget::~RenderWidget()
     clearWidget();
 }
 
-bool RenderWidget::setWidgetGeometry(const IntRect& frame, const IntSize& boundsSize)
+bool RenderWidget::setWidgetGeometry(const IntRect& frame)
 {
     if (!node())
         return false;
@@ -157,8 +157,6 @@ bool RenderWidget::setWidgetGeometry(const IntRect& frame, const IntSize& bounds
     RenderWidgetProtector protector(this);
     RefPtr<Node> protectedNode(node());
     m_widget->setFrameRect(frame);
-    if (m_widget) // setFrameRect can run arbitrary script, which might clear m_widget.
-        m_widget->setBoundsSize(boundsSize);
     
 #if USE(ACCELERATED_COMPOSITING)
     if (hasLayer() && layer()->isComposited())
@@ -190,9 +188,9 @@ void RenderWidget::setWidget(PassRefPtr<Widget> widget)
                 IntRect absoluteContentBox = IntRect(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox());
                 if (m_widget->isFrameView()) {
                     contentBox.setLocation(absoluteContentBox.location());
-                    setWidgetGeometry(contentBox, contentBox.size());
+                    setWidgetGeometry(contentBox);
                 } else
-                    setWidgetGeometry(absoluteContentBox, contentBox.size());
+                    setWidgetGeometry(absoluteContentBox);
             }
             if (style()->visibility() != VISIBLE)
                 m_widget->hide();
@@ -328,9 +326,9 @@ void RenderWidget::updateWidgetPosition()
     bool boundsChanged;
     if (m_widget->isFrameView()) {
         contentBox.setLocation(absoluteContentBox.location());
-        boundsChanged = setWidgetGeometry(contentBox, contentBox.size());
+        boundsChanged = setWidgetGeometry(contentBox);
     } else
-        boundsChanged = setWidgetGeometry(absoluteContentBox, contentBox.size());
+        boundsChanged = setWidgetGeometry(absoluteContentBox);
     
     // if the frame bounds got changed, or if view needs layout (possibly indicating
     // content size is wrong) we have to do a layout to set the right widget size
index 63f6b9a..3f2062c 100644 (file)
@@ -69,7 +69,7 @@ private:
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
     virtual void setOverlapTestResult(bool);
 
-    bool setWidgetGeometry(const IntRect&, const IntSize&);
+    bool setWidgetGeometry(const IntRect&);
 
     RefPtr<Widget> m_widget;
     FrameView* m_frameView;
index 7757792..27d4e20 100644 (file)
@@ -1,3 +1,19 @@
+2011-09-22  Anders Carlsson  <andersca@apple.com>
+
+        Get rid of Widget::setBoundsSize
+        https://bugs.webkit.org/show_bug.cgi?id=68491
+
+        Reviewed by Sam Weinig.
+
+        This basically reverts http://trac.webkit.org/changeset/79167 and http://trac.webkit.org/changeset/75897
+        which were added to make zoom gestures work with WebKit1, but since we don't support zoom gestures in WebKit1
+        anymore, it's better for code cleanliness to get rid of Widget::setBoundsSize and the associated code. While this
+        will unfortunately break transformed iframes in WebKit1, but Simon says that it's an acceptable tradeoff.
+
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (-[WebHostedNetscapePluginView updateAndSetWindow]):
+        * WebView/WebFrameView.mm:
+
 2011-09-19  Jer Noble  <jer.noble@apple.com>
 
         Add settings to control the availability of the Web Audio API to WebKit and WebKit2.
index 28b3456..78fe66f 100644 (file)
@@ -215,23 +215,6 @@ extern "C" {
     _previousSize = boundsInWindow.size;
     
     _proxy->resize(boundsInWindow, visibleRectInWindow);
-
-    CGRect bounds = NSRectToCGRect([self bounds]);
-    CGRect frame = NSRectToCGRect([self frame]);
-    
-    // We're not scaled, or in a subframe
-    CATransform3D scaleTransform = CATransform3DIdentity;
-    if (CGSizeEqualToSize(bounds.size, frame.size)) {
-        // We're in a subframe. Backing store is boundsInWindow.size.
-        if (boundsInWindow.size.width && boundsInWindow.size.height)
-            scaleTransform = CATransform3DMakeScale(frame.size.width / boundsInWindow.size.width, frame.size.height / boundsInWindow.size.height, 1);
-    } else {
-        // We're in the main frame with scaling. Need to mimic the frame/bounds scaling on Widgets.
-        if (frame.size.width && frame.size.height)
-            scaleTransform = CATransform3DMakeScale(bounds.size.width / frame.size.width, bounds.size.height / frame.size.height, 1);
-    }
-
-    _pluginLayer.get().sublayerTransform = scaleTransform;
 }
 
 - (void)windowFocusChanged:(BOOL)hasFocus
index 1df1fab..cb8abf4 100644 (file)
@@ -510,12 +510,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     [super setFrameSize:size];
 }
 
-- (void)setBoundsSize:(NSSize)size
-{
-    [super setBoundsSize:size];
-    [[self _scrollView] setFrameSize:size];
-}
-
 - (void)viewDidMoveToWindow
 {
     // See WebFrameLoaderClient::provisionalLoadStarted.