| 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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1233 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
| 1234 if (pluginContainer) | 1234 if (pluginContainer) |
| 1235 return pluginContainer->plugin()->hasSelection(); | 1235 return pluginContainer->plugin()->hasSelection(); |
| 1236 | 1236 |
| 1237 // frame()->selection()->isNone() never returns true. | 1237 // frame()->selection()->isNone() never returns true. |
| 1238 return frame()->selection().start() != frame()->selection().end(); | 1238 return frame()->selection().start() != frame()->selection().end(); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 WebRange WebLocalFrameImpl::selectionRange() const | 1241 WebRange WebLocalFrameImpl::selectionRange() const |
| 1242 { | 1242 { |
| 1243 return frame()->selection().toNormalizedRange(); | 1243 return createRange(frame()->selection().selection().toNormalizedEphemeralRan
ge()); |
| 1244 } | 1244 } |
| 1245 | 1245 |
| 1246 WebString WebLocalFrameImpl::selectionAsText() const | 1246 WebString WebLocalFrameImpl::selectionAsText() const |
| 1247 { | 1247 { |
| 1248 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1248 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
| 1249 if (pluginContainer) | 1249 if (pluginContainer) |
| 1250 return pluginContainer->plugin()->selectionAsText(); | 1250 return pluginContainer->plugin()->selectionAsText(); |
| 1251 | 1251 |
| 1252 const EphemeralRange range = frame()->selection().selection().toNormalizedEp
hemeralRange(); | 1252 const EphemeralRange range = frame()->selection().selection().toNormalizedEp
hemeralRange(); |
| 1253 if (range.isNull()) | 1253 if (range.isNull()) |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2211 } | 2211 } |
| 2212 | 2212 |
| 2213 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2213 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
| 2214 { | 2214 { |
| 2215 if (!frame()) | 2215 if (!frame()) |
| 2216 return WebSandboxFlags::None; | 2216 return WebSandboxFlags::None; |
| 2217 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2217 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2218 } | 2218 } |
| 2219 | 2219 |
| 2220 } // namespace blink | 2220 } // namespace blink |
| OLD | NEW |