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 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 { | 1276 { |
1277 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1277 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
1278 if (pluginContainer) | 1278 if (pluginContainer) |
1279 return pluginContainer->plugin()->selectionAsText(); | 1279 return pluginContainer->plugin()->selectionAsText(); |
1280 | 1280 |
1281 RefPtr<Range> range = frame()->selection().toNormalizedRange(); | 1281 RefPtr<Range> range = frame()->selection().toNormalizedRange(); |
1282 if (!range) | 1282 if (!range) |
1283 return WebString(); | 1283 return WebString(); |
1284 | 1284 |
1285 String text = range->text(); | 1285 String text = range->text(); |
1286 #if OS(WINDOWS) | 1286 #if OS(WIN) |
1287 replaceNewlinesWithWindowsStyleNewlines(text); | 1287 replaceNewlinesWithWindowsStyleNewlines(text); |
1288 #endif | 1288 #endif |
1289 replaceNBSPWithSpace(text); | 1289 replaceNBSPWithSpace(text); |
1290 return text; | 1290 return text; |
1291 } | 1291 } |
1292 | 1292 |
1293 WebString WebFrameImpl::selectionAsMarkup() const | 1293 WebString WebFrameImpl::selectionAsMarkup() const |
1294 { | 1294 { |
1295 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1295 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
1296 if (pluginContainer) | 1296 if (pluginContainer) |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2476 | 2476 |
2477 // There is a possibility that the frame being detached was the only | 2477 // There is a possibility that the frame being detached was the only |
2478 // pending one. We need to make sure final replies can be sent. | 2478 // pending one. We need to make sure final replies can be sent. |
2479 flushCurrentScopingEffort(m_findRequestIdentifier); | 2479 flushCurrentScopingEffort(m_findRequestIdentifier); |
2480 | 2480 |
2481 cancelPendingScopingEffort(); | 2481 cancelPendingScopingEffort(); |
2482 } | 2482 } |
2483 } | 2483 } |
2484 | 2484 |
2485 } // namespace WebKit | 2485 } // namespace WebKit |
OLD | NEW |