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

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:40:33 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 567f5eef0dd8a7df56d3b9de50991321dbee6199
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue May 6 04:09:16 2003 +0000

            Reviewed by Dave.
    
    	- fixed 3241065 - popcap.com doesn't work in Safari, window.scrollBy fails to work in onLoad
    
    	Make sure to do a layout before accessing any window properties or
    	calling any window functions that require a layout to work
    	properly.
    
            * khtml/ecma/kjs_window.cpp:
            (Window::get):
            (WindowFunc::tryCall):
            (Window::updateLayout):
            * khtml/ecma/kjs_window.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4281 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 83d373b..c45ccaa 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2003-05-05  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Dave.
+
+	- fixed 3241065 - popcap.com doesn't work in Safari, window.scrollBy fails to work in onLoad
+
+	Make sure to do a layout before accessing any window properties or
+	calling any window functions that require a layout to work
+	properly.
+
+        * khtml/ecma/kjs_window.cpp:
+        (Window::get):
+        (WindowFunc::tryCall):
+        (Window::updateLayout):
+        * khtml/ecma/kjs_window.h:
+
 2003-05-05  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3247722. Make sure the grammar accepts properties with
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 83d373b..c45ccaa 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-05-05  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Dave.
+
+	- fixed 3241065 - popcap.com doesn't work in Safari, window.scrollBy fails to work in onLoad
+
+	Make sure to do a layout before accessing any window properties or
+	calling any window functions that require a layout to work
+	properly.
+
+        * khtml/ecma/kjs_window.cpp:
+        (Window::get):
+        (WindowFunc::tryCall):
+        (Window::updateLayout):
+        * khtml/ecma/kjs_window.h:
+
 2003-05-05  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3247722. Make sure the grammar accepts properties with
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index b98d202..aabaeb7 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -33,6 +33,7 @@
 #include <kconfig.h>
 #include <assert.h>
 #include <qstyle.h>
+#include "rendering/render_root.h"
 
 #if APPLE_CHANGES
 #include "KWQLogging.h"
@@ -440,10 +441,12 @@ Value Window::get(ExecState *exec, const Identifier &p) const
     case InnerHeight:
       if (!m_part->view())
         return Undefined();
+      updateLayout();
       return Number(m_part->view()->visibleHeight());
     case InnerWidth:
       if (!m_part->view())
         return Undefined();
+      updateLayout();
       return Number(m_part->view()->visibleWidth());
     case Length:
       return Number(m_part->frames().count());
@@ -485,10 +488,12 @@ Value Window::get(ExecState *exec, const Identifier &p) const
     case PageXOffset:
       if (!m_part->view())
         return Undefined();
+      updateLayout();
       return Number(m_part->view()->contentsX());
     case PageYOffset:
       if (!m_part->view())
         return Undefined();
+      updateLayout();
       return Number(m_part->view()->contentsY());
     case Parent:
       return Value(retrieve(m_part->parentPart() ? m_part->parentPart() : (KHTMLPart*)m_part));
@@ -511,11 +516,13 @@ Value Window::get(ExecState *exec, const Identifier &p) const
     case ScrollX: {
       if (!m_part->view())
         return Undefined();
+      updateLayout();
       return Number(m_part->view()->contentsX());
     }
     case ScrollY: {
       if (!m_part->view())
         return Undefined();
+      updateLayout();
       return Number(m_part->view()->contentsY());
     }
     case Scrollbars:
@@ -1288,11 +1295,13 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
     }
   }
   case Window::ScrollBy:
+    window->updateLayout();
     if(args.size() == 2 && widget)
       widget->scrollBy(args[0].toInt32(exec), args[1].toInt32(exec));
     return Undefined();
   case Window::Scroll:
   case Window::ScrollTo:
+    window->updateLayout();
     if(args.size() == 2 && widget)
       widget->setContentsPos(args[0].toInt32(exec), args[1].toInt32(exec));
     return Undefined();
@@ -1488,6 +1497,21 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
   return Undefined();
 }
 
+void Window::updateLayout() const
+{
+  DOM::DocumentImpl* docimpl = static_cast<DOM::DocumentImpl *>(m_part->document().handle());
+  KHTMLView* v = m_part->view();
+  
+  if ( docimpl ) {
+    docimpl->updateRendering();
+    // Only do a layout if changes have occurred that make it necessary.      
+    if ( v && docimpl->renderer() && docimpl->renderer()->needsLayout() )
+      docimpl->view()->layout();
+  }
+
+}
+
+
 ////////////////////// ScheduledAction ////////////////////////
 
 ScheduledAction::ScheduledAction(Object _func, List _args, bool _singleShot)
diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h
index c71c972..25fde98 100644
--- a/WebCore/khtml/ecma/kjs_window.h
+++ b/WebCore/khtml/ecma/kjs_window.h
@@ -126,6 +126,8 @@ namespace KJS {
     Value getListener(ExecState *exec, int eventId) const;
     void setListener(ExecState *exec, int eventId, Value func);
   private:
+    void updateLayout() const;
+
     QGuardedPtr<KHTMLPart> m_part;
     Screen *screen;
     History *history;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list