OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
3 * reserved. | 3 * 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "core/layout/LayoutBlock.h" | 34 #include "core/layout/LayoutBlock.h" |
35 #include "core/layout/line/InlineTextBox.h" | 35 #include "core/layout/line/InlineTextBox.h" |
36 #include "core/page/SpatialNavigation.h" | 36 #include "core/page/SpatialNavigation.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 LayoutUnit NoXPosForVerticalArrowNavigation() { | 40 LayoutUnit NoXPosForVerticalArrowNavigation() { |
41 return LayoutUnit::min(); | 41 return LayoutUnit::min(); |
42 } | 42 } |
43 | 43 |
44 static inline bool shouldAlwaysUseDirectionalSelection(LocalFrame* frame) { | 44 bool SelectionModifier::shouldAlwaysUseDirectionalSelection(LocalFrame* frame) { |
45 return !frame || | 45 return !frame || |
46 frame->editor().behavior().shouldConsiderSelectionAsDirectional(); | 46 frame->editor().behavior().shouldConsiderSelectionAsDirectional(); |
47 } | 47 } |
48 | 48 |
49 SelectionModifier::SelectionModifier(const LocalFrame& frame, | 49 SelectionModifier::SelectionModifier(const LocalFrame& frame, |
50 const VisibleSelection& selection, | 50 const VisibleSelection& selection, |
51 LayoutUnit xPosForVerticalArrowNavigation) | 51 LayoutUnit xPosForVerticalArrowNavigation) |
52 : m_frame(const_cast<LocalFrame*>(&frame)), | 52 : m_frame(const_cast<LocalFrame*>(&frame)), |
53 m_selection(selection), | 53 m_selection(selection), |
54 m_xPosForVerticalArrowNavigation(xPosForVerticalArrowNavigation) {} | 54 m_xPosForVerticalArrowNavigation(xPosForVerticalArrowNavigation) {} |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 x = lineDirectionPointForBlockDirectionNavigationOf(visiblePosition); | 851 x = lineDirectionPointForBlockDirectionNavigationOf(visiblePosition); |
852 m_xPosForVerticalArrowNavigation = x; | 852 m_xPosForVerticalArrowNavigation = x; |
853 } else { | 853 } else { |
854 x = m_xPosForVerticalArrowNavigation; | 854 x = m_xPosForVerticalArrowNavigation; |
855 } | 855 } |
856 | 856 |
857 return x; | 857 return x; |
858 } | 858 } |
859 | 859 |
860 } // namespace blink | 860 } // namespace blink |
OLD | NEW |