| 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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 { | 1110 { |
| 1111 return frame()->selection().selection().toNormalizedEphemeralRange(); | 1111 return frame()->selection().selection().toNormalizedEphemeralRange(); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 WebString WebLocalFrameImpl::selectionAsText() const | 1114 WebString WebLocalFrameImpl::selectionAsText() const |
| 1115 { | 1115 { |
| 1116 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1116 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
| 1117 if (pluginContainer) | 1117 if (pluginContainer) |
| 1118 return pluginContainer->plugin()->selectionAsText(); | 1118 return pluginContainer->plugin()->selectionAsText(); |
| 1119 | 1119 |
| 1120 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1121 // needs to be audited. See http://crbug.com/590369 for more details. |
| 1122 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1123 |
| 1120 String text = frame()->selection().selectedText(TextIteratorEmitsObjectRepla
cementCharacter); | 1124 String text = frame()->selection().selectedText(TextIteratorEmitsObjectRepla
cementCharacter); |
| 1121 #if OS(WIN) | 1125 #if OS(WIN) |
| 1122 replaceNewlinesWithWindowsStyleNewlines(text); | 1126 replaceNewlinesWithWindowsStyleNewlines(text); |
| 1123 #endif | 1127 #endif |
| 1124 replaceNBSPWithSpace(text); | 1128 replaceNBSPWithSpace(text); |
| 1125 return text; | 1129 return text; |
| 1126 } | 1130 } |
| 1127 | 1131 |
| 1128 WebString WebLocalFrameImpl::selectionAsMarkup() const | 1132 WebString WebLocalFrameImpl::selectionAsMarkup() const |
| 1129 { | 1133 { |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2222 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2226 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2223 } else if (metric == "wasAlternateProtocolAvailable") { | 2227 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2224 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2228 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2225 } else if (metric == "connectionInfo") { | 2229 } else if (metric == "connectionInfo") { |
| 2226 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2230 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2227 } | 2231 } |
| 2228 UseCounter::count(frame(), feature); | 2232 UseCounter::count(frame(), feature); |
| 2229 } | 2233 } |
| 2230 | 2234 |
| 2231 } // namespace blink | 2235 } // namespace blink |
| OLD | NEW |