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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 } | 520 } |
521 | 521 |
522 GraphicsContext* context = paintInfo.context; | 522 GraphicsContext* context = paintInfo.context; |
523 RenderStyle* styleToUse = renderer().style(isFirstLineStyle()); | 523 RenderStyle* styleToUse = renderer().style(isFirstLineStyle()); |
524 | 524 |
525 FloatPoint boxOrigin = locationIncludingFlipping(); | 525 FloatPoint boxOrigin = locationIncludingFlipping(); |
526 boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().to
Float()); | 526 boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().to
Float()); |
527 FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight())); | 527 FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight())); |
528 | 528 |
529 // Determine whether or not we have composition underlines to draw. | 529 // Determine whether or not we have composition underlines to draw. |
530 bool containsComposition = renderer().node() && renderer().frame()->inputMet
hodController().compositionNode() == renderer().node(); | 530 bool containsComposition = renderer().frame() && renderer().node() && render
er().frame()->inputMethodController().compositionNode() == renderer().node(); |
531 bool useCustomUnderlines = containsComposition && renderer().frame()->inputM
ethodController().compositionUsesCustomUnderlines(); | 531 bool useCustomUnderlines = renderer().frame() && containsComposition && rend
erer().frame()->inputMethodController().compositionUsesCustomUnderlines(); |
532 | 532 |
533 bool haveSelection = selectionState() != RenderObject::SelectionNone; | 533 bool haveSelection = selectionState() != RenderObject::SelectionNone; |
534 | 534 |
535 // Determine text colors. | 535 // Determine text colors. |
536 TextPaintingStyle textStyle = textPaintingStyle(renderer(), styleToUse); | 536 TextPaintingStyle textStyle = textPaintingStyle(renderer(), styleToUse); |
537 TextPaintingStyle selectionStyle = selectionPaintingStyle(renderer(), haveSe
lection, textStyle); | 537 TextPaintingStyle selectionStyle = selectionPaintingStyle(renderer(), haveSe
lection, textStyle); |
538 bool paintSelectedTextSeparately = textStyle != selectionStyle; | 538 bool paintSelectedTextSeparately = textStyle != selectionStyle; |
539 | 539 |
540 // Set our font. | 540 // Set our font. |
541 const Font& font = styleToUse->font(); | 541 const Font& font = styleToUse->font(); |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 1335 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
1336 const int rendererCharacterOffset = 24; | 1336 const int rendererCharacterOffset = 24; |
1337 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1337 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1338 fputc(' ', stderr); | 1338 fputc(' ', stderr); |
1339 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1339 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1340 } | 1340 } |
1341 | 1341 |
1342 #endif | 1342 #endif |
1343 | 1343 |
1344 } // namespace blink | 1344 } // namespace blink |
OLD | NEW |