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

Side by Side Diff: Source/platform/fonts/GlyphPageTreeNode.cpp

Issue 509373002: This is code readability patch, No Layout Test case needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing order Created 6 years, 3 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 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 * 7 *
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 if (start == 0) { 164 if (start == 0) {
165 // Control characters must not render at all. 165 // Control characters must not render at all.
166 for (i = 0; i < 0x20; ++i) 166 for (i = 0; i < 0x20; ++i)
167 buffer[i] = zeroWidthSpace; 167 buffer[i] = zeroWidthSpace;
168 for (i = 0x7F; i < 0xA0; i++) 168 for (i = 0x7F; i < 0xA0; i++)
169 buffer[i] = zeroWidthSpace; 169 buffer[i] = zeroWidthSpace;
170 buffer[softHyphen] = zeroWidthSpace; 170 buffer[softHyphen] = zeroWidthSpace;
171 171
172 // \n, \t, and nonbreaking space must render as a space. 172 // \n, \t, and nonbreaking space must render as a space.
173 buffer[(int)'\n'] = ' '; 173 buffer[newlineCharacter] = space;
174 buffer[(int)'\t'] = ' '; 174 buffer[characterTabulation] = space;
175 buffer[noBreakSpace] = ' '; 175 buffer[noBreakSpace] = space;
176 } else if (start == (leftToRightMark & ~(GlyphPage::size - 1))) { 176 } else if (start == (leftToRightMark & ~(GlyphPage::size - 1))) {
177 // LRM, RLM, LRE, RLE, ZWNJ, ZWJ, and PDF must not render at all. 177 // LRM, RLM, LRE, RLE, ZWNJ, ZWJ, and PDF must not render at all.
178 buffer[leftToRightMark - start] = zeroWidthSpace; 178 buffer[leftToRightMark - start] = zeroWidthSpace;
179 buffer[rightToLeftMark - start] = zeroWidthSpace; 179 buffer[rightToLeftMark - start] = zeroWidthSpace;
180 buffer[leftToRightEmbed - start] = zeroWidthSpace; 180 buffer[leftToRightEmbed - start] = zeroWidthSpace;
181 buffer[rightToLeftEmbed - start] = zeroWidthSpace; 181 buffer[rightToLeftEmbed - start] = zeroWidthSpace;
182 buffer[leftToRightOverride - start] = zeroWidthSpace; 182 buffer[leftToRightOverride - start] = zeroWidthSpace;
183 buffer[rightToLeftOverride - start] = zeroWidthSpace; 183 buffer[rightToLeftOverride - start] = zeroWidthSpace;
184 buffer[zeroWidthNonJoiner - start] = zeroWidthSpace; 184 buffer[zeroWidthNonJoiner - start] = zeroWidthSpace;
185 buffer[zeroWidthJoiner - start] = zeroWidthSpace; 185 buffer[zeroWidthJoiner - start] = zeroWidthSpace;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 printf("\nPage %d:\n", it->key); 414 printf("\nPage %d:\n", it->key);
415 showGlyphPageTree(it->key); 415 showGlyphPageTree(it->key);
416 } 416 }
417 } 417 }
418 418
419 void showGlyphPageTree(unsigned pageNumber) 419 void showGlyphPageTree(unsigned pageNumber)
420 { 420 {
421 blink::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree(); 421 blink::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree();
422 } 422 }
423 #endif 423 #endif
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontFallbackList.cpp ('k') | Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698