| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 return m_logicalRange->cloneRange(); | 1433 return m_logicalRange->cloneRange(); |
| 1434 return m_selection.firstRange(); | 1434 return m_selection.firstRange(); |
| 1435 } | 1435 } |
| 1436 | 1436 |
| 1437 bool FrameSelection::isInPasswordField() const | 1437 bool FrameSelection::isInPasswordField() const |
| 1438 { | 1438 { |
| 1439 HTMLTextFormControlElement* textControl = enclosingTextFormControl(start()); | 1439 HTMLTextFormControlElement* textControl = enclosingTextFormControl(start()); |
| 1440 return isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->i
sPasswordField(); | 1440 return isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->i
sPasswordField(); |
| 1441 } | 1441 } |
| 1442 | 1442 |
| 1443 bool FrameSelection::isInTextField() const |
| 1444 { |
| 1445 HTMLTextFormControlElement* textControl = enclosingTextFormControl(start()); |
| 1446 return isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->i
sTextField(); |
| 1447 } |
| 1448 |
| 1443 void FrameSelection::notifyAccessibilityForSelectionChange() | 1449 void FrameSelection::notifyAccessibilityForSelectionChange() |
| 1444 { | 1450 { |
| 1445 if (m_selection.start().isNotNull() && m_selection.end().isNotNull()) { | 1451 if (m_selection.start().isNotNull() && m_selection.end().isNotNull()) { |
| 1446 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 1452 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
| 1447 cache->selectionChanged(m_selection.start().containerNode()); | 1453 cache->selectionChanged(m_selection.start().containerNode()); |
| 1448 } | 1454 } |
| 1449 } | 1455 } |
| 1450 | 1456 |
| 1451 void FrameSelection::focusedOrActiveStateChanged() | 1457 void FrameSelection::focusedOrActiveStateChanged() |
| 1452 { | 1458 { |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 sel.showTreeForThis(); | 1892 sel.showTreeForThis(); |
| 1887 } | 1893 } |
| 1888 | 1894 |
| 1889 void showTree(const WebCore::FrameSelection* sel) | 1895 void showTree(const WebCore::FrameSelection* sel) |
| 1890 { | 1896 { |
| 1891 if (sel) | 1897 if (sel) |
| 1892 sel->showTreeForThis(); | 1898 sel->showTreeForThis(); |
| 1893 } | 1899 } |
| 1894 | 1900 |
| 1895 #endif | 1901 #endif |
| OLD | NEW |