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

Side by Side Diff: webkit/port/bindings/v8/v8_custom.cpp

Issue 10268: Fix Chromium bug 4178... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element-expected.txt ('k') | no next file » | 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) 2000 Harri Porten (porten@kde.org) 2 * Copyright (C) 2000 Harri Porten (porten@kde.org)
3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
4 * Copyright (C) 2004-2006 Apple Computer, Inc. 4 * Copyright (C) 2004-2006 Apple Computer, Inc.
5 * Copyright (C) 2006 James G. Speth (speth@end.com) 5 * Copyright (C) 2006 James G. Speth (speth@end.com)
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
7 * Copyright 2007, 2008 Google Inc. All Rights Reserved. 7 * Copyright 2007, 2008 Google Inc. All Rights Reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 v8::Handle<v8::Value> result = 1322 v8::Handle<v8::Value> result =
1323 holder->GetRealNamedPropertyInPrototypeChain(name); 1323 holder->GetRealNamedPropertyInPrototypeChain(name);
1324 if (!result.IsEmpty()) 1324 if (!result.IsEmpty())
1325 return result; 1325 return result;
1326 1326
1327 // Lazy initialization map keeps global properties that can be lazily 1327 // Lazy initialization map keeps global properties that can be lazily
1328 // initialized. The value is the code to instantiate the property. 1328 // initialized. The value is the code to instantiate the property.
1329 // It must return the value of property after initialization. 1329 // It must return the value of property after initialization.
1330 static HashMap<String, String> kLazyInitMap; 1330 static HashMap<String, String> kLazyInitMap;
1331 if (kLazyInitMap.isEmpty()) { 1331 if (kLazyInitMap.isEmpty()) {
1332 // "new Image()" does not appear to be well-defined in a spec, but Safari,
1333 // Opera, and Firefox all consider it to always create an HTML image
1334 // element, regardless of the current doctype.
1332 kLazyInitMap.set("Image", 1335 kLazyInitMap.set("Image",
1333 "function Image() { \ 1336 "function Image() { \
1334 return document.createElement('image'); \ 1337 return document.createElementNS( \
1338 'http://www.w3.org/1999/xhtml', 'img'); \
1335 }; \ 1339 }; \
1336 Image"); 1340 Image");
1337 kLazyInitMap.set("Option", 1341 kLazyInitMap.set("Option",
1338 "function Option(text, value, defaultSelected, selected) { \ 1342 "function Option(text, value, defaultSelected, selected) { \
1339 var option = document.createElement('option'); \ 1343 var option = document.createElement('option'); \
1340 if (text == null) return option; \ 1344 if (text == null) return option; \
1341 option.text = text; \ 1345 option.text = text; \
1342 if (value == null) return option; \ 1346 if (value == null) return option; \
1343 option.value = value; \ 1347 option.value = value; \
1344 if (defaultSelected == null) return option; \ 1348 if (defaultSelected == null) return option; \
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
3635 #undef MAKE_CASE 3639 #undef MAKE_CASE
3636 3640
3637 default: 3641 default:
3638 return V8ClassIndex::INVALID_CLASS_INDEX; 3642 return V8ClassIndex::INVALID_CLASS_INDEX;
3639 } 3643 }
3640 } 3644 }
3641 3645
3642 #endif // ENABLE(SVG) 3646 #endif // ENABLE(SVG)
3643 3647
3644 } // namespace WebCore 3648 } // namespace WebCore
OLDNEW
« no previous file with comments | « webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698