Changeset 79953 in webkit


Ignore:
Timestamp:
Feb 28, 2011 5:47:06 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Updated expected results after the change that syncs the WebKit isEditable
and WebCore isContentEditable.

  • platform/mac/editing/selection/designmode-no-caret-expected.txt:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Frame::isContentEditable is currently based on two things: Editor::clientIsEditable and
Document::inDesignMode. In fact, it should only rely on Document::inDesignMode. As a result,
Editor::clientIsEditable and its client-side implementation can be removed.

  • WebCore.exp.in:
  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isReadOnly):
  • editing/Editor.cpp:
  • editing/Editor.h:
  • editing/SelectionController.cpp: (WebCore::SelectionController::setSelectionFromNone):
  • html/HTMLElement.cpp: (WebCore::HTMLElement::isContentEditable): (WebCore::HTMLElement::isContentRichlyEditable):
  • page/DragController.cpp: (WebCore::DragController::operationForLoad):
  • page/EditorClient.h:
  • page/Frame.cpp:
  • page/Frame.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation.

  • src/EditorClientImpl.cpp:
  • src/EditorClientImpl.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation.

  • WebCoreSupport/EditorClientEfl.cpp:
  • WebCoreSupport/EditorClientEfl.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.

  • WebCoreSupport/EditorClientGtk.cpp:
  • WebCoreSupport/EditorClientGtk.h:
  • webkit/webkitwebview.cpp: (webkit_web_view_init): (webkit_web_view_get_editable): (webkit_web_view_set_editable):
  • webkit/webkitwebviewprivate.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation.

  • WebCoreSupport/EditorClientHaiku.cpp:
  • WebCoreSupport/EditorClientHaiku.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:
  • WebView/WebView.mm: (-[WebView setEditable:]): (-[WebView isEditable]):
  • WebView/WebViewData.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.

  • Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): (QWebPage::setContentEditable): (QWebPage::isContentEditable):
  • Api/qwebpage_p.h:
  • WebCoreSupport/EditorClientQt.cpp:
  • WebCoreSupport/EditorClientQt.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation.

  • WebCoreSupport/WebEditorClient.cpp:
  • WebCoreSupport/WebEditorClient.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation.

  • WebCoreSupport/EditorClientWinCE.cpp:
  • WebCoreSupport/EditorClientWinCE.h:

2011-02-28 Chang Shu <cshu@webkit.org>

Reviewed by Ryosuke Niwa.

Remove the support of Frame::isContentEditable and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=54292

Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.

  • WebFrame.cpp: (wxWebFrame::wxWebFrame): (wxWebFrame::MakeEditable): (wxWebFrame::IsEditable):
  • WebFrame.h:
  • WebKitSupport/EditorClientWx.cpp:
  • WebKitSupport/EditorClientWx.h:
  • WebView.cpp: (wxWebView::wxWebView):
  • WebView.h:
