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

Side by Side Diff: Source/core/dom/DOMStringMap.h

Issue 63223002: Handle (numeric) indexed access of DOMStringMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tests for array index-like properties 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
« no previous file with comments | « LayoutTests/fast/dom/script-tests/dataset.js ('k') | Source/core/dom/DOMStringMap.idl » ('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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // delete document.body.dataset["-foo"] // false instead of DOM Exceptio n 12 66 // delete document.body.dataset["-foo"] // false instead of DOM Exceptio n 12
67 // LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple. html 67 // LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple. html
68 return result; 68 return result;
69 } 69 }
70 void namedPropertyEnumerator(Vector<String>& names, ExceptionState&) 70 void namedPropertyEnumerator(Vector<String>& names, ExceptionState&)
71 { 71 {
72 getNames(names); 72 getNames(names);
73 } 73 }
74 bool namedPropertyQuery(const AtomicString&, ExceptionState&); 74 bool namedPropertyQuery(const AtomicString&, ExceptionState&);
75 75
76 String anonymousIndexedGetter(uint32_t index)
77 {
78 return item(String::number(index));
79 }
80 bool anonymousIndexedSetter(uint32_t index, const String& value, ExceptionSt ate& es)
81 {
82 return anonymousNamedSetter(String::number(index), value, es);
83 }
84 bool anonymousIndexedDeleter(uint32_t index, ExceptionState& es)
85 {
86 return anonymousNamedDeleter(AtomicString(String::number(index)), es);
87 }
88
76 virtual Element* element() = 0; 89 virtual Element* element() = 0;
77 90
78 protected: 91 protected:
79 DOMStringMap() 92 DOMStringMap()
80 { 93 {
81 ScriptWrappable::init(this); 94 ScriptWrappable::init(this);
82 } 95 }
83 }; 96 };
84 97
85 } // namespace WebCore 98 } // namespace WebCore
86 99
87 #endif // DOMStringMap_h 100 #endif // DOMStringMap_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/script-tests/dataset.js ('k') | Source/core/dom/DOMStringMap.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698