| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 // needs to be audited. See http://crbug.com/590369 for more details. | 2434 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2435 frame->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets(); | 2435 frame->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets(); |
| 2436 | 2436 |
| 2437 if (selection.ComputeVisibleSelectionInDOMTree() | 2437 if (selection.ComputeVisibleSelectionInDOMTree() |
| 2438 .ToNormalizedEphemeralRange() | 2438 .ToNormalizedEphemeralRange() |
| 2439 .IsNull()) | 2439 .IsNull()) |
| 2440 return false; | 2440 return false; |
| 2441 start = ToWebTextDirection(PrimaryDirectionOf( | 2441 start = ToWebTextDirection(PrimaryDirectionOf( |
| 2442 *selection.ComputeVisibleSelectionInDOMTree().Start().AnchorNode())); | 2442 *selection.ComputeVisibleSelectionInDOMTree().Start().AnchorNode())); |
| 2443 end = ToWebTextDirection(PrimaryDirectionOf( | 2443 end = ToWebTextDirection(PrimaryDirectionOf( |
| 2444 *selection.ComputeVisibleSelectionInDOMTree().end().AnchorNode())); | 2444 *selection.ComputeVisibleSelectionInDOMTree().End().AnchorNode())); |
| 2445 return true; | 2445 return true; |
| 2446 } | 2446 } |
| 2447 | 2447 |
| 2448 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as | 2448 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as |
| 2449 // well. This code needs to be refactored (http://crbug.com/629721). | 2449 // well. This code needs to be refactored (http://crbug.com/629721). |
| 2450 bool WebViewImpl::IsSelectionAnchorFirst() const { | 2450 bool WebViewImpl::IsSelectionAnchorFirst() const { |
| 2451 const LocalFrame* frame = FocusedLocalFrameInWidget(); | 2451 const LocalFrame* frame = FocusedLocalFrameInWidget(); |
| 2452 if (!frame) | 2452 if (!frame) |
| 2453 return false; | 2453 return false; |
| 2454 | 2454 |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4135 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4135 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
| 4136 return nullptr; | 4136 return nullptr; |
| 4137 return focused_frame; | 4137 return focused_frame; |
| 4138 } | 4138 } |
| 4139 | 4139 |
| 4140 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4140 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
| 4141 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4141 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
| 4142 } | 4142 } |
| 4143 | 4143 |
| 4144 } // namespace blink | 4144 } // namespace blink |
| OLD | NEW |