Changeset 27161 in webkit


Ignore:
Timestamp:
Oct 27, 2007 7:11:55 PM (16 years ago)
Author:
weinig
Message:

WebCore:

Reviewed by Adam Roben.

Fix http://bugs.webkit.org/show_bug.cgi?id=14953
Implement window.console in WebCore

  • Adds a window.console object that has 4 methods (log, info, warn, and error) that send messages to the Chrome. This moves functionality that was in the app down into WebCore.
  • DerivedSources.make:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/CodeGeneratorJS.pm: Add extended attribute to mark attributes as [Replacable] which indicates they can overridden when set.
  • page/Chrome.cpp: (WebCore::Chrome::addMessageToConsole): Allow all messages to go up to the ChromeClient.
  • page/Console.cpp: Added. (WebCore::Console::Console): (WebCore::Console::disconnectFrame): (WebCore::Console::error): (WebCore::Console::info): (WebCore::Console::log): (WebCore::Console::warn):
  • page/Console.h: Added.
  • page/Console.idl: Added.
  • page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::console):
  • page/DOMWindow.h:
  • page/DOMWindow.idl:

LayoutTests:

Reviewed by Adam Roben.

Update tests for http://bugs.webkit.org/show_bug.cgi?id=14953
Implement window.console in WebCore

  • fast/dom/Window/window-properties-expected.txt:
  • http/tests/security/cross-frame-access-put-expected.txt:
