OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1466 | 1466 |
1467 Color caretColor = Color::black; | 1467 Color caretColor = Color::black; |
1468 | 1468 |
1469 Element* element; | 1469 Element* element; |
1470 if (node->isElementNode()) | 1470 if (node->isElementNode()) |
1471 element = toElement(node); | 1471 element = toElement(node); |
1472 else | 1472 else |
1473 element = node->parentElement(); | 1473 element = node->parentElement(); |
1474 | 1474 |
1475 if (element && element->renderer()) | 1475 if (element && element->renderer()) |
1476 caretColor = element->renderer()->style()->visitedDependentColor(CSSProp
ertyColor); | 1476 caretColor = element->renderer()->resolveColor(CSSPropertyColor); |
1477 | 1477 |
1478 context->fillRect(caret, caretColor); | 1478 context->fillRect(caret, caretColor); |
1479 } | 1479 } |
1480 | 1480 |
1481 void FrameSelection::debugRenderer(RenderObject *r, bool selected) const | 1481 void FrameSelection::debugRenderer(RenderObject *r, bool selected) const |
1482 { | 1482 { |
1483 if (r->node()->isElementNode()) { | 1483 if (r->node()->isElementNode()) { |
1484 Element* element = toElement(r->node()); | 1484 Element* element = toElement(r->node()); |
1485 fprintf(stderr, "%s%s\n", selected ? "==> " : " ", element->localName
().string().utf8().data()); | 1485 fprintf(stderr, "%s%s\n", selected ? "==> " : " ", element->localName
().string().utf8().data()); |
1486 } else if (r->isText()) { | 1486 } else if (r->isText()) { |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 sel.showTreeForThis(); | 2126 sel.showTreeForThis(); |
2127 } | 2127 } |
2128 | 2128 |
2129 void showTree(const WebCore::FrameSelection* sel) | 2129 void showTree(const WebCore::FrameSelection* sel) |
2130 { | 2130 { |
2131 if (sel) | 2131 if (sel) |
2132 sel->showTreeForThis(); | 2132 sel->showTreeForThis(); |
2133 } | 2133 } |
2134 | 2134 |
2135 #endif | 2135 #endif |
OLD | NEW |