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

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

Issue 181693003: Have Document::markers() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/testing/Internals.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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_logicalWidth , selHeight)); 1285 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_logicalWidth , selHeight));
1286 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin. y() - deltaY), selHeight, color, sPos, ePos); 1286 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin. y() - deltaY), selHeight, color, sPos, ePos);
1287 } 1287 }
1288 } 1288 }
1289 1289
1290 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, bool background) 1290 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, bool background)
1291 { 1291 {
1292 if (!renderer()->node()) 1292 if (!renderer()->node())
1293 return; 1293 return;
1294 1294
1295 Vector<DocumentMarker*> markers = renderer()->document().markers()->markersF or(renderer()->node()); 1295 Vector<DocumentMarker*> markers = renderer()->document().markers().markersFo r(renderer()->node());
1296 Vector<DocumentMarker*>::const_iterator markerIt = markers.begin(); 1296 Vector<DocumentMarker*>::const_iterator markerIt = markers.begin();
1297 1297
1298 // Give any document markers that touch this run a chance to draw before the text has been drawn. 1298 // Give any document markers that touch this run a chance to draw before the text has been drawn.
1299 // Note end() points at the last char, not one past it like endOffset and ra nges do. 1299 // Note end() points at the last char, not one past it like endOffset and ra nges do.
1300 for ( ; markerIt != markers.end(); ++markerIt) { 1300 for ( ; markerIt != markers.end(); ++markerIt) {
1301 DocumentMarker* marker = *markerIt; 1301 DocumentMarker* marker = *markerIt;
1302 1302
1303 // Paint either the background markers or the foreground markers, but no t both 1303 // Paint either the background markers or the foreground markers, but no t both
1304 switch (marker->type()) { 1304 switch (marker->type()) {
1305 case DocumentMarker::Grammar: 1305 case DocumentMarker::Grammar:
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); 1562 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj);
1563 const int rendererCharacterOffset = 24; 1563 const int rendererCharacterOffset = 24;
1564 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1564 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1565 fputc(' ', stderr); 1565 fputc(' ', stderr);
1566 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1566 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1567 } 1567 }
1568 1568
1569 #endif 1569 #endif
1570 1570
1571 } // namespace WebCore 1571 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698