Bug 20294 - Move more Frame methods into ScriptController
Summary: Move more Frame methods into ScriptController
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-05 17:47 PDT by Eric Seidel (no email)
Modified: 2008-08-06 03:43 PDT (History)
1 user (show)

See Also:


Attachments
Move more methods from Frame into ScriptController (59.19 KB, patch)
2008-08-05 17:59 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Move more methods from Frame into ScriptController (72.85 KB, patch)
2008-08-05 18:27 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Move more methods from Frame into ScriptController (74.52 KB, patch)
2008-08-06 01:20 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Move more methods from Frame into ScriptController (79.97 KB, patch)
2008-08-06 02:45 PDT, Eric Seidel (no email)
zwarich: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-08-05 17:47:28 PDT
Long ago darin (I think) sorted the methods in Frame.h into comment blocks denoting where they should all go.  A bunch were destined for a future ScriptController... most of them got moved when SC was created.  I've now moved the rest of them!  I also went ahead and cleaned up some of the plugin code at the same time.
Comment 1 Eric Seidel (no email) 2008-08-05 17:59:00 PDT
Created attachment 22670 [details]
Move more methods from Frame into ScriptController

 WebCore/WebCore.NPAPI.exp                         |    3 +-
 WebCore/WebCore.base.exp                          |    6 +-
 WebCore/WebCore.xcodeproj/project.pbxproj         |    4 +
 WebCore/bindings/js/ScriptController.cpp          |  134 +++++++++++++++++++-
 WebCore/bindings/js/ScriptController.h            |   54 ++++++++
 WebCore/bindings/objc/DOM.mm                      |    3 +-
 WebCore/bindings/objc/DOMInternal.mm              |    2 +-
 WebCore/bridge/jni/jni_jsobject.mm                |    2 +-
 WebCore/html/HTMLAppletElement.cpp                |   33 +----
 WebCore/html/HTMLAppletElement.h                  |   11 +--
 WebCore/html/HTMLEmbedElement.cpp                 |   40 ++-----
 WebCore/html/HTMLEmbedElement.h                   |   11 +--
 WebCore/html/HTMLObjectElement.cpp                |   32 +----
 WebCore/html/HTMLObjectElement.h                  |    2 +-
 WebCore/html/HTMLPlugInElement.cpp                |   72 +++++------
 WebCore/html/HTMLPlugInElement.h                  |   12 +-
 WebCore/loader/FrameLoader.cpp                    |   12 +-
 WebCore/page/Frame.cpp                            |  120 ++----------------
 WebCore/page/Frame.h                              |   44 +------
 WebCore/page/FramePrivate.h                       |   42 +------
 WebCore/page/gtk/FrameGtk.cpp                     |   30 -----
 WebCore/page/mac/FrameMac.mm                      |  141 +++------------------
 WebCore/page/qt/FrameQt.cpp                       |   96 --------------
 WebCore/page/win/FrameWin.cpp                     |   48 +-------
 WebKit/mac/Plugins/WebBaseNetscapePluginView.mm   |    5 +-
 WebKit/mac/Plugins/WebPluginController.mm         |    5 +-
 WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm |    6 +-
 WebKit/mac/WebView/WebFrame.mm                    |    2 +-
 WebKit/mac/WebView/WebScriptDebugger.mm           |   25 ++--
 WebKit/mac/WebView/WebView.mm                     |    2 +-
 30 files changed, 328 insertions(+), 671 deletions(-)
