Commit bf25948b authored by sadrul@chromium.org's avatar sadrul@chromium.org

linux-aura: Special case text-types when pasting from clipboard.

Some apps (e.g. firefox) copies plain text content in the clipboard with selection
types TEXT, STRING etc., but not text/plain (which chrome expects). So special case
text content in the clipboard, and compare the type against a known number of text-
types.

BUG=317514
R=dcheng@chromium.org, erg@chromium.org

Review URL: https://codereview.chromium.org/135593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244569 0039d316-1c4b-4281-b951-d872f2087c98
parent 08f36f70
...@@ -558,6 +558,10 @@ bool Clipboard::IsFormatAvailable(const FormatType& format, ...@@ -558,6 +558,10 @@ bool Clipboard::IsFormatAvailable(const FormatType& format,
DCHECK(IsSupportedClipboardType(type)); DCHECK(IsSupportedClipboardType(type));
TargetList target_list = aurax11_details_->WaitAndGetTargetsList(type); TargetList target_list = aurax11_details_->WaitAndGetTargetsList(type);
if (format.Equals(GetPlainTextFormatType()) ||
format.Equals(GetUrlFormatType())) {
return target_list.ContainsText();
}
return target_list.ContainsFormat(format); return target_list.ContainsFormat(format);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment