summaryrefslogtreecommitdiffstats
path: root/WebKit/android
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Encode email addresses that are not mailto: links."Patrick Scott2010-11-082-9/+15
|\
| * Encode email addresses that are not mailto: links.Patrick Scott2010-11-082-9/+15
| | | | | | | | | | | | | | | | 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-082-4/+4
|/ | | | | | | | | | | | | | | 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
* Merge "Fix compilation error when ANDROID_LAYOUT is not defined."Shimeng (Simon) Wang2010-11-051-0/+4
|\
| * Fix compilation error when ANDROID_LAYOUT is not defined.Shimeng (Simon) Wang2010-11-051-0/+4
| | | | | | | | Change-Id: I6bdb9832bd94017a5f4a894474c30f2cea89d39d
* | Do not create GL specific objects if we are not using hw accelerationDerek Sollenberger2010-11-051-14/+18
| | | | | | | | | | bug: 3166223 Change-Id: I5c18b76ac19119c3620636ce5d3b33892e18f523
* | Merge "Fix browser crash."Patrick Scott2010-11-051-7/+9
|\ \
| * | Fix browser crash.Patrick Scott2010-11-051-7/+9
| | | | | | | | | | | | | | | | | | Also fixed indenting (3 spaces?). Change-Id: If4a137d1af3ec8a597e8b929e5b4f10240f2f054
* | | Merge "Update method to take const std::string& argument"Kristian Monsen2010-11-052-2/+2
|\ \ \
| * | | Update method to take const std::string& argumentKristian Monsen2010-11-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's safe to pass this across threads since NewRunnableMethod copies the argument. Change-Id: I620ebfe64ead7947ac3a6733507865938e04a8df
* | | | 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
* | | Send the AutoFill Preview string java side.Ben Murdoch2010-11-054-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have determined that the form can be autofilled, send a preview string over to Java so that we can display it in the drop down box. Requires a change in frameworks/base: https://android-git.corp.google.com/g/#change,77127 Change-Id: Ia0dd899d659c6e5710155f33749255058d7c3faf
* | | Remove extras from GLWebViewState for nowNicolas Roard2010-11-041-0/+4
| |/ |/| | | | | Change-Id: Ic4d4866302645edb6c0a457ef6d0bd1d8f9cf484
* | Map Chromium error codes to WebKit error codes.Iain Merrick2010-11-044-4/+197
|/ | | | | | | | | | On network errors, we were seeing strange "Data connectivity problem" alert boxes. This is because we were using the HTTP status code instead of a real error code; and when there's a connection error, the HTTP status is uninitialised, so the "error code" was 0 (no error). Bug: 3140283 Change-Id: I0566c29359a0ecb2998573d1a2a77306922c87be
* Hook chromium logging up in WebKitKristian Monsen2010-11-044-0/+116
| | | | Change-Id: Ide08371e0bc8f74ef80fe25d416623bd03ac6038
* Add support for file uploads in WebKitKristian Monsen2010-11-047-62/+60
| | | | | | | | | | This also moves some of the android file handling to Java so it is not duplicated in both places. This CL needs https://android-git.corp.google.com/g/#change,77400 in frameworks/base Change-Id: I90c1726e6c323a9de3fd64f2e6feef4b64171053
* Merge Chromium at r63472 : WebKit fixes.Iain Merrick2010-11-031-1/+1
| | | | | | | | | | Chromium now uses protocol buffers so we need libprotobuf. See http://src.chromium.org/viewvc/chrome?view=rev&revision=63221 HttpCache takes an extra constructor argument. See http://src.chromium.org/viewvc/chrome?view=rev&revision=61789 Change-Id: I5e78b0de9a8ff86040b13212455eb37a4ed0e39e
* Merge "Unref the picture instead of deleting it"Cary Clark2010-11-031-1/+10
|\
| * 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
* | Merge "Add volume mute key."Jeff Brown2010-11-021-1/+2
|\ \
| * | Add volume mute key.Jeff Brown2010-11-011-1/+2
| |/ | | | | | | | | | | | | Also fixed incorrect keycode constant for numpad parens. Bug: 2912307 Change-Id: I65d02ca1c131638ea70f333bf06982747f34223c
* | Set the page background color in BaseLayerAndroidNicolas Roard2010-11-021-0/+11
| | | | | | | | | | | | This allows us to show the correct background even if the tiles aren't yet painted. Change-Id: Ia3ef97770aadb5f64490e44f20110ea21578ccd0
* | Update the layers onlyNicolas Roard2010-11-013-16/+56
|/ | | | | | | | C++ counterpart to https://android-git.corp.google.com/g/#change,77500 Bug:2975990 Change-Id: I3b8fd27f991d6776059a15eef36d0c9a7b44f9bb
* Fix WebCoreStringToJString() to not delete the local reference to the new ↵Steve Block2010-11-0112-131/+94
| | | | | | | | | | | | | 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 changes I28fb1392,I6b881465Steve Block2010-10-291-1/+56
|\ | | | | | | | | | | * changes: CookieManager.getCookie() should return null rather than the empty string Hook up remaining CookieManager methods
| * CookieManager.getCookie() should return null rather than the empty stringSteve Block2010-10-291-1/+1
| | | | | | | | | | | | | | This is to match the behaviour of the Android Java HTTP stack. Bug: 3116410 Change-Id: I28fb1392c36754a7c2fd78bc76281db8318a1056
| * Hook up remaining CookieManager methodsSteve Block2010-10-291-0/+55
| | | | | | | | | | | | | | | | | | | | hasCookies(), removeExpiredCookie(), removeSessionCookie() and setCookie() Requires a change to frameworks/base ... https://android-git.corp.google.com/g/76898 Bug: 3116410 Change-Id: I6b881465f78e090ed29b215785c4018119ccc5d8
* | Notify WebKit of redirects in the Chrome HTTP stack.Iain Merrick2010-10-293-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this CL we just defer the redirect until WebKit has had a chance to check it, and potentially cancel it. There's a comment in the old code asking what to do if we're given a bad request. Looks like this should never happen; it's a DCHECK in Chrome so I've turned it into an ASSERT here. We only follow redirects if WebKit does not modify the URL (this is the same behaviour as Chrome). Change-Id: I0c8b8cd61c501527a29dda5aca521a7df4a3ccef
* | Merge "Allow Gmail attachments to be viewed."Iain Merrick2010-10-296-33/+90
|\ \
| * | Allow Gmail attachments to be viewed.Iain Merrick2010-10-286-33/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When displaying attachments, WebKit calls downloadFile() on an Android-specific URL. This was crashing because it expected to have a URLRequest available; however, there's a different code path in WebRequest.cpp for Android URLs that doesn't create a URLRequest. This CL hoists the implementation of downloadFile() into WebUrlLoaderClient, and gets the necessary headers from the WebResponse object in didReceiveResponse (which should always be called before downloadFile). Gmail appends the MIME type to the URL after a ? separator, and we have to extract this to display the file correctly. Tests: - Can display .txt attachments in Gmail (now fixed) - Can download .apk files (checking for regressions) Change-Id: I966220977972da7a2de29e663d7781b1de0e6fd4
* | | Clear chromium side autofill profiles when java syncs a null profile.Ben Murdoch2010-10-293-0/+24
| | | | | | | | | | | | | | | | | | | | | This implements the native code needed to support the deletion of a profile through the editor UI. Change-Id: I7966551324d709612bff7cafeaf8a2cf93c218f0
* | | 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
* | | Merge "CookieManager.getCookie() should include HTTP-only cookies"Steve Block2010-10-281-1/+3
|\ \ \ | | |/ | |/|
| * | CookieManager.getCookie() should include HTTP-only cookiesSteve Block2010-10-281-1/+3
| | | | | | | | | | | | | | | | | | This matches the behaviour of the Android Java HTTP stack Change-Id: I280e524a849dc93bae54795543b1440c3be98c27
* | | Use Tasks for WebRequest -> WebUrlLoaderClient callbacks.Iain Merrick2010-10-285-184/+106
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | We were using some hand-rolled boilerplate for inter-thread communication, with all data packed into the same LoaderData struct. This CL uses the Chromium utility function NewRunnableMethod to pack up the parameters, so the callback methods don't have to be static and can have different parameters. Also using smart pointers wherever possible. Testing: manually verified that both synchronous and asynchronous requests work correctly with no leaks. Will also do stress-testing to check for race conditions. Change-Id: I934a2ee795138f8eee43803a94bb7494ee73031d
* | Make sure we delete local references to jclass objectsSteve Block2010-10-2815-13/+74
| | | | | | | | Change-Id: I1b398bd0a84ce366eb2e686e5f14335d7aa5ed31
* | Fix for split text bug.Nicolas Roard2010-10-271-1/+1
| | | | | | | | | | | | Bug:3134026 Change-Id: I0ccaf27b8ede58603aeb2284c56527d4fe0a589b (cherry picked from commit ca3a75fc3f9712c15e4a84ebcfd48699963896bb)
* | Merge "Fix a missing namespace in WebCache"Steve Block2010-10-271-3/+5
|\ \
| * | Fix a missing namespace in WebCacheSteve Block2010-10-271-3/+5
| | | | | | | | | | | | Change-Id: I6d1bf42b3f5a81b24613ca4c62ba4e02400a63b0
* | | Merge "Hook up CookieManager.getCookie() for Chromium HTTP stack"Steve Block2010-10-271-10/+34
|\ \ \ | |/ /
| * | Hook up CookieManager.getCookie() for Chromium HTTP stackSteve Block2010-10-271-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | Requires a change to frameworks/base ... https://android-git.corp.google.com/g/76605 Bug: 3116410 Change-Id: I1b66c1ac9f9aaf5388ad1da92f54b1f16d4a3626
* | | Merge "Hook up CookieManager.acceptCookie() and setAcceptCookie() for the ↵Steve Block2010-10-275-2/+70
|\ \ \ | |/ / | | | | | | Chromium HTTP stack"
| * | Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium ↵Steve Block2010-10-275-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP stack We also update PlatformBridge::cookiesEnabled() to query the Chromium HTTP stack directly. This avoids calling CookieClient::cookiesEnabled(), which calls the Java CookieManager::acceptCookie() which in turns calls back to native code. Also requires a change to frameworks/base ... https://android-git.corp.google.com/g/76065 Bug: 3116410 Change-Id: Id853463f3bcef76b220e8c44dd2b30c0d6752624
* | | Merge "Fix some problems in WebCoreFrameBridge when using JNIEnv::NewString()"Steve Block2010-10-271-21/+18
|\ \ \
| * | | Fix some problems in WebCoreFrameBridge when using JNIEnv::NewString()Steve Block2010-10-271-21/+18
| |/ / | | | | | | | | | | | | | | | | | | - Remove superfluous casts to unsigned short* - Avoid converting from Unicode to UTF8 and back Change-Id: Ib7cbc610f1b27ecd52082bf412afa7c7b3fec4b2
* | | Update playback state after full screen video return.Shimeng (Simon) Wang2010-10-271-0/+1
| |/ |/| | | | | | | | | | | | | This change will correctly update the play/pause button when a full screen video is returned in the middle. issue:3102273 Change-Id: Icf5e9194393fa30dd6d9195045df21480842aa6b
* | 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
* Update Chromium HTTP stack to get database and cache paths from ↵Steve Block2010-10-272-22/+16
| | | | | | | | | | | | | | | | | | | | | CookieSyncManager Currently these paths are obtained from the BrowserFrame via JNI. However, the paths are not synced to the BrowserFrame until the WebCore thread has started up. This means that if the WebRequestContext is created on the IO thread, the paths may not be available. This change moves the paths from BrowserFrame to CookieSyncManager to avoid the need to wait for the WebCore thread. Note that the new methods may be called on either the UI or WebCore threads, so are synchronised. Requires a change to frameworks/base ... https://android-git.corp.google.com/g/76580 Change-Id: I61f88772d13901d66892118c79db3cac412e6bd1