[webkit-dev] Renaming WebCore/dom/ClassNames

2009-12-07 Thread Nate Chapin
(https://bugs.webkit.org/show_bug.cgi?id=32250 is the relevant bug)

Summary: ClassNames used to be used only for class names, but its behavior
meets the requirements for HTML5's strings of space separated tokens.  If
folks are ok with it, I'd like to rename ClassNames to something more
generic so that it is more appropriate to use it for HTML5 features (the
only current html5-flavored usage I know of is the one I introduced in
HTMLAnchorElementhttp://trac.webkit.org/browser/trunk/WebCore/html/HTMLAnchorElement.cpp?annotate=blamerev=51703#L343
).

I was thinking of renaming it to SpaceSplitString, or AtomicStringList (it's
previous name), but I'm not hung up on any particular name.

Any thoughts or objections?
~Nate
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] a ping landed

2010-10-01 Thread Nate Chapin
This is a few days late, but I just wanted to let the team know that, as of
http://trac.webkit.org/changeset/68166, WebKit can support a
pinghttp://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#hyperlink-auditing(but
support is disabled by default).

The reason I left it disabled by default is that some ports may want to have
a mechanism for disabling pings, and I didn't want anyone to accidentally
pick it up before they were ready.  I'm happy to flip it to enabled by
default if that's what people prefer.

~Nate
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Nate Chapin
The default prioritization is found here:
http://trac.webkit.org/browser/trunk/Source/WebCore/loader/cache/CachedResource.cpp#L51.
There are cases where we override this (e.g., I'm pretty sure we load
favicons at a lower priority than other images)

On Mon, Feb 7, 2011 at 11:44 AM, Adam Barth aba...@webkit.org wrote:

 There is already some amount of code that's involved with prioritizing
 subresource loads.  See

 http://trac.webkit.org/browser/trunk/Source/WebCore/loader/ResourceLoadScheduler.h
 and
 http://trac.webkit.org/browser/trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
 .

 I suspect the prioritization algorithm could be improved.  A good
 first step is to create a benchmark illustrating the performance
 issues and then write patches that optimize the benchmark.  Please
 consider putting your performance test in
 http://trac.webkit.org/browser/trunk/PerformanceTests/ so that it's
 easy for others to work on as well.

 Adam


 On Mon, Feb 7, 2011 at 11:23 AM, Silvio Ventres
 silvio.vent...@gmail.com wrote:
  Hello.
 
  Can someone point where in the source code is the implementation of
  the subresources loading and some documentation regarding its
  implementation - as a queue or just child-threads or async functions?
 
  The reason is that the current subresource loading seems to lack any
  prioritization and it often occurs that some external 1x1 pixel
  tracker or other similarly unimportant page resources block the
  rendering of the page completely, and the user is left starting at
  contacting ads.doubleclick.com with a blank page. This is very
  frustrating as the page render as a whole then depends on the slowest
  part and cannot be possibly done faster by any optimizations in
  hardware or software on the part of the page owner.
 
  Thus, the proposition is this:
  1. Render should only wait for the main HTML/CSS to load from the main
  page domain (a page in tumblr.com domain should wait for html/css
  files from *.tumblr.com, but not from *.doubleclick.com).
  2. Other content load except HTML/CSS should be prioritized as
  follows, with placeholders shown until the load is complete - possibly
  adding one or more extra render passes, but increasing interactivity.
 
  So, basic priorities:
 
  10 = Highest:   HTML/CSS from main domain (
 sites.tumblr.com/some_site.html)
  9: JS/XHR from main domain
  8: HTML/CSS/JS from subdomains in the same domain (
 ads.tumblr.com/ad_serve.js)
 
  7. Reserved for future use
 
  6. IMG/media from main domain (sites.tubmlr.com/header.png)
  5. IMG/media from subdomains in the same domain (
 ads.tubmlr.com/banner1.png)
 
  4. Optional* HTML/CSS/JS (text) from CDNs
  3. Optional* IMG/media from CDNs
 
  2. HTML/CSS/JS from other domains
  (*.doubleclick.com/link_210986cv3.php?refer=2323424)
  1=Lowest. IMG from other domains (*.doublclick.com/images/track_1x1.gif)
 
  *4 and 3 are optional and would need some kind of a whitelist of
  well-known CDN domains.
 
  This prioritization will reduce the latency between the page load
  start and a usable render, so even if some external-domain subresource
  is nonresponsive, interactivity will not suffer.
  Maybe the priorities should be moved to a user-controllable setting,
  where more fine-grained rules can be defined. Otherwise, maybe HTML
  standard can be extended to provide hints to the browser regarding the
  preferred subresource loading order, which should of course be
  user-overridable.
 
  Thank you for reading.
  This might be a big undertaking but the benefit for the user will be
  seen instantly.
 
  --
   silvio
  ___
  webkit-dev mailing list
  webkit-dev@lists.webkit.org
  http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] About WebKit memory cache

2012-03-26 Thread Nate Chapin
On Fri, Mar 23, 2012 at 7:48 PM, gaorock por...@hotmail.com wrote:

  Hi all

 Sometimes I met crashes about memory cache, and I traced them and found a
 bit doubt:

 Should we use
 typedef HashMapString, RefPtrCachedResource CachedResourceMap;
 instead of
 typedef HashMapString, CachedResource* CachedResourceMap;?


