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/editing/VisibleUnits.cpp

Issue 1301643003: Move a member function inRenderedText() out from PositionAlgorithm template class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-20T14:30:47 Rebase 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 | « Source/core/editing/Position.cpp ('k') | no next file » | 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, 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 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 1551
1552 if (isHTMLBRElement(*position1.anchorNode()) && position2.isCandidate()) 1552 if (isHTMLBRElement(*position1.anchorNode()) && position2.isCandidate())
1553 return true; 1553 return true;
1554 1554
1555 if (isHTMLBRElement(*position2.anchorNode()) && position1.isCandidate()) 1555 if (isHTMLBRElement(*position2.anchorNode()) && position1.isCandidate())
1556 return true; 1556 return true;
1557 1557
1558 if (!inSameContainingBlockFlowElement(position1.anchorNode(), position2.anch orNode())) 1558 if (!inSameContainingBlockFlowElement(position1.anchorNode(), position2.anch orNode()))
1559 return true; 1559 return true;
1560 1560
1561 if (position1.anchorNode()->isTextNode() && !position1.inRenderedText()) 1561 if (position1.anchorNode()->isTextNode() && !inRenderedText(position1))
1562 return false; 1562 return false;
1563 1563
1564 if (position2.anchorNode()->isTextNode() && !position2.inRenderedText()) 1564 if (position2.anchorNode()->isTextNode() && !inRenderedText(position2))
1565 return false; 1565 return false;
1566 1566
1567 const int renderedOffset1 = renderedOffsetOf(position1); 1567 const int renderedOffset1 = renderedOffsetOf(position1);
1568 const int renderedOffset2 = renderedOffsetOf(position2); 1568 const int renderedOffset2 = renderedOffsetOf(position2);
1569 1569
1570 if (layoutObject == posLayoutObject && renderedOffset1 == renderedOffset2) 1570 if (layoutObject == posLayoutObject && renderedOffset1 == renderedOffset2)
1571 return false; 1571 return false;
1572 1572
1573 InlineBoxPosition boxPosition1 = position1.computeInlineBoxPosition(TextAffi nity::Downstream); 1573 InlineBoxPosition boxPosition1 = position1.computeInlineBoxPosition(TextAffi nity::Downstream);
1574 InlineBoxPosition boxPosition2 = position2.computeInlineBoxPosition(TextAffi nity::Downstream); 1574 InlineBoxPosition boxPosition2 = position2.computeInlineBoxPosition(TextAffi nity::Downstream);
(...skipping 21 matching lines...) Expand all
1596 1596
1597 if (previousRenderedEditable(position1.anchorNode()) == position2.anchorNode () 1597 if (previousRenderedEditable(position1.anchorNode()) == position2.anchorNode ()
1598 && !renderedOffset1 && renderedOffset2 == caretMaxOffset(position2.ancho rNode())) { 1598 && !renderedOffset1 && renderedOffset2 == caretMaxOffset(position2.ancho rNode())) {
1599 return false; 1599 return false;
1600 } 1600 }
1601 1601
1602 return true; 1602 return true;
1603 } 1603 }
1604 1604
1605 } 1605 }
OLDNEW
« no previous file with comments | « Source/core/editing/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698