Changeset 30631 in webkit


Ignore:
Timestamp:
Feb 27, 2008 3:07:15 PM (16 years ago)
Author:
pewtermoose@webkit.org
Message:

WebKit/mac:

Reviewed by Adam Roben.

Bug 14348: Messing up the inspector by dragging an URL into it
http://bugs.webkit.org/show_bug.cgi?id=14348
<rdar://problem/5283620> and <rdar://problem/5712808>

  • WebCoreSupport/WebInspectorClient.mm: (-[WebInspectorWindowController init]): Remove duplicate preference setting. (-[WebInspectorWindowController webView:dragDestinationActionMaskForDraggingInfo:]):

WebKit/win:

Reviewed by Adam Roben.

Bug 14348: Messing up the inspector by dragging an URL into it
http://bugs.webkit.org/show_bug.cgi?id=14348
<rdar://problem/5283620> and <rdar://problem/5712808>

Add a new class to handle the Inspector's delegate calls.

  • WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::createPage):
  • WebCoreSupport/WebInspectorDelegate.cpp: Added. (:m_refCount): (WebInspectorDelegate::createInstance): (WebInspectorDelegate::AddRef): (WebInspectorDelegate::Release): (WebInspectorDelegate::dragDestinationActionMaskForDraggingInfo):
  • WebCoreSupport/WebInspectorDelegate.h: Added. (WebInspectorDelegate::QueryInterface): (WebInspectorDelegate::createWebViewWithRequest): (WebInspectorDelegate::webViewShow): (WebInspectorDelegate::webViewClose): (WebInspectorDelegate::webViewFocus): (WebInspectorDelegate::webViewUnfocus): (WebInspectorDelegate::webViewFirstResponder): (WebInspectorDelegate::makeFirstResponder): (WebInspectorDelegate::setStatusText): (WebInspectorDelegate::webViewStatusText): (WebInspectorDelegate::webViewAreToolbarsVisible): (WebInspectorDelegate::setToolbarsVisible): (WebInspectorDelegate::webViewIsStatusBarVisible): (WebInspectorDelegate::setStatusBarVisible): (WebInspectorDelegate::webViewIsResizable): (WebInspectorDelegate::setResizable): (WebInspectorDelegate::setFrame): (WebInspectorDelegate::webViewFrame): (WebInspectorDelegate::setContentRect): (WebInspectorDelegate::webViewContentRect): (WebInspectorDelegate::runJavaScriptAlertPanelWithMessage): (WebInspectorDelegate::runJavaScriptConfirmPanelWithMessage): (WebInspectorDelegate::runJavaScriptTextInputPanelWithPrompt): (WebInspectorDelegate::runBeforeUnloadConfirmPanelWithMessage): (WebInspectorDelegate::runOpenPanelForFileButtonWithResultListener): (WebInspectorDelegate::mouseDidMoveOverElement): (WebInspectorDelegate::contextMenuItemsForElement): (WebInspectorDelegate::validateUserInterfaceItem): (WebInspectorDelegate::shouldPerformAction): (WebInspectorDelegate::willPerformDragDestinationAction): (WebInspectorDelegate::dragSourceActionMaskForPoint): (WebInspectorDelegate::willPerformDragSourceAction): (WebInspectorDelegate::contextMenuItemSelected): (WebInspectorDelegate::hasCustomMenuImplementation): (WebInspectorDelegate::trackCustomPopupMenu): (WebInspectorDelegate::measureCustomMenuItem): (WebInspectorDelegate::drawCustomMenuItem): (WebInspectorDelegate::addCustomMenuDrawingData): (WebInspectorDelegate::cleanUpCustomMenuDrawingData): (WebInspectorDelegate::canTakeFocus): (WebInspectorDelegate::takeFocus): (WebInspectorDelegate::registerUndoWithTarget): (WebInspectorDelegate::removeAllActionsWithTarget): (WebInspectorDelegate::setActionTitle): (WebInspectorDelegate::undo): (WebInspectorDelegate::redo): (WebInspectorDelegate::canUndo): (WebInspectorDelegate::canRedo):
  • WebKit.vcproj/WebKit.vcproj:
