Source/WebCore/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 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 * accessibility/AccessibilityRenderObject.cpp:
 13 (WebCore::AccessibilityRenderObject::isReadOnly):
 14 * editing/Editor.cpp:
 15 * editing/Editor.h:
 16 * editing/SelectionController.cpp:
 17 (WebCore::SelectionController::setSelectionFromNone):
 18 * html/HTMLElement.cpp:
 19 (WebCore::HTMLElement::isContentEditable):
 20 (WebCore::HTMLElement::isContentRichlyEditable):
 21 * page/DragController.cpp:
 22 (WebCore::DragController::operationForLoad):
 23 * page/EditorClient.h:
 24 * page/Frame.cpp:
 25 * page/Frame.h:
 26
1272011-02-14 Alexander Pavlov <apavlov@chromium.org>
228
329 Reviewed by Yury Semikhatsky.
78489

Source/WebCore/accessibility/AccessibilityRenderObject.cpp

@@bool AccessibilityRenderObject::isReadOn
662662 HTMLElement* body = document->body();
663663 if (body && body->isContentEditable())
664664 return false;
665 
666  Frame* frame = document->frame();
667  if (!frame)
668  return true;
669 
670  return !frame->isContentEditable();
 665
 666 return !document->inDesignMode();
671667 }
672668
673669 if (m_renderer->isBoxModelObject()) {
78487

Source/WebCore/editing/Editor.cpp

@@void Editor::applyParagraphStyleToSelect
938938 applyParagraphStyle(style, editingAction);
939939}
940940
941 bool Editor::clientIsEditable() const
942 {
943  return client() && client()->isEditable();
944 }
945 
946941// CSS properties that only has a visual difference when applied to text.
947942static const int textOnlyProperties[] = {
948943 CSSPropertyTextDecoration,
78487

Source/WebCore/editing/Editor.h

@@public:
167167
168168 bool selectionStartHasStyle(CSSStyleDeclaration*) const;
169169
170  bool clientIsEditable() const;
171 
172170 void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; }
173171 bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; }
174172
78487

Source/WebCore/editing/SelectionController.cpp

@@void SelectionController::setSelectionFr
17671767
17681768 Document* document = m_frame->document();
17691769 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
1770  if (!isNone() || !(m_frame->isContentEditable() || caretBrowsing))
 1770 if (!isNone() || !(document->inDesignMode() || caretBrowsing))
17711771 return;
17721772
17731773 Node* node = document->documentElement();
78487

Source/WebCore/html/HTMLElement.cpp

