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

Side by Side Diff: Source/core/editing/FrameSelection.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698