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

Side by Side Diff: Source/core/rendering/InlineTextBox.cpp

Issue 141273002: Code problems detected by cppcheck (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 11 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/page/DragController.cpp ('k') | Source/core/rendering/style/BasicShapes.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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, bool background) 1284 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, bool background)
1285 { 1285 {
1286 if (!renderer()->node()) 1286 if (!renderer()->node())
1287 return; 1287 return;
1288 1288
1289 Vector<DocumentMarker*> markers = renderer()->document().markers()->markersF or(renderer()->node()); 1289 Vector<DocumentMarker*> markers = renderer()->document().markers()->markersF or(renderer()->node());
1290 Vector<DocumentMarker*>::const_iterator markerIt = markers.begin(); 1290 Vector<DocumentMarker*>::const_iterator markerIt = markers.begin();
1291 1291
1292 // Give any document markers that touch this run a chance to draw before the text has been drawn. 1292 // Give any document markers that touch this run a chance to draw before the text has been drawn.
1293 // Note end() points at the last char, not one past it like endOffset and ra nges do. 1293 // Note end() points at the last char, not one past it like endOffset and ra nges do.
1294 for ( ; markerIt != markers.end(); markerIt++) { 1294 for ( ; markerIt != markers.end(); ++markerIt) {
1295 DocumentMarker* marker = *markerIt; 1295 DocumentMarker* marker = *markerIt;
1296 1296
1297 // Paint either the background markers or the foreground markers, but no t both 1297 // Paint either the background markers or the foreground markers, but no t both
1298 switch (marker->type()) { 1298 switch (marker->type()) {
1299 case DocumentMarker::Grammar: 1299 case DocumentMarker::Grammar:
1300 case DocumentMarker::Spelling: 1300 case DocumentMarker::Spelling:
1301 if (background) 1301 if (background)
1302 continue; 1302 continue;
1303 break; 1303 break;
1304 case DocumentMarker::TextMatch: 1304 case DocumentMarker::TextMatch:
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); 1557 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj);
1558 const int rendererCharacterOffset = 24; 1558 const int rendererCharacterOffset = 24;
1559 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1559 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1560 fputc(' ', stderr); 1560 fputc(' ', stderr);
1561 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1561 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1562 } 1562 }
1563 1563
1564 #endif 1564 #endif
1565 1565
1566 } // namespace WebCore 1566 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/rendering/style/BasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698