OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 return false; | 1534 return false; |
1535 | 1535 |
1536 if (layoutObject->style()->visibility() != VISIBLE | 1536 if (layoutObject->style()->visibility() != VISIBLE |
1537 || posLayoutObject->style()->visibility() != VISIBLE) | 1537 || posLayoutObject->style()->visibility() != VISIBLE) |
1538 return false; | 1538 return false; |
1539 | 1539 |
1540 if (position1.anchorNode() == position2.anchorNode()) { | 1540 if (position1.anchorNode() == position2.anchorNode()) { |
1541 if (isHTMLBRElement(*position1.anchorNode())) | 1541 if (isHTMLBRElement(*position1.anchorNode())) |
1542 return false; | 1542 return false; |
1543 | 1543 |
1544 if (position1.deprecatedEditingOffset() == position2.deprecatedEditingOf
fset()) | 1544 if (position1.computeEditingOffset() == position2.computeEditingOffset()
) |
1545 return false; | 1545 return false; |
1546 | 1546 |
1547 if (!position1.anchorNode()->isTextNode() && !position2.anchorNode()->is
TextNode()) | 1547 if (!position1.anchorNode()->isTextNode() && !position2.anchorNode()->is
TextNode()) |
1548 return true; | 1548 return true; |
1549 } | 1549 } |
1550 | 1550 |
1551 if (isHTMLBRElement(*position1.anchorNode()) && position2.isCandidate()) | 1551 if (isHTMLBRElement(*position1.anchorNode()) && position2.isCandidate()) |
1552 return true; | 1552 return true; |
1553 | 1553 |
1554 if (isHTMLBRElement(*position2.anchorNode()) && position1.isCandidate()) | 1554 if (isHTMLBRElement(*position2.anchorNode()) && position1.isCandidate()) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 | 1595 |
1596 if (previousRenderedEditable(position1.anchorNode()) == position2.anchorNode
() | 1596 if (previousRenderedEditable(position1.anchorNode()) == position2.anchorNode
() |
1597 && !renderedOffset1 && renderedOffset2 == caretMaxOffset(position2.ancho
rNode())) { | 1597 && !renderedOffset1 && renderedOffset2 == caretMaxOffset(position2.ancho
rNode())) { |
1598 return false; | 1598 return false; |
1599 } | 1599 } |
1600 | 1600 |
1601 return true; | 1601 return true; |
1602 } | 1602 } |
1603 | 1603 |
1604 } | 1604 } |
OLD | NEW |