2012-05-31 Hajime Morrita REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac https://bugs.webkit.org/show_bug.cgi?id=86859 Reviewed by Ryosuke Niwa. The test tries to reach an invalid SpellChecker object. Such an access should be guarded beforehand. Asynchronous spellchecking can return results after originated frame is gone, which triggered an invalid access to the dead spellchecker object. This chagne prevents it by marking request objects from the spellchecker as invalid: - Originally TextCheckerClient API was passed a SpellCheker object. This change abstracted it behind TextCheckingRequest interface, didSucceed() and didCancel() method specifically. - TextCheckingRequest was turned from a plain old object into a refcounted abstract class, which is now subclassed by SpellCheckRequest. - SpellChecker now marks pending SpellCheckRequest objects as invalid on its destructor. Test: editing/spelling/spellcheck-async-remove-frame.html * WebCore.exp.in: * editing/SpellChecker.cpp: (WebCore::SpellCheckRequest::SpellCheckRequest): (WebCore::SpellCheckRequest::create): (WebCore::SpellCheckRequest::didSucceed): (WebCore): (WebCore::SpellCheckRequest::didCancel): (WebCore::SpellCheckRequest::wasRequestedBy): (WebCore::SpellCheckRequest::requesterDestroyed): (WebCore::SpellChecker::~SpellChecker): (WebCore::SpellChecker::requestCheckingFor): (WebCore::SpellChecker::invokeRequest): (WebCore::SpellChecker::didCheckSucceed): (WebCore::SpellChecker::didCheckCancel): * editing/SpellChecker.h: (WebCore): (SpellCheckRequest): (WebCore::SpellCheckRequest::isStarted): (SpellChecker): * loader/EmptyClients.h: (WebCore::EmptyTextCheckerClient::requestCheckingOfString): * platform/text/TextCheckerClient.h: (TextCheckerClient): * platform/text/TextChecking.h: (GrammarDetail): (TextCheckingResult): (TextCheckingRequest): (WebCore::TextCheckingRequest::~TextCheckingRequest): 2012-05-31 Tony Chang initial flex value should be 1 1 auto https://bugs.webkit.org/show_bug.cgi?id=86526 Reviewed by Ojan Vafai. Also, if -webkit-flex is used to set the positive flex to 0 and the negative flex is omitted, the negative flex is set to 0. New test cases in: flex-property-parsing.html * css/CSSParser.cpp: (WebCore::CSSParser::parseFlex): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyFlex::applyValue): * rendering/style/RenderStyle.h: 2012-05-31 Sheriff Bot Unreviewed, rolling out r119146. http://trac.webkit.org/changeset/119146 https://bugs.webkit.org/show_bug.cgi?id=88035 android breakage fixed in http://crrev.com/139945 (Requested by fischman on #webkit). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::startProgressEventTimer): (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::startPlaybackProgressTimer): * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::didLoadingProgress): (WebCore::MediaPlayer::didLoadingProgress): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::didLoadingProgress): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt): (WebCore::MediaPlayerPrivateQt::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::didLoadingProgress): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-05-31 Tom Sepez XSSAuditor bypass with leading /*///*/ comment https://bugs.webkit.org/show_bug.cgi?id=88002 Reviewed by Adam Barth. Fixes issue in xssauditor's parsing of /*/. Test: http/tests/security/xssAuditor/script-tag-with-trailing-comment4.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::decodedSnippetForJavaScript): 2012-05-31 Hans Muller Bug: Negative SVG rect rx,ry corner radii values aren't handled correctly https://bugs.webkit.org/show_bug.cgi?id=87859 Reviewed by Dirk Schulze. Added the rect element corner radius constraints specified in steps 2-4 of http://www.w3.org/TR/SVG/shapes.html#RectElement to Path::addRoundedRect(). Support for steps 6 and 7 was already included. Steps 2-4: 2 - If neither rx nor ry are properly specified, then set both rx and ry to 0. (This will result in square corners.) 3 - Otherwise, if a properly specified value is provided for rx, but not for ry then set both rx and ry to the value of rx. 4 - Otherwise, if a properly specified value is provided for ry, but not for rx, then set both rx and ry to the value of ry. Tests: svg/custom/rect-negative-corner-radii-expected.svg svg/custom/rect-negative-corner-radii.svg * platform/graphics/Path.cpp: (WebCore::Path::addRoundedRect): 2012-05-31 Shawn Singh [chromium] Migrate to WebTransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=87788 Reviewed by James Robinson. Covered by all existing layout tests and unit tests. This patch replaces all occurrences of WebCore::TransformationMatrix with WebKit::WebTransformationMatrix in the chromium compositor code. * platform/chromium/support/WebTransformationMatrix.cpp: (WebKit::WebTransformationMatrix::WebTransformationMatrix): (WebKit): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setSublayerTransform): (WebCore::LayerChromium::setTransform): (WebCore::LayerChromium::setTransformFromAnimation): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::sublayerTransform): (WebCore::LayerChromium::drawTransform): (WebCore::LayerChromium::setDrawTransform): (WebCore::LayerChromium::screenSpaceTransform): (WebCore::LayerChromium::setScreenSpaceTransform): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawCheckerboardQuad): (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::toGLMatrix): (WebCore::LayerRendererChromium::drawTexturedQuad): (WebCore::LayerRendererChromium::copyTextureToFramebuffer): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::projectionMatrix): (WebCore::LayerRendererChromium::windowMatrix): (LayerRendererChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::LinkHighlight): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::drawTransform): (WebCore::RenderSurfaceChromium::setDrawTransform): (WebCore::RenderSurfaceChromium::originTransform): (WebCore::RenderSurfaceChromium::setOriginTransform): (WebCore::RenderSurfaceChromium::screenSpaceTransform): (WebCore::RenderSurfaceChromium::setScreenSpaceTransform): (WebCore::RenderSurfaceChromium::replicaDrawTransform): (WebCore::RenderSurfaceChromium::setReplicaDrawTransform): (WebCore::RenderSurfaceChromium::replicaOriginTransform): (WebCore::RenderSurfaceChromium::setReplicaOriginTransform): (WebCore::RenderSurfaceChromium::replicaScreenSpaceTransform): (WebCore::RenderSurfaceChromium::setReplicaScreenSpaceTransform): (RenderSurfaceChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCAnimationCurve.h: (WebCore): (CCTransformAnimationCurve): * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore::CCDrawQuad::quadTransform): (WebCore::CCDrawQuad::layerTransform): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: (WebCore::CCTransformKeyframe::clone): (WebCore::CCKeyframedTransformAnimationCurve::getValue): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: (CCKeyframedTransformAnimationCurve): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::tickAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (WebKit): (WebCore): (CCLayerAnimationControllerClient): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::quadTransform): (WebCore::CCLayerImpl::setTransformFromAnimation): (WebCore::CCLayerImpl::setSublayerTransform): (WebCore::CCLayerImpl::setTransform): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::sublayerTransform): (WebCore::CCLayerImpl::drawTransform): (WebCore::CCLayerImpl::setDrawTransform): (WebCore::CCLayerImpl::screenSpaceTransform): (WebCore::CCLayerImpl::setScreenSpaceTransform): * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::createGraphNodes): * platform/graphics/chromium/cc/CCLayerSorter.h: (WebKit): (LayerShape): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isSurfaceBackFaceVisible): (WebCore::calculateVisibleLayerRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): (WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::damageInSurfaceSpace): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapClippedQuad): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: (WebKit): (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::reduceOcclusionBelowSurface): (WebCore::contentToScreenSpaceTransform): (WebCore::contentToTargetSurfaceTransform): (WebCore::addOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): (WebCore::testContentRectOccluded): (WebCore::computeUnoccludedContentRect): (WebCore::::unoccludedContributingSurfaceContentRect): * platform/graphics/chromium/cc/CCOcclusionTracker.h: * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::didUpload): (WebCore::CCOverdrawMetrics::didCullForDrawing): (WebCore::CCOverdrawMetrics::didDraw): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (WebKit): (CCOverdrawMetrics): * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore::CCRenderSurface::setDrawTransform): (WebCore::CCRenderSurface::drawTransform): (WebCore::CCRenderSurface::setOriginTransform): (WebCore::CCRenderSurface::originTransform): (WebCore::CCRenderSurface::setScreenSpaceTransform): (WebCore::CCRenderSurface::screenSpaceTransform): (WebCore::CCRenderSurface::setReplicaDrawTransform): (WebCore::CCRenderSurface::replicaDrawTransform): (WebCore::CCRenderSurface::setReplicaOriginTransform): (WebCore::CCRenderSurface::replicaOriginTransform): (WebCore::CCRenderSurface::setReplicaScreenSpaceTransform): (WebCore::CCRenderSurface::replicaScreenSpaceTransform): (CCRenderSurface): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::create): (WebCore::CCSharedQuadState::CCSharedQuadState): * platform/graphics/chromium/cc/CCSharedQuadState.h: (CCSharedQuadState): (WebCore::CCSharedQuadState::quadTransform): (WebCore::CCSharedQuadState::layerTransform): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::quadTransform): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::quadTransform): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-05-31 Ian Vollick [chromium] Single thread proxy should not tick animations unless the layer renderer has been initialized https://bugs.webkit.org/show_bug.cgi?id=87873 Reviewed by James Robinson. When the layer renderer fails to initialize, be sure to stop the animation timer. Unit test: CCLayerTreeHostTestInitializeLayerRendererFailsAfterAddAnimation.runSingleThread * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::didAddAnimation): (WebCore::CCSingleThreadProxy::animationTimerDelay): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2012-05-31 Simon Fraser RenderLayerCompositor cleanup: make RenderGeometryMap part of the OverlapMap https://bugs.webkit.org/show_bug.cgi?id=88021 Reviewed by James Robinson. We only ever use the RenderGeometryMap when we have an OverlapMap, so make it a member of the OverlapMap. No behavior change. * rendering/RenderLayerCompositor.cpp: (RenderLayerCompositor::OverlapMap): (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: (WebCore): (RenderLayerCompositor): 2012-05-31 Kentaro Hara [V8] Pass Isolate to v8Boolean() https://bugs.webkit.org/show_bug.cgi?id=87948 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8Boolean(). No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyDeleter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageDeleter): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): 2012-05-31 Alec Flett IndexedDB: Implement IDBTransaction.error and IDBRequest.error https://bugs.webkit.org/show_bug.cgi?id=87865 Reviewed by Tony Chang. Added "error" attribute to IDBRequest and IDBTransaction. Update IDBDatabaseError to honor the IDBDatabaseException behavior of dealing with IDB-specific throws of DOMException codes, as per the spec. Existing tests which previously tested 'errorCode' and 'webkitErrorMessage' have been updated to use the new attribute. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseError.h: (WebCore::IDBDatabaseError::create): (WebCore::IDBDatabaseError::code): (WebCore::IDBDatabaseError::idbCode): (WebCore::IDBDatabaseError::name): (WebCore::IDBDatabaseError::IDBDatabaseError): (IDBDatabaseError): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): (WebCore::getErrorEntry): (WebCore::IDBDatabaseException::initializeDescription): (WebCore::IDBDatabaseException::getErrorName): (WebCore::IDBDatabaseException::getLegacyErrorCode): * Modules/indexeddb/IDBDatabaseException.h: (IDBDatabaseException): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::error): (WebCore): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::error): (WebCore): (WebCore::IDBTransaction::setError): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-31 James Robinson [chromium] Assertion failures during compositor startup in lost context situations https://bugs.webkit.org/show_bug.cgi?id=87912 Reviewed by Adrienne Walker. getShaderiv and getProgramiv may return 0 if the context is lost. We correctly recover in this case, so it's bogus to fail an ASSERT in debug in this case. Added new unit test in LayerRendererChromiumTest to cover this. * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::contextLost): (WebCore): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::createShaderProgram): 2012-05-31 Ben Murdoch Fix crash in V8Document::createTouchListCallback. https://bugs.webkit.org/show_bug.cgi?id=87085 Reviewed by Abhishek Arya. Test: fast/events/touch/document-create-touch-list-crash.html * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::createTouchListCallback): Verify the native type of the arguments passed to createTouchList are Touches before appending them to the TouchList. In the case of a non-Touch argument, insert null into the TouchList. This consolidates V8 and JSC bindings behaviour. * dom/Document.cpp: Remove dead code. * dom/Document.h: ditto. 2012-05-31 Simon Fraser Remove some duplicate code in RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=88009 Reviewed by Anders Carlsson. RenderLayerCompositor::hasNonAffineTransform() has the same code as the existing RenderLayer::has3DTransform(), so just use the RenderLayer method and remove hasNonAffineTransform(). No behavior change. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-05-31 Sheriff Bot Unreviewed, rolling out r119125. http://trac.webkit.org/changeset/119125 https://bugs.webkit.org/show_bug.cgi?id=88007 Will break android build if rolled (Requested by rafaelw_ on #webkit). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::startProgressEventTimer): (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::startPlaybackProgressTimer): * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::bytesLoaded): (WebCore::MediaPlayer::bytesLoaded): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::bytesLoaded): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::bytesLoaded): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::bytesLoaded): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::bytesLoaded): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt): (WebCore::MediaPlayerPrivateQt::bytesLoaded): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::bytesLoaded): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-05-31 Andy Estes Disentangle code that relies on USE(AUTOMATIC_TEXT_REPLACEMENT) from that which merely relies on PLATFORM(MAC) https://bugs.webkit.org/show_bug.cgi?id=87933 Reviewed by Dan Bernstein. * editing/Editor.cpp: * editing/Editor.h: * loader/EmptyClients.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * page/EditorClient.h: 2012-05-31 Dana Jansens [chromium] Move drawing code for RenderSurfaces into LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=87877 Reviewed by James Robinson. We add data to CCRenderSurfaceDrawQuad so that the only use of CCRenderSurface directly from LayerRendererChromium is to reserve, release, and use the surface's textures, and to set the scissor rect. Each of these changes will be done independent of this change. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::applyFilters): (WebCore): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::copyTextureToFramebuffer): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::contentsTextureId): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore): (WebCore::CCRenderSurface::CCRenderSurface): (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::releaseContentsTexture): (WebCore::CCRenderSurface::hasValidContentsTexture): (WebCore::CCRenderSurface::releaseBackgroundTexture): (WebCore::CCRenderSurface::hasValidBackgroundTexture): (WebCore::CCRenderSurface::hasMask): (WebCore::CCRenderSurface::replicaHasMask): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: (WebCore::CCRenderSurfaceDrawQuad::create): (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: (WebKit): (CCRenderSurfaceDrawQuad): (WebCore::CCRenderSurfaceDrawQuad::maskTextureId): (WebCore::CCRenderSurfaceDrawQuad::filters): (WebCore::CCRenderSurfaceDrawQuad::backgroundFilters): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::contentsTextureId): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-05-31 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=87990 Crashes unregistering DOMWindowProperties while releasing CachedPages Reviewed by Jessie Berlin. This patch rewrites DOMWindowProperty to always keep direct track of the DOMWindow it has registered with and to only ever unregister from that very same DOMWindow. No new tests. (While the direct cause of the crash is understood, reproducing it is not) * page/DOMWindowProperty.cpp: (WebCore::DOMWindowProperty::DOMWindowProperty): (WebCore::DOMWindowProperty::~DOMWindowProperty): (WebCore::DOMWindowProperty::disconnectFrameForPageCache): (WebCore::DOMWindowProperty::reconnectFrameFromPageCache): (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame): (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame): (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame): * page/DOMWindowProperty.h: (DOMWindowProperty): 2012-05-31 Tony Chang rename flexbox CSS properties from flex-align and flex-item-align to align-items and align-self https://bugs.webkit.org/show_bug.cgi?id=87907 Reviewed by Ojan Vafai. This was recently changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#align-items-property No new tests, updated the tests to use the new naming. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EAlignItems): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::alignmentForChild): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::alignChildren): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: (StyleFlexibleBoxData): Move member variables to StyleRareNonInheritedData because these values will eventually apply to more than just flexbox. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-05-31 Ami Fischman Replace WebMediaPlayer::bytesLoaded() with an explicit didLoadingProgress() https://bugs.webkit.org/show_bug.cgi?id=86113 Reviewed by Eric Carlson. No new functionality, so no new tests. Loading progress is already tested by existing layouttests. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::startProgressEventTimer): (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::startPlaybackProgressTimer): * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::didLoadingProgress): (WebCore::MediaPlayer::didLoadingProgress): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::didLoadingProgress): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt): (WebCore::MediaPlayerPrivateQt::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::didLoadingProgress): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-05-31 Erik Arvidsson Make DOM Exceptions Errors https://bugs.webkit.org/show_bug.cgi?id=85078 Reviewed by Oliver Hunt. WebIDL mandates that exceptions should have Error.prototype on its prototype chain. For JSC we have access to the Error.prototype from the binding code. For V8 we set a field in the WrapperTypeInfo and when the constructor function is created we set the prototype as needed. Updated test: fast/dom/DOMException/prototype-object.html * ForwardingHeaders/runtime/ErrorPrototype.h: Added. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestException::createPrototype): * bindings/scripts/test/JS/JSTestException.h: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): (WebCore::V8TestObj::installPerContextProperties): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8BindingPerContextData.cpp: (WebCore): (WebCore::V8BindingPerContextData::init): (WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): (WebCore::V8BindingPerContextData::constructorForTypeSlowCase): * bindings/v8/V8BindingPerContextData.h: (V8BindingPerContextData): * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WrapperTypeInfo): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): 2012-05-31 Ian Vollick [chromium] create WebTransformOperation interface for chromium platform https://bugs.webkit.org/show_bug.cgi?id=87510 Reviewed by James Robinson. Unit tests: WebTransformOperationsTest.transformTypesAreUnique WebTransformOperationsTest.matchesTypesSameLength WebTransformOperationsTest.matchesTypesDifferentLength WebTransformOperationsTest.applyTranslate WebTransformOperationsTest.applyRotate WebTransformOperationsTest.applyScale WebTransformOperationsTest.applySkew WebTransformOperationsTest.applyPerspective WebTransformOperationsTest.applyMatrix WebTransformOperationsTest.applyOrder WebTransformOperationsTest.blendOrder WebTransformOperationsTest.blendProgress WebTransformOperationsTest.blendWhenTypesDoNotMatch * WebCore.gypi: * platform/chromium/support/WebTransformOperations.cpp: Added. (WebKit): (WebTransformOperationsPrivate): (WebKit::WebTransformOperations::apply): (WebKit::WebTransformOperations::blend): (WebKit::WebTransformOperations::matchesTypes): (WebKit::WebTransformOperations::appendTranslate): (WebKit::WebTransformOperations::appendRotate): (WebKit::WebTransformOperations::appendScale): (WebKit::WebTransformOperations::appendSkew): (WebKit::WebTransformOperations::appendPerspective): (WebKit::WebTransformOperations::appendMatrix): (WebKit::WebTransformOperations::reset): (WebKit::WebTransformOperations::initialize): 2012-05-31 Yury Semikhatsky m_totalAllocated should be intialized in RenderArena constructor https://bugs.webkit.org/show_bug.cgi?id=87967 Reviewed by Ojan Vafai. * rendering/RenderArena.cpp: (WebCore::RenderArena::RenderArena): added missing initializer. 2012-05-31 Julien Chaffraix The difference between a column and a column group renderer is badly drawn https://bugs.webkit.org/show_bug.cgi?id=87556 Reviewed by Abhishek Arya. No expected change in behavior. This patch tries to draw a better line between those 3 concepts: - renderer is a RenderTableCol (RenderObject::isRenderTableCol). - renderer is a column (RenderTableCol::isTableColumn()). - renderer is a column group (RenderTableCol::isTableColumnGroup()). (most of the code that needs to know the difference manipulate a RenderTableCol so there was no need to move the 2 last helpers into RenderObject) * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): Factored the code to use the column / column group iteration we set up in the rest of the code. Made the code more self-describing by using more RenderTableCol functions. * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): Factored the code to use the isTableColumn() and isTableColumnGroup() to better underline what we check. * rendering/RenderObject.h: (WebCore::RenderObject::isRenderTableCol): (WebCore::RenderObject::isTablePart): Renamed isTableCol to isRenderTableCol to match the class as this doesn't imply that the renderer is actually a column. * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::parseAttribute): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::fullRecalc): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): (WebCore::RenderTable::layout): (WebCore::RenderTable::firstColumn): Updated after the isRenderTableCol rename. * dom/Text.cpp: (WebCore::Text::rendererIsNeeded): * editing/htmlediting.cpp: (WebCore::isTableStructureNode): Ditto and renamed some variables. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::rendererIsNeeded): Ditto and added a FIXME as the logic doesn't seem very bullet proof. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeCollapsedStartBorder): (WebCore::RenderTableCell::computeCollapsedEndBorder): (WebCore::RenderTableCell::computeCollapsedBeforeBorder): (WebCore::RenderTableCell::computeCollapsedAfterBorder): Changed to use the enclosingColumnGroup* helpers. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::isChildAllowed): (WebCore::RenderTableCol::canHaveChildren): (WebCore::RenderTableCol::enclosingColumnGroup): (WebCore::RenderTableCol::nextColumn): Updated to use the new functions. * rendering/RenderTableCol.h: (WebCore::RenderTableCol::isTableColumn): (WebCore::RenderTableCol::isTableColumnGroup): (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore): (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter): Added the following new helpers. 2012-05-31 Jessie Berlin Fix Lion build after r119073. * platform/Decimal.cpp: (WebCore::Decimal::toString): Do not attempt to assign a unsigned long long to an int. 2012-05-31 Christophe Dumez [EFL] Enable CSS_IMAGE_SET flag https://bugs.webkit.org/show_bug.cgi?id=87727 Reviewed by Adam Roben. Fix CMakeLists.txt so that CSSImageSetValue.cpp gets compiled if CSS_IMAGE_SET flag is enabled. * CMakeLists.txt: 2012-05-31 Keyar Hood the imageSmoothingEnabled flag needs to be in the state object https://bugs.webkit.org/show_bug.cgi?id=87853 Reviewed by Darin Adler. Updated fast/canvas/canvas-imageSmoothingEnabled.html instead of adding a new test. The imageSmoothingEnabled flag is saved in the draw state now. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::State::operator=): (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): * html/canvas/CanvasRenderingContext2D.h: (State): 2012-05-31 Eugene Klyuchnikov Web Inspector: Fix checkbox position on Settings screen. https://bugs.webkit.org/show_bug.cgi?id=87007 Reviewed by Yury Semikhatsky. Checkbox seems to be improperly aligned. It is "shifted" up on 1px on Mac and 2px on Linux. Also, keyboard-shortcuts screen has "wrapped" key descriptions on Mac. UI changes, no new tests. * inspector/front-end/helpScreen.css: (.help-container): Fixed column width. (.help-block): Ditto. (.help-key-cell): Ditto. (body.platform-mac .help-container): Ditto. (body.platform-mac .help-block): Ditto. (body.platform-mac .help-key-cell): Ditto. (.help-content p): Ajdusted spacing between lines (.help-content input[type=checkbox]): Fixed alignment. (body.platform-mac .help-content input[type=checkbox]): Ditto. (.help-content input[type=radio]): Fixed alignment. (body.platform-mac .help-content input[type=radio]): Ditto. 2012-05-30 Andreas Kling Have StylePropertySet constructor take array/length instead of vector. Reviewed by Antti Koivisto. Remove the StylePropertyVector typedef and have StylePropertySet constructors take CSSProperty*/length since we are copying the data into a tightly packed array anyway. This frees up the call sites to use whatever storage they please rather than being restricted to a vector with inlineCapacity=4. Change said call sites to use an arbitrary high inline capacity (256) for their stack-allocated temporary vectors. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSParser.cpp: (WebCore::filterProperties): (WebCore::CSSParser::createStylePropertySet): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::createImmutable): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::copyPropertiesInSet): * css/StylePropertySet.h: (WebCore::StylePropertySet::create): (StylePropertySet): 2012-05-31 Tor Arne Vestbø [Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5) https://bugs.webkit.org/show_bug.cgi?id=87955 Reviewed by Simon Hausmann. * bridge/qt/qt_class.cpp: * bridge/qt/qt_instance.cpp: * bridge/qt/qt_runtime.h: * page/qt/EventHandlerQt.cpp: * platform/graphics/GraphicsContext3D.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/OpenGLShims.h: * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/graphics/qt/SimpleFontDataQt.cpp: * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/qt/DeviceMotionProviderQt.h: * platform/qt/DeviceOrientationProviderQt.h: * platform/qt/KURLQt.cpp: * platform/qt/PlatformScreenQt.cpp: * platform/qt/QWebPageClient.h: * plugins/qt/PluginPackageQt.cpp: * plugins/qt/PluginViewQt.cpp: 2012-05-30 Andreas Kling Have StylePropertySet constructor take array/length instead of vector. Reviewed by Antti Koivisto. Remove the StylePropertyVector typedef and have StylePropertySet constructors take CSSProperty*/length since we are copying the data into a tightly packed array anyway. This frees up the call sites to use whatever storage they please rather than being restricted to a vector with inlineCapacity=4. Change said call sites to use an arbitrary high inline capacity (256) for their stack-allocated temporary vectors. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSParser.cpp: (WebCore::filterProperties): (WebCore::CSSParser::createStylePropertySet): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::createImmutable): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::copyPropertiesInSet): * css/StylePropertySet.h: (WebCore::StylePropertySet::create): (StylePropertySet): 2012-05-31 Mike West Fixing compilation with SVG disabled. https://bugs.webkit.org/show_bug.cgi?id=87944 This patch adds the missing enumeration value 'CSSPropertyWebkitBoxDecorationBreak' into switch statements to make clang happy. Reviewed by Alexis Menard. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-05-31 Yoshifumi Inoue [Platform] Implementation of Decimal(int32_t) isn't portable. https://bugs.webkit.org/show_bug.cgi?id=87941 Reviewed by Kent Tamura. This patch changes negation of integer to make unsigned integer in portable way. No new tests. This patch doesn't change behavior. * platform/Decimal.cpp: (WebCore::Decimal::Decimal): Use uint64_t(-int64_t(i32)) instead of uint64_t(-i32) 2012-05-31 Gyuyoung Kim [CMAKE][EFL] Remove unneeded include path https://bugs.webkit.org/show_bug.cgi?id=87927 Reviewed by Kenneth Rohde Christiansen. Though *wtf* directory was moved to Source/WTF, PlatformEfl.cmake is still including the previous path. In addition, files on EFL port are using "" directly in #include line. So, EFL port doesn't need to include ${JAVASCRIPTCORE_DIR}/wtf/gobject path anymore. * PlatformEfl.cmake: Remove '${JAVASCRIPTCORE_DIR}/wtf/gobject' path from include path list. 2012-05-31 Yoshifumi Inoue [Platform] Introduce Decimal class for Number/Range input type. https://bugs.webkit.org/show_bug.cgi?id=87360 Reviewed by Kent Tamura. This patch added new class Decimal for decimal arithmatic in two files: platform/Decimal.cpp and Decimal.h with unit test. Test: WebKit/chromium/tests/DecimalTest.cpp * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Decimal.cpp: Added. (WebCore): (DecimalPrivate): (SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::handle): (WebCore::DecimalPrivate::SpecialValueHandler::value): (UInt128): (WebCore::DecimalPrivate::UInt128::UInt128): (WebCore::DecimalPrivate::UInt128::high): (WebCore::DecimalPrivate::UInt128::low): (WebCore::DecimalPrivate::UInt128::multiply): (WebCore::DecimalPrivate::UInt128::highUInt32): (WebCore::DecimalPrivate::UInt128::lowUInt32): (WebCore::DecimalPrivate::UInt128::isZero): (WebCore::DecimalPrivate::UInt128::makeUInt64): (WebCore::DecimalPrivate::UInt128::operator/=): (WebCore::DecimalPrivate::UInt128::multiplyHigh): (WebCore::DecimalPrivate::countDigits): (WebCore::DecimalPrivate::scaleDown): (WebCore::DecimalPrivate::scaleUp): (WebCore::Decimal::EncodedData::EncodedData): (WebCore::Decimal::EncodedData::operator==): (WebCore::Decimal::Decimal): (WebCore::Decimal::operator=): (WebCore::Decimal::operator+=): (WebCore::Decimal::operator-=): (WebCore::Decimal::operator*=): (WebCore::Decimal::operator/=): (WebCore::Decimal::operator-): (WebCore::Decimal::operator+): (WebCore::Decimal::operator*): (WebCore::Decimal::operator/): (WebCore::Decimal::operator==): (WebCore::Decimal::operator!=): (WebCore::Decimal::operator<): (WebCore::Decimal::operator<=): (WebCore::Decimal::operator>): (WebCore::Decimal::operator>=): (WebCore::Decimal::abs): (WebCore::Decimal::alignOperands): (WebCore::Decimal::ceiling): (WebCore::Decimal::compareTo): (WebCore::Decimal::floor): (WebCore::Decimal::fromString): (WebCore::Decimal::infinity): (WebCore::Decimal::nan): (WebCore::Decimal::remainder): (WebCore::Decimal::round): (WebCore::Decimal::toString): (WebCore::Decimal::zero): * platform/Decimal.h: Added. (WebCore): (DecimalPrivate): (Decimal): (EncodedData): (WebCore::Decimal::EncodedData::operator!=): (WebCore::Decimal::EncodedData::coefficient): (WebCore::Decimal::EncodedData::exponent): (WebCore::Decimal::EncodedData::isFinite): (WebCore::Decimal::EncodedData::isNaN): (WebCore::Decimal::EncodedData::isSpecial): (WebCore::Decimal::EncodedData::isZero): (WebCore::Decimal::EncodedData::sign): (WebCore::Decimal::EncodedData::setSign): (WebCore::Decimal::EncodedData::formatClass): (WebCore::Decimal::isFinite): (WebCore::Decimal::isNaN): (WebCore::Decimal::isNegative): (WebCore::Decimal::isPositive): (WebCore::Decimal::isSpecial): (WebCore::Decimal::isZero): (WebCore::Decimal::value): (AlignedOperands): (WebCore::Decimal::invertSign): (WebCore::Decimal::exponent): (WebCore::Decimal::sign): 2012-05-31 Kentaro Hara [V8] Pass Isolate to v8String() in custom bindings https://bugs.webkit.org/show_bug.cgi?id=87825 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8String() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferViewCustom.cpp: (WebCore::installFastSet): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toV8Object): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyGetter): (WebCore::V8DOMStringMap::namedPropertyEnumerator): * bindings/v8/custom/V8FileReaderCustom.cpp: (WebCore::V8FileReader::resultAccessorGetter): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::toDataURLCallback): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8Object): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::databaseIdCallback): (WebCore::V8InjectedScriptHost::storageIdCallback): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::platformCallback): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: (WebCore::V8JavaScriptCallFrame::typeAccessorGetter): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::toStringCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyEnumerator): (WebCore::storageGetter): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): * bindings/v8/custom/V8XSLTProcessorCustom.cpp: (WebCore::V8XSLTProcessor::getParameterCallback): 2012-05-31 Hayato Ito ComposedShadowTreeWalker should support traversing nodes in an orphaned shadow subtree. https://bugs.webkit.org/show_bug.cgi?id=87493 Reviewed by Dimitri Glazkov. ComposedShadowTreeWalker assumed that a visited shadow root is always assigned to a shadow insertion point since it only traverses nodes which are rendered. But there is an exceptional use case such as an event dispatching. Some events, such as a 'click' event, may happen in an orphaned shadow subtree. In such cases, traversal might start with a node in an orphaned shadow subtree. So ComposedShadowTreeWalker can not assume that visited shadow root is always assigned to a shadow insertion point. This patch only fixes ComposedShadowTreeWalker. ComposedShadowTreeParentWalker will be fixed in another patch with an event dispatching test. Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): 2012-05-30 Yury Semikhatsky Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes https://bugs.webkit.org/show_bug.cgi?id=87830 Reviewed by James Robinson. Added a method for getting process memory usage in bytes. It is used in the inspector memory instrumentation to get process total memory usage. * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::processMemorySizesInBytes): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): provided embedders with a way to report WebKit process memory usage. * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::processMemorySizesInBytes): (WebCore): 2012-05-31 Kent Tamura Unreviewed, rolling out r119062 and r119064. http://trac.webkit.org/changeset/119062 http://trac.webkit.org/changeset/119064 https://bugs.webkit.org/show_bug.cgi?id=87360 Broke build on Lion, SnowLoepard, Chromium Windows, and Chromium Linux 32 * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Decimal.cpp: Removed. * platform/Decimal.h: Removed. 2012-05-31 Shane Stephens text-decoration should not be propagated through absolutely positioned elements to tags https://bugs.webkit.org/show_bug.cgi?id=86517 Reviewed by Darin Adler. Test: fast/css/text-decoration-in-second-order-descendants.html * rendering/RenderObject.cpp: (WebCore::RenderObject::getTextDecorationColors): Remove fix from 18611 as it doesn't work on second order descendants. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Add floating and positioned checks when deciding whether to avoid propagating text decoration. Move all checks into new method to improve readability. (WebCore::doesNotInheritTextDecoration): Added 2012-05-30 Yoshifumi Inoue Build fix for Linon/SnowLeopard after r119062 * platform/Decimal.cpp: (WebCore::Decimal::Decimal): 2012-05-30 Yoshifumi Inoue [Platform] Introduce Decimal class for Number/Range input type. https://bugs.webkit.org/show_bug.cgi?id=87360 Reviewed by Kent Tamura. This patch added new class Decimal for decimal arithmatic in two files: platform/Decimal.cpp and Decimal.h with unit test. Test: WebKit/chromium/tests/DecimalTest.cpp * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Decimal.cpp: Added. (WebCore): (DecimalPrivate): (SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::handle): (WebCore::DecimalPrivate::SpecialValueHandler::value): (UInt128): (WebCore::DecimalPrivate::UInt128::UInt128): (WebCore::DecimalPrivate::UInt128::high): (WebCore::DecimalPrivate::UInt128::low): (WebCore::DecimalPrivate::UInt128::multiply): (WebCore::DecimalPrivate::UInt128::highUInt32): (WebCore::DecimalPrivate::UInt128::lowUInt32): (WebCore::DecimalPrivate::UInt128::isZero): (WebCore::DecimalPrivate::UInt128::makeUInt64): (WebCore::DecimalPrivate::UInt128::operator/=): (WebCore::DecimalPrivate::UInt128::multiplyHigh): (WebCore::DecimalPrivate::countDigits): (WebCore::DecimalPrivate::scaleDown): (WebCore::DecimalPrivate::scaleUp): (WebCore::Decimal::EncodedData::EncodedData): (WebCore::Decimal::EncodedData::operator==): (WebCore::Decimal::Decimal): (WebCore::Decimal::operator=): (WebCore::Decimal::operator+=): (WebCore::Decimal::operator-=): (WebCore::Decimal::operator*=): (WebCore::Decimal::operator/=): (WebCore::Decimal::operator-): (WebCore::Decimal::operator+): (WebCore::Decimal::operator*): (WebCore::Decimal::operator/): (WebCore::Decimal::operator==): (WebCore::Decimal::operator!=): (WebCore::Decimal::operator<): (WebCore::Decimal::operator<=): (WebCore::Decimal::operator>): (WebCore::Decimal::operator>=): (WebCore::Decimal::abs): (WebCore::Decimal::alignOperands): (WebCore::Decimal::ceiling): (WebCore::Decimal::compareTo): (WebCore::Decimal::floor): (WebCore::Decimal::fromString): (WebCore::Decimal::infinity): (WebCore::Decimal::nan): (WebCore::Decimal::remainder): (WebCore::Decimal::round): (WebCore::Decimal::toString): (WebCore::Decimal::zero): * platform/Decimal.h: Added. (WebCore): (DecimalPrivate): (Decimal): (EncodedData): (WebCore::Decimal::EncodedData::operator!=): (WebCore::Decimal::EncodedData::coefficient): (WebCore::Decimal::EncodedData::exponent): (WebCore::Decimal::EncodedData::isFinite): (WebCore::Decimal::EncodedData::isNaN): (WebCore::Decimal::EncodedData::isSpecial): (WebCore::Decimal::EncodedData::isZero): (WebCore::Decimal::EncodedData::sign): (WebCore::Decimal::EncodedData::setSign): (WebCore::Decimal::EncodedData::formatClass): (WebCore::Decimal::isFinite): (WebCore::Decimal::isNaN): (WebCore::Decimal::isNegative): (WebCore::Decimal::isPositive): (WebCore::Decimal::isSpecial): (WebCore::Decimal::isZero): (WebCore::Decimal::value): (AlignedOperands): (WebCore::Decimal::invertSign): (WebCore::Decimal::exponent): (WebCore::Decimal::sign): 2012-05-30 Patrick Gansterer Build fix for WinCE after r116723. * platform/graphics/wince/FontWinCE.cpp: (WebCore::TextRunComponent::TextRunComponent): 2012-05-30 Kentaro Hara Implement CSSParser::determineNameInNamespace() as a helper function for CSSGrammar.y https://bugs.webkit.org/show_bug.cgi?id=87799 Reviewed by Darin Adler. As pointed out by darin@ in https://bugs.webkit.org/show_bug.cgi?id=87627#c12, we should avoid repeating the following code in CSSGrammar.y: if (p->m_styleSheet) $$->setTag(QualifiedName(namespacePrefix, $2, p->m_styleSheet->determineNamespace(namespacePrefix))); else $$->setTag(QualifiedName(namespacePrefix, $2, p->m_defaultNamespace)); This patch implements CSSParser::determineNameInNamespace() as a helper function and replaces the above code. Tests: fast/dom/SelectorAPI/*. No change in test results. * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::determineNameInNamespace): (WebCore): * css/CSSParser.h: 2012-05-30 Patrick Gansterer Build fix for WinCE after r117697. * page/wince/FrameWinCE.cpp: (WebCore::computePageRectsForFrame): 2012-05-30 Shawn Singh [chromium] Fix min/max bounds error in CCMathUtil.cpp https://bugs.webkit.org/show_bug.cgi?id=87915 Reviewed by James Robinson. Two unit tests added to CCMathUtilTest: CCMathUtilTest.verifyEnclosingClippedRectUsesCorrectInitialBounds CCMathUtilTest.verifyEnclosingRectOfVerticesUsesCorrectInitialBounds While computing bounds, the initial values for xmax and ymax are intended to be set to -float_max. It turns out that std::numeric_limits::min() actually returns the smallest positive value close to zero, which is not what was intended. This patch fixes the code to use -float_max instead, which is the intended value. * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::computeEnclosingRectOfVertices): (WebCore::CCMathUtil::computeEnclosingClippedRect): (WebCore): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore): (CCMathUtil): 2012-05-30 Patrick Gansterer Build fix for WinCE after r118568. * platform/text/wince/TextBreakIteratorWinCE.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): 2012-05-30 Abhishek Arya Crash in ContainerNode::parserAddChild. https://bugs.webkit.org/show_bug.cgi?id=87903 Reviewed by Ryosuke Niwa. Call the ChildNodeInsertionNotifier.notify call at the end since it can destroy |this| and some of the local pointers like |last|. This also matches the order of calls - childrenChanged precedes ChildNodeInsertionNotifier.notify in updateTreeAfterInsertion and ContainerNode::parserInsertBefore. Also remove a FIXME since we use ChildNodeInsertionNotifier.notify instead of ChildNodeInsertionNotifier.notifyInsertedIntoDocument (as recommended in the FIXME). Test: fast/dom/child-insertion-notify-crash.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserAddChild): 2012-05-30 Rick Byers [chromium] Implement pointer and hover CSS media features https://bugs.webkit.org/show_bug.cgi?id=87403 Reviewed by Adam Barth. Add initial support for the pointer and hover media features as defined here: http://dev.w3.org/csswg/css4-mediaqueries/#pointer http://dev.w3.org/csswg/css4-mediaqueries/#hover For now this only supports the case where we know a touch screen is available (currently known only for the chromium port on certain platforms). All other cases continue to behave exactly as if the media feature isn't supported. Tests: fast/media/mq-pointer.html * css/CSSValueKeywords.in: * css/MediaFeatureNames.h: (MediaFeatureNames): * css/MediaQueryEvaluator.cpp: (WebCore::getLeastCapablePrimaryPointerDeviceType): (WebCore): (WebCore::hoverMediaFeatureEval): (WebCore::pointerMediaFeatureEval): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setDeviceSupportsTouch): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-30 Julien Chaffraix Add an helper function to get the style for a cell's flow computation https://bugs.webkit.org/show_bug.cgi?id=87902 Reviewed by Ojan Vafai. No expected change in behavior. This change introduces styleForCellFlow that unify which function we use to determine a cell's direction and writing mode. This unification will make it easier to support direction on table row group (section in WebKit land). * rendering/RenderTableCell.h: (WebCore::RenderTableCell::styleForCellFlow): Added the new function along with a comment as to its purpose. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::clippedOverflowRectForRepaint): (WebCore::RenderTableCell::computeCollapsedStartBorder): (WebCore::RenderTableCell::computeCollapsedEndBorder): (WebCore::RenderTableCell::computeCollapsedBeforeBorder): (WebCore::RenderTableCell::computeCollapsedAfterBorder): (WebCore::RenderTableCell::borderHalfLeft): (WebCore::RenderTableCell::borderHalfRight): (WebCore::RenderTableCell::borderHalfTop): (WebCore::RenderTableCell::borderHalfBottom): (WebCore::RenderTableCell::borderHalfStart): (WebCore::RenderTableCell::borderHalfEnd): (WebCore::RenderTableCell::borderHalfBefore): (WebCore::RenderTableCell::borderHalfAfter): (WebCore::RenderTableCell::paintCollapsedBorders): Mostly mechanical replacement. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::cachedCollapsedLeftBorder): (WebCore::RenderTableCell::cachedCollapsedRightBorder): (WebCore::RenderTableCell::cachedCollapsedTopBorder): (WebCore::RenderTableCell::cachedCollapsedBottomBorder): Made the argument 'const' now. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): Added a FIXME to unify with the rest. 2012-05-30 Christophe Dumez [JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports https://bugs.webkit.org/show_bug.cgi?id=87118 Reviewed by Adam Barth. Make SerializedScriptValue.create() throw an exception if one of the MessagePort objects cannot be found in the transferred ports. This matches the behavior of the V8 implementation. Test: webintents/web-intents-obj-constructor.html * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): 2012-05-30 Mark Pilgrim [Chromium] Call fileUtilities methods directly https://bugs.webkit.org/show_bug.cgi?id=87852 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::asURL): * platform/chromium/FileSystemChromium.cpp: (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::getFileMetadata): (WebCore::directoryName): (WebCore::pathByAppendingComponent): (WebCore::makeAllDirectories): (WebCore::openFile): (WebCore::closeFile): (WebCore::seekFile): (WebCore::truncateFile): (WebCore::readFromFile): (WebCore::writeToFile): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-05-30 Kent Tamura Form controls in
should not be focusable. https://bugs.webkit.org/show_bug.cgi?id=87380 Reviewed by Darin Adler. Test: fast/forms/fieldset/focus-in-fieldset-disabled.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::supportsFocus): Refer to disabled() instead of m_disabled to take account of wrapping fieldset elements. 2012-05-30 Robin Dunn [wx] Implement HTML clipboard support. https://bugs.webkit.org/show_bug.cgi?id=87883 Reviewed by Kevin Ollivier. * platform/wx/ClipboardWx.cpp: (WebCore::ClipboardWx::writeRange): * platform/wx/PasteboardWx.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::documentFragment): 2012-05-30 Garrett Casto TextFieldDecorationElement should respect style attribute https://bugs.webkit.org/show_bug.cgi?id=87762 Reviewed by Kent Tamura. * html/shadow/TextFieldDecorationElement.cpp: Use style set on the Element when creating rendering style. (WebCore::TextFieldDecorationElement::customStyleForRenderer): 2012-05-30 Ojan Vafai Avoid second layout for flex-direction:row, flex-basis:auto flex items https://bugs.webkit.org/show_bug.cgi?id=87901 Reviewed by Tony Chang. No new tests. This is strictly a performance optimization and has no other web visible changes. Also, add FIXMEs for other cases where we could avoid doing layouts. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): 2012-05-30 Zhenyao Mo WebKit incorrectly clears the alpha channel on readPixels, even for Framebuffers https://bugs.webkit.org/show_bug.cgi?id=87310 Reviewed by Kenneth Russell. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::getParameter): set DEPTH_BITS/STENCIL_BITS to 0 if related channels are not requested. (WebCore::WebGLRenderingContext::readPixels): don't do the alpha value fix if the current bound is not the internal drawing buffer. 2012-05-30 Sheriff Bot Unreviewed, rolling out r118986. http://trac.webkit.org/changeset/118986 https://bugs.webkit.org/show_bug.cgi?id=87914 Caused several IndexedDB browser_test failures on Chromium canary builders (Requested by rafaelw_ on #webkit). * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseError.h: (WebCore::IDBDatabaseError::create): (IDBDatabaseError): (WebCore::IDBDatabaseError::createWithoutOffset): (WebCore::IDBDatabaseError::code): (WebCore::IDBDatabaseError::setCode): (WebCore::IDBDatabaseError::setMessage): (WebCore::IDBDatabaseError::IDBDatabaseError): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): (WebCore::IDBDatabaseException::initializeDescription): * Modules/indexeddb/IDBDatabaseException.h: (IDBDatabaseException): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-30 Dominic Mazzoni [Chromium] AX: WebAccessibilityObject should check if an AccessibilityObject is detached https://bugs.webkit.org/show_bug.cgi?id=87778 Reviewed by Adam Barth. Chromium was never actually using AccessibilityObjectWrapper, so this change deletes it. Instead, it's replaced with a simple bool that keeps track of whether an AccessibilityObject was detached or not. WebKit/chromium/public/WebAccessibilityObject can then use this to determine if an object is still valid. Test: accessibility/accessibility-object-detached.html * WebCore.gypi: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::AccessibilityObject): (WebCore::AccessibilityObject::detach): (WebCore::AccessibilityObject::isDetached): (WebCore): * accessibility/AccessibilityObject.h: (AccessibilityObject): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore): (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): * accessibility/chromium/AccessibilityObjectWrapper.h: Removed. 2012-05-30 Shawn Singh Simplify TransformationMatrix rotation code to improve precision https://bugs.webkit.org/show_bug.cgi?id=86666 Reviewed by Adrienne Walker. Change covered by existing layout tests; Additional unit tests added. The original rotation code for WebCore::TransformationMatrix was using indirect trig identities to compute basic rotation matrices. As far as I can imagine, this is unnecessary, and brief informal experiments showed that we can gain a few extra bits of precision by avoiding that indirection. Indeed, precision improved such that it revealed a mistake on one of the unit tests, where the test was actually degenerate so that the layer was aligned with a viewport boundary. When it was imprecise, it didnt appear to be aligned. Putting an additional translation on that test fixes it so it is no longer a degenerate test. This patch also revealed a few chinks in the unit testing armor of this code, an error that should have been caught in unit tests was luckily caught by SVG layout tests. This chink is fixed by adding 2 extra unit tests. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::rotate3d): 2012-05-30 Alec Flett IndexedDB: Remove old get/getKey implementations https://bugs.webkit.org/show_bug.cgi?id=87879 Reviewed by Ojan Vafai. Removal of dead code, was scaffolding for a complicated Chromium landing. * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::getInternal): (WebCore::IDBIndexBackendImpl::getKeyInternal): (WebCore::IDBIndexBackendImpl::get): (WebCore::IDBIndexBackendImpl::getKey): * Modules/indexeddb/IDBIndexBackendImpl.h: (IDBIndexBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::getInternal): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-05-30 Joe Mason [BlackBerry] Fix assertion fail on redirect due to multiple jobs per handle https://bugs.webkit.org/show_bug.cgi?id=87579 Reviewed by George Staikos. RIM PR #158892: When we start a redirect, we now call cancelJob instead of just deleting it immediately to make sure that all cleanup is performed. However, we also reassign the ResourceHandle to the new job, and since cancelJob is asynchronous it is now assigned to two jobs simultaneously. Work around this by only returning handles that have not been cancelled from findJobForHandle. Cancelled jobs still technically exist in the jobs list, but they're invisible to callers. This is safe because there is literally nothing that can be done with a cancelled job - it is supposed to merely consume any notifications that are already in progress and then kill itself off - so no callers of findJobForHandle are expecting a cancelled job. (All existing callers call methods on the returned job which are no-ops for cancelled jobs, so there is no behaviour change.) No new tests because there is no behaviour change (fixes a regression). * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::findJobForHandle): 2012-05-30 Kentaro Hara [V8][Performance] Optimize DOM attribute getters that return an empty string https://bugs.webkit.org/show_bug.cgi?id=87820 Reviewed by Adam Barth. This patch optimizes the performance of DOM attribute getters that return an empty string by 65.8% (e.g. div.id, div.className, div.title, div.lang ...etc) Performance test: Bindings/undefined-id-getter.html [Without the patch] RESULT Bindings: undefined-id-getter= 441.984669644 runs/s median= 445.544554455 runs/s, stdev= 11.8406070959 runs/s, min= 405.063291139 runs/s, max= 447.204968944 runs/s [With the patch] RESULT Bindings: undefined-id-getter= 738.840460474 runs/s median= 738.786279683 runs/s, stdev= 2.00249797161 runs/s, min= 733.944954128 runs/s, max= 741.721854305 runs/s - This patch passes Isolate to v8::String::Empty(), which removes Isolate look-up inside v8::String::Empty(). - This patch inlines V8Binding::getElementStringAttr() and V8Binding::setElementStringAttr(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): * bindings/v8/V8Binding.cpp: (WebCore::StringCache::v8ExternalStringSlow): * bindings/v8/V8Binding.h: (WebCore::StringCache::v8ExternalString): (StringCache): (WebCore::v8ExternalString): (WebCore): 2012-05-30 Kentaro Hara [V8] Implement V8Binding::v8BooleanWithCheck(isolate) https://bugs.webkit.org/show_bug.cgi?id=87814 Reviewed by Adam Barth. The objective is to pass Isolate to v8::True() and v8::False(). Similarly to v8NullWithCheck() (bug 87713), this patch implements V8Binding::v8BooleanWithCheck(isolate), which calls v8::True()/v8::False() or v8::True(isolate)/v8::False(isolate) depending on whether the passed isolate is null or not. This patch also passes Isolate to v8Boolean() in CodeGeneratorV8.pm. No tests. No behavior change. * bindings/scripts/CodeGeneratorV8.pm: (NativeToJSValue): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::createAttrGetter): (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter): * bindings/v8/V8Binding.h: (WebCore::v8Boolean): (WebCore): (WebCore::v8BooleanWithCheck): 2012-05-30 Kentaro Hara [V8] Replace v8::True() and v8::False() with v8Boolean() https://bugs.webkit.org/show_bug.cgi?id=87812 Reviewed by Adam Barth. To avoid implementing all of v8TrueWithCheck(isolate), v8FalseWithCheck(isolate) and v8BooleanWithCheck(isolate), we can first replace v8::True() and v8::False() with v8Boolean(). Then we can just implement v8BooleanWithCheck(isolate). No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8Binding.h: (WebCore::v8StringOrFalse): * bindings/v8/V8NPUtils.cpp: (WebCore::convertNPVariantToV8Object): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyDeleter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageDeleter): 2012-05-30 Kentaro Hara [V8] Replace v8::Null() with v8NullWithCheck(isolate) in custom bindings where isolate can be 0 https://bugs.webkit.org/show_bug.cgi?id=87807 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch replaces v8::Null() with v8NullWithCheck(isolate) in custom bindings where isolate can be 0. 'where isolate can be 0' means all the places where we cannot retrieve Isolate directly from AccessorInfo or Arguments. No tests. No behavior change. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): 2012-05-30 Kentaro Hara [V8] Replace v8::Null() with v8::Null(isolate) or v8NullWithCheck(isolate) in non-custom bindings https://bugs.webkit.org/show_bug.cgi?id=87810 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. For non-custom bindings, we replace v8::Null() with v8::Null(isolate) where isolate cannot be 0, and replace v8::Null() with v8NullWithCheck(isolate) where isolate can be 0. This will be the final patch for passing Isolate to v8::Null(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::contentDocumentAttrGetter): (WebCore::TestObjV8Internal::getSVGDocumentCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserialize): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): 2012-05-30 Kentaro Hara [V8] Replace v8::Null() with v8::Null(isolate) in custom bindings where isolate shouldn't be 0 https://bugs.webkit.org/show_bug.cgi?id=87809 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch replaces v8::Null() with v8::Null(isolate) in custom bindings where isolate shouldn't be 0. 'where isolate shouldn't be 0' is the place where isolate is retrieved directly from AccessorInfo and Arguments. This patch includes a couple of refactorings: - Makes V8DeviceMotionEvent::createAccelerationObject() and V8DeviceMotionEvent::createRotationRateObject() static - Moves V8HTMLElement::toV8Object() into the existing ENABLE(MICRODATA) flag. No tests. No change in behavior. * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAccessorGetter): (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter): (WebCore::V8Coordinates::headingAccessorGetter): (WebCore::V8Coordinates::speedAccessorGetter): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter): (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter): (WebCore::V8DeviceMotionEvent::intervalAccessorGetter): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter): (WebCore::V8DeviceOrientationEvent::betaAccessorGetter): (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter): (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAccessorGetter): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): (WebCore): (WebCore::toV8Object): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAccessorGetter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): 2012-05-30 Nico Weber Make the files attribute of HTMLInputElement writable https://bugs.webkit.org/show_bug.cgi?id=87154 Reviewed by Adam Barth. whatwg thread: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/036140.html * bindings/objc/PublicDOMInterfaces.h: Remove readonly on files property. * html/FileInputType.cpp: (FileInputType): Add a NULL check to setFiles(). * html/FileInputType.h: (FileInputType): Let setFiles() overwrite the base class's method. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setFiles): Add setFiles() implementation, delegate to input type. * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLInputElement.idl: * html/InputType.cpp: (WebCore::InputType::setFiles): setFiles() does nothing by default. * html/InputType.h: (InputType): Add a virtual setFiles() method. 2012-05-30 Joe Mason [BlackBerry] Remove useless string->char*->string conversion in NetworkJob. https://bugs.webkit.org/show_bug.cgi?id=87861 Reviewed by Antonio Gomes. RIM PR #152383: username is a WTF::String. ResourceHandleInternal::m_user is a string. Yet they're assigned with "username = m_user.utf8().data()". Pointless: "username = m_user" will do. No new tests since there is no behaviour change. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-05-30 Dan Bernstein [Qt] REGRESSION(r118568): It broke fast/forms/textarea-maxlength.html on Qt 4.8 https://bugs.webkit.org/show_bug.cgi?id=87740 Reviewed by Darin Adler. * platform/text/qt/TextBreakIteratorQt.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use the return value of setUpIterator. 2012-05-30 Zeno Albisser GraphicsSurface: allow importing and exporting of textures directly on GPU side. https://bugs.webkit.org/show_bug.cgi?id=87725 Add copyFromFramebuffer function to copy a texture from an FBO onto the GraphicsSurface. Add getTextureID function to export the texture ID. This allows binding/blitting the texture directly on the GPU. Reviewed by Noam Rosenthal. * platform/graphics/surfaces/GraphicsSurface.cpp: (WebCore::GraphicsSurface::getTextureID): (WebCore): (WebCore::GraphicsSurface::copyFromFramebuffer): * platform/graphics/surfaces/GraphicsSurface.h: (GraphicsSurface): * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformGetTextureID): (WebCore): (WebCore::GraphicsSurface::platformCopyFromFramebuffer): 2012-05-30 Alec Flett IndexedDB: Implement IDBTransaction.error and IDBRequest.error https://bugs.webkit.org/show_bug.cgi?id=87865 Reviewed by Tony Chang. Added "error" attribute to IDBRequest and IDBTransaction. Update IDBDatabaseError to honor the IDBDatabaseException behavior of dealing with IDB-specific throws of DOMException codes, as per the spec. Existing tests which previously tested 'errorCode' and 'webkitErrorMessage' have been updated to use the new attribute. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseError.h: (WebCore::IDBDatabaseError::create): (WebCore::IDBDatabaseError::code): (WebCore::IDBDatabaseError::idbCode): (WebCore::IDBDatabaseError::name): (WebCore::IDBDatabaseError::IDBDatabaseError): (IDBDatabaseError): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): (WebCore::getErrorEntry): (WebCore::IDBDatabaseException::initializeDescription): (WebCore::IDBDatabaseException::getErrorName): (WebCore::IDBDatabaseException::getLegacyErrorCode): * Modules/indexeddb/IDBDatabaseException.h: (IDBDatabaseException): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::error): (WebCore): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::error): (WebCore): (WebCore::IDBTransaction::setError): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-30 Allan Sandfeld Jensen [Qt] ImageDecoderQt doesn't support some decoders. https://bugs.webkit.org/show_bug.cgi?id=87851 Reviewed by Kenneth Rohde Christiansen. If forced to decode GIF and JPEG, ImageDecoderQt show several artifacts. This is caused by mismatched decoded image-formats. Convert mismatched color spaces into ARGB color space, and perform manual mem-copy when the image has been decoded into a new buffer. This patch also add support for down-scaling in the decoder. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::internalDecodeSize): (WebCore::ImageDecoderQt::internalHandleCurrentImage): 2012-05-30 Emil A Eklund Floats wraps incorrectly when top edge has subpixel precision https://bugs.webkit.org/show_bug.cgi?id=87688 Reviewed by Levi Weintraub. When computing the logical left and right offsets for a float we incorrectly floored the logical top when passing it to the float search adapter. This caused it to return incorrect values where the floored and pixel snapped values are not the same. Test: fast/sub-pixel/float-wrap-with-subpixel-top.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): 2012-05-30 Emil A Eklund Inline blocks with margin wrap incorrectly with subpixel layout turned on https://bugs.webkit.org/show_bug.cgi?id=87897 Reviewed by Levi Weintraub. Change WebCore::getBorderPaddingMargin and the helper function getBPMWidth to return a LayoutUnit rather than an int as the padding and margin values have subpixel precision. This fixes an issue where we would incorrectly wrap inline blocks with a subpixel padding or margin. Test: fast/sub-pixel/inline-block-with-margin.html * rendering/RenderBlock.cpp: (WebCore::getBPMWidth): (WebCore::getBorderPaddingMargin): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): 2012-05-30 Tony Chang rename flexbox css values from justify and distribute to space-between and space-around https://bugs.webkit.org/show_bug.cgi?id=87867 Reviewed by Ojan Vafai. This was recently changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#justify-content No new tests, updated existing tests and expectations. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexPack): (WebCore::CSSPrimitiveValue::operator EFlexLinePack): * css/CSSValueKeywords.in: * rendering/RenderFlexibleBox.cpp: (WebCore::initialPackingOffset): (WebCore::packingSpaceBetweenChildren): (WebCore::initialLinePackingOffset): (WebCore::linePackingSpaceBetweenChildren): * rendering/style/RenderStyleConstants.h: 2012-05-30 Kevin Ollivier [wx] Unreviewed build fix. Make sure we get the file size with the proper native type. * platform/wx/FileSystemWx.cpp: (WebCore::getFileMetadata): 2012-05-30 Sheriff Bot Unreviewed, rolling out r118913. http://trac.webkit.org/changeset/118913 https://bugs.webkit.org/show_bug.cgi?id=87891 patch is incorrect (see comments in https://bugs.webkit.org/show_bug.cgi?id=87889) (Requested by thorton on #webkit). * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): * css/CSSFontFaceSrcValue.h: (CSSFontFaceSrcValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::addSubresourceStyleURLs): * css/CSSReflectValue.h: (CSSReflectValue): * css/CSSValue.cpp: (WebCore::CSSValue::addSubresourceStyleURLs): * css/CSSValue.h: (CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::addSubresourceStyleURLs): * css/CSSValueList.h: (CSSValueList): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::addSubresourceStyleURLs): * css/StylePropertySet.h: (StylePropertySet): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::addSubresourceStyleURLs): * css/StyleSheetContents.h: (StyleSheetContents): * dom/Element.h: * dom/Node.cpp: (WebCore::Node::getSubresourceURLs): * dom/Node.h: (WebCore::Node::addSubresourceAttributeURLs): (WebCore): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::addSubresourceAttributeURLs): * dom/ProcessingInstruction.h: (ProcessingInstruction): * dom/StyledElement.cpp: (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (StyledElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): * html/HTMLEmbedElement.h: (HTMLEmbedElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::addSubresourceAttributeURLs): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::addSubresourceAttributeURLs): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): * html/HTMLLinkElement.h: (HTMLLinkElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): * html/HTMLObjectElement.h: (HTMLObjectElement): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::addSubresourceAttributeURLs): * html/HTMLParamElement.h: (HTMLParamElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): * html/HTMLStyleElement.h: (HTMLStyleElement): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::addSubresourceAttributeURLs): * html/HTMLTableElement.h: (HTMLTableElement): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::addSubresourceAttributeURLs): * svg/SVGCursorElement.h: (SVGCursorElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): * svg/SVGFEImageElement.h: (SVGFEImageElement): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::addSubresourceAttributeURLs): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::addSubresourceAttributeURLs): * svg/SVGScriptElement.h: (SVGScriptElement): 2012-05-30 Shezan Baig Rename offsetTopLeft in RenderBoxModelObject to something better https://bugs.webkit.org/show_bug.cgi?id=85915 Reviewed by Darin Adler. Renamed offsetTopLeft in RenderBoxModelObject to adjustedPositionRelativeToOffsetParent, because it returns the given startPoint after adjusting it to be relative to the top-left corner of the offsetParent. The definition of offsetParent itself is non-trivial and is documented within the body of RenderObject::offsetParent, therefore I decided to reuse this term, as-is, in the name of this function. No new tests; no functional or visible changes. * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetLeft): (WebCore::RenderBox::offsetTop): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent): (WebCore::RenderBoxModelObject::offsetLeft): (WebCore::RenderBoxModelObject::offsetTop): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetLeft): (WebCore::RenderInline::offsetTop): 2012-05-29 Adrienne Walker Transformed fixed position layers have an incorrect overlap map entry https://bugs.webkit.org/show_bug.cgi?id=64201 Reviewed by Darin Adler. Previously, layers that both had a transform and were fixed position were not considered as being fixed position in RenderGeometryMap or in RenderBox::mapLocalToContainer (although this case is not incorrect in the case of painting, so an external caller likely adjusts for this). Tests: compositing/layer-creation/fixed-position-and-transform.html compositing/layer-creation/fixed-position-under-transform.html * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::mapToAbsolute): 2012-05-30 Ulan Degenbaev [v8] Crash after redefining setter on typed array to a number https://bugs.webkit.org/show_bug.cgi?id=87862 Reviewed by Kenneth Russell. Remove calls to typed array set() method from C++. Store the copying script as a hidden property of a typed array prototype. Test: fast/canvas/webgl/array-override-set.html * bindings/v8/custom/V8ArrayBufferViewCustom.cpp: (WebCore): (WebCore::getHiddenCopyMethod): (WebCore::installHiddenCopyMethod): (WebCore::copyElements): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore): (WebCore::constructWebGLArray): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8ArrayBufferViewCustomScript.js: 2012-05-30 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=87882 [New Multicolumn] Rename layoutColumns to relayoutForPagination and make it virtual so that it can be implemented by RenderMultiColumnBlock. Reviewed by Anders Carlsson. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::relayoutForPagination): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::relayoutForPagination): (WebCore): * rendering/RenderMultiColumnBlock.h: (RenderMultiColumnBlock): 2012-05-30 Daniel Drake Check for GTK2/GTK3 symbol mismatch earlier https://bugs.webkit.org/show_bug.cgi?id=87687 Reviewed by Martin Robinson. No new tests. Regressions in core behavior are covered by existing plugin tests and the fix deals with particular aspects of the system environment that are difficult to test. Detect plugins that would mix GTK+ symbols earlier, so that the WebKit can skip them and choose a more appropriate plugin module. * plugins/gtk/PluginPackageGtk.cpp: Move this code from PluginViewGtk. (WebCore::moduleMixesGtkSymbols): (WebCore::PluginPackage::load): * plugins/gtk/PluginViewGtk.cpp: Move this code to PluginPackageGtk. (WebCore::PluginView::platformStart): 2012-05-30 Allan Sandfeld Jensen [Qt] Support IMAGE_DECODER_DOWN_SAMPLING flag. https://bugs.webkit.org/show_bug.cgi?id=87840 Based on patches by Qi Zhang and Jussi Lehto. Reviewed by Kenneth Rohde Christiansen. * platform/graphics/Image.cpp: (WebCore::Image::adjustSourceRectForDownSampling): * platform/graphics/Image.h: (Image): * platform/graphics/openvg/ImageOpenVG.cpp: (WebCore::BitmapImage::draw): * platform/graphics/qt/ImageQt.cpp: (WebCore::Image::drawPattern): (WebCore::BitmapImage::draw): 2012-05-30 Shinya Kawanaka comparePositions in htmlediting should consider nested Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=87623 Reviewed by Ryosuke Niwa. comparePositions in htmlediting.cpp didn't consider nested Shadow DOM. This patch makes it possible to compare the nodes in nested Shadow DOM. The algorithm is: we calculate the common tree scope of node A and B, and adjust the nodes to the treeScope, then compare them. If the adjusted nodes are the same, we check the shadow descendent of each node. Test: editing/shadow/compare-positions-in-nested-shadow.html * dom/TreeScope.cpp: (WebCore::listTreeScopes): (WebCore): (WebCore::commonTreeScope): * dom/TreeScope.h: (WebCore): * editing/htmlediting.cpp: (WebCore::comparePositions): 2012-05-30 Erik Arvidsson [V8] Clean up V8LazyEventListener to use one less function call https://bugs.webkit.org/show_bug.cgi?id=87785 Reviewed by Kentaro Hara. Instead of relying on 'arguments' we rely on 'this'. 'this' cannot be intercepted by a with-statement so it is safe to use that to bind the context objects. This allows us to remove one layer of function indirection in the generated code. Covered by existing tests. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): 2012-05-30 Tim Horton Factor DeferrableOneShotTimer out of GraphicsContextCG/GeneratorGeneratedImage https://bugs.webkit.org/show_bug.cgi?id=87824 Reviewed by Simon Fraser. DeferrableOneShotTimer is a timer which takes a class and method to call (as Timer does), and a delay. It exposes restart(), stop(), and isActive(), and none of the rest of the TimerBase interface. On restart(), the timer is started with the given delay, unless it's already running, in which case a flag is set to automatically restart the timer when it fires instead of calling the given method. This provides a low-overhead way to implement a deferrable timer. No new tests, refactoring. * platform/Timer.h: (DeferrableOneShotTimer): (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): New class. (WebCore::DeferrableOneShotTimer::restart): (WebCore::DeferrableOneShotTimer::fired): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::invalidateCacheTimerFired): * platform/graphics/GeneratorGeneratedImage.h: (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage): Make use of DeferrableOneShotTimer. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer): Make use of DeferrableOneShotTimer. (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired): 2012-05-30 Xueqing Huang eventSender.beginDragWithFiles should be implemented in Windows, which blocked drag and drop related tests. https://bugs.webkit.org/show_bug.cgi?id=86296 Reviewed by Tony Chang. Test: This change was requirement for eventSender.beginDragWithFiles, update win/Skipped file to remove drag and drop related tests will valiate it. * platform/win/DragDataWin.cpp: (WebCore::DragData::numberOfFiles): 2012-05-30 Caio Marcelo de Oliveira Filho HashTable.h has using directives for std::pair and std::make_pair https://bugs.webkit.org/show_bug.cgi?id=29919 Reviewed by Darin Adler. Change code to use std::pair and std::make_pair. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postNotification): * html/MediaFragmentURIParser.cpp: (WebCore::MediaFragmentURIParser::parseFragments): * html/parser/HTMLMetaCharsetParser.cpp: (WebCore::HTMLMetaCharsetParser::processMeta): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): * page/PageSerializer.cpp: (WebCore::isCharsetSpecifyingNode): 2012-05-30 Peter Rybin Web Inspector: disable ExactlyInt feature in InspectorTypeBuilder since it breaks release Windows 7 WK2 https://bugs.webkit.org/show_bug.cgi?id=87857 Reviewed by Yury Semikhatsky. Code generator is patched to support old style of int parameter. * inspector/CodeGeneratorInspector.py: (TypeModel.init_class): 2012-05-30 Alexei Filippov Web Inspector: Add trace() method to the WorkerConsole https://bugs.webkit.org/show_bug.cgi?id=87656 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived): * inspector/front-end/HeapSnapshotWorker.js: (WebInspector.WorkerConsole.prototype.trace): 2012-05-30 Kinuko Yasuda File.lastModifiedDate must return null if the modified time info is not available https://bugs.webkit.org/show_bug.cgi?id=87709 Reviewed by Kentaro Hara. Per File API spec, File.lastModifiedDate must return null if the modified time info is not available. http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate Test: http/tests/local/fileapi/file-last-modified-after-delete.html * fileapi/File.cpp: (WebCore::File::lastModifiedDateForBinding): Added. (WebCore): * fileapi/File.h: (File): * fileapi/File.idl: Added ImplementedAs=lastModifiedDateForBinding. 2012-05-30 Jochen Eisinger Match Firefox restrictions to window.blur and window.focus https://bugs.webkit.org/show_bug.cgi?id=86969 Reviewed by Adam Barth. Disallow window.blur altogether, and only allow window.focus to be invoked from the context that created this very window. There's a new setting (windowFocusRestricted) that defaults to true. If false, the new restrictions are lifted. This can be used by ports that would prefer to stick with the old behavior. For tests, this setting is accessible in window.internals.settings To temporarily allow window.focus(), an object of type WindowFocusAllowedIndicator can be created. It is currently used to enable window.focus() during dispatch of the click event for notifications. Tests: fast/dom/Window/mozilla-focus-blur.html fast/notifications/notifications-click-event-focus.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * notifications/Notification.cpp: (WebCore::Notification::dispatchClickEvent): * page/DOMWindow.cpp: (WebCore::DOMWindow::focus): (WebCore::DOMWindow::blur): * page/DOMWindow.h: (DOMWindow): * page/DOMWindow.idl: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): (WebCore::Settings::setWindowFocusRestricted): (WebCore::Settings::windowFocusRestricted): * page/WindowFocusAllowedIndicator.cpp: Added. (WebCore): (WebCore::WindowFocusAllowedIndicator::windowFocusAllowed): (WebCore::WindowFocusAllowedIndicator::WindowFocusAllowedIndicator): (WebCore::WindowFocusAllowedIndicator::~WindowFocusAllowedIndicator): * page/WindowFocusAllowedIndicator.h: Added. (WebCore): (WindowFocusAllowedIndicator): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setWindowFocusRestricted): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-30 Mariusz Grzegorczyk , Ryuan Choi [EFL][WK2] Fix WebKit2-EFL build https://bugs.webkit.org/show_bug.cgi?id=83693 Reviewed by Carlos Garcia Campos. * CMakeLists.txt: Add GestureTapHighlighter.cpp. 2012-05-29 Antti Koivisto Rename Foo::addSubresourceStyleURLs and Node::addSubresourceAttributeURLs https://bugs.webkit.org/show_bug.cgi?id=87739 Rubber-stamped by Andreas Kling. Rename them to collectSubresourceURLs and collectSubresourceURLsFromAttributes to match the naming conventions. Move collectSubresourceURLsFromAttributes from Node to Element as only elements have attributes. * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::collectSubresourceURLs): * css/CSSFontFaceSrcValue.h: (CSSFontFaceSrcValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::collectSubresourceURLs): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::collectSubresourceURLs): * css/CSSReflectValue.h: (CSSReflectValue): * css/CSSValue.cpp: (WebCore::CSSValue::collectSubresourceURLs): * css/CSSValue.h: (CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::collectSubresourceURLs): * css/CSSValueList.h: (CSSValueList): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::collectSubresourceURLs): * css/StylePropertySet.h: (StylePropertySet): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::collectSubresourceURLs): * css/StyleSheetContents.h: (StyleSheetContents): * dom/Element.h: (WebCore::Element::collectSubresourceURLsFromAttributes): (Element): * dom/Node.cpp: (WebCore::Node::getSubresourceURLs): * dom/Node.h: (WebCore): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::collectSubresourceURLsFromAttributes): * dom/ProcessingInstruction.h: (ProcessingInstruction): * dom/StyledElement.cpp: (WebCore::StyledElement::collectSubresourceURLsFromAttributes): * dom/StyledElement.h: (StyledElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::collectSubresourceURLsFromAttributes): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::collectSubresourceURLsFromAttributes): * html/HTMLEmbedElement.h: (HTMLEmbedElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::collectSubresourceURLsFromAttributes): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::collectSubresourceURLsFromAttributes): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::collectSubresourceURLsFromAttributes): * html/HTMLLinkElement.h: (HTMLLinkElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::collectSubresourceURLsFromAttributes): * html/HTMLObjectElement.h: (HTMLObjectElement): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::collectSubresourceURLsFromAttributes): * html/HTMLParamElement.h: (HTMLParamElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::collectSubresourceURLsFromAttributes): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::collectSubresourceURLsFromAttributes): * html/HTMLStyleElement.h: (HTMLStyleElement): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::collectSubresourceURLsFromAttributes): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::collectSubresourceURLsFromAttributes): * html/HTMLTableElement.h: (HTMLTableElement): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::collectSubresourceURLsFromAttributes): * svg/SVGCursorElement.h: (SVGCursorElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::collectSubresourceURLsFromAttributes): * svg/SVGFEImageElement.h: (SVGFEImageElement): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::collectSubresourceURLsFromAttributes): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::collectSubresourceURLsFromAttributes): * svg/SVGScriptElement.h: (SVGScriptElement): 2012-05-30 Eugene Klyuchnikov Web Inspector: Fix JS compiler warning https://bugs.webkit.org/show_bug.cgi?id=87836 Reviewed by Yury Semikhatsky. * inspector/front-end/SettingsScreen.js: Fix method annotation. 2012-05-30 Zoltan Horvath [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder https://bugs.webkit.org/show_bug.cgi?id=80400 This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder. The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support the requested image type. The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed. This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages, because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config tests for these libraries were introduced in r110045. Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark (collection of popular sites, page-loading benchmark) with this patch. Reviewed by Simon Hausmann. No new tests needed. * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources. * WebCore.pri: Move WebCore ImageDecoder include paths out of guards. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types. (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types. * platform/graphics/ImageSource.cpp: Remove unnecessary includes. * platform/graphics/ImageSource.h: Remove unnecessary typedefs. (WebCore): * platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed. (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon. (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap. (WebCore): (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp. * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header. (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform. * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes. (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed. (ImageFrame): * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to ImageDecoderQt.cpp. 2012-05-23 Kinuko Yasuda REGRESSION: We should allow null modificationTime when snapshot metadata is given https://bugs.webkit.org/show_bug.cgi?id=86811 Reviewed by Jian Li. r117432 has introduced a new File constructor which allows the caller to pass in a snapshot file metadata. In the change we had considered the given metadata is valid if "metadata.length >= 0 AND metadata.lastModifiedDate != 0", but we should drop the latter condition (lastModifiedDate != 0) because 1. the value 0 is used to indicate the time information is unavailable in File, and 2. it is valid per spec (http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate says the UA must return null if the information is not available). (Note: the current js/v8 binding returns Date(0) for the time value 0, which is still valid as epoch time but would fail to indicate the unavailability of the information. In this patch I added FIXME in File.idl and filed a separate issue http://webkit.org/b/87709) No new tests as this change does not affect regular files/filesystems behavior. (Tests in Chrome OS port should be able to verify this) * fileapi/File.cpp: (WebCore::File::lastModifiedDate): (WebCore::File::size): (WebCore::File::captureSnapshot): * fileapi/File.h: (File): 2012-05-30 MORITA Hajime [Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible. https://bugs.webkit.org/show_bug.cgi?id=87818 Reviewed by Kentaro Hara. Added them as DOMWindow properties Tests: fast/dom/shadow/content-element-api.html fast/dom/shadow/shadow-element.html * page/DOMWindow.idl: 2012-05-30 Mike Lawther CSS3 calc: Implement CSSOM support https://bugs.webkit.org/show_bug.cgi?id=84551 Reviewed by Ryosuke Niwa. Adds a pretty printer for the calc expression tree. Test: css3/calc/cssom.html * css/CSSCalculationValue.cpp: (WebCore::CSSCalcValue::customCssText): (WebCore::CSSCalcPrimitiveValue::customCssText): (WebCore::CSSCalcBinaryOperation::customCssText): (CSSCalcBinaryOperation): * css/CSSCalculationValue.h: (CSSCalcExpressionNode): 2012-05-29 Li Yin [FileAPI] The result attribute of FileReader shuold use null to replace empty string https://bugs.webkit.org/show_bug.cgi?id=87578 Reviewed by Jian Li. Spec: http://www.w3.org/TR/FileAPI/#dfn-result If the readyState is EMPTY (no read method has been called) or an error in reading the File or Blob has occurred (using any read method), then the result attribute MUST return null. Currently, Firefox11, Opera and IE 10 follows the spec, but Webkit based browser doesn't. WebKit should change the returned value empty string into null to keep conformance with the spec. Tests: fast/files/read-file-async.html fast/files/workers/worker-read-file-async.html * fileapi/FileReader.cpp: (WebCore::FileReader::arrayBufferResult): (WebCore::FileReader::stringResult): 2012-05-29 Mark Pilgrim [Chromium] Move fileExists to Platform.h https://bugs.webkit.org/show_bug.cgi?id=87531 Reviewed by Adam Barth. Call fileExists through fileUtilities(), not directly. * platform/chromium/FileSystemChromium.cpp: (WebCore::fileExists): 2012-05-29 Kentaro Hara Remove a dummy style sheet from CSSParser::parseFlowThread() https://bugs.webkit.org/show_bug.cgi?id=87715 Reviewed by Darin Adler. r118736 changed CSSGrammar.y so that it works fine with no style sheet. r118736 removed a dummy style sheet from CSSParser::parserSelector(). Now we can safely remove a dummy style sheet from parserFlowThread(). Tests: fast/regions. No change in test results. * css/CSSParser.cpp: (WebCore::CSSParser::parseFlowThread): 2012-05-29 Yoshifumi Inoue REGRESSION(r111497): The "option" element doesn't match CSS pseudo class :enabled https://bugs.webkit.org/show_bug.cgi?id=87719 Reviewed by Kent Tamura. This patch added checking of "option" element for CSS pseudo class :enabled as same as :disabled to selector checker. Before r111497, it was done by using isFormControlElement. After that revision, HTMLOptionElement was no longer derived from HTMLFormControlElement. Test: fast/form/select/optgroup-rendering.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): Checking element is option element as same as PseudoDisabled in PseudoEnabled case. 2012-05-29 Hayato Ito Introduces ComposedShadowTreeParentWalker, extracted from ComposedShadowTreeWalker. https://bugs.webkit.org/show_bug.cgi?id=87004 Reviewed by Dimitri Glazkov. Introduces a ComposedShadowTreeParentWalker, which is only used for traversing a parent node (including shadow roots and insertion points) and get rid of an equivalent function from ComposedShadowTreeWalker. Before this patch, there is an inconsistency inside of ComposedShadowTreeWalker. The Walker uses 'Policy' to decide whether it should visit shadow roots or not, but parentIncludingInsertionPointAndShadowRoot() member function ignores the policy. We can not add an assertion in its constructor due to this inconsistency. To resolve it, we could add yet another special policy, but that makes the implementation complex and may add some overhead in runtime. So separate the functionality into another class as ComposedShadowTreeParentWalker. No new tests, no new functionality except for assertion. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker): (WebCore::ComposedShadowTreeParentWalker::ComposedShadowTreeParentWalker): (WebCore): (WebCore::ComposedShadowTreeParentWalker::parentIncludingInsertionPointAndShadowRoot): (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot): * dom/ComposedShadowTreeWalker.h: (ComposedShadowTreeWalker): (WebCore::ComposedShadowTreeWalker::assertPrecondition): (WebCore): (ComposedShadowTreeParentWalker): (WebCore::ComposedShadowTreeParentWalker::get): * dom/EventDispatcher.cpp: (WebCore::EventRelatedTargetAdjuster::adjust): (WebCore::EventDispatcher::ensureEventAncestors): * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): 2012-05-29 Hayato Ito Add assertions to make sure that event's target and relatedTarget are accessible. https://bugs.webkit.org/show_bug.cgi?id=87641 Reviewed by Dimitri Glazkov. No new tests. No new functionality except for assertions. * dom/EventContext.cpp: (WebCore::EventContext::EventContext): * dom/EventContext.h: (WebCore): (EventContext): (WebCore::EventContext::setRelatedTarget): (WebCore::EventContext::accessible): 2012-05-29 Kent Tamura Fix inefficient usage of traverseNextNode() https://bugs.webkit.org/show_bug.cgi?id=87804 Reviewed by Ryosuke Niwa. foo->traverseNextNode(foo) is equivalent to foo->firstChild(), and firstChild() is more efficient. No new tests because of no behavior change. * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder): Replace traverseNextNode() with firstChild(), and shorten a variable name. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): Replace traverseNextNode() with firstChild(). 2012-05-29 Jonathan Dong [BlackBerry] Loading media data with http authentication https://bugs.webkit.org/show_bug.cgi?id=84214 Reviewed by George Staikos. RIM PR: 117618 Implemented http authentication feature for media by implementing two interface functions in class MediaPlayerPrivate: onAuthenticationNeeded(): this function is triggered when MMR engine requires http authentication. We search the CredentialStorage to see if we have already stored existing credential information, or challenge user to provide it. OnAuthenticationAccepted(): this function is triggered when MMR engine accepts the credential information, and we need to save it in CredentialStorage for later use. Internally reviewed by Max Feil . Manual test case: blackberry/video-load-with-authentication.html * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::generateProtectionSpaceFromMMRAuthChallenge): (WebCore): (WebCore::MediaPlayerPrivate::onAuthenticationNeeded): (WebCore::MediaPlayerPrivate::onAuthenticationAccepted): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): 2012-05-29 MORITA Hajime [Shadow DOM] Node distribution should be orthogonal from node attachment https://bugs.webkit.org/show_bug.cgi?id=87223 Reviewed by Dimitri Glazkov. This chagne reorganizes Shadow DOM subtree distribution implementation. Originally, it was interleaved across attach() of several classes like InsertionPoint and ShadowRoot. Its invalidation was also mixed as a part of the style recalculation and detach()-es. This change extracts these bits of code to a set of ContentDistributor methods, which are facaded by two ElementShadow API. Following two API are the primary entry points: - ElementShadow::ensureDistribution() - ElementShadow::invalidateDistribution() The actual implementations are ContentDistributor::distribute() and ContentDistributor::invalidate() respectively. When clients need to traverse composed tree, before attach() for example, they should call ensureDistribution() to make sure that the traversal data structure ("the distribution") is ready. When there is any DOM mutation which can result a composed tree mutation, then clients should call invalidateDistribution() to mark the distribution being dated. Here are such DOM mutations: - The children of any ShadowRoots are changed, - The children of any InsertionPoints are changed, - The children of any host elements are changed, - Any insertion point is inserted to or removed from the shadow tree, - @select attribute of is modified and - New ShadowRoot is added to the shadow tree. Note that the validity of the distribution is tracked and unnecessary distribution requests are ignored. After the invalidation, that shadow subtrees are detached once and request their re-attachment through the style recalculation. Then, on the responding style recalculation and attach(), new distribution will be computed. No new tests. Covered by existing tests. * dom/Element.cpp: (WebCore::Element::~Element): (WebCore::Element::childrenChanged): * dom/ElementShadow.cpp: (WebCore::ElementShadow::~ElementShadow): (WebCore::ElementShadow::addShadowRoot): (WebCore::ElementShadow::removeAllShadowRoots): (WebCore::ElementShadow::attach): (WebCore::ElementShadow::recalcStyle): (WebCore::ElementShadow::ensureDistribution): (WebCore::ElementShadow::invalidateDistribution): * dom/ElementShadow.h: (ElementShadow): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRendererFactory::createRendererIfNeeded): * dom/NodeRenderingContext.h: (NodeRenderingContext): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setApplyAuthorStyles): (WebCore::ShadowRoot::attach): (WebCore::ShadowRoot::childrenChanged): (WebCore): * dom/ShadowRoot.h: (ShadowRoot): * html/HTMLFormControlElement.cpp: * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::ContentDistributor): (WebCore::ContentDistributor::~ContentDistributor): (WebCore::ContentDistributor::findInsertionPointFor): (WebCore::ContentDistributor::distribute): (WebCore::ContentDistributor::invalidate): (WebCore::ContentDistributor::finishInivalidation): (WebCore::ContentDistributor::distributeSelectionsTo): (WebCore::ContentDistributor::distributeShadowChildrenTo): (WebCore::ContentDistributor::invalidateDistributionIn): * html/shadow/ContentDistributor.h: (WebCore::ContentDistributor::needsInvalidation): (ContentDistributor): (WebCore::ContentDistributor::needsDistribution): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::attach): (WebCore::InsertionPoint::detach): (WebCore::InsertionPoint::nextTo): (WebCore::InsertionPoint::previousTo): (WebCore::InsertionPoint::childrenChanged): * html/shadow/InsertionPoint.h: (WebCore::InsertionPoint::setDistribution): (WebCore::InsertionPoint::clearDistribution): (InsertionPoint): 2012-05-29 Luke Macpherson Implement post-landing feedback for WebKitCSSTransformValue::customCSSText(). https://bugs.webkit.org/show_bug.cgi?id=87684 Reviewed by Darin Adler. Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed. This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation and WTF_ARRAY_LENGTH instead of hard coding the array length. Covered by existing transform tests. * css/WebKitCSSTransformValue.cpp: (WebCore): (WebCore::WebKitCSSTransformValue::customCssText): 2012-05-29 Eric Seidel Fix ENABLE_IFRAME_SEAMLESS to actually fully disable