summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav
Commit message (Collapse)AuthorAgeFilesLines
* suppress partial screen updates if a canvas element is visibleCary Clark2010-05-142-0/+5
| | | | | | | | | | | | | | | | | | A PictureSet contains a list of pictures. Each picture draws part of the screen. If the picture contains a Canvas element, the corresponding bitmap is not shared. Small partial invalidates can create a dozen or so pictures, each of which may be quite small, a few hundred bytes. But the bitmap referenced by the picture may be large, several meg. The backing bitmap is unique to the Canvas element. Since a canvas rarely benefits from small updates, disable the partial invalidates if CacheBuilder detects a canvas. Change-Id: I5761667db3d037d7363dcb01f8a26f7f62e2eabc http://b/2678787
* clean up nav cache debuggingCary Clark2010-05-144-11/+39
| | | | | | | | | This adds additional content to the nav cache dump, and cleans up a few formatting problems. This has no effect on code that does not have nav cache debugging enabled. Change-Id: Ice2c4bb33138a8ddc96739d95ead58fbe328bfa8
* Merge webkit.org at r58033 : Update location of CString.hSteve Block2010-05-112-2/+2
| | | | | | See http://trac.webkit.org/changeset/56825 Change-Id: I8ba6a9685dcd1d8c4dec3400fba81e19fcbfe74d
* Fix the 'wobbling fixed elements' bug.Nicolas Roard2010-05-101-9/+19
| | | | | | | This CL has a corresponding java counterpart (https://android-git.corp.google.com/g/#change,51150). Bug:2665696 Change-Id: I397100ac1b7ea9e0ecf799902d9ba04fba970cce
* Provide access to current match highlighted.Leon Scroggins2010-05-062-0/+15
| | | | | | | | Part of fix for issue 2663680 Requires a change to frameworks/base. Change-Id: I79e460867973cbfcb3105d46058de705877f0aa9
* Enable contentEditable.Leon Scroggins2010-05-054-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebViewCore.cpp: Open the keyboard when a contentEditable element is put into focus by a click. In key(), return whether the selection changed if a contentEditable element is in focus. CacheBuilder.cpp: Add root contentEditable elements to the navigation tree. CachedNode.h: Include contentEditable elements as elements that want key events. CachedNodeType.h Add a type for contentEditable. WebView.cpp: Do not call setFollowedLink for contentEditable, so that the orange selection ring stays around the field. Add a check to determine whether the page should handle shift and arrow keys. Bug 1788820 Caveats: Does not ensure that the caret remains on screen. Frame::revealSelection is called, but we ignore it for other reasons. Need to investigate that. The cursor will blink if the contentEditable node has focus, even if the user has not clicked on it or has moved to a different input field. Further, while in this state, the user can input text. Requires a change to frameworks/base Change-Id: Ife39254f46dcc1046a075eee2fda6cf4879b4ee8
* Merge "Fix a return type bug which is complained by gcc-4.6. If compile this ↵Jing Yu2010-05-031-2/+1
|\ | | | | | | function iwht gcc-4.6, gcc complains that "error: 'GlyphSet::GlyphSet' names the constructor, not the type"."
| * Fix a return type bug which is complained by gcc-4.6.Jing Yu2010-05-021-2/+1
| | | | | | | | | | | | | | | | | | | | If compile this function iwht gcc-4.6, gcc complains that "error: 'GlyphSet::GlyphSet' names the constructor, not the type". Change-Id: I34f3a66dc33f8dca93e4c0db1d87236bf3efc6ae Tested: With the patch, gcc-4.4.0 is still working correctly. With the patch, gcc-4.6 works well too.
* | Merge "Do not hide the cursor ring when clicking on a <select> element."Leon Scroggins2010-04-274-5/+13
|\ \
| * | Do not hide the cursor ring when clicking on a <select> element.Leon Scroggins2010-04-274-5/+13
| |/ | | | | | | | | | | | | | | | | | | Add a CachedNodeType for <select> elements. If the cursor node is a <select> element, do not call setFollowedLink, which would hide the cursor ring. Bug 1694023 Change-Id: I2df2e70391b5f5969683b71b1e69bc24cba8946f
* | Merge "move CachedInput::init() to cpp"Cary Clark2010-04-272-4/+6
|\ \ | |/ |/|
| * move CachedInput::init() to cppCary Clark2010-04-262-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of init() calls bzero, which is defined in CachedPrefix.h. if CachedInput.h is included directly bzero may not be defined. It is always defined for CachedInput.cpp. http://b/2535696 enter the commit message for your changes. Lines starting Change-Id: I995498cd4bc611f0f1a45aadf27a1fd330e62410
* | am 29189dc4: am 6ec27fea: am 5076efcd: don\'t hide transparent nodesCary Clark2010-04-221-1/+1
|\ \
| * | don't hide transparent nodesCary Clark2010-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A node may be transparent if the body of the node is drawn earlier. In this case, the node may not be tested to see if it has been occluded by later drawing, since no drawing inside the scope of the node is actually visible. So, skip the hidden test for transparent nodes. Change-Id: Ib748e9e7b86252f791ee68198d1d794fb4591a88 http://b/2582455
* | | am 68b8e349: am 0f92e845: am 55ab51c0: Merge "nextTextField may walk off the ↵Cary Clark2010-04-225-34/+44
|\ \ \ | |/ / | | / | |/ |/| end or try invalid frames" into froyo
| * nextTextField may walk off the end or try invalid framesCary Clark2010-04-225-34/+44
| | | | | | | | | | | | | | | | | | | | | | Rewrote nextTextField() to check range and frame, and to more resemble other node walkers. Caller no longer passes uninitialized frame in focused case, and looks at parent frames after the target node. Change-Id: I7ea9dffb75d28bdd9d71d83921058feca6baf928 http://b/2607250
* | Merge "add portable bzero interface"Cary Clark2010-04-071-0/+7
|\ \ | |/ |/|
| * add portable bzero interfaceCary Clark2010-03-301-0/+7
| | | | | | | | | | Change-Id: I513c7bb5278202447ae8a270b4f30d699fd4dda6 http://2535696
* | keep frames associated with regular hits and direct hitsCary Clark2010-04-063-5/+9
| | | | | | | | | | | | | | | | | | | | The hit test on the nav cache returns a node/frame pair. It looks for the closest hit, but gives priority to a direct hit. Track the frame associated with the direct hit separately, so that the correct node/frame pair is returned. Change-Id: Icb1e3de4a0aad3c6dd9b2b81669f9c7bbb260282 http://b/2316138
* | Merge "Create a method to check to see if the focus has a following ↵Cary Clark2010-04-051-0/+10
|\ \ | | | | | | | | | textfield." into froyo
| * | Create a method to check to see if the focus has a following textfield.Leon Scroggins2010-03-311-0/+10
| |/ | | | | | | | | | | | | | | Fixes http://b/issue?id=2559070 Requires a change to frameworks/base. Change-Id: I450cb8ee109e9a1f38a7290032fb3ca948dcc71a
* | If there is no find location then return early in findNext.Ben Murdoch2010-03-311-1/+1
|/ | | | | | Fix b/2558960 Change-Id: I1cc723913ab1e3eccb21eb60ab2fe2a458eb420c
* don't track layer node twiceCary Clark2010-03-252-1/+12
| | | | | | | | If a cache node is both in a layer and contains a layer, don't add it the second time. Change-Id: I45cc302e234565bfbc87649ca503f515b1f487e8 http://b/2543736
* Merge "Renders fixed layers with the root canvas matrix. Fix some ↵Nicolas Roard2010-03-241-1/+12
|\ | | | | | | positioning issues."
| * Renders fixed layers with the root canvas matrix. Fix some positioning issues.Nicolas Roard2010-03-241-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug:2526966 Bug:1818168 The current rendering code exposes some issues with the fact that we have fixed layers in the layers hierarchy -- parents transformations are also applied to the fixed layers, which is not what we want (fixed layers should be applied on the original canvas, with the original transform -- e.g. toolbar present or not -- but no more). One previously discussed solution was to move the fixed layers to their own hierarchy; but doing so would mean to also redo all the z-index management that we already have in the current system. The simplest way is therefore to use the original matrix (the canvas' matrix) when we have a fixed layer. The way we do this is by inserting a new LayerAndroid before the LayerAndroid root, setting the matrix of that new root to be the canvas' matrix. The drawing is then unaffected, but we can ask skia to draw using the root's matrix. The second issue solved in the CL is some positioning troubles; layers may have different dimensions than their render view, and the previous code was considering that the views were always drawn at the origin in the layer. By removing the parents layers transforms, this is not the case anymore, and we therefore need to take the render view offset into account. Finally there is some additional debug code in LayerAndroid. Change-Id: Id353ad3dfd9808252643f0e4f0140dde67480719
* | Add on-demand plugin support.Patrick Scott2010-03-231-2/+1
|/ | | | | | | | | | | | | | | | The Settings object now has an on-demand flag for plugins (this was to avoid more edits to webkit code). If plugins are on-demand and a plugin is installed that can handle the content, insert a placeholder widget. If the user clicks on the placeholder, the plugin will be enabled. The widget currently does not clip the context correctly. It only clips based on the widget frame. This is due to a bug (already filed) where the scroll offset is producing bad clip rectangles. Requires a framework change. Bug: 2411524 Change-Id: If3931da8da2339a2385ae78b609c49fa069892ab
* get bounds of focused nodeCary Clark2010-03-181-0/+23
| | | | | | | companion fix in framework/base Change-Id: I7d9191ea9c95dafac7f7e91a70d02c7d055c6967 http://b/2521087
* read old focus before it's thrown awayCary Clark2010-03-151-4/+12
| | | | | Change-Id: Iab6a64aec5f146e8b0286d1249d353567b49ea49 http://b/2515977
* adjust cache layer position by offsetsCary Clark2010-03-122-5/+11
| | | | | | | | | | | | | | Nodes in layers need to know where they are relative to the layers so that the cursor rings are correctly positioned as the layer moves (in document coordinates). In addition to tracking the global offset to make the coordinates relative to any parent frames, the node is offset relative to the body. Sometimes layers have zero height or width; in this case, don't treat them as clips. Change-Id: Id2811c31a4a0674d316aadda210570ec93311013 http://b/2503096
* Merge "Outset the rectangle containing the match after checking the clip."Leon Scroggins2010-03-121-2/+6
|\
| * Outset the rectangle containing the match after checking the clip.Leon Scroggins2010-03-111-2/+6
| | | | | | | | | | | | | | | | | | | | When considering whether a match is contained by the current clip, do not outset it first. Check to see if it is contained by the clip, and then add the outset so the drawn rectangle is larger. Fix for http://b/issue?id=2507893 Change-Id: I900d92432d412396e8c5b9e9e341085656ed0a2f
* | fix nav algorithm when node is clippedCary Clark2010-03-111-1/+0
|/ | | | | | | | | | | | A fix for http://b/2319610 incorrectly retried finding nodes if the node was clipped, possibly causing infinite recursion. Leave all of the prior fix but only try once. I tested the prior test case and ensured that it still works. Change-Id: Ib229b6fc0ba57c131a8c1f33350982ac22a445c0 http://b/2501914
* Fix bug 'Children of fixed elements do not always remain fixed themselves'Nicolas Roard2010-03-091-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was twofold: - webkit didn't create composited layers of the children div unless they were intersecting with the fixed layer - the children divs layers are siblings, not children of the fixed layer The solution is to: 1/ mark layers as needed to be composited if their ancestor is a fixed element (in RenderLayerCompositor) 2/ as the GraphicsLayer/LayerAndroid hierarchy is based on the RenderLayer hierarchy (z-order..) and not the display hierarchy, we need to a way of updating the position of the contained layers when a fixed layer move. We do that by: - marking layers contained in a fixed layer as being linked to the fixed layer (GraphicsLayerAndroid::syncFixedDescendants), and set the offset between the layer and the fixed layer. - when pushing the layers tree to the UI side, we ensure that such layers are linked to their corresponding fixed layer (LayerAndroid::ensureFixedLayersForDescendants) - when we draw, we do a first pass to update the fixed layers position (LayerAndroid::updateFixedLayersPositions) then update the rest of the layers (LayerAndroid::updatePositions). The layers that are linked to the fixed layers will then update their position relative to it, using the original offset between the fixed layer and the layer. Bug:2470701 Change-Id: I512966df94de6a5f84aff335c5d09b3f027bc2c3
* build-fix for the no-layers configMike Reed2010-03-091-0/+4
| | | | Change-Id: I4994cb5dc61cb845db76060fbd7680f6f5f9ab88
* requestChildRectangleOnScreen takes layers into accountCary Clark2010-03-091-0/+20
| | | | | | | | | | | Make native LayerAndroid::subtractLayers visible to java so the layers can be removed from the visible portion of the screen when computing how much to scroll. companion fix in frameworks/base Change-Id: I3bc0760aaeb515415e90996ec1257d24f9f8705a http://b/2453841
* scroll into view considers layersCary Clark2010-03-083-50/+54
| | | | | | | | | | | | | | | | | | | | | LayerAndroid.* - Add a utility that takes the given rectangle and subtracts layers that overlay it. FindCanvas.* - Add function that returns if the current match is on the main page or in a layer. WebView.cpp - Add jni caller for WebView.java calcOurContentVisibleRect. Call it instead of getVisibleRect, which has the side effect of sending messages back to webkit. - Remove jni caller for getViewMetrics, since it is redundant. - Only call scrollRectOnScreen for non-layers. companion fix in framework/base http://b/2485168
* fixes with find drawing in layersCary Clark2010-03-051-0/+5
| | | | | | | | | | | | | | | Clipping the match picture before drawing prevents layer pictures from drawing outside of their intended bounds. Rearranging the layer picture draw call causes it to restore the canvas matrix, which causes extras like finds and cursor rings to draw correctly. Also, added more layer debugging, and a function to show layer state in the console window. http://b/2488516 http://b/2488509
* stop parsing text for addresses if input element is foundCary Clark2010-03-031-1/+3
| | | | http://b/2420076
* refactor find state and scrollingCary Clark2010-03-032-18/+29
| | | | | | | | | | Separate out state when find is up and is empty. Request a scroll when setting a match, rather than when drawing. Don't draw if there's no match. Companion fix in frameworks/base http://b/2370069
* allow anchor containing layer to be mapped to navable layerCary Clark2010-03-023-13/+61
| | | | | | | | | | | | | | | | A layer may be inside or outside of an anchor. If it is inside, the corresponding CachedNode has already been created, but is being tracked. These tracked nodes need their layer and unclipped bits set. For now, node in layers are assumed to draw last in their layer, and aren't obscured by other drawing. We may allow nodes in layers to be obscured one day. Preparing for that, translate the layer picture by its global position when testing to see if the node is hidden. Fix debugging by allowing CachedLayer to see inside LayerAndroid. http://b/2453974
* Merge "use advance widths to deduce spaces in selected text"Cary Clark2010-03-011-15/+41
|\
| * use advance widths to deduce spaces in selected textCary Clark2010-03-011-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | The earlier method of using bounding boxes does not work if the characters have sufficiently large kerning, such as 'A Java' or sufficiently small kerning, such as '16'. Also, don't add spaces after hyphens or dashes, and detect baseline changes correctly. Reset the first space condition once text is clipped out. http://b/2457350 http://b/2165553
* | Make nativeMoveCursorToNextTextInput return a value based on success.Leon Scroggins2010-03-013-14/+11
|/ | | | | | | | | Also no longer differentiate between textfields and areas for the purpose of the next action. Part of fix for http://b/issue?id=2478052 Requires a change to frameworks/base
* ignore rootlayer when drawing (fixes regression)Mike Reed2010-02-261-1/+6
| | | | dump layers contents in displayTree.txt
* refactor drawing to support layersCary Clark2010-02-2413-384/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drawing elements that appear atop or below layers need to be drawn both in the proper order and with the correct canvas to respect clipping and the matrix. Drawing the find results, text selection, or the cursor ring, interleaves with any layers that may be drawn. The main picture is treated as owned by a LayerAndroid so each component can decide when to draw. This change leave the main picture in WebViewCore.cpp, and draws everything else in WebView.cpp -- in the future, additional refactoring can put all drawing in one place. The logic of what to draw is still in WebView.java, but the actual drawing calls are now triggered inside the layer code. Android.mk - Add rule to trigger building without layers from buildspec.mk. LayerAndroid.* - Replace FindOnPage reference with abstract DrawExtra class to draw adornments in the layers' canvas context. - Add a LayerAndroid constructor to create a dummy layer with a SkPicture* and a uniqueId==-1 so that extras can detect when they are drawn by the main picture. android_graphics.* - Move cursor ring drawing out of WebView.cpp to here. - Separate cursor ring setup from actual drawing. - Get the cursor ring metrics in local coordinates. ChromeClientAndroid.cpp - Fix compiler warnings. WebViewCore.* - Move updateCursorBounds from WebView.cpp. This permits it to be called from CursorRing::setup. CachedFrame.* CachedNode.* CachedLayer.* - Add local bounds getters. CachedRoot.h - Move class FindCanvas to the android namespace. DrawExtra.h - Add an abstract class called by LayerAndroid to optionally draw extra elements in its canvas context. FindCanvas.* SelectText.* - Refactor drawing to draw in layers context. WebView.cpp - Move drawing from WebView.java. - Remove selection code to SelectText.cpp. - Use inverseScale to simplify viewPort metrics. - Simplify layer root so java doesn't need to know about it. Requires companion change in frameworks/base http://b/2457316 http://b/2454127 http://b/2454149
* disable webkit layersCary Clark2010-02-211-0/+2
| | | | | With layers enabled, servicing timers saturate the CPU at times. This also fixes a compile-time switch in FindCanvas to disable layers.
* move viewport into just this subclassMike Reed2010-02-192-5/+9
|
* fix nav layer bugsCary Clark2010-02-193-9/+20
| | | | | | | Clip the nodes inside the layer to the layer's bounds Don't crash if the layer with the matching id can't be found. http://b/2453945
* refactorMike Reed2010-02-181-5/+5
|
* check for layer containing final nodes in DOMCary Clark2010-02-181-1/+6
| | | | | | This fix prevents a crash in http://webkit.org/blog-files/leaves/ http://b/2369549