| 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 | 1469 |
| 1470 if (element && element->renderer()) | 1470 if (element && element->renderer()) |
| 1471 caretColor = element->renderer()->style()->visitedDependentColor(CSSProp
ertyColor); | 1471 caretColor = element->renderer()->style()->visitedDependentColor(CSSProp
ertyColor); |
| 1472 | 1472 |
| 1473 context->fillRect(caret, caretColor); | 1473 context->fillRect(caret, caretColor); |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 void FrameSelection::debugRenderer(RenderObject *r, bool selected) const | 1476 void FrameSelection::debugRenderer(RenderObject *r, bool selected) const |
| 1477 { | 1477 { |
| 1478 if (r->node()->isElementNode()) { | 1478 if (r->node()->isElementNode()) { |
| 1479 Element* element = static_cast<Element *>(r->node()); | 1479 Element* element = toElement(r->node()); |
| 1480 fprintf(stderr, "%s%s\n", selected ? "==> " : " ", element->localName
().string().utf8().data()); | 1480 fprintf(stderr, "%s%s\n", selected ? "==> " : " ", element->localName
().string().utf8().data()); |
| 1481 } else if (r->isText()) { | 1481 } else if (r->isText()) { |
| 1482 RenderText* textRenderer = toRenderText(r); | 1482 RenderText* textRenderer = toRenderText(r); |
| 1483 if (!textRenderer->textLength() || !textRenderer->firstTextBox()) { | 1483 if (!textRenderer->textLength() || !textRenderer->firstTextBox()) { |
| 1484 fprintf(stderr, "%s#text (empty)\n", selected ? "==> " : " "); | 1484 fprintf(stderr, "%s#text (empty)\n", selected ? "==> " : " "); |
| 1485 return; | 1485 return; |
| 1486 } | 1486 } |
| 1487 | 1487 |
| 1488 static const int max = 36; | 1488 static const int max = 36; |
| 1489 String text = textRenderer->text(); | 1489 String text = textRenderer->text(); |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2098 sel.showTreeForThis(); | 2098 sel.showTreeForThis(); |
| 2099 } | 2099 } |
| 2100 | 2100 |
| 2101 void showTree(const WebCore::FrameSelection* sel) | 2101 void showTree(const WebCore::FrameSelection* sel) |
| 2102 { | 2102 { |
| 2103 if (sel) | 2103 if (sel) |
| 2104 sel->showTreeForThis(); | 2104 sel->showTreeForThis(); |
| 2105 } | 2105 } |
| 2106 | 2106 |
| 2107 #endif | 2107 #endif |
| OLD | NEW |