Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 7044072: Merge 88288 - 2011-06-07 Vangelis Kokkevis <vangelis@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebKit/chromium/src/ChromeClientImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 if (m_layerRenderer) 1029 if (m_layerRenderer)
1030 m_layerRenderer->setIsAnimating(false); 1030 m_layerRenderer->setIsAnimating(false);
1031 } 1031 }
1032 } 1032 }
1033 #endif 1033 #endif
1034 } 1034 }
1035 1035
1036 void WebViewImpl::layout() 1036 void WebViewImpl::layout()
1037 { 1037 {
1038 TRACE_EVENT("WebViewImpl::layout", this, 0); 1038 TRACE_EVENT("WebViewImpl::layout", this, 0);
1039 #if USE(ACCELERATED_COMPOSITING)
1040 // FIXME: RTL style not supported by the compositor yet.
1041 if (isAcceleratedCompositingActive() && pageHasRTLStyle())
1042 setIsAcceleratedCompositingActive(false);
1043 #endif
1044 1039
1045 WebFrameImpl* webframe = mainFrameImpl(); 1040 WebFrameImpl* webframe = mainFrameImpl();
1046 if (webframe) { 1041 if (webframe) {
1047 // In order for our child HWNDs (NativeWindowWidgets) to update properly , 1042 // In order for our child HWNDs (NativeWindowWidgets) to update properly ,
1048 // they need to be told that we are updating the screen. The problem is 1043 // they need to be told that we are updating the screen. The problem is
1049 // that the native widgets need to recalculate their clip region and not 1044 // that the native widgets need to recalculate their clip region and not
1050 // overlap any of our non-native widgets. To force the resizing, call 1045 // overlap any of our non-native widgets. To force the resizing, call
1051 // setFrameRect(). This will be a quick operation for most frames, but 1046 // setFrameRect(). This will be a quick operation for most frames, but
1052 // the NativeWindowWidgets will update a proper clipping region. 1047 // the NativeWindowWidgets will update a proper clipping region.
1053 FrameView* view = webframe->frameView(); 1048 FrameView* view = webframe->frameView();
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 if (!renderView) 2367 if (!renderView)
2373 return false; 2368 return false;
2374 RenderStyle* style = renderView->style(); 2369 RenderStyle* style = renderView->style();
2375 if (!style) 2370 if (!style)
2376 return false; 2371 return false;
2377 return (style->direction() == RTL); 2372 return (style->direction() == RTL);
2378 } 2373 }
2379 2374
2380 void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) 2375 void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
2381 { 2376 {
2382 // FIXME: RTL style not supported by the compositor yet. 2377 setIsAcceleratedCompositingActive(layer);
2383 setIsAcceleratedCompositingActive(layer && !pageHasRTLStyle() ? true : false );
2384 if (m_layerRenderer) 2378 if (m_layerRenderer)
2385 m_layerRenderer->setRootLayer(layer); 2379 m_layerRenderer->setRootLayer(layer);
2386 2380
2387 IntRect damagedRect(0, 0, m_size.width, m_size.height); 2381 IntRect damagedRect(0, 0, m_size.width, m_size.height);
2388 if (m_isAcceleratedCompositingActive) 2382 if (m_isAcceleratedCompositingActive)
2389 invalidateRootLayerRect(damagedRect); 2383 invalidateRootLayerRect(damagedRect);
2390 else 2384 else
2391 m_client->didInvalidateRect(damagedRect); 2385 m_client->didInvalidateRect(damagedRect);
2392 } 2386 }
2393 2387
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 return; 2583 return;
2590 2584
2591 ASSERT(visibilityState == WebPageVisibilityStateVisible 2585 ASSERT(visibilityState == WebPageVisibilityStateVisible
2592 || visibilityState == WebPageVisibilityStateHidden 2586 || visibilityState == WebPageVisibilityStateHidden
2593 || visibilityState == WebPageVisibilityStatePrerender); 2587 || visibilityState == WebPageVisibilityStatePrerender);
2594 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 2588 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
2595 #endif 2589 #endif
2596 } 2590 }
2597 2591
2598 } // namespace WebKit 2592 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/ChromeClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698