Location:
trunk/WebKit
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r30568 r30631  
     12008-02-27  Matt Lilek  <webkit@mattlilek.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Bug 14348: Messing up the inspector by dragging an URL into it
     6        http://bugs.webkit.org/show_bug.cgi?id=14348
     7        <rdar://problem/5283620> and <rdar://problem/5712808>
     8
     9        * WebCoreSupport/WebInspectorClient.mm:
     10        (-[WebInspectorWindowController init]): Remove duplicate preference setting.
     11        (-[WebInspectorWindowController webView:dragDestinationActionMaskForDraggingInfo:]):
     12
    1132008-02-25  Darin Adler  <darin@apple.com>
    214
  • trunk/WebKit/mac/WebCoreSupport/WebInspectorClient.mm

    r29663 r30631  
    4646#import <WebKit/DOMCore.h>
    4747#import <WebKit/DOMExtensions.h>
     48#import <WebKit/WebUIDelegate.h>
    4849
    4950#import <WebKitSystemInterface.h>
     
    164165    [preferences setJavaScriptEnabled:YES];
    165166    [preferences setAllowsAnimatedImages:YES];
    166     [preferences setLoadsImagesAutomatically:YES];
    167167    [preferences setPlugInsEnabled:NO];
    168168    [preferences setJavaEnabled:NO];
     
    176176    [_webView setDrawsBackground:NO];
    177177    [_webView setProhibitsMainFrameScrolling:YES];
     178    [_webView setUIDelegate:self];
    178179
    179180    [preferences release];
     
    490491
    491492#pragma mark -
     493#pragma mark Animation delegate
    492494
    493495- (void)animationDidEnd:(NSAnimation*)animation
     
    503505}
    504506
     507#pragma mark -
     508#pragma mark UI delegate
     509
     510- (unsigned)webView:(WebView *)sender dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
     511{
     512    return WebDragDestinationActionNone;
     513}
    505514
    506515#pragma mark -
  • trunk/WebKit/win/ChangeLog

    r30612 r30631  
     12008-02-27  Matt Lilek  <webkit@mattlilek.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Bug 14348: Messing up the inspector by dragging an URL into it
     6        http://bugs.webkit.org/show_bug.cgi?id=14348
     7        <rdar://problem/5283620> and <rdar://problem/5712808>
     8
     9        Add a new class to handle the Inspector's delegate calls.
     10
     11        * WebCoreSupport/WebInspectorClient.cpp:
     12        (WebInspectorClient::createPage):
     13        * WebCoreSupport/WebInspectorDelegate.cpp: Added.
     14        (:m_refCount):
     15        (WebInspectorDelegate::createInstance):
     16        (WebInspectorDelegate::AddRef):
     17        (WebInspectorDelegate::Release):
     18        (WebInspectorDelegate::dragDestinationActionMaskForDraggingInfo):
     19        * WebCoreSupport/WebInspectorDelegate.h: Added.
     20        (WebInspectorDelegate::QueryInterface):
     21        (WebInspectorDelegate::createWebViewWithRequest):
     22        (WebInspectorDelegate::webViewShow):
     23        (WebInspectorDelegate::webViewClose):
     24        (WebInspectorDelegate::webViewFocus):
     25        (WebInspectorDelegate::webViewUnfocus):
     26        (WebInspectorDelegate::webViewFirstResponder):
     27        (WebInspectorDelegate::makeFirstResponder):
     28        (WebInspectorDelegate::setStatusText):
     29        (WebInspectorDelegate::webViewStatusText):
     30        (WebInspectorDelegate::webViewAreToolbarsVisible):
     31        (WebInspectorDelegate::setToolbarsVisible):
     32        (WebInspectorDelegate::webViewIsStatusBarVisible):
     33        (WebInspectorDelegate::setStatusBarVisible):
     34        (WebInspectorDelegate::webViewIsResizable):
     35        (WebInspectorDelegate::setResizable):
     36        (WebInspectorDelegate::setFrame):
     37        (WebInspectorDelegate::webViewFrame):
     38        (WebInspectorDelegate::setContentRect):
     39        (WebInspectorDelegate::webViewContentRect):
     40        (WebInspectorDelegate::runJavaScriptAlertPanelWithMessage):
     41        (WebInspectorDelegate::runJavaScriptConfirmPanelWithMessage):
     42        (WebInspectorDelegate::runJavaScriptTextInputPanelWithPrompt):
     43        (WebInspectorDelegate::runBeforeUnloadConfirmPanelWithMessage):
     44        (WebInspectorDelegate::runOpenPanelForFileButtonWithResultListener):
     45        (WebInspectorDelegate::mouseDidMoveOverElement):
     46        (WebInspectorDelegate::contextMenuItemsForElement):
     47        (WebInspectorDelegate::validateUserInterfaceItem):
     48        (WebInspectorDelegate::shouldPerformAction):
     49        (WebInspectorDelegate::willPerformDragDestinationAction):
     50        (WebInspectorDelegate::dragSourceActionMaskForPoint):
     51        (WebInspectorDelegate::willPerformDragSourceAction):
     52        (WebInspectorDelegate::contextMenuItemSelected):
     53        (WebInspectorDelegate::hasCustomMenuImplementation):
     54        (WebInspectorDelegate::trackCustomPopupMenu):
     55        (WebInspectorDelegate::measureCustomMenuItem):
     56        (WebInspectorDelegate::drawCustomMenuItem):
     57        (WebInspectorDelegate::addCustomMenuDrawingData):
     58        (WebInspectorDelegate::cleanUpCustomMenuDrawingData):
     59        (WebInspectorDelegate::canTakeFocus):
     60        (WebInspectorDelegate::takeFocus):
     61        (WebInspectorDelegate::registerUndoWithTarget):
     62        (WebInspectorDelegate::removeAllActionsWithTarget):
     63        (WebInspectorDelegate::setActionTitle):
     64        (WebInspectorDelegate::undo):
     65        (WebInspectorDelegate::redo):
     66        (WebInspectorDelegate::canUndo):
     67        (WebInspectorDelegate::canRedo):
     68        * WebKit.vcproj/WebKit.vcproj:
     69
    1702008-02-26  Adam Roben  <aroben@apple.com>
    271
  • trunk/WebKit/win/WebCoreSupport/WebInspectorClient.cpp

    r30477 r30631  
    3030#include "WebInspectorClient.h"
    3131
    32 #include "WebInspectorClient.h"
     32#include "WebInspectorDelegate.h"
    3333#include "WebKit.h"
    3434#include "WebMutableURLRequest.h"
     
    122122    GetClientRect(m_hwnd, &rect);
    123123    if (FAILED(m_webView->initWithFrame(rect, 0, 0)))
     124        return 0;
     125
     126    COMPtr<WebInspectorDelegate> delegate(AdoptCOM, WebInspectorDelegate::createInstance());
     127    if (FAILED(m_webView->setUIDelegate(delegate.get())))
    124128        return 0;
    125129
  • trunk/WebKit/win/WebKit.vcproj/WebKit.vcproj

    r30481 r30631  
    16581658                                >
    16591659                        </File>
     1660                        <File
     1661                                RelativePath="..\WebCoreSupport\WebInspectorDelegate.cpp"
     1662                                >
     1663                        </File>
     1664                        <File
     1665                                RelativePath="..\WebCoreSupport\WebInspectorDelegate.h"
     1666                                >
     1667                        </File>
    16601668                </Filter>
    16611669                <File
Note: See TracChangeset for help on using the changeset viewer.