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

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

Issue 177613003: Consistently cache ElementData::length() before loops (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test failure 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLEmbedElement.cpp ('k') | Source/core/page/PageSerializer.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) 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 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // we have to explicitly suppress the tag's CODEBASE attribute if there is n one in a PARAM, 176 // we have to explicitly suppress the tag's CODEBASE attribute if there is n one in a PARAM,
177 // else our Java plugin will misinterpret it. [4004531] 177 // else our Java plugin will misinterpret it. [4004531]
178 String codebase; 178 String codebase;
179 if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) { 179 if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) {
180 codebase = "codebase"; 180 codebase = "codebase";
181 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM already 181 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM already
182 } 182 }
183 183
184 // Turn the attributes of the <object> element into arrays, but don't overri de <param> values. 184 // Turn the attributes of the <object> element into arrays, but don't overri de <param> values.
185 if (hasAttributes()) { 185 if (hasAttributes()) {
186 for (unsigned i = 0; i < attributeCount(); ++i) { 186 unsigned attributeCount = this->attributeCount();
187 for (unsigned i = 0; i < attributeCount; ++i) {
187 const Attribute* attribute = attributeItem(i); 188 const Attribute* attribute = attributeItem(i);
188 const AtomicString& name = attribute->name().localName(); 189 const AtomicString& name = attribute->name().localName();
189 if (!uniqueParamNames.contains(name.impl())) { 190 if (!uniqueParamNames.contains(name.impl())) {
190 paramNames.append(name.string()); 191 paramNames.append(name.string());
191 paramValues.append(attribute->value().string()); 192 paramValues.append(attribute->value().string());
192 } 193 }
193 } 194 }
194 } 195 }
195 196
196 mapDataParamToSrc(&paramNames, &paramValues); 197 mapDataParamToSrc(&paramNames, &paramValues);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 { 477 {
477 return fastHasAttribute(usemapAttr); 478 return fastHasAttribute(usemapAttr);
478 } 479 }
479 480
480 bool HTMLObjectElement::useFallbackContent() const 481 bool HTMLObjectElement::useFallbackContent() const
481 { 482 {
482 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 483 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
483 } 484 }
484 485
485 } 486 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLEmbedElement.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698