summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/WebView.cpp
Commit message (Collapse)AuthorAgeFilesLines
* am 3146e9ee: am 62d9c8e5: Store label information to be used for hint text.Leon Scroggins2010-01-061-0/+11
|\ | | | | | | | | | | | | Merge commit '3146e9ee4d8f6114a97ceb01d6fd54db77d99538' * commit '3146e9ee4d8f6114a97ceb01d6fd54db77d99538': Store label information to be used for hint text.
| * 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
| |
* | extract selected text from the pictureCary Clark2010-01-051-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deleted code extracted the selected text from the WebKit DOM by looking for text in the render tree that matched the selection region. This has never worked well. The replacement approach matches the glyphs in the picture instead. - WebViewCore.* Remove getSelection() and supporting routines. Part of the deleted code looked for punctuation between segments to add space characters that might not be present in the markup. There's no equivalent in the replacement code; it uses spacial gaps to detect the need to add extra spaces. - SelectText.* Match the text to the selected region and convert the glyph to unicode. The tricky part is that spaces need to be inserted into the string when there are gaps in the text. - WebView.cpp Return the selection as a string to the java caller instead of a region. To convert the glyphs into text, a companion change was made to external/skia. To update the UI thread/webkit thread messaging, a companion change was also made to frameworks/base. Fixes http://b/2166748
* | resolved conflicts for merge of 870689c8Nicolas Roard2010-01-041-0/+92
| |
* | resolved conflicts for merge of 66367cf8 to masterLeon Scroggins2010-01-041-14/+25
|\ \ | |/
| * 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.
* | am 14357090: am d4924af1: check to see if nav cache is up to date on tapCary Clark2009-12-161-4/+56
|\ \ | |/ | | | | | | | | | | Merge commit '14357090e9d4ac9ad1be6147cf9c7e3ff83cdda4' * commit '14357090e9d4ac9ad1be6147cf9c7e3ff83cdda4': check to see if nav cache is up to date on tap
| * 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
* | Like other callers of Java methods, do not check for the object to be null.Leon Scroggins2009-12-111-7/+2
| |
* | am 58a731c8: am bf16ddc1: Pass a message to move the focus when user hits ↵Leon Scroggins2009-12-101-4/+18
|\ \ | |/ | | | | | | | | | | | | | | "Next". Merge commit '58a731c8a7beeda67d174e8a325594bc81e80a0f' * commit '58a731c8a7beeda67d174e8a325594bc81e80a0f': Pass a message to move the focus when user hits "Next".
| * 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
* | am c0812354: am 74757b62: Provide <input> type information to Java side.Leon Scroggins2009-12-071-8/+37
|\ \ | |/ | | | | | | | | | | Merge commit 'c08123548374ec7cdcf0d1ef8857807c6eda8293' * commit 'c08123548374ec7cdcf0d1ef8857807c6eda8293': Provide <input> type information to Java side.
| * 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.
* | am 9a00fbd6: am 34bca311: fix crash reading readonly node stateCary Clark2009-12-071-4/+4
|\ \ | |/ | | | | | | | | | | Merge commit '9a00fbd61c8699856620bca057e06efca4425015' * commit '9a00fbd61c8699856620bca057e06efca4425015': fix crash reading readonly node state
| * 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
* | am 3a360998: am dcbb033a: Store InputType information for <input> fields, ↵Leon Scroggins2009-12-071-1/+2
|\ \ | |/ | | | | | | | | | | | | | | return SEARCH action for SEARCH <input> Merge commit '3a360998e7aa91c194fa97a40131bf837f2bba1b' * commit '3a360998e7aa91c194fa97a40131bf837f2bba1b': Store InputType information for <input> fields, return SEARCH action for SEARCH <input>
| * 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.
* | am 021228f2: am 1d330120: move input-related fields out of CachedNode to expandCary Clark2009-12-041-28/+54
|\ \ | |/ | | | | | | | | | | Merge commit '021228f27b1399df5a45f3f1e7f1f12126e86e3c' * commit '021228f27b1399df5a45f3f1e7f1f12126e86e3c': move input-related fields out of CachedNode to expand
| * 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
* | am c0d334f9: am 6e752dd8: Remove nativeTextInputMotionUp.Leon Scroggins2009-11-251-31/+0
|\ \ | |/ | | | | | | | | | | Merge commit 'c0d334f902af03c2717dcc2223007ec681772cfd' * commit 'c0d334f902af03c2717dcc2223007ec681772cfd': Remove nativeTextInputMotionUp.
| * Remove nativeTextInputMotionUp.Leon Scroggins2009-11-251-31/+0
| | | | | | | | Function is not needed. Requires a change to frameworks/base
* | am b8b529eb: am 92c9b35d: Merge change I7018b1ca into eclair-mr2Cary Clark2009-11-181-3/+3
|\ \ | |/ | | | | | | | | | | Merge commit 'b8b529ebfcb9481927b00f6e2581873616ccf424' * commit 'b8b529ebfcb9481927b00f6e2581873616ccf424': rename nativeFindIsDown to nativeFindIsUp
| * rename nativeFindIsDown to nativeFindIsUpCary Clark2009-11-171-3/+3
| | | | | | | | | | | | companion fix is in framework/base fixes bug http://b/issue?id=2264941
* | am 7063c3ef: Merge change I67ad4b89 into eclair-mr2Steve Block2009-11-131-1/+1
|\ \ | |/ | | | | | | | | | | Merge commit '7063c3efe30d0ec965ac48439917030f62f50489' * commit '7063c3efe30d0ec965ac48439917030f62f50489': Fixes license headers for all files in WebKit/android, other than those in stl/.
| * 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
* | am 19194ea2: Fix a clicking bug.Leon Scroggins2009-10-281-4/+3
|\ \ | |/ | | | | | | | | | | Merge commit '19194ea29920c2f7a02d08dfb0416608bc81dbb7' * commit '19194ea29920c2f7a02d08dfb0416608bc81dbb7': Fix a clicking bug.
| * 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
* | am 7b035dc1: pass the current cursor when computing the mouse positionCary Clark2009-10-281-3/+4
|\ \ | |/ | | | | | | | | | | Merge commit '7b035dc1012763a04adddc6de25256647fea50bd' * commit '7b035dc1012763a04adddc6de25256647fea50bd': pass the current cursor when computing the mouse position
| * 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
* | Fix build.Elliott Hughes2009-10-271-1/+2
| |
* | am f74580c1: Allow touches to change the selection.Leon Scroggins2009-10-271-3/+10
|\ \ | |/ | | | | | | | | | | Merge commit 'f74580c1504dcdd43fd15995b0e137982512dba2' * commit 'f74580c1504dcdd43fd15995b0e137982512dba2': Allow touches to change the selection.
| * 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.
* | Use native weak references instead of our wrapper.Patrick Scott2009-10-271-88/+21
|/ | | | | | | | | | | | | | Revert "Add check null of getRealObject(). When a WebView is" This reverts commit b47ea2b1184167767692f88c1e5f3e4e89db04b2. Revert "Update the comment for checking null in needtouchevents." This reverts commit 1e67e45d20ead40b0407618abbc5e20840dc3c80. Revert "Check null for WebViewCore's nativeClass before calling" This reverts commit 992afbebfb735ec2dd52b4166c22ab55827d88ed. Fix a few places where DeleteLocalRef and DeleteGlobalRef were used incorrectly. Fix a compilation warning as well.
* 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.