Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. |
| 3 * Copyright (C) 2005 Alexey Proskuryakov. | 3 * Copyright (C) 2005 Alexey Proskuryakov. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 884 || node.hasTagName(hrTag) | 884 || node.hasTagName(hrTag) |
| 885 || node.hasTagName(liTag) | 885 || node.hasTagName(liTag) |
| 886 || node.hasTagName(listingTag) | 886 || node.hasTagName(listingTag) |
| 887 || node.hasTagName(olTag) | 887 || node.hasTagName(olTag) |
| 888 || node.hasTagName(pTag) | 888 || node.hasTagName(pTag) |
| 889 || node.hasTagName(preTag) | 889 || node.hasTagName(preTag) |
| 890 || node.hasTagName(trTag) | 890 || node.hasTagName(trTag) |
| 891 || node.hasTagName(ulTag)); | 891 || node.hasTagName(ulTag)); |
| 892 } | 892 } |
| 893 | 893 |
| 894 // Need to make an exception for option and optgroup, because we want to | |
| 895 // keep the legacy behavior before we added renderers to them. | |
| 896 if (isHTMLOptionElement(&node) || isHTMLOptGroupElement(&node)) | |
| 897 return false; | |
|
keishi
2014/06/22 11:59:55
select.innerText becomes "\n" unless we do this, i
| |
| 898 | |
| 894 // Need to make an exception for table cells, because they are blocks, but w e | 899 // Need to make an exception for table cells, because they are blocks, but w e |
| 895 // want them tab-delimited rather than having newlines before and after. | 900 // want them tab-delimited rather than having newlines before and after. |
| 896 if (isTableCell(&node)) | 901 if (isTableCell(&node)) |
| 897 return false; | 902 return false; |
| 898 | 903 |
| 899 // Need to make an exception for table row elements, because they are neithe r | 904 // Need to make an exception for table row elements, because they are neithe r |
| 900 // "inline" or "RenderBlock", but we want newlines for them. | 905 // "inline" or "RenderBlock", but we want newlines for them. |
| 901 if (r->isTableRow()) { | 906 if (r->isTableRow()) { |
| 902 RenderTable* t = toRenderTableRow(r)->table(); | 907 RenderTable* t = toRenderTableRow(r)->table(); |
| 903 if (t && !t->isInline()) | 908 if (t && !t->isInline()) |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2201 resultEnd = collapseTo; | 2206 resultEnd = collapseTo; |
| 2202 return; | 2207 return; |
| 2203 } | 2208 } |
| 2204 } | 2209 } |
| 2205 | 2210 |
| 2206 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); | 2211 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); |
| 2207 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); | 2212 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); |
| 2208 } | 2213 } |
| 2209 | 2214 |
| 2210 } | 2215 } |
| OLD | NEW |