| OLD | NEW |
| 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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_logicalWidth
, selHeight)); | 1304 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_logicalWidth
, selHeight)); |
| 1305 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin.
y() - deltaY), selHeight, color, sPos, ePos); | 1305 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin.
y() - deltaY), selHeight, color, sPos, ePos); |
| 1306 } | 1306 } |
| 1307 } | 1307 } |
| 1308 | 1308 |
| 1309 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint&
boxOrigin, RenderStyle* style, const Font& font, bool background) | 1309 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint&
boxOrigin, RenderStyle* style, const Font& font, bool background) |
| 1310 { | 1310 { |
| 1311 if (!renderer().node()) | 1311 if (!renderer().node()) |
| 1312 return; | 1312 return; |
| 1313 | 1313 |
| 1314 Vector<DocumentMarker*> markers = renderer().document().markers().markersFor
(renderer().node()); | 1314 WillBeHeapVector<DocumentMarker*> markers = renderer().document().markers().
markersFor(renderer().node()); |
| 1315 Vector<DocumentMarker*>::const_iterator markerIt = markers.begin(); | 1315 WillBeHeapVector<DocumentMarker*>::const_iterator markerIt = markers.begin()
; |
| 1316 | 1316 |
| 1317 // Give any document markers that touch this run a chance to draw before the
text has been drawn. | 1317 // Give any document markers that touch this run a chance to draw before the
text has been drawn. |
| 1318 // Note end() points at the last char, not one past it like endOffset and ra
nges do. | 1318 // Note end() points at the last char, not one past it like endOffset and ra
nges do. |
| 1319 for ( ; markerIt != markers.end(); ++markerIt) { | 1319 for ( ; markerIt != markers.end(); ++markerIt) { |
| 1320 DocumentMarker* marker = *markerIt; | 1320 DocumentMarker* marker = *markerIt; |
| 1321 | 1321 |
| 1322 // Paint either the background markers or the foreground markers, but no
t both | 1322 // Paint either the background markers or the foreground markers, but no
t both |
| 1323 switch (marker->type()) { | 1323 switch (marker->type()) { |
| 1324 case DocumentMarker::Grammar: | 1324 case DocumentMarker::Grammar: |
| 1325 case DocumentMarker::Spelling: | 1325 case DocumentMarker::Spelling: |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 1574 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
| 1575 const int rendererCharacterOffset = 24; | 1575 const int rendererCharacterOffset = 24; |
| 1576 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1576 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
| 1577 fputc(' ', stderr); | 1577 fputc(' ', stderr); |
| 1578 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1578 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 #endif | 1581 #endif |
| 1582 | 1582 |
| 1583 } // namespace WebCore | 1583 } // namespace WebCore |
| OLD | NEW |