| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 return false; | 1047 return false; |
| 1048 | 1048 |
| 1049 if (layoutObject->style()->visibility() != VISIBLE | 1049 if (layoutObject->style()->visibility() != VISIBLE |
| 1050 || posLayoutObject->style()->visibility() != VISIBLE) | 1050 || posLayoutObject->style()->visibility() != VISIBLE) |
| 1051 return false; | 1051 return false; |
| 1052 | 1052 |
| 1053 if (anchorNode() == pos.anchorNode()) { | 1053 if (anchorNode() == pos.anchorNode()) { |
| 1054 if (isHTMLBRElement(*anchorNode())) | 1054 if (isHTMLBRElement(*anchorNode())) |
| 1055 return false; | 1055 return false; |
| 1056 | 1056 |
| 1057 if (m_offset == pos.deprecatedEditingOffset()) | 1057 if (deprecatedEditingOffset() == pos.deprecatedEditingOffset()) |
| 1058 return false; | 1058 return false; |
| 1059 | 1059 |
| 1060 if (!anchorNode()->isTextNode() && !pos.anchorNode()->isTextNode()) { | 1060 if (!anchorNode()->isTextNode() && !pos.anchorNode()->isTextNode()) { |
| 1061 if (m_offset != pos.deprecatedEditingOffset()) | 1061 if (deprecatedEditingOffset() != pos.deprecatedEditingOffset()) |
| 1062 return true; | 1062 return true; |
| 1063 } | 1063 } |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 if (isHTMLBRElement(*anchorNode()) && pos.isCandidate()) | 1066 if (isHTMLBRElement(*anchorNode()) && pos.isCandidate()) |
| 1067 return true; | 1067 return true; |
| 1068 | 1068 |
| 1069 if (isHTMLBRElement(*pos.anchorNode()) && isCandidate()) | 1069 if (isHTMLBRElement(*pos.anchorNode()) && isCandidate()) |
| 1070 return true; | 1070 return true; |
| 1071 | 1071 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 | 1524 |
| 1525 void showTree(const blink::Position* pos) | 1525 void showTree(const blink::Position* pos) |
| 1526 { | 1526 { |
| 1527 if (pos) | 1527 if (pos) |
| 1528 pos->showTreeForThis(); | 1528 pos->showTreeForThis(); |
| 1529 else | 1529 else |
| 1530 fprintf(stderr, "Cannot showTree for (nil)\n"); | 1530 fprintf(stderr, "Cannot showTree for (nil)\n"); |
| 1531 } | 1531 } |
| 1532 | 1532 |
| 1533 #endif | 1533 #endif |
| OLD | NEW |