Reduce the number of treeScope queries when matching rules.
https://bugs.webkit.org/show_bug.cgi?id=96315

Reviewed by Eric Seidel.

In the worst case, treeScope() requires a HashMap lookup, which could be slow. Since the value is always the same for the element,
we can just ask for it once.

No new tests, no change in behavior.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList): Moved the call to treeScope out of the loop.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed; rolling out r128081.
http://trac.webkit.org/changeset/128081
https://bugs.webkit.org/show_bug.cgi?id=96134

New test http/tests/media/video-donottrack.html fails to run on Apple test bots.

Source/WebCore:

* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* loader/FrameLoaderClient.h:
* platform/graphics/MediaPlayer.h:
(MediaPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebDelegateImplementationCaching.h:
(WebFrameLoadDelegateImplementationCache):
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebView.mm:
(-[WebView _cacheFrameLoadDelegateImplementations]):

Source/WebKit2:

* Shared/APIClientTraits.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient):
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::TestRunner):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
(InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

* http/tests/media/resources/video-donottrack-check-donottrack.php: Removed.
* http/tests/media/video-donottrack-expected.txt: Removed.
* http/tests/media/video-donottrack.html: Removed.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename box-sizing applying methods to be more clear about just applying box-sizing.
https://bugs.webkit.org/show_bug.cgi?id=96319

Reviewed by Tony Chang.

This is strictly a rename. No logic or web-exposed changes.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeLogicalClientHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computePreferredLogicalWidths):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::computePreferredLogicalWidths):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Remove unnecessary codepaths in SMILTimeContainer::updateAnimations
https://bugs.webkit.org/show_bug.cgi?id=96224

Reviewed by Nikolas Zimmermann.

This change removes two sources of unnecessary code in
SMILTimeContainer::updateAnimations:
    1) After r117711 we now accumulate the result of multiple
       animations into the first _contributing_ animation
       element. As a result it is no longer necessary to
       track both which elements are contributing AND which elements
       we are storing results into. Both cases are now handled
       together with resultsElements.

    2) r32044 added a second sort of the animation elements
       in order to process animateTransform last. This change
       was added 4 years ago, before we correctly handled <use>
       and the instance tree, and I think the extra sort is no
       longer necessary. A test has been added to ensure this
       is the case.

This change also does a minor cleanup of resultsElements. Previously,
we added animation elements to resultsElements and then removed them
if the animation element did not contribute. After this change, we
only add to resultsElements (no more add-then-remove).

Test: svg/animations/use-animate-transform-and-position.html

* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::sortByPriority):
(WebCore::SMILTimeContainer::updateAnimations):

LayoutTests: Remove unnecessary work in SMILTimeContainer::updateAnimations
https://bugs.webkit.org/show_bug.cgi?id=96224

Reviewed by Nikolas Zimmermann.

This change should have no functional differences but a test
is being added to show that. SMILTimeContainer::updateAnimations
contained a comment explaining why a animateTransform needed to be
processed last but that is no longer the case (as the test shows).

* svg/animations/script-tests/use-animate-transform-and-position.js: Added.
(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):
* svg/animations/use-animate-transform-and-position-expected.txt: Added.
* svg/animations/use-animate-transform-and-position.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r127837.
http://trac.webkit.org/changeset/127837
https://bugs.webkit.org/show_bug.cgi?id=93898

Broke ScrollingCoordinator on chromium

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
(WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
(WebCore::ScrollingTreeNode::update):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
(ScrollingTreeNode):
* page/scrolling/ScrollingTreeState.cpp:
(WebCore::ScrollingTreeState::ScrollingTreeState):
(WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingTreeState.h:
(WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread):
(ScrollingTreeState):
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/mac/ScrollingTreeMac.mm:
(WebCore::ScrollingTree::updateDebugRootLayer):
* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore::ScrollingTreeNodeMac::update):
(WebCore::ScrollingTreeNodeMac::scrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):

Source/WebKit2:

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium, android] Reloading a page with a different user agent can cause the page to be zoomed in
https://bugs.webkit.org/show_bug.cgi?id=90222

Patch by Dan Alcantara <dfalcantara@chromium.org> on 2012-09-10
Reviewed by Adam Barth.

When reloading a page with an overridden URL, the page's scroll and zoom
state will be restored once the reload is complete.  This is problematic
in situations when switching between mobile and desktop versions of the
same site because it will zoom back in on a random part of alternate page.
This CL just avoids that situation by resetting the zoom and scale whenever
this type of reload occurs.

Chromium half: https://chromiumcodereview.appspot.com/10889019

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::resetScrollAndScaleState):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=96158
Need API to suppress scrollbar animations
-and corresponding-
<rdar://problem/12210972>

Reviewed by Sam Weinig.

