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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutCounter.cpp

Issue 2157963002: Improve grammar in some comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maxiumum Created 4 years, 5 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 Allan Sandfeld Jensen (kde@carewolf.com) 2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007 Apple Inc. All rights 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (object.isText() && !object.isBR()) 132 if (object.isText() && !object.isBR())
133 return false; 133 return false;
134 Node* generatingNode = object.generatingNode(); 134 Node* generatingNode = object.generatingNode();
135 // We must have a generating node or else we cannot have a counter. 135 // We must have a generating node or else we cannot have a counter.
136 if (!generatingNode) 136 if (!generatingNode)
137 return false; 137 return false;
138 const ComputedStyle& style = object.styleRef(); 138 const ComputedStyle& style = object.styleRef();
139 139
140 switch (style.styleType()) { 140 switch (style.styleType()) {
141 case PseudoIdNone: 141 case PseudoIdNone:
142 // Sometimes nodes have more then one layoutObject. Only the first one g ets the counter 142 // Sometimes nodes have more than one layoutObject. Only the first one g ets the counter
143 // LayoutTests/http/tests/css/counter-crash.html 143 // LayoutTests/http/tests/css/counter-crash.html
144 if (generatingNode->layoutObject() != &object) 144 if (generatingNode->layoutObject() != &object)
145 return false; 145 return false;
146 break; 146 break;
147 case PseudoIdBefore: 147 case PseudoIdBefore:
148 case PseudoIdAfter: 148 case PseudoIdAfter:
149 break; 149 break;
150 default: 150 default:
151 return false; // Counters are forbidden from all other pseudo elements. 151 return false; // Counters are forbidden from all other pseudo elements.
152 } 152 }
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 fprintf(stderr, " "); 627 fprintf(stderr, " ");
628 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", 628 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n",
629 current, current->node(), current->parent(), current->previousSiblin g(), 629 current, current->node(), current->parent(), current->previousSiblin g(),
630 current->nextSibling(), current->hasCounterNodeMap() ? 630 current->nextSibling(), current->hasCounterNodeMap() ?
631 counterName ? blink::counterMaps().get(current)->get(identifier) : ( blink::CounterNode*)1 : (blink::CounterNode*)0); 631 counterName ? blink::counterMaps().get(current)->get(identifier) : ( blink::CounterNode*)1 : (blink::CounterNode*)0);
632 } 632 }
633 fflush(stderr); 633 fflush(stderr);
634 } 634 }
635 635
636 #endif // NDEBUG 636 #endif // NDEBUG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698