| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 { | 390 { |
| 391 if (!n) | 391 if (!n) |
| 392 return false; | 392 return false; |
| 393 | 393 |
| 394 if (!n->isHTMLElement()) | 394 if (!n->isHTMLElement()) |
| 395 return false; | 395 return false; |
| 396 | 396 |
| 397 if (n->isLink()) | 397 if (n->isLink()) |
| 398 return true; | 398 return true; |
| 399 | 399 |
| 400 RenderObject* renderer = n->renderer(); | |
| 401 if (!renderer) | |
| 402 return false; | |
| 403 | |
| 404 if (renderer->style()->isFloating()) | |
| 405 return true; | |
| 406 | |
| 407 return false; | 400 return false; |
| 408 } | 401 } |
| 409 | 402 |
| 410 static HTMLElement* firstInSpecialElement(const Position& pos) | 403 static HTMLElement* firstInSpecialElement(const Position& pos) |
| 411 { | 404 { |
| 412 Element* rootEditableElement = pos.containerNode()->rootEditableElement(); | 405 Element* rootEditableElement = pos.containerNode()->rootEditableElement(); |
| 413 for (Node* n = pos.deprecatedNode(); n && n->rootEditableElement() == rootEd
itableElement; n = n->parentNode()) { | 406 for (Node* n = pos.deprecatedNode(); n && n->rootEditableElement() == rootEd
itableElement; n = n->parentNode()) { |
| 414 if (isSpecialHTMLElement(n)) { | 407 if (isSpecialHTMLElement(n)) { |
| 415 HTMLElement* specialElement = toHTMLElement(n); | 408 HTMLElement* specialElement = toHTMLElement(n); |
| 416 VisiblePosition vPos = VisiblePosition(pos, DOWNSTREAM); | 409 VisiblePosition vPos = VisiblePosition(pos, DOWNSTREAM); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 // if the selection starts just before a paragraph break, skip over it | 926 // if the selection starts just before a paragraph break, skip over it |
| 934 if (isEndOfParagraph(visiblePosition)) | 927 if (isEndOfParagraph(visiblePosition)) |
| 935 return visiblePosition.next().deepEquivalent().downstream(); | 928 return visiblePosition.next().deepEquivalent().downstream(); |
| 936 | 929 |
| 937 // otherwise, make sure to be at the start of the first selected node, | 930 // otherwise, make sure to be at the start of the first selected node, |
| 938 // instead of possibly at the end of the last node before the selection | 931 // instead of possibly at the end of the last node before the selection |
| 939 return visiblePosition.deepEquivalent().downstream(); | 932 return visiblePosition.deepEquivalent().downstream(); |
| 940 } | 933 } |
| 941 | 934 |
| 942 } // namespace blink | 935 } // namespace blink |
| OLD | NEW |