webkit-patch rebaseline doesn't work for audio/pixel tests
https://bugs.webkit.org/show_bug.cgi?id=90905

Reviewed by Adam Barth.

We just need to pass the correct suffix list to rebaseline-test-internal
and optimize-baselines. By default, pass all suffixes.

* Scripts/webkitpy/tool/commands/rebaseline.py:
(Rebaseline):
(Rebaseline.__init__):
(Rebaseline._suffixes_to_update):
(Rebaseline.execute):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_multiple_builders_and_tests_command_line):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android] Fix typos in chromium_android.py in r151492
https://bugs.webkit.org/show_bug.cgi?id=90904

Reviewed by Ojan Vafai.

* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidPort.setup_test_run):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] IndexedDB: Need test of Typed Arrays
https://bugs.webkit.org/show_bug.cgi?id=81979

Reviewed by Tony Chang.

Verify storage of Typed Arrays (Uint8Array and friends). Checks that
these types are stored and read back with types and data intact. Also
add an index to the object store, so that key paths are evaluated
against each type on every write operation.

* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for min-height:auto and min-width:auto
https://bugs.webkit.org/show_bug.cgi?id=88437

Reviewed by Tony Chang.

Source/WebCore:

Right now auto does the same thing as min-height/min-width:0.
For flex-items it should be the same as min-content (followup patch).
http://dev.w3.org/csswg/css3-flexbox/#min-size-auto

Tests: fast/css/auto-min-size.html
       fast/css/deprecated-flexbox-auto-min-size.html

* WebCore.order:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Return 0px for the computed value of auto.

* css/CSSParser.cpp:
(WebCore::CSSParser::validWidth):
(WebCore):
(WebCore::CSSParser::validHeight):
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
(CSSParser):
Restructure width/height parsing to reduce code duplication and make it easier
to add auto as a valid min value.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustSizeConstraints):
This code was unnecessarily checking intrinsicOrAuto since auto was previously
not an allowed value for minWidth/minHeight.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeightUsing):
(WebCore::RenderBox::computeReplacedLogicalWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
Need to pass a SizeType to all these methods so that we know if the Length
we're working with is a min length since auto has a different meaning now
for min lengths.

* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
(WebCore::RenderFlexibleBox::lineBreakLength):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
* rendering/RenderScrollbarPart.cpp:
(WebCore::calcScrollbarThicknessUsing):
(WebCore::RenderScrollbarPart::computeScrollbarWidth):
(WebCore::RenderScrollbarPart::computeScrollbarHeight):
* rendering/style/RenderStyle.h:
Default minHeight/minWidth to auto instead of 0px.

LayoutTests:

* fast/css/auto-min-size-expected.txt: Added.
* fast/css/auto-min-size.html: Added.
* fast/css/deprecated-flexbox-auto-min-size.html: Added.
* platform/chromium-linux/fast/css/deprecated-flexbox-auto-min-size-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Removing duplicated line from TestExpectations.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLPropertiesCollection should share more code with HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=90842

Reviewed by Anders Carlsson.

Got rid of HTMLPropertiesCollection::m_cache, and added m_itemRefElements, m_propertyNames, m_propertyCache,
m_hasPropertyNameCache, and m_hasItemRefElements to HTMLPropertiesCollection itself. These are caches specific
to HTMLPropertiesCollection. Note that hasNameCache has been renamed to m_hasPropertyNameCache and itemRefElementPosition
has been replaced by cachedElementsArrayOffset() in HTMLCollectionCacheBase (also used in HTMLFormCollection).

Also deleted all methods on m_cache except updatePropertyCache since caches can be accessed directly from
HTMLPropertiesCollection.

* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::invalidateCache):
* html/HTMLCollection.h:
(HTMLCollection):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
(WebCore):
(WebCore::HTMLPropertiesCollection::updateRefElements):
(WebCore::HTMLPropertiesCollection::itemAfter):
(WebCore::HTMLPropertiesCollection::calcLength):
(WebCore::HTMLPropertiesCollection::cacheFirstItem):
(WebCore::HTMLPropertiesCollection::item):
(WebCore::HTMLPropertiesCollection::findProperties):
(WebCore::HTMLPropertiesCollection::updateNameCache):
(WebCore::HTMLPropertiesCollection::names):
(WebCore::HTMLPropertiesCollection::namedItem):
(WebCore::HTMLPropertiesCollection::hasNamedItem):
* html/HTMLPropertiesCollection.h:
(HTMLPropertiesCollection):
(WebCore::HTMLPropertiesCollection::clearCache):
(WebCore::HTMLPropertiesCollection::updatePropertyCache):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix. Removing unused variable from http://trac.webkit.org/changeset/122264.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeContentLogicalHeightUsing):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a potential bug of BitmapImage::frameCount().
https://bugs.webkit.org/show_bug.cgi?id=90756

