summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/WebView.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add check null of getRealObject(). When a WebView isGrace Kloba2009-10-021-21/+91
| | | | | | | removed, there is a slight chance that getRealObject() for WebView's JavaObject be null. Fix http://b/issue?id=2159815
* fix a couple of debug print errorsCary Clark2009-08-251-2/+2
|
* Pass clicks to webkit's textfield to determine the new selection.Leon Scroggins2009-08-131-6/+33
| | | | | | | | | | | | Requires a corresponding change to frameworks/base. We were previously letting WebTextView handle clicks, determine the change in selection, and pass that down to webkit. This sometimes resulted in a different placement of the caret if the WebTextView and the webkit-rendered textfield did not line up exactly. Now, we pass the click directly to webkit, which determines the new selection and passes that info back to the WebTextView. This also has the benefit of letting the WebTextView reflect changes in the selection that originated from webkit. Also remove some unused parameters.
* Fix a bug in find.Leon Scroggins2009-07-311-10/+9
| | | | | | | | | | | Fix for http://b/issue?id=2021424. When trying to draw the matches, if we find that the page needs to be scrolled to put the match on screen, we request a scroll, do a viewInvalidate and stop, so that the matches will be drawn after the invalidate. Unfortunately, for some values, we do not end up scrolling, because contentToView turns the scroll into a no op. So we forever request scrolls, and never draw the matches. Fix this by getting a return value from scrollBy, and if it returned false, go ahead and draw the matches.
* rebuild the nav cache on mouse clicks during page loadCary Clark2009-07-311-5/+6
| | | | | | | | | | | | | | | While the page is loading, the nav cache is not rebuilt. Double-click zooms out the web page by using the nav cache to find the left edge of the column -- but fails to work during page load. This change rebuilds the nav cache (if the page is loading) each time a mouse click is sent to webkit. This doesn't fix the bug where the first double click doesn't align the column correctly, but helps with subsequent clicks. Also, pass scale information to getBlockLeftEdge so it can restrict its search to the area that will be zoomed to. Default to the point clicked if no alignment info can be found.
* Allow user to jump to the next textfield.Leon Scroggins2009-07-311-21/+63
| | | | | | | | In CachedFrame, add methods to find the next textfield and to determine which ImeAction should be associated with a given textfield. In WebView, uses these apis to determine the ImeAction and jump to the next textfield and scroll it on screen. Requires a change to frameworks/base.
* Support double tap in the Browser.Grace Kloba2009-07-281-0/+19
| | | | | | | | | | | | | | | Add api to get the left edge of the block from the current (x,y). The code was copied from Cary's change. Todo: 1.need some tuning as we can see from nytimes.com that some times the left edge is not correct. 2.currently nav cache is not up to date while loading. This means the left edge may not be correct during loading. 3.if (x,y) is over an edit text box, or image, it should return the left edge of it. Currently it is not working as expected. Added the code to store the extra scale factor, so that back/forward history works correctly.
* Clear the WebTextView when clicking on another node.Leon Scroggins2009-07-231-0/+1
| | | | | | | | | | | | We already cleared it in the above case, when the user clicks on empty space. If the user clicks on a node, and it is not a text input, clear it. This fixes a bug on the Google home page, where the user has typed into the textfield, but then clicks on "more" and is then unable to click on Gmail, which is covered by the (invisible) WebTextView.
* hide the cursor when the link is followedCary Clark2009-07-061-0/+2
| | | | | | | | | The cursor position is preserved, so additional trackball navigation will start from where the cursor ring was drawn last. Hiding the cursor gets rid of confusion where the cursor ring stays visible when clicking on a link that does not go to a new page, or when the new page has a link at the same physical location as the old page.
* In WebTextView, check the focus before sending a key.Leon Scroggins2009-07-061-0/+8
| | | | | | | | This fixes a bug where the DOM has moved the focus, but the WebTextView is still sending keys to the old focus. Requires a change in frameworks/base. This part of the change just gives WebView a way to get a pointer to the currently focused node (regardless of the cursor).
* added gain/loose focus support for plugins. (focus = eligible to receive ↵Derek Sollenberger2009-07-021-6/+29
| | | | user events)
* Update the nav cache when selected elements change or moveCary Clark2009-07-011-0/+1
| | | | | | This helps superpudu recompute the cursor ring more frequently when the floating bar moves. It also helps update the nav cache when navigating during a page load.
* Fix a WebView longpress bug.Leon Scroggins2009-06-301-0/+2
| | | | | | | | | | | | | | | | | | Longpressing on a WebView while the WebTextView is up calls WebTextView::performLongPress(). This used to be fine, but now we may still leave the WebTextView up while the user is longpressing on something else. Check to ensure that the focus is the same as the cursor before calling WebTextView's version. Also, send a click if the user longpresses on a different WebTextView, so it will now behave appropriately. Requires a change in frameworks/base. Provide a setter on CachedHistory to set the mousebounds, and set it in selectBestAt, so that getSimulatedMousePosition uses the correct information. Also edit some comments to refer to the cursor rather than the focus. In WebView.cpp, use the delete TypingCommand, making deleting and cutting work once again.
* Adding support for plugins to request the keyboard.Derek Sollenberger2009-06-291-4/+4
|
* work in progress to enable plugins to receive arrow keysCary Clark2009-06-291-15/+73
| | | | | | | | | | | | Consolidate key handling. Simplify interface between android and webkit so multiple clients can use common code to pass keys. Add helper to return if cached node is plugin. Use WebView::m_clickedOnPlugin to remember active plugins. Add WebView.MOVE_CURSOR to replay key events the plugin doesn't want.
* Fix a bug where sometimes the cursor was lost.Leon Scroggins2009-06-261-26/+40
| | | | | | | | | | | | Create a new function that sets the cursor data to the WebViewCore, and call it each time we change the cursor. Prior to this change, by touching on a non-cursored, non-focused textfield, you could set the cursor on the current CachedRoot without setting the data on the WebViewCore. Then, when we get a new frame cache, we check the data on the WebViewCore (which is out of date). Since it does not think there was a cursor (or it thinks it was somewhere else), we do not restore the cursor on the new cache. This change fixes that by ensuring that the cursor information is up to date.
* Invalidate the full rectangle of the highlight when clearing it.Leon Scroggins2009-06-251-6/+10
| | | | | | In drawCursorRing, we potentially use a different value than bounds for the cursor ring. If we use that other value, also use it for the invalidation to clear it later.
* set trackball click to the edge of the text field, not the middleCary Clark2009-06-241-2/+2
| | | | | | | | Add clicking, key debug statements in WebViewCore.cpp. Fix dumping nav tree to use NamedNodeMap. Set click point to be start of text field, end of text area, middle of others. Make CachedRoot::getSimulatedMousePosition, callers const
* Don't draw focus ring around plugin when clicking on itCary Clark2009-06-221-0/+4
|
* rebuild WebView nav cache on trackball move, other bugsCary Clark2009-06-221-2/+5
| | | | | | | | | | | | | When the WebViewCore picture set is recomputed, check to see if the trackball has moved since the last time. If so, rebuild the nav cache even if dom version checking is disabled. If there's no focus node ready to receive a key event, check to see if the cursor is hovering over a plugin, and give it the event instead. Update all cursor state in both places it could change.
* clean up mouse move events in webviewCary Clark2009-06-181-0/+65
| | | | | | | | | Generate mouse move event after sending scroll event Move cursor update in nav cache to UI thread Remove updating nav cache on mouse move Remove node parameter from mouse move Remove plugin focus hack from mouse move Add interface to get native cursor position
* try again to disable webkit fix for gmailCary Clark2009-06-171-1/+1
| | | | also, set hasCursorBounds only if cursor ring is visible
* Changes to make the cursor blink at the correct times.Leon Scroggins2009-06-161-7/+15
| | | | | | | | | | | | | | Make the blinking caret active when the user actually starts editing text. In WebView.cpp, determine whether to disable the blinking caret and pass that info up to the Java call. Requires a matching change in frameworks/base. Also add some comments for clarification, and remove duplicate calling points for functions. Also change glue for nativeSetFocusControllerActive to reflect its new name/ function. This change also reflects a behavioral change. If the WebView or its window lose focus, we do not restore the blinking caret when focus returns.
* rebuild webview nav cache if cursor node changesCary Clark2009-06-121-0/+2
| | | | | | | | | | | Everytime the picture set is rebuilt, the nav cache is also built if the dom changes. This doesn't catch javascript that changes locations of objects without updating the dom. To handle these cases, do a hit-test on the cursor location and see if it finds the same node used to build the cursor cache. This helps track the gmail message floating tool bar.
* more (browser) trackball-is-a-mouse work in progressCary Clark2009-06-111-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebViewCore.cpp: Add parameter to CachedRoot::findAt to suppress check for hidden nodes. This helps find a best match for newly built nav caches. Require that the new cursor node closely match the bounds of the prior cursor node. This may need tuning. CacheBuilder.cpp: Remove isInput flag on cached nodes (no longer used) CachedFrame.cpp: Add hideCursor to complement clearCursor. Hide prevents the cursor from drawing but does not move it. Clear removes it altogether so that the next movement starts from the viewPort edge. CachedHistory.cpp: Don't special case text fields when doing history navigation. This special casing in part allowed setting the focus to the homepage input, but since focus is no longer set by nav, it is not required. CachedNode.cpp: Add hideCursor; clean up debugging CachedRoot.cpp: Use navBounds from history instead of cursor bounds to determine next move. Clean up some obsolete code. WebView.cpp: Add hideCursor; call it when appropriate.
* Do not bring up the soft keyboard when clicking on a pluginLeon Scroggins2009-06-091-3/+2
| | | | | | | Since we have a way to bring up the soft keyboard manually (holding down the menu key), and trying to bring it up using our existing call results in a crash, only bring it up when the click is on a textfield/textarea.
* Remove obsolete notion of invalid node.Leon Scroggins2009-06-091-24/+6
| | | | | | | | | | | In the old navigation model, we set focus to a node, and checked to see if that node was still valid (could have changed since we built the navigation cache). Then we sent a message back to the UI thread to tell it to draw the ring differently. In the new model, we are essentially moving a mouse, so we do not concern ourselves with whether the node is valid. Here I have removed function and jni to call sendMarkNodeInvalid, the notion of an invalid node in WebView.cpp, and the INVALID flavor of CursorRing. Needs a change in frameworks/base to work properly.
* fix cursor movement bugs in browserCary Clark2009-06-081-28/+4
| | | | | | Remove obsolete recomputeFocus, old moveCursor code Make sure focus is !null before using it.
* Update the language from "focus".Leon Scroggins2009-06-081-36/+36
| | | | | | | | | | Previously, many methods, variables, etc referred to the focus. Now, they have been changed to refer to the cursor when appropriate. Some references were changed to the focusCandidate, since they may apply to either the focus or the cursor, which is a candidate for focus. Also removed unneeded method unblockFocus. Will not work without a corresponding change in frameworks/base.
* use full pictureset when recording displaytreeMike Reed2009-06-051-22/+22
|
* in browser, return webview node to receive key eventsCary Clark2009-06-031-10/+22
| | | | | | Instead of returning the node that currently has focus, return the node that the cursor is on if it can handle key events.
* remove unneeded text parameters from WebViewCary Clark2009-06-031-11/+15
| | | | | | | | | Add convenience routines to consolidate cache builder and current focus fetches into one place. Remove unused functions. Use wantsKeyEvents attribute where applicable.
* Rename TextDialog to WebTextView.Leon Scroggins2009-06-021-6/+7
| | | | | | | This change corresponds to a change in frameworks/base which changes the name of the TextDialog to WebTextView. It also changed the method updateTextEntry to rebuildWebTextView. So, the native side needs to call the newly named method.
* in the browser, make the trackball more like a mouseCary Clark2009-06-011-901/+429
| | | | | | | | | | | | | | Older code treated the trackball as a four way dpad with equivalents to moving up, down, left and right by generating arrow key events. This change makes the trackball solely generate mousemove events. The old arrow keys in turn were mapped to be as close as possible to tab-key events that moved the focus. The new model leaves focus-changes to the DOM. Clicking the dpad is distinguished from pressing the enter key to be more compatible with desktop-authored web pages.
* fix browser monkey crash; add null checkCary Clark2009-05-181-0/+2
| | | | http://b/issue?id=1742161
* Trackball moves UI focus, but leaves DOM focus unchangedCary Clark2009-05-181-4/+0
| | | | | | | remove unused commonKitFocus function in WebView leave recompute focus position for now, but don't look at node index as a condition to abort fixOutOfDateFocus()
* remove isClick parameter in browser touch event handlerCary Clark2009-05-141-18/+13
| | | | | | isClick is always set to true by the callers, so remove it and simplify the code (http://b/issue?id=1666780; see also change in framework/base)
* use one rectangle for browser focus ringCary Clark2009-05-131-7/+12
| | | | | | | | | | | | Check to see if the potentially larger hit-test bounds can be used in place of the normal bounds, or if the normal bounds can be used in place of the individual text bounds. Construct a region out of the individual focus ring rectangles, then see if any text is drawn inside the bounds but outside of the focus ring. If not, use one rectangle instead of the rings.
* share xfermode and color routines with chrome portMike Reed2009-04-291-5/+2
| | | | | | Besides sharing those routines in SkiaUtils.cpp, also remove our (now redundant) android_setrect, etc. calls, since the type-conversion extras we added earlier take care of this by using constructors.
* keep webkit focus in sync with ui cache for text fieldsCary Clark2009-04-231-8/+16
| | | | | | | | | | | | | | | | | | | | | If WebViewCore::sendFinalFocus is called from the UI thread, postpone calls to WebViewCore::notifyFocusSet until after the focus is set. Don't allow WebViewCore::setSelection or WebViewCore::passToJs to change the webkit focus. In WebView::notifyFocusSet, read the cache after it has been updated. In WebView::focusIsTextArea and WebView::nativeFindAll, don't allow the new frame cache to fix the focus. If CachedFrame::setFocus has already set the focus, don't recompute its position. Add/revise debugging.
* AI 143515: Fix for issue 1730904: Find only searches the first part of large ↵Leon Scroggins2009-03-301-3/+0
| | | | | | | | pages. The previous fix, 142939-p9, allowed larger pages to be searched fully, but not with a length larger than a 16 bit number. In change 143089-p9, bitmap's width and height were promoted to 32 bits, so our previous fix is no longer necessary, and prevents larger pages from working. This removes the prior fix. BUG=1730904 Automated import of CL 143515
* AI 143340: am: CL 143189 am: CL 142939 Fix for issue 1730904: Find in page ↵Leon Scroggins2009-03-271-1/+3
| | | | | | | | | | | only searches the first part of large pages. Cap the width and height of the page so we do not overflow a 16 bit int and think the page is smaller than it is when performing the find. Original author: scroggo Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 143340
* Automated import from //branches/master/...@142298,142298Cary Clark2009-03-241-0/+3
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+2322
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-2322/+0
|
* auto import from //branches/cupcake/...@132569The Android Open Source Project2009-02-201-5/+8
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-10/+34
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-0/+14
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-25/+28
|
* auto import from //branches/cupcake/...@127436The Android Open Source Project2009-01-221-8/+17
|