Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: Source/core/dom/Position.cpp

Issue 1272973002: Make rendersInDifferentPosition() to work with AfterAnchor and AfterChildren positions properly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-06T13:43:05 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/dom/PositionTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/PositionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698