Source/WebCore: 

This patch re-names ScrollableAre::isOnActivePage() to 
ScrollableArea::scrollbarsCanBeActive(). The new name better reflects 
how the function is actually used, and it allows us to use the same 
function for the new API that has been added to WebKit2. Now when a 
client has used that API to indicate that scrollbars should be 
suppressed, ScrollableArea::scrollbarsCanBeActive() will return 
false.

Page has a new member variable which indicated whether scrollbar 
animations for all scrollbars associated with that page should be 
suppressed. Whenever it is set to true (meaning the animations 
should be suppressed), Page iterates through all of the 
ScrollableAreas to tell each one to finishCurrentScrollAnimations().
* WebCore.exp.in:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore):
* page/Page.h:
(WebCore::Page::shouldSuppressScrollbarAnimations):
(Page):

FrameView::isOnActivePage() is renamed to scrollbarsCanBeActive () 
and it will now return false if the Page says that scrollbar 
animations should be suppressed. 
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarsCanBeActive):

scrollbarsCanBeActive() must now be a public member of FrameView so  
that it can be called from RenderLayer and RenderListBox.
* page/FrameView.h:
(FrameView):

New ScrollAnimator function calls hideOverlayScrollers.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::finishCurrentScrollAnimations):
(ScrollAnimator):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::finishCurrentScrollAnimations):
(WebCore):
* platform/ScrollableArea.h:
(ScrollableArea):
* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):

Re-name. isOnActivePage() -> scrollbarsCanBeActive()
(WebCore::FrameView::setAnimatorsAreActive):
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
(WebCore):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
* rendering/RenderLayer.cpp:

RenderLayer and RenderListBox should call into FrameView's 
scrollbarsCanBeActive() so that they also return false when Page:: 
shouldSuppressScrollbarAnimations() is true.
(WebCore::RenderLayer::scrollbarsCanBeActive):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollbarsCanBeActive):
* rendering/RenderListBox.h:

This is the one caller of ScrollableArea:: scrollbarsCanBeActive() 
that needs to distinguish between the scrollbar-suppressing scenario 
and the in-the-page-cache scenario.
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):

Source/WebKit/chromium: 

ScrollableArea::isOnActivePage() has been re-named to
ScrollableArea:: scrollbarsCanBeActive().
* src/ScrollbarGroup.cpp:
(WebKit::ScrollbarGroup::scrollbarsCanBeActive):
* src/ScrollbarGroup.h:
* tests/GraphicsLayerChromiumTest.cpp:
* tests/ScrollAnimatorNoneTest.cpp:
(MockScrollableArea):

Source/WebKit/win: 

ScrollableArea::isOnActivePage() has been re-named to
ScrollableArea:: scrollbarsCanBeActive().
* WebScrollBar.cpp:
(WebScrollBar::scrollbarsCanBeActive):
* WebScrollBar.h:
(WebScrollBar):

Source/WebKit2: 

Add suppressScrollbarAnimations as a WebCreationParameter.
* Shared/WebPageCreationParameters.h:
(WebPageCreationParameters):

New API. Calls into the web process for the setter but not the 
getter.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetSuppressScrollbarAnimations):
(WKPageAreScrollbarAnimationsSuppressed):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSuppressScrollbarAnimations):
(WebKit):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
(WebKit::WebPageProxy::areScrollbarAnimationsSuppressed):
* WebProcess/WebPage/WebPage.messages.in:

Call into WebCore.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSuppressScrollbarAnimations):
(WebKit):
* WebProcess/WebPage/WebPage.h:
(WebPage):

This ScrollableArea area function is re-named by this patch in 
WebCore.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::scrollbarsCanBeActive):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] createFunctionOnlyCallback should be in V8Callback.h with the other callback functions
https://bugs.webkit.org/show_bug.cgi?id=96336

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

Moving this function to V8Callback.h also lets us delete
setTypeMismatchException because we no longer have a header inclusion
cycle.

* bindings/v8/V8Callback.h:
(WebCore::createFunctionOnlyCallback):
(WebCore):
* bindings/v8/V8Utilities.cpp:
* bindings/v8/V8Utilities.h:
(WebCore):
* bindings/v8/custom/V8GeolocationCustom.cpp:
* bindings/v8/custom/V8NotificationCustom.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: IDBFactory.deleteDatabase() is slow
https://bugs.webkit.org/show_bug.cgi?id=96036

Reviewed by Tony Chang.

The deleteDatabase() operation is implemented by creating a LevelDBTansaction to accumulate
the records to delete, then committing it. The transaction is a tree of key/operation pairs.
As each (key, delete) entry is added to the tree compares need to be made, potentially
requiring full key decodes. Since this temporary transaction is never read from, this is
overkill.

