| 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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 , m_totalMatchCount(-1) | 2078 , m_totalMatchCount(-1) |
| 2079 , m_framesScopingCount(-1) | 2079 , m_framesScopingCount(-1) |
| 2080 , m_findRequestIdentifier(-1) | 2080 , m_findRequestIdentifier(-1) |
| 2081 , m_scopingInProgress(false) | 2081 , m_scopingInProgress(false) |
| 2082 , m_lastFindRequestCompletedWithNoMatches(false) | 2082 , m_lastFindRequestCompletedWithNoMatches(false) |
| 2083 , m_nextInvalidateAfter(0) | 2083 , m_nextInvalidateAfter(0) |
| 2084 , m_findMatchMarkersVersion(0) | 2084 , m_findMatchMarkersVersion(0) |
| 2085 , m_findMatchRectsAreValid(false) | 2085 , m_findMatchRectsAreValid(false) |
| 2086 , m_identifier(generateFrameIdentifier()) | 2086 , m_identifier(generateFrameIdentifier()) |
| 2087 , m_inSameDocumentHistoryLoad(false) | 2087 , m_inSameDocumentHistoryLoad(false) |
| 2088 , m_inputEventsScaleFactorForEmulation(1) |
| 2088 { | 2089 { |
| 2089 WebKit::Platform::current()->incrementStatsCounter(webFrameActiveCount); | 2090 WebKit::Platform::current()->incrementStatsCounter(webFrameActiveCount); |
| 2090 frameCount++; | 2091 frameCount++; |
| 2091 } | 2092 } |
| 2092 | 2093 |
| 2093 WebFrameImpl::~WebFrameImpl() | 2094 WebFrameImpl::~WebFrameImpl() |
| 2094 { | 2095 { |
| 2095 WebKit::Platform::current()->decrementStatsCounter(webFrameActiveCount); | 2096 WebKit::Platform::current()->decrementStatsCounter(webFrameActiveCount); |
| 2096 frameCount--; | 2097 frameCount--; |
| 2097 | 2098 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 | 2189 |
| 2189 WebViewImpl* webView = viewImpl(); | 2190 WebViewImpl* webView = viewImpl(); |
| 2190 bool isMainFrame = webView->mainFrameImpl()->frame() == frame(); | 2191 bool isMainFrame = webView->mainFrameImpl()->frame() == frame(); |
| 2191 if (isMainFrame) | 2192 if (isMainFrame) |
| 2192 webView->suppressInvalidations(true); | 2193 webView->suppressInvalidations(true); |
| 2193 | 2194 |
| 2194 frame()->createView(webView->size(), webView->baseBackgroundColor(), webView
->isTransparent(), webView->fixedLayoutSize(), isMainFrame ? webView->isFixedLay
outModeEnabled() : 0); | 2195 frame()->createView(webView->size(), webView->baseBackgroundColor(), webView
->isTransparent(), webView->fixedLayoutSize(), isMainFrame ? webView->isFixedLay
outModeEnabled() : 0); |
| 2195 if (webView->shouldAutoResize() && isMainFrame) | 2196 if (webView->shouldAutoResize() && isMainFrame) |
| 2196 frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webVie
w->maxAutoSize()); | 2197 frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webVie
w->maxAutoSize()); |
| 2197 | 2198 |
| 2199 frame()->view()->setInputEventsScaleFactorForEmulation(m_inputEventsScaleFac
torForEmulation); |
| 2200 |
| 2198 if (isMainFrame) | 2201 if (isMainFrame) |
| 2199 webView->suppressInvalidations(false); | 2202 webView->suppressInvalidations(false); |
| 2200 | |
| 2201 if (isMainFrame && webView->devToolsAgentPrivate()) | |
| 2202 webView->devToolsAgentPrivate()->mainFrameViewCreated(this); | |
| 2203 } | 2203 } |
| 2204 | 2204 |
| 2205 WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame) | 2205 WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame) |
| 2206 { | 2206 { |
| 2207 if (!frame) | 2207 if (!frame) |
| 2208 return 0; | 2208 return 0; |
| 2209 return static_cast<FrameLoaderClientImpl*>(frame->loader()->client())->webFr
ame(); | 2209 return static_cast<FrameLoaderClientImpl*>(frame->loader()->client())->webFr
ame(); |
| 2210 } | 2210 } |
| 2211 | 2211 |
| 2212 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) | 2212 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 client()->didFailProvisionalLoad(this, webError); | 2307 client()->didFailProvisionalLoad(this, webError); |
| 2308 else | 2308 else |
| 2309 client()->didFailLoad(this, webError); | 2309 client()->didFailLoad(this, webError); |
| 2310 } | 2310 } |
| 2311 | 2311 |
| 2312 void WebFrameImpl::setCanHaveScrollbars(bool canHaveScrollbars) | 2312 void WebFrameImpl::setCanHaveScrollbars(bool canHaveScrollbars) |
| 2313 { | 2313 { |
| 2314 frame()->view()->setCanHaveScrollbars(canHaveScrollbars); | 2314 frame()->view()->setCanHaveScrollbars(canHaveScrollbars); |
| 2315 } | 2315 } |
| 2316 | 2316 |
| 2317 void WebFrameImpl::setInputEventsScaleFactorForEmulation(float contentScaleFacto
r) |
| 2318 { |
| 2319 m_inputEventsScaleFactorForEmulation = contentScaleFactor; |
| 2320 if (frame()->view()) |
| 2321 frame()->view()->setInputEventsScaleFactorForEmulation(m_inputEventsScal
eFactorForEmulation); |
| 2322 } |
| 2323 |
| 2317 void WebFrameImpl::invalidateArea(AreaToInvalidate area) | 2324 void WebFrameImpl::invalidateArea(AreaToInvalidate area) |
| 2318 { | 2325 { |
| 2319 ASSERT(frame() && frame()->view()); | 2326 ASSERT(frame() && frame()->view()); |
| 2320 FrameView* view = frame()->view(); | 2327 FrameView* view = frame()->view(); |
| 2321 | 2328 |
| 2322 if ((area & InvalidateAll) == InvalidateAll) | 2329 if ((area & InvalidateAll) == InvalidateAll) |
| 2323 view->invalidateRect(view->frameRect()); | 2330 view->invalidateRect(view->frameRect()); |
| 2324 else { | 2331 else { |
| 2325 if ((area & InvalidateContentArea) == InvalidateContentArea) { | 2332 if ((area & InvalidateContentArea) == InvalidateContentArea) { |
| 2326 IntRect contentArea( | 2333 IntRect contentArea( |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2464 | 2471 |
| 2465 // There is a possibility that the frame being detached was the only | 2472 // There is a possibility that the frame being detached was the only |
| 2466 // pending one. We need to make sure final replies can be sent. | 2473 // pending one. We need to make sure final replies can be sent. |
| 2467 flushCurrentScopingEffort(m_findRequestIdentifier); | 2474 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2468 | 2475 |
| 2469 cancelPendingScopingEffort(); | 2476 cancelPendingScopingEffort(); |
| 2470 } | 2477 } |
| 2471 } | 2478 } |
| 2472 | 2479 |
| 2473 } // namespace WebKit | 2480 } // namespace WebKit |
| OLD | NEW |