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

Side by Side Diff: third_party/WebKit/Source/platform/text/BidiResolver.h

Issue 1741073002: Rename enums/functions that collide in chromium style in core/layout/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-6
Patch Set: get-names-7: rebase Created 4 years, 9 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 | « third_party/WebKit/Source/platform/PODRedBlackTree.h ('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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void stopIgnoringSpaces(const Iterator& midpoint) 60 void stopIgnoringSpaces(const Iterator& midpoint)
61 { 61 {
62 ASSERT(m_numMidpoints % 2); 62 ASSERT(m_numMidpoints % 2);
63 addMidpoint(midpoint); 63 addMidpoint(midpoint);
64 } 64 }
65 65
66 // Adding a pair of midpoints before a character will split it out into a ne w line box. 66 // Adding a pair of midpoints before a character will split it out into a ne w line box.
67 void ensureCharacterGetsLineBox(Iterator& textParagraphSeparator) 67 void ensureCharacterGetsLineBox(Iterator& textParagraphSeparator)
68 { 68 {
69 startIgnoringSpaces(Iterator(0, textParagraphSeparator.lineLayoutItem(), textParagraphSeparator.offset() - 1)); 69 startIgnoringSpaces(Iterator(0, textParagraphSeparator.getLineLayoutItem (), textParagraphSeparator.offset() - 1));
70 stopIgnoringSpaces(Iterator(0, textParagraphSeparator.lineLayoutItem(), textParagraphSeparator.offset())); 70 stopIgnoringSpaces(Iterator(0, textParagraphSeparator.getLineLayoutItem( ), textParagraphSeparator.offset()));
71 } 71 }
72 72
73 void checkMidpoints(Iterator& lBreak) 73 void checkMidpoints(Iterator& lBreak)
74 { 74 {
75 // Check to see if our last midpoint is a start point beyond the line br eak. If so, 75 // Check to see if our last midpoint is a start point beyond the line br eak. If so,
76 // shave it off the list, and shave off a trailing space if the previous end point doesn't 76 // shave it off the list, and shave off a trailing space if the previous end point doesn't
77 // preserve whitespace. 77 // preserve whitespace.
78 if (lBreak.lineLayoutItem() && m_numMidpoints && !(m_numMidpoints % 2)) { 78 if (lBreak.getLineLayoutItem() && m_numMidpoints && !(m_numMidpoints % 2 )) {
79 Iterator* midpointsIterator = m_midpoints.data(); 79 Iterator* midpointsIterator = m_midpoints.data();
80 Iterator& endpoint = midpointsIterator[m_numMidpoints - 2]; 80 Iterator& endpoint = midpointsIterator[m_numMidpoints - 2];
81 const Iterator& startpoint = midpointsIterator[m_numMidpoints - 1]; 81 const Iterator& startpoint = midpointsIterator[m_numMidpoints - 1];
82 Iterator currpoint = endpoint; 82 Iterator currpoint = endpoint;
83 while (!currpoint.atEnd() && currpoint != startpoint && currpoint != lBreak) 83 while (!currpoint.atEnd() && currpoint != startpoint && currpoint != lBreak)
84 currpoint.increment(); 84 currpoint.increment();
85 if (currpoint == lBreak) { 85 if (currpoint == lBreak) {
86 // We hit the line break before the start point. Shave off the s tart point. 86 // We hit the line break before the start point. Shave off the s tart point.
87 m_numMidpoints--; 87 m_numMidpoints--;
88 if (endpoint.lineLayoutItem().style()->collapseWhiteSpace() && e ndpoint.lineLayoutItem().isText()) 88 if (endpoint.getLineLayoutItem().style()->collapseWhiteSpace() & & endpoint.getLineLayoutItem().isText())
89 endpoint.setOffset(endpoint.offset() - 1); 89 endpoint.setOffset(endpoint.offset() - 1);
90 } 90 }
91 } 91 }
92 } 92 }
93 93
94 Vector<Iterator>& midpoints() { return m_midpoints; } 94 Vector<Iterator>& midpoints() { return m_midpoints; }
95 const unsigned& numMidpoints() const { return m_numMidpoints; } 95 const unsigned& numMidpoints() const { return m_numMidpoints; }
96 const unsigned& currentMidpoint() const { return m_currentMidpoint; } 96 const unsigned& currentMidpoint() const { return m_currentMidpoint; }
97 void incrementCurrentMidpoint() { m_currentMidpoint++; } 97 void incrementCurrentMidpoint() { m_currentMidpoint++; }
98 const bool& betweenMidpoints() const { return m_betweenMidpoints; } 98 const bool& betweenMidpoints() const { return m_betweenMidpoints; }
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 1128
1129 template<class Iterator, class Run, class IsolatedRun> 1129 template<class Iterator, class Run, class IsolatedRun>
1130 MidpointState<Iterator> BidiResolver<Iterator, Run, IsolatedRun>::midpointStateF orIsolatedRun(Run& run) 1130 MidpointState<Iterator> BidiResolver<Iterator, Run, IsolatedRun>::midpointStateF orIsolatedRun(Run& run)
1131 { 1131 {
1132 return m_midpointStateForIsolatedRun.take(&run); 1132 return m_midpointStateForIsolatedRun.take(&run);
1133 } 1133 }
1134 1134
1135 } // namespace blink 1135 } // namespace blink
1136 1136
1137 #endif // BidiResolver_h 1137 #endif // BidiResolver_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/PODRedBlackTree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698