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

Side by Side Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 400763002: Adding relList attr to link and anchor element Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added to relList to anchor element and LayoutTest Created 6 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) 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return m_linkRelations & relation; 273 return m_linkRelations & relation;
274 } 274 }
275 275
276 void HTMLAnchorElement::setRel(const AtomicString& value) 276 void HTMLAnchorElement::setRel(const AtomicString& value)
277 { 277 {
278 m_linkRelations = 0; 278 m_linkRelations = 0;
279 SpaceSplitString newLinkRelations(value, true); 279 SpaceSplitString newLinkRelations(value, true);
280 // FIXME: Add link relations as they are implemented 280 // FIXME: Add link relations as they are implemented
281 if (newLinkRelations.contains("noreferrer")) 281 if (newLinkRelations.contains("noreferrer"))
282 m_linkRelations |= RelationNoReferrer; 282 m_linkRelations |= RelationNoReferrer;
283 if (m_relList)
284 m_relList->setValue(value);
285 }
286
287 DOMTokenList& HTMLAnchorElement::relList()
288 {
289 if (!m_relList)
290 m_relList = RelList::create(this);
291 return *m_relList;
283 } 292 }
284 293
285 const AtomicString& HTMLAnchorElement::name() const 294 const AtomicString& HTMLAnchorElement::name() const
286 { 295 {
287 return getNameAttribute(); 296 return getNameAttribute();
288 } 297 }
289 298
290 short HTMLAnchorElement::tabIndex() const 299 short HTMLAnchorElement::tabIndex() const
291 { 300 {
292 // Skip the supportsFocus check in HTMLElement. 301 // Skip the supportsFocus check in HTMLElement.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 Vector<String> argv; 386 Vector<String> argv;
378 argv.append("a"); 387 argv.append("a");
379 argv.append(fastGetAttribute(hrefAttr)); 388 argv.append(fastGetAttribute(hrefAttr));
380 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); 389 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() );
381 } 390 }
382 } 391 }
383 return HTMLElement::insertedInto(insertionPoint); 392 return HTMLElement::insertedInto(insertionPoint);
384 } 393 }
385 394
386 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698