Changeset 112424 in webkit


Ignore:
Timestamp:
Mar 28, 2012 12:22:07 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

<http://webkit.org/b/82419> Web Inspector: Create -[DOMNode inspect] from IDL

Source/WebCore:

Instead of manually creating the method in DOM.mm we can specify it in
Node.idl and autogenerate part of the interface.

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2012-03-28
Reviewed by Timothy Hatcher.

  • bindings/objc/DOM.mm:
  • bindings/objc/DOMPrivate.h:

Move the call to InspectorController::inspect from here ...

  • dom/Node.h:
  • dom/Node.idl: IDL only in an ObjC block.
  • dom/Node.cpp:

(WebCore::Node::inspect):
... to here.

  • WebCore.xcodeproj/project.pbxproj:

Add the new generated file so we can Copy it in the build phase.

Source/WebKit/mac:

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2012-03-28
Reviewed by Timothy Hatcher.

  • MigrateHeaders.make: Copy DOMNodePrivate.h to PrivateHeaders.
Location:
trunk/Source
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112421 r112424  
     12012-03-28  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        <http://webkit.org/b/82419> Web Inspector: Create -[DOMNode inspect] from IDL
     4
     5        Instead of manually creating the method in DOM.mm we can specify it in
     6        Node.idl and autogenerate part of the interface.
     7
     8        Reviewed by Timothy Hatcher.
     9
     10        * bindings/objc/DOM.mm:
     11        * bindings/objc/DOMPrivate.h:
     12        Move the call to InspectorController::inspect from here ...
     13
     14        * dom/Node.h:
     15        * dom/Node.idl: IDL only in an ObjC block.
     16        * dom/Node.cpp:
     17        (WebCore::Node::inspect):
     18        ... to here.
     19
     20        * WebCore.xcodeproj/project.pbxproj:
     21        Add the new generated file so we can Copy it in the build phase.
     22
    1232012-03-28  Tommy Widenflycht  <tommyw@google.com>
    224
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r112396 r112424  
    11611161                44311CD712E4E22D000A8D19 /* DOMDocumentPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 44311CD512E4E22D000A8D19 /* DOMDocumentPrivate.h */; };
    11621162                44311CD812E4E24B000A8D19 /* DOMDocumentPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 44311CD512E4E22D000A8D19 /* DOMDocumentPrivate.h */; };
     1163                A54A82EC15228D2F00C72BA6 /* DOMNodePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */; };
     1164                A54A82F115228DF600C72BA6 /* DOMNodePrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */; };
    11631165                44311CD912E4E257000A8D19 /* DOMDocumentFragmentPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 44311CD412E4E22D000A8D19 /* DOMDocumentFragmentPrivate.h */; };
    11641166                44311F8212E4E66C000A8D19 /* DOMDocumentFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */; };
     
    65076509                                85526C720AB0AE2F000302EA /* DOMNodeIterator.h in Copy Generated Headers */,
    65086510                                1C11CCBE0AA6093700DADB20 /* DOMNodeList.h in Copy Generated Headers */,
     6511                                A54A82F115228DF600C72BA6 /* DOMNodePrivate.h in Copy Generated Headers */,
    65096512                                1C11CCB50AA6093700DADB20 /* DOMNotation.h in Copy Generated Headers */,
    65106513                                85DF345F0AAFC2D400E59AE3 /* DOMOverflowEvent.h in Copy Generated Headers */,
     
    1066810671                A456FA2411AD4A830020B420 /* LabelsNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LabelsNodeList.cpp; sourceTree = "<group>"; };
    1066910672                A456FA2511AD4A830020B420 /* LabelsNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelsNodeList.h; sourceTree = "<group>"; };
     10673                A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMNodePrivate.h; sourceTree = "<group>"; };
    1067010674                A5732B08136A161D005C8D7C /* DateComponents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateComponents.cpp; sourceTree = "<group>"; };
    1067110675                A5732B09136A161D005C8D7C /* DateComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateComponents.h; sourceTree = "<group>"; };
     
    1549915503                                85ACAA890A9B759C00671E90 /* DOMNodeList.h */,
    1550015504                                85ACAA8A0A9B759C00671E90 /* DOMNodeList.mm */,
     15505                                A54A82EA15228CA300C72BA6 /* DOMNodePrivate.h */,
    1550115506                                85CA96E80A9624E900690CCF /* DOMNotation.h */,
    1550215507                                85CA96E90A9624E900690CCF /* DOMNotation.mm */,
     
    2210322108                                85ACAA8D0A9B759C00671E90 /* DOMNodeList.h in Headers */,
    2210422109                                85E711D30AC5D5350053270F /* DOMNodeListInternal.h in Headers */,
     22110                                A54A82EC15228D2F00C72BA6 /* DOMNodePrivate.h in Headers */,
    2210522111                                85CA96EA0A9624E900690CCF /* DOMNotation.h in Headers */,
    2210622112                                85E711D40AC5D5350053270F /* DOMNotationInternal.h in Headers */,
  • trunk/Source/WebCore/bindings/objc/DOM.mm

    r112305 r112424  
    4444#import "WebScriptObjectPrivate.h"
    4545#import <wtf/HashMap.h>
    46 
    47 #if ENABLE(INSPECTOR)
    48 #import "InspectorController.h"
    49 #import "Page.h"
    50 #endif
    5146
    5247#if ENABLE(SVG_DOM_OBJC_BINDINGS)
     
    396391}
    397392
    398 - (void)inspect
    399 {
    400 #if ENABLE(INSPECTOR)
    401     WebCore::Node* node = core(self);
    402     if (WebCore::Document* document = node->document()) {
    403         if (WebCore::Page* page = document->page())
    404             page->inspectorController()->inspect(node);
    405     }
    406 #endif
    407 }
    408 
    409393@end
    410394
  • trunk/Source/WebCore/bindings/objc/DOMPrivate.h

    r112305 r112424  
    3030- (NSImage *)renderedImage;
    3131- (NSArray *)textRects;
    32 - (void)inspect;
    3332@end
    3433
  • trunk/Source/WebCore/dom/Node.cpp

    r112037 r112424  
    108108#include <wtf/text/StringBuilder.h>
    109109
     110#if ENABLE(INSPECTOR)
     111#include "InspectorController.h"
     112#endif
     113
    110114#if ENABLE(SVG)
    111115#include "SVGElementInstance.h"
     
    718722}
    719723
     724void Node::inspect()
     725{
     726#if ENABLE(INSPECTOR)
     727    if (document() && document()->page())
     728        document()->page()->inspectorController()->inspect(this);
     729#endif
     730}
     731
    720732bool Node::rendererIsEditable(EditableLevel editableLevel) const
    721733{
  • trunk/Source/WebCore/dom/Node.h

    r111268 r112424  
    350350    bool isContentRichlyEditable();
    351351
     352    void inspect();
     353
    352354    bool rendererIsEditable(EditableType editableType = ContentIsEditable) const
    353355    {
  • trunk/Source/WebCore/dom/Node.idl

    r107636 r112424  
    137137        // Objective-C extensions
    138138        readonly attribute boolean          isContentEditable;
     139
     140        void inspect();
    139141#endif /* defined(LANGUAGE_OBJECTIVE_C) */
    140142
  • trunk/Source/WebKit/mac/ChangeLog

    r112312 r112424  
     12012-03-28  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        <http://webkit.org/b/82419> Web Inspector: Create -[DOMNode inspect] from IDL
     4
     5        Reviewed by Timothy Hatcher.
     6
     7        * MigrateHeaders.make: Copy DOMNodePrivate.h to PrivateHeaders.
     8
    192012-03-27  Timothy Hatcher  <timothy@apple.com>
    210
  • trunk/Source/WebKit/mac/MigrateHeaders.make

    r106373 r112424  
    153153    $(PUBLIC_HEADERS_DIR)/DOMNode.h \
    154154    $(INTERNAL_HEADERS_DIR)/DOMNodeInternal.h \
     155    $(PRIVATE_HEADERS_DIR)/DOMNodePrivate.h \
    155156    $(PUBLIC_HEADERS_DIR)/DOMNodeFilter.h \
    156157    $(PUBLIC_HEADERS_DIR)/DOMNodeIterator.h \
Note: See TracChangeset for help on using the changeset viewer.