| 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(toFrameIfNotDetached(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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2454 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2453 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
| 2455 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2454 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2456 } else { | 2455 } else { |
| 2457 clipHtml = | 2456 clipHtml = |
| 2458 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2457 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
| 2459 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2458 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2460 } | 2459 } |
| 2461 } | 2460 } |
| 2462 | 2461 |
| 2463 } // namespace blink | 2462 } // namespace blink |
| OLD | NEW |