CachedResource doesn't support reference counting in the usual model.  It
uses a somewhat confusing set of rules to decide when to delete itself. See
canDelete() in CachedResource.h. Figuring out a way to make CachedResource
use our normal reference counting model is on my list of things to do
someday. :-)



 The following is the call stack, hope it's useful for you:

   WebKit.dll!WebCore::ResourceRequestBase::updateResourceRequest()
  Line447 + 0x37 byte C++
   WebKit.dll!WebCore::ResourceRequestBase::url()  Line123 C++
   WebKit.dll!WebCore::CachedResource::url()  Line106 + 0x19 byte C++
  WebKit.dll!WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type
 type=ImageResource, WebCore::ResourceRequest  request={...}, const
 WTF::String  charset={...}, const WebCore::ResourceLoaderOptions 
 options={...}, WebCore::ResourceLoadPriority priority=-1, bool
 forPreload=false)  Line444 + 0x11 byte C++
   
 WebKit.dll!WebCore::CachedResourceLoader::requestImage(WebCore::ResourceRequest
  request={...})  Line160 + 0x21 byte C++
   WebKit.dll!WebCore::CSSImageValue::cachedImage(WebCore::CachedResourceLoader
 * loader=0x00e6e6d8, const WTF::String  url={...})  Line90 + 0xf byte C++
   WebKit.dll!WebCore::CSSImageValue::cachedImage(WebCore::CachedResourceLoader
 * loader=0x00e6e6d8)  Line79 + 0x19 byte C++
   
 WebKit.dll!WebCore::CSSStyleSelector::loadPendingImage(WebCore::StylePendingImage
 * pendingImage=0x0ada6f30)  Line5306 + 0xc byte C++
   WebKit.dll!WebCore::CSSStyleSelector::loadPendingImages()  Line5331 +
 0x15 byte C++
   WebKit.dll!WebCore::CSSStyleSelector::applyMatchedDeclarations(const
 WebCore::CSSStyleSelector::MatchResult  matchResult={...})  Line2408 C++
   WebKit.dll!WebCore::CSSStyleSelector::styleForElement(WebCore::Element
 * element=0x0ad08088, WebCore::RenderStyle * defaultParent=0x, bool
 allowSharing=true, bool resolveForRootDefault=false)  Line1310 C++
   WebKit.dll!WebCore::Element::styleForRenderer()  Line1035 + 0x24 byte
 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1059 + 0xc byte C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1138 C++
   WebKit.dll!WebCore::Document::recalcStyle(WebCore::Node::StyleChange
 change=NoChange)  Line1574 C++
   WebKit.dll!WebCore::Document::updateStyleIfNeeded()  Line1634 C++
   WebKit.dll!WebCore::Document::updateLayout()  Line1658 + 0x12 byte C++

 In the function of WebCore::ResourceRequestBase::updateResourceRequest(),
 the point this is NOT null, but all of its members are null, so actually
 it had been freed before. So I think the refCount may be helpful to solve
 this problem.

 This is my first time to write to WebKit-dev, it will be appreciated if
 someone could give me some instructions or whether I should file a bug for
 it?


Yes, please file a bug on bugs.webkit.org, and feel free to point me in its
direction.



 Thanks in advance!

 Best Regards
 Rock

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] WebCore's ResourceLoader

2012-04-23 Thread Nate Chapin
You can do a non-cached resource load still, I just haven't figured out
where to document it.  Suggestions welcome :-)

It's possible via CachedRawResource.  When you call
CachedResourceLoader::requestRawResource(), the DataBufferingPolicy in the
ResourceLoaderOptions parameter should be DoNotBufferData.  This will
prevent buffering of the data at both the CachedRawResource and
ResourceLoader levels, and since the CachedRawResource won't have any
useful data, it will also prevent caching.

EventSource use this for its resource loads, albeit indirectly via
DocumentThreadableLoader.

Hope this helps,
~Nate

On Mon, Apr 23, 2012 at 1:05 AM, Boris Brönner borisbroen...@googlemail.com
 wrote:

 Hi everyone,

 I want to use the ResourceLoader (WebCore/loader), but without
 caching. It was possible a while
 ago using SubresourceLoaderClient (removed in revision 100311), but
 now it seems like there are no resources but CachedResources and it is
 not possible to do no caching for certain types of resources. When I
 look at the ImageLoader class (WebCore/loader/ImageLoader.cpp) the
 resource loading is deferred to the document's cachedResourceLoader,
 but the document doesn't seem to have a noncached resource loader.

 Is it, if at all, possible to get access to a non-caching resource loader?

 Up to now I investigated the following:
 o as far as I see, I can't get access to such a thing.
 o Also it is not really possible to disable caching for a certain type
 of resources. That would be I define my own CachedResource and
 overwrite a method that tells do not cache me, this is not possible.
 o I could manually remove the resource after loading from the cache by
 using the global memoryCache() accessor. But the CachedResourceLoader
 operates only on bare resource pointers, so simply removing it from
 the cache is not enough, the resource might be stored somewhere else
 (and in fact it is, the loader already stores a map from URLs to
 loaded resources)
 o I could declare my own resource to have the type
 CachedResource::RawResource. In this case the CachedResourceLoader
 doesn't cache it. I don't like this, since the implementation could
 change and decide to cache RawResources and I would have to keep track
 of this.


 All in all, my conclusion up to now is, I can't really do non-cached
 resource loading without extending WebCore code probably by
 implementing my own ResourceLoader.

 Is this right?

 Thanks in advance!

 Regards,
 bobbel
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev