New settings UI for HTML5
diff --git a/res/layout/application.xml b/res/layout/application.xml
new file mode 100644
index 0000000..d8de265
--- /dev/null
+++ b/res/layout/application.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+  android:drawingCacheQuality="auto"
+  android:layout_width="fill_parent"
+  android:layout_height="wrap_content"
+  android:gravity="center"
+  android:padding="0dip">
+
+  <ImageView android:id="@+id/icon"
+    android:layout_width="32px"
+    android:layout_height="32px"
+    android:padding="2dip" />
+
+  <TwoLineListItem
+    android:paddingTop="2dip"
+    android:paddingBottom="2dip"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:mode="twoLine">
+
+    <TextView android:id="@+id/title"
+      android:layout_width="fill_parent"
+      android:layout_height="wrap_content"
+      android:layout_marginLeft="6dip"
+      android:layout_marginTop="6dip"
+      android:textAppearance="?android:attr/textAppearanceLarge"/>
+
+    <TextView android:id="@+id/subtitle"
+      android:layout_width="fill_parent"
+      android:layout_height="wrap_content"
+      android:layout_below="@+id/title"
+      android:layout_alignLeft="@+id/title"
+      android:textAppearance="?android:attr/textAppearanceSmall"/>
+
+  </TwoLineListItem>
+
+</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8440314..3bdb0be 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -300,9 +300,9 @@
     <!-- Settings label -->
     <string name="pref_privacy_clear_cache">Clear cache</string>
     <!-- Settings summary -->
-    <string name="pref_privacy_clear_cache_summary">Delete all cached page content</string>
+    <string name="pref_privacy_clear_cache_summary">Clear locally cached content and databases</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_privacy_clear_cache_dlg">The cache will be cleared.</string>
+    <string name="pref_privacy_clear_cache_dlg">Locally cached content and databases will be cleared.</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_cookies">Clear all cookie data</string>
     <!-- Settings summary -->
@@ -327,6 +327,16 @@
     <string name="pref_privacy_clear_passwords_summary">Clear all the saved passwords</string>
     <!-- Confirmation dialog message -->
     <string name="pref_privacy_clear_passwords_dlg">All saved passwords will be cleared.</string>
+    <!-- Settings label -->
+    <string name="pref_privacy_request_location">Enable location</string>
+    <!-- Settings summary -->
+    <string name="pref_privacy_request_location_summary">Allow sites to request access to your location</string>
+    <!-- Settings label -->
+    <string name="pref_privacy_clear_location_requests">Clear location access</string>
+    <!-- Settings summary -->
+    <string name="pref_privacy_clear_location_requests_summary">Clear location access for all websites</string>
+    <!-- Confirmation dialog message -->
+    <string name="pref_privacy_clear_location_requests_dlg">Clear all previous location requests</string>
     <!-- Settings screen, section title -->
     <string name="pref_security_title">Security settings</string>
     <!-- Settings label -->
@@ -372,30 +382,9 @@
     <!-- Settings summary -->
     <string name="pref_extras_gears_enable_summary">Applications that extend browser functionality</string>
     <!-- Settings label -->
-    <string name="pref_extras_webstorage_settings">Local Storage</string>
+    <string name="pref_extras_website_settings">Website Settings</string>
     <!-- Settings summary -->
-    <string name="pref_extras_webstorage_settings_summary">Allow websites to store information on your phone</string>
-    <!-- Settings label -->
-    <string name="pref_extras_webstorage_enable">Enable Database Storage</string>
-    <!-- Settings summary -->
-    <string name="pref_extras_webstorage_enable_summary">Allow websites to store informatin in a local database</string>
-    <!-- Settings label -->
-    <string name="pref_extras_webstorage_set_location">Set Databases Location</string>
-    <!-- Settings summary -->
-    <string name="pref_extras_webstorage_set_location_summary">Define where the databases are stored</string>
-    <!-- Settings label -->
-    <string name="pref_extras_webstorage_set_quota">Set Default Quota</string>
-    <!-- Settings summary -->
-    <string name="pref_extras_webstorage_set_quota_summary">The amount of storage new websites can use without your permission</string>
-    <!-- Settings label -->
-    <string name="pref_extras_webstorage_manage_databases">Manage Databases</string>
-    <!-- Settings summary -->
-    <string name="pref_extras_webstorage_manage_databases_summary">Configure existing databases</string>
-    <!-- Settings label -->
-    <string name="pref_extras_webstorage_clear_databases">Clear All Existing Databases</string>
-    <!-- Settings summary -->
-    <string name="pref_extras_webstorage_clear_databases_summary">Clear all data stored in local databases</string>
-    <string name="pref_extras_webstorage_clear_databases_dlg">All existing databases will be cleared</string>
+    <string name="pref_extras_website_settings_summary">View advanced settings for individual websites</string>
     <!-- Settings label -->
     <string name="pref_extras_gears_settings">Gears settings</string>
     <!-- Settings summary -->