Location:
trunk
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r79951 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Updated expected results after the change that syncs the WebKit isEditable
     9        and WebCore isContentEditable.
     10
     11        * platform/mac/editing/selection/designmode-no-caret-expected.txt:
     12
    1132011-02-28  Kent Tamura  <tkent@chromium.org>
    214
  • trunk/LayoutTests/platform/mac/editing/selection/designmode-no-caret-expected.txt

    r69509 r79953  
    1010        RenderText {#text} at (0,0) size 784x54
    1111          text run at (0,0) width 759: "This tests to see that a caret is placed inside an editable document that is entirely editable even when no caret is requested"
     12          text run at (759,0) width 4: " "
    1213          text run at (0,18) width 118: "programmatically. "
    1314          text run at (118,18) width 187: "We do this as a convenience. "
    1415          text run at (305,18) width 479: "Right now, we only do this convenience when a document's frame becomes"
     16          text run at (784,18) width 0: " "
    1517          text run at (0,36) width 378: "first responder or when a document's window becomes key."
    1618      RenderBlock {PRE} at (0,67) size 784x15
  • trunk/Source/WebCore/ChangeLog

    r79951 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Frame::isContentEditable is currently based on two things: Editor::clientIsEditable and
     9        Document::inDesignMode. In fact, it should only rely on Document::inDesignMode. As a result,
     10        Editor::clientIsEditable and its client-side implementation can be removed.
     11
     12        * WebCore.exp.in:
     13        * accessibility/AccessibilityRenderObject.cpp:
     14        (WebCore::AccessibilityRenderObject::isReadOnly):
     15        * editing/Editor.cpp:
     16        * editing/Editor.h:
     17        * editing/SelectionController.cpp:
     18        (WebCore::SelectionController::setSelectionFromNone):
     19        * html/HTMLElement.cpp:
     20        (WebCore::HTMLElement::isContentEditable):
     21        (WebCore::HTMLElement::isContentRichlyEditable):
     22        * page/DragController.cpp:
     23        (WebCore::DragController::operationForLoad):
     24        * page/EditorClient.h:
     25        * page/Frame.cpp:
     26        * page/Frame.h:
     27
    1282011-02-28  Kent Tamura  <tkent@chromium.org>
    229
  • trunk/Source/WebCore/WebCore.exp.in

    r79793 r79953  
    783783__ZN7WebCore8Document11createRangeEv
    784784__ZN7WebCore8Document12updateLayoutEv
     785__ZN7WebCore8Document13setDesignModeENS0_13InheritedBoolE
    785786__ZN7WebCore8Document13svgExtensionsEv
    786787__ZN7WebCore8Document14setFocusedNodeEN3WTF10PassRefPtrINS_4NodeEEE
     
    12261227__ZNK7WebCore8Document10renderViewEv
    12271228__ZNK7WebCore8Document11completeURLERKN3WTF6StringE
     1229__ZNK7WebCore8Document12inDesignModeEv
    12281230__ZNK7WebCore8Document13axObjectCacheEv
    12291231__ZNK7WebCore8Document13nodesFromRectEiijjjjb
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r79920 r79953  
    664664        if (body && body->isContentEditable())
    665665            return false;
    666        
    667         Frame* frame = document->frame();
    668         if (!frame)
    669             return true;
    670        
    671         return !frame->isContentEditable();
     666
     667        return !document->inDesignMode();
    672668    }
    673669
  • trunk/Source/WebCore/editing/Editor.cpp

    r79936 r79953  
    956956}
    957957
    958 bool Editor::clientIsEditable() const
    959 {
    960     return client() && client()->isEditable();
    961 }
    962 
    963958// CSS properties that only has a visual difference when applied to text.
    964959static const int textOnlyProperties[] = {
  • trunk/Source/WebCore/editing/Editor.h

    r79494 r79953  
    173173    bool selectionStartHasStyle(CSSStyleDeclaration*) const;
    174174
    175     bool clientIsEditable() const;
    176    
    177175    void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; }
    178176    bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; }
  • trunk/Source/WebCore/editing/SelectionController.cpp

    r79875 r79953  
    18141814    Document* document = m_frame->document();
    18151815    bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
    1816     if (!isNone() || !(m_frame->isContentEditable() || caretBrowsing))
     1816    if (!isNone() || !(document->inDesignMode() || caretBrowsing))
    18171817        return;
    18181818
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r79269 r79953  
    660660bool HTMLElement::isContentEditable() const
    661661{
    662     if (document()->frame() && document()->frame()->isContentEditable())
     662    if (document()->inDesignMode())
    663663        return true;
    664664
     
    679679bool HTMLElement::isContentRichlyEditable() const
    680680{
    681     if (document()->frame() && document()->frame()->isContentEditable())
     681    if (document()->inDesignMode())
    682682        return true;
    683683
  • trunk/Source/WebCore/page/DragController.cpp

    r79196 r79953  
    354354    ASSERT(dragData);
    355355    Document* doc = m_page->mainFrame()->documentAtPoint(dragData->clientPosition());
    356     if (doc && (m_didInitiateDrag || doc->isPluginDocument() || (doc->frame() && doc->frame()->editor()->clientIsEditable())))
     356    if (doc && (m_didInitiateDrag || doc->isPluginDocument() || doc->inDesignMode()))
    357357        return DragOperationNone;
    358358    return dragOperation(dragData);
  • trunk/Source/WebCore/page/EditorClient.h

    r78632 r79953  
    8888    virtual void toggleGrammarChecking() = 0;
    8989    virtual int spellCheckerDocumentTag() = 0;
    90    
    91     virtual bool isEditable() = 0;
    9290
    9391    virtual bool shouldBeginEditing(Range*) = 0;
  • trunk/Source/WebCore/page/Frame.cpp

    r76438 r79953  
    552552}
    553553
    554 bool Frame::isContentEditable() const
    555 {
    556     if (m_editor.clientIsEditable())
    557         return true;
    558     return m_doc->inDesignMode();
    559 }
    560 
    561554#ifndef NDEBUG
    562555static HashSet<Frame*>& keepAliveSet()
  • trunk/Source/WebCore/page/Frame.h

    r75652 r79953  
    183183        DragImageRef dragImageForSelection();
    184184
    185         bool isContentEditable() const; // if true, everything in frame is editable
    186 
    187185        VisiblePosition visiblePositionForPoint(const IntPoint& framePoint);
    188186        Document* documentAtPoint(const IntPoint& windowPoint);
  • trunk/Source/WebKit/chromium/ChangeLog

    r79942 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation.
     9
     10        * src/EditorClientImpl.cpp:
     11        * src/EditorClientImpl.h:
     12
    1132011-02-28  Avi Drissman  <avi@google.com>
    214
  • trunk/Source/WebKit/chromium/src/EditorClientImpl.cpp

    r78532 r79953  
    186186    ASSERT_NOT_REACHED();
    187187    return 0;
    188 }
    189 
    190 bool EditorClientImpl::isEditable()
    191 {
    192     return false;
    193188}
    194189
  • trunk/Source/WebKit/chromium/src/EditorClientImpl.h

    r78533 r79953  
    6060    virtual void toggleGrammarChecking();
    6161    virtual int spellCheckerDocumentTag();
    62     virtual bool isEditable();
    6362    virtual bool shouldBeginEditing(WebCore::Range*);
    6463    virtual bool shouldEndEditing(WebCore::Range*);
  • trunk/Source/WebKit/efl/ChangeLog

    r79838 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation.
     9
     10        * WebCoreSupport/EditorClientEfl.cpp:
     11        * WebCoreSupport/EditorClientEfl.h:
     12
    1132011-02-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    214
  • trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp

    r78532 r79953  
    144144{
    145145    notImplemented();
    146 }
    147 
    148 bool EditorClientEfl::isEditable()
    149 {
    150     notImplemented();
    151     return false;
    152146}
    153147
  • trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h

    r78533 r79953  
    6262    virtual int spellCheckerDocumentTag();
    6363
    64     virtual bool isEditable();
    65 
    6664    virtual bool shouldBeginEditing(Range*);
    6765    virtual bool shouldEndEditing(Range*);
  • trunk/Source/WebKit/gtk/ChangeLog

    r79802 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
     9
     10        * WebCoreSupport/EditorClientGtk.cpp:
     11        * WebCoreSupport/EditorClientGtk.h:
     12        * webkit/webkitwebview.cpp:
     13        (webkit_web_view_init):
     14        (webkit_web_view_get_editable):
     15        (webkit_web_view_set_editable):
     16        * webkit/webkitwebviewprivate.h:
     17
    1182011-02-26  Lukasz Slachciak  <l.slachciak@samsung.com>
    219
  • trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp

    r79329 r79953  
    482482}
    483483
    484 bool EditorClient::isEditable()
    485 {
    486     return webkit_web_view_get_editable(m_webView);
    487 }
    488 
    489484void EditorClient::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command)
    490485{
  • trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h

    r79130 r79953  
    8888        virtual int spellCheckerDocumentTag();
    8989
    90         virtual bool isEditable();
    91 
    9290        virtual bool shouldBeginEditing(WebCore::Range*);
    9391        virtual bool shouldEndEditing(WebCore::Range*);
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r79215 r79953  
    35463546    priv->mainFrame = WEBKIT_WEB_FRAME(webkit_web_frame_new(webView));
    35473547    priv->lastPopupXPosition = priv->lastPopupYPosition = -1;
    3548     priv->editable = false;
    35493548
    35503549    priv->backForwardList = adoptGRef(webkit_web_back_forward_list_new_with_web_view(webView));
     
    43404339    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE);
    43414340
    4342     WebKitWebViewPrivate* priv = webView->priv;
    4343 
    4344     return priv->editable;
     4341    Frame* frame = core(webView)->mainFrame();
     4342    return frame && frame->document()->inDesignMode();
    43454343}
    43464344
     
    43674365    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
    43684366
    4369     WebKitWebViewPrivate* priv = webView->priv;
    4370 
    43714367    Frame* frame = core(webView)->mainFrame();
    43724368    g_return_if_fail(frame);
     
    43744370    // TODO: What happens when the frame is replaced?
    43754371    flag = flag != FALSE;
    4376     if (flag == priv->editable)
     4372    if (flag == webkit_web_view_get_editable(webView))
    43774373        return;
    43784374
    4379     priv->editable = flag;
     4375    frame->document()->setDesignMode(flag ? WebCore::Document::on : WebCore::Document::off);
    43804376
    43814377    if (flag) {
  • trunk/Source/WebKit/gtk/webkit/webkitwebviewprivate.h

    r75481 r79953  
    6666
    6767    HashSet<GtkWidget*> children;
    68     bool editable;
    6968    GRefPtr<GtkIMContext> imContext;
    7069
  • trunk/Source/WebKit/haiku/ChangeLog

    r79196 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation.
     9
     10        * WebCoreSupport/EditorClientHaiku.cpp:
     11        * WebCoreSupport/EditorClientHaiku.h:
     12
    1132011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp

    r79196 r79953  
    114114}
    115115
    116 bool EditorClientHaiku::isEditable()
    117 {
    118     // FIXME: should be controllable
    119     return false;
    120 }
    121 
    122116bool EditorClientHaiku::shouldBeginEditing(WebCore::Range*)
    123117{
  • trunk/Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h

    r78533 r79953  
    5858        virtual void toggleGrammarChecking();
    5959        virtual int spellCheckerDocumentTag();
    60 
    61         virtual bool isEditable();
    6260
    6361        virtual bool shouldBeginEditing(Range*);
  • trunk/Source/WebKit/mac/ChangeLog

    r79904 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
     9
     10        * WebCoreSupport/WebEditorClient.h:
     11        * WebCoreSupport/WebEditorClient.mm:
     12        * WebView/WebView.mm:
     13        (-[WebView setEditable:]):
     14        (-[WebView isEditable]):
     15        * WebView/WebViewData.h:
     16
    1172011-02-28  Oliver Hunt  <oliver@apple.com>
    218
  • trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h

    r78632 r79953  
    5252    virtual bool smartInsertDeleteEnabled();
    5353    virtual bool isSelectTrailingWhitespaceEnabled();
    54     virtual bool isEditable();
    5554
    5655    virtual bool shouldDeleteRange(WebCore::Range*);   
  • trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

    r78632 r79953  
    245245{
    246246    return [m_webView spellCheckerDocumentTag];
    247 }
    248 
    249 bool WebEditorClient::isEditable()
    250 {
    251     return [m_webView isEditable];
    252247}
    253248
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r79771 r79953  
    49894989- (void)setEditable:(BOOL)flag
    49904990{
    4991     if (_private->editable != flag) {
    4992         _private->editable = flag;
     4991    if ([self isEditable] != flag) {
    49934992        if (!_private->tabKeyCyclesThroughElementsChanged && _private->page)
    49944993            _private->page->setTabKeyCyclesThroughElements(!flag);
    49954994        Frame* mainFrame = [self _mainCoreFrame];
    49964995        if (mainFrame) {
     4996            mainFrame->document()->setDesignMode(flag ? WebCore::Document::on : WebCore::Document::off);
    49974997            if (flag) {
    49984998                mainFrame->editor()->applyEditingStyleToBodyElement();
     
    50075007- (BOOL)isEditable
    50085008{
    5009     return _private->editable;
     5009    Frame* mainFrame = [self _mainCoreFrame];
     5010    if (mainFrame)
     5011        return mainFrame->document()->inDesignMode();
     5012    return false;
    50105013}
    50115014
  • trunk/Source/WebKit/mac/WebView/WebViewData.h

    r75277 r79953  
    106106    BOOL mainFrameDocumentReady;
    107107    BOOL drawsBackground;
    108     BOOL editable;
    109108    BOOL tabKeyCyclesThroughElementsChanged;
    110109    BOOL becomingFirstResponder;
  • trunk/Source/WebKit/qt/Api/qwebpage.cpp

    r79589 r79953  
    302302#endif
    303303    , settings(0)
    304     , editable(false)
    305304    , useFixedLayout(false)
    306305    , pluginFactory(0)
     
    31613160void QWebPage::setContentEditable(bool editable)
    31623161{
    3163     if (d->editable != editable) {
    3164         d->editable = editable;
     3162    if (isContentEditable() != editable) {
    31653163        d->page->setTabKeyCyclesThroughElements(!editable);
    31663164        if (d->mainFrame) {
    31673165            WebCore::Frame* frame = d->mainFrame->d->frame;
     3166            frame->document()->setDesignMode(editable ? WebCore::Document::on : WebCore::Document::off);
    31683167            if (editable) {
    31693168                frame->editor()->applyEditingStyleToBodyElement();
     
    31793178bool QWebPage::isContentEditable() const
    31803179{
    3181     return d->editable;
     3180    return d->mainFrame && d->mainFrame->d->frame->document()->inDesignMode();
    31823181}
    31833182
  • trunk/Source/WebKit/qt/Api/qwebpage_p.h

    r75870 r79953  
    201201    QWebSettings *settings;
    202202    QPalette palette;
    203     bool editable;
    204203    bool useFixedLayout;
    205204
  • trunk/Source/WebKit/qt/ChangeLog

    r79916 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
     9
     10        * Api/qwebpage.cpp:
     11        (QWebPagePrivate::QWebPagePrivate):
     12        (QWebPage::setContentEditable):
     13        (QWebPage::isContentEditable):
     14        * Api/qwebpage_p.h:
     15        * WebCoreSupport/EditorClientQt.cpp:
     16        * WebCoreSupport/EditorClientQt.h:
     17
    1182011-02-28  Alexis Menard  <alexis.menard@openbossa.org>
    219
  • trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

    r79196 r79953  
    239239}
    240240
    241 bool EditorClientQt::isEditable()
    242 {
    243     return m_page->isContentEditable();
    244 }
    245 
    246241void EditorClientQt::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> cmd)
    247242{
  • trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h

    r78533 r79953  
    5858    virtual int spellCheckerDocumentTag();
    5959    virtual bool selectWordBeforeMenuEvent();
    60     virtual bool isEditable();
    6160
    6261    virtual bool shouldBeginEditing(Range*);
  • trunk/Source/WebKit/win/ChangeLog

    r79938 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation.
     9
     10        * WebCoreSupport/WebEditorClient.cpp:
     11        * WebCoreSupport/WebEditorClient.h:
     12
    1132011-02-28  Adam Roben  <aroben@apple.com>
    214
  • trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp

    r78532 r79953  
    630630}
    631631
    632 bool WebEditorClient::isEditable()
    633 {
    634     return false;
    635 }
    636 
    637632void WebEditorClient::ignoreWordInSpellDocument(const String& word)
    638633{
  • trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.h

    r78533 r79953  
    5050    virtual void toggleContinuousSpellChecking();
    5151    virtual int spellCheckerDocumentTag();
    52 
    53     virtual bool isEditable();
    5452
    5553    virtual bool shouldBeginEditing(WebCore::Range*);
  • trunk/Source/WebKit/wince/ChangeLog

    r79107 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation.
     9
     10        * WebCoreSupport/EditorClientWinCE.cpp:
     11        * WebCoreSupport/EditorClientWinCE.h:
     12
    1132011-02-19  Charlie Reis  <creis@chromium.org>
    214
  • trunk/Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp

    r78532 r79953  
    143143{
    144144    notImplemented();
    145 }
    146 
    147 bool EditorClientWinCE::isEditable()
    148 {
    149     notImplemented();
    150     return false;
    151145}
    152146
  • trunk/Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.h

    r78533 r79953  
    4949    virtual void toggleGrammarChecking();
    5050    virtual int spellCheckerDocumentTag();
    51 
    52     virtual bool isEditable();
    5351
    5452    virtual bool shouldBeginEditing(WebCore::Range*);
  • trunk/Source/WebKit/wx/ChangeLog

    r79589 r79953  
     12011-02-28  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        Remove the support of Frame::isContentEditable and its dependencies.
     6        https://bugs.webkit.org/show_bug.cgi?id=54292
     7
     8        Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
     9
     10        * WebFrame.cpp:
     11        (wxWebFrame::wxWebFrame):
     12        (wxWebFrame::MakeEditable):
     13        (wxWebFrame::IsEditable):
     14        * WebFrame.h:
     15        * WebKitSupport/EditorClientWx.cpp:
     16        * WebKitSupport/EditorClientWx.h:
     17        * WebView.cpp:
     18        (wxWebView::wxWebView):
     19        * WebView.h:
     20
    1212011-02-24  Peter Kasting  <pkasting@google.com>
    222
  • trunk/Source/WebKit/wx/WebFrame.cpp

    r70931 r79953  
    7878wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameData* data) :
    7979    m_textMagnifier(1.0),
    80     m_isEditable(false),
    8180    m_isInitialized(false),
    8281    m_beingDestroyed(false)
     
    404403void wxWebFrame::MakeEditable(bool enable)
    405404{
    406     m_isEditable = enable;
    407 }
    408 
    409 
     405    if (enable != IsEditable() && m_impl->frame && m_impl->frame->document())
     406        m_impl->frame->document()->setDesignMode(enable ? WebCore::Document::on : WebCore::Document::off);
     407}
     408
     409bool wxWebFrame::IsEditable()
     410{
     411    if (m_impl->frame && m_impl->frame->document())
     412        return m_impl->frame->document()->inDesignMode();
     413    return false;
     414}
    410415
    411416bool wxWebFrame::CanCopy()
  • trunk/Source/WebKit/wx/WebFrame.h

    r66314 r79953  
    160160    void ResetTextSize();
    161161    void MakeEditable(bool enable);
    162     bool IsEditable() const { return m_isEditable; }
     162    bool IsEditable() const;
    163163   
    164164    WebCore::Frame* GetFrame();
     
    174174private:
    175175    float m_textMagnifier;
    176     bool m_isEditable;
    177176    bool m_isInitialized;
    178177    bool m_beingDestroyed;
  • trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp

    r78532 r79953  
    198198}
    199199
    200 bool EditorClientWx::isEditable()
    201 {
    202     Frame* frame = m_page->focusController()->focusedOrMainFrame();
    203 
    204     if (frame) {
    205         wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
    206         if (webKitWin)
    207             return webKitWin->IsEditable();
    208     }
    209     return false;
    210 }
    211 
    212200bool EditorClientWx::shouldBeginEditing(Range*)
    213201{
  • trunk/Source/WebKit/wx/WebKitSupport/EditorClientWx.h

    r78533 r79953  
    5858
    5959    virtual bool selectWordBeforeMenuEvent();
    60     virtual bool isEditable();
    6160
    6261    virtual bool shouldBeginEditing(Range*);
  • trunk/Source/WebKit/wx/WebView.cpp

    r75857 r79953  
    328328wxWebView::wxWebView() :
    329329    m_textMagnifier(1.0),
    330     m_isEditable(false),
    331330    m_isInitialized(false),
    332331    m_beingDestroyed(false),
     
    339338                     const wxSize& size, long style, const wxString& name) :
    340339    m_textMagnifier(1.0),
    341     m_isEditable(false),
    342340    m_isInitialized(false),
    343341    m_beingDestroyed(false),
  • trunk/Source/WebKit/wx/WebView.h

    r71499 r79953  
    250250#endif
    251251    float m_textMagnifier;
    252     bool m_isEditable;
    253252    bool m_isInitialized;
    254253    bool m_beingDestroyed;
Note: See TracChangeset for help on using the changeset viewer.