Location:
trunk
Files:
3 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r27160 r27161  
     12007-10-27  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Update tests for http://bugs.webkit.org/show_bug.cgi?id=14953
     6        Implement window.console in WebCore
     7
     8        * fast/dom/Window/window-properties-expected.txt:
     9        * http/tests/security/cross-frame-access-put-expected.txt:
     10
    1112007-10-27  Matt Lilek  <webkit@mattlilek.com>
    212
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r26805 r27161  
    11711171window.closed [boolean]
    11721172window.confirm [function]
     1173window.console [object Console]
     1174window.console.error [function]
     1175window.console.info [function]
     1176window.console.log [function]
     1177window.console.warn [function]
    11731178window.crypto [undefined]
    11741179window.defaultStatus [string]
  • trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt

    r24743 r27161  
    414414ALERT: PASS: window.clientInformation should be '[object Navigator]' and is.
    415415ALERT: PASS: window.closed should be 'false' and is.
    416 ALERT: PASS: window.console should be '[object HTMLPreElement]' and is.
     416ALERT: PASS: window.console should be '[object Console]' and is.
    417417ALERT: PASS: window.crypto should be 'undefined' and is.
    418418ALERT: PASS: window.defaultStatus should be '' and is.
  • trunk/WebCore/ChangeLog

    r27158 r27161  
     12007-10-27  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Fix http://bugs.webkit.org/show_bug.cgi?id=14953
     6        Implement window.console in WebCore
     7
     8        - Adds a window.console object that has 4 methods (log, info, warn, and error)
     9          that send messages to the Chrome.  This moves functionality that was in the
     10          app down into WebCore.
     11
     12        * DerivedSources.make:
     13        * WebCore.pro:
     14        * WebCore.vcproj/WebCore.vcproj:
     15        * WebCore.xcodeproj/project.pbxproj:
     16        * bindings/scripts/CodeGeneratorJS.pm: Add extended attribute
     17        to mark attributes as [Replacable] which indicates they can
     18        overridden when set.
     19        * page/Chrome.cpp:
     20        (WebCore::Chrome::addMessageToConsole): Allow all messages to go
     21        up to the ChromeClient.
     22        * page/Console.cpp: Added.
     23        (WebCore::Console::Console):
     24        (WebCore::Console::disconnectFrame):
     25        (WebCore::Console::error):
     26        (WebCore::Console::info):
     27        (WebCore::Console::log):
     28        (WebCore::Console::warn):
     29        * page/Console.h: Added.
     30        * page/Console.idl: Added.
     31        * page/DOMWindow.cpp:
     32        (WebCore::DOMWindow::clear):
     33        (WebCore::DOMWindow::console):
     34        * page/DOMWindow.h:
     35        * page/DOMWindow.idl:
     36
    1372007-10-27  Eric Seidel  <eric@webkit.org>
    238
  • trunk/WebCore/DerivedSources.make

    r26916 r27161  
    328328    JSCharacterData.h \
    329329    JSComment.h \
     330    JSConsole.h \
    330331    JSCounter.h \
    331332    JSCSSStyleDeclaration.h \
  • trunk/WebCore/WebCore.pro

    r27145 r27161  
    294294    html/HTMLUListElement.idl \
    295295    page/BarInfo.idl \
     296    page/Console.idl \
    296297    page/DOMSelection.idl \
    297298    page/DOMWindow.idl \
     
    606607    page/BarInfo.cpp \
    607608    page/Chrome.cpp \
     609    page/Console.cpp \
    608610    page/ContextMenuController.cpp \
    609611    page/DOMSelection.cpp \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r27145 r27161  
    410410                        </File>
    411411                        <File
     412                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSConsole.cpp"
     413                                >
     414                        </File>
     415                        <File
     416                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSConsole.h"
     417                                >
     418                        </File>
     419                        <File
    412420                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSCounter.cpp"
    413421                                >
     
    25012509                        <File
    25022510                                RelativePath="..\page\ChromeClient.h"
     2511                                >
     2512                        </File>
     2513                        <File
     2514                                RelativePath="..\page\Console.cpp"
     2515                                >
     2516                        </File>
     2517                        <File
     2518                                RelativePath="..\page\Console.h"
    25032519                                >
    25042520                        </File>
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r27145 r27161  
    32993299                BC06EE050BFD71AA00856E9D /* JSHTMLTableElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06EE030BFD71AA00856E9D /* JSHTMLTableElement.h */; };
    33003300                BC073BAA0C399B1F000F5979 /* FloatConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = BC073BA90C399B1F000F5979 /* FloatConversion.h */; };
     3301                BC0B36A40CD3C67C00AC7EB5 /* Console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0B36A10CD3C67C00AC7EB5 /* Console.cpp */; };
     3302                BC0B36A50CD3C67C00AC7EB5 /* Console.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0B36A20CD3C67C00AC7EB5 /* Console.h */; };
     3303                BC0B36A60CD3C67C00AC7EB5 /* Console.idl in Resources */ = {isa = PBXBuildFile; fileRef = BC0B36A30CD3C67C00AC7EB5 /* Console.idl */; };
    33013304                BC124EE70C2641CD009E2349 /* BarInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC124EE40C2641CD009E2349 /* BarInfo.cpp */; };
    33023305                BC124EE80C2641CD009E2349 /* BarInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BC124EE50C2641CD009E2349 /* BarInfo.h */; };
     
    34203423                BC94D1570C275CAB006BC617 /* GlobalHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = BC94D1560C275CAB006BC617 /* GlobalHistory.h */; };
    34213424                BC94D1590C275CB6006BC617 /* GlobalHistoryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC94D1580C275CB6006BC617 /* GlobalHistoryMac.mm */; };
     3425                BC98543D0CD3D98B00069BC1 /* JSConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */; };
     3426                BC98543E0CD3D98C00069BC1 /* JSConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = BC98543C0CD3D98B00069BC1 /* JSConsole.h */; };
    34223427                BC98A27D0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */; };
    34233428                BC9ADD230CC4032600098C4C /* CSSTransformValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9ADD220CC4032600098C4C /* CSSTransformValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    71937198                BC06F24C06D18A7E004A6FA3 /* XSLTProcessor.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = XSLTProcessor.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    71947199                BC073BA90C399B1F000F5979 /* FloatConversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatConversion.h; sourceTree = "<group>"; };
     7200                BC0B36A10CD3C67C00AC7EB5 /* Console.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Console.cpp; sourceTree = "<group>"; };
     7201                BC0B36A20CD3C67C00AC7EB5 /* Console.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Console.h; sourceTree = "<group>"; };
     7202                BC0B36A30CD3C67C00AC7EB5 /* Console.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Console.idl; sourceTree = "<group>"; };
    71957203                BC124EE40C2641CD009E2349 /* BarInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BarInfo.cpp; sourceTree = "<group>"; };
    71967204                BC124EE50C2641CD009E2349 /* BarInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BarInfo.h; sourceTree = "<group>"; };
     
    73197327                BC94D1560C275CAB006BC617 /* GlobalHistory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalHistory.h; sourceTree = "<group>"; };
    73207328                BC94D1580C275CB6006BC617 /* GlobalHistoryMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GlobalHistoryMac.mm; sourceTree = "<group>"; };
     7329                BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsole.cpp; sourceTree = "<group>"; };
     7330                BC98543C0CD3D98B00069BC1 /* JSConsole.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSConsole.h; sourceTree = "<group>"; };
    73217331                BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetCustom.cpp; sourceTree = "<group>"; };
    73227332                BC9ADD220CC4032600098C4C /* CSSTransformValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSTransformValue.h; sourceTree = "<group>"; };
     
    76897699                        isa = PBXGroup;
    76907700                        children = (
     7701                                A83B79100CCB001B000B0825 /* Core */,
    76917702                                A83B790E0CCAFF97000B0825 /* CSS */,
    7692                                 A83B79100CCB001B000B0825 /* DOM */,
    76937703                                A83B79120CCB003F000B0825 /* Events */,
    76947704                                A83B79080CCAFF2B000B0825 /* HTML */,
    7695                                 BC124EFD0C26447A009E2349 /* JSBarInfo.cpp */,
    7696                                 BC124EFE0C26447A009E2349 /* JSBarInfo.h */,
    7697                                 BC94D14C0C275C68006BC617 /* JSHistory.cpp */,
    7698                                 BC94D14D0C275C68006BC617 /* JSHistory.h */,
    7699                                 BCFE2F0F0C1B58370020235F /* JSRect.cpp */,
    7700                                 BCFE2F100C1B58370020235F /* JSRect.h */,
    7701                                 BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
    7702                                 BCEC01C10C274DDD009F4EC9 /* JSScreen.h */,
    7703                                 A83B79220CCB00F0000B0825 /* XML */,
    7704                                 656581D909D1508D000E61D7 /* JSXSLTProcessor.lut.h */,
     7705                                BC9854460CD3DA5F00069BC1 /* Ranges */,
    77057706                                A83B79150CCB0078000B0825 /* Storage */,
    77067707                                A83B790A0CCAFF47000B0825 /* SVG */,
     7708                                BC9854530CD3DA8F00069BC1 /* Traversal */,
     7709                                BC9854430CD3D9D000069BC1 /* Window */,
     7710                                A83B79220CCB00F0000B0825 /* XML */,
    77077711                                A83B790C0CCAFF83000B0825 /* XPath */,
    77087712                        );
     
    80298033                                14D823500AF92A790004F057 /* Chrome.h */,
    80308034                                14D824060AF93AEB0004F057 /* ChromeClient.h */,
     8035                                BC0B36A10CD3C67C00AC7EB5 /* Console.cpp */,
     8036                                BC0B36A20CD3C67C00AC7EB5 /* Console.h */,
     8037                                BC0B36A30CD3C67C00AC7EB5 /* Console.idl */,
    80318038                                065AD4F20B0C2EDA005A2B1D /* ContextMenuClient.h */,
    80328039                                065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */,
     
    1006010067                                BC3C39B40C0D3D8D005F4D7A /* JSMediaList.cpp */,
    1006110068                                BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */,
     10069                                BCFE2F0F0C1B58370020235F /* JSRect.cpp */,
     10070                                BCFE2F100C1B58370020235F /* JSRect.h */,
    1006210071                                BCE013980C0BEF180043860A /* JSStyleSheet.cpp */,
    1006310072                                BCE013990C0BEF180043860A /* JSStyleSheet.h */,
     
    1006810077                        sourceTree = "<group>";
    1006910078                };
    10070                 A83B79100CCB001B000B0825 /* DOM */ = {
     10079                A83B79100CCB001B000B0825 /* Core */ = {
    1007110080                        isa = PBXGroup;
    1007210081                        children = (
     
    1008710096                                65DF31E309D1CC60000BE325 /* JSDOMImplementation.cpp */,
    1008810097                                65DF31E409D1CC60000BE325 /* JSDOMImplementation.h */,
    10089                                 1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */,
    10090                                 1ACE53DE0A8D18810022947D /* JSDOMParser.h */,
    10091                                 BC5A86B30C3367E800EEA649 /* JSDOMSelection.cpp */,
    10092                                 BC5A86B40C3367E800EEA649 /* JSDOMSelection.h */,
    10093                                 1403BA0B09EB18C700797C7F /* JSDOMWindow.cpp */,
    10094                                 1403BA0E09EB18F800797C7F /* JSDOMWindow.h */,
    1009510098                                65DF31E509D1CC60000BE325 /* JSElement.cpp */,
    1009610099                                65DF31E609D1CC60000BE325 /* JSElement.h */,
     
    1010310106                                14DC0D3509FED073007B0235 /* JSNode.cpp */,
    1010410107                                14DC0D3609FED073007B0235 /* JSNode.h */,
    10105                                 14115B7009F84CD600CA4FC1 /* JSNodeFilter.cpp */,
    10106                                 14115B7109F84CD600CA4FC1 /* JSNodeFilter.h */,
    10107                                 1A750D8B0A90E521000FF215 /* JSNodeIterator.cpp */,
    10108                                 1A750D8C0A90E521000FF215 /* JSNodeIterator.h */,
    1010910108                                BCD9C2BE0C17B69E005C90A2 /* JSNodeList.cpp */,
    1011010109                                BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */,
     
    1011310112                                65DF31EB09D1CC60000BE325 /* JSProcessingInstruction.cpp */,
    1011410113                                65DF31EC09D1CC60000BE325 /* JSProcessingInstruction.h */,
    10115                                 65DF31ED09D1CC60000BE325 /* JSRange.cpp */,
    10116                                 65DF31EE09D1CC60000BE325 /* JSRange.h */,
    10117                                 D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */,
    10118                                 D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */,
    1011910114                                65DF31EF09D1CC60000BE325 /* JSText.cpp */,
    1012010115                                65DF31F009D1CC60000BE325 /* JSText.h */,
    10121                                 1A750D5A0A90DEE1000FF215 /* JSTreeWalker.cpp */,
    10122                                 1A750D5B0A90DEE1000FF215 /* JSTreeWalker.h */,
    1012310116                        );
    10124                         name = DOM;
     10117                        name = Core;
    1012510118                        sourceTree = "<group>";
    1012610119                };
     
    1016810161                        isa = PBXGroup;
    1016910162                        children = (
     10163                                1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */,
     10164                                1ACE53DE0A8D18810022947D /* JSDOMParser.h */,
    1017010165                                656581D709D1508D000E61D7 /* JSXMLHttpRequest.lut.h */,
    1017110166                                1ACE53F40A8D19470022947D /* JSXMLSerializer.cpp */,
    1017210167                                1ACE53F50A8D19470022947D /* JSXMLSerializer.h */,
     10168                                656581D909D1508D000E61D7 /* JSXSLTProcessor.lut.h */,
    1017310169                        );
    1017410170                        name = XML;
     
    1103711033                        );
    1103811034                        name = Custom;
     11035                        sourceTree = "<group>";
     11036                };
     11037                BC9854430CD3D9D000069BC1 /* Window */ = {
     11038                        isa = PBXGroup;
     11039                        children = (
     11040                                BC5A86B30C3367E800EEA649 /* JSDOMSelection.cpp */,
     11041                                BC5A86B40C3367E800EEA649 /* JSDOMSelection.h */,
     11042                                1403BA0B09EB18C700797C7F /* JSDOMWindow.cpp */,
     11043                                1403BA0E09EB18F800797C7F /* JSDOMWindow.h */,
     11044                                BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */,
     11045                                BC98543C0CD3D98B00069BC1 /* JSConsole.h */,
     11046                                BC124EFD0C26447A009E2349 /* JSBarInfo.cpp */,
     11047                                BC124EFE0C26447A009E2349 /* JSBarInfo.h */,
     11048                                BC94D14C0C275C68006BC617 /* JSHistory.cpp */,
     11049                                BC94D14D0C275C68006BC617 /* JSHistory.h */,
     11050                                BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
     11051                                BCEC01C10C274DDD009F4EC9 /* JSScreen.h */,
     11052                        );
     11053                        name = Window;
     11054                        sourceTree = "<group>";
     11055                };
     11056                BC9854460CD3DA5F00069BC1 /* Ranges */ = {
     11057                        isa = PBXGroup;
     11058                        children = (
     11059                                65DF31ED09D1CC60000BE325 /* JSRange.cpp */,
     11060                                65DF31EE09D1CC60000BE325 /* JSRange.h */,
     11061                                D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */,
     11062                                D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */,
     11063                        );
     11064                        name = Ranges;
     11065                        sourceTree = "<group>";
     11066                };
     11067                BC9854530CD3DA8F00069BC1 /* Traversal */ = {
     11068                        isa = PBXGroup;
     11069                        children = (
     11070                                14115B7009F84CD600CA4FC1 /* JSNodeFilter.cpp */,
     11071                                14115B7109F84CD600CA4FC1 /* JSNodeFilter.h */,
     11072                                1A750D8B0A90E521000FF215 /* JSNodeIterator.cpp */,
     11073                                1A750D8C0A90E521000FF215 /* JSNodeIterator.h */,
     11074                                1A750D5A0A90DEE1000FF215 /* JSTreeWalker.cpp */,
     11075                                1A750D5B0A90DEE1000FF215 /* JSTreeWalker.h */,
     11076                        );
     11077                        name = Traversal;
    1103911078                        sourceTree = "<group>";
    1104011079                };
     
    1358313622                                A80F43520CCDE604002DD990 /* DOMSVGAnimateElementInternal.h in Headers */,
    1358413623                                E15863990CD10B730066E2C9 /* TextCodecUserDefined.h in Headers */,
     13624                                BC0B36A50CD3C67C00AC7EB5 /* Console.h in Headers */,
     13625                                BC98543E0CD3D98C00069BC1 /* JSConsole.h in Headers */,
    1358513626                        );
    1358613627                        runOnlyForDeploymentPostprocessing = 0;
     
    1370213743                                A83B78E20CCAFEC1000B0825 /* SVGFontFaceElement.idl in Resources */,
    1370313744                                A83B78E50CCAFEC1000B0825 /* SVGDefinitionSrcElement.idl in Resources */,
     13745                                BC0B36A60CD3C67C00AC7EB5 /* Console.idl in Resources */,
    1370413746                        );
    1370513747                        runOnlyForDeploymentPostprocessing = 0;
     
    1511615158                                A80F39590CCD9796002DD990 /* DOMSVGDefinitionSrcElement.mm in Sources */,
    1511715159                                E158639A0CD10B730066E2C9 /* TextCodecUserDefined.cpp in Sources */,
     15160                                BC0B36A40CD3C67C00AC7EB5 /* Console.cpp in Sources */,
     15161                                BC98543D0CD3D98B00069BC1 /* JSConsole.cpp in Sources */,
    1511815162                        );
    1511915163                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r26956 r27161  
    10471047                        $implIncludes{"JS" . $constructorType . ".h"} = 1;
    10481048                        push(@implContent, "        // Shadowing a built-in constructor\n");
     1049                        push(@implContent, "        JSObject::put(exec, \"$name\", value);\n");
     1050                    } elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) {
    10491051                        push(@implContent, "        JSObject::put(exec, \"$name\", value);\n");
    10501052                    } else {
  • trunk/WebCore/page/Chrome.cpp

    r26816 r27161  
    198198void Chrome::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
    199199{
    200     if (source == JSMessageSource && level == ErrorMessageLevel)
     200    if (source == JSMessageSource)
    201201        m_client->addMessageToConsole(message, lineNumber, sourceID);
    202202
  • trunk/WebCore/page/DOMWindow.cpp

    r26877 r27161  
    3232#include "CSSStyleSelector.h"
    3333#include "Chrome.h"
     34#include "Console.h"
    3435#include "Database.h"
    3536#include "DOMSelection.h"
     
    100101        m_toolbar->disconnectFrame();
    101102    m_toolbar = 0;
     103
     104    if (m_console)
     105        m_console->disconnectFrame();
     106    m_console = 0;
    102107}
    103108
     
    158163}
    159164
     165Console* DOMWindow::console() const
     166{
     167    if (!m_console)
     168        m_console = new Console(m_frame);
     169    return m_console.get();
     170}
     171
    160172DOMSelection* DOMWindow::getSelection()
    161173{
  • trunk/WebCore/page/DOMWindow.h

    r26877 r27161  
    3737    class CSSRuleList;
    3838    class CSSStyleDeclaration;
     39    class Console;
    3940    class Database;
    4041    class DOMSelection;
     
    4445    class History;
    4546    class Screen;
    46    
     47
    4748    typedef int ExceptionCode;
    4849
     
    137138#endif
    138139
     140        Console* console() const;
     141
    139142    private:
    140143        Frame* m_frame;
     
    148151        mutable RefPtr<BarInfo> m_statusbar;
    149152        mutable RefPtr<BarInfo> m_toolbar;
     153        mutable RefPtr<Console> m_console;
    150154    };
    151155
  • trunk/WebCore/page/DOMWindow.idl

    r26877 r27161  
    115115            raises(DOMException);
    116116#endif
     117
     118                 attribute [Replaceable] Console console;
    117119
    118120#if defined(LANGUAGE_JAVASCRIPT)
Note: See TracChangeset for help on using the changeset viewer.