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

Side by Side Diff: Source/core/editing/VisibleUnits.cpp

Issue 1300813002: Get rid of a redundant function Position::deprecatedEditingOffset() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-18T17:24: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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/editing/PositionIterator.cpp ('k') | Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698