| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 | 499 |
| 500 WebLocalFrame* WebLocalFrame::frameForCurrentContext() { | 500 WebLocalFrame* WebLocalFrame::frameForCurrentContext() { |
| 501 v8::Local<v8::Context> context = | 501 v8::Local<v8::Context> context = |
| 502 v8::Isolate::GetCurrent()->GetCurrentContext(); | 502 v8::Isolate::GetCurrent()->GetCurrentContext(); |
| 503 if (context.IsEmpty()) | 503 if (context.IsEmpty()) |
| 504 return 0; | 504 return 0; |
| 505 return frameForContext(context); | 505 return frameForContext(context); |
| 506 } | 506 } |
| 507 | 507 |
| 508 WebLocalFrame* WebLocalFrame::frameForContext(v8::Local<v8::Context> context) { | 508 WebLocalFrame* WebLocalFrame::frameForContext(v8::Local<v8::Context> context) { |
| 509 return WebLocalFrameImpl::fromFrame( | 509 return WebLocalFrameImpl::fromFrame(toLocalFrameIfNotDetached(context)); |
| 510 toLocalFrame(toFrameIfNotDetached(context))); | |
| 511 } | 510 } |
| 512 | 511 |
| 513 WebLocalFrame* WebLocalFrame::fromFrameOwnerElement(const WebElement& element) { | 512 WebLocalFrame* WebLocalFrame::fromFrameOwnerElement(const WebElement& element) { |
| 514 return WebLocalFrameImpl::fromFrameOwnerElement(element); | 513 return WebLocalFrameImpl::fromFrameOwnerElement(element); |
| 515 } | 514 } |
| 516 | 515 |
| 517 bool WebLocalFrameImpl::isWebLocalFrame() const { | 516 bool WebLocalFrameImpl::isWebLocalFrame() const { |
| 518 return true; | 517 return true; |
| 519 } | 518 } |
| 520 | 519 |
| (...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2460 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2459 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
| 2461 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2460 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2462 } else { | 2461 } else { |
| 2463 clipHtml = | 2462 clipHtml = |
| 2464 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2463 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
| 2465 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2464 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2466 } | 2465 } |
| 2467 } | 2466 } |
| 2468 | 2467 |
| 2469 } // namespace blink | 2468 } // namespace blink |
| OLD | NEW |