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

Side by Side Diff: Source/WebCore/editing/Editor.cpp

Issue 13936003: Remove the now unused editing/mac (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge ToT diffs Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/WebCore/editing/mac/AlternativeTextUIController.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) 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard()); 361 pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
362 } 362 }
363 363
364 void Editor::pasteAsPlainTextWithPasteboard(Pasteboard* pasteboard) 364 void Editor::pasteAsPlainTextWithPasteboard(Pasteboard* pasteboard)
365 { 365 {
366 String text = pasteboard->plainText(m_frame); 366 String text = pasteboard->plainText(m_frame);
367 if (client() && client()->shouldInsertText(text, selectedRange().get(), Edit orInsertActionPasted)) 367 if (client() && client()->shouldInsertText(text, selectedRange().get(), Edit orInsertActionPasted))
368 pasteAsPlainText(text, canSmartReplaceWithPasteboard(pasteboard)); 368 pasteAsPlainText(text, canSmartReplaceWithPasteboard(pasteboard));
369 } 369 }
370 370
371 #if !PLATFORM(MAC)
372 void Editor::pasteWithPasteboard(Pasteboard* pasteboard, bool allowPlainText) 371 void Editor::pasteWithPasteboard(Pasteboard* pasteboard, bool allowPlainText)
373 { 372 {
374 RefPtr<Range> range = selectedRange(); 373 RefPtr<Range> range = selectedRange();
375 bool chosePlainText; 374 bool chosePlainText;
376 RefPtr<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, ra nge, allowPlainText, chosePlainText); 375 RefPtr<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, ra nge, allowPlainText, chosePlainText);
377 if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPast ed)) 376 if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPast ed))
378 pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), cho sePlainText); 377 pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), cho sePlainText);
379 } 378 }
380 #endif
381 379
382 bool Editor::canSmartReplaceWithPasteboard(Pasteboard* pasteboard) 380 bool Editor::canSmartReplaceWithPasteboard(Pasteboard* pasteboard)
383 { 381 {
384 return client() && client()->smartInsertDeleteEnabled() && pasteboard->canSm artReplace(); 382 return client() && client()->smartInsertDeleteEnabled() && pasteboard->canSm artReplace();
385 } 383 }
386 384
387 bool Editor::shouldInsertFragment(PassRefPtr<DocumentFragment> fragment, PassRef Ptr<Range> replacingDOMRange, EditorInsertAction givenAction) 385 bool Editor::shouldInsertFragment(PassRefPtr<DocumentFragment> fragment, PassRef Ptr<Range> replacingDOMRange, EditorInsertAction givenAction)
388 { 386 {
389 if (!client()) 387 if (!client())
390 return false; 388 return false;
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 { 3013 {
3016 return m_alternativeTextController->dictationAlternativesForMarker(marker); 3014 return m_alternativeTextController->dictationAlternativesForMarker(marker);
3017 } 3015 }
3018 3016
3019 void Editor::applyDictationAlternativelternative(const String& alternativeString ) 3017 void Editor::applyDictationAlternativelternative(const String& alternativeString )
3020 { 3018 {
3021 m_alternativeTextController->applyDictationAlternative(alternativeString); 3019 m_alternativeTextController->applyDictationAlternative(alternativeString);
3022 } 3020 }
3023 3021
3024 } // namespace WebCore 3022 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/editing/mac/AlternativeTextUIController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698