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

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

Issue 51983003: Stop using static arrays for *Tags / *Attrs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve generated code Created 7 years, 1 month 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 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 } 384 }
385 385
386 m_useFallbackContent = true; 386 m_useFallbackContent = true;
387 387
388 // FIXME: Style gets recalculated which is suboptimal. 388 // FIXME: Style gets recalculated which is suboptimal.
389 reattachFallbackContent(); 389 reattachFallbackContent();
390 } 390 }
391 391
392 // FIXME: This should be removed, all callers are almost certainly wrong. 392 // FIXME: This should be removed, all callers are almost certainly wrong.
393 static bool isRecognizedTagName(const QualifiedName& tagName) 393 static bool isRecognizedTagName(const QualifiedName& tagName)
Inactive 2013/10/30 18:35:36 I am getting rid of this method in: https://codere
abarth-chromium 2013/10/30 19:30:11 Great.
394 { 394 {
395 DEFINE_STATIC_LOCAL(HashSet<StringImpl*>, tagList, ()); 395 DEFINE_STATIC_LOCAL(HashSet<StringImpl*>, tagList, ());
396 if (tagList.isEmpty()) { 396 if (tagList.isEmpty()) {
397 const QualifiedName* const* tags = HTMLNames::getHTMLTags(); 397 Vector<const QualifiedName*> tags;
398 for (size_t i = 0; i < HTMLNames::HTMLTagsCount; i++) { 398 HTMLNames::getHTMLTags(tags);
399 size_t HTMLTagsCount = tags.size();
400 for (size_t i = 0; i < HTMLTagsCount; ++i) {
399 if (*tags[i] == bgsoundTag 401 if (*tags[i] == bgsoundTag
400 || *tags[i] == commandTag 402 || *tags[i] == commandTag
401 || *tags[i] == detailsTag 403 || *tags[i] == detailsTag
402 || *tags[i] == figcaptionTag 404 || *tags[i] == figcaptionTag
403 || *tags[i] == figureTag 405 || *tags[i] == figureTag
404 || *tags[i] == summaryTag 406 || *tags[i] == summaryTag
405 || *tags[i] == trackTag) { 407 || *tags[i] == trackTag) {
406 // Even though we have atoms for these tags, we don't want to 408 // Even though we have atoms for these tags, we don't want to
407 // treat them as "recognized tags" for the purpose of parsing 409 // treat them as "recognized tags" for the purpose of parsing
408 // because that changes how we parse documents. 410 // because that changes how we parse documents.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 { 507 {
506 return FormAssociatedElement::form(); 508 return FormAssociatedElement::form();
507 } 509 }
508 510
509 bool HTMLObjectElement::isInteractiveContent() const 511 bool HTMLObjectElement::isInteractiveContent() const
510 { 512 {
511 return fastHasAttribute(usemapAttr); 513 return fastHasAttribute(usemapAttr);
512 } 514 }
513 515
514 } 516 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698