IndexedDB: Bind lifetime of in-memory backing stores to IDBFactory backend
https://bugs.webkit.org/show_bug.cgi?id=110820

Reviewed by Tony Chang.

Source/WebCore:

Backing stores are dropped as soon as all connections are closed. That makes sense for
disk-backed stores to free up memory (although there's a performance trade-off...). But
for memory-backed stores, the expected lifetime should match the lifetime of the factory
so that an open/write/close/re-open/read yields the written data.

Test: Chromium's webkit_unit_tests, IDBFactoryBackendTest.MemoryBackingStoreLifetime

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::IDBBackingStore): Pass comparator into constructor since it was always
assigned immediately afterwards anyway.
(WebCore::IDBBackingStore::open): Split into three parts - open() which is disk-backed...
(WebCore::IDBBackingStore::openInMemory): ...explit in-memory creation (previously: specified by empty path)
(WebCore::IDBBackingStore::create): ... and the common logic which calls the constructor.
* Modules/indexeddb/IDBBackingStore.h: Headers for the above.
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::openBackingStore): Add in-memory backing stores to dependent set.
* Modules/indexeddb/IDBFactoryBackendImpl.h: Add member to track dependent backing stores.

Source/WebKit/chromium:

* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp): Use openInMemory rather than empty path.
(WebCore::TEST): Added IDBFactoryBackendTest.MemoryBackingStoreLifetime to verify refs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplified bytecode generation by unforking "condition context" codegen
https://bugs.webkit.org/show_bug.cgi?id=113554

Reviewed by Mark Hahnenberg.

Now, a node that establishes a condition context can always ask its child
nodes to generate into that context.

This has a few advantages:

(*) Removes a bunch of code;

(*) Optimizes a few missed cases like "if (!(x < 2))", "if (!!x)", and
"if (!x || !y)";

(*) Paves the way to removing more opcodes.

* bytecode/Opcode.h:
(JSC): Separated out the branching opcodes for clarity.
* bytecompiler/NodesCodegen.cpp:
(JSC::ExpressionNode::emitBytecodeInConditionContext): All expressions
can be emitted in a condition context now -- the default behavior is
to branch based on the expression's value.

(JSC::LogicalNotNode::emitBytecodeInConditionContext):
(JSC::LogicalOpNode::emitBytecodeInConditionContext):
(JSC::ConditionalNode::emitBytecode):
(JSC::IfNode::emitBytecode):
(JSC::IfElseNode::emitBytecode):
(JSC::DoWhileNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
* parser/Nodes.h:
(JSC::ExpressionNode::isSubtract):
(ExpressionNode):
(LogicalNotNode):
(LogicalOpNode): Removed lots of code for handling expressions
that couldn't generate into a condition context because all expressions
can now.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow multiple searchKeys to be passed to AXUIElementCopyParameterizedAttributeValue
https://bugs.webkit.org/show_bug.cgi?id=112276

Patch by Greg Hughes <ghughes@apple.com> on 2013-03-29
Reviewed by Chris Fleizach.

Source/WebCore:

Added support for accessibility search predicates to accept multiple search keys. The search will return the first item that matches any one of the provided search keys.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilitySearchCriteria):
(WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
(AccessibilityObject):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

Tools:

Added support to test accessibility search predicates with multiple keys.

* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementForSearchPredicateCallback):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):

LayoutTests:

Updated the search predicate test to test passing multiple search keys (link OR heading).

* platform/mac/accessibility/search-predicate-expected.txt:
* platform/mac/accessibility/search-predicate.html:

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