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

Side by Side Diff: Source/core/rendering/RenderTreeAsText.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, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ts << " " << quoteAndEscapeNonPrintables(toRenderFileUploadControl(& o)->fileTextValue()); 262 ts << " " << quoteAndEscapeNonPrintables(toRenderFileUploadControl(& o)->fileTextValue());
263 263
264 if (o.parent()) { 264 if (o.parent()) {
265 Color color = o.resolveColor(CSSPropertyColor); 265 Color color = o.resolveColor(CSSPropertyColor);
266 if (o.parent()->resolveColor(CSSPropertyColor) != color) 266 if (o.parent()->resolveColor(CSSPropertyColor) != color)
267 ts << " [color=" << color.nameForRenderTreeAsText() << "]"; 267 ts << " [color=" << color.nameForRenderTreeAsText() << "]";
268 268
269 // Do not dump invalid or transparent backgrounds, since that is the default. 269 // Do not dump invalid or transparent backgrounds, since that is the default.
270 Color backgroundColor = o.resolveColor(CSSPropertyBackgroundColor); 270 Color backgroundColor = o.resolveColor(CSSPropertyBackgroundColor);
271 if (o.parent()->resolveColor(CSSPropertyBackgroundColor) != backgrou ndColor 271 if (o.parent()->resolveColor(CSSPropertyBackgroundColor) != backgrou ndColor
272 && backgroundColor.isValid() && backgroundColor.rgb()) 272 && backgroundColor.rgb())
273 ts << " [bgcolor=" << backgroundColor.nameForRenderTreeAsText() << "]"; 273 ts << " [bgcolor=" << backgroundColor.nameForRenderTreeAsText() << "]";
274 274
275 Color textFillColor = o.resolveColor(CSSPropertyWebkitTextFillColor) ; 275 Color textFillColor = o.resolveColor(CSSPropertyWebkitTextFillColor) ;
276 if (o.parent()->resolveColor(CSSPropertyWebkitTextFillColor) != text FillColor 276 if (o.parent()->resolveColor(CSSPropertyWebkitTextFillColor) != text FillColor
277 && textFillColor.isValid() && textFillColor != color && textFill Color.rgb()) 277 && textFillColor != color && textFillColor.rgb())
278 ts << " [textFillColor=" << textFillColor.nameForRenderTreeAsTex t() << "]"; 278 ts << " [textFillColor=" << textFillColor.nameForRenderTreeAsTex t() << "]";
279 279
280 Color textStrokeColor = o.resolveColor(CSSPropertyWebkitTextStrokeCo lor); 280 Color textStrokeColor = o.resolveColor(CSSPropertyWebkitTextStrokeCo lor);
281 if (o.parent()->resolveColor(CSSPropertyWebkitTextStrokeColor) != te xtStrokeColor 281 if (o.parent()->resolveColor(CSSPropertyWebkitTextStrokeColor) != te xtStrokeColor
282 && textStrokeColor.isValid() && textStrokeColor != color && text StrokeColor.rgb()) 282 && textStrokeColor != color && textStrokeColor.rgb())
283 ts << " [textStrokeColor=" << textStrokeColor.nameForRenderTreeA sText() << "]"; 283 ts << " [textStrokeColor=" << textStrokeColor.nameForRenderTreeA sText() << "]";
284 284
285 if (o.parent()->style()->textStrokeWidth() != o.style()->textStrokeW idth() && o.style()->textStrokeWidth() > 0) 285 if (o.parent()->style()->textStrokeWidth() != o.style()->textStrokeW idth() && o.style()->textStrokeWidth() > 0)
286 ts << " [textStrokeWidth=" << o.style()->textStrokeWidth() << "] "; 286 ts << " [textStrokeWidth=" << o.style()->textStrokeWidth() << "] ";
287 } 287 }
288 288
289 if (!o.isBoxModelObject()) 289 if (!o.isBoxModelObject())
290 return; 290 return;
291 291
292 const RenderBoxModelObject& box = *toRenderBoxModelObject(&o); 292 const RenderBoxModelObject& box = *toRenderBoxModelObject(&o);
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 element->document()->updateLayout(); 855 element->document()->updateLayout();
856 856
857 RenderObject* renderer = element->renderer(); 857 RenderObject* renderer = element->renderer();
858 if (!renderer || !renderer->isListItem()) 858 if (!renderer || !renderer->isListItem())
859 return String(); 859 return String();
860 860
861 return toRenderListItem(renderer)->markerText(); 861 return toRenderListItem(renderer)->markerText();
862 } 862 }
863 863
864 } // namespace WebCore 864 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698