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 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2464 clip_html = | 2464 clip_html = |
2465 CreateMarkup(start_position, end_position, kAnnotateForInterchange, | 2465 CreateMarkup(start_position, end_position, kAnnotateForInterchange, |
2466 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); | 2466 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); |
2467 } else { | 2467 } else { |
2468 clip_html = | 2468 clip_html = |
2469 CreateMarkup(end_position, start_position, kAnnotateForInterchange, | 2469 CreateMarkup(end_position, start_position, kAnnotateForInterchange, |
2470 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); | 2470 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); |
2471 } | 2471 } |
2472 } | 2472 } |
2473 | 2473 |
| 2474 void WebLocalFrameImpl::AdvanceFocusInForm(WebFocusType focus_type) { |
| 2475 DCHECK(GetFrame()->GetDocument()); |
| 2476 Element* element = GetFrame()->GetDocument()->FocusedElement(); |
| 2477 if (!element) |
| 2478 return; |
| 2479 |
| 2480 Element* next_element = |
| 2481 GetFrame()->GetPage()->GetFocusController().NextFocusableElementInForm( |
| 2482 element, focus_type); |
| 2483 if (!next_element) |
| 2484 return; |
| 2485 |
| 2486 next_element->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); |
| 2487 next_element->focus(); |
| 2488 } |
| 2489 |
2474 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { | 2490 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
2475 return *text_checker_client_; | 2491 return *text_checker_client_; |
2476 } | 2492 } |
2477 | 2493 |
2478 void WebLocalFrameImpl::SetTextCheckClient( | 2494 void WebLocalFrameImpl::SetTextCheckClient( |
2479 WebTextCheckClient* text_check_client) { | 2495 WebTextCheckClient* text_check_client) { |
2480 text_check_client_ = text_check_client; | 2496 text_check_client_ = text_check_client; |
2481 } | 2497 } |
2482 | 2498 |
2483 void WebLocalFrameImpl::SetSpellCheckPanelHostClient( | 2499 void WebLocalFrameImpl::SetSpellCheckPanelHostClient( |
2484 WebSpellCheckPanelHostClient* spell_check_panel_host_client) { | 2500 WebSpellCheckPanelHostClient* spell_check_panel_host_client) { |
2485 spell_check_panel_host_client_ = spell_check_panel_host_client; | 2501 spell_check_panel_host_client_ = spell_check_panel_host_client; |
2486 } | 2502 } |
2487 | 2503 |
2488 } // namespace blink | 2504 } // namespace blink |
OLD | NEW |