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

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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Rebase after reopen Created 3 years, 12 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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 int start() const { return m_start; } 67 int start() const { return m_start; }
68 int stop() const { return m_stop; } 68 int stop() const { return m_stop; }
69 unsigned char level() const { return m_level; } 69 unsigned char level() const { return m_level; }
70 bool reversed(bool visuallyOrdered) const { 70 bool reversed(bool visuallyOrdered) const {
71 return m_level % 2 && !visuallyOrdered; 71 return m_level % 2 && !visuallyOrdered;
72 } 72 }
73 bool dirOverride(bool visuallyOrdered) { 73 bool dirOverride(bool visuallyOrdered) {
74 return m_override || visuallyOrdered; 74 return m_override || visuallyOrdered;
75 } 75 }
76 TextDirection direction() const { return reversed(false) ? RTL : LTR; } 76 TextDirection direction() const {
77 return reversed(false) ? TextDirection::Rtl : TextDirection::Ltr;
78 }
77 79
78 BidiCharacterRun* next() const { return m_next; } 80 BidiCharacterRun* next() const { return m_next; }
79 void setNext(BidiCharacterRun* next) { m_next = next; } 81 void setNext(BidiCharacterRun* next) { m_next = next; }
80 82
81 // Do not add anything apart from bitfields until after m_next. See 83 // Do not add anything apart from bitfields until after m_next. See
82 // https://bugs.webkit.org/show_bug.cgi?id=100173 84 // https://bugs.webkit.org/show_bug.cgi?id=100173
83 bool m_override : 1; 85 bool m_override : 1;
84 // Used by BidiRun subclass which is a layering violation but enables us to 86 // Used by BidiRun subclass which is a layering violation but enables us to
85 // save 8 bytes per object on 64-bit. 87 // save 8 bytes per object on 64-bit.
86 bool m_hasHyphen : 1; 88 bool m_hasHyphen : 1;
87 unsigned char m_level; 89 unsigned char m_level;
88 BidiCharacterRun* m_next; 90 BidiCharacterRun* m_next;
89 int m_start; 91 int m_start;
90 int m_stop; 92 int m_stop;
91 }; 93 };
92 94
93 } // namespace blink 95 } // namespace blink
94 96
95 #endif // BidiCharacterRun_h 97 #endif // BidiCharacterRun_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698