Comment 2 Eric Seidel (no email) 2008-08-05 18:27:38 PDT
Created attachment 22671 [details]
Move more methods from Frame into ScriptController

 WebCore/GNUmakefile.am                            |    1 +
 WebCore/WebCore.NPAPI.exp                         |    3 +-
 WebCore/WebCore.base.exp                          |    6 +-
 WebCore/WebCore.pro                               |    1 +
 WebCore/WebCore.vcproj/WebCore.vcproj             |    4 +
 WebCore/WebCore.xcodeproj/project.pbxproj         |    4 +
 WebCore/bindings/js/ScriptController.cpp          |  134 ++++++++++++++++-
 WebCore/bindings/js/ScriptController.h            |   54 +++++++
 WebCore/bindings/js/ScriptControllerGtk.cpp       |   48 ++++++
 WebCore/bindings/js/ScriptControllerMac.mm        |  168 +++++++++++++++++++++
 WebCore/bindings/js/ScriptControllerQt.cpp        |   61 ++++++++
 WebCore/bindings/js/ScriptControllerWin.cpp       |   45 ++++++
 WebCore/bindings/objc/DOM.mm                      |    3 +-
 WebCore/bindings/objc/DOMInternal.mm              |    2 +-
 WebCore/bridge/jni/jni_jsobject.mm                |    2 +-
 WebCore/html/HTMLAppletElement.cpp                |   33 +---
 WebCore/html/HTMLAppletElement.h                  |   11 +--
 WebCore/html/HTMLEmbedElement.cpp                 |   40 +----
 WebCore/html/HTMLEmbedElement.h                   |   11 +--
 WebCore/html/HTMLObjectElement.cpp                |   32 +----
 WebCore/html/HTMLObjectElement.h                  |    2 +-
 WebCore/html/HTMLPlugInElement.cpp                |   72 ++++-----
 WebCore/html/HTMLPlugInElement.h                  |   12 +-
 WebCore/loader/FrameLoader.cpp                    |   12 +-
 WebCore/page/Frame.cpp                            |  120 ++-------------
 WebCore/page/Frame.h                              |   44 +-----
 WebCore/page/FramePrivate.h                       |   42 +-----
 WebCore/page/gtk/FrameGtk.cpp                     |   30 ----
 WebCore/page/mac/FrameMac.mm                      |  141 ++---------------
 WebCore/page/qt/FrameQt.cpp                       |   96 ------------
 WebCore/page/win/FrameWin.cpp                     |   48 +------
 WebKit/mac/Plugins/WebBaseNetscapePluginView.mm   |    5 +-
 WebKit/mac/Plugins/WebPluginController.mm         |    5 +-
 WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm |    6 +-
 WebKit/mac/WebView/WebFrame.mm                    |    2 +-
 WebKit/mac/WebView/WebScriptDebugger.mm           |   25 ++--
 WebKit/mac/WebView/WebView.mm                     |    2 +-
 37 files changed, 656 insertions(+), 671 deletions(-)
Comment 3 Eric Seidel (no email) 2008-08-05 18:32:15 PDT
The first patch I posted would have broken all the non-mac builds.  I think this one has a fair chance of compiling correctly on all platforms... however I wouldn't be surprised if there was something small I missed.

The patch is large... but thankfully it's mostly minus lines! :)
Comment 4 Eric Seidel (no email) 2008-08-06 01:20:57 PDT
Created attachment 22673 [details]
Move more methods from Frame into ScriptController

 WebCore/GNUmakefile.am                            |    1 +
 WebCore/WebCore.NPAPI.exp                         |    3 +-
 WebCore/WebCore.base.exp                          |    7 +-
 WebCore/WebCore.pro                               |    1 +
 WebCore/WebCore.vcproj/WebCore.vcproj             |    4 +
 WebCore/WebCore.xcodeproj/project.pbxproj         |    4 +
 WebCore/bindings/js/ScriptController.cpp          |  136 ++++++++++++++++-
 WebCore/bindings/js/ScriptController.h            |   59 +++++++-
 WebCore/bindings/js/ScriptControllerGtk.cpp       |   48 ++++++
 WebCore/bindings/js/ScriptControllerMac.mm        |  168 +++++++++++++++++++++
 WebCore/bindings/js/ScriptControllerQt.cpp        |   61 ++++++++
 WebCore/bindings/js/ScriptControllerWin.cpp       |   45 ++++++
 WebCore/bindings/objc/DOM.mm                      |    3 +-
 WebCore/bindings/objc/DOMInternal.mm              |    2 +-
 WebCore/bridge/jni/jni_jsobject.mm                |    2 +-
 WebCore/html/HTMLAppletElement.cpp                |   33 +---
 WebCore/html/HTMLAppletElement.h                  |   11 +--
 WebCore/html/HTMLEmbedElement.cpp                 |   40 +----
 WebCore/html/HTMLEmbedElement.h                   |   11 +--
 WebCore/html/HTMLObjectElement.cpp                |   32 +----
 WebCore/html/HTMLObjectElement.h                  |    2 +-
 WebCore/html/HTMLPlugInElement.cpp                |   72 ++++-----
 WebCore/html/HTMLPlugInElement.h                  |   12 +-
 WebCore/loader/FrameLoader.cpp                    |   14 +-
 WebCore/page/Frame.cpp                            |  125 ++--------------
 WebCore/page/Frame.h                              |   47 +------
 WebCore/page/FramePrivate.h                       |   42 +-----
 WebCore/page/gtk/FrameGtk.cpp                     |   30 ----
 WebCore/page/mac/FrameMac.mm                      |  141 ++---------------
 WebCore/page/qt/FrameQt.cpp                       |   96 ------------
 WebCore/page/win/FrameWin.cpp                     |   48 +------
 WebKit/mac/Plugins/WebBaseNetscapePluginView.mm   |    5 +-
 WebKit/mac/Plugins/WebPluginController.mm         |    5 +-
 WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm |    6 +-
 WebKit/mac/WebView/WebFrame.mm                    |    2 +-
 WebKit/mac/WebView/WebScriptDebugger.mm           |   25 ++--
 WebKit/mac/WebView/WebView.mm                     |    2 +-
 37 files changed, 663 insertions(+), 682 deletions(-)
