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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 void WebLocalFrameImpl::removeSpellingMarkers() { | 1079 void WebLocalFrameImpl::removeSpellingMarkers() { |
1080 frame()->spellChecker().removeSpellingMarkers(); | 1080 frame()->spellChecker().removeSpellingMarkers(); |
1081 } | 1081 } |
1082 | 1082 |
1083 bool WebLocalFrameImpl::hasSelection() const { | 1083 bool WebLocalFrameImpl::hasSelection() const { |
1084 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1084 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
1085 if (pluginContainer) | 1085 if (pluginContainer) |
1086 return pluginContainer->plugin()->hasSelection(); | 1086 return pluginContainer->plugin()->hasSelection(); |
1087 | 1087 |
1088 // frame()->selection()->isNone() never returns true. | 1088 // frame()->selection()->isNone() never returns true. |
1089 return frame()->selection().start() != frame()->selection().end(); | 1089 return frame()->selection().start() != |
| 1090 frame() |
| 1091 ->selection() |
| 1092 .computeVisibleSelectionInDOMTreeDeprecated() |
| 1093 .end(); |
1090 } | 1094 } |
1091 | 1095 |
1092 WebRange WebLocalFrameImpl::selectionRange() const { | 1096 WebRange WebLocalFrameImpl::selectionRange() const { |
1093 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1097 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
1094 // needs to be audited. See http://crbug.com/590369 for more details. | 1098 // needs to be audited. See http://crbug.com/590369 for more details. |
1095 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1099 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
1096 | 1100 |
1097 return frame() | 1101 return frame() |
1098 ->selection() | 1102 ->selection() |
1099 .computeVisibleSelectionInDOMTreeDeprecated() | 1103 .computeVisibleSelectionInDOMTreeDeprecated() |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2435 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2439 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2436 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2440 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2437 } else { | 2441 } else { |
2438 clipHtml = | 2442 clipHtml = |
2439 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2443 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2440 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2444 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2441 } | 2445 } |
2442 } | 2446 } |
2443 | 2447 |
2444 } // namespace blink | 2448 } // namespace blink |
OLD | NEW |