| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 replaceNBSPWithSpace(text); | 1247 replaceNBSPWithSpace(text); |
| 1248 return text; | 1248 return text; |
| 1249 } | 1249 } |
| 1250 | 1250 |
| 1251 WebString WebLocalFrameImpl::selectionAsMarkup() const | 1251 WebString WebLocalFrameImpl::selectionAsMarkup() const |
| 1252 { | 1252 { |
| 1253 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1253 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
| 1254 if (pluginContainer) | 1254 if (pluginContainer) |
| 1255 return pluginContainer->plugin()->selectionAsMarkup(); | 1255 return pluginContainer->plugin()->selectionAsMarkup(); |
| 1256 | 1256 |
| 1257 const EphemeralRange range = frame()->selection().selection().toNormalizedEp
hemeralRange(); | 1257 return frame()->selection().selectedHTMLForClipboard(); |
| 1258 if (range.isNull()) | |
| 1259 return WebString(); | |
| 1260 | |
| 1261 return createMarkup(range.startPosition(), range.endPosition(), AnnotateForI
nterchange, ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | |
| 1262 } | 1258 } |
| 1263 | 1259 |
| 1264 void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosit
ion position) | 1260 void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosit
ion position) |
| 1265 { | 1261 { |
| 1266 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundPosition"); | 1262 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundPosition"); |
| 1267 frame->selection().selectWordAroundPosition(position); | 1263 frame->selection().selectWordAroundPosition(position); |
| 1268 } | 1264 } |
| 1269 | 1265 |
| 1270 bool WebLocalFrameImpl::selectWordAroundCaret() | 1266 bool WebLocalFrameImpl::selectWordAroundCaret() |
| 1271 { | 1267 { |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 } | 2200 } |
| 2205 | 2201 |
| 2206 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2202 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
| 2207 { | 2203 { |
| 2208 if (!frame()) | 2204 if (!frame()) |
| 2209 return WebSandboxFlags::None; | 2205 return WebSandboxFlags::None; |
| 2210 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2206 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2211 } | 2207 } |
| 2212 | 2208 |
| 2213 } // namespace blink | 2209 } // namespace blink |
| OLD | NEW |