@@bool HTMLElement::supportsFocus() const
655655
656656bool HTMLElement::isContentEditable() const
657657{
658  if (document()->frame() && document()->frame()->isContentEditable())
 658 if (document()->inDesignMode())
659659 return true;
660660
661661 // Ideally we'd call ASSERT!needsStyleRecalc()) here, but

@@bool HTMLElement::isContentEditable() co
674674
675675bool HTMLElement::isContentRichlyEditable() const
676676{
677  if (document()->frame() && document()->frame()->isContentEditable())
 677 if (document()->inDesignMode())
678678 return true;
679679
680680 if (!renderer()) {
78487

Source/WebCore/page/DragController.cpp

@@DragOperation DragController::operationF
353353{
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);
359359}
78487

Source/WebCore/page/EditorClient.h

@@public:
109109 virtual bool isGrammarCheckingEnabled() = 0;
110110 virtual void toggleGrammarChecking() = 0;
111111 virtual int spellCheckerDocumentTag() = 0;
112 
113  virtual bool isEditable() = 0;
114112
115113 virtual bool shouldBeginEditing(Range*) = 0;
116114 virtual bool shouldEndEditing(Range*) = 0;
78487

Source/WebCore/page/Frame.cpp

@@void Frame::injectUserScriptsForWorld(DO
551551 }
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()
563556{
78487

Source/WebCore/page/Frame.h

@@namespace WebCore {
182182 DragImageRef nodeImage(Node*);
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);
189187
78487

Source/WebKit/chromium/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 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-14 Pavel Podivilov <podivilov@chromium.org>
214
315 Reviewed by Yury Semikhatsky.
78488

Source/WebKit/chromium/src/EditorClientImpl.cpp

@@int EditorClientImpl::spellCheckerDocume
187187 return 0;
188188}
189189
190 bool EditorClientImpl::isEditable()
191 {
192  return false;
193 }
194 
195190bool EditorClientImpl::shouldBeginEditing(Range* range)
196191{
197192 if (m_webView->client())
78487

Source/WebKit/chromium/src/EditorClientImpl.h

@@public:
5858 virtual bool isGrammarCheckingEnabled();
5959 virtual void toggleGrammarChecking();
6060 virtual int spellCheckerDocumentTag();
61  virtual bool isEditable();
6261 virtual bool shouldBeginEditing(WebCore::Range*);
6362 virtual bool shouldEndEditing(WebCore::Range*);
6463 virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction);
78487

Source/WebKit/efl/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 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-08 Adam Barth <abarth@webkit.org>
214
315 Reviewed by Eric Seidel.
78489

Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp

@@void EditorClientEfl::didSetSelectionTyp
145145 notImplemented();
146146}
147147
148 bool EditorClientEfl::isEditable()
149 {
150  notImplemented();
151  return false;
152 }
153 
154148void EditorClientEfl::registerCommandForUndo(WTF::PassRefPtr<EditCommand>)
155149{
156150 notImplemented();
78487

Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h

@@public:
6060 virtual void toggleGrammarChecking();
6161 virtual int spellCheckerDocumentTag();
6262
63  virtual bool isEditable();
64 
6563 virtual bool shouldBeginEditing(Range*);
6664 virtual bool shouldEndEditing(Range*);
6765 virtual bool shouldInsertNode(Node*, Range*, EditorInsertAction);
78487

Source/WebKit/gtk/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 6 https://bugs.webkit.org/show_bug.cgi?id=54292
 7
 8 Remove the WebKit side implementation.
 9
 10 * WebCoreSupport/EditorClientGtk.cpp:
 11 * WebCoreSupport/EditorClientGtk.h:
 12
1132011-02-11 Sheriff Bot <webkit.review.bot@gmail.com>
214
315 Unreviewed, rolling out r78331.
78489

Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp

@@void EditorClient::didSetSelectionTypesF
481481 notImplemented();
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{
491486 if (undoStack.size() == maximumUndoStackDepth)
78487

Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h

@@namespace WebKit {
8080 virtual void toggleGrammarChecking();
8181 virtual int spellCheckerDocumentTag();
8282
83  virtual bool isEditable();
84 
8583 virtual bool shouldBeginEditing(WebCore::Range*);
8684 virtual bool shouldEndEditing(WebCore::Range*);
8785 virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction);
78487

Source/WebKit/haiku/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 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-08 Adam Barth <abarth@webkit.org>
214
315 Reviewed by Eric Seidel.
78489

Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp

@@int EditorClientHaiku::spellCheckerDocum
113113 return 0;
114114}
115115
116 bool EditorClientHaiku::isEditable()
117 {
118  // FIXME: should be controllable
119  return false;
120 }
121 
122116bool EditorClientHaiku::shouldBeginEditing(WebCore::Range*)
123117{
124118 notImplemented();
78487

Source/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h

@@namespace WebCore {
5757 virtual void toggleGrammarChecking();
5858 virtual int spellCheckerDocumentTag();
5959
60  virtual bool isEditable();
61 
6260 virtual bool shouldBeginEditing(Range*);
6361 virtual bool shouldEndEditing(Range*);
6462 virtual bool shouldInsertNode(Node*, Range*, EditorInsertAction);
78487

Source/WebKit/mac/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 6 https://bugs.webkit.org/show_bug.cgi?id=54292
 7
 8 Remove the WebKit side implementation.
 9
 10 * WebCoreSupport/WebEditorClient.h:
 11 * WebCoreSupport/WebEditorClient.mm:
 12
1132011-02-11 Geoffrey Garen <ggaren@apple.com>
214
315 Reviewed by Oliver Hunt.
78489

Source/WebKit/mac/WebCoreSupport/WebEditorClient.h

@@public:
5050
5151 virtual bool smartInsertDeleteEnabled();
5252 virtual bool isSelectTrailingWhitespaceEnabled();
53  virtual bool isEditable();
5453
5554 virtual bool shouldDeleteRange(WebCore::Range*);
5655 virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*);
78487

Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

@@int WebEditorClient::spellCheckerDocumen
246246 return [m_webView spellCheckerDocumentTag];
247247}
248248
249 bool WebEditorClient::isEditable()
250 {
251  return [m_webView isEditable];
252 }
253 
254249bool WebEditorClient::shouldDeleteRange(Range* range)
255250{
256251 return [[m_webView _editingDelegateForwarder] webView:m_webView
78487

Source/WebKit/qt/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 6 https://bugs.webkit.org/show_bug.cgi?id=54292
 7
 8 Remove the WebKit side implementation.
 9
 10 * WebCoreSupport/EditorClientQt.cpp:
 11 * WebCoreSupport/EditorClientQt.h:
 12
1132011-02-11 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
214
315 Reviewed by Tor Arne Vestbø.
78489

Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

@@bool EditorClientQt::selectWordBeforeMen
238238 return false;
239239}
240240
241 bool EditorClientQt::isEditable()
242 {
243  return m_page->isContentEditable();
244 }
245 
246241void EditorClientQt::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> cmd)
247242{
248243#ifndef QT_NO_UNDOSTACK
78487

Source/WebKit/qt/WebCoreSupport/EditorClientQt.h

@@public:
5656 virtual void toggleGrammarChecking();
5757 virtual int spellCheckerDocumentTag();
5858 virtual bool selectWordBeforeMenuEvent();
59  virtual bool isEditable();
6059
6160 virtual bool shouldBeginEditing(Range*);
6261 virtual bool shouldEndEditing(Range*);
78487

Source/WebKit/win/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 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-11 Geoffrey Garen <ggaren@apple.com>
214
315 Reviewed by Oliver Hunt.
78489

Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp

@@void WebEditorClient::handleInputMethodK
619619{
620620}
621621
622 bool WebEditorClient::isEditable()
623 {
624  return false;
625 }
626 
627622void WebEditorClient::ignoreWordInSpellDocument(const String& word)
628623{
629624 COMPtr<IWebEditingDelegate> ed;
78487

Source/WebKit/win/WebCoreSupport/WebEditorClient.h

@@public:
4949 virtual void toggleContinuousSpellChecking();
5050 virtual int spellCheckerDocumentTag();
5151
52  virtual bool isEditable();
53 
5452 virtual bool shouldBeginEditing(WebCore::Range*);
5553 virtual bool shouldEndEditing(WebCore::Range*);
5654 virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction);
78487

Source/WebKit/wince/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 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-10 Nate Chapin <japhet@chromium.org>
214
315 Reviewed by Adam Barth.
78489

Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp

@@void EditorClientWinCE::didSetSelectionT
144144 notImplemented();
145145}
146146
147 bool EditorClientWinCE::isEditable()
148 {
149  notImplemented();
150  return false;
151 }
152 
153147void EditorClientWinCE::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command)
154148{
155149 notImplemented();
78487

Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.h

@@public:
4848 virtual void toggleGrammarChecking();
4949 virtual int spellCheckerDocumentTag();
5050
51  virtual bool isEditable();
52 
5351 virtual bool shouldBeginEditing(WebCore::Range*);
5452 virtual bool shouldEndEditing(WebCore::Range*);
5553 virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction);
78487

Source/WebKit/wx/ChangeLog

 12011-02-14 Chang Shu <cshu@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Remove the support of Frame::isContentEditable, Editor::clientIsEditable and EditorClient::isEditable.
 6 https://bugs.webkit.org/show_bug.cgi?id=54292
 7
 8 Remove the WebKit side implementation.
 9
 10 * WebKitSupport/EditorClientWx.cpp:
 11 * WebKitSupport/EditorClientWx.h:
 12
1132011-02-10 Nate Chapin <japhet@chromium.org>
214
315 Reviewed by Adam Barth.
78489

Source/WebKit/wx/WebKitSupport/EditorClientWx.cpp

@@bool EditorClientWx::selectWordBeforeMen
197197 return false;
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{
214202 notImplemented();
78487

Source/WebKit/wx/WebKitSupport/EditorClientWx.h

@@public:
5656 virtual int spellCheckerDocumentTag();
5757
5858 virtual bool selectWordBeforeMenuEvent();
59  virtual bool isEditable();
6059
6160 virtual bool shouldBeginEditing(Range*);
6261 virtual bool shouldEndEditing(Range*);
78487