summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Encode email addresses that are not mailto: links."Patrick Scott2010-11-081-4/+10
|\
| * Encode email addresses that are not mailto: links.Patrick Scott2010-11-081-4/+10
| | | | | | | | | | | | | | | | Fix a few extra copies of KURL and String. Added more characters to the list of allowable mailbox characters. Bug: 3038103 Change-Id: I49bd3ba9c628a70e7e1633d16fc329d64613dbf1
* | Fix some compiler warningsSteve Block2010-11-081-2/+3
|/ | | | | | | | | | | | | | | Noe that in FindCanvas.h we include external/icu4c/common/unicode/umachine.h, rather than external/webkit/WebCore/icu/unicode/umachine.h to avoid warnings about redefining U_NAMESPACE_BEGIN We should be using the header from external/icu4c because we don't include any ICU headers from WebCore. The fix works becuase external/icu4c/common is on the include path, but WebCore/icu is not. Change-Id: I5c0ff1c5815018ba97962595debca12a17bdd0cd
* Do not create GL specific objects if we are not using hw accelerationDerek Sollenberger2010-11-051-14/+18
| | | | | bug: 3166223 Change-Id: I5c18b76ac19119c3620636ce5d3b33892e18f523
* Merge "Adjust layers when parent layer scrolls"Cary Clark2010-11-057-38/+135
|\
| * Adjust layers when parent layer scrollsCary Clark2010-11-047-38/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a page has layers, it causes the main body of the page to become a layer as well. The scroll position of the WebView must be applied to the layer to translate the cursor rings correctly for hit-testing. Today, applying the scroll position of the WebView screws up overflow scrolling. Until this gets figured out, skip using the scroll position in CacheFrame adjust() and unadjust(). The position of the layer, and all of its parent layers, should be considered when adjusting the rectangle bounds contained by that layer. Before, only the child layer's position was considered. The clip used by scrollable divs may be initialized but never set. If it is empty, ignore it, rather than clipping out all content. In CacheBuilder, remove a couple of unnecessary lines -- the CacheInput initialization clears all members. In SelectText, reverse the order of the xfer mode and paint objects to remove a Skia ref count assert. In CachedInput, make the debug printout current. Overall, added more debugging output (turned off by default). bug:3030370 Change-Id: Ic19c24b3bf33d081a1d0c1f8c06601dcb56ae881
* | Remove extras from GLWebViewState for nowNicolas Roard2010-11-041-0/+4
|/ | | | Change-Id: Ic4d4866302645edb6c0a457ef6d0bd1d8f9cf484
* Unref the picture instead of deleting itCary Clark2010-11-031-1/+10
| | | | | | | | | | | | | | | | | This fixes a couple of bugs related to layers and hardware acceleration. The picture used by select text is now accessed asynchronously from the UI thread. The UI thread now unrefs it rather than deleting it outright. The layer position may not be up to date when the cursor rings are drawn, so update them if the cursor ring is in a layer. bug:3112657 bug:3030370 Change-Id: I99d07175ec30dcba895a26cf1d44bc0364430793
* Fix WebCoreStringToJString() to not delete the local reference to the new ↵Steve Block2010-11-011-24/+6
| | | | | | | | | | | | | jstring The JNI spec allows for local objects to be GC'ed before the JNI frame returns, so this is dangerous. Also rename the method to WtfStringToJstring() to match the existing jstringToWtfString() and update call sites to JNIEnv::NewString() to make use of it. Change-Id: I84aa25ba1aca2aee346bf6e3d83a58afc3a95219
* Merge "allow contained draws to identify a link"Cary Clark2010-10-281-10/+15
|\
| * allow contained draws to identify a linkCary Clark2010-10-281-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first cut of rewriting hiding and clipping links if they are obscured by a subsequent draw looks for the contained text to find the original link in the picture. Some links contain only bitmaps, and others, like text fields, may contain nothing at all. To identify these, look for bitmaps, and to cover the text field case, look for a background erase. These draws can be used to identify where the link is in the picture. Because bitmaps and background erases can also obscure links, distinguish between draws that are contained by the link from those that overlap it. bug:3120589 Change-Id: Ied8fe2378f27253a162f5f9636f5ade12ce6013c
* | Make sure we delete local references to jclass objectsSteve Block2010-10-281-1/+17
| | | | | | | | Change-Id: I1b398bd0a84ce366eb2e686e5f14335d7aa5ed31
* | Fix for split text bug.Nicolas Roard2010-10-271-1/+1
|/ | | | | | Bug:3134026 Change-Id: I0ccaf27b8ede58603aeb2284c56527d4fe0a589b (cherry picked from commit ca3a75fc3f9712c15e4a84ebcfd48699963896bb)
* rewrite select text and others for layersCary Clark2010-10-2710-127/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layers contain pictures, and draw them offset from the top of the page. Several readers of pictures need to account for this displacement when computing what part of the picture intersects a tap on the screen. The tap may not correspond to the first layer that intersects it, so all layers must be checked to find the best match. The root layer usually draws everywhere, so for a match to correspond to the root, the match must additionally intersect text. Layers may create offscreen bitmaps when drawing to correctly alpha blend the results to the screen, but this causes the items in the bitmap to draw to an unexpected location when the picture is treated as a spatial database. To get around this, call the SkCanvas::save() from the overridden saveLayer() to push and pop the canvas layer state without creating an offscreen. WebCore/platform/graphics/android/LayerAndroid.cpp WebCore/platform/graphics/android/LayerAndroid.h - In find(), iterate through all children, instead of stopping on the first match. - Check to see if the child actually draws at the desired location, and if it draws text there as well. - Specify a slop factor to allow for inaccuracies in touch. - Check the root for text before checking the children. WebKit/android/nav/CachedFrame.cpp WebKit/android/nav/CachedFrame.h - Modify the (x,y) co-ordinate by the layer's offset, when finding the picture corresponding to a point. WebKit/android/nav/CachedLayer.cpp WebKit/android/nav/CachedLayer.h - More plumbing to adjust the point if the picture is contained in an offset layer. WebKit/android/nav/CachedRoot.cpp WebKit/android/nav/CachedRoot.h - Correct the (x,y) locations by the layer offset. - Add some debugging (disabled by default) WebKit/android/nav/ParsedCanvas.h - One stop shopping that calls save() from saveLayer(). - Reset the bounder to null to balance its ref count. WebKit/android/nav/SelectText.cpp WebKit/android/nav/SelectText.h - Rearrange the way pictures are tracked. Record the picture corresponding to the input location when the selection starts, requiring that the picture remain unchanged as the selection extends. - Only draw adornments for when the corresponding picture is drawn. This fixes a Gmail specific problem, where the layers come and go as the page scrolls. - Always use the supplied visible bounds instead of computing it from the canvas. - Correct location points by layer offsets. - Add to the picture ref count so it can't be deleted during selection. WebKit/android/nav/WebView.cpp - Simplify visibleRect code. - Simplify all SelectText interfaces. bug:3114609 Change-Id: I43dc3252fc86c4b6500edcd650126b2559f530e3
* Fixes style in WebRequestContextSteve Block2010-10-271-1/+1
| | | | | | | | | | | | | | | Previously this file used Chromium style, as it extends a Chromium class. However, I think it's best to switch to WebKit style to prevent Chromium style from leaking into the rest of WebKit. Also switches static member methods to file-scope static functions where possible. Finally, return WebRequestContext* rather than URLRequestContext* to allow us to call methods in the derived class. this will be required to hook up CookieManager. Change-Id: Ifdca62230a3728e338904ef1b9b392640af06a92
* Fix random crashes when HW acceleration is turned on.Nicolas Roard2010-10-261-1/+10
| | | | | | Bug:3107362 Change-Id: I354a07369056e696deed7458a4f4e14d54b7f6c8
* Fix potential crash in Nav Cache code introduced by WebKit mergeBen Murdoch2010-10-264-43/+44
| | | | | | | | The refactoring in the nav cache code caused by the recent merge to webkit r70209 can crash. Fix that. Bug: 3132882 Change-Id: I98b605ae2fdf24cf0f25adc919f2dbba581abef0
* Merge Webkit at r70209: DeprecatedInputType is now private.Ben Murdoch2010-10-263-21/+33
| | | | | | | | See http://trac.webkit.org/changeset/68749 Bug: 3132882 Change-Id: I51dfa144c5c289c759caa48e7dedc9020b7d8f12
* Fix naming for JNI registration methodsSteve Block2010-10-221-1/+1
| | | | Change-Id: I1aba39bdcf217bff751e42d2a335cd230b8193f7
* Fix for Find scrolling too often.Leon Scroggins2010-10-192-7/+24
| | | | | | | | | | | Bug:3108852 Do not scroll if nativeFindAll is called with the same string and the current match location has not changed. Requires a change to frameworks/base. Change-Id: Id3f104d91a0061f1d007b54a8fdd188b239e7970
* compute cursor rings when layers are transparentCary Clark2010-10-188-145/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Google search suggestions are drawn in a popup menu (a div with a small amount of transparency). This can partially or complete obscure links underneath the popup, and can present touchable targets which may be much larger than the text contained by the link. CachedRoot::checkRings() determines if a larger bounding box can be used for the ring around the link. CachedRoot::maskIfHidden() determines if the ring needs to be cut down in size because it is only partially visible, or fully obscured. Both routines share the implementation that gathers information about the link, which uses RingCanvas to parse the picture, and RingCheck to build layers describing the text and rectangles drawn in the area around the ring. The basic strategy is to find the text contained by the link under consideration, and see if subsequent drawing obscures the text, or if other text would be enclosed by enlarging the ring. Since maskIfHidden() works better now than before, this CL enabled checking for hidden links when recomputing the current selection after the picture updates. It also checks to see if the link can be larger when maskIfHidden() determines that it is unclipped. Also, if a tap is inside the larger ring, but not on the text itself, treat that as a valid hit. (In CachedFrame::findBestHitAt) And, this fixes CacheBuilder debugging code, and the CacheBuilder array crasher described by bug: 3043268 bug: 2661613 Change-Id: I751f6539f6c840889a58de8c4611364442b3e37c
* Rename to_string() to jstringToWtfString() for greater claritySteve Block2010-10-151-1/+1
| | | | Change-Id: I8516c4f39a38e236d0bff38a91fe8657cfcf8ad4
* resolved conflicts for merge of 1457b739 to masterKenny Root2010-10-144-5/+42
|\ | | | | | | Change-Id: I5e5460ec4afde9a229c3f73255f4d40322eb7166
| * Merge "Provide padding + border values for textfields." into gingerbreadCary Clark2010-10-134-7/+44
| |\
| | * Provide padding + border values for textfields.Leon Scroggins2010-10-124-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug:3085564 They are used by WebView.java to align the WebTextView's text positioning with the page below. This allows the selection and insertion arrow handlers to line up better with the actual selection on the page. Requires a change in frameworks/base: https://android-git.corp.google.com/g/#change,73565 Change-Id: Ia100286016a780abd5f30e32975f8ad566a6ed74
* | | GL rendering (without layers)Nicolas Roard2010-10-131-4/+72
| | | | | | | | | | | | | | | | | | This is a two-parts CL, Its counterpart is https://android-git.corp.google.com/g/#change,64863 Change-Id: I40fcf3b7b6d28b887b101219c973070aeefbb777
* | | am e0482608: am 5cff132a: change webkit text select to orangeCary Clark2010-10-121-49/+80
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit 'e0482608f9ee8684ac41fc225ec82ee33ae8e123' * commit 'e0482608f9ee8684ac41fc225ec82ee33ae8e123': change webkit text select to orange
| * | change webkit text select to orangeCary Clark2010-10-111-49/+80
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the selection to a transparent orange. This won't match the UI exactly, because this draws transparently over the text instead of opaquely behind the text. This also changes the design of the text selection handles to match the bitmaps in the UI. http://b/3083069 Change-Id: I02656c42a3020f9b1e5dbc431c47bf2b51d22de8
| * Do not merge: fix array overwrite crasherCary Clark2010-09-302-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two nodes have the same coordinates, one is deleted. If either has focus, the focus needs to be transfered to the other, and the focus index recomputed, so the index won't point to the wrong node. If the two nodes are at the end of the list, the index may point off the end of the array, subsequently crashing on access. This is a possible security issue. Change-Id: I1ca934074637fbf68e40318fbc354e28c6b474ba http://b/3043268
| * Do not merge -- restrict text selection to the main layerCary Clark2010-09-151-0/+6
| | | | | | | | | | | | | | | | | | Gmail causes layers to appear as a message is scrolled. This confuses the text selection logic. To workaround this in Gingerbread, text selection is only allowed to be drawn in the main layer. Change-Id: Idd814bcb5dfeef2fc12d6b0d586a63f711351d96 http://b/2998882
| * DO NOT MERGE make the text selection easier to hitCary Clark2010-08-261-1/+4
| | | | | | | | | | Change-Id: I47b7aa04ebc2a8f0bf2c6b4399ef65e5f4c58d4e http://b/2626451
* | check for columns before looking at column dataCary Clark2010-10-111-2/+4
| | | | | | | | | | | | | | | | Also, fix some debug info to sync up with latest webkit. Change-Id: Iea8f019619b701fc2d3267228b9412379334b66e http://b/3074179
* | Merge WebKit at r67908: ColumnInfo no longer provides columnRectAt()Steve Block2010-09-292-5/+6
| | | | | | | | | | | | See http://trac.webkit.org/changeset/67660 Change-Id: Ia3c17881d27919b20d62a47218cdb95293736b2e
* | Merge WebKit at r67908: HTMLInputElement::InputType renamedSteve Block2010-09-292-4/+4
| | | | | | | | | | | | | | | | InputType renamed to DeprecatedInputType See http://trac.webkit.org/changeset/67903 Change-Id: I9efb9889588523dd2b9489809fb2c44bd799d2ba
* | Update the storage locations used by the Chromium HTTP stackSteve Block2010-09-281-6/+11
| | | | | | | | | | | | | | | | | | | | | | This updates the strorage locations to better match those used by the Android HTTP stack. Corresponding frameworks/base change is https://android-git.corp.google.com/g/70644 Bug: 3039536 Change-Id: I49162eb4d47791d4f42996650cc88bcf4aa2e330
* | Merge WebKit at r67178 : Fix CacheBuilder.Iain Merrick2010-09-162-8/+10
| | | | | | | | | | | | | | The internal representation of column rects was changed in http://trac.webkit.org/changeset/66903 Change-Id: I774c9fc487c0c88f7dec60e90f4096ba3cf657a7
* | clip img elements the same as textCary Clark2010-09-131-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nav cache builds the cursor ring by collecting the bounds of the text and images contained by the clickable node. The clip described by the parent node is available when the bounds are collected. The current code clips the text. Generalize this to clip the images also. Also, print whether the node is transparent in the node dumper. Change-Id: I44d6cbacb95211f191cf11b6abd5273e0712930f http://b/2463829
* | Cleanup temporary incognito mode files after last tab closes.Elliott Slaughter2010-09-011-0/+16
| | | | | | | | Change-Id: Ib55ef570b181afc99991afb55b6880b7a13f69a7
* | fix monkey crash in nav cacheCary Clark2010-08-311-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebView::motionUp() got the latest nav cache, extracted some nodes from it with findAt(), then called setNavBounds() which got a newer cache. The older cache node was sent to CachedRoot::setCursor() which crashed trying to use the state pointer. The flaw was that, although motionUp requests the newest cache up front, and then setNavBounds() requests the stale cache, in rare circumstances it can receive a newer cache as well. The fix is to replace the setNavBounds() function with a direct call on the valid cache. Change-Id: If23ee9222f2b701d916911f4b667185f1c3d3d18 http://b/2316138
* | fix button cursor stateCary Clark2010-08-271-1/+2
| | | | | | | | | | | | | | | | | | Clear the pressed state for buttons when the cursor is shown indefinitely, and set look for the pressed cursor state when recording the button colors. Change-Id: I78095ec9a7580c372c66b83913447b8214a6a432 http://b/2135321
* | Add a NULL guard.Shimeng (Simon) Wang2010-08-251-1/+3
| | | | | | | | | | issue:2884022 Change-Id: I471fca7296ca233bc4d9e1c75d173094265c9a9f
* | Merge "simplify cursor ring draw state"Cary Clark2010-08-251-37/+34
|\ \
| * | simplify cursor ring draw stateCary Clark2010-08-251-37/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed old code and state that used to allow for the cursor ring to be different if a synthetic link was pressed, state that allowed the ring to animate, and state that attempted to show the ring until the link it represented was replaced by a new page. The new code - shows the cursor ring indefinitely when the trackball or dpad is moved - shows the cursor for 500 ms when the trackball or dpad is clicked or if the screen is tapped. This is separate from logic that attempts to select whether to show the cursor ring at all; this merely chooses how long to show the cursor ring when the cursor changes. Requires a companion change in frameworks/base Change-Id: I309abe346f6b67ed3b665aaa79c367f4599bf1cd http://b/2135321
* | | Merge "Do not clip out found matches."Leon Scroggins2010-08-251-45/+34
|\ \ \
| * | | Do not clip out found matches.Leon Scroggins2010-08-251-45/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 1691733 We were comparing against the total clip to determine whether each match was valid. This is likely never necessary, and causes problems, for example on the textfield on Google's homepage. Change-Id: Ib6567554ea2ef7ee11fffe7329132406aed33397
* | | | am e7a07088: am 21ed5a45: Merge "check for null pictures when selecting ↵Cary Clark2010-08-241-0/+9
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | | | | | | | text" into gingerbread Merge commit 'e7a0708886b515f34d0a7e034cdea391681bf7f1' * commit 'e7a0708886b515f34d0a7e034cdea391681bf7f1': check for null pictures when selecting text
| * | check for null pictures when selecting textCary Clark2010-08-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LayerAndroid supplied to SelectText may have no picture associated with it. If that's the case, ignore it. This change was original uploaded as https://android-git.corp.google.com/g/#change,62627 in master, but then I realized it should go into gingerbread as well, and get merged into master automagically. http://b/2930142 Change-Id: If6332d81f1f9baba804131caae124dd18e0b0799
| * | DO NOT MERGE Refactor find and select dialogsCary Clark2010-08-204-220/+1430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Change imported by hand from master, based on https://android-git.corp.google.com/g/#change,53489 ) SelectText now permits incremental extension of the selection using either touch or trackball data. SelectText adds word selection and select all interfaces. SelectText has been rewritten to do a better job of finding space characters and selecting text outside of the visible window. Companion changes in frameworks/base and packages/apps/Browser Change-Id: I28a815375345d842f79464edbf0cb3a2019b7fe8 http://b/2626451
* | | Merge WebKit at r65615 : Fix include paths for string headers.Iain Merrick2010-08-232-3/+4
| |/ |/| | | | | | | | | These moved to <wtf/text> in http://trac.webkit.org/changeset/65077 Change-Id: Ie234f1a09013e48a5241d9e240c5b2e85ca75125
* | Merge "order text selection by line centers"Cary Clark2010-08-201-3/+3
|\ \