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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const bool useStrictParsing = true; 49 const bool useStrictParsing = true;
50 if (CSSParser::parseColor(parsedColor, colorString, useStrictParsing)) 50 if (CSSParser::parseColor(parsedColor, colorString, useStrictParsing))
51 return ParsedRGBA; 51 return ParsedRGBA;
52 if (CSSParser::parseSystemColor(parsedColor, colorString)) 52 if (CSSParser::parseSystemColor(parsedColor, colorString))
53 return ParsedSystemColor; 53 return ParsedSystemColor;
54 return ParseFailed; 54 return ParseFailed;
55 } 55 }
56 56
57 static Color currentColor(HTMLCanvasElement* canvas) 57 static Color currentColor(HTMLCanvasElement* canvas)
58 { 58 {
59 if (!canvas || !canvas->inShadowIncludingDocument() || !canvas->inlineStyle( )) 59 if (!canvas || !canvas->isConnected() || !canvas->inlineStyle())
60 return Color::black; 60 return Color::black;
61 Color color = Color::black; 61 Color color = Color::black;
62 CSSParser::parseColor(color, canvas->inlineStyle()->getPropertyValue(CSSProp ertyColor)); 62 CSSParser::parseColor(color, canvas->inlineStyle()->getPropertyValue(CSSProp ertyColor));
63 return color; 63 return color;
64 } 64 }
65 65
66 bool parseColorOrCurrentColor(Color& parsedColor, const String& colorString, HTM LCanvasElement* canvas) 66 bool parseColorOrCurrentColor(Color& parsedColor, const String& colorString, HTM LCanvasElement* canvas)
67 { 67 {
68 ColorParseResult parseResult = parseColor(parsedColor, colorString); 68 ColorParseResult parseResult = parseColor(parsedColor, colorString);
69 switch (parseResult) { 69 switch (parseResult) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return Color::black; 136 return Color::black;
137 } 137 }
138 138
139 DEFINE_TRACE(CanvasStyle) 139 DEFINE_TRACE(CanvasStyle)
140 { 140 {
141 visitor->trace(m_gradient); 141 visitor->trace(m_gradient);
142 visitor->trace(m_pattern); 142 visitor->trace(m_pattern);
143 } 143 }
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698