aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-09-06 21:59:28 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-09-06 21:59:28 +0200
commit6e539b69c6663c3bb99396716bc5e8e3d67f42cb (patch)
treedb5b5ad9088b5a7ade21aba3d5141cb7e8edc842 /src
parent4472e0fdac7e83bd7db6e891d27c7f5d9309d390 (diff)
avoid redraw loops with ComplexComplexButtonResource
ComplexButtonResource was creating endless redraws. Testcase: <table> <tr> <td> <div> <button></button> </div> <div> words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words <span style="white-space:nowrap">And words in a span</span> <button></button> </div> </td> </table> This also fixes redraw loops with <button> in combination with limit_text_width=YES, so we no longer need to disable this option. Reported and testcase by: corvid <corvid@lavabit.com>
Diffstat (limited to 'src')
-rw-r--r--src/form.cc5
-rw-r--r--src/prefsparser.cc7
2 files changed, 4 insertions, 8 deletions
diff --git a/src/form.cc b/src/form.cc
index 9b86fcb7..f70bea8c 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -851,7 +851,10 @@ void Html_tag_open_button(DilloHtml *html, const char *tag, int tagsize)
Embed *embed;
char *name, *value;
- page = new Textblock (prefs.limit_text_width);
+ /* We used to have Textblock (prefs.limit_text_width) here,
+ * but it caused 100% CPU usage.
+ */
+ page = new Textblock (false);
page->setStyle (html->styleEngine->backgroundStyle ());
ResourceFactory *factory = HT2LT(html)->getResourceFactory();
diff --git a/src/prefsparser.cc b/src/prefsparser.cc
index 3f8e4a97..4ebb39df 100644
--- a/src/prefsparser.cc
+++ b/src/prefsparser.cc
@@ -218,11 +218,4 @@ void PrefsParser::parse(FILE *fp)
// restore the old numeric locale
setlocale(LC_NUMERIC, oldLocale);
dFree(oldLocale);
-
-
- if (prefs.limit_text_width) {
- /* BUG: causes 100% CPU usage with <button> or <input type="image"> */
- MSG_WARN("Disabling limit_text_width preference (currently broken).\n");
- prefs.limit_text_width = FALSE;
- }
}