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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2578753002: [EditCommandSource] Rename and move |EditorCommandSource| to "CompositeEditCommand.h" (1/3) (Closed)
Patch Set: Xiaocheng and tkent's review: Rename to |EditCommandSource| and use kCamelCase Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4938 matching lines...) Expand 10 before | Expand all | Expand 10 after
4949 } 4949 }
4950 4950
4951 // Support for Javascript execCommand, and related methods 4951 // Support for Javascript execCommand, and related methods
4952 4952
4953 static Editor::Command command(Document* document, const String& commandName) { 4953 static Editor::Command command(Document* document, const String& commandName) {
4954 LocalFrame* frame = document->frame(); 4954 LocalFrame* frame = document->frame();
4955 if (!frame || frame->document() != document) 4955 if (!frame || frame->document() != document)
4956 return Editor::Command(); 4956 return Editor::Command();
4957 4957
4958 document->updateStyleAndLayoutTree(); 4958 document->updateStyleAndLayoutTree();
4959 return frame->editor().createCommand(commandName, CommandFromDOM); 4959 return frame->editor().createCommandFromDOM(commandName);
4960 } 4960 }
4961 4961
4962 bool Document::execCommand(const String& commandName, 4962 bool Document::execCommand(const String& commandName,
4963 bool, 4963 bool,
4964 const String& value, 4964 const String& value,
4965 ExceptionState& exceptionState) { 4965 ExceptionState& exceptionState) {
4966 if (!isHTMLDocument() && !isXHTMLDocument()) { 4966 if (!isHTMLDocument() && !isXHTMLDocument()) {
4967 exceptionState.throwDOMException( 4967 exceptionState.throwDOMException(
4968 InvalidStateError, "execCommand is only supported on HTML documents."); 4968 InvalidStateError, "execCommand is only supported on HTML documents.");
4969 return false; 4969 return false;
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
6572 } 6572 }
6573 6573
6574 void showLiveDocumentInstances() { 6574 void showLiveDocumentInstances() {
6575 WeakDocumentSet& set = liveDocumentSet(); 6575 WeakDocumentSet& set = liveDocumentSet();
6576 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6576 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6577 for (Document* document : set) 6577 for (Document* document : set)
6578 fprintf(stderr, "- Document %p URL: %s\n", document, 6578 fprintf(stderr, "- Document %p URL: %s\n", document,
6579 document->url().getString().utf8().data()); 6579 document->url().getString().utf8().data());
6580 } 6580 }
6581 #endif 6581 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698