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 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 } | 1606 } |
1607 } | 1607 } |
1608 | 1608 |
1609 void WebLocalFrameImpl::createFrameView() | 1609 void WebLocalFrameImpl::createFrameView() |
1610 { | 1610 { |
1611 TRACE_EVENT0("blink", "WebLocalFrameImpl::createFrameView"); | 1611 TRACE_EVENT0("blink", "WebLocalFrameImpl::createFrameView"); |
1612 | 1612 |
1613 ASSERT(frame()); // If frame() doesn't exist, we probably didn't init proper
ly. | 1613 ASSERT(frame()); // If frame() doesn't exist, we probably didn't init proper
ly. |
1614 | 1614 |
1615 WebViewImpl* webView = viewImpl(); | 1615 WebViewImpl* webView = viewImpl(); |
1616 bool isMainFrame = webView->mainFrameImpl()->frame() == frame(); | 1616 bool isLocalRoot = frame()->isLocalRoot(); |
1617 if (isMainFrame) | 1617 if (isLocalRoot) |
1618 webView->suppressInvalidations(true); | 1618 webView->suppressInvalidations(true); |
1619 | 1619 |
1620 frame()->createView(webView->size(), webView->baseBackgroundColor(), webView
->isTransparent()); | 1620 frame()->createView(webView->size(), webView->baseBackgroundColor(), webView
->isTransparent()); |
1621 if (webView->shouldAutoResize() && isMainFrame) | 1621 if (webView->shouldAutoResize() && isLocalRoot) |
1622 frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webVie
w->maxAutoSize()); | 1622 frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webVie
w->maxAutoSize()); |
1623 | 1623 |
1624 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffsetForE
mulation, m_inputEventsScaleFactorForEmulation); | 1624 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffsetForE
mulation, m_inputEventsScaleFactorForEmulation); |
1625 | 1625 |
1626 if (isMainFrame) | 1626 if (isLocalRoot) |
1627 webView->suppressInvalidations(false); | 1627 webView->suppressInvalidations(false); |
1628 } | 1628 } |
1629 | 1629 |
1630 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) | 1630 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) |
1631 { | 1631 { |
1632 if (!frame) | 1632 if (!frame) |
1633 return 0; | 1633 return 0; |
1634 return fromFrame(*frame); | 1634 return fromFrame(*frame); |
1635 } | 1635 } |
1636 | 1636 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 | 1850 |
1851 void WebLocalFrameImpl::invalidateAll() const | 1851 void WebLocalFrameImpl::invalidateAll() const |
1852 { | 1852 { |
1853 ASSERT(frame() && frame()->view()); | 1853 ASSERT(frame() && frame()->view()); |
1854 FrameView* view = frame()->view(); | 1854 FrameView* view = frame()->view(); |
1855 view->invalidateRect(view->frameRect()); | 1855 view->invalidateRect(view->frameRect()); |
1856 invalidateScrollbar(); | 1856 invalidateScrollbar(); |
1857 } | 1857 } |
1858 | 1858 |
1859 } // namespace blink | 1859 } // namespace blink |
OLD | NEW |