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 2553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2564 clip_html = | 2564 clip_html = |
2565 CreateMarkup(start_position, end_position, kAnnotateForInterchange, | 2565 CreateMarkup(start_position, end_position, kAnnotateForInterchange, |
2566 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); | 2566 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); |
2567 } else { | 2567 } else { |
2568 clip_html = | 2568 clip_html = |
2569 CreateMarkup(end_position, start_position, kAnnotateForInterchange, | 2569 CreateMarkup(end_position, start_position, kAnnotateForInterchange, |
2570 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); | 2570 ConvertBlocksToInlines::kNotConvert, kResolveNonLocalURLs); |
2571 } | 2571 } |
2572 } | 2572 } |
2573 | 2573 |
2574 void WebLocalFrameImpl::AdvanceFocusInForm(WebFocusType focusType) { | |
2575 if (!GetFrame()->GetDocument()) | |
dcheng
2017/04/27 15:33:02
This check is unnecessary and should be a DCHECK i
AKVT
2017/05/03 14:35:12
Done.
| |
2576 return; | |
2577 | |
2578 Element* element = GetFrame()->GetDocument()->FocusedElement(); | |
2579 if (!element) | |
2580 return; | |
2581 | |
2582 Element* nextElement = | |
2583 GetFrame()->GetInputMethodController().NextFocusableElementInForm( | |
2584 element, focusType); | |
2585 if (!nextElement) | |
2586 return; | |
2587 | |
2588 nextElement->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); | |
2589 nextElement->focus(); | |
2590 } | |
2591 | |
2574 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { | 2592 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
2575 return *text_checker_client_; | 2593 return *text_checker_client_; |
2576 } | 2594 } |
2577 | 2595 |
2578 void WebLocalFrameImpl::SetTextCheckClient( | 2596 void WebLocalFrameImpl::SetTextCheckClient( |
2579 WebTextCheckClient* text_check_client) { | 2597 WebTextCheckClient* text_check_client) { |
2580 text_check_client_ = text_check_client; | 2598 text_check_client_ = text_check_client; |
2581 } | 2599 } |
2582 | 2600 |
2583 } // namespace blink | 2601 } // namespace blink |
OLD | NEW |