| 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 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 | 154 |
| 155 void HTMLAnchorElement::setActive(bool down) | 155 void HTMLAnchorElement::setActive(bool down) |
| 156 { | 156 { |
| 157 if (hasEditableStyle()) | 157 if (hasEditableStyle()) |
| 158 return; | 158 return; |
| 159 | 159 |
| 160 ContainerNode::setActive(down); | 160 ContainerNode::setActive(down); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void HTMLAnchorElement::attributeWillChange(const QualifiedName& name, const Ato
micString& oldValue, const AtomicString& newValue) | |
| 164 { | |
| 165 if (name == hrefAttr && inDocument()) { | |
| 166 V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivi
tyLoggerIfIsolatedWorld(); | |
| 167 if (activityLogger) { | |
| 168 Vector<String> argv; | |
| 169 argv.append("a"); | |
| 170 argv.append(hrefAttr.toString()); | |
| 171 argv.append(oldValue); | |
| 172 argv.append(newValue); | |
| 173 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data
()); | |
| 174 } | |
| 175 } | |
| 176 HTMLElement::attributeWillChange(name, oldValue, newValue); | |
| 177 } | |
| 178 | |
| 179 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 163 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
| 180 { | 164 { |
| 181 if (name == hrefAttr) { | 165 if (name == hrefAttr) { |
| 182 bool wasLink = isLink(); | 166 bool wasLink = isLink(); |
| 183 setIsLink(!value.isNull()); | 167 setIsLink(!value.isNull()); |
| 184 if (wasLink != isLink()) { | 168 if (wasLink != isLink()) { |
| 185 didAffectSelector(AffectedSelectorLink | AffectedSelectorVisited | A
ffectedSelectorEnabled); | 169 didAffectSelector(AffectedSelectorLink | AffectedSelectorVisited | A
ffectedSelectorEnabled); |
| 186 if (wasLink && treeScope().adjustedFocusedElement() == this) { | 170 if (wasLink && treeScope().adjustedFocusedElement() == this) { |
| 187 // We might want to call blur(), but it's dangerous to dispatch | 171 // We might want to call blur(), but it's dangerous to dispatch |
| 188 // events here. | 172 // events here. |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 Vector<String> argv; | 366 Vector<String> argv; |
| 383 argv.append("a"); | 367 argv.append("a"); |
| 384 argv.append(fastGetAttribute(hrefAttr)); | 368 argv.append(fastGetAttribute(hrefAttr)); |
| 385 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); | 369 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); |
| 386 } | 370 } |
| 387 } | 371 } |
| 388 return HTMLElement::insertedInto(insertionPoint); | 372 return HTMLElement::insertedInto(insertionPoint); |
| 389 } | 373 } |
| 390 | 374 |
| 391 } | 375 } |
| OLD | NEW |