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

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

Issue 1666363007: Cleanup includes of XLinkNames.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGCursorElement.cpp » ('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) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 12 matching lines...) Expand all
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "core/editing/Editor.h" 27 #include "core/editing/Editor.h"
28 28
29 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 29 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
30 #include "core/CSSPropertyNames.h" 30 #include "core/CSSPropertyNames.h"
31 #include "core/EventNames.h" 31 #include "core/EventNames.h"
32 #include "core/HTMLNames.h" 32 #include "core/HTMLNames.h"
33 #include "core/XLinkNames.h"
34 #include "core/clipboard/DataObject.h" 33 #include "core/clipboard/DataObject.h"
35 #include "core/clipboard/DataTransfer.h" 34 #include "core/clipboard/DataTransfer.h"
36 #include "core/clipboard/Pasteboard.h" 35 #include "core/clipboard/Pasteboard.h"
37 #include "core/css/CSSComputedStyleDeclaration.h" 36 #include "core/css/CSSComputedStyleDeclaration.h"
38 #include "core/css/StylePropertySet.h" 37 #include "core/css/StylePropertySet.h"
39 #include "core/dom/AXObjectCache.h" 38 #include "core/dom/AXObjectCache.h"
40 #include "core/dom/DocumentFragment.h" 39 #include "core/dom/DocumentFragment.h"
41 #include "core/dom/ElementTraversal.h" 40 #include "core/dom/ElementTraversal.h"
42 #include "core/dom/NodeTraversal.h" 41 #include "core/dom/NodeTraversal.h"
43 #include "core/dom/ParserContentPolicy.h" 42 #include "core/dom/ParserContentPolicy.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 451
453 RefPtr<Image> image = imageFromNode(*node); 452 RefPtr<Image> image = imageFromNode(*node);
454 if (!image.get()) 453 if (!image.get())
455 return; 454 return;
456 455
457 // FIXME: This should probably be reconciled with HitTestResult::absoluteIma geURL. 456 // FIXME: This should probably be reconciled with HitTestResult::absoluteIma geURL.
458 AtomicString urlString; 457 AtomicString urlString;
459 if (isHTMLImageElement(*node) || isHTMLInputElement(*node)) 458 if (isHTMLImageElement(*node) || isHTMLInputElement(*node))
460 urlString = toHTMLElement(node)->getAttribute(srcAttr); 459 urlString = toHTMLElement(node)->getAttribute(srcAttr);
461 else if (isSVGImageElement(*node)) 460 else if (isSVGImageElement(*node))
462 urlString = toSVGElement(node)->getAttribute(XLinkNames::hrefAttr); 461 urlString = toSVGElement(node)->imageSourceURL();
463 else if (isHTMLEmbedElement(*node) || isHTMLObjectElement(*node) || isHTMLCa nvasElement(*node)) 462 else if (isHTMLEmbedElement(*node) || isHTMLObjectElement(*node) || isHTMLCa nvasElement(*node))
464 urlString = toHTMLElement(node)->imageSourceURL(); 463 urlString = toHTMLElement(node)->imageSourceURL();
465 KURL url = urlString.isEmpty() ? KURL() : node->document().completeURL(strip LeadingAndTrailingHTMLSpaces(urlString)); 464 KURL url = urlString.isEmpty() ? KURL() : node->document().completeURL(strip LeadingAndTrailingHTMLSpaces(urlString));
466 465
467 pasteboard->writeImage(image.get(), url, title); 466 pasteboard->writeImage(image.get(), url, title);
468 } 467 }
469 468
470 // Returns whether caller should continue with "the default processing", which i s the same as 469 // Returns whether caller should continue with "the default processing", which i s the same as
471 // the event handler NOT setting the return value to false 470 // the event handler NOT setting the return value to false
472 bool Editor::dispatchCPPEvent(const AtomicString& eventType, DataTransferAccessP olicy policy, PasteMode pasteMode) 471 bool Editor::dispatchCPPEvent(const AtomicString& eventType, DataTransferAccessP olicy policy, PasteMode pasteMode)
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 } 1379 }
1381 1380
1382 DEFINE_TRACE(Editor) 1381 DEFINE_TRACE(Editor)
1383 { 1382 {
1384 visitor->trace(m_frame); 1383 visitor->trace(m_frame);
1385 visitor->trace(m_lastEditCommand); 1384 visitor->trace(m_lastEditCommand);
1386 visitor->trace(m_mark); 1385 visitor->trace(m_mark);
1387 } 1386 }
1388 1387
1389 } // namespace blink 1388 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGCursorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698