summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderLayerCompositor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge WebKit at r75315: Initial merge by git.Steve Block2011-05-121-1650/+0
| | | | Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
* Merge WebKit at r74534: Initial merge by git.Ben Murdoch2011-05-101-6/+15
| | | | Change-Id: I6ccd1154fa1b19c2ec2a66878eb675738735f1eb
* Limit the number of layers created for fixed position.Nicolas Roard2011-04-131-10/+10
| | | | Change-Id: If7093770b420b37fbb0b073c85f96e781abc55c2
* revert "Enable layers for fixed elements only for mobile websites"Teng-Hui Zhu2011-02-241-15/+2
| | | | | | | revert #change,93656 Now we will use layer for fixed element in desktop site, too. Change-Id: I0a86d46f86fa75b704286aa613e967108851b990
* Fixed element in iframe should have a layerTeng-Hui Zhu2011-02-171-4/+0
| | | | | bug:3466931 Change-Id: I3ce5aaef47b6135b191749b40869913f6420ce7f
* A couple of fixes for scrolling layers.Patrick Scott2011-02-151-0/+4
| | | | | | | | | | | | | | | Update the layer structure during compositing sync. Make sure to turn off scrolling if it changes. Since I replace the content layer with a different structure, append the children to the foreground layer so they move with the content. Remove the clipping layer in the compositor for scrollable layers. For children of scrollable layers, add back in the content scroll offset so that layers are positioned relative to 0,0. Bug: 3416512 Change-Id: I74de90aac2dcf67bd969d0b85f440343123ecab9
* Do not propagate compositing for some iframes.Patrick Scott2011-01-311-0/+4
| | | | | | | | | If a frame does not have a renderer, this method would attach an iframe's root layer as the main root layer. Check for independent iframes before checking for the renderer. Will report a bug to WebKit.org. Bug: 3376746 Change-Id: I84bcc3e5016f6aa9d7c19a287367482df9c65c67
* Be sure to only enable compositing for siblingNicolas Roard2011-01-281-2/+3
| | | | | | | | | layers of a fixed element is actually composited... Fixes the behaviour of the fixed toolbar on news.google.com bug:3375416 Change-Id: I4f959ccf834dad43821f8eb6238bbd5d3b047d7f
* Enable layers for fixed elements only for mobile websitesNicolas Roard2011-01-271-1/+15
| | | | Change-Id: Ia3b626a1e8608d089ad67010e3e385b428456f95
* Set the local flag when compositing a fixed element.Patrick Scott2011-01-181-5/+4
| | | | | | This fixes an assert and ensures that the compositor is in the correct state. Change-Id: I7556ed998821bf2e09d89b79935e876869a584c6
* Enable fixed layers for all websitesNicolas Roard2011-01-101-16/+4
| | | | | bug:2797422 Change-Id: Ide0867a06d61a7ee92af751ae824fe6c3b23c41f
* Merge WebKit at Chromium 9.0.597.55: trivial merge by gitBen Murdoch2011-01-071-5/+28
| | | | Change-Id: I2c6f2ebc4431d15ac82b5b1a9f08159e1731bc57
* Merge WebKit at r72805: Initial merge by GitSteve Block2011-01-061-28/+5
| | | | | | | Note that this is a backwards merge from Chromium release 9.0.600.0 to 9.0.597.0, to align with the Chromium 9 stable release branch. Change-Id: I5d2bb4e8cee9d39ae8485abf48bdb55ecf8b3790
* Merge WebKit at r73109: Initial merge by git.Shimeng (Simon) Wang2010-12-221-5/+28
| | | | Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
* Fix iframe scrolling.Patrick Scott2010-12-211-16/+2
| | | | | | | | | | | | | Do the same check everywhere for enabling scrolling in an iframe. Make sure the owner renderer is a RenderIFrame to avoid trying to composite an embedded object. Also check if the owner layer has visible content since some iframes are marked hidden. Dirty the parent normal flow list when turning on overflow scrolling for divs. Bug: 3280851 Bug: 3290276 Change-Id: I8d0a49324e06426c15abaf552874a32d6e2ee11a
* Turn off iframe compositing until it is more stable.Patrick Scott2010-12-171-1/+1
| | | | Change-Id: I2d54918b5910285bf7f1cfb408af8a6b038b65f9
* Re-enable iframe scrolling.Patrick Scott2010-12-151-3/+14
| | | | This reverts commit c7911ffd666a7e73131dfd68919b769086a093e0.
* Revert "Enable iframe scrolling."Guang Zhu2010-12-141-14/+3
| | | | This reverts commit 27dd9e051d0960e985cb677bfc1ce20531ac0456.
* Enable iframe scrolling.Patrick Scott2010-12-131-3/+14
| | | | | | | | | | Turn off iframe expansion and record iframes in a composited layer. Fix navigation by tracking iframe layers if needed. Remove the logic to add focused nodes to the last tracked layer as it is not needed and might add nodes to the wrong layer. Bug: 3219076, 3211666, 3201077, 3194321 Change-Id: Ifc0b83102438255db7e4b62ad260f50ebbdb0e50
* Fix hit testing inside layers.Patrick Scott2010-12-131-0/+5
| | | | | | | | | | | | | | | | | | * Prevent asking for a sync in GraphicsLayerAndroid if some property has not changed. * Remove scrolling logic from LayerAndroid and create a subclass for scrollable layers. * Report the scrolling limits to the layer in order to scroll iframes (not turned on) and to avoid computing them each time the layer is scrolled. * Change the foreground rect calculations to better match the non-overflow case. * During hit testing, intersect the hitTestClip with the foreground and background to prevent false positives in the layer. * Prepare for iframe scrolling by adding code to trigger compositing for iframes. This currently works great except for navigation so it disabled for now. Bug: 3258631 Change-Id: I0da2d8dbe25376c6aa4f485c9350048c82c6f563
* Rewrite scrollable layers using multiple layers.Patrick Scott2010-12-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Remove PlatformBridge::updateLayers and instead call layersDraw from ChromeClientAndroid during a requested sync. Instead of LayerAndroid having knowledge of scrolling pictures, use multiple layers (background, mask, foreground). Update navigation to use the new structure. Always record nodes in absolute, unscrolled coordinates. Do not track layers unless the node has a composited layer and a last child. Check for composited parents when adding to tracked layers as well. TODO: * developer.android.com doesn't completely work with navigation due to some nodes being clipped out. * BaseLayerAndroid needs to be able to operate with a matrix other than identity. * nested fixed position elements do not draw correctly. * nested overflow layers haven't been tested. Change-Id: I0e2bd37612341e8884d68153ab36194cb2dc1eeb
* Merge WebKit at r71558: Initial merge by git.Teng-Hui Zhu2010-11-171-23/+21
| | | | Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
* Merge WebKit at r70209: Initial merge by GitBen Murdoch2010-10-261-0/+0
| | | | Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
* Merge WebKit at r67908: Initial merge by GitSteve Block2010-09-291-14/+16
| | | | Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
* Merge WebKit at r67178 : Initial merge by git.Iain Merrick2010-09-161-1/+1
| | | | Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
* Merge WebKit at r66079 : Initial merge by gitSteve Block2010-09-021-2/+26
| | | | Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
* Update navigation in scrollable layers.Patrick Scott2010-08-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Set the foreground clip after drawing. Use the absolute bounds to compute the local foreground clip in order to compensate for any outline. Consolidate the check for overflow scrolling into RenderLayer. Request a compositing update after computing the scroll dimensions. Only change the foregroundRect of the layer during paint so that the outline rect (and background/layerBounds) are correct. Draw the outline as part of the background phase. During painting of a layer, scroll to (0,0), paint, then scroll back. When clicking on an element in a layer, scroll to the position of the element but do not scroll back. This makes text input fields visible to the tree and will properly update when typing. Record the original scroll position of layers in order to offset the bounds of nodes when checking the nav cache. Make sure to reset all cached layers during setRootLayer. Otherwise we were reaching into layers from the wrong thread. Change-Id: Id9827ec461989b0869a8252d4d2563ecd12c5fac
* Merge WebKit at r65072 : Initial merge by git.Ben Murdoch2010-08-121-1/+1
| | | | Change-Id: Ibcf418498376b2660aacb7f8d46ea7085ef91585
* Merge WebKit at r64523 : Initial merge by git.Steve Block2010-08-091-5/+2
| | | | Change-Id: Ibb796c6802e757b1d9b40f58205cfbe4da95fcd4
* Merge WebKit at r64264 : Initial merge by git.Kristian Monsen2010-08-041-15/+37
| | | | Change-Id: Ic42bef02efef8217a0f84c47176a9c617c28d1f1
* Enable navigation in scrollable layers.Patrick Scott2010-08-021-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EventHandler: * Added IgnoreClipping in order to touch nodes that are clipped out. android_graphics: * Remember the absolute bounds of the node for invals. RenderBox: * Fix a compiler warning. RenderLayer: * Do not record the entire layer contents unless the scroll dimensions are larger than the client dimensions. * Change isSelfPaintingLayer to check for an overflow clip instead of the scrollable dimensions since it can be too early to check at this point. RenderLayerCompositor: * Same as RenderLayer for checking the overflow clip. WebViewCore: * Scroll the containing layer to the node bounds and offset the mouse position if scrolled. Once the mouse event is processed, restore the layer to 0,0. CacheBuilder: * The body position is no longer used. * Do not clip out nodes if the layer is scrollable. CachedFrame: * Add unadjustBounds to restore adjusted bounds to their original position (fixed position elements). * Call unadjustBounds when a node has been found. This new set of bounds is passed over to WebViewCore to handle clicks. * Reject empty node bounds. CachedLayer: * Document adjustBounds and add unadjustBounds. Add in the scroll position to the node bounds. CachedRoot: * Unadjust the mouse bounds. WebView: * Unadjust the mouse bounds and use the absolute bounds of the ring during inval. Bug: 1566791 Change-Id: Ia55f2cbb61869087176d3ff61882e40324614c6a
* Merge WebKit at r63859 : Initial merge by git.Ben Murdoch2010-07-271-5/+7
| | | | Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
* Fix page cycler crashes.Patrick Scott2010-07-231-4/+5
| | | | | Bug: 2862822 Change-Id: I9de300517eaa2bd4027608d6bae093bf5a1072e0
* Enable scrollable divs.Patrick Scott2010-07-221-0/+15
| | | | | | | | | | | | | | Force a composite layer when the style says the content is scrollable. Record the border and background in the main content picture. When the contents of the layer are bigger than the size, record the foreground contents in a separate picture which is clipped by the border and size. When updating the base layer, remember the scroll position of each layer and update the new layer with the same position. Bug: 1566791 Change-Id: If440e4f215db6bda9df32a781d754d1f5a238162
* Merge WebKit at r63173 : Initial merge by git.Leon Clarke2010-07-201-17/+62
| | | | Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
* Enable composite layers for the sub frame.Grace Kloba2010-07-071-17/+4
| | | | | | | | | | | | | | | | | | | | | Fix the visibleContentRect for iframe. It should be relative to its parent instead of the viewport. For fixed position, we still check for the top frame as the current logic positions the object relative to the screen which only applied to the top frame. For plugin, it depends on PluginWidget's platformLayer(). The default is 0. For video, it depends on MediaPlayer's supportsAcceleratedRendering(). The default is false. Fix the crash in the GraphicsLayerAndroid. The root layer is a container layer, there is no need to draw them. As LayerAndroid doesn't create Picture for them, we should ensure to skip draw. Fix http://b/issue?id=2733947
* Merge WebKit at r61871: Initial merge by git.Kristian Monsen2010-07-021-3/+2
| | | | Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5
* Merge webkit.org at r61121: Initial merge by git.Ben Murdoch2010-06-161-6/+8
| | | | Change-Id: Icd6db395c62285be384d137164d95d7466c98760
* Merge WebKit at r59636: Initial merge by gitKristian Monsen2010-05-251-123/+278
| | | | Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91
* Merge Webkit at r58956: Initial merge by Git.Ben Murdoch2010-05-141-31/+119
| | | | Change-Id: I1d9fb60ea2c3f2ddc04c17a871acdb39353be228
* Merge webkit.org at r58033 : Resolve merge conflictsSteve Block2010-05-111-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CanvasRenderingContext2D.cpp - Take upstream, conflict due to cherry-pick of security fix, see 285b474734e82bc42b25e48ea4824f8050badb4f - CanvasSurface.cpp, HTMLCanvasElement.cpp - convertLogicalToDevice has been refactored. See http://trac.webkit.org/changeset/56447 - Chrome.cpp/h, ChromeClient.h - Take upstream, conflict due to cherry-pick of cancelling Geolocation permission request - Document.h - Take both, conflicts due to ANDROID_META_SUPPORT - DragImage.h - Take both, conflict due to Android addition - EmptyClients.h - Take upstream, conflicts due to Geo cancel permission request - EventHandler.cpp - Take both, conflicts due to recently upstreamed touch events and ANDROID_PLUGINS - EventHandler.cpp - Keep ours, conflict due to touch event bug fixes not yet upstreamed. See 7f034a1734d634dd1fdb3b64817d5828b5e46922 and 73adc26dba4be1d9da34a7f0907cb7b12f10c909 - FileSystemPOSIX - Take both, conflict due to ANDROID_PLUGINS - FrameLoader.cpp - Take both, conflct due to ANDROID_BLOCK_NETWORK_IMAGE - FrameView.cpp - Take both, conflict due to Android frame flattening - Geolocation.h - Merge conflicts due to Android-specific changes - Geolocation.cpp - Take upstream, conflict due to addition of Geolocation maximumAge - GeolocationPositionCache.cpp - Take upstream, conflict due to addition of ENABLE_GEOLOCATION guards - Gradient.h - Take both, conflict due to Android addition - HTMLLinkElement.cpp, DocLoader.cpp - Take both, conflict due to new link prefetching not yet upstreamed. See f91ac8eab3399adb5325701bebe0590a77e49df7 - HTMLMetaElement.cpp - Take both, conflict due to recently upstreamed meta element - JavaInstanceJSC.cpp - Take both, conflict due to Android additional logging - MediaPlayer.cpp/h - Take both, conflict due to Android-specific change - PlatformTouchPoint.h - Take upstream, conflict due to recently upstreamed unsigned stuff - RenderFrame.cpp, RenderFrameSet.h - Take both, conflict due to Android frameset flattening - RenderLayerCompositor.cpp - Take both, conflicts due to Android layers code - Settings.cpp/h - Conflict due to ANDROID_PLUGINS - TextInputController.h - Take upstream, git got confused - V8DOMWindowShell.cpp - Take upstream, conflict due to cherry-pick of method to add V8 bindings for page cache, see 8fecd9c9a62aa89fb44ed3142ba583dc7b8cbe29 - V8DOMWraper.cpp - Take upstream, conflict due to recently upstreamed WORKERS guards - WebCore.xcodeproj - Take upstream, conflict due to addition of Geolocation maximumAge - Widget.h - Take both, conflict due to Android addition - jsc/JNIUtilityPrivate.cpp - Take upstream, conflict due to switching from bzero to memset - mac/WebCoreSupport/WebChromeCient.h - Take upstream, conflicts due to Geo cancel permission request Change-Id: I1b75eac220faddf2f84c7fd4fd3436a5e07edf64
* Merge webkit.org at r58033 : Initial merge by gitSteve Block2010-05-111-14/+98
| | | | Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
* Revert previous CL due to side-effect.Nicolas Roard2010-04-151-10/+3
| | | | | | Bug:2600918 Change-Id: I72189bd2edf725b4f0db426d2735590e846dcba4
* resolved conflicts for merge of 541a0a9a to masterNicolas Roard2010-03-311-15/+42
|\ | | | | | | Change-Id: Ic2abe87f52744e31098112505bdd14906600fc14
| * Only allows composited layers if not in iframesNicolas Roard2010-03-301-15/+42
| | | | | | | | | | | | Bug:2498776 and fix Bug:2544493 Change-Id: I0041db690cbe7d80e8e092626a95e882a5afbe03
* | Add checks to consider a fixed layer for compositing only if itsNicolas Roard2010-03-261-4/+11
|/ | | | | | | | dimensions are actually more than zero. Fix Bug:2545160 Change-Id: I08ca0c1f5a6729760dbf62084a96faee76d124f9
* Only enable composited fixed elements for mobile sites.Nicolas Roard2010-03-221-1/+10
| | | | | | | | We can consider a website as being a 'mobile' site if: - the viewport width is either undefined (-1) or equal to device-width (0) - no scaling is allowed Change-Id: Id88257278312077a170eb10d9f666c46bad135b6
* Add back a missing ifdefNicolas Roard2010-03-191-0/+2
| | | | Change-Id: Ib0f0cf689e95b7333045df53ca645d34a0db21a4
* Fix click issues when using fixed elements. This CL also fix the positioningNicolas Roard2010-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | of a fixed layer when no position is defined, and also only use the screen to position only the fixed elements, not other types of positioned elements. Bug:2521087 The click issues were due to not returning the fixed element when looking for a parent stackingContext in RenderLayer::stackingContext(). This resulted in incorrect coordinates for the layers children of a fixed layer, that we then had to recompute in RenderLayer::convertToLayerCoords(), but this in turns was invaliding hit test detection... Fixed elements are now positioned relative to the screen instead of the virtual viewport (ANDROID_FIXED_ELEMENTS); but this was applying indiscriminantly to all positioned elements, absolute elements included. The CL modify RenderBox::containingBlockWidthForPositioned() and RenderBox::containingBlockHeightForPositioned() to only do this for fixed elements. Finally, fixed layers were wrongly positioned if the positions were not fully set (e.g. only setting top:0 but no left or right). The change to LayerAndroid::updateFixedLayersPositions() fixes this. Change-Id: I07a179dd631a2bc1a313e33ffcf69ef388ecb7ca
* Refactor how we set up the layers hierarchy when using fixedNicolas Roard2010-03-171-10/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | composited layers, and fix the z-index position. Bug:2497910 Bug:2450006 We add a new COMPOSITED_FIXED_ELEMENTS define to isolate the changes in the webkit common code. We previously had a problem where the hierarchy of GraphicsLayer (i.e. the backed surfaces associated to the composited RenderLayer) was not reflecting that layers were children of a fixed layer. The workaround we currently have is not fully satisfactory, due to the way we draw layers on screen (in some cases layers were wrongly translated, see Bug:2497910). Instead, modifying the webkit common code simplify things a lot, and makes the patch more likely to be upstreamed to webkit, as it's now a reasonably well-delimited feature (use composited layers for fixed elements). What we do now is to consider fixed elements as a stacking context, which makes all layers children of such elements children too in the GraphicsLayer hierarchy, and modifying the offset of those children accordingly (in RenderLayer.cpp). In addition, we fixes the z-index bugs we had by signaling that there is a fixed element to its siblings, and turning the siblings as composited layers as well (so that the ordering works fully UI-side). Change-Id: I735c6c14d955ef54653f0053187d3495bef1f332