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

Side by Side Diff: Source/core/dom/StyleSheetCandidate.cpp

Issue 150103007: Use fastGetAttribute in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use fastGEtAttribute more for titleAttr Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 24 matching lines...) Expand all
35 #include "core/html/HTMLLinkElement.h" 35 #include "core/html/HTMLLinkElement.h"
36 #include "core/html/HTMLStyleElement.h" 36 #include "core/html/HTMLStyleElement.h"
37 #include "core/svg/SVGStyleElement.h" 37 #include "core/svg/SVGStyleElement.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 using namespace HTMLNames; 41 using namespace HTMLNames;
42 42
43 AtomicString StyleSheetCandidate::title() const 43 AtomicString StyleSheetCandidate::title() const
44 { 44 {
45 return isElement() ? toElement(m_node).getAttribute(titleAttr) : nullAtom; 45 return isElement() ? toElement(m_node).fastGetAttribute(titleAttr) : nullAto m;
46 } 46 }
47 47
48 bool StyleSheetCandidate::isXSL() const 48 bool StyleSheetCandidate::isXSL() const
49 { 49 {
50 return !m_node.document().isHTMLDocument() && m_type == Pi && toProcessingIn struction(m_node).isXSL(); 50 return !m_node.document().isHTMLDocument() && m_type == Pi && toProcessingIn struction(m_node).isXSL();
51 } 51 }
52 52
53 bool StyleSheetCandidate::isImport() const 53 bool StyleSheetCandidate::isImport() const
54 { 54 {
55 return m_type == HTMLLink && toHTMLLinkElement(m_node).isImport(); 55 return m_type == HTMLLink && toHTMLLinkElement(m_node).isImport();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return toSVGStyleElement(m_node).sheet(); 136 return toSVGStyleElement(m_node).sheet();
137 case Pi: 137 case Pi:
138 return toProcessingInstruction(m_node).sheet(); 138 return toProcessingInstruction(m_node).sheet();
139 } 139 }
140 140
141 ASSERT_NOT_REACHED(); 141 ASSERT_NOT_REACHED();
142 return 0; 142 return 0;
143 } 143 }
144 144
145 } 145 }
OLDNEW
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698