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

Side by Side Diff: Source/bindings/v8/custom/V8StyleSheetListCustom.cpp

Issue 15690020: [binding] Check own property on named property accessor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: udpated tests Created 7 years, 6 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/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp ('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) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "V8StyleSheet.h" 34 #include "V8StyleSheet.h"
35 #include "bindings/v8/V8Binding.h" 35 #include "bindings/v8/V8Binding.h"
36 #include "core/css/StyleSheetList.h" 36 #include "core/css/StyleSheetList.h"
37 #include "core/html/HTMLStyleElement.h" 37 #include "core/html/HTMLStyleElement.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 v8::Handle<v8::Value> V8StyleSheetList::namedPropertyGetter(v8::Local<v8::String > name, const v8::AccessorInfo& info) 41 v8::Handle<v8::Value> V8StyleSheetList::namedPropertyGetter(v8::Local<v8::String > name, const v8::AccessorInfo& info)
42 { 42 {
43 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
44 return v8Undefined();
45 if (info.Holder()->HasRealNamedCallbackProperty(name))
46 return v8Undefined();
43 if (info.Holder()->HasRealNamedProperty(name)) 47 if (info.Holder()->HasRealNamedProperty(name))
44 return v8Undefined(); 48 return v8Undefined();
45 49
46 // Search style sheet. 50 // Search style sheet.
47 StyleSheetList* imp = V8StyleSheetList::toNative(info.Holder()); 51 StyleSheetList* imp = V8StyleSheetList::toNative(info.Holder());
48 HTMLStyleElement* item = imp->getNamedItem(toWebCoreString(name)); 52 HTMLStyleElement* item = imp->getNamedItem(toWebCoreString(name));
49 if (!item) 53 if (!item)
50 return v8Undefined(); 54 return v8Undefined();
51 55
52 return toV8Fast(item->sheet(), info, imp); 56 return toV8Fast(item->sheet(), info, imp);
53 } 57 }
54 58
55 } // namespace WebCore 59 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698