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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLBodyElement.cpp

Issue 1399853005: Changed CSSColorValue to return a Color (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_color
Patch Set: Rebase Created 5 years, 1 month 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 { 86 {
87 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { 87 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) {
88 if (value.isNull()) { 88 if (value.isNull()) {
89 if (name == linkAttr) 89 if (name == linkAttr)
90 document().textLinkColors().resetLinkColor(); 90 document().textLinkColors().resetLinkColor();
91 else if (name == vlinkAttr) 91 else if (name == vlinkAttr)
92 document().textLinkColors().resetVisitedLinkColor(); 92 document().textLinkColors().resetVisitedLinkColor();
93 else 93 else
94 document().textLinkColors().resetActiveLinkColor(); 94 document().textLinkColors().resetActiveLinkColor();
95 } else { 95 } else {
96 RGBA32 color; 96 Color color;
97 if (CSSParser::parseColor(color, value, !document().inQuirksMode())) { 97 if (CSSParser::parseColor(color, value, !document().inQuirksMode())) {
98 if (name == linkAttr) 98 if (name == linkAttr)
99 document().textLinkColors().setLinkColor(color); 99 document().textLinkColors().setLinkColor(color);
100 else if (name == vlinkAttr) 100 else if (name == vlinkAttr)
101 document().textLinkColors().setVisitedLinkColor(color); 101 document().textLinkColors().setVisitedLinkColor(color);
102 else 102 else
103 document().textLinkColors().setActiveLinkColor(color); 103 document().textLinkColors().setActiveLinkColor(color);
104 } 104 }
105 } 105 }
106 106
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 bool HTMLBodyElement::supportsFocus() const 187 bool HTMLBodyElement::supportsFocus() const
188 { 188 {
189 // This override is needed because the inherited method bails if the parent is editable. 189 // This override is needed because the inherited method bails if the parent is editable.
190 // The <body> should be focusable even if <html> is editable. 190 // The <body> should be focusable even if <html> is editable.
191 return hasEditableStyle() || HTMLElement::supportsFocus(); 191 return hasEditableStyle() || HTMLElement::supportsFocus();
192 } 192 }
193 193
194 } // namespace blink 194 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingStyle.cpp ('k') | third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698