[chromium] Unreviewed gardening. Layout Test storage/indexeddb/constants.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=91133

Has started to crash occassionally on WebKitWin, cause unknown.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Threadsafety issues in WebScriptObject
https://bugs.webkit.org/show_bug.cgi?id=90849

Reviewed by Filip Pizlo & Oliver Hunt.

Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release
may not be safe; better to just guard the JSWrapperCache with its own spinlock.

* bindings/objc/WebScriptObject.mm:
(WebCore::getJSWrapper):
    - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe
      to wait for the caller to do so, due to a race condition vs release removing
      the wrapper from the map.
(WebCore::addJSWrapper):
    - Take the spinlock guarding the cache.
(WebCore::removeJSWrapper):
    - Take the spinlock guarding the cache.
(WebCore::removeJSWrapperIfRetainCountOne):
    - Take the spinlock guarding the cache, remove the wrapper if retainCount is one.
(WebCore::createJSWrapper):
    - Remove the API lock; this method no longer needs to retain/autorelease (this is
      done by getJSWrapper).
(-[WebScriptObject _setImp:originRootObject:rootObject:]):
    - Remove the API lock.
(-[WebScriptObject release]):
    - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] input-in-table-cell-no-value.html fails due to INPUT_TYPE_DATE being disabled.

* platform/mac/TestExpectations: Mark input-in-table-cell-no-value.html
as expected to fail.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium][Mac] r122400 broke 10.6 build
https://bugs.webkit.org/show_bug.cgi?id=91103

Patch by Robert Sesek <rsesek@chromium.org> on 2012-07-12
Reviewed by Tony Chang.

Use the right availability macros for forward-declaring methods and
defining constants.

* src/mac/WebInputEventFactory.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: reimplement manager_worker_broker in a much simpler form
https://bugs.webkit.org/show_bug.cgi?id=90513

Reviewed by Ojan Vafai.

This is a wholesale replacement of the MessagePool() implementation
and the other classes in manager_worker_broker.py. All of the
BrokerConnection*, Broker*, etc. classes are gone, and there are now
just a MessagePool class and a _Worker class. Happiness ensues.

I'm removing manager_worker_broker_unittest.py as well; we get
nearly complete coverage from the integration tests, and will
get more coverage when test-webkitpy moves to use this as well,
so having unit tests seems like unnecessary overhead. (running
coverage numbers with test-webkitpy shows that pretty much the only
uncovered lines are lines that are only run in the child processes,
which coverage doesn't handle at the moment).

* Scripts/webkitpy/layout_tests/controllers/manager_worker_broker.py:
(_MessagePool.__init__):
(_MessagePool.run):
(_MessagePool._start_workers):
(_MessagePool):
(_MessagePool.wait):
(_MessagePool._close):
(_MessagePool._handle_done):
(_MessagePool._can_pickle):
(_MessagePool._loop):
(WorkerException):
(_Message.__init__):
(_Message.__repr__):
(_Worker):
(_Worker.__init__):
(_Worker.terminate):
(_Worker._close):
(_Worker.run):
(_Worker.post):
(_Worker.yield_to_caller):
(_Worker._post):
(_Worker._raise):
(_Worker._set_up_logging):
(_WorkerLogHandler.__init__):
(_WorkerLogHandler.emit):
* Scripts/webkitpy/layout_tests/controllers/manager_worker_broker_unittest.py: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation
https://bugs.webkit.org/show_bug.cgi?id=91046

Reviewed by Anders Carlsson.

Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about
to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via
registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList,
which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given
attribute change should result in node list invalidations.

Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts.

* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes.
* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes.
* dom/Document.cpp:
(WebCore::Document::Document): Initialize m_nodeListCounts.
(WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and
m_collections are all empty.
(WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed
to just ones rooted at the document in order to increment the counter for each invalidation type.
(WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto.
(WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType.
(WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation
type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change),
then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of
"if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead
to share logic and detect future addition of values to NodeListInvalidationType.
* dom/Document.h:
(Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and
NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type
now contains 6 values instead of 2.
* dom/DynamicNodeList.cpp:
(WebCore):
* dom/DynamicNodeList.h:
(WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): 
(WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
(WebCore::DynamicNodeListCacheBase::rootType): Added.
(WebCore::DynamicNodeListCacheBase::invalidationType): Added.
(DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6.
(WebCore::DynamicNodeList::DynamicNodeList):
(WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList.
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList.
* dom/MicroDataItemList.cpp:
(WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes.
* dom/Node.cpp:
(WebCore::Node::clearRareData):
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call
to shouldInvalidateDynamicSubtreeNodeList.
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList.
(WebCore::Node::getElementsByTagName):
(WebCore::Node::getElementsByTagNameNS):
(WebCore::Node::getElementsByName):
(WebCore::Node::getElementsByClassName):
(WebCore::Node::radioNodeList):
(WebCore::NodeRareData::createNodeLists):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists
need to be accounted in m_nodeListCounts.
(WebCore::NodeRareData::ensureNodeLists):
(NodeRareData):
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes.
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed.
* dom/TreeScope.h:
(TreeScope): Removed m_numNodeListCaches.
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
* html/HTMLCollection.h:
(WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since
it's never used in HTMLCollections.
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes.
(WebCore::LabelsNodeList::~LabelsNodeList):
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes.
(WebCore::RadioNodeList::~RadioNodeList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122498 268f45cc-cd09-0410-ab3c-d52691b4dbfc