| OLD | NEW |
| 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 | 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 7 * reserved. | 7 * reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); | 79 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); |
| 80 } else if (name == bgcolorAttr) { | 80 } else if (name == bgcolorAttr) { |
| 81 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); | 81 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); |
| 82 } else if (name == textAttr) { | 82 } else if (name == textAttr) { |
| 83 addHTMLColorToStyle(style, CSSPropertyColor, value); | 83 addHTMLColorToStyle(style, CSSPropertyColor, value); |
| 84 } else { | 84 } else { |
| 85 HTMLElement::collectStyleForPresentationAttribute(name, value, style); | 85 HTMLElement::collectStyleForPresentationAttribute(name, value, style); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 void HTMLBodyElement::parseAttribute(const QualifiedName& name, | 89 void HTMLBodyElement::parseAttribute( |
| 90 const AtomicString& oldValue, | 90 const AttributeModificationParams& params) { |
| 91 const AtomicString& value) { | 91 const QualifiedName& name = params.name; |
| 92 const AtomicString& value = params.newValue; |
| 92 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { | 93 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { |
| 93 if (value.isNull()) { | 94 if (value.isNull()) { |
| 94 if (name == linkAttr) | 95 if (name == linkAttr) |
| 95 document().textLinkColors().resetLinkColor(); | 96 document().textLinkColors().resetLinkColor(); |
| 96 else if (name == vlinkAttr) | 97 else if (name == vlinkAttr) |
| 97 document().textLinkColors().resetVisitedLinkColor(); | 98 document().textLinkColors().resetVisitedLinkColor(); |
| 98 else | 99 else |
| 99 document().textLinkColors().resetActiveLinkColor(); | 100 document().textLinkColors().resetActiveLinkColor(); |
| 100 } else { | 101 } else { |
| 101 Color color; | 102 Color color; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 document().setWindowAttributeEventListener( | 207 document().setWindowAttributeEventListener( |
| 207 EventTypeNames::offline, | 208 EventTypeNames::offline, |
| 208 createAttributeEventListener(document().frame(), name, value, | 209 createAttributeEventListener(document().frame(), name, value, |
| 209 eventParameterName())); | 210 eventParameterName())); |
| 210 } else if (name == onlanguagechangeAttr) { | 211 } else if (name == onlanguagechangeAttr) { |
| 211 document().setWindowAttributeEventListener( | 212 document().setWindowAttributeEventListener( |
| 212 EventTypeNames::languagechange, | 213 EventTypeNames::languagechange, |
| 213 createAttributeEventListener(document().frame(), name, value, | 214 createAttributeEventListener(document().frame(), name, value, |
| 214 eventParameterName())); | 215 eventParameterName())); |
| 215 } else { | 216 } else { |
| 216 HTMLElement::parseAttribute(name, oldValue, value); | 217 HTMLElement::parseAttribute(params); |
| 217 } | 218 } |
| 218 } | 219 } |
| 219 | 220 |
| 220 Node::InsertionNotificationRequest HTMLBodyElement::insertedInto( | 221 Node::InsertionNotificationRequest HTMLBodyElement::insertedInto( |
| 221 ContainerNode* insertionPoint) { | 222 ContainerNode* insertionPoint) { |
| 222 HTMLElement::insertedInto(insertionPoint); | 223 HTMLElement::insertedInto(insertionPoint); |
| 223 return InsertionShouldCallDidNotifySubtreeInsertions; | 224 return InsertionShouldCallDidNotifySubtreeInsertions; |
| 224 } | 225 } |
| 225 | 226 |
| 226 void HTMLBodyElement::didNotifySubtreeInsertionsToDocument() { | 227 void HTMLBodyElement::didNotifySubtreeInsertionsToDocument() { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 250 return backgroundAttr; | 251 return backgroundAttr; |
| 251 } | 252 } |
| 252 | 253 |
| 253 bool HTMLBodyElement::supportsFocus() const { | 254 bool HTMLBodyElement::supportsFocus() const { |
| 254 // This override is needed because the inherited method bails if the parent is | 255 // This override is needed because the inherited method bails if the parent is |
| 255 // editable. The <body> should be focusable even if <html> is editable. | 256 // editable. The <body> should be focusable even if <html> is editable. |
| 256 return hasEditableStyle(*this) || HTMLElement::supportsFocus(); | 257 return hasEditableStyle(*this) || HTMLElement::supportsFocus(); |
| 257 } | 258 } |
| 258 | 259 |
| 259 } // namespace blink | 260 } // namespace blink |
| OLD | NEW |