Comment 5 Eric Seidel (no email) 2008-08-06 01:22:20 PDT
I've now added a ChangeLog, fixed an ASSERT and removed a confusing method (Frame::clearScriptController() replacing it with a direct call to ScriptController::clear(), now renamed to ScriptController::clearWindowShell()) which had indirectly caused said ASSERT...
Comment 6 Eric Seidel (no email) 2008-08-06 02:45:12 PDT
Created attachment 22674 [details]
Move more methods from Frame into ScriptController

 WebCore/ChangeLog                                 |   89 +++++++++++
 WebCore/GNUmakefile.am                            |    1 +
 WebCore/WebCore.NPAPI.exp                         |    3 +-
 WebCore/WebCore.base.exp                          |    7 +-
 WebCore/WebCore.pro                               |    1 +
 WebCore/WebCore.vcproj/WebCore.vcproj             |    4 +
 WebCore/WebCore.xcodeproj/project.pbxproj         |    4 +
 WebCore/bindings/js/ScriptController.cpp          |  136 ++++++++++++++++-
 WebCore/bindings/js/ScriptController.h            |   59 +++++++-
 WebCore/bindings/js/ScriptControllerGtk.cpp       |   48 ++++++
 WebCore/bindings/js/ScriptControllerMac.mm        |  168 +++++++++++++++++++++
 WebCore/bindings/js/ScriptControllerQt.cpp        |   61 ++++++++
 WebCore/bindings/js/ScriptControllerWin.cpp       |   45 ++++++
 WebCore/bindings/objc/DOM.mm                      |    3 +-
 WebCore/bindings/objc/DOMInternal.mm              |    2 +-
 WebCore/bridge/jni/jni_jsobject.mm                |    2 +-
 WebCore/html/HTMLAppletElement.cpp                |   33 +---
 WebCore/html/HTMLAppletElement.h                  |   11 +--
 WebCore/html/HTMLEmbedElement.cpp                 |   40 +----
 WebCore/html/HTMLEmbedElement.h                   |   11 +--
 WebCore/html/HTMLObjectElement.cpp                |   32 +----
 WebCore/html/HTMLObjectElement.h                  |    2 +-
 WebCore/html/HTMLPlugInElement.cpp                |   72 ++++-----
 WebCore/html/HTMLPlugInElement.h                  |   12 +-
 WebCore/loader/FrameLoader.cpp                    |   14 +-
 WebCore/page/Frame.cpp                            |  125 ++--------------
 WebCore/page/Frame.h                              |   47 +------
 WebCore/page/FramePrivate.h                       |   42 +-----
 WebCore/page/gtk/FrameGtk.cpp                     |   30 ----
 WebCore/page/mac/FrameMac.mm                      |  141 ++---------------
 WebCore/page/qt/FrameQt.cpp                       |   96 ------------
 WebCore/page/win/FrameWin.cpp                     |   48 +------
 WebKit/mac/ChangeLog                              |   23 +++
 WebKit/mac/Plugins/WebBaseNetscapePluginView.mm   |    5 +-
 WebKit/mac/Plugins/WebPluginController.mm         |    5 +-
 WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm |    6 +-
 WebKit/mac/WebView/WebFrame.mm                    |    2 +-
 WebKit/mac/WebView/WebScriptDebugger.mm           |   25 ++--
 WebKit/mac/WebView/WebView.mm                     |    2 +-
 39 files changed, 775 insertions(+), 682 deletions(-)
Comment 7 Eric Seidel (no email) 2008-08-06 02:45:37 PDT
Comment on attachment 22673 [details]
Move more methods from Frame into ScriptController

Uploading a new one with ChangeLog.  Not sure what happened to the ChangeLog I made before...
Comment 8 Cameron Zwarich (cpst) 2008-08-06 02:59:02 PDT
Comment on attachment 22674 [details]
Move more methods from Frame into ScriptController

r=me
Comment 9 Eric Seidel (no email) 2008-08-06 03:43:43 PDT
Landed. http://trac.webkit.org/changeset/35590