Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/DocumentExecCommand.cpp

Issue 2636963003: Revert of [EditCommandSource] Rename and move |EditorCommandSource| to "CompositeEditCommand.h (1/3) (Closed)
Patch Set: Fix conflicts Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 29 matching lines...) Expand all
40 namespace blink { 40 namespace blink {
41 41
42 namespace { 42 namespace {
43 43
44 Editor::Command command(Document* document, const String& commandName) { 44 Editor::Command command(Document* document, const String& commandName) {
45 LocalFrame* frame = document->frame(); 45 LocalFrame* frame = document->frame();
46 if (!frame || frame->document() != document) 46 if (!frame || frame->document() != document)
47 return Editor::Command(); 47 return Editor::Command();
48 48
49 document->updateStyleAndLayoutTree(); 49 document->updateStyleAndLayoutTree();
50 return frame->editor().createCommandFromDOM(commandName); 50 return frame->editor().createCommand(commandName, CommandFromDOM);
51 } 51 }
52 52
53 } // namespace 53 } // namespace
54 54
55 bool Document::execCommand(const String& commandName, 55 bool Document::execCommand(const String& commandName,
56 bool, 56 bool,
57 const String& value, 57 const String& value,
58 ExceptionState& exceptionState) { 58 ExceptionState& exceptionState) {
59 if (!isHTMLDocument() && !isXHTMLDocument()) { 59 if (!isHTMLDocument() && !isXHTMLDocument()) {
60 exceptionState.throwDOMException( 60 exceptionState.throwDOMException(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 exceptionState.throwDOMException( 145 exceptionState.throwDOMException(
146 InvalidStateError, 146 InvalidStateError,
147 "queryCommandValue is only supported on HTML documents."); 147 "queryCommandValue is only supported on HTML documents.");
148 return ""; 148 return "";
149 } 149 }
150 150
151 return command(this, commandName).value(); 151 return command(this, commandName).value();
152 } 152 }
153 153
154 } // namespace blink 154 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698