[totem] browser-plugin: Don't use percentage width



commit 0430f43a176300e6c4e76d6e4aeda86788ce563d
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Dec 5 22:47:07 2011 +0100

    browser-plugin: Don't use percentage width
    
    If there's a percentage sign in the size, we don't actually
    know its size.

 browser-plugin/totemPlugin.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 071ffd0..47e6d4b 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -1911,11 +1911,11 @@ totemPlugin::Init (NPMIMEType mimetype,
 	int width = -1, height = -1;
 
 	value = (const char *) g_hash_table_lookup (args, "width");
-	if (value != NULL) {
+	if (value != NULL && strchr (value, '%') == NULL) {
 		width = strtol (value, NULL, 0);
 	}
 	value = (const char *) g_hash_table_lookup (args, "height");
-	if (value != NULL) {
+	if (value != NULL && strchr (value, '%') == NULL) {
 		height = strtol (value, NULL, 0);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]