| 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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1066 |
| 1067 void WebLocalFrameImpl::requestTextChecking(const WebElement& webElement) | 1067 void WebLocalFrameImpl::requestTextChecking(const WebElement& webElement) |
| 1068 { | 1068 { |
| 1069 if (webElement.isNull()) | 1069 if (webElement.isNull()) |
| 1070 return; | 1070 return; |
| 1071 | 1071 |
| 1072 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
needs to be audited. | 1072 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
needs to be audited. |
| 1073 // see http://crbug.com/590369 for more details. | 1073 // see http://crbug.com/590369 for more details. |
| 1074 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1074 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1075 | 1075 |
| 1076 DocumentLifecycle::DisallowTransitionScope(frame()->document()->lifecycle())
; | 1076 DocumentLifecycle::DisallowTransitionScope disallowTransition(frame()->docum
ent()->lifecycle()); |
| 1077 | 1077 |
| 1078 frame()->spellChecker().requestTextChecking(*webElement.constUnwrap<Element>
()); | 1078 frame()->spellChecker().requestTextChecking(*webElement.constUnwrap<Element>
()); |
| 1079 } | 1079 } |
| 1080 | 1080 |
| 1081 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) | 1081 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) |
| 1082 { | 1082 { |
| 1083 // If this caret selection has two or more markers, this function replace th
e range covered by the first marker with the specified word as Microsoft Word do
es. | 1083 // If this caret selection has two or more markers, this function replace th
e range covered by the first marker with the specified word as Microsoft Word do
es. |
| 1084 if (pluginContainerFromFrame(frame())) | 1084 if (pluginContainerFromFrame(frame())) |
| 1085 return; | 1085 return; |
| 1086 frame()->spellChecker().replaceMisspelledRange(text); | 1086 frame()->spellChecker().replaceMisspelledRange(text); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 void WebLocalFrameImpl::selectRange(const WebRange& webRange) | 1152 void WebLocalFrameImpl::selectRange(const WebRange& webRange) |
| 1153 { | 1153 { |
| 1154 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectRange"); | 1154 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectRange"); |
| 1155 | 1155 |
| 1156 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. | 1156 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. |
| 1157 // see http://crbug.com/590369 for more details. | 1157 // see http://crbug.com/590369 for more details. |
| 1158 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1158 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1159 | 1159 |
| 1160 DocumentLifecycle::DisallowTransitionScope(frame()->document()->lifecycle())
; | 1160 DocumentLifecycle::DisallowTransitionScope disallowTransition(frame()->docum
ent()->lifecycle()); |
| 1161 | 1161 |
| 1162 frame()->selection().setSelectedRange(webRange.createEphemeralRange(frame())
, VP_DEFAULT_AFFINITY, SelectionDirectionalMode::NonDirectional, NotUserTriggere
d); | 1162 frame()->selection().setSelectedRange(webRange.createEphemeralRange(frame())
, VP_DEFAULT_AFFINITY, SelectionDirectionalMode::NonDirectional, NotUserTriggere
d); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 WebString WebLocalFrameImpl::rangeAsText(const WebRange& webRange) | 1165 WebString WebLocalFrameImpl::rangeAsText(const WebRange& webRange) |
| 1166 { | 1166 { |
| 1167 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. | 1167 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. |
| 1168 // see http://crbug.com/590369 for more details. | 1168 // see http://crbug.com/590369 for more details. |
| 1169 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1169 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1170 | 1170 |
| 1171 DocumentLifecycle::DisallowTransitionScope(frame()->document()->lifecycle())
; | 1171 DocumentLifecycle::DisallowTransitionScope disallowTransition(frame()->docum
ent()->lifecycle()); |
| 1172 | 1172 |
| 1173 return plainText(webRange.createEphemeralRange(frame()), TextIteratorEmitsOb
jectReplacementCharacter); | 1173 return plainText(webRange.createEphemeralRange(frame()), TextIteratorEmitsOb
jectReplacementCharacter); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 void WebLocalFrameImpl::moveRangeSelectionExtent(const WebPoint& point) | 1176 void WebLocalFrameImpl::moveRangeSelectionExtent(const WebPoint& point) |
| 1177 { | 1177 { |
| 1178 TRACE_EVENT0("blink", "WebLocalFrameImpl::moveRangeSelectionExtent"); | 1178 TRACE_EVENT0("blink", "WebLocalFrameImpl::moveRangeSelectionExtent"); |
| 1179 frame()->selection().moveRangeSelectionExtent(frame()->view()->viewportToCon
tents(point)); | 1179 frame()->selection().moveRangeSelectionExtent(frame()->view()->viewportToCon
tents(point)); |
| 1180 } | 1180 } |
| 1181 | 1181 |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2202 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2202 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2203 } else if (metric == "wasAlternateProtocolAvailable") { | 2203 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2204 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2204 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2205 } else if (metric == "connectionInfo") { | 2205 } else if (metric == "connectionInfo") { |
| 2206 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2206 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2207 } | 2207 } |
| 2208 UseCounter::count(frame(), feature); | 2208 UseCounter::count(frame(), feature); |
| 2209 } | 2209 } |
| 2210 | 2210 |
| 2211 } // namespace blink | 2211 } // namespace blink |
| OLD | NEW |