Patch by Huang Dongsung <luxtella@company100.net> on 2012-07-10
Reviewed by Simon Fraser.

If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This
does not mean that the frame count is actually 0. So we must set
m_haveFrameCount to true only when m_frameCount is not 0.

The current code is okay because BitmapImage::frameCount() is never called
before the decoder is initialized. However, this no longer holds true once we
introduce parallel image decoders.

No new tests, no behavior change.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameCount):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Add Vibration API support for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=90058

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-07-10
Reviewed by Anders Carlsson.

Add support for Vibration API to WebKit2.

* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Platform/CoreIPC/MessageID.h:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Target.pri:
* UIProcess/API/C/WKAPICast.h:
(WebKit):
* UIProcess/API/C/WKVibration.cpp: Added.
(WKVibrationGetTypeID):
(WKVibrationSetProvider):
* UIProcess/API/C/WKVibration.h: Added.
* UIProcess/WebVibrationProvider.cpp: Added.
(WebKit):
(WebKit::WebVibrationProvider::vibrate):
(WebKit::WebVibrationProvider::cancelVibration):
* UIProcess/WebVibrationProvider.h: Added.
(WebKit):
(WebVibrationProvider):
* UIProcess/WebVibrationProxy.cpp: Added.
(WebKit):
(WebKit::WebVibrationProxy::create):
(WebKit::WebVibrationProxy::WebVibrationProxy):
(WebKit::WebVibrationProxy::~WebVibrationProxy):
(WebKit::WebVibrationProxy::invalidate):
(WebKit::WebVibrationProxy::initializeProvider):
(WebKit::WebVibrationProxy::didReceiveMessage):
(WebKit::WebVibrationProxy::vibrate):
(WebKit::WebVibrationProxy::cancelVibration):
* UIProcess/WebVibrationProxy.h: Added.
(CoreIPC):
(WebKit):
(WebVibrationProxy):
(WebKit::WebVibrationProxy::clearContext):
(WebKit::WebVibrationProxy::type):
* UIProcess/WebVibrationProxy.messages.in: Added.
* WebProcess/WebCoreSupport/WebVibrationClient.cpp: Added.
(WebKit):
(WebKit::WebVibrationClient::vibrate):
(WebKit::WebVibrationClient::cancelVibration):
(WebKit::WebVibrationClient::vibrationDestroyed):
* WebProcess/WebCoreSupport/WebVibrationClient.h: Added.
(WebKit):
(WebVibrationClient):
(WebKit::WebVibrationClient::WebVibrationClient):
(WebKit::WebVibrationClient::~WebVibrationClient):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r109610): Order of values in shorthand animation makes a difference
https://bugs.webkit.org/show_bug.cgi?id=84533
<rdar://problem/11831924>
<rdar://problem/11815787>

Reviewed by Simon Fraser.

Source/WebCore:

A previous revision (r109610) updated the parsing of the animation shorthand
to make sure that animation-name wouldn't clobber other styles. The side effect
of this was that we'd no longer find animation-name if it wasn't first in the
list. This commit reverts the change and fixes it in a different way, by always
parsing animation-name as the last property in the shorthand. This means that
keywords for timing functions, fill modes and iteration will match before
animation name. In other words, if you want an animation called "forwards"
you should use the longhand property, because the shorthand will first match
that against animation-fill-mode.

Test: animations/animation-shorthand-name-order.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseAnimationShorthand): make a new array of longhand
properties to check for, with name as the last entry rather than the first.
Use this array to test the properties in the shorthand.

LayoutTests:

A new test that exercises many different variants of the animation shorthand
property, putting the animation name in different spots in the list of values.

* animations/animation-shorthand-name-order-expected.txt: Added.
* animations/animation-shorthand-name-order.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Replace use of ManagedTexture with CCScopedTexture for impl thread and remove implTextureManager from LayerRendererChromium
https://bugs.webkit.org/show_bug.cgi?id=90841

Reviewed by Adrienne Walker.

Source/WebCore:

Remove the TextureManager from LayerRendererChromium, which was the last
instance of the class in the compositor. Instead of using ManagedTexture
objects for RenderPass textures, use instances of CCScopedTexture, which
manage the lifetime of the allocated texture ids. TextureManager will be
removed entirely once all callers of memoryUseBytes() have been removed.

