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

Side by Side Diff: Source/WebCore/editing/TextIterator.cpp

Issue 13532011: Stop inserting placeholders for TextArea and Input elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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, 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 RenderTable* t = rc->table(); 732 RenderTable* t = rc->table();
733 return t && (t->cellBefore(rc) || t->cellAbove(rc)); 733 return t && (t->cellBefore(rc) || t->cellAbove(rc));
734 } 734 }
735 735
736 static bool shouldEmitNewlineForNode(Node* node, bool emitsOriginalText) 736 static bool shouldEmitNewlineForNode(Node* node, bool emitsOriginalText)
737 { 737 {
738 RenderObject* renderer = node->renderer(); 738 RenderObject* renderer = node->renderer();
739 739
740 if (renderer ? !renderer->isBR() : !node->hasTagName(brTag)) 740 if (renderer ? !renderer->isBR() : !node->hasTagName(brTag))
741 return false; 741 return false;
742 return emitsOriginalText || !(node->isInShadowTree() && node->shadowHost()-> toInputElement()); 742 return emitsOriginalText;
743 } 743 }
744 744
745 static bool shouldEmitNewlinesBeforeAndAfterNode(Node* node) 745 static bool shouldEmitNewlinesBeforeAndAfterNode(Node* node)
746 { 746 {
747 // Block flow (versus inline flow) is represented by having 747 // Block flow (versus inline flow) is represented by having
748 // a newline both before and after the element. 748 // a newline both before and after the element.
749 RenderObject* r = node->renderer(); 749 RenderObject* r = node->renderer();
750 if (!r) { 750 if (!r) {
751 return (node->hasTagName(blockquoteTag) 751 return (node->hasTagName(blockquoteTag)
752 || node->hasTagName(ddTag) 752 || node->hasTagName(ddTag)
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
2579 if (!matchLength) 2579 if (!matchLength)
2580 return collapsedToBoundary(range, !(options & Backwards)); 2580 return collapsedToBoundary(range, !(options & Backwards));
2581 } 2581 }
2582 2582
2583 // Then, find the document position of the start and the end of the text. 2583 // Then, find the document position of the start and the end of the text.
2584 CharacterIterator computeRangeIterator(range, TextIteratorEntersTextControls ); 2584 CharacterIterator computeRangeIterator(range, TextIteratorEntersTextControls );
2585 return characterSubrange(computeRangeIterator, matchStart, matchLength); 2585 return characterSubrange(computeRangeIterator, matchStart, matchLength);
2586 } 2586 }
2587 2587
2588 } 2588 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698