Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread David Hyatt
I filed https://bugs.webkit.org/show_bug.cgi?id=40800 to track this issue. I think we can take further discussion to the bug. dave (hy...@apple.com) ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Trey Matteson
I have seen sites that make this assumption. Even worked on one. From a website writer's view, the whitespace nodes are usually a pain, but if you add some hacks to skip around them (as ugly as that is), you expect those hacks to keep working. trey On Jun 17, 2010, at 2:19 PM, David Hyatt

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Gustavo Sverzut Barbieri
On Thu, Jun 17, 2010 at 6:34 PM, David Hyatt wrote: > > On Jun 17, 2010, at 4:24 PM, Matt 'Murph' Finnicum wrote: > > On Thu, Jun 17, 2010 at 4:19 PM, David Hyatt wrote: >> >> On Jun 17, 2010, at 2:45 PM, Gustavo Sverzut Barbieri wrote: >> >> > David, it's bit more than annoying, it's fragmenting

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread David Hyatt
On Jun 17, 2010, at 4:24 PM, Matt 'Murph' Finnicum wrote: > On Thu, Jun 17, 2010 at 4:19 PM, David Hyatt wrote: > On Jun 17, 2010, at 2:45 PM, Gustavo Sverzut Barbieri wrote: > > > David, it's bit more than annoying, it's fragmenting memory for no > > good. In the long run on systems will small

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread David Hyatt
On Jun 17, 2010, at 4:07 PM, Eric Seidel wrote: > A does not follow from B in that sentence, that current memory > fragmentation means we need to strip whitespace nodes. > Yeah exactly. Let's see some measurements that show the presence of these nodes are a real problem. > It would also be po

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Gustavo Sverzut Barbieri
On Thu, Jun 17, 2010 at 6:24 PM, Matt 'Murph' Finnicum wrote: > On Thu, Jun 17, 2010 at 4:19 PM, David Hyatt wrote: >> >> On Jun 17, 2010, at 2:45 PM, Gustavo Sverzut Barbieri wrote: >> >> > David, it's bit more than annoying, it's fragmenting memory for no >> > good. In the long run on systems w

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Matt 'Murph' Finnicum
On Thu, Jun 17, 2010 at 4:19 PM, David Hyatt wrote: > On Jun 17, 2010, at 2:45 PM, Gustavo Sverzut Barbieri wrote: > > > David, it's bit more than annoying, it's fragmenting memory for no > > good. In the long run on systems will small memory it does make a > > difference :-/ > > > > I'd like to

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Matt 'Murph' Finnicum
Is there a good way to tell which ones will affect rendering? On Thu, Jun 17, 2010 at 1:51 PM, David Hyatt wrote: > Although it's annoying that these extra whitespace nodes are in the DOM, we > do at least make sure not to create renderers for them most of the time. > > dave > > On Jun 17, 2010,

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread David Hyatt
On Jun 17, 2010, at 2:45 PM, Gustavo Sverzut Barbieri wrote: > David, it's bit more than annoying, it's fragmenting memory for no > good. In the long run on systems will small memory it does make a > difference :-/ > > I'd like to see some option, maybe compile-time, to strip these > useless whit

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Eric Seidel
A does not follow from B in that sentence, that current memory fragmentation means we need to strip whitespace nodes. It would also be possible to create a special shared "\n" text node, and have some sort of Copy On Write behavior. Again, more complexity. Not sure if the complexity would be wor

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Jeremy Orlow
Overall, looks great!! On Wed, Jun 16, 2010 at 6:05 PM, Anders Carlsson wrote: > > Also, PlatformMechanism is a Factory, and should be named accordingly. Or > maybe it's a Source of clients/mechanisms. > > > > Good point, it is a factory. > Is it a factory? If so, I'd expect it to return Pass

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Anders Carlsson
On Jun 17, 2010, at 12:50 PM, Maciej Stachowiak wrote: > > On Jun 17, 2010, at 11:26 AM, Geoffrey Garen wrote: > >>> I propose that we create an abstract class, "PlatformMechanism" which acts >>> as the starting point for accessing such functionality, something like: >>> >>> class PlatformMec

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Gustavo Sverzut Barbieri
On Wed, Jun 16, 2010 at 9:30 PM, Anders Carlsson wrote: > Hi everyone, > > We've now reached the point in WebKit2 development where we need to be able > to override some global calls in WebCore so that we can funnel them through > to another process, in a similar way to what Chromium does. We al

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Geoffrey Garen
> Cracking my Design Patterns book (or at least my memory of it), another idea > that comes up is "Strategy". On IRC, Anders mentioned "Manager" as an alternative to "Strategy". Geoff ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Maciej Stachowiak
On Jun 17, 2010, at 11:26 AM, Geoffrey Garen wrote: >> I propose that we create an abstract class, "PlatformMechanism" which acts >> as the starting point for accessing such functionality, something like: >> >> class PlatformMechanism { >> virtual ClipboardMechanism* clipboardMechanism() = 0;

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Gustavo Sverzut Barbieri
David, it's bit more than annoying, it's fragmenting memory for no good. In the long run on systems will small memory it does make a difference :-/ I'd like to see some option, maybe compile-time, to strip these useless whitespaces. BR, On Thu, Jun 17, 2010 at 3:51 PM, David Hyatt wrote: > Alth

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread David Hyatt
Although it's annoying that these extra whitespace nodes are in the DOM, we do at least make sure not to create renderers for them most of the time. dave On Jun 17, 2010, at 1:37 PM, Alexey Proskuryakov wrote: > > 17.06.2010, в 9:53, Andreas Delmelle написал(а): > >> If WebKit chooses, for ex

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Alexey Proskuryakov
17.06.2010, в 9:53, Andreas Delmelle написал(а): If WebKit chooses, for example, to ignore character events from the parser in nodes where logically it doesn't make sense to have stray characters That would break e.g. Web sites where JS accesses DOM in ways such as node.firstChild.nextS

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Geoffrey Garen
> I propose that we create an abstract class, "PlatformMechanism" which acts as > the starting point for accessing such functionality, something like: > > class PlatformMechanism { > virtual ClipboardMechanism* clipboardMechanism() = 0; > virtual FileAccessMechanism* fileAccessMechanism() = 0;

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Darin Fisher
On Thu, Jun 17, 2010 at 9:47 AM, Anders Carlsson wrote: > > On Jun 16, 2010, at 8:34 PM, Darin Fisher wrote: > > > Hi, this is of course a very interesting topic! > > > > Yes, and I really appreciate your feedback on this! > > > Some comments: > > > > 1- Why do you see the need for these interfac

Re: [webkit-dev] Mouse wheel event precision

2010-06-17 Thread Nathan Vander Wilt
> On Jun 9, 2010, at 3:51 PM, David Hyatt wrote: >> On Jun 9, 2010, at 2:25 AM, Andy Estes wrote: >> >>> >>> On Jun 8, 2010, at 8:34 PM, Nathan Vander Wilt wrote: >>> What Safari 4 seemed to do was simply provide much greater precision, where scrolling half a line simply yielded about

Re: [webkit-dev] Why so many text nodes in the DOM? (especially ones with just whitespace)

2010-06-17 Thread Andreas Delmelle
On 16 Jun 2010, at 23:12, David Hyatt wrote: > On Jun 14, 2010, at 7:00 PM, Matt 'Murph' Finnicum wrote: > >> Why are there so many Text nodes in the DOM? I had a look at the initial DOM >> tree from rendering slashdot, and there are 1959 Text nodes. Of those 1959, >> 1246 were whitespace-only

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Anders Carlsson
On Jun 16, 2010, at 8:34 PM, Darin Fisher wrote: > Hi, this is of course a very interesting topic! > Yes, and I really appreciate your feedback on this! > Some comments: > > 1- Why do you see the need for these interfaces to be virtual? Will there be > multiple implementations? > Some possi

Re: [webkit-dev] A proposal for "Platform Mechanisms"

2010-06-17 Thread Mike Marchywka
> From: da...@apple.com > Date: Wed, 16 Jun 2010 17:55:10 -0700 > To: ander...@apple.com > CC: webkit-dev@lists.webkit.org > Subject: Re: [webkit-dev] A proposal for "Platform Mechanisms" > > Sounds reasonable to me. We already follow pointers and