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

Side by Side Diff: Source/core/editing/TextIterator.h

Issue 214523008: Use RenderStyle::isCollapsibleWhiteSpace when renderer is available. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address reviewer comments. Created 6 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
« no previous file with comments | « Source/core/editing/HTMLInterchange.cpp ('k') | Source/core/editing/TextIterator.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, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 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 30 matching lines...) Expand all
41 TextIteratorEmitsCharactersBetweenAllVisiblePositions = 1 << 0, 41 TextIteratorEmitsCharactersBetweenAllVisiblePositions = 1 << 0,
42 TextIteratorEntersTextControls = 1 << 1, 42 TextIteratorEntersTextControls = 1 << 1,
43 TextIteratorIgnoresStyleVisibility = 1 << 2, 43 TextIteratorIgnoresStyleVisibility = 1 << 2,
44 TextIteratorEmitsOriginalText = 1 << 3, 44 TextIteratorEmitsOriginalText = 1 << 3,
45 TextIteratorStopsOnFormControls = 1 << 4, 45 TextIteratorStopsOnFormControls = 1 << 4,
46 TextIteratorEmitsImageAltText = 1 << 5, 46 TextIteratorEmitsImageAltText = 1 << 5,
47 TextIteratorEntersAuthorShadowRoots = 1 << 6 47 TextIteratorEntersAuthorShadowRoots = 1 << 6
48 }; 48 };
49 typedef unsigned TextIteratorBehaviorFlags; 49 typedef unsigned TextIteratorBehaviorFlags;
50 50
51 // FIXME: Can't really answer this question correctly without knowing the white- space mode.
52 // FIXME: Move this somewhere else in the editing directory. It doesn't belong h ere.
53 inline bool isCollapsibleWhitespace(UChar c)
54 {
55 switch (c) {
56 case ' ':
57 case '\n':
58 return true;
59 default:
60 return false;
61 }
62 }
63
64 String plainText(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBe havior); 51 String plainText(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBe havior);
65 PassRefPtr<Range> findPlainText(const Range*, const String&, FindOptions); 52 PassRefPtr<Range> findPlainText(const Range*, const String&, FindOptions);
66 PassRefPtr<Range> findPlainText(const Position& start, const Position& end, cons t String&, FindOptions); 53 PassRefPtr<Range> findPlainText(const Position& start, const Position& end, cons t String&, FindOptions);
67 54
68 class BitStack { 55 class BitStack {
69 public: 56 public:
70 BitStack(); 57 BitStack();
71 ~BitStack(); 58 ~BitStack();
72 59
73 void push(bool); 60 void push(bool);
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 Vector<UChar> m_buffer; 358 Vector<UChar> m_buffer;
372 // Did we have to look ahead in the textIterator to confirm the current chun k? 359 // Did we have to look ahead in the textIterator to confirm the current chun k?
373 bool m_didLookAhead; 360 bool m_didLookAhead;
374 RefPtr<Range> m_range; 361 RefPtr<Range> m_range;
375 TextIterator m_textIterator; 362 TextIterator m_textIterator;
376 }; 363 };
377 364
378 } 365 }
379 366
380 #endif 367 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/HTMLInterchange.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698