| 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 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 ContextLifecycleObserver::trace(visitor); | 2307 ContextLifecycleObserver::trace(visitor); |
| 2308 } | 2308 } |
| 2309 | 2309 |
| 2310 void Internals::setValueForUser(Element* element, const String& value) | 2310 void Internals::setValueForUser(Element* element, const String& value) |
| 2311 { | 2311 { |
| 2312 toHTMLInputElement(element)->setValueForUser(value); | 2312 toHTMLInputElement(element)->setValueForUser(value); |
| 2313 } | 2313 } |
| 2314 | 2314 |
| 2315 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2315 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
| 2316 { | 2316 { |
| 2317 if (!node) | 2317 if (!node || !node->layoutObject()) |
| 2318 return String(); | 2318 return String(); |
| 2319 blink::WebPoint point(x, y); | 2319 blink::WebPoint point(x, y); |
| 2320 SurroundingText surroundingText(VisiblePosition(node->layoutObject()->positi
onForPoint(static_cast<IntPoint>(point))).deepEquivalent().parentAnchoredEquival
ent(), maxLength); | 2320 SurroundingText surroundingText(VisiblePosition(node->layoutObject()->positi
onForPoint(static_cast<IntPoint>(point))).deepEquivalent().parentAnchoredEquival
ent(), maxLength); |
| 2321 return surroundingText.content(); | 2321 return surroundingText.content(); |
| 2322 } | 2322 } |
| 2323 | 2323 |
| 2324 void Internals::setFocused(bool focused) | 2324 void Internals::setFocused(bool focused) |
| 2325 { | 2325 { |
| 2326 frame()->page()->focusController().setFocused(focused); | 2326 frame()->page()->focusController().setFocused(focused); |
| 2327 } | 2327 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 return ClientRectList::create(rects); | 2456 return ClientRectList::create(rects); |
| 2457 } | 2457 } |
| 2458 | 2458 |
| 2459 void Internals::setCapsLockState(bool enabled) | 2459 void Internals::setCapsLockState(bool enabled) |
| 2460 { | 2460 { |
| 2461 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? | 2461 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? |
| 2462 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent
::OverrideCapsLockState::Off); | 2462 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent
::OverrideCapsLockState::Off); |
| 2463 } | 2463 } |
| 2464 | 2464 |
| 2465 } // namespace blink | 2465 } // namespace blink |
| OLD | NEW |