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

Unified Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 715963003: Remove alt text from images. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: minor improvement Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/editing/TextIterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/FrameSelection.cpp
diff --git a/sky/engine/core/editing/FrameSelection.cpp b/sky/engine/core/editing/FrameSelection.cpp
index 162d700d0adfb3d4529b8d79046d4f8e622bee45..58f72e70199a3398f02637ae7f1b2ab1474a1e83 100644
--- a/sky/engine/core/editing/FrameSelection.cpp
+++ b/sky/engine/core/editing/FrameSelection.cpp
@@ -1564,22 +1564,10 @@ void FrameSelection::setFocusedNodeIfNeeded()
}
}
-static String extractSelectedText(const FrameSelection& selection, TextIteratorBehavior behavior)
-{
- // We remove '\0' characters because they are not visibly rendered to the user.
- return plainText(selection.toNormalizedRange().get(), behavior).replace(0, "");
-}
-
String FrameSelection::selectedText() const
{
- return extractSelectedText(*this, TextIteratorDefaultBehavior);
-}
-
-String FrameSelection::selectedTextForClipboard() const
-{
- if (m_frame->settings() && m_frame->settings()->selectionIncludesAltImageText())
- return extractSelectedText(*this, TextIteratorEmitsImageAltText);
- return selectedText();
+ // We remove '\0' characters because they are not visibly rendered to the user.
+ return plainText(toNormalizedRange().get()).replace(0, "");
}
FloatRect FrameSelection::bounds(bool clipToVisibleContent) const
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/editing/TextIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698