aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-14 19:51:32 +0800
committerXan Lopez <xan@igalia.com>2012-03-14 19:52:19 +0800
commitfa2b55c65df0aeece42706e27026c08666601300 (patch)
tree8d0d44dc6e42c0047dc42a7d46dba2fe56d6924c /embed
parent62b41467c3ff66f705cb8b93c60993eedf6356fb (diff)
downloadgsoc2013-epiphany-fa2b55c65df0aeece42706e27026c08666601300.tar.gz
gsoc2013-epiphany-fa2b55c65df0aeece42706e27026c08666601300.tar.zst
gsoc2013-epiphany-fa2b55c65df0aeece42706e27026c08666601300.zip
ephy-web-view: style fixes
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c161
1 files changed, 79 insertions, 82 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 47f7c0b24..f5e2d8ad7 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -503,7 +503,7 @@ ephy_web_view_file_monitor_cancel (EphyWebView *view)
if (priv->monitor != NULL) {
LOG ("Cancelling file monitor");
-
+
g_file_monitor_cancel (G_FILE_MONITOR (priv->monitor));
priv->monitor = NULL;
}
@@ -1334,7 +1334,7 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
/**
* EphyWebView:visibility:
*
- *
+ *
**/
g_object_class_install_property (gobject_class,
PROP_VISIBLE,
@@ -1493,7 +1493,7 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
/**
* EphyWebView::content-blocked:
* @view: the #EphyWebView that received the signal
- * @uri: blocked URI
+ * @uri: blocked URI
*
* The ::content-blocked signal is emitted when an url has been blocked.
**/
@@ -1897,30 +1897,28 @@ load_status_cb (WebKitWebView *web_view,
g_object_freeze_notify (object);
- switch (status)
- {
+ switch (status) {
/* FIXME: add REDIRECTING and NEGOTIATING states to WebKitGTK */
- case WEBKIT_LOAD_PROVISIONAL:
- {
- const gchar *loading_uri = NULL;
- WebKitWebFrame *frame;
+ case WEBKIT_LOAD_PROVISIONAL: {
+ const gchar *loading_uri = NULL;
+ WebKitWebFrame *frame;
- WebKitWebDataSource *source;
- WebKitNetworkRequest *request;
+ WebKitWebDataSource *source;
+ WebKitNetworkRequest *request;
- frame = webkit_web_view_get_main_frame (web_view);
+ frame = webkit_web_view_get_main_frame (web_view);
- source = webkit_web_frame_get_provisional_data_source (frame);
- request = webkit_web_data_source_get_initial_request (source);
- loading_uri = webkit_network_request_get_uri (request);
+ source = webkit_web_frame_get_provisional_data_source (frame);
+ request = webkit_web_data_source_get_initial_request (source);
+ loading_uri = webkit_network_request_get_uri (request);
- g_signal_emit_by_name (view, "new-document-now", loading_uri);
+ g_signal_emit_by_name (view, "new-document-now", loading_uri);
- if ((priv->address == NULL || priv->address[0] == '\0') &&
- priv->expire_address_now == TRUE) {
- ephy_web_view_set_address (view, loading_uri);
- ephy_web_view_set_title (view, NULL);
- }
+ if ((priv->address == NULL || priv->address[0] == '\0') &&
+ priv->expire_address_now == TRUE) {
+ ephy_web_view_set_address (view, loading_uri);
+ ephy_web_view_set_title (view, NULL);
+ }
ephy_web_view_set_loading_title (view, loading_uri, TRUE);
@@ -1929,63 +1927,62 @@ load_status_cb (WebKitWebView *web_view,
g_object_notify (object, "status-message");
priv->expire_address_now = TRUE;
- }
- break;
- case WEBKIT_LOAD_COMMITTED:
- {
- const gchar* uri;
- EphyWebViewSecurityLevel security_level;
+ break;
+ }
+ case WEBKIT_LOAD_COMMITTED: {
+ const gchar* uri;
+ EphyWebViewSecurityLevel security_level;
- /* Title and location. */
- uri = webkit_web_view_get_uri (web_view);
- ephy_web_view_location_changed (view,
- uri);
+ /* Title and location. */
+ uri = webkit_web_view_get_uri (web_view);
+ ephy_web_view_location_changed (view,
+ uri);
- ephy_web_view_set_title (view, NULL);
+ ephy_web_view_set_title (view, NULL);
- /* Security status. */
- if (uri && g_str_has_prefix (uri, "https")) {
- WebKitWebFrame *frame;
- WebKitWebDataSource *source;
- WebKitNetworkRequest *request;
- SoupMessage *message;
-
- frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(view));
- source = webkit_web_frame_get_data_source (frame);
- request = webkit_web_data_source_get_request (source);
- message = webkit_network_request_get_message (request);
-
- if (message &&
- (soup_message_get_flags (message) & SOUP_MESSAGE_CERTIFICATE_TRUSTED))
- security_level = EPHY_WEB_VIEW_STATE_IS_SECURE_HIGH;
- else
- security_level = EPHY_WEB_VIEW_STATE_IS_BROKEN;
- } else
- security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN;
-
- ephy_web_view_set_security_level (EPHY_WEB_VIEW (web_view), security_level);
-
- /* Zoom level. */
- restore_zoom_level (view, uri);
-
- /* History. */
- if (!ephy_web_view_is_loading_homepage (view)) {
- char *history_uri = NULL;
-
- /* TODO: move the normalization down to the history service? */
- if (g_str_has_prefix (uri, EPHY_ABOUT_SCHEME))
+ /* Security status. */
+ if (uri && g_str_has_prefix (uri, "https")) {
+ WebKitWebFrame *frame;
+ WebKitWebDataSource *source;
+ WebKitNetworkRequest *request;
+ SoupMessage *message;
+
+ frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(view));
+ source = webkit_web_frame_get_data_source (frame);
+ request = webkit_web_data_source_get_request (source);
+ message = webkit_network_request_get_message (request);
+
+ if (message &&
+ (soup_message_get_flags (message) & SOUP_MESSAGE_CERTIFICATE_TRUSTED))
+ security_level = EPHY_WEB_VIEW_STATE_IS_SECURE_HIGH;
+ else
+ security_level = EPHY_WEB_VIEW_STATE_IS_BROKEN;
+ } else
+ security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN;
+
+ ephy_web_view_set_security_level (EPHY_WEB_VIEW (web_view), security_level);
+
+ /* Zoom level. */
+ restore_zoom_level (view, uri);
+
+ /* History. */
+ if (!ephy_web_view_is_loading_homepage (view)) {
+ char *history_uri = NULL;
+
+ /* TODO: move the normalization down to the history service? */
+ if (g_str_has_prefix (uri, EPHY_ABOUT_SCHEME))
history_uri = g_strdup_printf ("about:%s", uri + EPHY_ABOUT_SCHEME_LEN + 1);
- else
- history_uri = g_strdup (uri);
-
- ephy_history_service_visit_url (priv->history_service,
- history_uri,
- priv->visit_type);
-
- g_free (history_uri);
- }
+ else
+ history_uri = g_strdup (uri);
+
+ ephy_history_service_visit_url (priv->history_service,
+ history_uri,
+ priv->visit_type);
+
+ g_free (history_uri);
}
break;
+ }
case WEBKIT_LOAD_FINISHED: {
SoupURI *uri;
@@ -2023,7 +2020,7 @@ load_status_cb (WebKitWebView *web_view,
for (i = 0; i < buttons_n; i++) {
WebKitDOMNode *button;
-
+
button = webkit_dom_node_list_item (buttons, i);
webkit_dom_event_target_add_event_listener (WEBKIT_DOM_EVENT_TARGET (button), "click",
G_CALLBACK (delete_web_app_cb), false,
@@ -2566,7 +2563,7 @@ ephy_web_view_load_url (EphyWebView *view,
g_free (temp_url);
} else if (g_str_has_prefix (effective_url, "javascript:")) {
char *decoded_url;
-
+
decoded_url = soup_uri_decode (effective_url);
webkit_web_view_execute_script (WEBKIT_WEB_VIEW (view), decoded_url);
g_free (decoded_url);
@@ -2710,7 +2707,7 @@ ephy_web_view_set_address (EphyWebView *view,
static char*
get_title_from_address (const char *address)
{
- if (g_str_has_prefix (address, "file://"))
+ if (g_str_has_prefix (address, "file://"))
return g_strdup (address + 7);
else if (!strcmp (address, EPHY_ABOUT_SCHEME":plugins"))
return g_strdup (_("Plugins"));
@@ -3297,7 +3294,7 @@ ephy_web_view_get_typed_address (EphyWebView *view)
* ephy_web_view_set_typed_address:
* @view: an #EphyWebView
* @address: the new typed address, or %NULL to clear it
- *
+ *
* Sets the text that @view's #EphyWindow will display in its location toolbar
* entry when @view is selected.
**/
@@ -3518,7 +3515,7 @@ ephy_web_view_print (EphyWebView *view)
* @view: an #EphyView
*
* Returns the title of the web page loaded in @view.
- *
+ *
* This differs from #ephy_web_view_get_title in that this function
* will return a special title while the page is still loading.
*
@@ -3810,9 +3807,9 @@ ephy_web_view_save (EphyWebView *view, const char *uri)
/**
* ephy_web_view_load_homepage:
* @view: an #EphyWebView
- *
+ *
* Loads the homepage, which is hardcoded to be "about:blank"
- *
+ *
**/
void
ephy_web_view_load_homepage (EphyWebView *view)
@@ -3831,7 +3828,7 @@ ephy_web_view_load_homepage (EphyWebView *view)
* @y: the y coordinate of the snapshot
* @width: the width of the snapshot
* @height: the height of the snapshot
- *
+ *
* Returns: (transfer full): a #GdkPixbuf with a snapshot of the requested area.
**/
GdkPixbuf *
@@ -3871,7 +3868,7 @@ ephy_web_view_is_loading_homepage (EphyWebView *view)
/**
* ephy_web_view_get_visit_type:
* @view: an #EphyWebView
- *
+ *
* Returns: the @view #EphyWebViewVisitType
**/
EphyHistoryPageVisitType
@@ -3886,7 +3883,7 @@ ephy_web_view_get_visit_type (EphyWebView *view)
* ephy_web_view_set_visit_type:
* @view: an #EphyWebView
* @visit_type: an #EphyHistoryPageVisitType
- *
+ *
* Sets the @visit_type for @view, so that the URI can be
* properly weighted in the history backend.
**/
column5'>\ | * | add casey's testDimitry2017-10-193-3/+710 | * | add test for returndatasize after ecreccdetrio2017-10-072-0/+149 * | | Merge pull request #361 from ethereum/returntestYoichi Hirai2017-10-244-0/+893 |\ \ \ | |_|/ |/| | | * | RETURNDATACOPY and RETURNDATASIZE after failing createDimitry2017-10-194-0/+893 * | | Merge pull request #356 from ethereum/a-call-b-call-c-return-oogYoichi Hirai2017-10-184-0/+1143 |\ \ \ | * | | Add a test case about transaction calls A (CALL B(CALL C(RETURN) OOG) 'check ...Yoichi Hirai2017-10-184-0/+1143 |/ / / * | | Merge pull request #360 from ethereum/returntestwinsvega2017-10-174-0/+1012 |\ \ \ | |/ / |/| | | * | RETURNDATASIZE after a failing CALL (due to insufficient balance) should retu...Dimitry2017-10-174-0/+1012 |/ / * | Merge pull request #358 from ethereum/fixtestYoichi Hirai2017-10-172-39/+39 |\ \ | * | fix random state testDimitry2017-10-172-39/+39 |/ / * | Merge pull request #354 from ethereum/modexpinputYoichi Hirai2017-10-1314-0/+4226 |\ \ | * | modexp input testDimitry2017-10-1314-290/+1667 | * | fuzzed test modexp inputDimitry2017-10-1310-0/+2849 * | | Merge pull request #352 from ethereum/badOpcodes-bigger-stackwinsvega2017-10-13246-8293/+19646 |\ \ \ | * | | refill badopcodes blockchain tests, blockchain general state testsJared Wasinger2017-10-13246-8293/+19646 * | | | Merge pull request #355 from ethereum/fuzztestwinsvega2017-10-134-0/+874 |\ \ \ \ | |_|/ / |/| | | | * | | Update randomStatetest647Filler.jsonwinsvega2017-10-131-1/+1 | * | | fuzztests bytecodeDimitry2017-10-134-0/+874 |/ / / * | | Merge pull request #353 from ethereum/splitwinsvega2017-10-134802-94645/+94217 |\ \ \ | |/ / |/| | | * | split random testsDimitry2017-10-13228-130378/+25 | * | split large test suitesDimitry2017-10-134803-85605/+215530 |/ / * | Merge pull request #344 from tkstanczak/missingBranchValueUpdateTestwinsvega2017-10-121-0/+8 |\ \ | * | added a missing test - it was possible to write Tree code that would pass oth...Tomasz K. Stanczak2017-10-031-0/+8 * | | Merge pull request #350 from ethereum/paritywinsvega2017-10-124-0/+1127 |\ \ \ | * | | add _info commentDimitry2017-10-113-32/+35 | * | | python testDimitry2017-10-114-0/+1124 |/ / / * | | Merge pull request #349 from ethereum/case_10_10_2017Yoichi Hirai2017-10-1110-6/+3021 |\ \ \ | * | | Add a test case where modexp gets inputYoichi Hirai2017-10-119-4/+3017 | * | | Add an interesting input to modexp found by fuzzingYoichi Hirai2017-10-101-2/+4 * | | | set author for nightly builds RPC testsDimitry2017-10-101-2/+3 |/ / / * | | Merge pull request #347 from ethereum/fillerhasheswinsvega2017-10-098400-1123694/+311512 |\ \ \ | |_|/ |/| | | * | regenerate Copier TestsDimitry2017-10-07603-4146/+6006 | * | refill all the testsDimitry2017-10-078212-1118917/+304865 | * | fix test fillersDimitry2017-10-0648-632/+642 |/ / * | Merge pull request #342 from ethereum/fixfillerswinsvega2017-10-04