No new tests. No change in behaviour.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::releaseRenderPassTextures):
(WebCore):
(WebCore::LayerRendererChromium::renderPassTextureSize):
(WebCore::LayerRendererChromium::renderPassTextureFormat):
(WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
(WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
(WebCore::LayerRendererChromium::drawQuad):
(WebCore::applyFilters):
(WebCore::LayerRendererChromium::drawBackgroundFilters):
(WebCore::LayerRendererChromium::drawRenderPassQuad):
(WebCore::LayerRendererChromium::drawHeadsUpDisplay):
(WebCore::LayerRendererChromium::getFramebufferTexture):
(WebCore::LayerRendererChromium::isCurrentRenderPass):
(WebCore::LayerRendererChromium::useRenderPass):
(WebCore::LayerRendererChromium::useScopedTexture):
(WebCore::LayerRendererChromium::bindFramebufferToTexture):
(WebCore::LayerRendererChromium::initializeSharedObjects):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore):
(LayerRendererChromium):
* platform/graphics/chromium/TrackingTextureAllocator.cpp:
(WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
(WebCore::TrackingTextureAllocator::createTexture):
* platform/graphics/chromium/TrackingTextureAllocator.h:
(WebCore::TrackingTextureAllocator::create):
(TrackingTextureAllocator):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
(WebCore):
(CCHeadsUpDisplay):
* platform/graphics/chromium/cc/CCRenderer.h:
(WebCore):
(CCRenderer):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMAKE] Add missing feature macros
https://bugs.webkit.org/show_bug.cgi?id=90890

Reviewed by Eric Seidel.

ENABLE_CSS_EXCLUSIONS, ENABLE_CSS_REGIONS, ENABLE_TEXT_AUTOSIZING macros
haven't defined in cmake feature list.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Repaint counter for accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=90116

Patch by Helder Correia <helder.correia@nokia.com> on 2012-07-10
Reviewed by Noam Rosenthal.

No new tests, just introducing a debug feature.

For this feature to be enabled, the environment variable
QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled,
both repaint counters and tile borders will be painted.

Important notes:
- Only WebKit2 is targetted for now.
- There is no integration with Preferences. That aproach was
taken initially but revealed complex and overkill for such a
debugging-only functionality. Thus, to disable it simply restart with
the environment variable unset or set to some other value.

A Qt-specific drawRepaintCounter() function was added to
TextureMapperGL. A QImage is used as scratch buffer to paint borders and
counters. It is then uploaded to a BitmapTexture acquired from the pool
and finally draw by TextureMapper. The actual compositing happens inside
LayerBackingStore::paintToTextureMapper(). Each LayerBackingStoreTile
now has a repaint counter which gets incremented in
LayerBackingStore::updateTile().

Source/WebCore:

* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore):
(WebCore::TextureMapperGL::drawRepaintCounter):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperImageBuffer.h:

Source/WebKit2:

* UIProcess/texmap/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::updateTile):
(WebKit):
(WebKit::shouldShowTileDebugVisuals):
(WebKit::LayerBackingStore::paintToTextureMapper):
* UIProcess/texmap/LayerBackingStore.h:
(WebKit::LayerBackingStoreTile::LayerBackingStoreTile):
(LayerBackingStoreTile):
(WebKit::LayerBackingStoreTile::incrementRepaintCount):
(WebKit::LayerBackingStoreTile::repaintCount):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bugs.webkit.org has mixed content
https://bugs.webkit.org/show_bug.cgi?id=90907

Reviewed by Eric Seidel.

Now that we detect http XMLHttpRequests as mixed content, I've noticed
that we're loading committers.py over http instead of https.  For
better security, we should use https.

* committers-autocomplete.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the test files that I forgot to commit (AGAIN!) in r122271

        * animations/animation-shorthand-name-order-expected.txt: Added.
        * animations/animation-shorthand-name-order.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash due to SVG animation element not removed from target (before reset)
https://bugs.webkit.org/show_bug.cgi?id=90750

Reviewed by Abhishek Arya.

Source/WebCore:

Previously we were not removing an animation element from
SVGDocumentExtensions::m_animatedElements which led to a crash.
This change properly removes animation elements in resetTargetElement
which both fixes this bug and will prevent others from hitting it in
the future.

Test: svg/animations/dynamic-modify-attributename-crash2.svg

* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget):

removeAllAnimationElementsFromTarget now adds all the animation elements
to a vector and iterates over it because the changes to resetTargetElement
would have caused us to modify the underlying hashset as we iterated. Note that
before we deleted animationElementsForTarget in removeAllAnimationElementsFromTarget
but that logic is now handled in removeAnimationElementFromTarget which is called
during resetTargetElement.

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::removedFrom):

Because of the changes in resetTargetElement, removedFrom was able to be
refactored. This patch changes removedFrom to call resetTargetElement rather
than have duplicated logic. There is a very small change in logic here:
animationAttributeChanged() is now called in removedFrom().

(WebCore::SVGSMILElement::resetTargetElement):

resetTargetElement now fully resets the target, including removing it from
m_animatedElements. This will prevent future instances of this bug.

LayoutTests:

* svg/animations/dynamic-modify-attributename-crash2-expected.txt: Added.
* svg/animations/dynamic-modify-attributename-crash2.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add alecflett to the list of committers
https://bugs.webkit.org/show_bug.cgi?id=90903

Patch by Alec Flett <alecflett@chromium.org> on 2012-07-10
Reviewed by Ojan Vafai.

* Scripts/webkitpy/common/config/committers.py:

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