@@ -756,17 +745,15 @@
     <!-- Used as a toast notification after the user close the html5 webstorage permission dialog -->
     <string name="webstorage_notification">The quota for this site can be changed in the Local Storage section of the Browser settings</string>
     <!-- Used in the Browser Settings -->
-    <string name="webstorage_manage_quota_title">Manage Quota</string>
-    <string name="webstorage_manage_quota_summary">Set a new size quota</string>
-    <string name="webstorage_clear_data_title">Clear All Data</string>
+    <string name="webstorage_clear_data_title">Clear Stored Data</string>
     <string name="webstorage_clear_data_summary">Remove all databases associated with this website</string>
     <!-- Confirmation dialog when the user ask to clear all data for an origin -->
     <string name="webstorage_clear_data_dialog_title">Clear All Data</string>
     <string name="webstorage_clear_data_dialog_message">All stored data by this origin will be deleted</string>
+    <string name="webstorage_clear_data_dialog_ok_button">Clear All</string>
+    <string name="webstorage_clear_data_dialog_cancel_button">Cancel</string>
     <!-- Strings used in the summary of origins -->
-    <string name="webstorage_origin_summary_mb_used">MB used</string>
-    <string name="webstorage_origin_summary_no_quota_left">no allowed quota left</string>
-    <string name="webstorage_origin_summary_mb_left">MB left in the quota</string>
+    <string name="webstorage_origin_summary_mb_stored">MB stored on your phone</string>
 
     <!-- Zoom-related strings --><skip />
     <!-- Caption for a button that is shown when the zoom widget is showing.  The button's action will switch to the zoom overview mode. -->
diff --git a/res/xml/browser_preferences.xml b/res/xml/browser_preferences.xml
index c5b6b24..f553e2b 100644
--- a/res/xml/browser_preferences.xml
+++ b/res/xml/browser_preferences.xml
@@ -126,6 +126,24 @@
                 android:dialogTitle="@string/clear" 
                 android:dialogIcon="@android:drawable/ic_dialog_alert"/>
 
+        <!-- below preferences will be shown when html5 location is implemented -->
+        <!--
+
+        <CheckBoxPreference
+                android:key="request_location"
+                android:defaultValue="true"
+                android:title="@string/pref_privacy_request_location"
+                android:summary="@string/pref_privacy_request_location_summary" />
+
+        <com.android.browser.BrowserYesNoPreference
+                android:key="privacy_clear_location_requests"
+                android:title="@string/pref_privacy_clear_location_requests"
+                android:summary="@string/pref_privacy_clear_location_requests_summary"
+                android:dialogMessage="@string/pref_privacy_clear_location_requests_dlg"
+                android:dialogTitle="@string/clear"
+                android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+        -->
+
     </PreferenceCategory>
     
         <PreferenceCategory
@@ -172,40 +190,9 @@
                     android:summary="@string/pref_extras_gears_settings_summary" />
 
             <PreferenceScreen
-                    android:key="webstorage_settings"
-                    android:title="@string/pref_extras_webstorage_settings"
-                    android:summary="@string/pref_extras_webstorage_settings_summary">
-
-                  <CheckBoxPreference
-                        android:key="enable_database"
-                        android:defaultValue="true"
-                        android:title="@string/pref_extras_webstorage_enable"
-                        android:summary="@string/pref_extras_webstorage_enable_summary" />
-
-                  <ListPreference
-                        android:key="webstorage_default_quota"
-                        android:dependency="enable_database"
-                        android:title="@string/pref_extras_webstorage_set_quota"
-                        android:summary="@string/pref_extras_webstorage_set_quota_summary"
-                        android:entries="@array/webstorage_quota_entries"
-                        android:entryValues="@array/webstorage_quota_entries_values" />
-
-                  <PreferenceScreen
-                        android:key="webstorage_manage_databases"
-                        android:dependency="enable_database"
-                        android:title="@string/pref_extras_webstorage_manage_databases"
-                        android:summary="@string/pref_extras_webstorage_manage_databases_summary" />
-
-                  <com.android.browser.BrowserYesNoPreference
-                        android:key="webstorage_clear_databases"
-                        android:dependency="enable_database"
-                        android:title="@string/pref_extras_webstorage_clear_databases"
-                        android:summary="@string/pref_extras_webstorage_clear_databases_summary"
-                        android:dialogMessage="@string/pref_extras_webstorage_clear_databases_dlg"
-                        android:dialogTitle="@string/clear"
-                        android:dialogIcon="@android:drawable/ic_dialog_alert" />
-
-            </PreferenceScreen>
+                  android:key="website_settings"
+                  android:title="@string/pref_extras_website_settings"
+                  android:summary="@string/pref_extras_website_settings_summary" />
 
             <com.android.browser.BrowserYesNoPreference
                     android:key="reset_default_preferences"