Re: We live in a memory-constrained world

2014-03-03 Thread Henri Sivonen
On Fri, Feb 28, 2014 at 8:09 PM, L. David Baron wrote: > In other words, whenever you have a pointer in a static data > structure pointing to some other data, that pointer needs to get > fixed up when the library loads, which makes the memory that pointer > is in less likely to be shared across pr

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Wesley Johnston
Android also ships a parser that we wrote for Reader mode: http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/JSDOMParser.js We've talked about extending it to also do phone number/address detection as well, but haven't tried (reader mode doesn't need to modify the origi

Re: Changing how build automation interacts with the tree

2014-03-03 Thread Gregory Szorc
On 3/2/14, 1:46 PM, Axel Hecht wrote: Hi, I've watched you guys thinking for an hour ;-) Some comments from me. Yes to moving build flows that generate assets into the tree. Yes to having a way for developers to reproduce what automation does. Yes to having jobs being executed more on demand t

Re: Blink removing the concept of user styles?

2014-03-03 Thread aeidein
On Sunday, March 2, 2014 10:58:28 AM UTC-8, Asa Dotzler wrote: > How much simpler could our style code be if we followed this path? What > > do the standards and other browser vendors say about this? Horrible > > idea? Great idea? Mixed? > > > > "This is in preparation for simplifying the Bl

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Boris Zbarsky
On 3/3/14 9:07 PM, Boris Zbarsky wrote: document.documentElement.cloneNode(true): ~18ms document.cloneNode(true): ~8ms Oh, and the difference between these two is that in the former clones of elements try to do image loads, which takes about 70% of the cloning time, but in the latter w

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Boris Zbarsky
On 3/3/14 5:38 PM, Robert O'Callahan wrote: Wouldn't a deep clone of the root element be more efficient? Possibly, yes. Of course if you plan to do processing on a worker you then have to serialize parts or all of the clone Anyway, I just did some measurements. On a year+ old laptop, o

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Andrew Sutherland
On 03/03/2014 03:19 PM, Boris Zbarsky wrote: That said, there might be JS implementations of an HTML5 parser out there. The Gaia e-mail app has a streaming HTML parser in its worker-friendly sanitizer at https://github.com/mozilla-b2g/bleach.js/blob/worker-thread-friendly/lib/bleach.js. It's

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Robert O'Callahan
On Tue, Mar 4, 2014 at 9:19 AM, Boris Zbarsky wrote: > How feasible is just doing .innerHTML to do that, then doing some sort of > async parse (e.g. XHR or DOMParser) to get a DOM snapshot? That said, this > would mean that you end up with a snapshot that's actual DOM stuff, on the > main thread

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Felipe G
Hi Axel, yeah, we are planning to cover that case about the changing order of inline elements. See the bottom half of this comment for details: https://bugzilla.mozilla.org/show_bug.cgi?id=971043#c3 For alt text, input label placeholders, and other text content from attributes, I'm planning on bu

Re: Column numbers appended to URLs recently

2014-03-03 Thread Cameron McCormack
Jan Honza Odvarko wrote: Next example: http://example.com:80 Now it isn't clear whether it's a port number or a line number. Could we somehow fix this? "http://example.com/"; is equivalent to "http://example.com"; so you could just ensure that you output a "/" when the path is empty. (http

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Axel Hecht
Hi, translating DOM is a bit funky. Generally, you can probably translate block elements one by one, but you need to persist inline elements. You should mark up the inline elements in the string that you send to the translation engine, such that you can support inline markup changing the ord

MemShrink Meeting - Tuesday, 4 March 2014 at 2:00pm PST

2014-03-03 Thread Jet Villegas
The next MemShrink meeting will be brought to you by images decoded *and* downsampled at the same time: https://bugzilla.mozilla.org/show_bug.cgi?id=854795 The wiki page for this meeting is at: https://wiki.mozilla.org/Performance/MemShrink Agenda: * Prioritize unprioritized MemShrink bugs.

Fwd: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Felipe G
On Mon, Mar 3, 2014 at 5:19 PM, Boris Zbarsky wrote: > On 3/3/14 2:28 PM, Felipe G wrote: > >> A possible solution to that is to only pause the page that is being >> translated (with, >> say, EnterModalState) until we can finish working on it, while letting >> other pages and the UI work normally

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Ehsan Akhgari
On 2014-03-03, 3:19 PM, Boris Zbarsky wrote: Better yet if we can send this copy with a non-copy move to a Worker thread. You could send the string to a worker (if you do this in C++ you won't even need to copy it, afaict), but then on the worker you have to parse the HTML... That said, there

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Ehsan Akhgari
On 2014-03-03, 3:30 PM, Felipe G wrote: During the translation phase, Chrome imports a JS

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Felipe G
During the translation phase, Chrome imports a JS

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Boris Zbarsky
On 3/3/14 2:28 PM, Felipe G wrote: A possible solution to that is to only pause the page that is being translated (with, say, EnterModalState) until we can finish working on it, while letting other pages and the UI work normally. The other pages can still modify the DOM of the page in question

Plugin whitelist

2014-03-03 Thread Benjamin Smedberg
On Friday Chad posted and blogged about our proposed plugin whitelisting policy. https://wiki.mozilla.org/Plugins/Firefox_Whitelist https://blog.mozilla.org/security/2014/02/28/update-on-plugin-activation/ The primary goal of this policy is to give plugin vendors who are working on moving towa

Re: How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Jeff Muizelaar
On Mar 3, 2014, at 2:28 PM, Felipe G wrote: > Hi everyone, I'm working on a feature to offer webpage translation in > Firefox. Translation involves, quite unsurprisingly, a lot of DOM and > strings manipulation. Since DOM access only happens in the main thread, it > brings the question of how to

Re: Column numbers appended to URLs recently

2014-03-03 Thread Fitzgerald, Nick
This was before that bug. See ComputeStackString: http://dxr.mozilla.org/mozilla-central/source/js/src/jsexn.cpp?from=jsexn.cpp#206 The format is: [] @ : : The last : and is what was added in that bug. I guess the port-or-line-number question is unambiguous if there is *always* a line num

How to efficiently walk the DOM tree and its strings

2014-03-03 Thread Felipe G
Hi everyone, I'm working on a feature to offer webpage translation in Firefox. Translation involves, quite unsurprisingly, a lot of DOM and strings manipulation. Since DOM access only happens in the main thread, it brings the question of how to do it properly without causing jank. This is the use

Re: Column numbers appended to URLs recently

2014-03-03 Thread Dave Townsend
I'm guessing this is a result of https://bugzilla.mozilla.org/show_bug.cgi?id=762556 On Mon, Mar 3, 2014 at 11:17 AM, Boris Zbarsky wrote: > On 3/3/14 1:54 PM, Jan Honza Odvarko wrote: > >> An example of the stack trace: >> >> http://example.com/path/file.html:102 >> > > Which exact API is this

Re: Column numbers appended to URLs recently

2014-03-03 Thread Boris Zbarsky
On 3/3/14 1:54 PM, Jan Honza Odvarko wrote: An example of the stack trace: http://example.com/path/file.html:102 Which exact API is this string coming from? We have a number of different APIs here, returning slightly different things. :( -Boris

Column numbers appended to URLs recently

2014-03-03 Thread Jan Honza Odvarko
URLs in stack traces for exception objects have been recently changed. There is a column number appended at the end (I am seeing this in Nightly, but it could be also in Aurora). An example of the stack trace: http://example.com/path/file.html:102 ... means there was an exception at the specif

DOM Bindings Meeting - Monday @ 12:30 PM PST

2014-03-03 Thread Kyle Huey
Our (ostensibly) weekly DOM bindings meetings continue on Monday March 3rd at 12:30 PM PST. Meeting details: * Monday, March 3, 2014, 12:30 PM PST (3:30 PM EST/9:30 PM CET) * Dial-in Info: - Vidyo room: Boris Zbarsky - In office or soft phone: extension 92 - US/INTL: 650-903-0800 or 650-215-12