Add a new "write only" transaction type that simply wraps a write batch, which provides
transaction integrity but avoids the insertion overhead and has a minimal interface.

No new tests - no functional changes, only perf improvement.

* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::deleteDatabase): Use new write-only transaction type.
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBWriteOnlyTransaction::create):
(WebCore):
(WebCore::LevelDBWriteOnlyTransaction::LevelDBWriteOnlyTransaction):
(WebCore::LevelDBWriteOnlyTransaction::~LevelDBWriteOnlyTransaction):
(WebCore::LevelDBWriteOnlyTransaction::remove):
(WebCore::LevelDBWriteOnlyTransaction::commit):
* platform/leveldb/LevelDBTransaction.h:
(WebCore):
(LevelDBWriteOnlyTransaction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Fix trace event macro naming issue
https://bugs.webkit.org/show_bug.cgi?id=96337

Patch by John Bates <jbates@google.com> on 2012-09-10
Reviewed by James Robinson.

* platform/chromium/TraceEvent.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] We don't us the global handle map for anything useful---let's remove it
https://bugs.webkit.org/show_bug.cgi?id=96343

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

The global handle map was a dream of tracking all the persistent V8
handles in WebCore. Unfortunately, it has never been complete, and I'm
not aware of us using it for anything. This patch removes what little
is left of it.

* bindings/v8/NPV8Object.cpp:
(WebCore::freeV8NPObject):
(WebCore::npCreateV8ScriptObject):
* bindings/v8/V8GCController.cpp:
(WebCore):
(WebCore::V8GCController::gcEpilogue):
(WebCore::V8GCController::collectGarbage):
* bindings/v8/V8GCController.h:
(V8GCController):
* bindings/v8/V8PerIsolateData.h:
(WebCore):
(V8PerIsolateData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Code assumes that getScriptExecutionContext can return 0
https://bugs.webkit.org/show_bug.cgi?id=96340

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Eric Seidel.

This function can never return 0 (as long as V8 is on the stack).
There's no reason to try to handle a 0 return as an error.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateCallWith):
(GenerateConstructorCallback):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
(WebCore::V8TestInterface::constructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
* bindings/v8/custom/V8MessageChannelConstructor.cpp:
(WebCore::V8MessageChannel::constructorCallback):
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCallback):
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
(WebCore::V8SQLTransaction::executeSqlCallback):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::openCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Properly expose <legend> elements to ATs
https://bugs.webkit.org/show_bug.cgi?id=84137

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-09-10
Reviewed by Chris Fleizach.

Created a new WebCore Accessibility Role, LegendRole. Used it to map to
the expected platform role, ATK_ROLE_LABEL. Also established the needed
AtkRelation pair, label-for/labelled-by between the legend and fieldset.

Source/WebCore:

No new test needed - Existing legend.html test is now unskipped for Gtk.

* accessibility/AccessibilityObject.h: Added LegendRole
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Map legendTag to LegendRole
* accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetName): Fieldset accessible should take its name from the associated LegendRole/label
(setAtkRelationSetFromCoreObject): Set label-for/labelled-by AtkRelation pair between fieldset and legend
(atkRole): Map LegendRole to ATK_ROLE_LABEL
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(createAccessibilityRoleMap):  Map LegendRole to NSAccessibilityGroupRole

Source/WebKit/chromium:

* public/WebAccessibilityRole.h: added WebAccessibilityRoleLegend
* src/AssertMatchingEnums.cpp: added the assert matching rule for
WebAccessibilityRoleLegend and LegendRole

Tools:

* DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
(roleToString): added "Legend" string for WebAccessibilityRoleLegend

LayoutTests:

* accessibility/legend.html: Modified the test to be more platform-agnostic.
* platform/gtk/TestExpectations: Removed legend.html from the skipped list.
* platform/gtk/accessibility/legend-expected.txt: Added.
* platform/mac/accessibility/legend-expected.txt: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added large allocation support to MarkedSpace
https://bugs.webkit.org/show_bug.cgi?id=96214

Originally reviewed by Oliver Hunt, then I added a design revision by
suggested by Phil Pizlo.

I expanded the imprecise size classes to cover up to 32KB, then added
an mmap-based allocator for everything bigger. There's a lot of tuning
we could do in these size classes, but currently they're almost
completely unused, so I haven't done any tuning.

Subtle point: the large allocator is a degenerate case of our free list
logic. Its list only ever contains zero or one items.

* heap/Heap.h:
(JSC::Heap::allocateStructure): Pipe in size information.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper): Handle the case where we
find a free item in the sweep list but the item isn't big enough. This
can happen in the large allocator because it mixes sizes.

(JSC::MarkedAllocator::tryAllocate):
(JSC::MarkedAllocator::allocateSlowCase): More piping.

