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

Side by Side Diff: Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 459203004: Have DocumentOrderedMap API deal with AtomicString type instead of StringImpl* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/DocumentOrderedMap.h » ('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) 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2011 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 // Search IDL functions defined in the prototype 417 // Search IDL functions defined in the prototype
418 if (!info.Holder()->GetRealNamedProperty(name).IsEmpty()) 418 if (!info.Holder()->GetRealNamedProperty(name).IsEmpty())
419 return; 419 return;
420 420
421 // Search named items in the document. 421 // Search named items in the document.
422 Document* doc = frame->document(); 422 Document* doc = frame->document();
423 423
424 if (doc && doc->isHTMLDocument()) { 424 if (doc && doc->isHTMLDocument()) {
425 if (toHTMLDocument(doc)->hasNamedItem(propName) || doc->hasElementWithId (propName.impl())) { 425 if (toHTMLDocument(doc)->hasNamedItem(propName) || doc->hasElementWithId (propName)) {
426 RefPtrWillBeRawPtr<HTMLCollection> items = doc->windowNamedItems(pro pName); 426 RefPtrWillBeRawPtr<HTMLCollection> items = doc->windowNamedItems(pro pName);
427 if (!items->isEmpty()) { 427 if (!items->isEmpty()) {
428 if (items->hasExactlyOneItem()) { 428 if (items->hasExactlyOneItem()) {
429 v8SetReturnValueFast(info, items->item(0), window); 429 v8SetReturnValueFast(info, items->item(0), window);
430 return; 430 return;
431 } 431 }
432 v8SetReturnValueFast(info, items.release(), window); 432 v8SetReturnValueFast(info, items.release(), window);
433 return; 433 return;
434 } 434 }
435 } 435 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren t(isolate)); 544 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren t(isolate));
545 if (context.IsEmpty()) 545 if (context.IsEmpty())
546 return v8Undefined(); 546 return v8Undefined();
547 547
548 v8::Handle<v8::Object> global = context->Global(); 548 v8::Handle<v8::Object> global = context->Global();
549 ASSERT(!global.IsEmpty()); 549 ASSERT(!global.IsEmpty());
550 return global; 550 return global;
551 } 551 }
552 552
553 } // namespace blink 553 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/DocumentOrderedMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698