| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2311 void Internals::setValueForUser(Element* element, const String& value) | 2311 void Internals::setValueForUser(Element* element, const String& value) |
| 2312 { | 2312 { |
| 2313 toHTMLInputElement(element)->setValueForUser(value); | 2313 toHTMLInputElement(element)->setValueForUser(value); |
| 2314 } | 2314 } |
| 2315 | 2315 |
| 2316 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2316 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
| 2317 { | 2317 { |
| 2318 if (!node || !node->layoutObject()) | 2318 if (!node || !node->layoutObject()) |
| 2319 return String(); | 2319 return String(); |
| 2320 blink::WebPoint point(x, y); | 2320 blink::WebPoint point(x, y); |
| 2321 SurroundingText surroundingText(visiblePositionOf(node->layoutObject()->posi
tionForPoint(static_cast<IntPoint>(point))).deepEquivalent().parentAnchoredEquiv
alent(), maxLength); | 2321 SurroundingText surroundingText(createVisiblePosition(node->layoutObject()->
positionForPoint(static_cast<IntPoint>(point))).deepEquivalent().parentAnchoredE
quivalent(), maxLength); |
| 2322 return surroundingText.content(); | 2322 return surroundingText.content(); |
| 2323 } | 2323 } |
| 2324 | 2324 |
| 2325 void Internals::setFocused(bool focused) | 2325 void Internals::setFocused(bool focused) |
| 2326 { | 2326 { |
| 2327 frame()->page()->focusController().setFocused(focused); | 2327 frame()->page()->focusController().setFocused(focused); |
| 2328 } | 2328 } |
| 2329 | 2329 |
| 2330 void Internals::setInitialFocus(bool reverse) | 2330 void Internals::setInitialFocus(bool reverse) |
| 2331 { | 2331 { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2462 | 2462 |
| 2463 return animator->setScrollbarsVisibleForTesting(visible); | 2463 return animator->setScrollbarsVisibleForTesting(visible); |
| 2464 } | 2464 } |
| 2465 | 2465 |
| 2466 void Internals::forceRestrictIFramePermissions() | 2466 void Internals::forceRestrictIFramePermissions() |
| 2467 { | 2467 { |
| 2468 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); | 2468 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); |
| 2469 } | 2469 } |
| 2470 | 2470 |
| 2471 } // namespace blink | 2471 } // namespace blink |
| OLD | NEW |