(JSC::MarkedAllocator::allocateBlock): Handle the oversize case.

(JSC::MarkedAllocator::addBlock): I moved the call to didAddBlock here
because it made more sense.

* heap/MarkedAllocator.h:
(MarkedAllocator):
(JSC::MarkedAllocator::allocate):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::canonicalizeCellLivenessData):
(JSC::MarkedSpace::isPagedOut):
(JSC::MarkedSpace::freeBlock):
* heap/MarkedSpace.h:
(MarkedSpace):
(JSC::MarkedSpace::allocatorFor):
(JSC::MarkedSpace::destructorAllocatorFor):
(JSC::MarkedSpace::allocateWithoutDestructor):
(JSC::MarkedSpace::allocateWithDestructor):
(JSC::MarkedSpace::allocateStructure):
(JSC::MarkedSpace::forEachBlock):
* runtime/Structure.h:
(JSC::Structure): More piping.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] add a way to overscroll non-overflown content
https://bugs.webkit.org/show_bug.cgi?id=96331
[UxD] Vertical lists should always be scrollable
PR #195305

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>
Internally reviewed by Gen Mak.

Check if the RenderLayer is composited / hardware acceleratable prior to
check if its contents overflows. If that is the case, check if
our custom data-blackberry-force-overscroll is present.

That makes it possible for us to align to UX requirements: settings
and CCM panels should be always scrollable.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::canScrollRenderBox):
* WebKitSupport/InRegionScrollableArea.cpp:
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Remove duplicated file in CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=96346

Reviewed by Benjamin Poulain.

* CMakeLists.txt: Remove duplicated files.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use an API symbol instead of a hardcoded string for the TIFF uniform type identifier.

Reviewed by Mark Rowe.

* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::getTIFFRepresentation): Replaced CFSTR("public.tiff") with kUTTypeTIFF.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTestBase.cpp.
https://bugs.webkit.org/show_bug.cgi?id=95990

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-09-10
Reviewed by Gyuyoung Kim.

Fix build warning about extended initializer lists only available with
-std=c++0x or -std=gnu++0x.

* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::ewk2UnitTestBrowserViewSmartClass):
(EWK2UnitTest):
(EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove m_classInfo from JSCell
https://bugs.webkit.org/show_bug.cgi?id=96311

Reviewed by Oliver Hunt.

Now that no one is using the ClassInfo in JSCell, we can remove it for the greater good. This is a 1.5% win on v8v7 and
a 1.7% win on kraken, and is an overall performance progression.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Had to rearrange the order of when we take things off the free list
and when we store the Structure in the object because we would clobber the free list otherwise. This made it not okay for
the structure argument and the scratch register to alias one another. Also removed the store of the ClassInfo pointer in the
object. Yay!
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp: Since it's no longer okay for for the scratch register and structure register to alias
one another as stated above, had to add an extra temporary for passing the Structure.
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp: Ditto.
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject): Similar changes to DFG's inline allocation except that it removed the object from
the free list first, so no changes were necessary there.
* llint/LowLevelInterpreter.asm: Change the constants for amount of inline storage to match PropertyOffset.h and remove
the store of the ClassInfo pointer during inline allocation.
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSCell.h: Remove the m_classInfo field and associated methods.
(JSCell):
* runtime/JSObject.h:
(JSObject):
* runtime/PropertyOffset.h: Expand the number of inline storage properties to take up the extra space that we're freeing
with the removal of the ClassInfo pointer.
(JSC):
* runtime/Structure.h:
(JSC):
(JSC::JSCell::JSCell):
(JSC::JSCell::finishCreation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename NumberLocalizer to Localizer
https://bugs.webkit.org/show_bug.cgi?id=96350

Reviewed by Kent Tamura.

Renaming NumberLocalizer to Localizer so we can unify our localization methods into this class in the future.

No new tests. No behavior change.

* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::initializeLocalizerData):
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::initializeLocalizerData):
* platform/text/LocaleWin.h:
(LocaleWin):
* platform/text/Localizer.cpp: Renamed from Source/WebCore/platform/text/NumberLocalizer.cpp.
(WebCore):
(WebCore::Localizer::~Localizer):
(WebCore::Localizer::setLocalizerData):
(WebCore::Localizer::convertToLocalizedNumber):
(WebCore::matches):
(WebCore::Localizer::detectSignAndGetDigitRange):
(WebCore::Localizer::matchedDecimalSymbolIndex):
(WebCore::Localizer::convertFromLocalizedNumber):
(WebCore::Localizer::localizedDecimalSeparator):
* platform/text/Localizer.h: Renamed from Source/WebCore/platform/text/NumberLocalizer.h.
(WebCore):
(Localizer):
(WebCore::Localizer::Localizer):
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::initializeLocalizerData):


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