| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 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 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 return; | 2057 return; |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 if (anchorObject == focusObject | 2060 if (anchorObject == focusObject |
| 2061 && anchorObject->getLayoutObject()->isTextControl()) { | 2061 && anchorObject->getLayoutObject()->isTextControl()) { |
| 2062 HTMLTextFormControlElement* textControl = toLayoutTextControl( | 2062 HTMLTextFormControlElement* textControl = toLayoutTextControl( |
| 2063 anchorObject->getLayoutObject())->textFormControlElement(); | 2063 anchorObject->getLayoutObject())->textFormControlElement(); |
| 2064 if (selection.anchorOffset <= selection.focusOffset) { | 2064 if (selection.anchorOffset <= selection.focusOffset) { |
| 2065 textControl->setSelectionRange( | 2065 textControl->setSelectionRange( |
| 2066 selection.anchorOffset, selection.focusOffset, | 2066 selection.anchorOffset, selection.focusOffset, |
| 2067 SelectionHasForwardDirection, NotDispatchSelectEvent); | 2067 SelectionHasForwardDirection); |
| 2068 } else { | 2068 } else { |
| 2069 textControl->setSelectionRange( | 2069 textControl->setSelectionRange( |
| 2070 selection.focusOffset, selection.anchorOffset, | 2070 selection.focusOffset, selection.anchorOffset, |
| 2071 SelectionHasBackwardDirection, NotDispatchSelectEvent); | 2071 SelectionHasBackwardDirection); |
| 2072 } | 2072 } |
| 2073 return; | 2073 return; |
| 2074 } | 2074 } |
| 2075 | 2075 |
| 2076 LocalFrame* frame = getLayoutObject()->frame(); | 2076 LocalFrame* frame = getLayoutObject()->frame(); |
| 2077 if (!frame) | 2077 if (!frame) |
| 2078 return; | 2078 return; |
| 2079 | 2079 |
| 2080 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. | 2080 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. |
| 2081 // see http://crbug.com/590369 for more details. | 2081 // see http://crbug.com/590369 for more details. |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 result.unite(labelRect); | 2623 result.unite(labelRect); |
| 2624 } | 2624 } |
| 2625 } | 2625 } |
| 2626 } | 2626 } |
| 2627 } | 2627 } |
| 2628 | 2628 |
| 2629 return result; | 2629 return result; |
| 2630 } | 2630 } |
| 2631 | 2631 |
| 2632 } // namespace blink | 2632 } // namespace blink |
| OLD | NEW |