[chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
https://bugs.webkit.org/show_bug.cgi?id=91260

Reviewed by Adrienne Walker.

ASSERT(!clipped) was being triggered after skinny almost-degenerate
quads went through anti-aliasing inflation, and then were being
transformed back from device space to local space. It turns out
this assertion is too aggressive, and we don't yet have an obvious
need to change the behavior on the clipped==true case.

No new tests needed, this patch fixes only comments and debug code.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawRenderPassQuad):
   fixed a comment.

(WebCore::LayerRendererChromium::drawTileQuad):
   fixed a similar comment, removed unnecessary assertion.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, adding a baseline required after unskipping
fast/files/workers/worker-read-blob-async.html in r122612.

* platform/gtk/fast/files: Added.
* platform/gtk/fast/files/workers: Added.
* platform/gtk/fast/files/workers/worker-read-blob-async-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLCollection should use DynamicNodeList's invalidation model
https://bugs.webkit.org/show_bug.cgi?id=90326

Reviewed by Anders Carlsson.

Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
ItemProperties and FormControls are more "traditional" users of the mechanism.

Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.

* dom/Document.cpp:
(WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
invalidated on id or name content attribute changes due to named getters.
(WebCore::Document::unregisterNodeListCache): Ditto.
(WebCore::shouldInvalidateNodeListForType):
(WebCore::Document::shouldInvalidateNodeListCaches):
(WebCore::Document::clearNodeListCaches):
* dom/Document.h:
(WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
(Document):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
or its attributes are changed.
(WebCore):
* dom/DynamicNodeList.h:
(WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
(DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
invalidation types.
(WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
(WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
* dom/Node.cpp:
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
node list caches.
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptTreeScope):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
NodeRareData's.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
as if rooted at document for convenience.
(WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
invalidation on id and name content attribute changes, which is taken care by the special logic in
Document::registerNodeListCache, exclude those two attributes from consideration.
(WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
(WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
(HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
(HTMLCollection):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLOptionsCollection.h:
(HTMLOptionsCollection):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::updateNameCache):
* html/HTMLPropertiesCollection.h:
(WebCore::HTMLPropertiesCollection::invalidateCache):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Re-enable indexeddb in test_shell
https://bugs.webkit.org/show_bug.cgi?id=91161

Reviewed by Tony Chang.

IDB used to be allowed to run if webView->permissionClient() was NULL,
as is the case in test_shell. This was inadvertently changed in
http://wkb.ug/90310.

We still don't have an automated test for this (http://crbug.com/113738)
Tested manually:

* In test_shell:
1) Open an IDB page
2) Verify IDB has permission to open a DB

* In chrome:
1) Open an IDB page
2) Verify IDB has permission to open a DB
3) Revoke IDB permissions in chrome://chrome/settings/content
4) Reload the IDB page
5) Verify IDB doesn't have permission to open a DB

* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::allowIndexedDB):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move layout checking js script into LayoutTest/resources and generalize
https://bugs.webkit.org/show_bug.cgi?id=91268

Reviewed by Ojan Vafai.

flexbox.js contains helper scripts for verifying the size and position of nodes.
I will be writing similar tests for grid, so move the js file into a location
for sharing and generalize the script.

* css3/flexbox/align-absolute-child.html: Change include path and call.
* css3/flexbox/auto-height-dynamic.html:
* css3/flexbox/columns-auto-size.html:
* css3/flexbox/flex-algorithm-min-max.html:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-column.html:
* css3/flexbox/flex-align-end.html:
* css3/flexbox/flex-align-max.html:
* css3/flexbox/flex-align-percent-height.html:
* css3/flexbox/flex-align-stretch.html:
* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:
* css3/flexbox/flex-flow-auto-margins.html:
* css3/flexbox/flex-flow-border.html:
* css3/flexbox/flex-flow-margins-auto-size.html:
* css3/flexbox/flex-flow-margins.html:
* css3/flexbox/flex-flow-orientations.html:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-flow-padding.html:
* css3/flexbox/flex-flow.html:
* css3/flexbox/flex-item-child-overflow.html:
* css3/flexbox/flex-item-min-size.html:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/flex-no-flex.html:
* css3/flexbox/flexitem.html:
* css3/flexbox/floated-flexbox.html:
* css3/flexbox/line-wrapping.html:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/multiline-align-self.html:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-justify-content.html:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline.html:
* css3/flexbox/nested-stretch.html:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/preferred-widths-orthogonal.html:
* css3/flexbox/preferred-widths.html:
* css3/flexbox/style-change.html:
* css3/flexbox/true-centering.html:
* css3/flexbox/writing-modes.html:
* resources/check-layout.js: Renamed from LayoutTests/css3/flexbox/resources/flexbox.js.
(.): Rename checkFlexboxen to checkLayout that takes a CSS selector. Hide functions in a closure.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Implement GCActivityCallback with platform timer
https://bugs.webkit.org/show_bug.cgi?id=90175

Patch by Yong Li <yoli@rim.com> on 2012-07-13
Reviewed by Rob Buis.

Implement GCActivityCallback and HeapTimer for BlackBerry port.

* heap/HeapTimer.cpp:
(JSC):
(JSC::HeapTimer::HeapTimer):
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::timerDidFire):
(JSC::HeapTimer::synchronize):
(JSC::HeapTimer::invalidate):
(JSC::HeapTimer::didStartVMShutdown):
* heap/HeapTimer.h:
(HeapTimer):
* runtime/GCActivityCallbackBlackBerry.cpp:
(JSC):
(JSC::DefaultGCActivityCallback::doWork):
(JSC::DefaultGCActivityCallback::didAllocate):
(JSC::DefaultGCActivityCallback::willCollect):
(JSC::DefaultGCActivityCallback::cancel):

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