summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/WebView.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Bring up the IME after receiving a response from webkit.Leon Scroggins2010-01-111-35/+1
| | | | | | Fix for http://b/issue?id=2361658 Requires a change to frameworks/base.
* In motionUp, update the CachedHistory's mMouseBounds.Leon Scroggins2010-01-071-1/+3
| | | | | | mMouseBounds is later used to determine the point of clicking. Fixes http://b/issue?id=2313991
* remove unused jni interfacesCary Clark2010-01-071-8/+0
| | | | companion change is in frameworks/base
* Request <label> info only when accessing a textfield.Leon Scroggins2010-01-071-11/+0
| | | | | | | Previously, we were storing the label info each time we build the navigation cache. Requires a change to frameworks/base.
* Store label information to be used for hint text.Leon Scroggins2010-01-061-0/+11
| | | | | | Fix for http://b/issue?id=2331526 Requires a change to frameworks/base.
* webkit layers supportNicolas Roard2010-01-041-0/+92
|
* If the DOM changes textfield focus, make the IME work properly.Leon Scroggins2010-01-041-13/+25
| | | | | | | | | | | | | | Fix for http://b/issue?id=2219166 Requires a change to frameworks/base Remove the old change to update the WebTextView when a key is pressed, since the IME does not generate key events. Instead, when the focus changes, and the IME is serving the WebTextView, immediately clear the cursor and update the WebTextView, so the user can continue typing. Also, allow "Next" to work on the currently focused textfield, even if it's not the cursor. Further, check for a new action if there is a focus but not a cursor.
* check to see if nav cache is up to date on tapCary Clark2009-12-151-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - WebKit/android/jni/WebViewCore.cpp - WebKit/android/jni/WebViewCore.h Add validNodeAndBounds() to determine if the clicked cached node is good. First check to see if the pointer to the frame and node still exist in the DOM. If they do, see if the hit test bounds they point to is the same as when the cache was recorded. - WebKit/android/nav/CacheBuilder.cpp - WebKit/android/nav/CachedNode.h Record the original absolute bounds for later comparison. - WebKit/android/nav/CacheBuilder.h Make getAreaRect() public so it can be called by validation. - WebKit/android/nav/WebView.cpp Enhance motionUp() with additional validation: use pointInNavCache() to see if there's a cached node; wait for message from webkit to see if bounds is unchanged; then use motionUp() to pass the original or altered click. This is a two-part change with frameworks/base. Fixes http://b/2249425
* Pass a message to move the focus when user hits "Next".Leon Scroggins2009-12-091-4/+18
| | | | | | | | Directly move the focus rather than passing a click. Fixes http://b/issue?id=2292683 Requires a change to frameworks/base
* Provide <input> type information to Java side.Leon Scroggins2009-12-071-8/+37
| | | | | | | | | | | | | | | | | Help to fix http://b/issue?id=1890360 and http://b/issue?id=2150538 CacheBuilder.cpp: Explicitly set isTextField to false for textareas. CachedRoot: Remove the code which checks to see if the textfield is a search, since if it is, we can avoid this path altogether. WebView: Return a single integer which tells what type the current text input field is. Requires a change to frameworks/base.
* fix crash reading readonly node stateCary Clark2009-12-071-4/+4
| | | | | | | | | | | | Something about rebuildTextView() invalidates the current cached frame -- reading the last obtained frame after calling it may crash. Why, I don't know. Until I figure that out, read the cached state first. Also remove some tests for null frame and node since the null case has already been handled earlierin motionUp(). fixes http://b/2307964
* Store InputType information for <input> fields, return SEARCH action for ↵Leon Scroggins2009-12-071-1/+2
| | | | | | | SEARCH <input> Fixes http://b/issue?id=2299660 and http://b/issue?id=2299650 Also remove isPassword, which is redundant.
* move input-related fields out of CachedNode to expandCary Clark2009-12-041-28/+54
| | | | | | | | | | | | | Some of the fields in CachedNode are relevant only to input fields and text areas. Move these into their own vector so that we can add more data without making all CacheNodes bigger. Remove CacheNode entries that are no longer used, or can be consolidated into the node type. Alphabetize some interfaces and implementations. Update the debugging output. part of http://b/2299660
* Remove nativeTextInputMotionUp.Leon Scroggins2009-11-251-31/+0
| | | | Function is not needed. Requires a change to frameworks/base
* rename nativeFindIsDown to nativeFindIsUpCary Clark2009-11-171-3/+3
| | | | | | companion fix is in framework/base fixes bug http://b/issue?id=2264941
* Fixes license headers for all files in WebKit/android, other than those in stl/.Steve Block2009-11-131-1/+1
| | | | | | | | | | | | | These files have not yet been upstreamed to webkit.org. WebKit requires either a BSD-style or LGPL 2.1 license for all code. We use a BSD-style 2-clause license for Android-specific files that will be upstreamed to webkit.org. This change adds licenses where absent or simply fixes the names of copyright holders in the license text to 'THE COPYRIGHT OWNER' and cleans up formatting. Files in stl/ currently use licenses other than BSD-style and will require more careful treatment. Change-Id: I67ad4b8932e432d3eaaeecdfeb0d09418496228d
* Fix a clicking bug.Leon Scroggins2009-10-281-4/+3
| | | | | | | | | | | Remove some code that simulates a mouse click at the beginning of a textarea and the end of a textfield. The original goal was to make the click change the selection to be at the beginning or end of the field, respectively. However, we actually make another call which prevents this click from the selection. Further, the selection actually gets changed elsewhere. Fixes http://b/issue?id=2219233
* pass the current cursor when computing the mouse positionCary Clark2009-10-281-3/+4
| | | | | | | | | Most of the time, the simulated mouse position can be computed from the current cursor. But when the cursor is changed, the current cursor info could be out of date and generate a bus error. fixes http://b/issue?id=2061211
* Allow touches to change the selection.Leon Scroggins2009-10-271-3/+10
| | | | | | | | Fixes http://b/issue?id=1650395 Lets touches change the selection while ignoring changes from trackball events. When a touch puts a textfield in focus, tell the WebTextView to set mOkayForFocusNotToMatch. Requires a change in frameworks/base.
* changing how plugins gain/lose focus.Derek Sollenberger2009-10-271-72/+10
| | | | | | | | | | Previously we were keeping our own state in the UI thread to determine when to send events to the plugin. This change removes that logic and uses the document focus to determine when events are to be sent. This also fixes problems with the plugins occasionally not receiving lose focus events. see bug http://b/2033843
* tweak select textCary Clark2009-10-271-53/+26
| | | | | | | | | | | | | | | | | | | | webkit changed the behavior of hitTestResultAtPoint; it used to return the innermost node hit, but does so no longer. Work around this by searching the returned node for a text node. Start the text detection one pixel lower. This fixes picking up the first line of a link on m.msn.com. Simplify the selection drawing. Share code between the arrow and the i-beam. Center the i-beam on the arrow. Use relative path construction to simplify the i-beam. Add debugging. Requires a companion change in frameworks/base partially fixes http://b/issue?id=1667690
* Allow java WebView to check the readonly status of a node.Leon Scroggins2009-10-231-0/+8
| | | | | Required for a change to frameworks/base (https://android-git.corp.google.com/g/30939 )
* Remove some unused variables.Leon Scroggins2009-10-231-1/+1
|
* fix multiple text areas, and text areas without focus ringsCary Clark2009-10-211-6/+5
| | | | | | | | | | | Separate nodes that are hidden from nodes that disable drawing the focus ring. If a node draws its own focus state, other than not drawing the ring, it should be indistinguishable from other focusable nodes. Fix the nav cache dump to be in line with the latest webkit. fixes http://b/issue?id=2201049
* Do not bring up the soft keyboard for readonly input fields.Leon Scroggins2009-10-151-1/+6
| | | | | | | Partial fix for http://b/issue?id=2159869. Add a field to CachedNode for readonly. In WebView.cpp, only call displaySoftKeyboard if the node is not readonly. Also call displaySoftKeyboard in nativeTextMotionUp to replace a call being removed in WebView.touchUpOnTextField(java).
* fix copy/paste using trackball on passionCary Clark2009-10-151-21/+15
| | | | | | | | | | | | | | | This fix should be considered for passion mr1, but does not affect sholes -- this is a trackball only bug. The selection caret and arrow now take the scale factor and the height of the title bar into account when preparing the canvas for drawing. Also, simply call to CopyPaste::findClosest, and remove logic to attempt to pin the arrow to the current cursor. Requires a companion fix in framework/base Fixes http://b/issue?id=2187591
* add debugging, tweak data for flash work in progressCary Clark2009-10-121-11/+25
| | | | | | | | | Attempts to get the plugin to scroll when the ime appears. Add debugging strings to help track events to show plugin object. Add focusCandidate interfaces. Tweak rectangles from plugin so they don't disappear. Prefer found matches in nav cache that are later in the document.
* 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.