| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 return loader ? WebDataSourceImpl::fromDocumentLoader(loader) : 0; | 450 return loader ? WebDataSourceImpl::fromDocumentLoader(loader) : 0; |
| 451 } | 451 } |
| 452 | 452 |
| 453 // WebFrame ------------------------------------------------------------------- | 453 // WebFrame ------------------------------------------------------------------- |
| 454 | 454 |
| 455 int WebFrame::instanceCount() | 455 int WebFrame::instanceCount() |
| 456 { | 456 { |
| 457 return frameCount; | 457 return frameCount; |
| 458 } | 458 } |
| 459 | 459 |
| 460 WebLocalFrame* WebFrame::frameForCurrentContext() | 460 WebLocalFrame* WebLocalFrame::frameForCurrentContext() |
| 461 { | 461 { |
| 462 v8::Handle<v8::Context> context = v8::Isolate::GetCurrent()->GetCurrentConte
xt(); | 462 v8::Handle<v8::Context> context = v8::Isolate::GetCurrent()->GetCurrentConte
xt(); |
| 463 if (context.IsEmpty()) | 463 if (context.IsEmpty()) |
| 464 return 0; | 464 return 0; |
| 465 return frameForContext(context); | 465 return frameForContext(context); |
| 466 } | 466 } |
| 467 | 467 |
| 468 WebLocalFrame* WebFrame::frameForContext(v8::Handle<v8::Context> context) | 468 WebLocalFrame* WebLocalFrame::frameForContext(v8::Handle<v8::Context> context) |
| 469 { | 469 { |
| 470 return WebFrameImpl::fromFrame(toFrameIfNotDetached(context)); | 470 return WebFrameImpl::fromFrame(toFrameIfNotDetached(context)); |
| 471 } | 471 } |
| 472 | 472 |
| 473 WebLocalFrame* WebFrame::fromFrameOwnerElement(const WebElement& element) | 473 WebLocalFrame* WebLocalFrame::fromFrameOwnerElement(const WebElement& element) |
| 474 { | 474 { |
| 475 return WebFrameImpl::fromFrameOwnerElement(PassRefPtr<Element>(element).get(
)); | 475 return WebFrameImpl::fromFrameOwnerElement(PassRefPtr<Element>(element).get(
)); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void WebFrameImpl::close() | 478 void WebFrameImpl::close() |
| 479 { | 479 { |
| 480 m_client = 0; | 480 m_client = 0; |
| 481 deref(); // Balances ref() acquired in WebFrame::create | 481 deref(); // Balances ref() acquired in WebFrame::create |
| 482 } | 482 } |
| 483 | 483 |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 WebString WebFrameImpl::layerTreeAsText(bool showDebugInfo) const | 1628 WebString WebFrameImpl::layerTreeAsText(bool showDebugInfo) const |
| 1629 { | 1629 { |
| 1630 if (!frame()) | 1630 if (!frame()) |
| 1631 return WebString(); | 1631 return WebString(); |
| 1632 | 1632 |
| 1633 return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesD
ebugInfo : LayerTreeNormal)); | 1633 return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesD
ebugInfo : LayerTreeNormal)); |
| 1634 } | 1634 } |
| 1635 | 1635 |
| 1636 // WebFrameImpl public --------------------------------------------------------- | 1636 // WebFrameImpl public --------------------------------------------------------- |
| 1637 | 1637 |
| 1638 WebLocalFrame* WebFrame::create(WebFrameClient* client) | 1638 WebLocalFrame* WebLocalFrame::create(WebFrameClient* client) |
| 1639 { | 1639 { |
| 1640 return WebFrameImpl::create(client); | 1640 return WebFrameImpl::create(client); |
| 1641 } | 1641 } |
| 1642 | 1642 |
| 1643 WebFrameImpl* WebFrameImpl::create(WebFrameClient* client) | 1643 WebFrameImpl* WebFrameImpl::create(WebFrameClient* client) |
| 1644 { | 1644 { |
| 1645 return adoptRef(new WebFrameImpl(client)).leakRef(); | 1645 return adoptRef(new WebFrameImpl(client)).leakRef(); |
| 1646 } | 1646 } |
| 1647 | 1647 |
| 1648 WebFrameImpl::WebFrameImpl(WebFrameClient* client) | 1648 WebFrameImpl::WebFrameImpl(WebFrameClient* client) |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1977 | 1977 |
| 1978 void WebFrameImpl::invalidateAll() const | 1978 void WebFrameImpl::invalidateAll() const |
| 1979 { | 1979 { |
| 1980 ASSERT(frame() && frame()->view()); | 1980 ASSERT(frame() && frame()->view()); |
| 1981 FrameView* view = frame()->view(); | 1981 FrameView* view = frame()->view(); |
| 1982 view->invalidateRect(view->frameRect()); | 1982 view->invalidateRect(view->frameRect()); |
| 1983 invalidateScrollbar(); | 1983 invalidateScrollbar(); |
| 1984 } | 1984 } |
| 1985 | 1985 |
| 1986 } // namespace blink | 1986 } // namespace blink |
| OLD | NEW |