Can MAX_REFLOW_DEPTH be increased?

2016-05-02 Thread Henri Sivonen
In the days of Windows 95, recursive algorithms in layout used to
overrun the call stack on Windows unless the depth of the DOM tree was
limited. The HTML parser still enforces the limit, and people complain
about it from time to time. (Most of the time, the Web pages that hit
the limit are doing something wrong, but that's normal.)

Does layout still use recursive algorithms that require a depth limit?

If the depth limit is still needed, can now be increased?

(The limit is defined at
https://mxr.mozilla.org/mozilla-central/source/layout/generic/nsIFrame.h#16
)

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: ICU proposing to drop support for WinXP (and OS X 10.6)

2016-05-02 Thread Henri Sivonen
On Mon, May 2, 2016 at 2:37 AM, Jim Blandy  wrote:
> What are the distributions of memory and flash sizes for the devices people
> currently run Fennec on? It'll be almost impossible to have a good
> discussion about Fennec size without those numbers. I seem to remember that
> is data we felt was okay to collect.

We should also be data-driven about understanding where the bytes go.
In particular, I think functionality-neutral size reductions should be
done before blocking new functionality from landing. In addition to
unoptimally compressed PNGs, there's unminified JS in Fennec (i.e. the
JS comments are shipped).

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Can we remove nsIEntityConverter?

2016-05-02 Thread Henri Sivonen
On Mon, May 2, 2016 at 9:45 AM, Frédéric Wang  wrote:
> Le 01/05/2016 02:16, smaug a écrit :
>> What would source view for mathml look like if we removed
>> nsIEntityConverter?
>
> AFAIK, the only point is to replace things like "∑" with "∑"
> in order to make it more readable. However, with appropriate fonts
> installed I think reading "∑" is also fine.

Yes, and if someone wants to special-case ⁢ and
⁣, special-casing two characters takes less space than
the entire entity tables.

As for the size question, the data tables take 2336 bytes in omni.ja
plus the zip directory overhead plus the C++ code that enables the use
of these tables.

> Le 30/04/2016 12:25, Henri Sivonen a écrit :
>>  In desktop Firefox, these data tables are used only for the
>> MathML View Source feature.
>
> Personally, I don't really use this feature, as I find the DOM inspector
> or the "MathML Copy" add-on (*) more convenient to check or copy a
> MathML formula.
>
> I guess we can move this feature from the Desktop front-end to a
> separate Add-on (that could potentially work on mobile too in the
> future). However, I can't speak for the users. Maybe we should write to
> the Math WG mailing list in order to get more feedback.
>
> (*) https://addons.mozilla.org/en-US/firefox/addon/mathml-copy/

Even if someone uses the current feature, special handling for
examining MathML seems like something that should be in an extension.

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Can MAX_REFLOW_DEPTH be increased?

2016-05-02 Thread Aryeh Gregor
On Mon, May 2, 2016 at 10:22 AM, Henri Sivonen  wrote:
> If the depth limit is still needed, can now be increased?

What do other UAs do?  This seems like it may as well be standardized,
just so the odd corner-case page breaks the same in all UAs.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Can MAX_REFLOW_DEPTH be increased?

2016-05-02 Thread Henri Sivonen
On Mon, May 2, 2016 at 2:01 PM, Aryeh Gregor  wrote:
> On Mon, May 2, 2016 at 10:22 AM, Henri Sivonen  wrote:
>> If the depth limit is still needed, can now be increased?
>
> What do other UAs do?  This seems like it may as well be standardized,
> just so the odd corner-case page breaks the same in all UAs.

Whenever people complain about this, the pages render "correctly" in
at least Blink and WebKit. I don't recall checking Edge.

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Can MAX_REFLOW_DEPTH be increased?

2016-05-02 Thread Aryeh Gregor
Test-case:






var cur = document.querySelector("script");
var depth = -1;
while (cur) {
  cur = cur.parentNode;
  depth++;
}
document.body.textContent = depth;


Outputs 513 in Chrome.  It looks like any further s are inserted
as siblings instead of children.  The  is processed correctly.

IE11 outputs "1003" but then the tab seems to crash.

We don't execute the script at all.  This doesn't seem desirable even
if we do limit the depth.  A modified test-case for us: