[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:21:57 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9c20f99c1fcbd416057ed3b8501b8ee36927ff64
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 13 19:36:56 2004 +0000

    	Fix for 3526710, applets need to have the correct initial size after a layout has been done, since our
    	Java applets can't yet resize.
    
            Reviewed by john
    
            * khtml/rendering/render_applet.cpp:
            (RenderApplet::createWidgetIfNecessary):
            (RenderApplet::layout):
            (RenderEmptyApplet::layout):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5895 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4350cea..53027b1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2004-01-13  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3526710, applets need to have the correct initial size after a layout has been done, since our
+	Java applets can't yet resize.
+	
+        Reviewed by john
+
+        * khtml/rendering/render_applet.cpp:
+        (RenderApplet::createWidgetIfNecessary):
+        (RenderApplet::layout):
+        (RenderEmptyApplet::layout):
+
 === Safari-121 ===
 
 2004-01-11  Darin Adler  <darin at apple.com>
diff --git a/WebCore/khtml/rendering/render_applet.cpp b/WebCore/khtml/rendering/render_applet.cpp
index 06094cf..c030aab 100644
--- a/WebCore/khtml/rendering/render_applet.cpp
+++ b/WebCore/khtml/rendering/render_applet.cpp
@@ -93,7 +93,8 @@ int RenderApplet::intrinsicHeight() const
 void RenderApplet::createWidgetIfNecessary()
 {
     if (!m_widget) {
-        QSize size = QSize(style()->width().value, style()->height().value);        
+        QSize size = QSize(m_width - borderLeft() - borderRight() - paddingLeft() - paddingRight(),
+                           m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom());        
     
         NodeImpl *child = element()->firstChild();
         while (child) {
@@ -120,15 +121,9 @@ void RenderApplet::layout()
 
     KJavaAppletWidget *tmp = static_cast<KJavaAppletWidget*>(m_widget);
 #if APPLE_CHANGES
-    // Applet QWidget get creates lazily upon first layout.
-    if (!tmp) {
+    // The applet's QWidget gets created lazily upon first layout.
+    if (!tmp)
         createWidgetIfNecessary();
-    }
-    else {
-        m_widget->setFrameGeometry(QRect(xPos(), yPos(),
-                                   m_width-marginLeft()-marginRight()-paddingLeft()-paddingRight(),
-                                   m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom()));
-    }
 #else 
     if ( tmp ) {
         NodeImpl *child = element()->firstChild();
@@ -143,8 +138,8 @@ void RenderApplet::layout()
             child = child->nextSibling();
         }
         //kdDebug(6100) << "setting applet widget to size: " << m_width << ", " << m_height << endl;
-        m_widget->resize(m_width-marginLeft()-marginRight()-paddingLeft()-paddingRight(),
-                         m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom());
+        m_widget->resize(m_width - borderLeft() - borderRight() - paddingLeft() - paddingRight(),
+                         m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom());
         tmp->showApplet();
     }
 #endif
@@ -211,13 +206,16 @@ void RenderEmptyApplet::layout()
     calcWidth();
     calcHeight();
 
+    // updateWidgetPositions will size the widget, so we don't need to do that here.
+#if !APPLE_CHANGES
     if(m_widget)
     {
         //kdDebug(6100) << "RenderEmptyApplet::layout, m_width = " << m_width << ", m_height = " << m_height << endl;
-        m_widget->resize(m_width-marginLeft()-marginRight()-paddingLeft()-paddingRight(),
-                         m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom());
+        m_widget->resize(m_width-borderLeft()-borderRight()-paddingLeft()-paddingRight(),
+                         m_height-borderTop()-borderBottom()-paddingTop()-paddingBottom());
     }
-
+#endif
+    
     setNeedsLayout(false);
 }
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list