OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |