OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 | 8 |
9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
822 | 822 |
823 cc::ViewportSelectionBound start_bound, end_bound; | 823 cc::ViewportSelectionBound start_bound, end_bound; |
824 start_bound.visible = true; | 824 start_bound.visible = true; |
825 end_bound.visible = true; | 825 end_bound.visible = true; |
826 start_bound.edge_top = start_rect.origin(); | 826 start_bound.edge_top = start_rect.origin(); |
827 start_bound.edge_bottom = start_rect.bottom_left(); | 827 start_bound.edge_bottom = start_rect.bottom_left(); |
828 end_bound.edge_top = end_rect.origin(); | 828 end_bound.edge_top = end_rect.origin(); |
829 end_bound.edge_bottom = end_rect.bottom_left(); | 829 end_bound.edge_bottom = end_rect.bottom_left(); |
830 | 830 |
831 if (params.anchor_rect == params.focus_rect) { | 831 if (params.anchor_rect == params.focus_rect) { |
832 if (params.anchor_rect.x() && params.anchor_rect.y()) | 832 start_bound.type = end_bound.type = cc::SELECTION_BOUND_CENTER; |
jdduke (slow)
2014/09/15 15:37:13
Actually, we could probably change this to
if (pa
AviD
2014/09/15 16:22:19
Yes, this will reduce the frequency of the issue.
| |
833 start_bound.type = end_bound.type = cc::SELECTION_BOUND_CENTER; | |
834 } else { | 833 } else { |
835 start_bound.type = params.anchor_dir == blink::WebTextDirectionRightToLeft | 834 start_bound.type = params.anchor_dir == blink::WebTextDirectionRightToLeft |
836 ? cc::SELECTION_BOUND_LEFT | 835 ? cc::SELECTION_BOUND_LEFT |
837 : cc::SELECTION_BOUND_RIGHT; | 836 : cc::SELECTION_BOUND_RIGHT; |
838 end_bound.type = params.focus_dir == blink::WebTextDirectionRightToLeft | 837 end_bound.type = params.focus_dir == blink::WebTextDirectionRightToLeft |
839 ? cc::SELECTION_BOUND_RIGHT | 838 ? cc::SELECTION_BOUND_RIGHT |
840 : cc::SELECTION_BOUND_LEFT; | 839 : cc::SELECTION_BOUND_LEFT; |
841 } | 840 } |
842 | 841 |
843 selection_controller_->OnSelectionBoundsChanged(start_bound, end_bound); | 842 selection_controller_->OnSelectionBoundsChanged(start_bound, end_bound); |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1867 results->orientationAngle = display.RotationAsDegree(); | 1866 results->orientationAngle = display.RotationAsDegree(); |
1868 results->orientationType = | 1867 results->orientationType = |
1869 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1868 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1870 gfx::DeviceDisplayInfo info; | 1869 gfx::DeviceDisplayInfo info; |
1871 results->depth = info.GetBitsPerPixel(); | 1870 results->depth = info.GetBitsPerPixel(); |
1872 results->depthPerComponent = info.GetBitsPerComponent(); | 1871 results->depthPerComponent = info.GetBitsPerComponent(); |
1873 results->isMonochrome = (results->depthPerComponent == 0); | 1872 results->isMonochrome = (results->depthPerComponent == 0); |
1874 } | 1873 } |
1875 | 1874 |
1876 } // namespace content | 1875 } // namespace content |
OLD | NEW |