| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |