http://www.dillo.org/test/redraws.html For me, it still breaks with default dillorc options, and also with a dillo from April 2010.
I wrote:
http://www.dillo.org/test/redraws.html
For me, it still breaks with default dillorc options, and also with a dillo from April 2010.
I put up a new version where I trimmed the body down to something comprehensible. The <style> in <head> is still a big mess.
The following suffices to trigger it for me: <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>
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit... Cheers, Johannes On Sat, Sep 03, 2011 at 05:00:10PM +0000, corvid wrote:
The following suffices to trigger it for me:
<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>
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Johannes wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
I wonder whether it is just the limit_text_width button problem dressed up in more complex clothing.
On Sun, Sep 04, 2011 at 07:15:09PM +0000, corvid wrote:
Johannes wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
I wonder whether it is just the limit_text_width button problem dressed up in more complex clothing.
As funny as it sounds, hg bisect says it's rev 6a892184d498 where it starts the redraw loop! And indeed, if I do --- a/src/prefsparser.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/src/prefsparser.cc Sun Sep 04 22:04:18 2011 +0200 @@ -219,10 +219,11 @@ setlocale(LC_NUMERIC, oldLocale); dFree(oldLocale); - +#if 0 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; } +#endif } it loops with limit_text_width=NO and doesn't with limit_text_width=YES. Cheers, Johannes
On Sun, Sep 04, 2011 at 10:05:22PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 07:15:09PM +0000, corvid wrote:
Johannes wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
I wonder whether it is just the limit_text_width button problem dressed up in more complex clothing.
As funny as it sounds, hg bisect says it's rev 6a892184d498 where it starts the redraw loop! And indeed, if I do
--- a/src/prefsparser.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/src/prefsparser.cc Sun Sep 04 22:04:18 2011 +0200 @@ -219,10 +219,11 @@ setlocale(LC_NUMERIC, oldLocale); dFree(oldLocale);
- +#if 0 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; } +#endif }
it loops with limit_text_width=NO and doesn't with limit_text_width=YES.
Ah wait! With limit_text_width=YES it's just not flickering. CPU is still at 100%.
On Sun, Sep 04, 2011 at 10:51:10PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 10:05:22PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 07:15:09PM +0000, corvid wrote:
Johannes wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
I wonder whether it is just the limit_text_width button problem dressed up in more complex clothing.
As funny as it sounds, hg bisect says it's rev 6a892184d498 where it starts the redraw loop! And indeed, if I do
--- a/src/prefsparser.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/src/prefsparser.cc Sun Sep 04 22:04:18 2011 +0200 @@ -219,10 +219,11 @@ setlocale(LC_NUMERIC, oldLocale); dFree(oldLocale);
- +#if 0 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; } +#endif }
it loops with limit_text_width=NO and doesn't with limit_text_width=YES.
Ah wait! With limit_text_width=YES it's just not flickering. CPU is still at 100%.
The following test patch seems to stop it: --- a/dw/ui.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/dw/ui.cc Mon Sep 05 00:09:33 2011 +0200 @@ -268,7 +268,7 @@ /** * \todo The argument to queueResize is not always true. (But this works.) */ - resource->queueResize (true); + resource->queueResize (false); } Maybe the comment isn't always right? Cheers, Johannes
On Mon, Sep 05, 2011 at 12:11:24AM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 10:51:10PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 10:05:22PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 07:15:09PM +0000, corvid wrote:
Johannes wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
I wonder whether it is just the limit_text_width button problem dressed up in more complex clothing.
As funny as it sounds, hg bisect says it's rev 6a892184d498 where it starts the redraw loop! And indeed, if I do
--- a/src/prefsparser.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/src/prefsparser.cc Sun Sep 04 22:04:18 2011 +0200 @@ -219,10 +219,11 @@ setlocale(LC_NUMERIC, oldLocale); dFree(oldLocale);
- +#if 0 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; } +#endif }
it loops with limit_text_width=NO and doesn't with limit_text_width=YES.
Ah wait! With limit_text_width=YES it's just not flickering. CPU is still at 100%.
The following test patch seems to stop it:
--- a/dw/ui.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/dw/ui.cc Mon Sep 05 00:09:33 2011 +0200 @@ -268,7 +268,7 @@ /** * \todo The argument to queueResize is not always true. (But this works.) */ - resource->queueResize (true); + resource->queueResize (false); }
Maybe the comment isn't always right?
Good shot! It also serves for another testcase I found. I don't know this part of the code well enough to say whether it is safe to commit before the release or not. FWIW, WRT complexity, if you resize the window with the patch, over the testcase, it is quite clear that the last phrase is not measured right. -- Cheers Jorge.-
On Mon, Sep 05, 2011 at 12:41:55PM -0300, Jorge Arellano Cid wrote:
On Mon, Sep 05, 2011 at 12:11:24AM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 10:51:10PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 10:05:22PM +0200, Johannes Hofmann wrote:
On Sun, Sep 04, 2011 at 07:15:09PM +0000, corvid wrote:
Johannes wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
I wonder whether it is just the limit_text_width button problem dressed up in more complex clothing.
As funny as it sounds, hg bisect says it's rev 6a892184d498 where it starts the redraw loop! And indeed, if I do
--- a/src/prefsparser.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/src/prefsparser.cc Sun Sep 04 22:04:18 2011 +0200 @@ -219,10 +219,11 @@ setlocale(LC_NUMERIC, oldLocale); dFree(oldLocale);
- +#if 0 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; } +#endif }
it loops with limit_text_width=NO and doesn't with limit_text_width=YES.
Ah wait! With limit_text_width=YES it's just not flickering. CPU is still at 100%.
The following test patch seems to stop it:
--- a/dw/ui.cc Sat Sep 03 01:15:33 2011 +0000 +++ b/dw/ui.cc Mon Sep 05 00:09:33 2011 +0200 @@ -268,7 +268,7 @@ /** * \todo The argument to queueResize is not always true. (But this works.) */ - resource->queueResize (true); + resource->queueResize (false); }
Maybe the comment isn't always right?
Good shot!
It also serves for another testcase I found.
I don't know this part of the code well enough to say whether it is safe to commit before the release or not.
Actually I would suggest to commit attached patch. I have to admit that I'm not 100% sure about the ui.cc change, but it seems better than just always passing true or false. The form.cc part makes sense, as limitTextWidth in textblock.cc seems to matter only if layout->getUsesViewport () returns true, which is not the case for FltkFlatView in the FltkComplexButton case. corvid, Jorge, what do you think?
FWIW, WRT complexity, if you resize the window with the patch, over the testcase, it is quite clear that the last phrase is not measured right.
Yes, there is an issue, but I don't think it's related to the ComplexButton stuff. <table> <tr> <td> <hr/> <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> </div> </td> </table> looks similarily weird here, or am I missing something? Cheers, Johannes
On Mon, Sep 05, 2011 at 09:39:57PM +0200, Johannes Hofmann wrote:
On Mon, Sep 05, 2011 at 12:41:55PM -0300, Jorge Arellano Cid wrote:
On Mon, Sep 05, 2011 at 12:11:24AM +0200, Johannes Hofmann wrote:
[...] I don't know this part of the code well enough to say whether it is safe to commit before the release or not.
Actually I would suggest to commit attached patch. I have to admit that I'm not 100% sure about the ui.cc change, but it seems better than just always passing true or false.
AFAIS, it looks more correct.
The form.cc part makes sense, as limitTextWidth in textblock.cc seems to matter only if layout->getUsesViewport () returns true, which is not the case for FltkFlatView in the FltkComplexButton case.
corvid, Jorge, what do you think?
It works in the testcases (even outside forms), so I'd commit an release with it.
FWIW, WRT complexity, if you resize the window with the patch, over the testcase, it is quite clear that the last phrase is not measured right.
Yes, there is an issue, but I don't think it's related to the ComplexButton stuff.
Sure, it's related to whitespace handling in the textblock, which needs a full review.
<table> <tr> <td> <hr/> <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> </div> </td> </table>
looks similarily weird here, or am I missing something?
I'm using an even simpler testcase: <table> <tr> <td> 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> </td> </table> BTW, with regard to the patch, I'd keep the comment in the code, something like:
+ /* BUG: should be "Textblock (prefs.limit_text_width);", - * It caused 100% CPU usage with <button> or <input type="image"> + * long ago and needs a review before re-enabling it. */ - page = new Textblock (prefs.limit_text_width); + page = new Textblock (false); page->setStyle (html->styleEngine->backgroundStyle ());
-- Cheers Jorge.-
On Tue, Sep 06, 2011 at 10:20:38AM -0300, Jorge Arellano Cid wrote:
On Mon, Sep 05, 2011 at 09:39:57PM +0200, Johannes Hofmann wrote:
On Mon, Sep 05, 2011 at 12:41:55PM -0300, Jorge Arellano Cid wrote:
On Mon, Sep 05, 2011 at 12:11:24AM +0200, Johannes Hofmann wrote:
[...] I don't know this part of the code well enough to say whether it is safe to commit before the release or not.
Actually I would suggest to commit attached patch. I have to admit that I'm not 100% sure about the ui.cc change, but it seems better than just always passing true or false.
AFAIS, it looks more correct.
The form.cc part makes sense, as limitTextWidth in textblock.cc seems to matter only if layout->getUsesViewport () returns true, which is not the case for FltkFlatView in the FltkComplexButton case.
corvid, Jorge, what do you think?
It works in the testcases (even outside forms), so I'd commit an release with it.
FWIW, WRT complexity, if you resize the window with the patch, over the testcase, it is quite clear that the last phrase is not measured right.
Yes, there is an issue, but I don't think it's related to the ComplexButton stuff.
Sure, it's related to whitespace handling in the textblock, which needs a full review.
<table> <tr> <td> <hr/> <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> </div> </td> </table>
looks similarily weird here, or am I missing something?
I'm using an even simpler testcase:
<table> <tr> <td> 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> </td> </table>
BTW, with regard to the patch, I'd keep the comment in the code, something like:
+ /* BUG: should be "Textblock (prefs.limit_text_width);", - * It caused 100% CPU usage with <button> or <input type="image"> + * long ago and needs a review before re-enabling it. */ - page = new Textblock (prefs.limit_text_width); + page = new Textblock (false); page->setStyle (html->styleEngine->backgroundStyle ());
Committed with slightly different wording in the comment, as I don't think using prefs.limit_text_width is correct in this case. Cheers, Johannes
On Sun, Sep 04, 2011 at 09:00:27PM +0200, Johannes Hofmann wrote:
Thanks for the cleaned up test case. It's still remarkably complex. I see the issue also with dillo-2.1.1. Nevertheless we should definately try to fix it. I will play with it a bit...
After a short review, it looks non-trivial to me. It involves white space handling, which has a design review pending, and also there's this comment in textblock.cc: /* NOTE: Most code relies on that all values of nowrap are equal for all * words within one line. */ And effectively, the 'nowrap' value is taken from the first word of the line: ws = words->getRef(line->firstWord)->style->whiteSpace; nowrap = ws == core::style::WHITE_SPACE_PRE || ws == core::style::WHITE_SPACE_NOWRAP; Given this is a design issue from long ago (dillo-2.2.1 also has it), and all the testing/debugging such a change requires, I'm for leaving this task for the next release. -- Cheers Jorge.-
participants (3)
-
corvid@lavabit.com
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de