2012-10-24 Seokju Kwon [SOUP] Provide logging for SocketStreamHandleSoup https://bugs.webkit.org/show_bug.cgi?id=100215 Reviewed by Alexey Proskuryakov. Add logging to SocketStreamHandleSoup to facilitate debugging. * platform/network/soup/SocketStreamHandleSoup.cpp: (WebCore::SocketStreamHandle::SocketStreamHandle): (WebCore::SocketStreamHandle::~SocketStreamHandle): (WebCore::SocketStreamHandle::platformSend): (WebCore::SocketStreamHandle::platformClose): 2012-10-24 Nico Weber Pass on exif orientation from ImageSource when using the open-source image decoders https://bugs.webkit.org/show_bug.cgi?id=100164 Reviewed by Eric Seidel. The orientation is honored always for image documents, and optionally for elements if shouldRespectImageOrientation is set (off by default). However, the feature needs port-specific modifications to GraphicsContext (without this, webcore will use the rotated bounds but draw the image as if it hadn't be rotated, resulting in squished pixels), and most ports don't implement these yet -- so put turning this on for image documents behind a port-specific #ifdef. No observable behavior change. Once it's hooked up, it will be tested by fast/images/exif-orientation.html. * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::size): (WebCore::ImageSource::frameSizeAtIndex): (WebCore::ImageSource::orientationAtIndex): * platform/graphics/chromium/DeferredImageDecoder.cpp: (WebCore::DeferredImageDecoder::orientation): (WebCore): * platform/graphics/chromium/DeferredImageDecoder.h: (DeferredImageDecoder): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::readImageOrientation): * rendering/RenderObject.cpp: (WebCore::RenderObject::shouldRespectImageOrientation): 2012-10-24 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=100169 We should make TileCache tiles the size of the tile coverage rect when we can't do fast scrolling -and- Reviewed by Simon Fraser. Some websites that don't do fast scrolling still scroll slower than they do with tiled drawing disabled. https://bugs.webkit.org/show_bug.cgi?id=99768 addressed some of this performance problem, but there is still more ground to make up. This patch addresses the remaining issue by making tiles the size of the window when we can't do fast scrolling. The constructor and create function no longer take a size parameter. That's all fully controlled within TileCache now. m_tileSize is no longer const. * platform/graphics/ca/mac/TileCache.h: Store the current default size as constants so that we can access it in both the constructor and adjustTileSizeForCoverageRect(). * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): This new function will set m_tileSize to the size of the tile coverage rect if the tile coverage is limited to the visible area. Otherwise, the tiles are set to be the default size. (WebCore::TileCache::adjustTileSizeForCoverageRect): Call adjustTileSizeForCoverageRect(). (WebCore::TileCache::revalidateTiles): No need to send in a size anymore. * platform/graphics/ca/mac/WebTileCacheLayer.h: (WebCore): 2012-10-24 David Barton MathML tests trigger font cache assertions in debug bots https://bugs.webkit.org/show_bug.cgi?id=100268 Reviewed by Eric Seidel. Add a FontCachePurgePreventer to fix this. Tested by existing tests. * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): 2012-10-24 Tim Horton Update main frame scroll position immediately for programmatic scrolls https://bugs.webkit.org/show_bug.cgi?id=98074 Reviewed by Simon Fraser. Immediately update the main frame scroll position after a programmatic scroll, so that performing a scrollBy or scrollTo will be instantly reflected in all of the scroll offset accessors. No new tests; this will be tested by many scrolling tests once WebKitTestRunner can use threaded scrolling. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::requestScrollPositionUpdate): 2012-10-24 Mihai Parparita [Chromium] Allow pushState and related history APIs to be disabled per context https://bugs.webkit.org/show_bug.cgi?id=99780 Reviewed by Adam Barth. Chrome Apps do not support the history API (or navigation in general). Since pushState is generally feature detected, it's cleanest to disable it via a V8 per-context feature, so that applications can have the appropriate fallback behavior (other history APIs are re-mapped to throw exceptions, since history.back() and the link are not feature detected). * dom/ContextFeatures.cpp: (WebCore::ContextFeatures::pushStateEnabled): (WebCore): * dom/ContextFeatures.h: * dom/Document.cpp: (WebCore::Document::enqueuePopstateEvent): * page/History.idl: 2012-10-24 Tommy Widenflycht MediaStream API: Make sure all events are dispatched asynchronously https://bugs.webkit.org/show_bug.cgi?id=100286 Reviewed by Adam Barth. This is necessary to safeguard against if the UA uses synchronous UA->WebKit calls, and the web application calls methods on the RTCPeerConnection in the event callbacks. Test: fast/mediastream/RTCPeerConnection-events.html Also tested by the chromium webrtc fuzz tests. * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::negotiationNeeded): (WebCore::RTCPeerConnection::didGenerateIceCandidate): (WebCore::RTCPeerConnection::didAddRemoteStream): (WebCore::RTCPeerConnection::didRemoveRemoteStream): (WebCore::RTCPeerConnection::didAddRemoteDataChannel): (WebCore::RTCPeerConnection::changeReadyState): (WebCore::RTCPeerConnection::changeIceState): (WebCore): (WebCore::RTCPeerConnection::scheduleDispatchEvent): (WebCore::RTCPeerConnection::scheduledEventTimerFired): * Modules/mediastream/RTCPeerConnection.h: (RTCPeerConnection): 2012-10-24 Mark Pilgrim [Chromium] Remove screen-related functions from PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=97474 Reviewed by Adam Barth. Screen-related functions like screenHorizontalDPI that used to be on PlatformSupport are now accessed through a new PlatformPageClient attached to Widget in WebCore-land, which is implemented by ChromeClientImpl in WebKit-land, which proxies calls to WebWidgetClient, which is actually implemented in Chromium-land. * WebCore.gypi: * platform/Widget.h: * platform/chromium/PageClientChromium.h: Copied from Source/WebCore/platform/chromium/PlatformWidget.h. (PageClientChromium): * platform/chromium/PlatformScreenChromium.cpp: (WebCore::toPlatformPageClient): (WebCore): (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): (WebCore::screenDepth): (WebCore::screenDepthPerComponent): (WebCore::screenIsMonochrome): (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-10-24 Adam Barth [V8] WorkerContextExecutionProxy doesn't need to track events https://bugs.webkit.org/show_bug.cgi?id=100295 Reviewed by Eric Seidel. This code was added when this code was originally upstreamed as part of the Chromium port. There doesn't appear to be any reason why WorkerContextExecutionProxy needs to keep a Vector of raw event pointers. Those points are likely to become dangling, making the rest of what this code does very sketchy. * bindings/v8/V8WorkerContextEventListener.cpp: (WebCore::V8WorkerContextEventListener::callListenerFunction): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::dispose): * bindings/v8/WorkerContextExecutionProxy.h: (WebCore::WorkerContextExecutionState::WorkerContextExecutionState): (WorkerContextExecutionProxy): 2012-10-24 Max Vujovic [CSS Shaders] The mesh should be specified using order https://bugs.webkit.org/show_bug.cgi?id=96285 Reviewed by Dean Jackson. Change StyleResolver and CSSComputedStyleDeclaration to handle the mesh parameters in column, row order. Test: css3/filters/custom/custom-filter-mesh-column-row-order.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::valueForFilter): Append the number of columns before the number of rows in the meshParameters CSSValueList. * css/StyleResolver.cpp: (WebCore::StyleResolver::createCustomFilterOperation): Store the second mesh parameter in meshRows instead of meshColumns. 2012-10-24 Jae Hyun Park loaderRunLoop() should use synchronization instead of while loop https://bugs.webkit.org/show_bug.cgi?id=55402 Reviewed by Alexey Proskuryakov. Originally, loaderRunLoop() sleeps until a thread has started and set the loaderRunLoopObject static variable. This patch uses ThreadCondition to synchronize instead of a while loop. No new tests (No behavior change). * platform/network/cf/LoaderRunLoopCF.cpp: (WebCore::runLoaderThread): (WebCore::loaderRunLoop): * platform/network/cf/LoaderRunLoopCF.h: (WebCore): 2012-10-24 Sailesh Agrawal Incorrect keycodes for numpad /, -, +, . https://bugs.webkit.org/show_bug.cgi?id=99188 Reviewed by Tony Chang. In r57951 we switched to mapping keys by character code. This regressed the numpad keys which no longer match the Windows virtual key codes. This CL fixes this by never mapping numpad keys by character code. Test: platform/mac/fast/events/numpad-keycode-mapping.html * platform/mac/PlatformEventFactoryMac.mm: (WebCore::windowsKeyCodeForKeyEvent): 2012-10-24 Simon Fraser Null-check the RenderView in ocument::windowScreenDidChange to fix a crash when saving PDFs https://bugs.webkit.org/show_bug.cgi?id=100141 Reviewed by Tim Horton. For PDF documents the RenderView is null, so null-check it to avoid a crash when saving PDFs. * dom/Document.cpp: (WebCore::Document::windowScreenDidChange): 2012-10-24 Terry Anderson Handle two-finger tap gestures in the same way as long-press gestures https://bugs.webkit.org/show_bug.cgi?id=99947 Reviewed by Adam Barth. Currently a long-press gesture is used to dispatch a context menu (for platforms defining CONTEXT_MENUS) or to select text (for Android). Additionally, for platforms defining TOUCH_ADJUSTMENT, gesture target fuzzing is performed on the location and touch area of the long-press gesture. This CL will cause two-finger tap gestures to be handled in the same way as long-press gestures. The location and touch area of a two-finger tap gesture will correspond to the location and touch area of the first finger down; the location/area of the second finger will be ignored. Test: touchadjustment/touch-links-two-finger-tap.html * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureLongPress): (WebCore): (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu): (WebCore::EventHandler::handleGestureTwoFingerTap): (WebCore::EventHandler::adjustGesturePosition): * page/EventHandler.h: (EventHandler): 2012-10-24 Chris Fleizach AX:When aria-label is used, the text under an element is still appearing as the AXTitle https://bugs.webkit.org/show_bug.cgi?id=98167 Reviewed by Beth Dakin. According to WAI-ARIA text computation, the presence of aria-label and alternative text should override the visible text within an element. Test: platform/mac/accessibility/aria-label-overrides-visible-text.html * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityTitle]): 2012-10-24 Sheriff Bot Unreviewed, rolling out r132303 and r132312. http://trac.webkit.org/changeset/132303 http://trac.webkit.org/changeset/132312 https://bugs.webkit.org/show_bug.cgi?id=100287 Triggering crashes on many popular websites (Requested by leviw|gardening on #webkit). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: * css/CSSPropertySourceData.h: * css/RuleSet.cpp: (WebCore::RuleData::RuleData): (WebCore::RuleSet::addRule): (WebCore::RuleSet::addRegionRule): (WebCore::RuleSet::addRulesFromSheet): (WebCore::RuleSet::addStyleRule): * css/RuleSet.h: (RuleData): (RuleSet): * css/StyleResolver.cpp: (WebCore::makeRuleSet): (WebCore::StyleResolver::appendAuthorStyleSheets): (WebCore::StyleResolver::matchScopedAuthorRules): (WebCore::StyleResolver::locateSharedStyle): * css/StyleResolver.h: (StyleResolver): * css/StyleRule.cpp: (WebCore::StyleRuleBase::reportMemoryUsage): (WebCore::StyleRuleBase::destroy): (WebCore::StyleRuleBase::copy): (WebCore::StyleRuleBase::createCSSOMWrapper): * css/StyleRule.h: * css/StyleScopeResolver.cpp: (WebCore::StyleScopeResolver::reportMemoryUsage): * css/StyleScopeResolver.h: (WebCore): (StyleScopeResolver): * css/StyleSheetContents.cpp: (WebCore::childRulesHaveFailedOrCanceledSubresources): 2012-10-24 Joshua Bell IndexedDB: Cursor property value identities should be preserved https://bugs.webkit.org/show_bug.cgi?id=100051 Reviewed by Tony Chang. Some W3C test submissions point out that subsequent accesses to cursor properties should yield the same value until the cursor advances. We handled this with custom binding code for IDBCursor.value but not IDBCursor.key or IDBCursor.primaryKey. The custom value code is being removed in webkit.org/b/100034 in favor of returning ScriptValue and the same fix can be applied to key/primaryKey. Test: storage/indexeddb/cursor-properties.html * Modules/indexeddb/IDBCursor.cpp: Compute/store/serve up ScriptValues instead of IDBKeys (WebCore::IDBCursor::key): (WebCore::IDBCursor::primaryKey): (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBCursor.h: (IDBCursor): (WebCore::IDBCursor::idbPrimaryKey): Expose this for callers that need access to the IDBKey * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBObjectStore.cpp: ... like this one. (WebCore): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::dispatchEvent): Pass along script context, for the conversion. * bindings/v8/IDBBindingUtilities.cpp: (WebCore::idbKeyToScriptValue): New method for explicit conversion. (WebCore): * bindings/v8/IDBBindingUtilities.h: (WebCore): 2012-10-24 Ami Fischman call to setNeedsLayout during RenderVideo::paintReplaced https://bugs.webkit.org/show_bug.cgi?id=100265 Reviewed by Eric Carlson. Removed unnecessary call and added new defensive guards to catch erroneous setNeedsLayout() calls during paints earlier (so the offending calls are in the emitted stacktrace). No new tests - new defensive checks are triggered by existing tests. * page/FrameView.cpp: (WebCore::FrameView::paintContents): forbid setNeedsLayout() during painting * rendering/RenderObject.cpp: (WebCore): (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope): (WebCore::RenderObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope): * rendering/RenderObject.h: (RenderObject): (SetLayoutNeededForbiddenScope): added helper class for forbidding setNeedsLayout() in a scope. * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): drop the offending & unnecessary call to updatePlayer(). 2012-10-24 Adam Barth [V8] ActiveDOMObjectEpilogueVisitor is unnecessary and can be deleted https://bugs.webkit.org/show_bug.cgi?id=100208 Reviewed by Eric Seidel. Rather than clearing and re-establishing the weak callback for ActiveDOMObjects during every GC, this patch puts all the ActiveDOMObjects with pending activity into an object group with a live object, causing them not to be garbage collected. In addition to simplifying this code, this patch makes the patch in https://bugs.webkit.org/show_bug.cgi?id=100175 much easier because V8GCController no longer needs to know how to configure the weak callbacks for these objects. * bindings/v8/V8GCController.cpp: (WebCore::ActiveDOMObjectPrologueVisitor::ActiveDOMObjectPrologueVisitor): (ActiveDOMObjectPrologueVisitor): (WebCore::ActiveDOMObjectPrologueVisitor::visitDOMWrapper): (WebCore::V8GCController::majorGCPrologue): (WebCore::V8GCController::majorGCEpilogue): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::V8PerIsolateData): * bindings/v8/V8PerIsolateData.h: (WebCore::V8PerIsolateData::liveRoot): (V8PerIsolateData): 2012-10-24 Brady Eidson Add a strategy for loader customization. https://bugs.webkit.org/show_bug.cgi?id=100278 Reviewed by Alexey Proskuryakov. It's empty for now and does nothing, just like the goggles. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::loaderStrategy): (PlatformStrategies): (WebCore::PlatformStrategies::PlatformStrategies): 2012-10-24 Tony Chang Setting width of a flexitem causes the adjacent flex item to be displayed poorly. https://bugs.webkit.org/show_bug.cgi?id=99925 Reviewed by Ojan Vafai. Make sure that we always repaint when moving a child. This is similar to what RenderDeprecatedFlexibleBox does. Test: css3/flexbox/repaint-during-resize-no-flex.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Move logic for repaining into the helper method for setting the location of a child. (WebCore::RenderFlexibleBox::layoutColumnReverse): Remove code for repaint since it's now in setFlowAwareLocationForChild. (WebCore::RenderFlexibleBox::adjustAlignmentForChild): Remove code for repaint since it's now in setFlowAwareLocationForChild. 2012-10-24 Simon Fraser Fix CALayer hiearchy when combining tiling with preserve-3d https://bugs.webkit.org/show_bug.cgi?id=100205 Reviewed by Dean Jackson. When an element has "transform-style: preserve-3d", its GraphicsLayerCA has a m_structuralLayer which is a CATransformLayer. The primary CALayer which contains rendered content becomes a sublayer of the CATransformLayer. If the element has backface-visibility:hidden, it is the primary layer that is set to be single-sided. In r131940 we started to use TileCaches in place of CATiledLayer. TileCaches work via "customSublayers" returned from the PlatformCALayer, where the custom sublayer is the tile cache container layer. However, the custom sublayers were being added as children of the structural (CATransformLayer) layer, not of the primary (CALayer) layer, thus they were not affected by the doubleSided property. This change cleans up the confusing code in GraphicsLayerCA::updateSublayerList() by maintaining two vectors of PlatformCALayers, one for sublayers of the structural layer, and one for sublayers of the primary layer. It adds custom sublayers to the latter list, so now the tile cache container layer becomes a sublayer of the primary layer, so is affected by that layer's doubleSided property. Test: compositing/tiling/backface-preserve-3d-tiled.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateSublayerList): 2012-10-23 Zhenyao Mo Update mozilla's CheckedInt.h to the latest version https://bugs.webkit.org/show_bug.cgi?id=100177 Reviewed by Kenneth Russell. * html/canvas/CheckedInt.h: Sync with mozilla's copy with minumum modifications. (detail): (IsSupportedPass2): (IsSupported): (UnsignedType): (IsSigned): (TwiceBiggerType): (PositionOfSignBit): (MinValue): (MaxValue): (WebCore::detail::HasSignBit): (WebCore::detail::BinaryComplement): (WebCore::detail::IsInRange): (WebCore::detail::IsAddValid): (WebCore::detail::IsSubValid): (WebCore::detail::IsMulValid): (WebCore::detail::IsDivValid): (WebCore::detail::OppositeIfSignedImpl::run): (WebCore::detail::OppositeIfSigned): (WebCore): (CheckedInt): (WebCore::CheckedInt::CheckedInt): (WebCore::CheckedInt::value): (WebCore::CheckedInt::isValid): (WebCore::CheckedInt::operator -): (WebCore::CheckedInt::operator ==): (WebCore::CheckedInt::operator++): (WebCore::CheckedInt::operator--): (CastToCheckedIntImpl): (WebCore::detail::CastToCheckedIntImpl::run): (WebCore::castToCheckedInt): (WebCore::operator ==): * html/canvas/DataView.cpp: change valid() to isValid(). (WebCore::DataView::create): * html/canvas/WebGLBuffer.cpp: Ditto. (WebCore::WebGLBuffer::associateBufferDataImpl): (WebCore::WebGLBuffer::associateBufferSubDataImpl): * html/canvas/WebGLRenderingContext.cpp: Ditto. (WebCore): (WebCore::WebGLRenderingContext::drawArrays): * platform/graphics/GraphicsContext3D.cpp: Ditto. (WebCore::GraphicsContext3D::computeImageSizeInBytes): 2012-10-24 Noam Rosenthal [Qt-on-Mac] GraphicsSurfaces should not create a global IOSurface handle https://bugs.webkit.org/show_bug.cgi?id=89885 Reviewed by Kenneth Rohde Christiansen. Use mach_port instead of global tokens for IOSurfaces. Global IOSurfaces are accessible from other processes using their handle, while mach_ports can only be shared directly via IPC. Tested by existing WebGL tests. * platform/graphics/surfaces/GraphicsSurfaceToken.h: (GraphicsSurfaceToken): * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate): 2012-10-24 Rick Byers image-set doesn't round-trip properly with cssText https://bugs.webkit.org/show_bug.cgi?id=99725 Reviewed by Beth Dakin. Fix serialization of -webkit-image-set rules to use the same format as is used for parsing. Test: fast/css/image-set-setting.html * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::customCssText): * css/CSSValueList.h: (WebCore::CSSValueList::item): Add const overload 2012-10-24 Jonathan Feldstein BlackBerry fix for webgl-depth-texture.html https://bugs.webkit.org/show_bug.cgi?id=100258 Reviewed by Yong Li. Removed a platform specific define that is unnecessary. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::computeFormatAndTypeParameters): 2012-10-24 Nico Weber Honor image orientation in GraphicsContextSkia https://bugs.webkit.org/show_bug.cgi?id=100179 Reviewed by Stephen White. Also fix a bug in ImageOrientation.h: Some of the values were switched. They now match the description in the exif spec at http://www.exif.org/Exif2-2.PDF page 18, and the notes at http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html and the picture at http://www.80sidea.com/archives/2316. They showed up correctly in Safari because the orientation transform was done after flipping Y. Let the flipping happen later. I verified that flipping transformation order and fixing the exif enum cancelled each other out, so this has no effect on the apple port. Not hooked up yet, so no observable difference. * platform/graphics/BitmapImage.h: * platform/graphics/ImageOrientation.h: (WebCore::ImageOrientation::usesWidthAsHeight): (WebCore::ImageOrientation::fromEXIFValue): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): * platform/graphics/skia/ImageSkia.cpp: (WebCore::paintSkBitmap): (WebCore::BitmapImage::draw): (WebCore): 2012-10-24 Alexey Proskuryakov Fixed Windows path for SharedWorkerStrategy.h - it's in workers/, not platform/. * WebCore.vcproj/WebCore.vcproj: 2012-10-24 Chris Fleizach AX: WebKit exposes abstract ARIA role range as AXSlider; should be generic AXGroup https://bugs.webkit.org/show_bug.cgi?id=100204 Reviewed by Beth Dakin. Remove the "range" role as a valid ARIA role. Test: platform/mac/accessibility/aria-slider-value.html * accessibility/AccessibilityObject.cpp: (WebCore::createARIARoleMap): 2012-10-24 Florin Malita [Chromium] SVG repaint issues https://bugs.webkit.org/show_bug.cgi?id=99874 Reviewed by Levi Weintraub. RenderSVGRoot::paintReplaced() converts the container offsets to a relative transform, but in doing so it ends up accumulating subpixel rounding deltas twice: first for adjustedPaintOffset and second in localToParentTransform(). If coordinates are on half-pixel boundaries, the 2x rounding delta yields a full pixel drift and we end up painting at the wrong location. This can be avoided by using localToBorderBoxTransform() directly, which (unlike localToParentTransform()) doesn't perform rounding. No new tests: existing pixel results cover this change after rebaseline. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): 2012-10-24 Levi Weintraub Fixing the Chromium build after typo in r132367. * WebCore.gypi: 2012-10-24 Nico Weber [chromium] Respect image orientation in image dragging code https://bugs.webkit.org/show_bug.cgi?id=100200 Reviewed by Tony Chang. Based on the corresponding code in DragImageMac.mm. The image rotation code isn't hooked up yet, so no observable effect for now. * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::createDragImageFromImage): 2012-10-24 Michael Saboff Code cleanup after r132165 https://bugs.webkit.org/show_bug.cgi?id=100135 Reviewed by Geoffrey Garen. Fixed up some unneccesary and inefficient constructs in MarkupTokenBase.h. Code clean up without functional changes, therefore no new tests. * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::beginEndTag): Changed argument to be const Vector&. (WebCore::MarkupTokenBase::appendToCharacter): Changed argument to be const Vector&. (WebCore::MarkupTokenBase::appendToName): Elimintated inline. (WebCore::MarkupTokenBase::name): Elimintated inline. (WebCore::MarkupTokenBase::nameString): Elimintated inline. 2012-10-24 Toni Barzic Crash when trying to write exception message to null console https://bugs.webkit.org/show_bug.cgi?id=99658 Reviewed by Adam Barth. DOMWindow::console may return NULL, so we should do a NULL check before adding message to it. This may happen e.g. if a worker throws an exception just as the document is being replaced in the view. The exception task could be processes after current window in the frame changes, and console in the document window is nulled. Test: fast/workers/worker-exception-during-navigation.html * dom/Document.cpp: (WebCore::Document::addMessage): 2012-10-24 Cosmin Truta Incorrect conditional use of LogFTP https://bugs.webkit.org/show_bug.cgi?id=100260 Reviewed by Alexey Proskuryakov. Use LogFTP if !LOG_DISABLED, to allow toggling ASSERTIONS_DISABLED_DEFAULT without breaking the build. * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): 2012-10-23 Alexey Proskuryakov Add a strategy for shared workers https://bugs.webkit.org/show_bug.cgi?id=100165 Reviewed by Brady Eidson. Also a little bit of alphabetization. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/PlatformStrategies.h: * workers/SharedWorkerStrategy.h: Added. 2012-10-24 David Barton [MathML] Timeouts on linux after r132264 https://bugs.webkit.org/show_bug.cgi?id=100202 Reviewed by Eric Seidel. When building a stretched operator, such as a large parenthesis or bracket, we need to check that the extension glyph's height is > 0, to avoid an infinite loop. The 0 height can occur if the glyph is missing on the host system. Tested by existing tests. * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): 2012-10-24 Parth Patel [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to Generic ThreadUnsafe Singleton https://bugs.webkit.org/show_bug.cgi?id=100145 Reviewed by Rob Buis. Extending the singletons to generic singleton and changing getInstance() in IconDatabaseClientBlackBerry to instance() to match the generic singleton template. Reviewed Internally by Yong Li. Tests are not modified and added as there was no behavioural change. * platform/blackberry/SharedTimerBlackBerry.cpp: (SharedTimerBlackBerry): (WebCore): 2012-10-24 Ilya Tikhonovsky Web Inspector: NMI add instrumentation for ResourceBuffer. It gives us 10mb on gmail https://bugs.webkit.org/show_bug.cgi?id=100254 Reviewed by Yury Semikhatsky. * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::reportMemoryUsage): (WebCore): * loader/ResourceBuffer.h: (ResourceBuffer): 2012-10-24 Eric Carlson Allow ports to override text track rendering style https://bugs.webkit.org/show_bug.cgi?id=97800 Unreviewed Build fix. CGFloat is already a float in a 32-bit build so narrowPrecisionToFloat() is unnecessary * page/CaptionUserPreferencesMac.mm: (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): 2012-10-24 Eric Carlson Allow ports to override text track rendering style https://bugs.webkit.org/show_bug.cgi?id=97800 Reviewed by Maciej Stachowiak. * WebCore.exp.in: Export new WebkitSystemInterface functions. * WebCore.xcodeproj/project.pbxproj: Add CaptionUserPreferences.h, CaptionUserPreferencesMac.mm, and CaptionUserPreferencesMac.h. * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window, background, and text independently. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions(). (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks. (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks. (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions(). (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions(). (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused. (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks. (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from setClosedCaptionsVisible * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member variable. Get caption font scale from theme instead of hard coding. * html/shadow/MediaControlElements.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::TextTrack): Change attributes from String to AtomicString. (WebCore::TextTrack::isValidKindKeyword): Ditto. (WebCore::TextTrack::setKind): Ditto. (WebCore::TextTrack::setMode): Ditto. (WebCore::TextTrack::mode): Ditto. * html/track/TextTrack.h: (WebCore::TextTrack::create): Ditto. (WebCore::TextTrack::kind): Ditto. (WebCore::TextTrack::label): Ditto. (WebCore::TextTrack::setLabel): Ditto. (WebCore::TextTrack::language): Ditto. (WebCore::TextTrack::setLanguage): Ditto. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id. (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the shadow pseudo id so it can be used elsewhere. (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId. (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the shadow pseudo id so it can be used elsewhere. (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto. (WebCore::TextTrackCue::updateDisplayTree): * html/track/TextTrackCue.h: * page/CaptionUserPreferences.h: Added. * page/CaptionUserPreferencesMac.h: Added. * page/CaptionUserPreferencesMac.mm: Added. (WebCore::userCaptionPreferencesChangedNotificationCallback): (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): New, passthrough to WKSI function. (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Ditto. (WebCore::CaptionUserPreferencesMac::captionsWindowColor): Return Color with user's caption window color preference. (WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption background color preference. (WebCore::CaptionUserPreferencesMac::captionsTextColor): Return Color with user's caption text color preference. (WebCore::CaptionUserPreferencesMac::captionsEdgeColorForTextColor): Return Color for text edge effect. (WebCore::CaptionUserPreferencesMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow or webkit-text-stroke property. (WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property with a color value. (WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption text with the user's preferred text edge stye. (WebCore::CaptionUserPreferencesMac::captionsDefaultFont): Return a String with css to style caption text with the user's preferred font. (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Return a String with css to style captions with the user's preferred style. (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Return the user's preferred caption font scale. (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Notify listeners of caption preference change. (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences changes listener. (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences changes listener. (WebCore::CaptionUserPreferencesMac::updateCaptionStyleSheetOveride): New, if theme has a captions style sheet override, inject it into the current page group, otherwise remove injected sheet. * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferences): (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): New, passthrough to platform specific function of the same name. (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto. (WebCore::PageGroup::userPrefersCaptions): Ditto. (WebCore::PageGroup::userHasCaptionPreferences): Ditto. (WebCore::PageGroup::captionFontSizeScale): Ditto. * page/PageGroup.h: * platform/mac/WebCoreSystemInterface.h: Updated. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2012-10-24 Vsevolod Vlasov Web Inspector: Introduce workspace provider as a content providing backend for project. https://bugs.webkit.org/show_bug.cgi?id=100244 Reviewed by Pavel Feldman. Introduced WorkspaceProvider interface as a content providing backend for project. Added NetworkWorkspaceProvider as a network based (default) implementation. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping): * inspector/front-end/DebuggerScriptMapping.js: (WebInspector.DebuggerScriptMapping): * inspector/front-end/NetworkUISourceCodeProvider.js: (WebInspector.NetworkUISourceCodeProvider): (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource): (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded): (WebInspector.NetworkUISourceCodeProvider.prototype._addFile): * inspector/front-end/NetworkWorkspaceProvider.js: Added. (WebInspector.NetworkWorkspaceProvider): (WebInspector.NetworkWorkspaceProvider.prototype.requestFileContent): (WebInspector.NetworkWorkspaceProvider.prototype.setFileContent): (WebInspector.NetworkWorkspaceProvider.prototype.searchInFileContent): (WebInspector.NetworkWorkspaceProvider.prototype.addFile): (WebInspector.NetworkWorkspaceProvider.prototype.removeFile): (WebInspector.NetworkWorkspaceProvider.prototype.reset): * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping): (_bindUISourceCode): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet): * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: (WebInspector.FileDescriptor): (WebInspector.WorkspaceProvider): (WebInspector.WorkspaceProvider.prototype.requestFileContent): (WebInspector.WorkspaceProvider.prototype.searchInFileContent): (WebInspector.WorkspaceProvider.prototype.addEventListener): (WebInspector.WorkspaceProvider.prototype.removeEventListener): (WebInspector.Project): (WebInspector.Project.prototype.reset): (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype._fileRemoved): (WebInspector.Project.prototype.requestFileContent): (WebInspector.Project.prototype.searchInFileContent): (WebInspector.Workspace): (WebInspector.Workspace.prototype.addProject): (WebInspector.Workspace.prototype.project): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2012-10-24 Nikita Vasilyev Web Inspector: Styles pane: Don't select whole value when I select just a part https://bugs.webkit.org/show_bug.cgi?id=100242 Reviewed by Alexander Pavlov. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick): (WebInspector.StylePropertyTreeElement.prototype): 2012-10-24 Vsevolod Vlasov Web Inspector: UiSourceCode should rely on the workspace as a content provider. https://bugs.webkit.org/show_bug.cgi?id=100216 Reviewed by Pavel Feldman. Workspace is now passed to UISourceCode to be used as a content provider. Content providers are now stored in the workspace/project. Next step would be to move content providers to workspace providers. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.breakpointStorageId): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.contentType): (WebInspector.UISourceCode.prototype.requestContent): (WebInspector.UISourceCode.prototype.requestOriginalContent): (WebInspector.UISourceCode.prototype._commitContent): (WebInspector.UISourceCode.prototype.searchInContent): * inspector/front-end/Workspace.js: (WebInspector.WorkspaceController.prototype._mainFrameNavigated): (WebInspector.Project): (WebInspector.Project.prototype.addUISourceCode): (WebInspector.Project.prototype.removeUISourceCode): (WebInspector.Project.prototype.uiSourceCodes): (WebInspector.Project.prototype.requestFileContent): (WebInspector.Project.prototype.searchInFileContent): (WebInspector.Workspace): (WebInspector.Workspace.prototype.addTemporaryUISourceCode): (WebInspector.Workspace.prototype.removeTemporaryUISourceCode): (WebInspector.Workspace.prototype.reset): 2012-10-24 Zeno Albisser Implement GraphicsSurface for Windows. https://bugs.webkit.org/show_bug.cgi?id=98147 Reviewed by Kenneth Rohde Christiansen. * Target.pri: Include GraphicsSurfaceWin.cpp in SOURCES on Windows. * platform/graphics/surfaces/GraphicsSurface.h: Add typedef for PlatformGraphicsSurface on Windows. * platform/graphics/surfaces/GraphicsSurfaceToken.h: Add typedef for BufferHandle on Windows. (GraphicsSurfaceToken): * platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp: Added. The GraphicsSurface implementation on Windows relies on the availability of ANGLE and the EGL_ANGLE_query_surface_pointer extension. For Qt this requirements are implicitly satisfied, when Qt is built on Windows and QT_CONFIG contains OpenGLES2. The GraphicsSurface then renders a given texture onto an offscreen pixel buffer surface, queries the surface pointer using the EGL_ANGLE_query_surface_pointer extension, and transmits the received surface pointer (share handle) over IPC. On the UIProcess side, the surface pointer can then be resolved using eglCreatePbufferFromClientBuffer. (WebCore): (WebCore::loadShader): Initialize the shaders needed for drawing onto the GraphicsSurface. (GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): In case of the instance being on the WebProcess side, create an EGLContext that shares the texture objects with the provided share context. Also create two pixel buffer surfaces, one as front- and one as backbuffer. Query the surface pointers for the pixel buffer surfaces and initialize the GraphicsSurfaceToken that can be passed over IPC later. (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate): Release all aquired resources and destroy the pixel buffer surfaces. Also close the EGL-Display connection. (WebCore::GraphicsSurfacePrivate::copyFromTexture): Make the belonging context current on the back buffer surface and use drawTexture() to draw the provided texture onto the GraphicsSurface. (WebCore::GraphicsSurfacePrivate::makeCurrent): Save the previously current context, then make the context belonging to the GraphicsSurface current. (WebCore::GraphicsSurfacePrivate::doneCurrent): Restore the context that was current before calling makeCurrent(). (WebCore::GraphicsSurfacePrivate::swapBuffers): Swap front and back buffer surfaces and handles. (WebCore::GraphicsSurfacePrivate::token): (WebCore::GraphicsSurfacePrivate::frontBufferTextureID): This function is meant to be called from the UIProcess side. If no front buffer surface has been created before for the current front buffer handle, one will be created. Then eglBindTexImage will be used to actually bind the current front buffer surface to a texture as a source for drawing. (WebCore::GraphicsSurfacePrivate::initialFrontBufferShareHandle): (WebCore::GraphicsSurfacePrivate::frontBufferShareHandle): (WebCore::GraphicsSurfacePrivate::backBufferShareHandle): (WebCore::GraphicsSurfacePrivate::releaseFrontBufferTexture): Free the resources related to the front buffer surface. On the UIProcess side we never actually bind the back buffer. (WebCore::GraphicsSurfacePrivate::initializeShaderProgram): Initialize and link the shader programs necessary for drawing onto the GraphicsSurface. (WebCore::GraphicsSurfacePrivate::createSurfaceFromShareHandle): Creates a single pixel buffer surface from a share Handle. This function will be called on the UIProcess side, for the front buffer handle, whenever the buffers have been swapped. (WebCore::GraphicsSurfacePrivate::drawTexture): The WebProcess uses this function to draw a given texture onto the GraphicsSurface's back buffer. (WebCore::GraphicsSurface::platformExport): (WebCore::GraphicsSurface::platformGetTextureID): (WebCore::GraphicsSurface::platformCopyToGLTexture): (WebCore::GraphicsSurface::platformCopyFromTexture): (WebCore::GraphicsSurface::platformPaintToTextureMapper): Uses TextureMapperGL::drawTexture() to draw the front buffer texture to the TextureMapper on the UIProcess side. (WebCore::GraphicsSurface::platformFrontBuffer): (WebCore::GraphicsSurface::platformSwapBuffers): (WebCore::GraphicsSurface::platformCreate): (WebCore::GraphicsSurface::platformImport): (WebCore::GraphicsSurface::platformLock): (WebCore::GraphicsSurface::platformUnlock): (WebCore::GraphicsSurface::platformDestroy): 2012-09-27 Yury Semikhatsky Web Inspector: provide memory instrumentation for ListHashSet https://bugs.webkit.org/show_bug.cgi?id=97786 Reviewed by Vsevolod Vlasov. Switched existing usages of addListHashSet to the generic instrumentation mechanism as it should work just just fine now that there is a memory instrumentation of ListHashSet. * dom/DocumentEventQueue.cpp: * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::reportMemoryUsage): 2012-10-24 Charles Wei [BlackBerry] Credentials not re-used for a redirected request to the same domain https://bugs.webkit.org/show_bug.cgi?id=100193 Reviewed by George Staikos. We should store the credentials in the redirection response handler, if the request is challenged. Because the redirect response suggests the authentication succeeds. Test: http://browsertest01.rim.net/authbasic * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleRedirect): 2012-10-24 Alexander Pavlov Web Inspector: Implement CSS reload upon related SASS resource saving https://bugs.webkit.org/show_bug.cgi?id=98024 Reviewed by Vsevolod Vlasov. SASS-generated debug info in CSS is parsed to find out which SASS files contributed to this stylesheet. Upon SASS file save in the Sources panel, all affected external CSS stylesheets are reloaded to update the page styles (presuming that SASS is running in the "watch" mode during the development cycle). * English.lproj/localizedStrings.js: * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping): (WebInspector.SASSSourceMapping.prototype._fileSaveFinished.callback): (WebInspector.SASSSourceMapping.prototype._reloadCSS): (_bindUISourceCode): (_addCSSURLforSASSURL): * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.GenericSettingsTab): 2012-10-23 Yury Semikhatsky Memory instrumentation: don't count agent-specific front-ends separately https://bugs.webkit.org/show_bug.cgi?id=100087 Reviewed by Alexander Pavlov. Pointers to domain-specific inspector front-end interfaces are reported as weak pointers instead of members to avoid double-counting. Test by comparing set of reported instrumented objects with the set of objects allocated by tcmalloc. * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::reportMemoryUsage): * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::reportMemoryUsage): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::reportMemoryUsage): 2012-10-23 Christophe Dumez Regression(r132303) Broke debug build when SHADOW_DOM is enabled but STYLE_SCOPED is disabled https://bugs.webkit.org/show_bug.cgi?id=100203 Unreviewed Build fix. Fix compilation error in StyleResolver.h when SHADOW_DOM flag is set and STYLE_SCOPED is not. No new tests, no behavior change. * css/StyleResolver.h: (WebCore::StyleResolver::ensureScopeResolver): 2012-10-23 Andreas Kling Remove specialized hash traits for GlyphPages. Reviewed by Dan Bernstein. Now that the default minimum table size has been lowered for all tables, there's no need for this specialization anymore. * platform/graphics/FontFallbackList.h: (FontFallbackList): 2012-10-23 Kent Tamura Multiple fields input UI: Don't use CSS properties for physical direction https://bugs.webkit.org/show_bug.cgi?id=100195 Reviewed by Kentaro Hara. CSS declarations such as "padding: 0 0 0 1px;" "margin-left: 0.2em;" are not direction-neutral, and makes unexpected appearance in RTL. We should use -webkit-padding-start or -webkit-margin-start. No new tests. Covered by date-multiple-fields-appearance-l10n.html and month-multiple-fields-appearance-l10n.html * css/html.css: (input[type="date"]): Use padding:0 and -webkit-padding-start:1px; (input[type="datetime"]): Ditto. (input[type="datetime-local"]): Ditto. (input[type="month"]): Ditto. (input[type="time"]): Ditto. (input[type="week"]): Ditto. (input[type="week"]::-webkit-inner-spin-button): Use -webkit-margin-start. Also use an integral pixel size instead of avoid a fractional relative size to avoid subpixel layout rounding. 2012-10-23 Dan Bernstein The font cache evicts inactive font data too aggressively when not under memory pressure https://bugs.webkit.org/show_bug.cgi?id=100194 Reviewed by Sam Weinig. Increasing the number of inactive font data objects the cache may hold increases the hit rate, leading to improved page load performance. When memory pressure is detected, MemoryPressureHandler evicts all inactive objects, regardless of the limits we are increasing here. * platform/graphics/FontCache.cpp: (WebCore): Increased the maximum number of inactive font data objects in the cache from 50 to 225, and the number of objects to evict once the limit is met from 20 to 25. 2012-10-23 Takashi Sakamoto [Shadow DOM] Needs @host rule for ShadowDOM styling https://bugs.webkit.org/show_bug.cgi?id=88606 Reviewed by Hajime Morita. Implemented @host-@rules according to the shadow dom spec: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#host-at-rule The design doc is: https://docs.google.com/document/d/1P2yorchF8lci2sccr-mVSRf2dtvjKeiuyQWzCB2bEA8/edit Test: fast/dom/shadow/athost-atrules.html * css/CSSGrammar.y.in: Added rules for parsing @host @-rules. * css/CSSParser.cpp: (WebCore::CSSParser::detectAtToken): Added a new token "@host". (WebCore::CSSParser::createHostRule): Added a new method to create an @host @-rule, which is invoked from (WebCore): * css/CSSParser.h: Added a declaration of the above new method: createHostRule. * css/CSSPropertySourceData.h: Added HOST_RULE to enum Type. * css/RuleSet.cpp: (WebCore::RuleData::RuleData): Modified multiple bool arguments into one argument. Now it uses combinations of values from enum AddRuleFlags. (WebCore::RuleSet::addRule): (WebCore::RuleSet::addRegionRule): (WebCore::RuleSet::addStyleRule): Updated according to the RuleData's change. Modified to Invoke increaseSpecificity if the given rule is @host @-rule. (WebCore::RuleSet::addRulesFromSheet): Invoked addHostRule if the given rule is @host @-rule. * css/RuleSet.h: (RuleData): (WebCore::RuleData::increaseSpecificity): Added a new method to increase selector's specificity. This method is used to make @host @-rules' specificity larger than normal author rules' specificity. (RuleSet): * css/StyleResolver.cpp: (WebCore::makeRuleSet): (WebCore::StyleResolver::addHostRule): A wrapper method to invoke StyleScopeResolver::addHostRule. The method is used to make only StyleResolver know an implementation detail about class StyleScopeResolver. (WebCore::StyleResolver::appendAuthorStylesheets): Updated according to the RuleData's change. (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules): A new method to find matched host rules when an element is given. This method invokes StyleScopeResolver::styleSharingCandidateMatchesHostRules to find matched host rules. (WebCore): (WebCore::StyleResolver::matchHostRules): A new method to find matched host rules when an element is given. This method invokes StyleScopeResolver::matchHostRules to find matched host rules. (WebCore::StyleResolver::matchScopedAuthorRules): Modified to invoke matchHostRules. (WebCore::StyleResolver::locateSharedStyle): Disable sibling style cache if the given element is a shadow host and any @host @-rules are applied to the element. * css/StyleResolver.h: (WebCore::StyleResolver::ensureScopeResolver): If no scopeResolver is created, create and return the instance. If created, just return the instance. (StyleResolver): * css/StyleRule.cpp: (WebCore::StyleRuleBase::reportMemoryUsage): (WebCore::StyleRuleBase::destroy): (WebCore::StyleRuleBase::copy): (WebCore::StyleRuleBase::createCSSOMWrapper): (WebCore::StyleRuleHost::StyleRuleHost): Implemented class StyleRuleHost. The class is almost the same as StyleRuleBlock except type. (WebCore): * css/StyleRule.h: (WebCore::StyleRuleBase::isHostRule): (StyleRuleHost): (WebCore::StyleRuleHost::create): (WebCore::StyleRuleHost::copy): (WebCore): * css/StyleScopeResolver.cpp: (WebCore::StyleScopeResolver::ensureAtHostRuleSetFor): A new method to create a new RuleSet for the given shadow root. (WebCore): (WebCore::StyleScopeResolver::atHostRuleSetFor): A new private inline method to obtain @host @-rules declared in the given shadow root. (WebCore::StyleScopeResolver::addHostRule): Added a new method to register @host @-rules with shadow roots. (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules): A new method to find whether any @host @-rules are applied to the given host element. (WebCore::StyleScopeResolver::matchHostRules): A new method to find matched rules for the given host element. (WebCore::StyleScopeResolver::reportMemoryUsage): * css/StyleScopeResolver.h: (WebCore): (StyleScopeResolver): * css/StyleSheetContents.cpp: (WebCore::childRulesHaveFailedOrCanceledSubresources): 2012-10-23 Andreas Kling REGRESSION(r130643): ASSERTION FAILED: result.iterator != end() below PluginDatabase::add Reviewed by Anders Carlsson. Restore the pre-r130643 hash table size for PluginDatabase to prevent these easily reproducible collisions. This will need a proper fix at some point. * plugins/PluginDatabase.h: * plugins/PluginPackage.h: (PluginPackageHashTraits): 2012-10-23 Simon Fraser Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText() https://bugs.webkit.org/show_bug.cgi?id=100159 Reviewed by Tim Horton. Add a LAYER_TREE_INCLUDES_PAGE_TILE_CACHE flag for layerTreeAsText(), and plumb it through to GraphicsLayerCA, which dumps the TiledBacking tile coverage rect. Test: platform/mac/tiled-drawing/use-tiled-drawing.html * page/Frame.h: * platform/graphics/GraphicsLayer.cpp: (showGraphicsLayerTree): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::tiledBacking): * platform/graphics/TiledBacking.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::tiledBacking): (WebCore::GraphicsLayerCA::dumpAdditionalProperties): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/ca/mac/TileCache.h: (WebCore::TileCache::tileCoverageRect): (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::computeTileCoverageRect): (WebCore::TileCache::revalidateTiles): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerTreeAsText): * testing/Internals.cpp: (WebCore::Internals::layerTreeAsText): * testing/Internals.h: * testing/Internals.idl: 2012-10-23 Simon Fraser Flush pending GraphicsLayer changes when reattaching compositing layers if necessary https://bugs.webkit.org/show_bug.cgi?id=100187 Reviewed by Dan Bernstein. Fix a regression from r131940. That revision changed RenderLayerCompositor::flushPendingLayerChanges() to bail if the root layer is unattached, which indicates that we're in the page cache, or in a background tab. However, that dropped the layer flush on the floor, so that any subsequent changes to GraphicsLayerCAs would just pile up and never get flushed. This was most evident on pages that require frequent flushing, such as those running animated GIFs. Fix by setting a flag in flushPendingLayerChanges() if we're unattached. Consult the flag when re-attaching the root layer, and if it's set, flush the GraphicsLayers. Not testable because we can't test detaching and re-adding web views in DRT/WTR. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): Initialize m_shouldFlushOnReattach to false. (WebCore::RenderLayerCompositor::flushPendingLayerChanges): If the root layer attachment is RootLayerUnattached, set the m_shouldFlushOnReattach flag before returning. (WebCore::RenderLayerCompositor::attachRootLayer): If m_shouldFlushOnReattach, flush the layers, saying that we're the flush root. * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): Add m_shouldFlushOnReattach flag. 2012-10-23 Sheriff Bot Unreviewed, rolling out r132276. http://trac.webkit.org/changeset/132276 https://bugs.webkit.org/show_bug.cgi?id=100189 It broke the Qt-WK2 build intentionally (Requested by Ossy_night on #webkit). * page/Frame.h: * platform/graphics/GraphicsLayer.cpp: (showGraphicsLayerTree): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::tiledBacking): * platform/graphics/TiledBacking.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::tiledBacking): (WebCore::GraphicsLayerCA::dumpAdditionalProperties): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/ca/mac/TileCache.h: * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::tileCoverageRect): (WebCore::TileCache::revalidateTiles): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerTreeAsText): * testing/Internals.cpp: (WebCore::Internals::layerTreeAsText): * testing/Internals.h: * testing/Internals.idl: 2012-10-23 Philip Rogers Add extra check for data() in PageSerializer. https://bugs.webkit.org/show_bug.cgi?id=99102 Reviewed by Eric Seidel. The image returned from imageForRenderer() does not contain the raw SVG data so this patch adds a check for image->image()->data() before writing SVG in PageSerializer::addImageToResources. Covered by existing test WebPageNewSerializeTest.SVGImageDontCrash. * page/PageSerializer.cpp: (WebCore::PageSerializer::addImageToResources): 2012-10-23 Kent Tamura Move appendAsLDMLLiteral in LocaleWin.cpp to a common place https://bugs.webkit.org/show_bug.cgi?id=100129 Reviewed by Kentaro Hara. We're going to use appendAsLDMLLiteral in other code, and it is related to DateTimeFormat class. So we move it to DateTimeFormat class as quoteAndAppendLiteral. No new tests because of no behavior change. * platform/text/DateTimeFormat.cpp: (WebCore::DateTimeFormat::quoteAndAppendLiteral): Moved from LocaleWin.cpp * platform/text/DateTimeFormat.h: Declare StringBuilder by wtf/Forward.h. It also declares String. (DateTimeFormat): Declare quoteAndAppendLiteral. * platform/text/LocaleWin.cpp: (WebCore): Move appendLDMLLiteral to DateTimeFormat. (WebCore::convertWindowsDateFormatToLDML): Follow the moving. 2012-10-23 Kent Tamura REGRESSION(r131421): Text baseline is not aligned in some locales https://bugs.webkit.org/show_bug.cgi?id=100088 Reviewed by Hajime Morita. Before this patch, the element with ::-webkit-datetime-edit had -webkit-align-items:center. It was incorrect at all because it ignores baselines of each of inner fields. We need to change it to -webkit-align-items:baseline, or stop using -webkit-flex. However -webkit-align-items:baseline doesn't work because a spin button element in the element doesn't have the baseline. If we specified -webkit-align-items:baseline, the spin button would shift up. So, we change the element structure for multiple fields input elements. Before this patch, the structure was: input | - ::-webkit-date-and-time-container (flex cotainer) | |- ::-webkit-datetime-edit (has flexibility in date-and-time-container, also this is a flex container) | |- ::-webkit-datetime-edit-foo | | : | | | |- ::-webkit-date-time-edit-gap (has flexibility in datetime-edit) | - ::-webkit-inne-spin-button - ::-webkit-calendar-picker-indicator After the patch, the structure will be: input | - ::-webkit-date-and-time-container (flexible box) | |- ::-webkit-datetime-edit (has flexibility in date-and-time-container) | |- ::-webkit-datetime-edit-foo | | : | | | |- ::-webkit-inne-spin-button - ::-webkit-calendar-picker-indicator Because the spin button owner is date-and-time-container, we don't need to make the datetime-edit element a flex container. Also, we had rounding error by subpixel layout. To avoid it, we stop using fractional paddings. In order to implement this, we need to change the SpinButtonOwner interface provider from DateTimeEditElement to BaseMultipleFieldsDateAndTimeInputType. No new tests. Covered by month-multiple-fields-appearance-l10n.html. * css/html.css: (input::-webkit-datetime-edit): Stop making this a flex container. Inner fields in this use the single baseline. (input::-webkit-datetime-edit-ampm-field): Don't use fractional paddings to avoid rounding erros of subpixel layout. Use integral margin instead to avoid overwrap of focus ring and background-color of the field. (input::-webkit-datetime-edit-day-field): Ditto. (input::-webkit-datetime-edit-hour-field): Ditto. (input::-webkit-datetime-edit-millisecond-field): Ditto. (input::-webkit-datetime-edit-minute-field): Ditto. (input::-webkit-datetime-edit-month-field): Ditto. (input::-webkit-datetime-edit-second-field): Ditto. (input::-webkit-datetime-edit-week-field): Ditto. (input::-webkit-datetime-edit-year-field): Ditto. (input::-webkit-date-and-time-container): Ditto. * html/BaseMultipleFieldsDateAndTimeInputType.h: (BaseMultipleFieldsDateAndTimeInputType): Overrides SpinButtonOwner functions, and add m_spinButtonElement. * html/BaseMultipleFieldsDateAndTimeInputType.cpp: (WebCore::BaseMultipleFieldsDateAndTimeInputType::focusAndSelectSpinButtonOwner): Just delegate to DateTimeEditElement::focusIfNoFocus. (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToMouseEvents): Moved from DateTimeEditElement::shouldSpinButtonRespondToMouseEvents. (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToWheelEvents): Moved from DateTimeEditElement::shouldSpinButtonRespondToWheelEvents. (WebCore::BaseMultipleFieldsDateAndTimeInputType::spinButtonStepDown): Delegate to DateTimeEditElement::stepDown. (WebCore::BaseMultipleFieldsDateAndTimeInputType::spinButtonStepUp): Delegate to DateTimeEditElement::stepUp. (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType): Initialize m_spinButtonElement. (WebCore::BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType): Reset SpinButtonOwner for m_spinButtonElement like the old code of ~DateTimeEditElement. (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Put a SpinButtonElement between the DateTimeEditElement and the PickerIndicatorElement. (WebCore::BaseMultipleFieldsDateAndTimeInputType::forwardEvent): Take care of SpinButtonElement. (WebCore::BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged): Release capture of SpinButtonElement. This corresponds to the old code of DateTimeEditElement::updateUIState. (WebCore::BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged): Ditto. * html/TextFieldInputType.h: Make SpinButtonElement::SpinButtonOwner protected to allow overriding. * html/shadow/DateTimeEditElement.h: (DateTimeEditElement): Remove SpniButtonOwner implementation, m_spinButton, and rename some functions. * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditElement::DateTimeEditElement): Remove m_spinButton. (WebCore::DateTimeEditElement::~DateTimeEditElement): Ditto. (WebCore::DateTimeEditElement::focusIfNoFocus): Renamed from focusAndSelectSpinButtonOwner. This is called BaseMultipleFieldsDateAndTimeInputType::focusAndSelectSpinButtonOwner. (WebCore::DateTimeEditElement::layout): Remove creation code for -webkit-datetime-edit-gap and SpinButtonElement. (WebCore::DateTimeEditElement::defaultEventHandler): Move the code for m_spinButton to BaseMultipleFieldsDateAndTimeInputType::forwardEvent. (WebCore::DateTimeEditElement::hasFocusedField): A helper for BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToWheelEvents. (WebCore::DateTimeEditElement::stepDown): A helper for BaseMultipleFieldsDateAndTimeInputType::spinButtonStepDown. (WebCore::DateTimeEditElement::stepUp): A helper for BaseMultipleFieldsDateAndTimeInputType::spinButtonStepUp. (WebCore::DateTimeEditElement::updateUIState): Move the code to BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged and readonlyAttributeChanged. 2012-10-23 Andreas Kling Shrink immutable ElementAttributeData and StylePropertySet by one pointer each. Reviewed by Anders Carlsson. Remove one pointer of unintentional padding in the immutable versions of these objects. 583kB progression on Membuster3. * css/StylePropertySet.cpp: (WebCore::immutableStylePropertySetSize): * dom/ElementAttributeData.cpp: (WebCore::immutableElementAttributeDataSize): 2012-10-23 Nate Chapin Crash in WebCore::SubresourceLoader::willSendRequest. https://bugs.webkit.org/show_bug.cgi?id=100147 Reviewed by Abhishek Arya. No new tests. There is a test case that should cover this, but it doesn't work correctly on many platforms due to its use of testRunner.addURLToRedirect(). See http/tests/loading/cross-origin-XHR-willLoadRequest.html. Tested manually on http://www.nick.co.uk/shows/spongebob * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): 2012-10-23 Martin Robinson [GTK][Soup] Implement the default authentication dialog via WebCoreSupport https://bugs.webkit.org/show_bug.cgi?id=99351 Reviewed by Carlos Garcia Campos. Instead of connecting to the SoupSession::authenticate signal in the API layer via a SoupSessionFeature, route the message through the typical WebCore authentication mechanism. This is a step on the path to having full-blown support for authentication in the API allowing for custom authentication dialogs and behavior in clients. No new tests. This should not change behavior. * GNUmakefile.list.am: Add the new implementation file for the AuthenticationChallenge. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Include GTK+ here as well. * platform/gtk/GtkAuthenticationDialog.cpp: Instead of carrying a raw pointer to a SoupAuth carry a GRefPtr which will allow the dialog to be used even after the AuthenticationChallenge is destroyed. * platform/gtk/GtkAuthenticationDialog.h: ditto. * platform/network/ResourceHandle.h: Add a didReceiveAuthenticationChallenge method. * platform/network/ResourceHandleInternal.h: (ResourceHandleInternal): Remove the getter for the initiating page ID. * platform/network/soup/AuthenticationChallenge.h: Added an implementation of AuthenticationChallenge that takes a bit of data from the handle including SoupMessage, SoupAuth, and SoupSession. * platform/network/soup/AuthenticationChallengeSoup.cpp: Added. Ditto. * platform/network/soup/ResourceError.h: (ResourceError): Added a factory for authentication errors. * platform/network/soup/ResourceErrorSoup.cpp: Ditto. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::setSoupRequestInitiaingPageID): Just get the page directly from the NetworkingContext. (WebCore::createSoupMessageForHandleAndRequest): Always set the "handle" data on the message. It's always used now. (WebCore::ResourceHandle::start): Get the initiating page ID directly from the NetworkingContext. (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added this method which routes the authentication challenge to the client. (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): Added a stub for this method. (WebCore::ResourceHandle::loadResourceSynchronously): Don't pass the session to the loader. (WebCore::authenicateCallback): Added. (WebCore::ResourceHandle::defaultSession): Connect the authenticate callback. 2012-10-23 Adam Barth [V8] Simplify GCEpilogueVisitor along the same lines as GCPrologueVisitor https://bugs.webkit.org/show_bug.cgi?id=100157 Reviewed by Eric Seidel. This patch removes the traits template parameter from GCEpilogueVisitor and makes it mirror GCPrologueVisitor again. * bindings/v8/V8GCController.cpp: (WebCore): (ActiveDOMObjectEpilogueVisitor): (WebCore::ActiveDOMObjectEpilogueVisitor::ActiveDOMObjectEpilogueVisitor): (WebCore::ActiveDOMObjectEpilogueVisitor::visitDOMWrapper): (WebCore::V8GCController::majorGCEpilogue): 2012-10-23 Varun Jain Context menu generated from touch gestures on textareas has context of the cursor position instead of the position where the event occurs. https://bugs.webkit.org/show_bug.cgi?id=99520 Reviewed by Kenneth Rohde Christiansen. Send a synthetic mouse down event for context menu-summoning-gesture events so that textareas can correctly set cursors before receiving the context menu event. Test: fast/events/touch/gesture/right-click-gestures-set-cursor-at-correct-position.html * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::handleGestureTwoFingerTap): (WebCore): (WebCore::EventHandler::sendContextMenuEventForGesture): * page/EventHandler.h: (EventHandler): 2012-10-23 Andy Estes [WebKit2 API] Add properties to get textRects from a WKDOMRange or WKDOMNode https://bugs.webkit.org/show_bug.cgi?id=100162 Reviewed by Sam Weinig. * WebCore.exp.in: Exported symbols needed by WebKit2. * bindings/objc/DOM.mm: (-[DOMNode textRects]): Moved some logic into Node::textRects() (everything but the call to updateLayoutIgnorePendingStylesheets()). * dom/Node.cpp: (WebCore::Node::textRects): * dom/Node.h: 2012-10-23 Adam Barth [V8] Remove unused function from DOM wrapper visitor https://bugs.webkit.org/show_bug.cgi?id=100163 Reviewed by Eric Seidel. No one overrides these virtual functions. They were added in http://trac.webkit.org/changeset/73491, but we don't use them in the GC controller anymore. * bindings/v8/V8DOMMap.h: (WebCore::WeakReferenceMap::visit): 2012-10-23 Aaron Colwell Clear m_mediaSource reference when the MediaSource is closed https://bugs.webkit.org/show_bug.cgi?id=100047 Reviewed by Eric Carlson. The m_mediaSource object shouldn't be accessed after the object transitions to closed so this change simply clears the reference when that transition happens. No new tests because the change isn't visible to JavaScript. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): Removed a closed transition that is actually dead code. (WebCore::HTMLMediaElement::setSourceState): Clear the m_mediaSource reference on closed transition. 2012-10-23 Simon Fraser Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText() https://bugs.webkit.org/show_bug.cgi?id=100159 Reviewed by Tim Horton. Add a LAYER_TREE_INCLUDES_PAGE_TILE_CACHE flag for layerTreeAsText(), and plumb it through to GraphicsLayerCA, which dumps the TiledBacking tile coverage rect. Test: platform/mac/tiled-drawing/use-tiled-drawing.html * page/Frame.h: * platform/graphics/GraphicsLayer.cpp: (showGraphicsLayerTree): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::tiledBacking): * platform/graphics/TiledBacking.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::tiledBacking): (WebCore::GraphicsLayerCA::dumpAdditionalProperties): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/ca/mac/TileCache.h: (WebCore::TileCache::tileCoverageRect): (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::computeTileCoverageRect): (WebCore::TileCache::revalidateTiles): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerTreeAsText): * testing/Internals.cpp: (WebCore::Internals::layerTreeAsText): * testing/Internals.h: * testing/Internals.idl: 2012-10-23 No'am Rosenthal Coordinated Graphics: Enable threaded/IPC animations https://bugs.webkit.org/show_bug.cgi?id=93146 Reviewed by Kenneth Rohde Christiansen. Add enablers to TextureMapper and GraphicsLayerAnimation so that they could be used across processes with IPC. Added some public accessors to GraphicsLayerAnimation, and allowed a GraphicsLayerTextureMapper to receive a full list of animations. Covered by existing animation and compositing tests. * platform/graphics/GraphicsLayerAnimation.cpp: (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation): Initialize the animation with the startTime instead of the offset. (WebCore::GraphicsLayerAnimations::getActiveAnimations): * platform/graphics/GraphicsLayerAnimation.h: (WebCore::GraphicsLayerAnimation::setState): Allow setting the pause time as well. (WebCore::GraphicsLayerAnimation::boxSize): (WebCore::GraphicsLayerAnimation::startTime): (WebCore::GraphicsLayerAnimation::pauseTime): (WebCore::GraphicsLayerAnimation::animation): (WebCore::GraphicsLayerAnimation::keyframes): (WebCore::GraphicsLayerAnimation::listsMatch): (WebCore::GraphicsLayerAnimations::size): (WebCore::GraphicsLayerAnimations::animations): Add public accessors to GraphicsLayerAnimation properties. (GraphicsLayerAnimation): (GraphicsLayerAnimations): * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): (WebCore::GraphicsLayerTextureMapper::setAnimations): Allow replacing the entire list of animations. (WebCore): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::applyAnimationsRecursively): (WebCore): * platform/graphics/texmap/TextureMapperLayer.h: (TextureMapperLayer): 2012-10-23 Chris Rogers Change setTargetValueAtTime() to setTargetAtTime() https://bugs.webkit.org/show_bug.cgi?id=100153 Reviewed by Adam Barth. The AudioParam method name has changed due to Web Audio API spec review. Keep legacy support for the old name. Test: webaudio/audioparam-setTargetAtTime.html * Modules/webaudio/AudioParam.h: (WebCore::AudioParam::setTargetAtTime): * Modules/webaudio/AudioParam.idl: * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::setTargetAtTime): (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): * Modules/webaudio/AudioParamTimeline.h: (AudioParamTimeline): 2012-10-23 Benjamin Poulain [Mac] Remove extraneous conversion to String->NSString https://bugs.webkit.org/show_bug.cgi?id=100044 Reviewed by Darin Adler. Improve some unfortunate use of String->NSString. * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postPlatformNotification): The variable macNotification is ultimately needed as NSString, and all its value are or can be NSString. Convert the last 3 char* values to NSString literal and use NSString* all the way. * loader/mac/LoaderNSURLExtras.h: * loader/mac/LoaderNSURLExtras.mm: (suggestedFilenameWithMIMEType): We converted the String to NSString to pass to suggestedFilenameWithMIMEType. There is no need for the string to be a NSSTring there, we can leave it in its original type. The case checking for a nil MIMEType was dead code because the implicit conversion never returns nil. * platform/mac/DragImageMac.mm: (WebCore::createDragImageForLink): Use String's nsStringNilIfEmpty(). * platform/mac/HTMLConverter.mm: (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]): Fix the coding style. Do the conversion to NSString only when needed. 2012-10-23 Roger Fong [Win] Popup menus positioning needs to take multiple monitors into account. https://bugs.webkit.org/show_bug.cgi?id=100158 Reviewed by Timothy Horton. Add screen.x() to repositioning check to account for position of current monitor. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::calculatePositionAndSize): 2012-10-23 Huang Dongsung [CSS Shaders] Set FilterOperations on GraphicsLayer after the program of CSS Shaders is loaded. https://bugs.webkit.org/show_bug.cgi?id=99908 Reviewed by Dean Jackson. CSS Shaders can not render anything until the program is loaded. If there is partial loaded shaders program, whole FilterOperations chain can not render anything. It occurs a flash. So We have to wait until the program is loaded, to prevent a flash as RenderLayerBacking::updateImageContents() waits until an image is fully loaded. No new tests, CSS Shaders on Accelerated Compositing are not activated yet. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateFilters): 2012-10-23 Elliott Sprehn Generated should not be supported for things with a shadow https://bugs.webkit.org/show_bug.cgi?id=98836 Reviewed by Dimitri Glazkov. As far as CSS is concerned inputs and things with shadow content inside shouldn't support pseudo elements like :before, :after or :first-letter. Neither Gecko or Presto supports it, and we only accidentally supported it. Until the spec tells us what to do we should disable support. This is also neccesary because the new generated content implementation doesn't support shadows. Test: fast/forms/pseudo-elements.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderListBox.h: Added missing canHaveGeneratedChildren() that returns false. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2012-10-23 Huang Dongsung [CSS Shaders] Implement overlay, color-dodge, color-burn, hard-light, soft-light blend modes. https://bugs.webkit.org/show_bug.cgi?id=98504 Reviewed by Dean Jackson. Add expressions for the aforementioned blend modes. The expressions are lifted directly from the CSS Compositing and Blending spec [1]. WebKit adds these blending expressions to the author's shader. [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnormal Test: css3/filters/custom/custom-filter-blend-modes.html * platform/graphics/filters/CustomFilterValidatedProgram.cpp: (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader): (WebCore::CustomFilterValidatedProgram::blendFunctionString): 2012-10-23 Huang Dongsung [CSS Shaders] Implement all composite operators except destination and lighter. https://bugs.webkit.org/show_bug.cgi?id=97859 Reviewed by Dean Jackson. Add expressions for all composite operators except destination and lighter. The expressions are lifted directly from the CSS Compositing and Blending spec [1]. WebKit adds these compositing expressions to the author's shader. [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#advancedcompositing Test: css3/filters/custom/custom-filter-composite-operators.html * platform/graphics/filters/CustomFilterCompiledProgram.cpp: (WebCore::CustomFilterCompiledProgram::initializeParameterLocations): Remove ASSERTION checking if glGetUniformLocation returns negative, because ASSERTION can fail with clear and copy composite operations. Clear and copy composite operations do not need "css_u_texture" representing the DOM element texture. If the driver compiler is smart, "css_u_texture" is not regarded as an active uniform, so glGetuniformLocation returns -1. glGetAttribLocation ditto. * platform/graphics/filters/CustomFilterValidatedProgram.cpp: (WebCore::CustomFilterValidatedProgram::compiledProgram): Move the above ASSERTION in CustomFilterCompiledProgram to here. ASSERTION checks if m_samplerLocation is not -1 when the author shader needs an input texture. (WebCore::CustomFilterValidatedProgram::needsInputTexture): (WebCore): (WebCore::CustomFilterValidatedProgram::compositeFunctionString): * platform/graphics/filters/CustomFilterValidatedProgram.h: (CustomFilterValidatedProgram): 2012-10-23 Max Vujovic [CSS Shaders] Changing the blend mode in CSS doesn't update the custom filter rendering https://bugs.webkit.org/show_bug.cgi?id=99887 Reviewed by Dirk Schulze. Before this patch, WebKit would not recompute an element's style when just its custom filter blend mode changed. For example, suppose an element initially has the style: -webkit-filter: custom(none mix(url(shader.fs) multiply source-atop)); Then, we change the blend mode from "multiply" to "normal": -webkit-filter: custom(none mix(url(shader.fs) normal source-atop)); WebKit now detects this change and recomputes the style. CustomFilterProgram now has an equals operator that considers the program type and the mix settings. The mix settings contain the blend mode. Test: css3/filters/custom/custom-filter-change-blend-mode.html * platform/graphics/filters/CustomFilterProgram.cpp: (WebCore::CustomFilterProgram::operator==): Previously, the equals operator was pure virtual in CustomFilterProgram. Now, CustomFilterProgram implements it and compares the program type and mix settings, if appropriate. (WebCore): * platform/graphics/filters/CustomFilterProgram.h: * platform/graphics/filters/CustomFilterProgramInfo.cpp: (WebCore::CustomFilterProgramInfo::hash): Refactor a repeated condition into a boolean to improve readability. (WebCore::CustomFilterProgramInfo::operator==): Refactor repeated conditions to improve readability. Reorder the conditions so the less expensive ones occur first. * rendering/style/StyleCustomFilterProgram.h: (WebCore::StyleCustomFilterProgram::operator==): Call the base class's equals operator. 2012-10-23 David Barton [MathML] Symbol font uses greek letters for roman ones on linux and Windows https://bugs.webkit.org/show_bug.cgi?id=99921 Reviewed by Eric Seidel. For parts of stretched parentheses and brackets, mathml.css currently uses the Symbol font, which on linux and Windows has greek letters at roman code points. To fix this, we switch to the STIXSizeOneSym font when available. However, this can cause vertical gaps between glyph parts, because of hard-coded constants in RenderMathMLOperator.cpp. We eliminate all these constants. We also shift glyphs upward by 1px and truncate them to avoid the gaps. Tested by existing tests, and one test added to LayoutTests/mathml/presentation/mo.xhtml. * css/mathml.css: (math, mfenced > *): - Set font-family for mn, mi, etc. (mo, mfenced): - Set font-family for mo and anonymous operators, including extension glyphs for stretched operators like parentheses and brackets. (math): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore): - Change 0x23d0 to 0x23aa for STIX & Cambria Math fonts. (WebCore::RenderMathMLOperator::glyphHeightForCharacter): (WebCore::RenderMathMLOperator::updateFromElement): (WebCore::RenderMathMLOperator::createStackableStyle): - Eliminate unused lineHeight and topRelative parameters, and the hard-coded font size of 14. (WebCore::RenderMathMLOperator::createGlyph): - Eliminate unused lineHeight and topRelative parameters. * rendering/mathml/RenderMathMLOperator.h: (RenderMathMLOperator): 2012-10-23 Benjamin Poulain WTFURL: Implement KURL::setPort() https://bugs.webkit.org/show_bug.cgi?id=99898 Reviewed by Adam Barth. * platform/KURLWTFURL.cpp: (WebCore::KURL::setPort): 2012-10-23 Nico Weber In the open-source jpeg decoder, read image orientation from the exif data https://bugs.webkit.org/show_bug.cgi?id=100144 Reviewed by Eric Seidel. This will be used to implement the shouldRespectImageOrientation setting (see bug 19688). Currently this isn't hooked up anywhere, so it has no observable effect for now. Once it's hooked up, it will be tested by fast/images/exif-orientation.html * platform/graphics/BitmapImage.h: * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::orientation): (ImageDecoder): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::readUint16): (WebCore): (WebCore::readUint32): (WebCore::checkExifHeader): (WebCore::readImageOrientation): (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::decode): * platform/image-decoders/jpeg/JPEGImageDecoder.h: (WebCore::JPEGImageDecoder::setOrientation): 2012-10-23 Chris Rogers Fix thread safety issue in AudioParamTimeline https://bugs.webkit.org/show_bug.cgi?id=100154 Reviewed by Kenneth Russell. Add appropriate locking in AudioParamTimeline::valueForContextTime() * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valueForContextTime): 2012-10-23 Alec Flett IndexedDB: refactor backend to use IDB*Metadata https://bugs.webkit.org/show_bug.cgi?id=100055 Reviewed by Tony Chang. This further encapsulates the static data in IDBObjectStoreBackendImpl and IDBIndexBackendImp into their respective IDB*Metadata structs, in preparation for https://bugs.webkit.org/show_bug.cgi?id=99774. No new tests as this is purely a refactor. * Modules/indexeddb/IDBBackingStore.h: (IDBBackingStore): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::metadata): * Modules/indexeddb/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): (WebCore::IDBIndexBackendImpl::id): (WebCore::IDBIndexBackendImpl::setId): (WebCore::IDBIndexBackendImpl::hasValidId): (WebCore::IDBIndexBackendImpl::name): (WebCore::IDBIndexBackendImpl::keyPath): (WebCore::IDBIndexBackendImpl::unique): (WebCore::IDBIndexBackendImpl::multiEntry): (IDBIndexBackendImpl): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): (WebCore::IDBLevelDBBackingStore::getIndexes): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBMetadata.h: (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::metadata): (WebCore::IDBObjectStoreBackendImpl::setIndexKeys): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore::IDBObjectStoreBackendImpl::create): (WebCore::IDBObjectStoreBackendImpl::id): (WebCore::IDBObjectStoreBackendImpl::setId): (WebCore::IDBObjectStoreBackendImpl::name): (WebCore::IDBObjectStoreBackendImpl::keyPath): (WebCore::IDBObjectStoreBackendImpl::autoIncrement): (IDBObjectStoreBackendImpl): 2012-10-19 Roger Fong [WebGL] conformance/textures/texture-size.html is failing on Apple Mountain Lion https://bugs.webkit.org/show_bug.cgi?id=94041 Reviewed by Dean Jackson. When binding a texture to GL_TEXTURE_2D when GL_ACTIVE_TEXTURE is 0, we set m_boundTexture0 to the texture unit. However when we delete the texture, we need to be setting m_boundTexture0 to 0. Otherwise when we draw to the screen we bind m_boundTexture0 in the prepareTexture() method and since the associated texture has already been deleted we end up in an error state. Tested using Khronos WebGL conformance suite: conformance/textures/texture-size.html * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::deleteTexture): 2012-10-22 Dirk Schulze BasicShapePolygon::path takes width instead of height for boundary calculation https://bugs.webkit.org/show_bug.cgi?id=99919 Reviewed by Darin Adler. The 'y' parameters of polygon were calculated by the with of the bounding box of the object. This caused problems on percentage values for point positions. Changed it to the height of the bounding box. Test: css3/masking/clip-path-polygon-percentage.html * rendering/style/BasicShapes.cpp: (WebCore::BasicShapePolygon::path): 2012-10-23 Dominik Röttsches Add timeout support to XMLHttpRequest https://bugs.webkit.org/show_bug.cgi?id=74802 Reviewed by Nate Chapin. An implementation of XHR2 timeouts by using ResourceRequest's setTimeoutInterval. This made several changes necessary in CachedResource and SubresourceLoader in order to distinguish and forward the timeout case from there. The case of late updates to the timeout property, changing the timeout value after send() is not supported yet and handled separately in bug 98156. XHR2 timeout tests were initially written by Mozilla's Alex Vincent's. He granted permission to reuse them under PD/BSD license in https://bugzilla.mozilla.org/show_bug.cgi?id=525816#c86 - big thanks! I adapted them for W3C testharness.js and split them into groups with shorter test running time so that they can be used as WebKit layout tests. Tests: http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::notifyFinished): Forward information about timeout case. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFail): Distinguish timeout case when informing client. * loader/cache/CachedResource.h: Distinguishing timeout case for errors. (WebCore::CachedResource::errorOccurred): (WebCore::CachedResource::loadFailedOrCanceled): (WebCore::CachedResource::timedOut): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): Initializing m_timeout value to zero. (WebCore::XMLHttpRequest::setTimeout): Setter function, possibly raising JS exception. (WebCore): (WebCore::XMLHttpRequest::open): Open call may raise exception for synchronous requests when timeout value is set. (WebCore::XMLHttpRequest::createRequest): Assigning timeout value to ResourceRequest. (WebCore::XMLHttpRequest::didFail): Handling timeout case separately. (WebCore::XMLHttpRequest::didTimeout): Timeout case state transisition and event firing as spec'ed. * xml/XMLHttpRequest.h: New event listener, member and callback for handling timeout. (WebCore::XMLHttpRequest::timeout): (XMLHttpRequest): * xml/XMLHttpRequest.idl: New event listener and property added. * xml/XMLHttpRequestException.cpp: * xml/XMLHttpRequestException.h: Added an exception value for the timeout case. 2012-10-23 Christophe Dumez Possible assertion hit in WebCore::HTMLSelectElement::updateListBoxSelection() https://bugs.webkit.org/show_bug.cgi?id=99967 Reviewed by Tony Chang. Fix assertion hit in WebCore::HTMLSelectElement::updateListBoxSelection() when pressing the left mouse button outside a multiselect and then moving the cursor over the multiselect element while holding the button down. The issue is that the HTMLSelectElement handler for the mouse move event does not check if there is a selection before trying to extend the selection. Test: fast/dom/HTMLSelectElement/select-selectedIndex-noAnchorIndex-crash.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): 2012-10-23 Adam Barth [V8] ScriptWrappable should hold the wrapper handle directly (Dromaeo/dom-modify and dom-traverse get ~2.5% faster) https://bugs.webkit.org/show_bug.cgi?id=97974 Reviewed by Eric Seidel. Previously, we stored a pointer to a handle to a wrapper in Node. That is an extra layer of indirection that slows down finding the wrapper for the node. A handle is just a pointer, so we might as we just store the handle in the Node directly. That speeds up dom-modify and dom-traverse by about 2.5%. This change also lets us get rid of the ChunkedTable we were using to store all the wrappers because they're now stored in the Nodes directly. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap): (WebCore::IntrusiveDOMWrapperMap::get): (WebCore::IntrusiveDOMWrapperMap::set): (WebCore::IntrusiveDOMWrapperMap::contains): (WebCore::IntrusiveDOMWrapperMap::visit): (WebCore::IntrusiveDOMWrapperMap::removeIfPresent): (WebCore::IntrusiveDOMWrapperMap::clear): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::ScriptWrappable): (WebCore::ScriptWrappable::wrapper): (WebCore::ScriptWrappable::setWrapper): (WebCore::ScriptWrappable::disposeWrapper): (WebCore::ScriptWrappable::reportMemoryUsage): (ScriptWrappable): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): 2012-10-23 Kentaro Hara [V8] Replace SetGlobalGCPrologueCallback() with AddGCPrologueCallback() https://bugs.webkit.org/show_bug.cgi?id=100140 Reviewed by Adam Barth. SetGlobalGCPrologueCallback() and SetGlobalGCEpilogueCallback() are deprecated (See http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/include/v8.h&exact_package=chromium&q=v8.h&type=cs&l=3149) Instead we should use AddGCPrologueCallback() and AddGCEpilogueCallback(). No tests. No change in behavior. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::initializeV8IfNeeded): * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): (WebCore): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): (WebCore::V8GCController::gcEpilogue): (WebCore::V8GCController::minorGCEpilogue): (WebCore::V8GCController::majorGCEpilogue): * bindings/v8/V8GCController.h: (V8GCController): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initIsolate): 2012-10-23 Adam Barth [V8] Enumerate Nodes via the V8 heap rather than via a list in WebCore https://bugs.webkit.org/show_bug.cgi?id=100033 Reviewed by Eric Seidel. This patch changes how we enumerate nodes during garbage collection. After this patch, we use V8's list of open handles to enumerate node wrappers rather than using a separate list that we maintain in WebCore for this purpose. A future patch will remove the list in WebCore for a DOM performance gain. * bindings/js/ScriptProfiler.h: (WebCore): (WebCore::ScriptProfiler::visitNodeWrappers): * bindings/scripts/CodeGeneratorV8.pm: (GenerateToV8Converters): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::wrapSlow): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::IntrusiveDOMWrapperMap::set): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::visitNodeWrappers): * bindings/v8/ScriptProfiler.h: (WebCore): (ScriptProfiler): * bindings/v8/V8DOMMap.cpp: (WebCore::NodeWrapperVisitor::~NodeWrapperVisitor): (WebCore): (WebCore::visitAllDOMNodes): * bindings/v8/V8DOMMap.h: (WebCore): (NodeWrapperVisitor): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): * bindings/v8/V8GCController.cpp: (WebCore::NodeVisitor::visitNodeWrapper): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): * inspector/BindingVisitors.h: (WebCore::WrappedNodeVisitor::~WrappedNodeVisitor): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-10-22 Andrey Kosyakov Web Inspector: paint rectangles are incorrectly shown in case subframes are present https://bugs.webkit.org/show_bug.cgi?id=99849 Reviewed by Pavel Feldman. Move GraphicsContext and paint rectangle from willPaint() to didPaint(), so we don't have to store them as a state of InspectorPageAgent * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::willPaintImpl): (WebCore::InspectorInstrumentation::didPaintImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willPaint): (WebCore::InspectorInstrumentation::didPaint): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::didPaint): * inspector/InspectorPageAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willPaint): (WebCore::InspectorTimelineAgent::didPaint): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/TimelineRecordFactory.cpp: * inspector/TimelineRecordFactory.h: (TimelineRecordFactory): * page/FrameView.cpp: (WebCore::FrameView::paintContents): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): 2012-10-23 Pavel Feldman Web Inspector: array grouping does not work for arrays with exactly 10000 elements. https://bugs.webkit.org/show_bug.cgi?id=100131 Reviewed by Vsevolod Vlasov. Using ceil() - 1 instead of floor() in bucket size calculation. * inspector/front-end/ObjectPropertiesSection.js: 2012-10-23 Shinya Kawanaka The order of resolving distribution in tree composition is wrong. https://bugs.webkit.org/show_bug.cgi?id=99552 Reviewed by Dimitri Glazkov. According to the current ShadowDOM spec, we have to resolve first, then resolve . However, the order of resolution is now the mixed tree order of and . Test: fast/dom/shadow/content-reprojection-order.html * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::distribute): We should resolve before . Only the first active shadow insertion point can select the rest of contents. * html/shadow/HTMLContentElement.h: (HTMLContentElement): * html/shadow/HTMLShadowElement.cpp: * html/shadow/HTMLShadowElement.h: (WebCore::isHTMLShadowElement): (WebCore): (WebCore::toHTMLShadowElement): * html/shadow/InsertionPoint.h: (InsertionPoint): We don't need doesSelectFromHostChildren() anymore. 2012-10-23 Vsevolod Vlasov Web Inspector: Move UISourceCode creation out of mappings to workspace. https://bugs.webkit.org/show_bug.cgi?id=100092 Reviewed by Pavel Feldman. Moved uiSourceCode constructor calls out of mappings to workspace. * inspector/front-end/CompilerScriptMapping.js: * inspector/front-end/NetworkUISourceCodeProvider.js: (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource): (WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._deleteOriginalUISourceCodeForScripts): (WebInspector.ResourceScriptMapping.prototype._deleteTemporaryUISourceCodeForScripts): (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts): (WebInspector.ResourceScriptMapping.prototype._createUISourceCode): (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode): (WebInspector.ResourceScriptMapping.prototype._getOrCreateOriginalUISourceCode): * inspector/front-end/SASSSourceMapping.js: (_bindUISourceCode): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype.addUISourceCode): (WebInspector.Project.prototype.removeUISourceCode): (WebInspector.Workspace.prototype.addTemporaryUISourceCode): (WebInspector.Workspace.prototype.removeTemporaryUISourceCode): 2012-10-23 Emil A Eklund Remove unnecessary m_layoutDelta[XY]Saturated initialization https://bugs.webkit.org/show_bug.cgi?id=100018 Reviewed by Julien Chaffraix. Remove unnecessary initialization from LayoutState constructor added in r132105. No new tests, no change in functionality. * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): 2012-10-23 Zeno Albisser [Texmap] Fix drawTextureRectangleARB after r131485. https://bugs.webkit.org/show_bug.cgi?id=100133 Consistently rename u_textureSize to u_samplerSize. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawTextureRectangleARB): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::getShaderSpec): * platform/graphics/texmap/TextureMapperShaderManager.h: (TextureMapperShaderProgram): 2012-10-23 Mike West Web Inspector: 'data:' URLs should be properly trimmed for readability. https://bugs.webkit.org/show_bug.cgi?id=100083 Reviewed by Pavel Feldman. We recently landed a patch to trim the middle out of long URLs in console messages in order to improve readability. That patch didn't effect 'data:' URLs, as they didn't match the regex in the linkifier. This patch ensures that 'data:' URLs are properly trimmed down to size. This problem came to light while resolving a different, smaller issue: 'image/jpg' wasn't whitelisted as an image MIME type. That trivial fix is included in this patch. Test: http/tests/inspector/network/image-as-text-loading-data-url.html * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager): Adds 'image/jpg' as a valid image type. * inspector/front-end/ResourceUtils.js: (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): Supports 'data:' URLs in the linkifier's regex. 2012-10-23 Mike West Web Inspector: Floated anchor element sometimes overlaps following content. https://bugs.webkit.org/show_bug.cgi?id=100105 Reviewed by Pavel Feldman. This patch ensures that each console message clears the potentially-overlapping floated anchor element. * inspector/front-end/inspector.css: (#console-prompt): (.console-message, .console-user-command): Clear the float, and flip the border from the bottom of the message to the top. Do the same for the prompt. (.console-message:first-child): Ensure that the first message doesn't have a top border. 2012-10-23 Alexander Pavlov Web Inspector: Crash when adding a keyframes rule in the Styles pane https://bugs.webkit.org/show_bug.cgi?id=99826 Reviewed by Pavel Feldman. The client-supplied selector text is first parsed to make sure it results in a valid style rule selector. Test: inspector/styles/add-new-rule-invalid-selector.html * inspector/InspectorStyleSheet.cpp: (WebCore::createCSSParser): (WebCore): (WebCore::InspectorStyle::setPropertyText): (WebCore::checkStyleRuleSelector): (WebCore::InspectorStyleSheet::addRule): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): 2012-10-15 Kenneth Rohde Christiansen Add support for resolution media query https://bugs.webkit.org/show_bug.cgi?id=99077 Reviewed by Antti Koivisto. Add support for 'resolution' media query feature. Background info: http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio Related spec links: http://www.w3.org/TR/css3-mediaqueries/#resolution (recommendation) http://www.w3.org/TR/css3-values/#resolution (candidate recommentation) Add infrastructure to make it testable. Test: fast/media/mq-resolution.html * css/CSSParser.cpp: (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::detectNumberToken): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::unitCategory): (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): (WebCore::CSSPrimitiveValue::customCssText): (WebCore::CSSPrimitiveValue::cloneForCSSOM): * css/CSSPrimitiveValue.h: Enable dpi, dpcm and dppx units when RESOLUTION_MEDIA_QUERY is enabled. * WebCore.exp.in: Export the WebCore::Settings setting. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isDotsPerInch): (WebCore::CSSPrimitiveValue::isDotsPerPixel): (WebCore::CSSPrimitiveValue::isDotsPerCentimeter): (CSSPrimitiveValue): Add function for checking the recently added density types. * css/MediaFeatureNames.h: (MediaFeatureNames): Add support for resolution, min-resolution and max-resolution. * css/MediaQueryEvaluator.cpp: (WebCore::compareResolution): Add methods for comparing resolutions. (WebCore): (WebCore::resolutionMediaFeatureEval): (WebCore::min_resolutionMediaFeatureEval): (WebCore::max_resolutionMediaFeatureEval): Implement the resolution method evaluation. * css/MediaQueryExp.cpp: (WebCore::featureWithValidPositiveDensity): (WebCore): (WebCore::featureWithoutValue): (WebCore::MediaQueryExp::MediaQueryExp): Hook up resolution with the right pre-checks. * page/Screen.cpp: (WebCore::Screen::horizontalDPI): (WebCore::Screen::verticalDPI): Check whether an override exists, and if so, uses it. If not calculate the value given the device scale factor. * page/Settings.cpp: (WebCore::Settings::setResolutionOverride): (WebCore): * page/Settings.h: (Settings): (WebCore::Settings::resolutionOverride): Add a resolution override to settings. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setResolutionOverride): (WebCore): * testing/InternalSettings.h: (Backup): (InternalSettings): * testing/InternalSettings.idl: Add a new setResolutionOverride method to internals.settings. 2012-10-23 Filip Spacek [BlackBerry] Improve the use of stencil buffer during compositing https://bugs.webkit.org/show_bug.cgi?id=100020 We always want to scissor so remove the define. Only turn stenciling on if needed. Reviewed by Rob Buis. Reviewed internally by Arvid Nilsson. * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::setViewport): (WebCore::LayerRenderer::compositeLayers): (WebCore::LayerRenderer::drawLayersOnSurfaces): (WebCore::LayerRenderer::compositeLayersRecursive): (WebCore::LayerRenderer::updateScissorIfNeeded): 2012-10-23 'Pavel Feldman' Not reviewed: kick out non-chromium files from WebCore.gypi. * WebCore.gypi: 2012-10-23 Alexander Shalamov [EFL][WK2] ecore_x should be initialised in WebProcess to avoid re-initialization by PlatformScreenEfl utilities and systemBeep() function https://bugs.webkit.org/show_bug.cgi?id=100110 Reviewed by Kenneth Rohde Christiansen. Removed initialization of ecore_x, since it is initialized when process starts. test: fast/media/* * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenDepth): (WebCore::screenRect): * platform/efl/SoundEfl.cpp: (WebCore::systemBeep): 2012-10-23 Adam Klein Always parse pasted fragments as HTML even on XHTML pages https://bugs.webkit.org/show_bug.cgi?id=99880 Reviewed by Ojan Vafai. When pasting HTML into a page, using the XML parser is unlikely to work correctly, as the contents of the clipboard are unlikely to be properly-formed XHTML. Thus, for the pasting case, it's always better to use HTML parsing, which will properly parse either HTML (which is what's usually in the clipboard) or XHTML (which is sometimes there as well). The Mac port previously worked around this problem by falling back to plain text when parsing failed, but switching to HTML seems like a clear improvement. This also fixes a crash in Chromium (see http://webkit.org/b/99607 and http://crbug.com/136218); it erroneously assumed that createFragmentFromMarkup() would never return null. This patch makes that true. * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't delegate to createContextualFragment: we already know our context element is safe (i.e., it's ), and we want to force HTML (not XML) parsing. 2012-10-23 Allan Sandfeld Jensen [Qt] REGRESSION (r130851): fast/text/word-space-with-kerning.html fails https://bugs.webkit.org/show_bug.cgi?id=98876 Reviewed by Simon Hausmann. Do not add word-spacing for leading space. This matches what simple path font-width does. Tested by existing tests. * platform/graphics/qt/FontQt.cpp: (WebCore::Font::floatWidthForComplexText): 2012-10-23 Alexander Pavlov Web Inspector: Incorrect resolution of relative URLs containing a scheme in query parameters https://bugs.webkit.org/show_bug.cgi?id=100084 Reviewed by Vsevolod Vlasov. Use the RFC 3986 grammar for the URL scheme. * inspector/front-end/ParsedURL.js: (WebInspector.ParsedURL): 2012-10-23 Eugene Klyuchnikov Web Inspector: Elaborate source panel sidebar context menus. https://bugs.webkit.org/show_bug.cgi?id=99980 Reviewed by Vsevolod Vlasov. - Watches: add "Add watch expression" item to items and empty element - Watches: hide "Remove watch expression" from editing prompt context menu - Watches: add titles to header buttons - XHR Breakpoints: add "Add Breakpoint" item to items and empty element - XHR Breakpoints: add "Remove all breakpoints" item to items (when >1) - XHR Breakpoints: add title to header button - JS Breakpoints: hide "Remove/(De)Activate breakpoints" when only 1 item present - JS Breakpoints: add "(De)Activate breakpoints" to empty element context menu * English.lproj/localizedStrings.js: Added corresponding strings. * inspector/front-end/BreakpointsSidebarPane.js: Adjusted context menu. (WebInspector.XHRBreakpointsSidebarPane): Ditto. * inspector/front-end/ObjectPropertiesSection.js: Added "isEditing()" * inspector/front-end/WatchExpressionsSidebarPane.js: Adjusted context menu. 2012-10-23 Kent Tamura Update binding test results for r132194 https://bugs.webkit.org/show_bug.cgi?id=100097 * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): 2012-10-23 Alexander Pavlov Web Inspector: Sass can only resolve same folder paths https://bugs.webkit.org/show_bug.cgi?id=99259 Reviewed by Vsevolod Vlasov. The actual reason is that the rule source location linkifier tries to linkify a resource (*.scss), which does not exist, and falls back to just stripping the main page URL prefix from the rule location URL. This change introduces LiveLocations for CSSRule locations and makes sure they are linkified using uiSourceCode's parsedURL.displayName. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel): Introduced LiveLocation management for CSSRules. (WebInspector.CSSStyleModel.prototype.setSourceMapping): (WebInspector.CSSStyleModel.prototype._updateLocations): (WebInspector.CSSStyleModel.prototype.createLiveLocation): (WebInspector.CSSStyleModel.prototype.updateLocations): (WebInspector.CSSStyleModel.LiveLocation): A LiveLocation for the CSS domain. (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation): (WebInspector.CSSStyleModel.LiveLocation.prototype.dispose): * inspector/front-end/Linkifier.js: (WebInspector.Linkifier.prototype.linkifyCSSRuleLocation): CSSRule LiveLocation-based link builder. (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor): Add a title for anchors. (WebInspector.Linkifier.DefaultCSSFormatter): Formatter for CSS location links. (WebInspector.Linkifier.DefaultCSSFormatter.prototype.formatLiveAnchor): * inspector/front-end/ResourceUtils.js: (WebInspector.displayNameForURL): Use parsedURL.displayName if uiSourceCode is present for the specified URL. * inspector/front-end/SASSSourceMapping.js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate): * inspector/front-end/inspector.html: 2012-10-23 Sheriff Bot Unreviewed, rolling out r132149. http://trac.webkit.org/changeset/132149 https://bugs.webkit.org/show_bug.cgi?id=100098 Breaks inspector profiler tests in debug mode. (Requested by pfeldman1 on #webkit). * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::styleDidChange): (WebCore::RenderTableCol::updateFromElement): (WebCore::RenderTableCol::computePreferredLogicalWidths): * rendering/RenderTableCol.h: (RenderTableCol): 2012-10-23 Simon Hausmann Unreviewed trivial Qt build fix: Fix build without USE_3D_GRAPHICS Move the #if USE(GRAPHICS_SURFACE) up to protect the inclusion of GraphicsContext3D.h to be done only if we use the surface. * platform/graphics/surfaces/GraphicsSurface.h: 2012-10-23 Sheriff Bot Unreviewed, rolling out r132033. http://trac.webkit.org/changeset/132033 https://bugs.webkit.org/show_bug.cgi?id=100097 Broke calendar picker (Requested by tkent on #webkit). * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): 2012-10-23 Andras Becsi Remove devicePixelRatio from ViewportAttributes https://bugs.webkit.org/show_bug.cgi?id=99845 Reviewed by Adam Barth. Since r121555 the devicePixelRatio is not calculated any more and the scale factor is stored in Page::m_deviceScaleFactor, thus it can be removed from ViewportAttributes to reduce redundancy and unnecessary client code. Use a new parameter in viewport calculation functions using the visible viewport size (instead of passing the adjusted viewport size) so that after this change clients do not end up using the unadjusted viewport size for calculations. No behavioural change, no new tests needed. * WebCore.exp.in: * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): (WebCore::computeMinimumScaleFactorForContentContained): Add the devicePixelRatio as a parameter. (WebCore::restrictMinimumScaleFactorToViewportSize): Ditto. * dom/ViewportArguments.h: (ViewportAttributes): (WebCore): * testing/InternalSettings.cpp: (WebCore::InternalSettings::configurationForViewport): 2012-10-23 Kent Tamura Support full month names in DateTimeEditElement, and use them in input[type=month] by default https://bugs.webkit.org/show_bug.cgi?id=100060 Reviewed by Kentaro Hara. According to https://plus.google.com/104770450049736549185/posts/4zsoeHoa7SM no one wants to show abbreviated month names for input[type=month]. This change add support for full month names in DateTimeEditELement, and LocaleICU and LocaleMac retun month formats with full month names. Note that LocaleWin::monthFormat returns formats for full month names. No new tests. Covered by fast/forms/month-multiple-fields/month-multiple-fields-appearance-*.html * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditBuilder::visitField): If count is 4, use Localizer::monthLabels or standAloneMonthLabels. * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::monthFormat): Returns a format for full month names. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::monthFormat): Ditto. 2012-10-23 Mike West Viewport errors should be slightly friendlier with regard to ';'. https://bugs.webkit.org/show_bug.cgi?id=100003 Reviewed by Adam Barth. This patch scans viewport values that cause errors for ';'. If found, a quick message is appended to the error, noting that semicolons are not valid separators in viewport contents, and that commas would be the proper substitute. No functional changes, just a better error message. * dom/ViewportArguments.cpp: (WebCore::reportViewportWarning): 2012-10-23 Timothy Hatcher Docking/undocking the Web Inspector does not work correctly in Safari. The "docked" and "bottom" strings need quoted instead of being passed as identifiers. https://bugs.webkit.org/show_bug.cgi?id=100080 Reviewed by Yury Semikhatsky. * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Put quotes around the %s. 2012-10-23 Sudarsana Nagineni [EFL][WK2] Compilation warning in GraphicsContext3DPrivate.cpp when AC is enabled https://bugs.webkit.org/show_bug.cgi?id=99723 Reviewed by Kenneth Rohde Christiansen. Fix compilation warning in GraphicsContext3DPrivate.cpp when AC is enabled. No new tests, no change in behavior. * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::createSurface): 2012-10-23 Dan Carney When blocking localStorage, Firefox throws a security exception on access, and maybe so should we https://bugs.webkit.org/show_bug.cgi?id=63257 Reviewed by Jochen Eisinger. Throw security exception when local storage is accessed under certain circumstances to match firefox. No new tests. Existing tests modified. * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::canGetItemsForName): (WebCore::JSStorage::nameGetter): (WebCore::JSStorage::deleteProperty): (WebCore::JSStorage::getOwnPropertyNames): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore): (WebCore::setDOMException): (WebCore::V8Storage::namedPropertyEnumerator): (WebCore::storageGetter): (WebCore::V8Storage::namedPropertyQuery): (WebCore::storageDeleter): * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): * storage/Storage.cpp: * storage/Storage.h: (WebCore): (WebCore::Storage::length): (WebCore::Storage::key): (WebCore::Storage::getItem): (WebCore::Storage::setItem): (WebCore::Storage::removeItem): (WebCore::Storage::clear): (WebCore::Storage::contains): * storage/Storage.idl: * storage/StorageArea.h: (StorageArea): * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::canAccessStorage): Checks whether access to storage is a security violation. (WebCore): (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame): (WebCore::StorageAreaImpl::length): (WebCore::StorageAreaImpl::key): (WebCore::StorageAreaImpl::getItem): (WebCore::StorageAreaImpl::setItem): (WebCore::StorageAreaImpl::removeItem): (WebCore::StorageAreaImpl::clear): (WebCore::StorageAreaImpl::contains): * storage/StorageAreaImpl.h: (StorageAreaImpl): 2012-10-22 Joshua Bell IndexedDB: Remove custom binding code for IDBCursor.value https://bugs.webkit.org/show_bug.cgi?id=100034 Reviewed by Kentaro Hara. Now that we're using ScriptValue instead of SerializedScriptValue we can just expose IDBCursor.value as an |any| (IDL) or |ScriptValue| (C++) to maintain the specified semantics that the object identity is retained across accesses. Test: storage/indexeddb/cursor-value.html * Modules/indexeddb/IDBCursor.cpp: Remove "dirty" tracking. (WebCore::IDBCursor::IDBCursor): (WebCore::IDBCursor::value): (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBCursor.h: IDBAny -> ScriptValue (IDBCursor): * Modules/indexeddb/IDBCursorWithValue.idl: IDBAny -> any * Modules/indexeddb/IDBObjectStore.cpp: No need to route through IDBAny to get ScriptValue. (WebCore): * UseV8.cmake: Remove references to IDBCustomBindings.cpp * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * bindings/v8/IDBCustomBindings.cpp: Removed. 2012-10-22 Dan Bernstein Font’s fast code path is used for partial runs with kerning and ligatures, but shouldn’t be https://bugs.webkit.org/show_bug.cgi?id=100068 Reviewed by Sam Weinig. As described in , the fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled. Since the partial-run case is uncommon, for now just use the complex code path in this case. * platform/graphics/Font.cpp: (WebCore::Font::drawText): Changed to use the complex path for partial runs if there are any typesetting features. (WebCore::Font::drawEmphasisMarks): Ditto. (WebCore::Font::selectionRectForText): Ditto. (WebCore::Font::offsetForPosition): Changed to use the complex path if there are any typesetting features. 2012-10-22 Peter Wang [BlackBerry] Missing some cookies in HTTP response header when set several cookies in one "Set-Cookie" header. https://bugs.webkit.org/show_bug.cgi?id=99950 Reviewed by George Staikos. In "NetworkJob::handleNotifyHeaderReceived", if there are several "Set-Cookie" headers, we should combine the following ones with the first. No new test case. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyHeaderReceived): 2012-10-22 MORITA Hajime Assertion failed at WebCore::toInsertionPoint / WebCore::ContentDistributor::distribute https://bugs.webkit.org/show_bug.cgi?id=100038 Reviewed by Kent Tamura. isHTMLContentElement() assumes that the content element always has a tag name "content" but it doesn't when Shadow DOM feature is disabled. This fix let the function see the correct tag name. Test: fast/dom/shadow/insertion-points-with-shadow-disabled.html * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::contentTagName): * html/shadow/HTMLContentElement.h: (HTMLContentElement): (WebCore::isHTMLContentElement): 2012-10-22 Shinya Kawanaka [Shadow] Fallback content should also be reprojection. https://bugs.webkit.org/show_bug.cgi?id=99750 Reviewed by Dimitri Glazkov. Fallback content of InsertionPoint should be reprojected. The existing assumption that only the direct child of host element can be distributed to InsertionPoint does not hold anymore. So, if the parent of an element is InsertionPoint which should show fallback element, we have to check the grand parent of the element instead of the element. Tests: fast/dom/shadow/content-reprojection-fallback-reprojection.html fast/dom/shadow/content-reprojection-fallback.html * css/StyleResolver.cpp: (WebCore::shouldResetStyleInheritance): Checks the grandparent of the element if the parent is an InsertionPoint which uses fallback content. * dom/ComposedShadowTreeWalker.cpp: (WebCore::shadowOfParentForDistribution): (WebCore): (WebCore::resolveReprojection): (WebCore::ComposedShadowTreeWalker::traverseParent): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::shouldUseFallbackElements): True if the InsertionPoint should use fallback content. (WebCore): * html/shadow/InsertionPoint.h: (WebCore::parentElementForDistribution): Returns the grandparent element if the parent is InsertionPoint which uses fallback content. Returns parent element otherwise. (WebCore): 2012-10-22 Keishi Hattori Label position is wrong in the suggestion picker when all the suggestions have labels https://bugs.webkit.org/show_bug.cgi?id=99965 Reviewed by Kent Tamura. Somehow the scrollbar was appearing and so the label element was being wrapped to the next line. No new tests. Can't reproduce in layout test. * Resources/pagepopups/suggestionPicker.css: (.suggestion-list): * Resources/pagepopups/suggestionPicker.js: (SuggestionPicker.prototype._fixWindowSize): Explicitly show the scroll bar. 2012-10-22 MORITA Hajime [Chromium] Needs to track ShadowRoot usage https://bugs.webkit.org/show_bug.cgi?id=99955 Reviewed by Dimitri Glazkov. Added an UMA instrumentation. * dom/ShadowRoot.cpp: (WebCore::determineUsageType): (WebCore): (WebCore::ShadowRoot::create): 2012-10-22 Kent Tamura Introduce Localizer::standAloneMonthLabels https://bugs.webkit.org/show_bug.cgi?id=99963 Reviewed by Kentaro Hara. We realized full month names and full stand-alone month names were necessary for input[type=month] UI. We change the compile-flag for Localizer::monthLabels from "ENABLE(CALENDAR_PICKER)" to "ENABLE(CALENDAR_PICKER) || ENABLE(INPUT_MULTIPLE_FIELDS_UI)," and introduce Localizer::standAloneMonthLabels. Tests: Add some test cases to Source/WebKit/chromium/LocaleMacTest.cpp and LocalizedDateICUTest.cpp. * platform/text/Localizer.h: (Localizer): - Add pure virtual standAloneMonthLabels. - Change the condition for monthLabels. * platform/text/LocaleNone.cpp: (LocaleNone): Declare monthLabels, standAloneMonthLabels, and m_monthLabels. (WebCore::LocaleNone::monthLabels): Added. It always returns English month names. (WebCore::LocaleNone::standAloneMonthLabels): Added. Just calls monthLabels. * platform/text/LocaleWin.h: (LocaleWin): Declare standAloneMonthLabels, and change the condition for monthLabels. * platform/text/LocaleWin.cpp: (WebCore): Change the condition for monthLabels. (WebCore::LocaleWin::standAloneMonthLabels): Added. Just calls monthLabels. * platform/text/mac/LocaleMac.h: (LocaleMac): - Add standAloneMonthLabels and m_standAloneMonthLabels - Change the condition for monthLabels and m_monthLabels. * platform/text/mac/LocaleMac.mm: (WebCore): Change the condition for monthLabels. (WebCore::LocaleMac::standAloneMonthLabels): Added. Get the information with NSDateFormatter::standaloneMonthSymbols. * platform/text/LocaleICU.h: (LocaleICU): - Add standAloneMonthLabels and m_standAloneMonthLabels - Change the condition for monthLabels and m_monthLabels. * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::initializeCalendar): Remove m_monthLabels initialization in order to avoid dependecy from monthLabels. (WebCore): (WebCore::createFallbackMonthLabels): Change the compile condition. (WebCore::LocaleICU::monthLabels): - Change the compile condition. - Don't depend on initializeCalendar to make the code for ENABLE(INPUT_MULTIPLE_FIELDS_UI) && !ENABLE(CALENDAR_PICKER) minimal. (WebCore::LocaleICU::standAloneMonthLabels): Added. The code is similar to shortStandAloneMonthLabels. 2012-10-22 Shinya Kawanaka Refactoring around ContainerNode::attachChildren https://bugs.webkit.org/show_bug.cgi?id=99968 Reviewed by Hajime Morita. Since ContainerNode::attach() is now equivalent to ContainerNode::attachChildren() + Node::attach(), we should call ContainerNode::attach() instead of calling them. No new tests, no change in behavior. * dom/ContainerNode.h: (ContainerNode): * dom/Element.cpp: (WebCore::Element::attach): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::attach): 2012-10-22 Michael Saboff HTML Parser should produce 8 bit strings for doctype, comment and tagName tokens https://bugs.webkit.org/show_bug.cgi?id=99889 Reviewed by Geoffrey Garen. Added 8 bit check for accumulating all token data in MarkupTokenBase. Added code to convert "name" token data directly to a string (8 or 16 as appropriate). Changed to accumulate m_bufferedEndTagName as LChar's. No new tests, covered by existing tests. * html/parser/HTMLToken.h: (HTMLToken): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::nextToken): (WebCore::HTMLTokenizer::addToPossibleEndTag): (WebCore::HTMLTokenizer::isAppropriateEndTag): * html/parser/HTMLTokenizer.h: (HTMLTokenizer): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::beginStartTag): (WebCore::MarkupTokenBase::beginEndTag): (MarkupTokenBase): (WebCore::MarkupTokenBase::beginDOCTYPE): (WebCore::MarkupTokenBase::appendToComment): (WebCore::MarkupTokenBase::appendToName): (WebCore::MarkupTokenBase::nameString): (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): 2012-10-22 Tony Chang margin-top/bottom has no effect for child nodes of flex items https://bugs.webkit.org/show_bug.cgi?id=99923 Reviewed by Ojan Vafai. Flexitems, like table cells, shouldn't collapse margins. Test: css3/flexbox/flexitem-no-margin-collapsing.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): Check to see if the parent is a flexible box. We should always have a parent if we make it this far in the check. 2012-10-22 Marja Hölttä Refactor CachedResourceLoader: add CachedResourceRequest https://bugs.webkit.org/show_bug.cgi?id=99736 Reviewed by Adam Barth. For fixing bugs 84883 and 92761, CachedResourceLoader::requestResource should take as parameter information about who initiated the request. But the parameter list was already long. This gathers all the parameters into a separate class, CachedResourceRequest. The next step is to add information about who initiated the request into CachedResourceRequest. No new tests because no changes in functionality, just moving code around. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::cachedFont): * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::cachedImageSet): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage): * css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::requestStyleSheet): * css/WebKitCSSSVGDocumentValue.cpp: (WebCore::WebKitCSSSVGDocumentValue::load): * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::cachedShader): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::checkStyleSheet): * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * loader/LinkLoader.cpp: (WebCore::LinkLoader::loadLink): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::load): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::requestFont): (WebCore::CachedResourceLoader::requestTextTrack): (WebCore::CachedResourceLoader::requestShader): (WebCore::CachedResourceLoader::requestCSSStyleSheet): (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::requestScript): (WebCore::CachedResourceLoader::requestXSLStyleSheet): (WebCore::CachedResourceLoader::requestSVGDocument): (WebCore::CachedResourceLoader::requestLinkResource): (WebCore::CachedResourceLoader::requestRawResource): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::requestPreload): (WebCore::CachedResourceLoader::defaultCachedResourceOptions): (WebCore): * loader/cache/CachedResourceLoader.h: (WebCore): (CachedResourceLoader): * loader/cache/CachedResourceRequest.cpp: Added. (WebCore): (WebCore::CachedResourceRequest::CachedResourceRequest): * loader/cache/CachedResourceRequest.h: Added. (WebCore): (CachedResourceRequest): (WebCore::CachedResourceRequest::mutableResourceRequest): (WebCore::CachedResourceRequest::resourceRequest): (WebCore::CachedResourceRequest::charset): (WebCore::CachedResourceRequest::setCharset): (WebCore::CachedResourceRequest::options): (WebCore::CachedResourceRequest::priority): (WebCore::CachedResourceRequest::forPreload): (WebCore::CachedResourceRequest::setForPreload): (WebCore::CachedResourceRequest::defer): (WebCore::CachedResourceRequest::setDefer): * loader/icon/IconLoader.cpp: (WebCore::IconLoader::startLoading): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::requestImageResource): * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::loadFont): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): * xml/XSLImportRule.cpp: (WebCore::XSLImportRule::loadSheet): 2012-10-22 Adam Barth [V8] ASSERT that removeAllDOMObjects() is called only on worker threads https://bugs.webkit.org/show_bug.cgi?id=100046 Reviewed by Eric Seidel. This function is called only on worker threads. We should ASSERT that fact and remove the dead code that tries to handle the main thread case. * bindings/v8/V8DOMMap.cpp: (WebCore::removeAllDOMObjects): 2012-10-22 Adam Barth [V8] We should call the faster v8::Integer::New APIs https://bugs.webkit.org/show_bug.cgi?id=100016 Reviewed by Eric Seidel. In working to remove the integer cache, I added some faster APIs for creating v8::Integers. These APIs are faster than the old APIs, but not quite fast enough to replace the integer cache. We should still use them when we miss the integer cache. I've also included a small refactoring to V8PerIsolateData to make it clearer when we're calling v8::Isolate::GetCurrent(). * bindings/v8/DOMData.cpp: (WebCore::DOMData::getCurrentStore): * bindings/v8/V8Binding.h: (WebCore::v8ExternalString): (WebCore::v8Integer): (WebCore::v8UnsignedInteger): * bindings/v8/V8PerIsolateData.h: (WebCore::V8PerIsolateData::current): (WebCore::V8PerIsolateData::from): * bindings/v8/V8ValueCache.cpp: (WebCore::StringCache::v8ExternalStringSlow): (WebCore::IntegerCache::createSmallIntegers): * bindings/v8/V8ValueCache.h: (WebCore::IntegerCache::v8Integer): (WebCore::IntegerCache::v8UnsignedInteger): (IntegerCache): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): 2012-10-22 Julien Chaffraix RenderTableCol::computePreferredLogicalWidths and RenderTableCol::layout should never be called https://bugs.webkit.org/show_bug.cgi?id=99861 Reviewed by Ojan Vafai. RenderTableCol's computePreferredLogicalWidths and layout's only purpose were to clear the preferred logical widths dirty / layout flag so that we would properly propagate the information to our containing table. This led to clunky code where the table layout code had to forcefully call RenderTableCol::computePreferredLogicalWidths or else we would ignore the next layout hint on the or . Test: fast/table/col-span-change-relayout.html * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): Simplified the code now that we only need to iterate over the sections. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): Removed call to computePreferredLogicalWidths. * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::styleDidChange): (WebCore::RenderTableCol::updateFromElement): Forward a layout hint to the table so that we properly recompute the cell's logical withs. (WebCore::RenderTableCol::computePreferredLogicalWidths): (WebCore::RenderTableCol::layout): Change our implementations of those 2 methods to be no-ops, while enforcing that they are never called. (WebCore::RenderTableCol::propagateLayoutCueToTable): New helper function that forward any layout cue to the containing table, this works around us not clearing the flags which confuses RenderObject markContainingBlocksForLayout and invalidateContainerPreferredLogicalWidths. * rendering/RenderTableCol.h: Made the function that we are not expected to be called private. 2012-10-22 Pan Deng [User Timing]Integrate with Perforamnce Timeline. https://bugs.webkit.org/show_bug.cgi?id=91072. Reviewed by Tony Gentilcore. This patch expose user timing entries via performance timeline interface. JavaScriptCore custom binding will be another patch No new tests, user timing test cases have been landed. * page/Performance.cpp: (WebCore::Performance::Performance): (WebCore::Performance::webkitGetEntries): (WebCore::Performance::webkitGetEntriesByType): (WebCore::Performance::webkitGetEntriesByName): * page/PerformanceEntry.h: (WebCore::PerformanceEntry::startTimeCompareLessThan): (PerformanceEntry): * page/PerformanceEntryList.cpp: (WebCore::PerformanceEntryList::sort): (WebCore): * page/PerformanceEntryList.h: (PerformanceEntryList): * page/PerformanceUserTiming.cpp: (WebCore::convertToEntrySequence): (WebCore): (WebCore::getEntrySequenceByName): (WebCore::UserTiming::getMarks): (WebCore::UserTiming::getMeasures): * page/PerformanceUserTiming.h: (UserTiming): 2012-10-22 Pan Deng Modify obsolete code in User Timing https://bugs.webkit.org/show_bug.cgi?id=99851 Reviewed by Tony Gentilcore. Modify user timing implementation as PlatformString.h, prefix of webkitNow is removed, etc. No new tests. * page/PerformanceUserTiming.cpp: (WebCore::insertPerformanceEntry): (WebCore::UserTiming::mark): (WebCore::UserTiming::measure): * page/PerformanceUserTiming.h: 2012-10-22 Mark Lam Change stack recursion checks to be based on stack availability. https://bugs.webkit.org/show_bug.cgi?id=99872. Reviewed by Filip Pizlo and Geoffrey Garen. Removed the use of ThreadStackType. Enabled the reserved JSStack space for error processing before doing work in reportException(). * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::WorkerScriptController): 2012-10-22 Andreas Kling REGRESSION(r131104): Heap-use-after-free in WebCore::Element::attributeChanged Reviewed by Anders Carlsson. Setting the "type" attribute on an HTMLInputElement that has no "value" attribute set will cause the input type changing mechanism to write a value attribute onto the element. This happens in HTMLInputElement::updateType(), below parseAttribute(). It's done via Element::setAttribute(), so we end up re-entering Element::setAttributeInternal() where the 'existingAttribute' pointer may now be invalid if adding the "value" attribute caused a reallocation in the ElementAttributeData's underlying Vector. To make it harder to introduce this kind of bug in the future, I changed almost all functions that take a "const Attribute&" to take a QualifiedName/AtomicString couple instead (the idea being that the fewer references into the attribute store we have, the better.) Test: fast/html/input-type-change-crash.html * dom/Attr.cpp: (WebCore::Attr::setValue): (WebCore::Attr::childrenChanged): * dom/Element.cpp: (WebCore::Element::setAttributeInternal): (WebCore::Element::attributeChanged): (WebCore::Element::parserSetAttributes): (WebCore::Element::addAttributeInternal): (WebCore::Element::didAddAttribute): (WebCore::Element::didModifyAttribute): (WebCore::Element::didRemoveAttribute): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::cloneDataFrom): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * dom/StyledElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): * svg/SVGElement.cpp: (WebCore::SVGElement::attributeChanged): * svg/SVGElement.h: (SVGElement): 2012-10-22 Joshua Bell IndexedDB: Bounds check for IDBCursor.advance() incorrect https://bugs.webkit.org/show_bug.cgi?id=100014 Reviewed by Tony Chang. Fix introduced by trac.webkit.org/changeset/131658 restricted cursor.advance()'s argument as [EnforceRange] unsigned long long, but it's typed as [EnforceRange] unsigned long; the useless comparison was caught by a clang check. In lieu of webkit.org/b/96798 make it long long and correct the range check. Test: storage/indexeddb/cursor-advance.html * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: 2012-10-22 Tony Chang WebKit does not support 'flex-wrap: nowrap' https://bugs.webkit.org/show_bug.cgi?id=99924 Reviewed by Ojan Vafai. The spec changed back from using none to nowrap for the single-line flexbox case. http://dev.w3.org/csswg/css3-flexbox/#flex-wrap-property No new tests, covered by css3/flexbox/css-properties.html and others. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexWrap): * css/CSSValueKeywords.in: * rendering/RenderBox.cpp: (WebCore::isStretchingColumnFlexItem): (WebCore::RenderBox::sizesLogicalWidthToFitContent): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::isMultiline): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2012-10-22 Mike West 'image/pjpeg' should be treated as an image by Web Inspector. https://bugs.webkit.org/show_bug.cgi?id=100001 Reviewed by Pavel Feldman. It's not exactly a "real" MIME type, but it's in use. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager): Adding 'image/pjpeg' as an image MIME type. 2012-10-22 Sheriff Bot Unreviewed, rolling out r132119. http://trac.webkit.org/changeset/132119 https://bugs.webkit.org/show_bug.cgi?id=100019 Fails its own test on Mac platforms. (Requested by leviw on #webkit). * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::sendContextMenuEventForGesture): * page/EventHandler.h: (EventHandler): 2012-10-22 Hans Muller [CSS Exclusions] Points on the bottom and right edges of an exclusion shape should be classified as "outside" https://bugs.webkit.org/show_bug.cgi?id=98967 Reviewed by Dirk Schulze. Changed the way lines are represented in the ExclusionShapeInsideInfo and ExclusionShape classes so that they're consistent with the rendering code that depends on them. Lines are now defined by logicalTop, logicalHeight, instead of logicalTop,logicalBottom. This a clean-up, not a change in functionality. It's already covered by the existing fast/exclusions LayoutTests. Test: fast/exclusions/shape-inside/shape-inside-bottom-edge.html * rendering/ExclusionPolygon.cpp: (WebCore::ExclusionPolygon::getExcludedIntervals): (WebCore::ExclusionPolygon::getIncludedIntervals): * rendering/ExclusionPolygon.h: * rendering/ExclusionRectangle.cpp: (WebCore::ExclusionRectangle::getExcludedIntervals): (WebCore::ExclusionRectangle::getIncludedIntervals): * rendering/ExclusionRectangle.h: * rendering/ExclusionShape.h: (LineSegment): Moved the struct fields below the constructor per webkit style. (ExclusionShape): (WebCore::ExclusionShape::minYForLogicalLine): (WebCore::ExclusionShape::maxYForLogicalLine): * rendering/ExclusionShapeInsideInfo.cpp: (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): * rendering/ExclusionShapeInsideInfo.h: (ExclusionShapeInsideInfo): (WebCore::ExclusionShapeInsideInfo::lineOverlapsShapeBounds): Changed the test to not include lines whose logicalTop is equal to the shape's top+height. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloatsInRange): 2012-10-22 Chris Rogers Update some AudioContext create() method names to latest Web Audio spec https://bugs.webkit.org/show_bug.cgi?id=99888 Reviewed by Adam Barth. The following AudioContext method names are being changed, with legacy support for the old names: createGainNode -> createGain createDelayNode -> createDelay createJavaScriptNode -> createScriptProcessor For details: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18332 Tests changed: webaudio/delaynode.html, webaudio/gain.html, webaudio/javascriptaudionode.html to test coverage of the new names. * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createScriptProcessor): (WebCore::AudioContext::createGain): (WebCore::AudioContext::createDelay): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/AudioContext.idl: * page/FeatureObserver.h: 2012-10-22 Varun Jain Context menu generated from touch gestures on textareas has context of the cursor position instead of the position where the event occurs. https://bugs.webkit.org/show_bug.cgi?id=99520 Reviewed by Kenneth Rohde Christiansen. Send a synthetic mouse down event for context menu-summoning-gesture events so that textareas can correctly set cursors before receiving the context menu event. Test: fast/events/touch/gesture/right-click-gestures-set-cursor-at-correct-position.html * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::handleGestureTwoFingerTap): (WebCore): (WebCore::EventHandler::sendContextMenuEventForGesture): * page/EventHandler.h: (EventHandler): 2012-10-22 Zeno Albisser TextureMapperSurfaceBackingStore should check if GraphicsSurface is valid. https://bugs.webkit.org/show_bug.cgi?id=100002 Reviewed by Kenneth Rohde Christiansen. * platform/graphics/texmap/TextureMapperBackingStore.cpp: (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface): Check if a surface has been created before accessing the pointer. (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper): Check if m_graphicsSurface is a valid pointer before dereferencing it. 2012-10-22 Michael Saboff r131955 is has improper function call in LinkHashChromium.cpp https://bugs.webkit.org/show_bug.cgi?id=100008 Reviewed by Alexey Proskuryakov. Followup fix to r131955 for chromium platform. Added call to (const UChar*, unsigned) version of visitedLinkHash from String& version. * platform/chromium/LinkHashChromium.cpp: (WebCore::visitedLinkHash): 2012-10-22 Aaron Colwell webkitsourceopen event doesn't always fire https://bugs.webkit.org/show_bug.cgi?id=99868 Reviewed by Adam Barth. Changed MediaSource to derive from ActiveDOMObject so that event listeners will still fire even if all references to the object go out of scope. Test: http/tests/media/media-source/video-media-source-garbage-collection-before-sourceopen.html * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::create): (WebCore::MediaSource::MediaSource): (WebCore::MediaSource::scriptExecutionContext): (WebCore): (WebCore::MediaSource::hasPendingActivity): (WebCore::MediaSource::stop): Clears m_player & m_asyncEventQueue so they don't indicate pending activity anymore. * Modules/mediasource/MediaSource.h: (MediaSource): * Modules/mediasource/MediaSource.idl: * Modules/mediasource/MediaSourceRegistry.cpp: (WebCore::MediaSourceRegistry::registerMediaSourceURL): Added setPendingActivity() call so the MediaSource object stays active while in the registry. (WebCore::MediaSourceRegistry::unregisterMediaSourceURL): Added unsetPendingActivity() call so the MediaSource object can become inactive after being removed from the registry. 2012-10-22 Adam Barth [V8] Vastly simplify V8GCController's NodeVisitor https://bugs.webkit.org/show_bug.cgi?id=99884 Reviewed by Kentaro Hara. NodeVisitor was vastly more complicated than necessary. This patch improve performance on these new gc benchmarks: gc-forest: 1.14% better gc-mini-tree: 5.09% better gc-tree: 4.60% better * bindings/v8/V8GCController.cpp: (WebCore::ObjectVisitor::visitDOMWrapper): (WebCore::addImplicitReferencesForNodeWithEventListeners): (WebCore::rootForGC): (WebCore::NodeVisitor::visitDOMWrapper): (WebCore::NodeVisitor::applyGrouping): (NodeVisitor): 2012-10-22 Emil A Eklund Change baselinePosition and maxAscent/maxDescent to int https://bugs.webkit.org/show_bug.cgi?id=99767 Reviewed by Levi Weintraub. Currently baselinePostion, maxAscent and maxDescent are LayoutUnits while ascent, descent and m_lineHeight are ints. This can lead to subtle alignment and rounding problems. Change baselinePosition and maxAscent/maxDescent to int to avoid these issues. Test: fast/sub-pixel/replaced-element-baseline.html * editing/FrameSelection.cpp: (WebCore::repaintRectForCaret): Inflate Y dimension just like we do for X to ensure that the repaint rect fully contains the caret. * rendering/InlineBox.cpp: (WebCore::InlineBox::baselinePosition): * rendering/InlineBox.h: (InlineBox): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Change maxAscent/maxDescent to int to match ascent/descent. * rendering/InlineFlowBox.h: (InlineFlowBox): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::baselinePosition): * rendering/InlineTextBox.h: (InlineTextBox): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::baselinePosition): (WebCore::RenderBlock::firstLineBoxBaseline): (WebCore::RenderBlock::lastLineBoxBaseline): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::baselinePosition): * rendering/RenderBox.h: (WebCore::RenderBox::firstLineBoxBaseline): (WebCore::RenderBox::lastLineBoxBaseline): (RenderBox): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::baselinePosition): (WebCore::RenderFlexibleBox::firstLineBoxBaseline): * rendering/RenderFlexibleBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::baselinePosition): * rendering/RenderInline.h: (RenderInline): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::baselinePosition): * rendering/RenderListBox.h: (RenderListBox): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::baselinePosition): * rendering/RenderListMarker.h: (RenderListMarker): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::baselinePosition): * rendering/RenderSlider.h: (RenderSlider): * rendering/RenderTable.cpp: (WebCore::RenderTable::baselinePosition): (WebCore::RenderTable::lastLineBoxBaseline): (WebCore::RenderTable::firstLineBoxBaseline): * rendering/RenderTable.h: (RenderTable): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::firstLineBoxBaseline): * rendering/RenderTableSection.h: (RenderTableSection): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::baselinePosition): * rendering/RenderTextControlMultiLine.h: (RenderTextControlMultiLine): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::baselinePosition): * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::baselinePosition): * rendering/RenderThemeSafari.h: (RenderThemeSafari): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::baselinePosition): (WebCore::RootInlineBox::alignBoxesInBlockDirection): * rendering/RootInlineBox.h: (RootInlineBox): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::baselinePosition): (WebCore::RenderMathMLTable::firstLineBoxBaseline): * rendering/mathml/RenderMathMLBlock.h: (RenderMathMLBlock): (RenderMathMLTable): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::firstLineBoxBaseline): * rendering/mathml/RenderMathMLFraction.h: (RenderMathMLFraction): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::firstLineBoxBaseline): * rendering/mathml/RenderMathMLOperator.h: * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::firstLineBoxBaseline): * rendering/mathml/RenderMathMLUnderOver.h: (RenderMathMLUnderOver): 2012-10-22 Emil A Eklund Modify LayoutState ASSERTS to support SATURATED_LAYOUT_ARITHMETIC https://bugs.webkit.org/show_bug.cgi?id=98692 Reviewed by Dan Bernstein. We currently overflow/wrap when computing the delta in RenderBlock::setLogicalTopForChild in cases where we have an element with a width or height exceeding maxLayoutUnit. When the delta is later added back in RenderBlock::layoutBlockChild the number wraps again getting us back to the correct value. With SATURATED_LAYOUT_ARITHMETIC enabled the values no longer wraps, which seems like the correct thing to do however this causes the compare to fail for obvious reasons. By accounting for this we can keep the asserts (which have proven very helpful) even when SATURATED_LAYOUT_ARITHMETIC is turned on. No new tests, covered by existing tests. * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/LayoutState.h: (WebCore::LayoutState::LayoutState): (LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): * rendering/RenderView.cpp: (WebCore::RenderView::layout): * rendering/RenderView.h: (WebCore::RenderView::addLayoutDelta): (RenderView): (WebCore::RenderView::layoutDeltaMatches): 2012-10-22 Tony Chang Fix some baseline flexbox alignment https://bugs.webkit.org/show_bug.cgi?id=99879 Reviewed by Ojan Vafai. Fix a bug where we weren't handling margin properly on inline-flexbox. Fix a bug where we weren't getting the edge of the content box properly when synthesizing a baseline. Test: css3/flexbox/flexbox-baseline-margins.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::baselinePosition): (WebCore::RenderBlock::inlineBlockBaseline): Add a new method that is used when calculating an inline-block's baseline. Previously we would use lastLineBoxBaseline. (WebCore::RenderBlock::lastLineBoxBaseline): Pass in direction and when searching children, use inlineBlockBaseline. * rendering/RenderBlock.h: (RenderBlock): Make lastLineBoxBaseline non-virtual. * rendering/RenderBox.h: (WebCore::RenderBox::inlineBlockBaseline): Replace lastLineBoxBaseline with inlineBlockBaseline. * rendering/RenderFlexibleBox.cpp: (WebCore::synthesizedBaselineFromContentBox): Helper method for getting the baseline from the content box. (WebCore::RenderFlexibleBox::baselinePosition): Always include the margin. This fixes the inline-flexbox case. (WebCore::RenderFlexibleBox::firstLineBoxBaseline): Fix a case where we didn't synthesize a baseline. Returning -1 means there is no baseline, but we can synthesize a baseline if we have a flexitem without text. (WebCore::RenderFlexibleBox::inlineBlockBaseline): * rendering/RenderFlexibleBox.h: * rendering/RenderTable.cpp: Replace lastLineBoxBaseline with inlineBlockBaseline. (WebCore::RenderTable::inlineBlockBaseline): Try to make comment more direct. * rendering/RenderTable.h: (RenderTable): Replace lastLineBoxBaseline with inlineBlockBaseline. 2012-10-22 Levi Weintraub Unreviewed Chromium build fix following r132074. * WebCore.gypi: 2012-10-22 Mario Sanchez Prada [GTK] Don't use deprecated AccessibilityObject methods after r99502 https://bugs.webkit.org/show_bug.cgi?id=99985 Reviewed by Chris Fleizach. Update callers for AccessibilityObject's title() and accessibilityDescription() so they now use AccessibilityText. * accessibility/gtk/WebKitAccessibleUtil.cpp: (titleTagShouldBeUsedInDescriptionField): Internal helper function. (accessibilityTitle): New helper function, returns an String with the title for a AccessibilityObject, using AccessibleText. (accessibilityDescription): New helper function, returns an String with the description for a AccessibilityObject, using AccessibleText. * accessibility/gtk/WebKitAccessibleUtil.h: Added public declarations for accessibilityTitle and accessibilityDescription. * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetName): Use new helpers for retrieving the title. (webkitAccessibleGetDescription): Use new helpers for retrieving the title and description. * accessibility/gtk/WebKitAccessibleInterfaceImage.cpp: (webkitAccessibleImageGetImageDescription): Use new helpers for retrieving the title. 2012-10-16 Andrey Kosyakov Web Inspector: add timeline instrumentation for scrolling of a layer https://bugs.webkit.org/show_bug.cgi?id=99461 Reviewed by Pavel Feldman. - added timeline instrumentation for scrolling of a layer; - added TRACE_EVENT for ScrollableArea::scrollPositionChanged() * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::willScrollLayerImpl): (WebCore::InspectorInstrumentation::didScrollLayerImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willScrollLayer): (WebCore): (WebCore::InspectorInstrumentation::didScrollLayer): * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): (WebCore::InspectorTimelineAgent::willScroll): (WebCore): (WebCore::InspectorTimelineAgent::didScroll): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel._initRecordStyles): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollPositionChanged): 2012-10-22 Jan Keromnes Moved cmdevtools.js to folder cm/ Web Inspector: Move file `cmdevtools.css` to `cm/` https://bugs.webkit.org/show_bug.cgi?id=99956 Reviewed by Pavel Feldman. The file cmdevtools.js belongs to the CodeMirror editor experiment in cm/. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/WebKit.qrc: * inspector/front-end/cm/cmdevtools.css: Renamed from Source/WebCore/inspector/front-end/cmdevtools.css. (.CodeMirror): (.CodeMirror-scroll): (.cm-highlight): (@-webkit-keyframes fadeout): (to): (.cm-breakpoint): (.cm-breakpoint-disabled): (.cm-breakpoint-conditional): (.cm-execution-line): (.cm-s-web-inspector-js span.cm-keyword): (.cm-s-web-inspector-js span.cm-number): (.cm-s-web-inspector-js span.cm-comment): (.cm-s-web-inspector-js span.cm-string): (.cm-s-web-inspector-js span.cm-string-2): (.cm-s-web-inspector-css span.cm-keyword): (.cm-s-web-inspector-css span.cm-number): (.cm-s-web-inspector-css span.cm-comment): (.cm-s-web-inspector-css span.cm-string): (.cm-s-web-inspector-css span.cm-string-2): (.cm-s-web-inspector-css span.cm-link): (.cm-s-web-inspector-css span.cm-variable): (.cm-s-web-inspector-html span.cm-meta): (.cm-s-web-inspector-html span.cm-comment): (.cm-s-web-inspector-html span.cm-string): (.cm-s-web-inspector-html span.cm-tag): (.cm-s-web-inspector-html span.cm-attribute): (.cm-s-web-inspector-html span.cm-link): (.webkit-html-message-bubble): (.webkit-html-warning-message): (.webkit-html-error-message): (.webkit-html-message-line): (.webkit-html-message-line-hover): 2012-10-22 Vsevolod Vlasov Web Inspector: Prepare mappings to moving uiSourceCodes creation out of them to workspace. https://bugs.webkit.org/show_bug.cgi?id=99997 Reviewed by Pavel Feldman. Source mappings could now store a link to temporary uiSourceCodes only. Otherwise it should retrieve uiSourceCodes from workspace by URL. Original uiSourceCodes are now temporary in CompilerScriptMapping. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping): (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation): (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript): (WebInspector.CompilerScriptMapping.prototype._reset): * inspector/front-end/NetworkUISourceCodeProvider.js: (WebInspector.NetworkUISourceCodeProvider): (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource): (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded): (WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode): (WebInspector.NetworkUISourceCodeProvider.prototype._projectWillReset): * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping): (_bindUISourceCode): (_reset): 2012-10-22 Nicolas Dufresne Gstreamer 1.0 not working https://bugs.webkit.org/show_bug.cgi?id=99852 Reviewed by Philippe Normand. There was a series of trivial issue, g_object_is_floating() was called on type GstCaps (which is not a GObject), webkitGstGetPadCaps() was returning non-fixed caps and GST_MESSAGE_DURATION has been renamed to GST_MESSAGE_DURATION_CHANGED. Most failing test passes now. * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): * platform/graphics/gstreamer/GStreamerVersioning.cpp: (webkitGstGetPadCaps): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): 2012-10-22 Vsevolod Vlasov Web Inspector: Treat dynamic anonymous scripts as other anonymous and fix anonymous script editing and breakpoints. https://bugs.webkit.org/show_bug.cgi?id=99989 Reviewed by Pavel Feldman. Dynamic anonymous scripts are now mapped to anonymous temporary uiSourceCodes. ResourceScriptMapping now supports two types of temporary uiSourceCodes: - original uiSourceCodes represent scripts while main uiSourceCodes are diverged; - temporary uiSourceCodes represent scripts for which resources are not yet loaded. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.breakpointStorageId): (WebInspector.BreakpointManager.Storage.prototype._updateBreakpoint): * inspector/front-end/NetworkUISourceCodeProvider.js: (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping): (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation): (WebInspector.ResourceScriptMapping.prototype._hasMergedToVM): (WebInspector.ResourceScriptMapping.prototype.addScript): (WebInspector.ResourceScriptMapping.prototype._deleteOriginalUISourceCodeForScripts): (WebInspector.ResourceScriptMapping.prototype._deleteTemporaryUISourceCodeForScripts): (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts): (WebInspector.ResourceScriptMapping.prototype._createUISourceCode): (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode): (WebInspector.ResourceScriptMapping.prototype._getOrCreateOriginalUISourceCode): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace): (WebInspector.ResourceScriptMapping.prototype._scriptsForUISourceCode.get if): (WebInspector.ResourceScriptMapping.prototype._reset): 2012-10-22 Bruno de Oliveira Abinader [css3-text] Add rendering support for -webkit-text-decoration-style https://bugs.webkit.org/show_bug.cgi?id=94094 Reviewed by Julien Chaffraix. This patch implements the "text-decoration-style" property rendering as specified in CSS3 working draft, with "-webkit-" prefix. The specification can be found here: http://dev.w3.org/csswg/css3-text/#text-decoration-style Additionally, Mozilla implementation details can be found here: https://developer.mozilla.org/en/CSS/text-decoration-style Tests: fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-style.html fast/css3-text/css3-text-decoration/text-decoration-style.html * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformStrokeStyle): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawLine): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQPenStyle): (WebCore::GraphicsContext::drawLine): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setupPaintForStroking): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::createPen): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::strokeStyleToWxPenStyle): Added 'DoubleStroke' and 'WavyStroke' to StrokeStyle enum and updated platform-specific stroke handling. Some styles requires platform-specific implementation (handled in bug 92868). * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): (WebCore::textDecorationStyleToStrokeStyle): Added static function that translates text decoration to stroke styles. (WebCore::InlineTextBox::paintDecoration): Text decoration style does not specify a property for line thickness (like border-width does for border style), so we statically set it to 1 for now. The 'double' style implementation simply adds a parallel line (depending if it is underline, overline or line-through) and the space between lines follows the approach used by border's 'double' style. * rendering/InlineTextBox.h: (InlineTextBox): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: Added text decoration style rendering support to InlineTextBox::paintDecoration(). 2012-10-22 Allan Sandfeld Jensen [Qt] Use the DNS resolve queue https://bugs.webkit.org/show_bug.cgi?id=99994 Reviewed by Simon Hausmann. Use the DNS resolve queue, to ensure we can prefetch more than just the first 10 hostname encountered during parsing. It also ensure each hostname is only appears once in the queue. * Target.pri: * platform/network/qt/DNSQt.cpp: Added. (DnsPrefetchHelper): (WebCore::DnsPrefetchHelper::DnsPrefetchHelper): (WebCore::DnsPrefetchHelper::lookup): (WebCore::DnsPrefetchHelper::lookedUp): (WebCore::prefetchDNS): (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): (WebCore::DNSResolveQueue::platformResolve): * platform/network/qt/DnsPrefetchHelper.cpp: Removed. * platform/network/qt/DnsPrefetchHelper.h: Removed. (DnsPrefetchHelper): 2012-10-22 Erik Arvidsson HTMLBaseElement href attribute binding returns wrong URL https://bugs.webkit.org/show_bug.cgi?id=98184 Reviewed by Ojan Vafai. Resolve the href attribute binding relative to the document URL instead of resolving it to the base element itself. If there is no href attribute this should return the fallback base URL. http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-base-element Tests: fast/dom/HTMLAnchorElement/set-href-attribute-rebase.html fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::href): Don't use completeURL. Resolve href based on document's URL instead of the generic [Reflect, URL] binding. (WebCore::HTMLBaseElement::setHref): Just sets the attribute. * html/HTMLBaseElement.h: * html/HTMLBaseElement.idl: We can no longer use [Reflect, URL] 2012-10-22 Vsevolod Vlasov Web Inspector: Revisions should not be restored and persisted for anonymous uiSourceCodes. https://bugs.webkit.org/show_bug.cgi?id=99991 Reviewed by Alexander Pavlov. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): 2012-10-22 Florin Malita Incorrect embedded SVG image sizing on first load https://bugs.webkit.org/show_bug.cgi?id=99489 Reviewed by Nikolas Zimmermann. RenderSVGImage::updateImageViewport() must be called after the image loader is finished, to ensure that a SVGImageCache::SizeAndScalesMap entry is created even if layout has already been performed. Test: svg/custom/svg-image-initial-size.html * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): 2012-10-22 Keishi Hattori Remove monthFormatInLDML https://bugs.webkit.org/show_bug.cgi?id=99971 Reviewed by Kent Tamura. Removing monthFormatInLDML from localized strings because Localizer class now provides the same functionality. No new tests. Just removing unused code. * platform/LocalizedStrings.h: (WebCore): 2012-10-22 Zan Dobersek [GTK] Enable Microdata DOM API https://bugs.webkit.org/show_bug.cgi?id=99033 Reviewed by Martin Robinson. Enable the Microdata DOM API, but still disable it when the unstable features should be disabled (for instance in release builds). No new tests - related tests are being unskipped and are expected to pass. * GNUmakefile.am: * GNUmakefile.features.am: * bindings/gobject/GNUmakefile.am: Add the required files so the Microdata API GObject bindings are generated and built. 2012-10-22 Zan Dobersek [GTK] Enable CSP 1.1 https://bugs.webkit.org/show_bug.cgi?id=99064 Reviewed by Martin Robinson. Enable CSP 1.1 in development builds but keep it disabled when the unstable features should not be enabled (like in stable releases). No new tests - they already exist and will be unskipped. * GNUmakefile.am: * GNUmakefile.features.am: 2012-10-22 Jocelyn Turcotte [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page https://bugs.webkit.org/show_bug.cgi?id=98514 Reviewed by Kenneth Rohde Christiansen. The problem is that we call setFixedVisibleContentRect, which triggers a layout, after the document has been put in the page cache and before the load has been actually committed. This applies the same trick as with setFixedLayoutSize by passing the rect in Frame::createView and calling setFixedVisibleContentRect before the new FrameView gets attached to the Frame/Document to prevent the layout. * WebCore.exp.in: * page/Frame.cpp: (WebCore::Frame::createView): Give a default value to the fixedLayoutSize and useFixedLayout arguments as well since they are used exceptionally. * page/Frame.h: (Frame): 2012-10-22 Allan Sandfeld Jensen [Qt] Handle GET of blob URLs. https://bugs.webkit.org/show_bug.cgi?id=99053 Reviewed by Simon Hausmann. Let BlobResourceHandle handle Blob request internally. * platform/network/qt/ResourceHandleQt.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): 2012-10-22 Kenichi Ishibashi HarfBuzzShaper::shape() should return false when it adds no glyph to GlyphBuffer https://bugs.webkit.org/show_bug.cgi?id=99966 Reviewed by Kent Tamura. If no glyph is added to GlyphBuffer, HarfBuzzShaper::shape() returns false. No new tests. Confirmed the fix by using Address Sanitizer. * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shape): (WebCore::HarfBuzzShaper::fillGlyphBuffer): Returns false when glyphBuffer.size() == 0 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: (HarfBuzzShaper): 2012-10-22 Shinya Kawanaka [Shadow] ASSERT triggered when we try reprojecting fallback elements. https://bugs.webkit.org/show_bug.cgi?id=99815 Reviewed by Hajime Morita. When fallback elements of InsertionPoint is reprojected, they were attached twice. We have to skip attaching them if they are attached. We also add a few ASSERT not to allow attaching twice if not necessary. We have confirmed that this patch does not regress the performance. The summary of the performance test is the following: Dromaeo/dom-modify.html [runs/s]: median stdev min max without this patch: 3928 184 3655 4361 with this patch : 3925 178 3652 4350 Parser/html5-full-render.html [s]: median stdev min max without this patch: 3821 17 3811 3850 with this patch : 3838 4.4 3833 3844 Test: fast/dom/shadow/content-reprojection-fallback-crash.html * dom/ContainerNode.cpp: (WebCore): (WebCore::childAttachedAllowedWhenAttachingChildren): If true, children of this node might be attached in advance because of ShadowDOM attaching process. * dom/ContainerNode.h: (ContainerNode): (WebCore): (WebCore::ContainerNode::attachChildren): * dom/Element.cpp: (WebCore::Element::attach): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::attach): 2012-10-22 Pavel Feldman Web Inspector: merge "docked" state into the "dock side" enum. https://bugs.webkit.org/show_bug.cgi?id=99717 Reviewed by Vsevolod Vlasov. Otherwise, it is hard to manage these inter-dependent flags. * WebCore.exp.in: * inspector/InspectorFrontendClient.h: (InspectorFrontendClient): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::requestSetDockSide): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorFrontendClientLocal.h: (InspectorFrontendClientLocal): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::requestSetDockSide): * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: * inspector/front-end/DockController.js: (WebInspector.DockController): (WebInspector.DockController.prototype._updateUI.get sides): (WebInspector.DockController.prototype._updateUI): (WebInspector.DockController.prototype._toggleDockState): * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.setAttachedWindow): (InspectorFrontendAPI.setDockSide): * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide): * inspector/front-end/externs.js: 2012-10-22 MORITA Hajime Unreviewed follow up to update test result after r132033. * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): 2012-10-21 MORITA Hajime [V8] V8EnablePerContext shouldn't require document() accessor to the native object. https://bugs.webkit.org/show_bug.cgi?id=99954 Reviewed by Kentaro Hara. It now refers ScriptExecutionContext of the creation context instead of document() of wrapped object. No new tests. No behavior change at this time. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): 2012-10-21 Kent Tamura Page popup: Fix crash by events after closing https://bugs.webkit.org/show_bug.cgi?id=99951 Reviewed by Hajime Morita. WebCore should provide a way to uninstall a DOMWindowPagePopup supplement. No new tests. The bug is timing-dependent. * page/DOMWindowPagePopup.cpp: (WebCore::DOMWindowPagePopup::uninstall): Added. Calls Supplementable::removeSupplement. * page/DOMWindowPagePopup.h: (DOMWindowPagePopup): Declare uninstall. * platform/Supplementable.h: (WebCore::Supplementable::removeSupplement): Added. 2012-10-21 Keishi Hattori Refactor picker tests to fix flakiness and share code https://bugs.webkit.org/show_bug.cgi?id=99671 Reviewed by Kent Tamura. Disable transitions until the picker is fully ready. This should fix flakiness. No new tests. * Resources/pagepopups/calendarPicker.css: (.preparing .unavailable): Disable transitions. (.preparing .available): Disable transitions. * Resources/pagepopups/calendarPicker.js: (CalendarPicker): Set "preparing" class. (CalendarPicker.prototype._handleWindowResize): Remove the "preparing" class when the window finishes resizing. 2012-10-21 Shinya Kawanaka Web Inspector: Shadow DOM: Node removal doesn't reflect. https://bugs.webkit.org/show_bug.cgi?id=99567 Reviewed by Pavel Feldman. We have to call InspectorInstrumentation::willRemoveDOMNode() even if a node is in a shadow tree. Otherwise, node won't be removed from the inspector. Test: inspector/elements/update-shadowdom.html * dom/ContainerNode.cpp: (WebCore::dispatchChildRemovalEvents): 2012-10-21 Andreas Kling Remove Page::javaScriptURLsAreAllowed setting. Reviewed by Anders Carlsson. This setting was exposed through internal WebView API in Apple's WebKit1. There are no longer any clients of that API. This is a step towards preventing elements from modifying their own attributes below attributeChanged(). * WebCore.exp.in: * WebCore.order: * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (Page): 2012-10-21 Hyungchan Kim Add a separate flag for rgb swizzling whether it can be modified or not https://bugs.webkit.org/show_bug.cgi?id=98728 BitmapTexture swizzles the source image if the OpenGL driver doesn't support the BGRA extension. In case of directly composited images, the source image should not be modified. http://www.satine.org/research/webkit/snowleopard/snowstack.html Reviewed by Noam Rosenthal. No new tests as this is only testable on specific hardware and currently not avaiable in the bots. * platform/graphics/texmap/TextureMapper.h: (BitmapTexture): * platform/graphics/texmap/TextureMapperBackingStore.cpp: (WebCore::TextureMapperTile::updateContents): (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded): (WebCore::TextureMapperTiledBackingStore::updateContents): * platform/graphics/texmap/TextureMapperBackingStore.h: (TextureMapperTile): (TextureMapperTiledBackingStore): (WebCore::TextureMapperTiledBackingStore::updateContents): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawRepaintCounter): (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/TextureMapperGL.h: (BitmapTextureGL): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): * platform/graphics/texmap/TextureMapperImageBuffer.h: (BitmapTextureImageBuffer): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::updateBackingStore): 2012-10-21 Antti Koivisto Factor stylesheet invalidation analysis code into a class https://bugs.webkit.org/show_bug.cgi?id=99933 Reviewed by Sam Weinig. Currently the stylesheet analysis code is all over the place. It should be factored into a class to make further progress easier. The patch adds StyleInvalidationAnalysis class and moves a bunch of code from SelectorChecker, StyleResolver and DocumentStyleSheetCollection there. No functional changes. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/SelectorChecker.cpp: (WebCore): * css/SelectorChecker.h: (WebCore): * css/StyleInvalidationAnalysis.cpp: Added. (WebCore): (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis): (WebCore::StyleInvalidationAnalysis::create): (WebCore::determineSelectorScopes): (WebCore::StyleInvalidationAnalysis::analyzeStyleSheet): (WebCore::elementMatchesSelectorScopes): (WebCore::StyleInvalidationAnalysis::invalidateStyle): * css/StyleInvalidationAnalysis.h: Added. (WebCore): (StyleInvalidationAnalysis): (WebCore::StyleInvalidationAnalysis::dirtiesAllStyle): * css/StyleResolver.cpp: (WebCore::StyleResolver::checkRegionSelector): * css/StyleResolver.h: (StyleResolver): * dom/DocumentStyleSheetCollection.cpp: (WebCore): (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange): * dom/DocumentStyleSheetCollection.h: (DocumentStyleSheetCollection): 2012-10-08 Robert Hogan In some float situations, the original layout is wrong and only corrects itself on repaint https://bugs.webkit.org/show_bug.cgi?id=18939 Reviewed by Levi Weintraub. A
that follows collapsing spaces and has clearance set always needs to get a run and a linebox of its own. This allows the line below it to check for clearance from the
if it gets dirtied but the line with the
does not. Test: fast/block/br-with-clearance-after-collapsing-space.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2012-10-08 Robert Hogan floated element with negative margin causes text wrap bug https://bugs.webkit.org/show_bug.cgi?id=94825 Reviewed by Levi Weintraub. Avoid over-estimating the available width on the line by ensuring that the offset taken to avoid floats on the line is at least as much as the offset given by border, margin and padding. This only happens when a negative margin on the float brings its edge back before the offset given by the border, margin and padding of its parents. Test: fast/block/float/float-on-line-obeys-container-padding.html * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): 2012-10-20 Martin Robinson Fix 'make dist' for the GTK+ port * GNUmakefile.am: Add missing files to the source list. * GNUmakefile.list.am: Ditto. 2012-10-20 Dan Bernstein [mac] Text with zero font size renders as 12px sometimes https://bugs.webkit.org/show_bug.cgi?id=99918 Reviewed by Geoff Garen. -[NSFont fontWithName:size:] returns an NSFont of size 12 (the default User Font size) when asked for size 0, and this is what Font::drawGlyphs uses to draw the text. Test: fast/text/zero-font-size-2.html * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): Added an early return if the size is zero. 2012-10-20 Andreas Kling Clean up QualifiedName-as-hash-key scenario. Reviewed by Anders Carlsson. Cache the hash on QualifiedNameImpl after the first time it's computed. This grows QualifiedNameImpl by 4 bytes on 32-bit (no change on 64-bit due to base class padding) which I believe is fine, since QualifiedName is a shared object. Add a global nullQName() function that returns a QualifiedName(nullAtom, nullAtom, nullAtom) and use this to implement HashTraits::emptyValue(). The old implementation would create a new QualifiedName(nullAtom, nullAtom, nullAtom) each time, which had to be hashed, added to the global QualifiedName cache, etc. Finally, don't have SVGAttributeHashTranslator create a temporary QualifiedName just to compute the hash of a (namespace, prefix, localName) tuple, use QualifiedNameComponents and hashComponents() directly instead. Altogether this shaves ~100ms off of the RoboHornet svgresize.html benchmark on my MBP. * dom/QualifiedName.cpp: (WebCore::nullQName): (WebCore::QualifiedName::QualifiedNameImpl::computeHash): * dom/QualifiedName.h: (QualifiedNameImpl): (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl): (WebCore::QualifiedNameHash::hash): * svg/SVGElement.h: (WebCore::SVGAttributeHashTranslator::hash): 2012-10-20 Yael Aharon [EFL][AC] Build fix after r131933 https://bugs.webkit.org/show_bug.cgi?id=99901 Reviewed by Kentaro Hara. Add ArrayBoundsClamper.cpp to WebCore/CMakeLists.txt. No new tests. * CMakeLists.txt: 2012-10-19 Adam Barth [V8] V8DOMWrapper should avoid using its document parameter (so we can remove it soon) https://bugs.webkit.org/show_bug.cgi?id=99876 Reviewed by Kentaro Hara. We want to remove the document parameter to instantiateV8Object. There isn't always a Document available, so it doesn't make sense to pass it as a parameter. We're just waiting for a V8 API change so we can still construct Node wrappers quickly. This patch removes a use of the document that snuck in. Rather than passing the ScriptExecutionContext around, we get it from the CreationContext of the prototype object (and only when we actually need it). * Modules/notifications/NotificationCenter.cpp: * Modules/notifications/NotificationCenter.h: (NotificationCenter): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateConstructorGetter): (GenerateImplementation): (GenerateToV8Converters): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::installDOMWindow): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/V8PerContextData.cpp: (WebCore::V8PerContextData::createWrapperFromCacheSlowCase): (WebCore::V8PerContextData::constructorForTypeSlowCase): * bindings/v8/V8PerContextData.h: (WebCore::V8PerContextData::createWrapperFromCache): (WebCore::V8PerContextData::constructorForType): (V8PerContextData): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initializeIfNeeded): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WebCore::WrapperTypeInfo::installPerContextPrototypeProperties): 2012-10-19 Florin Malita Incorrect pattern scaling https://bugs.webkit.org/show_bug.cgi?id=99870 Reviewed by Dirk Schulze. The pattern space transform scale should reflect the tile_size(user space) to tile_image_size ratio, instead of tile_size to absolute_tile_size. Test: svg/custom/pattern-scaling.svg * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): 2012-10-19 Tony Chang RenderFlexibleBox::preferredMainAxisContentExtentForChild can return a negative value https://bugs.webkit.org/show_bug.cgi?id=97827 Reviewed by Ojan Vafai. I'm pretty sure this isn't possible (logicalHeight and maxPreferredLogicalWidth should always include border and padding), so just add an assert. No new tests, the assert is for code clarity. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): 2012-10-19 Tony Chang Replace calls to updateLogicalHeight with calls to computeLogicalHeight https://bugs.webkit.org/show_bug.cgi?id=99883 Reviewed by Ojan Vafai. In RenderBox and RenderBlock, switch to using computeLogicalHeight instead of saving the old height, calling update logical height, then restoring the old height. No new tests, this is just a refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): Simple replace. * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): Adjust for content height. (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Adjust for content height. (WebCore::RenderBox::availableLogicalHeightUsing): Adjust for content height. 2012-10-19 Pablo Flouret Implement setRangeText() on text controls https://bugs.webkit.org/show_bug.cgi?id=91907 Reviewed by Kent Tamura. setRangeText() replaces a range of text with some other text, and adjusts the existing selection according to its parameters. Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-textarea/input-setrangetext Tests: fast/forms/color/color-setrangetext.html fast/forms/date/date-setrangetext.html fast/forms/datetime/datetime-setrangetext.html fast/forms/datetimelocal/datetimelocal-setrangetext.html fast/forms/file/file-setrangetext.html fast/forms/hidden/hidden-setrangetext.html fast/forms/image/image-setrangetext.html fast/forms/month/month-setrangetext.html fast/forms/number/number-setrangetext.html fast/forms/range/range-setrangetext.html fast/forms/search/search-setrangetext.html fast/forms/setrangetext.html fast/forms/textarea/textarea-setrangetext.html fast/forms/time/time-setrangetext.html fast/forms/week/week-setrangetext.html * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): The GObject generator doesn't support function overloads, so skip the version of setRangeText() that has only one argument, its behavior can be emulated with the four-argument version. * html/InputType.cpp: (WebCore::InputType::supportsSelectionAPI): (WebCore): * html/InputType.h: (InputType): Add supportsSelectionAPI() which indicates whether the various selection api functions like setRangeText, setSelectionRange, etc. are supported by this input element. * html/BaseTextInputType.cpp: (WebCore::BaseTextInputType::supportsSelectionAPI): (WebCore): * html/BaseTextInputType.h: (BaseTextInputType): Text-based input types support the selection APIs. * html/EmailInputType.cpp: (WebCore::EmailInputType::supportsSelectionAPI): (WebCore): * html/EmailInputType.h: (EmailInputType): Email inputs don't support the selection APIs. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setRangeText): * html/HTMLInputElement.h: (HTMLInputElement): Add a setRangeText override which checks if it should apply to the input type, and calls the actual implementation on the parent class. * html/HTMLInputElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setRangeText): * html/HTMLTextFormControlElement.h: (HTMLTextFormControlElement): setRangeText implementation. 2012-10-19 Luke Macpherson Remove HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro in StyleResolver. https://bugs.webkit.org/show_bug.cgi?id=99782 Reviewed by Sam Weinig. Removes last usage of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro, so that in future there will be no temptation to use it instead of adding a line to StyleBuilder. Also removes redundant checks for inital and inherit (HANDLE_INHERIT_AND_INTIAL already returns in those cases). I don't want to move this code into StyleBuilder until the FIXME that is already there is fixed. Covered by many existing writing mode tests (eg. fast/html/details-writing-mode.html) * css/StyleResolver.cpp: (WebCore): (WebCore::StyleResolver::applyProperty): 2012-10-19 Joshua Bell IndexedDB: Hidden indexing events are visible to script via bubbling/capture https://bugs.webkit.org/show_bug.cgi?id=96566 Reviewed by Tony Chang. Stop propagation of error events fired at internal indexing requests as a result of aborting, as they should not be visible to scripts. Test: storage/indexeddb/index-population.html * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (WebCore::IDBRequest::preventPropagation): (IDBRequest): 2012-10-19 Simon Fraser Remove .get() calls in assertions as suggested by Darin Adler. * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::appendSublayer): (PlatformCALayer::insertSublayer): (PlatformCALayer::replaceSublayer): 2012-10-19 Simon Fraser Fix a hang when combining tile cache layers with preserve-3d or reflections https://bugs.webkit.org/show_bug.cgi?id=99890 Reviewed by Dean Jackson. The new tile cache code added an updateSublayers() call when switching to/from tiled layers. This confused later sublayer rebuilding, causing us to attempt to add a layer as a child of itself, causing a hang in CA. Fix by removing all the explicit calls to updateFoo when updating the structural layer and switching to/from tiled layers. Instead, we set dirty flags, and rely on the fact that these flag-dirtying functions get called before the later functions that process those dirty flags. This is assured by some reordering of the update function calls. A final wrinkle is that ensureStructuralLayer() can change the layer that our parent GraphicsLayer put in its sublayer list. Rather than diddle with that sublayer list directly like we used to, just call noteSublayersChanged() on the parent, and have commitLayerChangesAfterSublayers() check the ChildrenChanged and do a second update of sublayers if necessary (we clear the flag in commitLayerChangesBeforeSublayers(), so only do this work if a sublayer requested it). Tests: compositing/tiling/preserve3d-tiled.html compositing/tiling/reflected-tiled.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers): (WebCore::GraphicsLayerCA::ensureStructuralLayer): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::appendSublayer): Add assertion about adding a layer to itself. (PlatformCALayer::insertSublayer): Ditto. (PlatformCALayer::replaceSublayer): Ditto. 2012-10-19 Chris Fleizach AX: aria-hidden=false does not work as expected https://bugs.webkit.org/show_bug.cgi?id=98787 Reviewed by Beth Dakin. ARIA requires that aria-hidden=false override an element's native visibility and include that node in the AX hierarchy. To accomplish this we have to allow invisible items to be included, as well as items that have no renderers associated with them. Test: accessibility/aria-hidden-negates-no-visibility.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::addTableCellChild): (WebCore::AccessibilityARIAGrid::addChildren): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityNodeObject.cpp: (WebCore): (WebCore::AccessibilityNodeObject::boundingBoxRect): (WebCore::AccessibilityNodeObject::insertChild): (WebCore::AccessibilityNodeObject::addChild): (WebCore::AccessibilityNodeObject::addChildren): (WebCore::AccessibilityNodeObject::textUnderElement): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange): (WebCore): * accessibility/AccessibilityObject.h: (AccessibilityObject): (WebCore::AccessibilityObject::addChild): (WebCore::AccessibilityObject::insertChild): * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::AccessibilityRenderObject::accessibilityIsIgnoredBase): (WebCore::AccessibilityRenderObject::addHiddenChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-10-19 Michael Saboff Add String version of visitedLinkHash() to properly handle 8-bit URL Strings. https://bugs.webkit.org/show_bug.cgi?id=99735 Reviewed by Filip Pizlo. Added String version of visitedLinkHash(). Made speculative addition of visitedLinkHash() to chromium platform version of LinkHashChromium.cpp. Changed calls in the form of visitedLinkHash(string.characters(), string.length()) to use the new form. No changes to functionality, so no new tests. * WebCore.exp.in: * loader/HistoryController.cpp: (WebCore::addVisitedLink): * page/PageGroup.cpp: (WebCore::PageGroup::addVisitedLink): * platform/LinkHash.cpp: (WebCore::visitedLinkHashInline): (WebCore::visitedLinkHash): * platform/LinkHash.h: * platform/chromium/LinkHashChromium.cpp: (WebCore::visitedLinkHash): 2012-10-19 Michael Saboff String(CFStringRef) should try to converting to an 8 bit string before converting to 16 bit string https://bugs.webkit.org/show_bug.cgi?id=99794 Reviewed by Filip Pizlo. Try getting a Latin1 byte string before getting a UTF16 (UChar*) string. No new test, added 8 bit path. * platform/text/cf/StringCF.cpp: (WTF::String::String): 2012-10-19 Dima Gorbik Page should be removed from the cache right after restore was called. https://bugs.webkit.org/show_bug.cgi?id=99737 Reviewed by Brady Eidson. The pageCache was inconsistent after the restoration for a period of time because the cachedFrame is being nulled, but the page is still in the Cache. Now the page is being removed from the cache right after the restoration. This issue was spotted in a custom built application using WebKit and unfortunately there is no way to test this behavior in LayoutTests. All the current tests that exercise the page cache do pass. No new tests. * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): 2012-10-19 Max Vujovic [WebGL] getUniformLocation fails for uniform array name without array brackets https://bugs.webkit.org/show_bug.cgi?id=99854 Reviewed by Dean Jackson. Before this patch, gl.getUniformLocation(program, "array[0]") would return the array location, but gl.getUniformLocation(program, "array") would not. Now, the latter also returns the array location. In the process of adding a check to the following Khronos WebGL conformance test: conformance/glsl/misc/glsl-long-variable-names.html * platform/graphics/ANGLEWebKitBridge.cpp: (WebCore::getSymbolInfo): Before, we used to check that the symbol size was greater than one to determine that the symbol was an array. However, this doesn't identify arrays of length one. Now, we check if the symbol name ends in "[0]", since ANGLE appends this suffix to array symbol names. If the symbol is an array, we strip off the "[0]" and add a symbol with just the base name. We set the isArray flag on the symbol, so we don't lose the information that it is an array. Then, we create symbols for each array element like before. However, instead of replacing the "0" in array[0]" with each index, we take the base name "array" and append array brackets containing each index (e.g. "array" + "[7]"). * platform/graphics/ANGLEWebKitBridge.h: (ANGLEShaderSymbol): Add isArray boolean to ANGLEShaderSymbol. Since array symbols don't end in "[0]" anymore, this is the only way to identify arrays. 2012-10-19 Csaba Osztrogonác Unreviewed, rolling out r131915. http://trac.webkit.org/changeset/131915 https://bugs.webkit.org/show_bug.cgi?id=98787 It broke the build on platforms with \!HAVE(ACCESSIBILITY) * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (WebCore): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::addChild): (WebCore::AccessibilityARIAGrid::addChildren): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::elementRect): (WebCore::AccessibilityNodeObject::addChildren): (WebCore::AccessibilityNodeObject::textUnderElement): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): * accessibility/AccessibilityObject.cpp: * accessibility/AccessibilityObject.h: (AccessibilityObject): * accessibility/AccessibilityRenderObject.cpp: (WebCore::textIteratorBehaviorForTextRange): (WebCore): (WebCore::AccessibilityRenderObject::accessibilityIsIgnoredBase): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-10-19 Tony Chang Unreviewed, rolling out r131936. http://trac.webkit.org/changeset/131936 https://bugs.webkit.org/show_bug.cgi?id=99717 Broke the clang build * WebCore.exp.in: * inspector/InspectorFrontendClient.h: (InspectorFrontendClient): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::requestAttachWindow): (WebCore): (WebCore::InspectorFrontendClientLocal::requestDetachWindow): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorFrontendClientLocal.h: (InspectorFrontendClientLocal): (WebCore::InspectorFrontendClientLocal::requestSetDockSide): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::requestAttachWindow): (WebCore): (WebCore::InspectorFrontendHost::requestDetachWindow): (WebCore::InspectorFrontendHost::requestSetDockSide): * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: * inspector/front-end/DockController.js: (WebInspector.DockController): (WebInspector.DockController.prototype.setDocked): (WebInspector.DockController.prototype._innerSetDocked.set if): (WebInspector.DockController.prototype._innerSetDocked): (WebInspector.DockController.prototype._updateUI.get states): (WebInspector.DockController.prototype._updateUI): (WebInspector.DockController.prototype._toggleDockState): * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.setAttachedWindow): (InspectorFrontendAPI.setDockSide): * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide): * inspector/front-end/externs.js: (InspectorFrontendHostAPI.prototype.requestAttachWindow): (InspectorFrontendHostAPI.prototype.requestDetachWindow): 2012-10-09 Martin Robinson REGRESSION (r130699): 5 various fast/ tests started failing https://bugs.webkit.org/show_bug.cgi?id=98729 Reviewed by Xan Lopez. Do not try to remove the URL fragment for data URLs. This will likely just corrupt the URL. No new tests. This unskips some previously failing tests. * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::urlStringForSoup): Do nothing for data URLs. 2012-10-19 Simon Fraser Use tile caches in place of CATiledLayer https://bugs.webkit.org/show_bug.cgi?id=99806 Reviewed by Tim Horton. Have GraphicsLayerCA use TileCaches instead of CATiledLayer now for layers that exceed the 2000px size threshold. * platform/graphics/TiledBacking.h: (TiledBacking): Have normal getter and setter for the visible rect. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need to pass in an old visibleRect to commitLayerChangesBeforeSublayers(). Just use our current visible rect, which result in no tile area work. (WebCore::GraphicsLayerCA::computeVisibleRect): Make this const and have it return the rect, for clarity. (WebCore::GraphicsLayerCA::recursiveCommitChanges): Keep track of the old visible rect, and use the change flags mechanism to ensure that we recompute tile areas later. When calling commitLayerChangesBeforeSublayers() on the mask layer, just pass its own visible rect as the old visible rect. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Pass in the oldVisibleRect so that updateVisibleRect() can use this to see how the visibleRect is changing. (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect): This member function compares the old and new visible rects, and extends the tile coverage area in directions where more content is being exposed. It takes care to avoid "jitter" in the visible rect deltas causing edge tiles to get created then destroyed by keeping any extra padding that already exists in a direction where more content is being exposed. (WebCore::GraphicsLayerCA::updateVisibleRect): Call adjustTiledLayerVisibleRect() and use the result to update the TiledBacking's visibleRect. (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Create layers of type LayerTypeTileCacheLayer instead of LayerTypeWebTiledLayer. Because tile cache layers involve adding an extra layer to the hierarchy (the tile container), we call updateSublayerList() when changing layer type. * platform/graphics/ca/GraphicsLayerCA.h: New m_sizeAtLastVisibleRectUpdate member that is used to prevent the adjustTiledLayerVisibleRect() logic being confused by size changes. (WebCore::GraphicsLayerCA::visibleRect): * platform/graphics/ca/mac/TileCache.h: Have normal getter and setter for the visible rect. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setVisibleRect): Renamed to setVisibleRect(). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Avoid doing work for pages in the page cache, for which the root layer is unattached. (WebCore::RenderLayerCompositor::frameViewDidScroll): visibleRectChanged() was renamed to setVisibleRect(). 2012-10-19 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=99768 We should limit the tile cache coverage when a page can't take advantage of fast tile scrolling anyway Reviewed by Simon Fraser. When sites can't use fast-scrolling, there is no need to inflate the tile cache. In fact, we get a performance boost by keeping it small on painting-intensive sites. Instead of just looking a whether or not the FrameView canHaveScrollbar(), consult shouldUpdateScrollLayerPositionOnMainThread(). * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): Expose shouldUpdateScrollLayerPositionOnMainThread(). * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects): (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionOnMainThread): (WebCore): (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): Bug fix. Should be bitwise and. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::tileCoverageRect): 2012-10-19 Mark Lam Added WTF::StackStats mechanism. https://bugs.webkit.org/show_bug.cgi?id=99805. Reviewed by Geoffrey Garen. Added StackStats probes in layout methods. * dom/Document.cpp: (WebCore::Document::updateLayout): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layout): * rendering/RenderBox.cpp: (WebCore::RenderBox::layout): * rendering/RenderDialog.cpp: (WebCore::RenderDialog::layout): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::layout): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::layout): * rendering/RenderImage.cpp: (WebCore::RenderImage::layout): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::layout): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::layout): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::layout): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::layout): * rendering/RenderObject.cpp: (WebCore::RenderObject::layout): * rendering/RenderObject.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layout): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::layout): * rendering/RenderReplica.cpp: (WebCore::RenderReplica::layout): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layoutSpecialExcludedChild): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::layout): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::layout): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::layout): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::layout): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layout): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): * rendering/RenderTextTrackCue.cpp: (WebCore::RenderTextTrackCue::layout): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::layout): * rendering/RenderView.cpp: (WebCore::RenderView::layout): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::layout): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::layout): * rendering/svg/RenderSVGGradientStop.cpp: (WebCore::RenderSVGGradientStop::layout): * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::layout): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::layout): * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::layout): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::layout): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): 2012-10-19 Pavel Feldman Web Inspector: merge "docked" state into the "dock side" enum. https://bugs.webkit.org/show_bug.cgi?id=99717 Reviewed by Vsevolod Vlasov. Otherwise, it is hard to manage these inter-dependent flags. * inspector/InspectorFrontendClient.h: (InspectorFrontendClient): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::requestSetDockSide): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorFrontendClientLocal.h: (InspectorFrontendClientLocal): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::requestSetDockSide): * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: * inspector/front-end/DockController.js: (WebInspector.DockController): (WebInspector.DockController.prototype._updateUI.get sides): (WebInspector.DockController.prototype._updateUI): (WebInspector.DockController.prototype._toggleDockState): * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.setAttachedWindow): * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide): 2012-10-19 Joshua Bell [V8] IndexedDB: Crash when lazy-indexing Date keys https://bugs.webkit.org/show_bug.cgi?id=99860 Reviewed by Adam Barth. Missing a scope/context needed when digging values out of Date objects in an indexing callback. Test: storage/indexeddb/lazy-index-types.html * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromScriptValueAndKeyPath): 2012-10-18 Dean Jackson Shader translator needs option to clamp uniform array accesses in vertex shaders https://bugs.webkit.org/show_bug.cgi?id=98977 https://code.google.com/p/angleproject/issues/detail?id=49 Reviewed by Alok Priyadarshi and Ken Russell. WebGL forbids out-of-bounds array access in shaders. Rewrite any shaders to ensure that non-direct array indexing is clamped to the bounds of the array. Test: fast/canvas/webgl/array-bounds-clamping.html * platform/graphics/ANGLEWebKitBridge.cpp: (WebCore::ANGLEWebKitBridge::compileShaderSource): Pass new compiler option SH_CLAMP_INDIRECT_ARRAY_BOUNDS 2012-10-19 Justin Novosad [Chromium] Reduce memory footprint of canvas pattern object with deferred rendering https://bugs.webkit.org/show_bug.cgi?id=99856 Reviewed by Stephen White. Marking internal bitmap copy as immutable to prevent it from being unnecessarily duplicated in skia by SkBitmapHeap. No new tests: code path already well covered by existing layout tests fast/canvas/canvas-pattern-* * platform/graphics/skia/PatternSkia.cpp: (WebCore::Pattern::platformPattern): 2012-10-19 Antti Koivisto Maintain a list of active CSS stylesheets https://bugs.webkit.org/show_bug.cgi?id=99843 Reviewed by Andreas Kling. Currently we maintain a per-document list of stylesheets that matches what is returned by the StyleSheetList DOM API. This list contains both CSS and XSLT stylesheets which internally have basically nothing in common. Maintaining a list of active CSS stylesheets separately simplifies code in number of places. * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::addStylesheetsFromSeamlessParents): (WebCore::StyleResolver::appendAuthorStyleSheets): (WebCore::collectCSSOMWrappers): * css/StyleResolver.h: (StyleResolver): * css/StyleSheetList.cpp: (WebCore::StyleSheetList::styleSheets): (WebCore::StyleSheetList::detachFromDocument): * dom/Document.cpp: (WebCore::Document::setCompatibilityMode): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange): (WebCore::styleSheetsUseRemUnits): (WebCore::filterEnabledCSSStyleSheets): (WebCore): (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList): (DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets): 2012-09-08 Alpha Lam [chromium] Implement deferred image decoding https://bugs.webkit.org/show_bug.cgi?id=94240 Reviewed by Stephen White. Objectives: To record image decoding operations during painting and to defer decoding operations until rasterization. Rationale: This is a key feature that enables impl-side painting which requires fast recording of drawing operations. The existing decode-on-draw restricts that recording has to block on expensive decoding operations. This change allows recording of image decoding operations during paint time. Design: Image decoding happens when a BitmapImage is drawn into a GraphicsContext. When per-tile painting is enabled GraphicsContext is backed by SkCanvas in recording mode. This SkCanvas records drawing and image decoding operations to minimize recording time. An image decoding operation is recorded as a SkPixelRef object implemented by LazyDecodingPixelRef. This object references raw encoded data, regions to be decoded and scaling information. When used in conjunction with per-tile painting this feature defers image decoding until the SkCanvas referencing the image is rasterized. Both recording and rasterization happen on the main thread. Performance Impact: This feature is enabled by WebKit::setDeferredImageDecodingEnabled() and does not have an impact when disabled. This feature is disabled by default. Upcoming Changes: 1. Implement a full-featured image cache in ImageDecodingStore. 2. Allow rasterization and decoding on impl thread. Classes Involved: BitmapImage BitmapImage is the entry point for deferred image decoding. When drawing a BitmapImage into a GraphicsContext it makes a request to create a NativeImageSkia. We substitute the content in NativeImageSkia such that it is lazily decoded. DeferredImageDecoder This is the platform implementation of a image decoder for Chromium. This is a bridge layer that either delegates calls to the actual ImageDecoder or create a lazily-decoded SkBitmap and delegates calls to ImageDecodingStore. ImageDecodingStore This object manages all encoded images. It keeps track of encoded data and the corresponding ImageDecoder for doing actual decoding. It is also responsible for generating lazily decoded SkBitmaps. This SkBitmap contains a LazyDecodingPixelRef object which references to an image entry in ImageDecodingStore. ScaledImageFragment A container for a scaled image fragment. In addition to bitmap pixels it contains information about the ID of the image, scale and clipping. ImageFrameGenerator This object is responsible for generating decoded pixels. It is also a container for encoded image data and corresponding image decoder. LazyDecodingPixelRef This object is embedded in a SkBitmap to enable lazy decoding. When SkBitmap needs to access pixels LazyDecodingPixelRef is locked. It contains information to locate an image and scaling info, these information is submitted to ImageDecodingStore to access actual pixels. Layout tests. There are about 80 tests in this virtual test suite running this feature in this directory: platform/chromium/virtual/deferred/fast/images Unit tests. Added DeferredImageDecoderTest to verify deferred image decoding behavior. * WebCore.gypi: * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::setData): * platform/graphics/ImageSource.h: (WebCore): (ImageSource): * platform/graphics/chromium/DeferredImageDecoder.cpp: Added. (WebCore): (WebCore::DeferredImageDecoder::DeferredImageDecoder): (WebCore::DeferredImageDecoder::~DeferredImageDecoder): (WebCore::DeferredImageDecoder::create): (WebCore::DeferredImageDecoder::createForTesting): (WebCore::DeferredImageDecoder::filenameExtension): (WebCore::DeferredImageDecoder::frameBufferAtIndex): (WebCore::DeferredImageDecoder::setData): (WebCore::DeferredImageDecoder::isSizeAvailable): (WebCore::DeferredImageDecoder::size): (WebCore::DeferredImageDecoder::frameSizeAtIndex): (WebCore::DeferredImageDecoder::frameCount): (WebCore::DeferredImageDecoder::repetitionCount): (WebCore::DeferredImageDecoder::clearFrameBufferCache): (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex): (WebCore::DeferredImageDecoder::frameBytesAtIndex): * platform/graphics/chromium/DeferredImageDecoder.h: Added. (WebCore): (DeferredImageDecoder): * platform/graphics/chromium/ImageDecodingStore.cpp: Added. (WebCore::ImageDecodingStore::ImageDecodingStore): (WebCore): (WebCore::ImageDecodingStore::~ImageDecodingStore): (WebCore::ImageDecodingStore::instanceOnMainThread): (WebCore::ImageDecodingStore::initializeOnMainThread): (WebCore::ImageDecodingStore::shutdown): (WebCore::ImageDecodingStore::isLazyDecoded): (WebCore::ImageDecodingStore::createLazyDecodedSkBitmap): (WebCore::ImageDecodingStore::resizeLazyDecodedSkBitmap): (WebCore::ImageDecodingStore::setData): (WebCore::ImageDecodingStore::lockPixels): (WebCore::ImageDecodingStore::unlockPixels): (WebCore::ImageDecodingStore::frameGeneratorBeingDestroyed): (WebCore::ImageDecodingStore::calledOnValidThread): (WebCore::ImageDecodingStore::lookupFrameCache): (WebCore::ImageDecodingStore::deleteFrameCache): * platform/graphics/chromium/ImageDecodingStore.h: Added. (WebCore): (ImageDecodingStore): (WebCore::ImageDecodingStore::create): * platform/graphics/chromium/ScaledImageFragment.cpp: Added. (WebCore): (WebCore::ScaledImageFragment::~ScaledImageFragment): (WebCore::ScaledImageFragment::ScaledImageFragment): (WebCore::ScaledImageFragment::isEqual): * platform/graphics/chromium/ScaledImageFragment.h: Added. (WebCore): (ScaledImageFragment): (WebCore::ScaledImageFragment::create): (WebCore::ScaledImageFragment::bitmap): (WebCore::ScaledImageFragment::isComplete): * platform/graphics/chromium/ImageFrameGenerator.cpp: Added. (WebCore): (WebCore::ImageFrameGenerator::ImageFrameGenerator): (WebCore::ImageFrameGenerator::~ImageFrameGenerator): (WebCore::ImageFrameGenerator::decoder): (WebCore::ImageFrameGenerator::setData): * platform/graphics/chromium/ImageFrameGenerator.h: Added. (WebCore): (ImageFrameGenerator): (WebCore::ImageFrameGenerator::create): (WebCore::ImageFrameGenerator::size): (WebCore::ImageFrameGenerator::imageId): * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Added. (WebCore): (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::~LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::isScaled): (WebCore::LazyDecodingPixelRef::isClipped): (WebCore::LazyDecodingPixelRef::onLockPixels): (WebCore::LazyDecodingPixelRef::onUnlockPixels): (WebCore::LazyDecodingPixelRef::onLockPixelsAreWritable): * platform/graphics/chromium/LazyDecodingPixelRef.h: Added. (WebCore): (LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::frameGenerator): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::resizedBitmap): * platform/image-decoders/ImageDecoder.h: (ImageFrame): (WebCore::ImageFrame::setSkBitmap): (WebCore::ImageFrame::getSkBitmap): 2012-10-18 Yael Aharon [EFL] GraphicsContext3D::m_renderStyle is not initialized https://bugs.webkit.org/show_bug.cgi?id=99721 Reviewed by Antonio Gomes. Initialize GraphicsContext3D::m_renderStyle. No new tests, no new functionality. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2012-10-19 Dongwoo Joshua Im Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT https://bugs.webkit.org/show_bug.cgi?id=99804 Reviewed by Julien Chaffraix. CSS3 text related properties will be implemented under this flag, including text decoration, text-align-last, and text-justify. No new functionality, no new test. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.features.am: * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::addTextDecorationProperty): (WebCore::CSSParser::parseTextDecoration): * css/CSSPrimitiveValueMappings.h: (WebCore): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: (WebCore): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-10-19 Nate Chapin Reorder some functions in SubresourceLoader to permit main resources https://bugs.webkit.org/show_bug.cgi?id=99769 Reviewed by Adam Barth. Most resource types that go through the memory cache (and therefore through SubresourceLoader) are not sensitive to the exact ordering of the callbacks they receive, particularly as it relates to ResourceLoadNotifier calls. Main resources are not so lenient. For main resources to be cacheable and maintain the current behavior as precisely as possible, we will need to rearrange SubresourceLoader's willSendRequest() and didReceiveData(). No new tests, refactor only. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): There are a series of checks that can result in the request being canceled, plus calls to CachedResource::willSendRequest() and ResourceLoader::willSendRequest(). MainResourceLoader (which will be a CachedResourceClient) has work it expects to do before ResourceLoader::willSendRequest() is called, but the calls are out of order for that, so swap those. (WebCore::SubresourceLoader::didReceiveData): We need to populate ResourceLoader::m_resourceData before notifying CachedResource of new data, but we also want to do CachedResourceClients calls before calling ResourceLoadNotifier. This means we can't delegate to ResourceLoader. 2012-10-19 Chris Fleizach AX: aria-hidden=false does not work as expected https://bugs.webkit.org/show_bug.cgi?id=98787 Reviewed by Beth Dakin. ARIA requires that aria-hidden=false override an element's native visibility and include that node in the AX hierarchy. To accomplish this we have to allow invisible items to be included, as well as items that have no renderers associated with them. Test: accessibility/aria-hidden-negates-no-visibility.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::addTableCellChild): (WebCore::AccessibilityARIAGrid::addChildren): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityNodeObject.cpp: (WebCore): (WebCore::AccessibilityNodeObject::boundingBoxRect): (WebCore::AccessibilityNodeObject::insertChild): (WebCore::AccessibilityNodeObject::addChild): (WebCore::AccessibilityNodeObject::addChildren): (WebCore::AccessibilityNodeObject::textUnderElement): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange): (WebCore): * accessibility/AccessibilityObject.h: (AccessibilityObject): (WebCore::AccessibilityObject::addChild): (WebCore::AccessibilityObject::insertChild): * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::AccessibilityRenderObject::accessibilityIsIgnoredBase): (WebCore::AccessibilityRenderObject::addHiddenChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-10-19 Tommy Widenflycht MediaStream API: Rename owner to client in MediaStreamDescriptor https://bugs.webkit.org/show_bug.cgi?id=99593 Reviewed by Adam Barth. This patch renames owner to client in MediaStreamDescriptor as discussed in #99080. No new tests needed, covered by existing tests. * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): * Modules/mediastream/MediaStream.h: (MediaStream): * Modules/mediastream/PeerConnection00.cpp: (WebCore::PeerConnection00::didRemoveRemoteStream): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::didRemoveRemoteStream): * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::endLocalMediaStream): (WebCore::MediaStreamCenter::addMediaStreamTrack): (WebCore::MediaStreamCenter::removeMediaStreamTrack): * platform/mediastream/MediaStreamDescriptor.h: (WebCore::MediaStreamDescriptorClient::~MediaStreamDescriptorClient): (WebCore::MediaStreamDescriptor::client): (WebCore::MediaStreamDescriptor::setClient): (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): (MediaStreamDescriptor): 2012-10-19 Shinya Kawanaka Elements assigned to should not be reprojected. https://bugs.webkit.org/show_bug.cgi?id=99680 Reviewed by Dimitri Glazkov. In the current spec, we don't have shadow reprojection, i.e. elements assigned to should not be reprojected to content. However, we can select them by . Tests: fast/dom/shadow/content-reprojection-complex.html fast/dom/shadow/content-reprojection-shadow.html fast/dom/shadow/shadow-reprojection-prohibited.html * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::distribute): When a node is , we should not add elements assigned to to POOL. Instead, itself should be added to POOL. * html/shadow/HTMLContentElement.h: (WebCore::isHTMLContentElement): (WebCore): 2012-10-19 Chris Fleizach VO issues with hidden and last explicitly labelled element within a group
https://bugs.webkit.org/show_bug.cgi?id=96325 Reviewed by Beth Dakin. When finding a for accessibility, we need to consider those that are offscreen. This patch modifies the original findLegend method to take a parameter to determine what should be done. Test: accessibility/hidden-legend.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::titleUIElement): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::findLegend): * rendering/RenderFieldset.h: 2012-10-17 Chris Fleizach AX: Refactor accessibility name computation so it's more platform independent https://bugs.webkit.org/show_bug.cgi?id=99502 Reviewed by Beth Dakin. The current model of determining the accessible text for an object has a lot of Mac biases built in due to legacy implementation. This change categorizes and orders accessibility text based on WAI-ARIA text computation rules and then allows the platform (only Mac right now) to decide how best to apply that text to its own AX API. http://www.w3.org/TR/wai-aria/roles#textalternativecomputation This change tried very hard not to change any test behavior, even though it exposed a number of weird edge cases where we were treating attributes differently based on element type. Future patches will resolve those discrepancies. * accessibility/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::accessibilityText): * accessibility/AccessibilityImageMapLink.h: (AccessibilityImageMapLink): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::accessibilityText): * accessibility/AccessibilityMediaControls.h: (AccessibilityMediaControl): (WebCore::AccessibilityMediaTimeDisplay::isMediaControlLabel): * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::titleElementText): (WebCore::AccessibilityNodeObject::accessibilityText): (WebCore::AccessibilityNodeObject::ariaLabeledByText): (WebCore::AccessibilityNodeObject::alternativeText): (WebCore::AccessibilityNodeObject::alternativeTextForWebArea): (WebCore::AccessibilityNodeObject::visibleText): (WebCore::AccessibilityNodeObject::helpText): (WebCore::AccessibilityNodeObject::ariaDescribedByAttribute): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): * accessibility/AccessibilityObject.h: (AccessibilityText): (WebCore::AccessibilityText::AccessibilityText): (WebCore::AccessibilityObject::isMediaControlLabel): (AccessibilityObject): (WebCore::AccessibilityObject::accessibilityText): (WebCore::AccessibilityObject::setAccessibleName): (WebCore::AccessibilityObject::accessibilityDescription): (WebCore::AccessibilityObject::title): (WebCore::AccessibilityObject::helpText): (WebCore::AccessibilityObject::stringValue): (WebCore::AccessibilityObject::textUnderElement): (WebCore::AccessibilityObject::text): (WebCore::AccessibilityObject::textLength): (WebCore::AccessibilityObject::setRoleValue): (WebCore::AccessibilityObject::roleValue): (WebCore::AccessibilityObject::selection): (WebCore::AccessibilityObject::hierarchicalLevel): * accessibility/AccessibilityRenderObject.cpp: * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]): (-[WebAccessibilityObjectWrapper accessibilityTitle]): (-[WebAccessibilityObjectWrapper accessibilityDescription]): (-[WebAccessibilityObjectWrapper accessibilityHelpText]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): * platform/LocalizedStrings.cpp: (WebCore::localizedMediaControlElementHelpText): 2012-10-19 Kent Tamura Use Localizer::monthFormat to construct input[type=month] UI https://bugs.webkit.org/show_bug.cgi?id=99818 Reviewed by Kentaro Hara. Use an LDML format returned by Localizer::monthFormat for input[type=month] UI. Because the format may contain symbolic month names and symbolic stand-alone month names, we need to add: - Symbolic/numeric detection in DateTimeEditBuilder - Normal/stand-alone detection in DateTimeEditBuilder - Symbolic edit field for months Test: fast/forms/month-multiple-fields/month-multiple-fields-appearance-l10n.html, fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html * html/MonthInputType.cpp: (WebCore::MonthInputType::setupLayoutParameters): Use Localizer::monthFormat. * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditBuilder::visitField): - If the number of continuous field character is greater than 2, use DateTimeSymbolicMonthFieldElement. - Supports stand-alone month field. * html/shadow/DateTimeFieldElements.h: (DateTimeSymbolicMonthFieldElement): Added. A subclass of DateTimeSymbolicFieldElement. * html/shadow/DateTimeFieldElements.cpp: (WebCore::DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement): Added. (WebCore::DateTimeSymbolicMonthFieldElement::create): Added. (WebCore::DateTimeSymbolicMonthFieldElement::populateDateTimeFieldsState): We need to add 1 because the internal integer representation is 0-based and DateTimeFieldsState uses 1-based month. (WebCore::DateTimeSymbolicMonthFieldElement::setValueAsDate): DateComponents::month is 0-based. (WebCore::DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState): We need to subtract 1 because the internal integer representation is 0-based and DateTimeFieldsState uses 1-based month. * html/shadow/DateTimeSymbolicFieldElement.h: (WebCore::DateTimeSymbolicFieldElement::symbolsSize): Added for DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState. 2012-10-19 Vsevolod Vlasov Web Inspector: inspector/styles/styles-history.html is failing Text on Windows and Linux https://bugs.webkit.org/show_bug.cgi?id=99519 Reviewed by Alexander Pavlov. Extracted _styleContentSet callback in a class method to make it sniffable by tests. * inspector/front-end/StylesSourceMapping.js: (WebInspector.StyleFile.prototype._commitIncrementalEdit): (WebInspector.StyleFile.prototype._styleContentSet): 2012-10-19 Pavel Feldman Web Inspector: add object-src 'none' to the inspector.html https://bugs.webkit.org/show_bug.cgi?id=99728 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.html: 2012-10-19 Vsevolod Vlasov Web Inspector: Get rid of isSnippetEvaluation flag on UISourceCode https://bugs.webkit.org/show_bug.cgi?id=99823 Reviewed by Yury Semikhatsky. Replaced isSnippetEvaluation flag with a pair of isSnippet and isTemporary set. * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._releasedUISourceCodes): (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._snippetsNavigatorViewForUISourceCode): (WebInspector.ScriptsNavigator.prototype.revealUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype.addTemporaryUISourceCode): 2012-10-19 Alexander Pavlov Web Inspector: Invalid Regex in SASSSourceMapping/didRequestContent, breaks Support for Sass experiment https://bugs.webkit.org/show_bug.cgi?id=99729 Reviewed by Vsevolod Vlasov. Decode only the first line number digit written in a six-character escaped Unicode format. * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent): (WebInspector.SASSSourceMapping.prototype._resourceAdded): 2012-10-19 Tommy Widenflycht MediaStream API: Update the RuntimeEnabledFeatures flags https://bugs.webkit.org/show_bug.cgi?id=99714 Reviewed by Adam Barth. Updating the RuntimeEnabledFeatures flags to match reality: isMediaStreamEnabled and isPeerConnectionEnabled should be true by default and isDeprecatedPeerConnectionEnabled false. Patch covered by existing tests. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): 2012-10-19 Adam Barth [V8] Simplify GCPrologueVisitor https://bugs.webkit.org/show_bug.cgi?id=99819 Reviewed by Kentaro Hara. Previously, GCPrologueVisitor used a complicated traits-based template design. That's not necessary. We can just implement it directly without template magic. The one subtly here is that MessagePort is not actually a subclass of ActiveDOMObject. The next stage of this cleanup is to make MessagePort inherit from ActiveDOMObject and remove this special case entirely. * bindings/v8/V8GCController.cpp: (WebCore::EnsureWeakDOMNodeVisitor::visitDOMWrapper): (WebCore): (WebCore::ActiveDOMObjectPrologueVisitor::visitDOMWrapper): (WebCore::NodeVisitor::visitDOMWrapper): (WebCore::V8GCController::gcPrologue): 2012-10-19 Eugene Klyuchnikov Web Inspector: Saving HAR, snapshots and timeline data do not work in remote debugging mode https://bugs.webkit.org/show_bug.cgi?id=99179 Reviewed by Yury Semikhatsky. Added method "close" to InspectorFrontendHost. Symantically, this method forces to flush all unsaved buffers for specified file. In native implementation this turns to be no-op. In stub implementation "close" causes compilation of blob object an navigating to blob-schema url. Removed "canAppend", as appending in now suppurted by all implementations. Repaced schema "data" with "blob" in InspectorFrontendHostStub "save" to avoid out-of-memory errors. * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::close): Compiles blob object and navigates to blob-object url. (WebCore): * inspector/InspectorFrontendHost.h: Added "close" method. * inspector/InspectorFrontendHost.idl: Ditto. * inspector/front-end/FileManager.js: (WebInspector.FileManager.prototype.close): Proxy to InspectorFrontend. * inspector/front-end/FileUtils.js: (WebInspector.FileOutputStream.prototype.close): Invoke "close" on FileManager. (WebInspector.FileOutputStream.prototype._onAppendDone): Ditto. * inspector/front-end/HandlerRegistry.js: Added mandatory "close" call. * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapProfileHeader.prototype.canSaveToFile): Fixed check. * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub): Added "appendable" behaviour emulation. * inspector/front-end/SourceFrame.js: Added mandatory "close" call. * inspector/front-end/externs.js: Replaced "canAppend" with "close" 2012-10-18 Dominic Mazzoni AX: labelForElement is slow when there are a lot of DOM elements https://bugs.webkit.org/show_bug.cgi?id=97825 Reviewed by Ryosuke Niwa. Adds a DocumentOrderedMap to TreeScope that allows accessibility to quickly map from an id to the label for that id. This speeds up AccessibilityNode::labelForElement, which was a bottleneck in Chromium when accessibility was on. Tests: accessibility/title-ui-element-correctness.html perf/accessibility-title-ui-element.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::labelForElement): * dom/DocumentOrderedMap.cpp: (WebCore::keyMatchesLabelForAttribute): (WebCore): (WebCore::DocumentOrderedMap::get): (WebCore::DocumentOrderedMap::getElementByLabelForAttribute): * dom/DocumentOrderedMap.h: (DocumentOrderedMap): * dom/Element.cpp: (WebCore::Element::insertedInto): (WebCore::Element::removedFrom): (WebCore::Element::updateLabel): (WebCore): (WebCore::Element::willModifyAttribute): * dom/Element.h: (Element): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::destroyTreeScopeData): (WebCore::TreeScope::addLabel): (WebCore): (WebCore::TreeScope::removeLabel): (WebCore::TreeScope::labelElementForId): * dom/TreeScope.h: (WebCore): (TreeScope): (WebCore::TreeScope::shouldCacheLabelsByForAttribute): 2012-10-19 Eugene Klyuchnikov Web Inspector: Update localizedStrings.js https://bugs.webkit.org/show_bug.cgi?id=99701 Reviewed by Yury Semikhatsky. Fixed most of missing strings and orphans. * English.lproj/localizedStrings.js: * inspector/front-end/SettingsScreen.js: 2012-10-17 Ilya Tikhonovsky Web Inspector: NMI provide data for mixing with tcmalloc heap dumps. https://bugs.webkit.org/show_bug.cgi?id=99457 Reviewed by Yury Semikhatsky. countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable. getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects. * inspector/InspectorClient.h: (WebCore::InspectorClient::dumpUncountedAllocatedObjects): * inspector/InspectorMemoryAgent.cpp: (WebCore::reportJSHeapInfo): (WebCore::reportRenderTreeInfo): (WebCore): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/MemoryInstrumentationImpl.cpp: (WebCore::MemoryInstrumentationClientImpl::countObjectSize): (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage): * inspector/MemoryInstrumentationImpl.h: (MemoryInstrumentationClientImpl): (WebCore::MemoryInstrumentationClientImpl::countedObjects): 2012-10-19 Adam Barth [V8] DOMObjectVisitor does nothing https://bugs.webkit.org/show_bug.cgi?id=99812 Reviewed by Kentaro Hara. This code doesn't do anything, even in Debug! We should just remove it. * bindings/v8/V8GCController.cpp: (WebCore): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): 2012-10-19 Adam Barth [V8] Remove unused typedef from V8GCController.cpp https://bugs.webkit.org/show_bug.cgi?id=99808 Reviewed by Kentaro Hara. This typedef is not used. * bindings/v8/V8GCController.cpp: 2012-10-18 Alexander Pavlov Web Inspector: [Styles] Property considered overridden if it is non-inherited important property in inherited style https://bugs.webkit.org/show_bug.cgi?id=99720 Reviewed by Yury Semikhatsky. Non-inherited properties are now disregarded in inherited styles. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._refreshStyleRules): (WebInspector.StylesSidebarPane.prototype._markUsedProperties): 2012-10-18 Adam Barth [V8] GrouperVisitor is secretly two entirely separate objects https://bugs.webkit.org/show_bug.cgi?id=99810 Reviewed by Kentaro Hara. We can separate out the two things that GrouperVisitor is trying to do because they have nothing to do with each other. * bindings/v8/V8GCController.cpp: (ObjectVisitor): (WebCore::ObjectVisitor::visitDOMWrapper): (WebCore): (WebCore::V8GCController::gcPrologue): 2012-10-18 Kiran Muppala Automatically start plugins created within a user gesture, skipping snapshotting https://bugs.webkit.org/show_bug.cgi?id=99778 Reviewed by Alexey Proskuryakov. If a user gesture is being processed, do not set the display state of HTMLPluginImageElement to WaitingForSnapshot. No new tests, since it only affects when plugins switch from snapshot to running state. Does not affect rendering of other elements. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): 2012-10-18 Kent Tamura Add shortMonthLabels and shortStandAloneMonthLabels to Localizer https://bugs.webkit.org/show_bug.cgi?id=99787 Reviewed by Kentaro Hara. This is going to be used for input[type=month] UI. This doesn't affect any bahevior yet. Tests: Add some tests to Source/WebKit/chromium/tests/, and will add layout tests later. * platform/text/Localizer.h: (Localizer): Add shortMonthLabels and shortStandAloneMonthLabels as pure virtual member functions. * platform/text/LocaleICU.h: (LocaleICU): Declare shortMonthLabels and shortStandAloneMonthLabels. * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::shortMonthLabels): Added. (WebCore::LocaleICU::shortStandAloneMonthLabels): Added. * platform/text/LocaleNone.cpp: (LocaleNone): Declare shortMonthLabels and shortStandAloneMonthLabels. (WebCore::LocaleNone::shortMonthLabels): Added. Always returns English labels. (WebCore::LocaleNone::shortStandAloneMonthLabels): Addes. Just calls shortMonthLabels. * platform/text/LocaleWin.h: (LocaleWin): Declare shortMonthLabels and shortStandAloneMonthLabels. * platform/text/LocaleWin.cpp: (WebCore::LocaleWin::shortMonthLabels): Added. (WebCore::LocaleWin::shortStandAloneMonthLabels): Added. Always returns shortMonthLabels. * platform/text/mac/LocaleMac.h: (LocaleMac): Declare shortMonthLabels and shortStandAloneMonthLabels. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::shortMonthLabels): Added. (WebCore::LocaleMac::shortStandAloneMonthLabels): Added. 2012-10-18 Kunihiko Sakamoto Implement value sanitization algorithm for type=datetime https://bugs.webkit.org/show_bug.cgi?id=76893 Reviewed by Kent Tamura. Implement the value sanitization algorithm for type=datetime that adjusts the value to a valid normalized forced-UTC global date and time string. See http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#valid-normalized-forced-utc-global-date-and-time-string Test: fast/forms/datetime/datetime-value-sanitization.html * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::sanitizeValue): Implemented. (WebCore): * html/DateTimeInputType.h: (DateTimeInputType): Add sanitizeValue. * platform/DateComponents.cpp: (WebCore::DateComponents::addMinute): Fixed a bug that caused wrong adjustment of timezone offset (e.g. 2012-10-17T01:00+01:00 -> 2012-10-17T01:-60Z). 2012-10-18 Byungwoo Lee Fix build warning. https://bugs.webkit.org/show_bug.cgi?id=99788 Reviewed by Kentaro Hara. Use UNUSED_PARAM macro for removing -Wunused-parameter. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::currentTransform): 2012-10-18 Benjamin Poulain [WK2] WebKit2 does not build without PLUGIN_PROCESS on Mac https://bugs.webkit.org/show_bug.cgi?id=99771 Reviewed by Anders Carlsson. * WebCore.exp.in: The symbol is used by WebCore Test Support, move it to the general section. 2012-10-18 Adam Barth [V8] fast/dom/gc-9.html fails for document.styleSheets https://bugs.webkit.org/show_bug.cgi?id=99786 Reviewed by Kentaro Hara. V8 needs to know about this IDL attribute as well. * css/StyleSheetList.idl: 2012-10-18 Adam Barth [V8] fast/dom/gc-9.html fails for document.implementation https://bugs.webkit.org/show_bug.cgi?id=99783 Reviewed by Kentaro Hara. In order to correctly manage the lifetime of document.implementation, we need to implement GenerateIsReachable=ImplDocument. * bindings/scripts/CodeGeneratorV8.pm: (GenerateVisitDOMWrapper): * bindings/scripts/IDLAttributes.txt: * dom/DOMImplementation.idl: 2012-10-18 Chris Fleizach AX: Crashes in WebProcess at com.apple.WebCore: -[AccessibilityObjectWrapper remoteAccessibilityParentObject] + 78 https://bugs.webkit.org/show_bug.cgi?id=96443 Reviewed by Beth Dakin. Separate out the chain of calls so that the number of times document() is called is reduced and it will be easier to determine which line this crash is happening on. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]): 2012-10-18 Alec Flett IndexedDB: Refactor IDBDatabaseBackendImpl to use IDBDatabaseMetadata https://bugs.webkit.org/show_bug.cgi?id=99773 Reviewed by Tony Chang. Refactor to begin separating out metadata from stateful backend objects, in preparation for https://bugs.webkit.org/show_bug.cgi?id=99774. Also includes some #include dependency cleanup so that the backing store depends less on the stateful backend objects. No new tests as this is purely a refactor. * Modules/indexeddb/IDBBackingStore.h: (WebCore): (IDBBackingStore): * Modules/indexeddb/IDBCursor.h: * Modules/indexeddb/IDBCursorBackendImpl.h: (WebCore): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::openInternal): (WebCore::IDBDatabaseBackendImpl::metadata): (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::setVersionInternal): (WebCore::IDBDatabaseBackendImpl::setIntVersionInternal): (WebCore::IDBDatabaseBackendImpl::processPendingCalls): (WebCore::IDBDatabaseBackendImpl::openConnection): (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): (WebCore::IDBDatabaseBackendImpl::deleteDatabase): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): (WebCore::IDBDatabaseBackendImpl::resetVersion): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (WebCore::IDBDatabaseBackendImpl::id): (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::deleteDatabase): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: * Modules/indexeddb/IDBTransaction.h: (WebCore): 2012-10-18 Peter Kasting [Skia] Set m_hasAlpha correctly in ImageFrame::copyBitmapData. https://bugs.webkit.org/show_bug.cgi?id=99781 Reviewed by Adam Barth. No tests, since the actual effects of this bug are fickle and it's not clear how to extract and check particular subframes of an animated GIF. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::copyBitmapData): 2012-10-18 Pan Deng [Resource Timing]Implementation of resource timing buffer size restriction functionality https://bugs.webkit.org/show_bug.cgi?id=84885. Reviewed by Tony Gentilcore. http://www.w3.org/TR/2012/CR-resource-timing-20120522/ This patch enable functionality of set buffer size(default is 150 as spec). When buffer is full, resourceTimingBufferFull event will be fired. Incoming entries will be dropped if no more space for them. Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries.html http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size.html http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction.html http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_clear_resource_timing_functionality.html http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_on_shrink_buffer_size.html http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_store_and_clear_during_callback.html * page/Performance.cpp: (WebCore): (WebCore::Performance::Performance): (WebCore::Performance::webkitSetResourceTimingBufferSize): (WebCore::Performance::addResourceTiming): (WebCore::Performance::isResourceTimingBufferFull): * page/Performance.h: (Performance): 2012-10-18 Ryosuke Niwa REGRESSION(r130411): Copying & pasting the first line of text can move caret to the end of text area https://bugs.webkit.org/show_bug.cgi?id=99663 Reviewed by Enrica Casucci and Levi Weintraub. The bug was caused by positionOnlyToBeUpdated's offset not being shifted correctly in ReplaceSelectionCommand::mergeTextNodesAroundPosition. Suppose we have text nodes t1 and t2 and positionOnlyToBeUpdated had offset k in t2. When t2 is merged into t1, positionOnlyToBeUpdated should be moved to (t1, n + k) where n is the ORIGINAL length of t1 before t2 is merged. But we were using the length after t2 is merged. Fixed the bug by saving the original length of t1 and using that in the offset adjustment. Also use the right offset. Test: editing/pasteboard/copy-paste-first-line-in-textarea.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): 2012-10-18 Claudio Saavedra [GTK] Invalid read from WebKit::DOMObjectCache::clearByFrame https://bugs.webkit.org/show_bug.cgi?id=82882 Reviewed by Xan Lopez. Based on a patch by Milan Crha Prevent an invalid access to a pointer while clearing the DOM object cache. * bindings/gobject/DOMObjectCache.cpp: (WebKit::DOMObjectCache::clearByFrame): Prevent an invalid access. 2012-10-18 Sheriff Bot Unreviewed, rolling out r131810. http://trac.webkit.org/changeset/131810 https://bugs.webkit.org/show_bug.cgi?id=99762 Broke linux debug webkit_unit_tests (Requested by danakj|gardening on #webkit). * WebCore.gypi: * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::setData): * platform/graphics/ImageSource.h: (WebCore): (ImageSource): * platform/graphics/chromium/DeferredImageDecoder.cpp: Removed. * platform/graphics/chromium/DeferredImageDecoder.h: Removed. * platform/graphics/chromium/ImageDecodingStore.cpp: Removed. * platform/graphics/chromium/ImageDecodingStore.h: Removed. * platform/graphics/chromium/ImageFrameGenerator.cpp: Removed. * platform/graphics/chromium/ImageFrameGenerator.h: Removed. * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Removed. * platform/graphics/chromium/LazyDecodingPixelRef.h: Removed. * platform/graphics/chromium/ScaledImageFragment.cpp: Removed. * platform/graphics/chromium/ScaledImageFragment.h: Removed. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::resizedBitmap): * platform/image-decoders/ImageDecoder.h: (ImageFrame): 2012-10-18 Tommy Widenflycht MediaStream API: Do some cleanup in the chromium WebKit API https://bugs.webkit.org/show_bug.cgi?id=99713 Reviewed by Adam Barth. Removing the deprecated version of WebMediaStreamDescriptor::initialize. No testing needed since only an unused function is removed. * platform/chromium/support/WebMediaStreamDescriptor.cpp: 2012-10-18 Alpha Lam [chromium] Implement deferred image decoding https://bugs.webkit.org/show_bug.cgi?id=94240 Reviewed by Stephen White. Objectives: To record image decoding operations during painting and to defer decoding operations until rasterization. Rationale: This is a key feature that enables impl-side painting which requires fast recording of drawing operations. The existing decode-on-draw restricts that recording has to block on expensive decoding operations. This change allows recording of image decoding operations during paint time. Design: Image decoding happens when a BitmapImage is drawn into a GraphicsContext. When per-tile painting is enabled GraphicsContext is backed by SkCanvas in recording mode. This SkCanvas records drawing and image decoding operations to minimize recording time. An image decoding operation is recorded as a SkPixelRef object implemented by LazyDecodingPixelRef. This object references raw encoded data, regions to be decoded and scaling information. When used in conjunction with per-tile painting this feature defers image decoding until the SkCanvas referencing the image is rasterized. Both recording and rasterization happen on the main thread. Performance Impact: This feature is enabled by WebKit::setDeferredImageDecodingEnabled() and does not have an impact when disabled. This feature is disabled by default. Upcoming Changes: 1. Implement a full-featured image cache in ImageDecodingStore. 2. Allow rasterization and decoding on impl thread. Classes Involved: BitmapImage BitmapImage is the entry point for deferred image decoding. When drawing a BitmapImage into a GraphicsContext it makes a request to create a NativeImageSkia. We substitute the content in NativeImageSkia such that it is lazily decoded. DeferredImageDecoder This is the platform implementation of a image decoder for Chromium. This is a bridge layer that either delegates calls to the actual ImageDecoder or create a lazily-decoded SkBitmap and delegates calls to ImageDecodingStore. ImageDecodingStore This object manages all encoded images. It keeps track of encoded data and the corresponding ImageDecoder for doing actual decoding. It is also responsible for generating lazily decoded SkBitmaps. This SkBitmap contains a LazyDecodingPixelRef object which references to an image entry in ImageDecodingStore. ScaledImageFragment A container for a scaled image fragment. In addition to bitmap pixels it contains information about the ID of the image, scale and clipping. ImageFrameGenerator This object is responsible for generating decoded pixels. It is also a container for encoded image data and corresponding image decoder. LazyDecodingPixelRef This object is embedded in a SkBitmap to enable lazy decoding. When SkBitmap needs to access pixels LazyDecodingPixelRef is locked. It contains information to locate an image and scaling info, these information is submitted to ImageDecodingStore to access actual pixels. Layout tests. There are about 80 tests in this virtual test suite running this feature in this directory: platform/chromium/virtual/deferred/fast/images Unit tests. Added DeferredImageDecoderTest to verify deferred image decoding behavior. * WebCore.gypi: * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::setData): * platform/graphics/ImageSource.h: (WebCore): (ImageSource): * platform/graphics/chromium/DeferredImageDecoder.cpp: Added. (WebCore): (WebCore::DeferredImageDecoder::DeferredImageDecoder): (WebCore::DeferredImageDecoder::~DeferredImageDecoder): (WebCore::DeferredImageDecoder::create): (WebCore::DeferredImageDecoder::createForTesting): (WebCore::DeferredImageDecoder::filenameExtension): (WebCore::DeferredImageDecoder::frameBufferAtIndex): (WebCore::DeferredImageDecoder::setData): (WebCore::DeferredImageDecoder::isSizeAvailable): (WebCore::DeferredImageDecoder::size): (WebCore::DeferredImageDecoder::frameSizeAtIndex): (WebCore::DeferredImageDecoder::frameCount): (WebCore::DeferredImageDecoder::repetitionCount): (WebCore::DeferredImageDecoder::clearFrameBufferCache): (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex): (WebCore::DeferredImageDecoder::frameBytesAtIndex): * platform/graphics/chromium/DeferredImageDecoder.h: Added. (WebCore): (DeferredImageDecoder): * platform/graphics/chromium/ImageDecodingStore.cpp: Added. (WebCore::ImageDecodingStore::ImageDecodingStore): (WebCore): (WebCore::ImageDecodingStore::~ImageDecodingStore): (WebCore::ImageDecodingStore::instanceOnMainThread): (WebCore::ImageDecodingStore::initializeOnMainThread): (WebCore::ImageDecodingStore::shutdown): (WebCore::ImageDecodingStore::isLazyDecoded): (WebCore::ImageDecodingStore::createLazyDecodedSkBitmap): (WebCore::ImageDecodingStore::resizeLazyDecodedSkBitmap): (WebCore::ImageDecodingStore::setData): (WebCore::ImageDecodingStore::lockPixels): (WebCore::ImageDecodingStore::unlockPixels): (WebCore::ImageDecodingStore::frameGeneratorBeingDestroyed): (WebCore::ImageDecodingStore::calledOnValidThread): (WebCore::ImageDecodingStore::lookupFrameCache): (WebCore::ImageDecodingStore::deleteFrameCache): * platform/graphics/chromium/ImageDecodingStore.h: Added. (WebCore): (ImageDecodingStore): (WebCore::ImageDecodingStore::create): * platform/graphics/chromium/ScaledImageFragment.cpp: Added. (WebCore): (WebCore::ScaledImageFragment::~ScaledImageFragment): (WebCore::ScaledImageFragment::ScaledImageFragment): (WebCore::ScaledImageFragment::isEqual): * platform/graphics/chromium/ScaledImageFragment.h: Added. (WebCore): (ScaledImageFragment): (WebCore::ScaledImageFragment::create): (WebCore::ScaledImageFragment::bitmap): (WebCore::ScaledImageFragment::isComplete): * platform/graphics/chromium/ImageFrameGenerator.cpp: Added. (WebCore): (WebCore::ImageFrameGenerator::ImageFrameGenerator): (WebCore::ImageFrameGenerator::~ImageFrameGenerator): (WebCore::ImageFrameGenerator::decoder): (WebCore::ImageFrameGenerator::setData): * platform/graphics/chromium/ImageFrameGenerator.h: Added. (WebCore): (ImageFrameGenerator): (WebCore::ImageFrameGenerator::create): (WebCore::ImageFrameGenerator::size): (WebCore::ImageFrameGenerator::imageId): * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Added. (WebCore): (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::~LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::isScaled): (WebCore::LazyDecodingPixelRef::isClipped): (WebCore::LazyDecodingPixelRef::onLockPixels): (WebCore::LazyDecodingPixelRef::onUnlockPixels): (WebCore::LazyDecodingPixelRef::onLockPixelsAreWritable): * platform/graphics/chromium/LazyDecodingPixelRef.h: Added. (WebCore): (LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::frameGenerator): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::resizedBitmap): * platform/image-decoders/ImageDecoder.h: (ImageFrame): (WebCore::ImageFrame::setSkBitmap): (WebCore::ImageFrame::getSkBitmap): 2012-10-18 Yael Aharon [EFL] GraphicsContext3D::m_renderStyle is not initialized https://bugs.webkit.org/show_bug.cgi?id=99721 Reviewed by Antonio Gomes. Initialize GraphicsContext3D::m_renderStyle. No new tests, no new functionality. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2012-10-18 Max Vujovic [CSS Shaders] Validate types of built-in vertex attributes https://bugs.webkit.org/show_bug.cgi?id=98972 Reviewed by Dean Jackson. Reject custom filters in which the author defined built-in attributes with the wrong type. For example, the GLSL declaration "attribute float a_position" is incorrect because a_position should be a vec4, not a float. Test: css3/filters/custom/invalid-custom-filter-attribute-types.html * platform/graphics/ANGLEWebKitBridge.h: (WebCore::ANGLEShaderSymbol::isSampler): Add const qualifier to isSampler method. * platform/graphics/filters/CustomFilterValidatedProgram.cpp: (WebCore): (WebCore::builtInAttributeNameToTypeMap): New file static function. Returns a map of the CSS Custom Filters built-in attribute names and their expected types. (WebCore::validateSymbols): New file static function. Loop through all of the symbols. Reject the shader if we find a built-in attribute defined with the wrong type. (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): Call the new validateSymbols function. If it returns false, exit the constructor early, which rejects the program. Move the loop that checks if any uniform is a sampler into the the validateSymbols function. 2012-10-18 Mike Reed Handle if we fail to allocate nonPlatformCanvas in ImageBuffer constructor https://bugs.webkit.org/show_bug.cgi?id=99752 Reviewed by Stephen White. Current code does not check if we were able to allocate the pixels, but still returns the canvas. However, the caller explicitly is checking for null on failure, so it will continue (and possibly crash later on). This change brings the nonPlatformCanvas behavior inline with createAcceleratedCanvas and TryCreateBitmapCanvas, both of which are also called by ImageBuffer's constructor. No new tests. Existing tests exercise ImageBuffer constructor. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::createNonPlatformCanvas): 2012-10-18 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=99668 REGRESSION: Crash in WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion -and corresponding- Reviewed by Simon Fraser. http://trac.webkit.org/changeset/130783 changed the lifetime of the ScrollingStateTree's rootStateNode. Before that patch, the root state node was never destroyed. It was just constantly re-used for different RenderLayerBackings. This crash is just one of a few bugs that has occurred because of that change. I have fixed the other bugs individually, but I think that long-term, it is the safest solution to go back to the original ownership model. So this patch ensures that the state tree will always have a root state node. Instead of destroying and re-creating the root node when it's scroll ID changes, we just update the ID. attachToStateTree() now takes an additional ID representing the ID of the parent node. * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::attachToStateTree): Add a way to set the scrolling node ID. * page/scrolling/ScrollingStateNode.h: (WebCore::ScrollingStateNode::setScrollingNodeID): This code that provided a way to mark all properties as having changed was added in http://trac.webkit.org/changeset/130989 as a way to ensure we would re-set ScrollingThread's nodes when we destroyed and re-created the rootStateNode. Now that we are no longer destroying and re-creating the rootStateNode, this code is no longer necessary. * page/scrolling/ScrollingStateScrollingNode.cpp: * page/scrolling/ScrollingStateScrollingNode.h: create m_rootStateNode right in the ScrollingStateTree's constructor. * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::ScrollingStateTree): Don't let removeNode() destroy m_rootStateNode. (WebCore::ScrollingStateTree::removeNode): Also a part of r130989 that is no longer needed. (WebCore::ScrollingStateTree::rootLayerDidChange(): * page/scrolling/ScrollingStateTree.h: (WebCore::ScrollingStateTree::rootStateNode): (ScrollingStateTree): (WebCore::ScrollingStateTree::setRootStateNode): attachToStateTree() now takes an additional ID representing the ID of the parent node. * page/scrolling/mac/ScrollingCoordinatorMac.h: (ScrollingCoordinatorMac): We no longer need ScrollingStateTree::rootLayerDidChange() * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange): Do not destroy and re-create the state node. Just update its ID. When we support child nodes soon, we will create them in this function. (WebCore::ScrollingCoordinatorMac::attachToStateTree): No need to null-check the rootStateNode. (WebCore::ScrollingCoordinatorMac::clearStateTree): Send 0 as the parent node ID to attachToStateTree() to represent the root node. (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): * rendering/RenderLayerBacking.cpp: RenderLayerBacking::attachToScrollingCoordinator() now takes a parent layer. (WebCore::RenderLayerBacking::attachToScrollingCoordinator): * rendering/RenderLayerBacking.h: (RenderLayerBacking): Since this is the root, send 0 to represent the parent layer. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): 2012-10-18 Yael Aharon [EFL] GraphicsContext3D::m_renderStyle is not initialized https://bugs.webkit.org/show_bug.cgi?id=99721 Reviewed by Antonio Gomes. Initialize GraphicsContext3D::m_renderStyle. No new tests, no new functionality. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2012-10-18 Brian White WebKit Doesn't Recognize Content-Language HTTP Header https://bugs.webkit.org/show_bug.cgi?id=97929 Reviewed by Alexey Proskuryakov. The HTTP "Content-Language" header may be present and include the language of the page contents (as opposed to an embedded meta tag). * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): 2012-10-18 Jer Noble Crash in WebCore::Document::webkitExitFullscreen + 618 https://bugs.webkit.org/show_bug.cgi?id=99496 Reviewed by Eric Carlson. Prospective fix for null-dereference crash in Document::webkitExitFullscreen(). * dom/Document.cpp: (WebCore::Document::webkitExitFullscreen): Null check page() before calling page()->chrome. 2012-10-18 Pablo Flouret Implement css3-conditional's @supports rule https://bugs.webkit.org/show_bug.cgi?id=86146 Reviewed by Antti Koivisto. The "@supports" rule is a conditional group rule whose condition tests whether the user agent supports CSS property:value pairs. http://dev.w3.org/csswg/css3-conditional/#at-supports Test: css3/supports.html * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.features.am: Add an ENABLE_CSS3_CONDITIONAL_RULES flag. * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore): (WebCore::CSSParser::detectSupportsToken): Tries to find 'and', 'not' and 'or' tokens. (WebCore::CSSParser::detectAtToken): Enter SupportsMode if @supports is detected. (WebCore::CSSParser::realLex): Try to detect supports tokens when in SupportsMode. * css/CSSParser.h: Added new SupportsMode parsing mode. (CSSParser): 2012-10-18 Marja Hölttä Fix: CachedResourceLoader::requestSVGDocument was passing an URL as charset https://bugs.webkit.org/show_bug.cgi?id=99730 Reviewed by Jochen Eisinger. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestSVGDocument): 2012-10-18 Jer Noble Fullscreen movie controls behave incorrectly when clicked (and dragged) https://bugs.webkit.org/show_bug.cgi?id=99610 Reviewed by Eric Carlson. Do not reset the relative drag position to 0,0 at the beginning of every drag. Instead, store the cumulative drag offset and accumulate during each additional drag. No new tests; modified the fullscreen/video-controls-drag.html test. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::startDrag): Reset m_lastDragEventLocation. (WebCore::MediaControlPanelElement::continueDrag): Accumulate drag distance in m_cumulativeDragOffset. (WebCore::MediaControlPanelElement::resetPosition): Reset m_cumulativeDragOffset. * html/shadow/MediaControlElements.h: 2012-10-18 Brandon Jones Implement OES_element_index_uint / WEBKIT_OES_element_index_uint https://bugs.webkit.org/show_bug.cgi?id=97400 Reviewed by Kenneth Russell. Implemented OES_element_index_uint WebGL extension Test: fast/canvas/webgl/oes-element-index-uint.html * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/OESElementIndexUint.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h. (WebCore): (WebCore::OESElementIndexUint::OESElementIndexUint): (WebCore::OESElementIndexUint::~OESElementIndexUint): (WebCore::OESElementIndexUint::getName): (WebCore::OESElementIndexUint::create): * html/canvas/OESElementIndexUint.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h. (WebCore): (OESElementIndexUint): * html/canvas/OESElementIndexUint.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h. * html/canvas/WebGLExtension.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::validateElementArraySize): (WebCore::WebGLRenderingContext::validateIndexArrayConservative): (WebCore::WebGLRenderingContext::validateIndexArrayPrecise): (WebCore::WebGLRenderingContext::validateRenderingState): (WebCore::WebGLRenderingContext::drawElements): (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): * html/canvas/WebGLRenderingContext.h: (WebCore): (WebGLRenderingContext): * platform/graphics/Extensions3D.h: (Extensions3D): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::supportsExtension): 2012-10-18 Jer Noble Add diagnostic logging to track per-page media engine usage. https://bugs.webkit.org/show_bug.cgi?id=99615 Reviewed by Eric Carlson. Add diagnostic logging triggered only once-per-page and once-per-page-per-engine. * html/HTMLMediaElement.cpp: (WebCore::logMediaLoadRequest): Encapsulate diagnostic logging into single static method. (WebCore::HTMLMediaElement::mediaLoadingFailed): Call logMediaLoadRequest. (WebCore::HTMLMediaElement::setReadyState): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchDidCommitLoad): Reset the set of seen media engines. Add new methods to Page to track per-page media engine diagnostic info, similar to plugin diagnostic info. * page/Page.cpp: (WebCore::Page::hasSeenAnyMediaEngine): (WebCore::Page::hasSeenMediaEngine): (WebCore::Page::sawMediaEngine): (WebCore::Page::resetSeenMediaEngines): * page/Page.h: Add new static logging key definitions: * page/DiagnosticLoggingKeys.cpp: (WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey): (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey): * page/DiagnosticLoggingKeys.h: 2012-10-18 Michael Saboff Add 8-bit path to RenderBlock::handleTrailingSpaces() https://bugs.webkit.org/show_bug.cgi?id=99731 Reviewed by Dan Bernstein. Factored out and added findFirstTrailingSpace() templated helper function that is called with the approriate character pointer type. No tests needed, change covered by existing tests. * rendering/RenderBlockLineLayout.cpp: (WebCore::findFirstTrailingSpace): (WebCore::RenderBlock::handleTrailingSpaces): 2012-10-18 Hans Muller [CSS Exclusions] Add ExclusionShape::shapeBoundingBox() method https://bugs.webkit.org/show_bug.cgi?id=99216 Reviewed by Dirk Schulze. Added a FloatRect::extend() method which simplifies writing loops that accumulate the bounding box for a sequence of FloatPoints. The new method is used by ExclusionPolygon to initialize the shape's logical and physical bounding boxes. This a clean-up, not a change in functionality. It's already covered by the existing fast/exclusions LayoutTests. * platform/graphics/FloatRect.cpp: (WebCore::FloatRect::extend): Extend the FloatRect's bounds to include a FloatPoint. (WebCore): * platform/graphics/FloatRect.h: (FloatRect): Added extend() method. * rendering/ExclusionPolygon.cpp: (WebCore::ExclusionPolygon::ExclusionPolygon): Use FloatRect::extend() to compute the polygon's internal bounding box. * rendering/ExclusionShape.cpp: (WebCore::ExclusionShape::createExclusionShape): Use FloatRect::extend() to compute the polygon's physical bounding box. * rendering/ExclusionShape.h: (WebCore::ExclusionShape::shapeBoundingBox): Return the shape's bounding box in physical coordinates. (ExclusionShape): 2012-10-18 Hans Muller [CSS Exclusions] Handle special case "empty" shapes https://bugs.webkit.org/show_bug.cgi?id=99342 Reviewed by Dirk Schulze. Provide expclit coverage of the simple "empty" shape-inside shapes. Shapes will be considered "empty" in the sense that ExclusionShape::getIncludedIntervals() and ExclusionShape::getExcludedIntervals() will always return empty lists of intervals. This patch covers rectangles of zero width or height, circles with 0 radius, ellipses with 0 radiusX or radiusY, polygons with less than 3 vertices. Test: fast/exclusions/shape-inside/shape-inside-empty.html * rendering/ExclusionPolygon.cpp: (WebCore::ExclusionPolygon::ExclusionPolygon): Initialize the m_empty flag. (WebCore::ExclusionPolygon::getExcludedIntervals): Added short-circuit return when the polygon is empty. (WebCore::ExclusionPolygon::getIncludedIntervals): Added short-circuit return when the polygon is empty. * rendering/ExclusionPolygon.h: Added the isEmpty() method. * rendering/ExclusionRectangle.cpp: (WebCore::ExclusionRectangle::getExcludedIntervals): Added short-circuit return when the rectangle is empty. (WebCore::ExclusionRectangle::getIncludedIntervals): Added short-circuit return when the rectangle is empty. * rendering/ExclusionRectangle.h: Added the isEmpty() method. * rendering/ExclusionShape.h: Added a virtual isEmpty() ExclusionShape method. (ExclusionShape): 2012-10-18 Takashi Sakamoto REGRESSION(r131464): Null-pointer crash in StyleResolver::styleForElement https://bugs.webkit.org/show_bug.cgi?id=99587 Reviewed by Dimitri Glazkov. Since contents in datalist are not shown, summary in datalist is not shown either. So the summary has no render style. On the other hand, the summary is implemented by shadow DOM and it has some insertion point. Its child, e.g. title in the below test, is distributed. To solve the child's user-modify, looking at shadow host(=summary)'s style causes null-pointer crash. Test: fast/dom/shadow/user-modify-in-datalist-crash.html * css/StyleResolver.cpp: (WebCore::StyleResolver::styleForElement): Added a code to check whether the shadow host has any style or not. 2012-10-17 Philippe Normand [GTK] AudioBusGtk sometimes fails to load the HRTF database https://bugs.webkit.org/show_bug.cgi?id=99601 Reviewed by Martin Robinson. AudioBusGtk now first lookup for the uninstalled resource files, if the AUDIO_RESOURCES_PATH environment variable is set. Additionally the audio file reader is now better dealing with errors, returning an empty AudioBus in such cases and issuing warnings on the console output. The cleanup of some member variables was also moved to the destructor. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (AudioFileReader): (WebCore::AudioFileReader::AudioFileReader): (WebCore::AudioFileReader::~AudioFileReader): Clear and free member variables. This was done in createBus before. (WebCore::AudioFileReader::handleMessage): Issue warnings in case of error and exit from the main loop so the pipeline is not forever stuck. (WebCore::AudioFileReader::createBus): Return an empty bus in case of error. * platform/audio/gtk/AudioBusGtk.cpp: (WebCore::AudioBus::loadPlatformResource): Load uninstalled resources first if AUDIO_RESOURCES_PATH is set. 2012-10-18 Pavel Feldman Web Inspector: provisional change for merging "doced" state into the "dock side" enum. https://bugs.webkit.org/show_bug.cgi?id=99718 Reviewed by Vsevolod Vlasov. Adds stub method that could be executed from the embedder. * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.setDockSide): 2012-10-18 Kent Tamura Add Localizer::monthFormat and implementations https://bugs.webkit.org/show_bug.cgi?id=99704 Reviewed by Kentaro Hara. Localizer::monthFormat will be used for constructing input[type=month] UI. Tests: Add unit tests to Source/WebKit/chromium/tests/. * platform/text/Localizer.h: (Localizer): Declare pure virtual monthFormat function. * platform/text/LocaleNone.cpp: (LocaleNone): Declare monthFormat. (WebCore::LocaleNone::monthFormat): Added. Always reutrns an ISO-8601 format, "yyyy-MM" * platform/text/LocaleICU.h: (LocaleICU): Declare monthFormat. * platform/text/LocaleICU.cpp: (WebCore::getFormatForSkeleton): A helper to get a format for the specified skeleton. The overflow-allocalte-try-again pattern is similar to LocaleICU::decimalSymbol and LocaleICU::decimalTextAttribute. (WebCore::LocaleICU::monthFormat): Added. Calls getFormatForSkeleton with "yyyyMMM". * platform/text/mac/LocaleMac.h: (LocaleMac): Declare monthFormat. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::monthFormat): Added. Calls NSDateFormatter::dateFormatFromTemplate with "yyyyMMM". * platform/text/LocaleWin.h: (LocaleWin): Declare monthFormat. * platform/text/LocaleWin.cpp: (WebCore::LocaleWin::monthFormat): Get a format by LOCALE_SYEARMONTH, and convert it to an LDML format. 2012-10-18 Pavel Feldman Web Inspector: add X-WebKit-CSP header into inspector.html https://bugs.webkit.org/show_bug.cgi?id=99710 Reviewed by Vsevolod Vlasov. A simple sanity measure. * inspector/front-end/inspector.html: 2012-10-18 Huang Dongsung [WK2] Add CustomFilterOperation serialization in ArgumentCoder. https://bugs.webkit.org/show_bug.cgi?id=98733 Reviewed by Noam Rosenthal. Change CustomFilterOperation::parameters() to const function, because this method is a getter and a const instance needs to call this method. No new tests because there is no change in behavior. * platform/graphics/filters/CustomFilterOperation.h: (WebCore::CustomFilterOperation::parameters): 2012-10-18 Hayato Ito treeScopeOfParent doesn't return the TreeScope of the parent https://bugs.webkit.org/show_bug.cgi?id=98207 Reviewed by Hajime Morita. A minor clean up. Remove treeScopeOfParent() in Element.cpp. No tests needed, this is just a clean up. * dom/Element.cpp: (WebCore::Element::removedFrom): 2012-10-18 Alexander Pavlov Web Inspector: [Styles] Forcibly invoke property names suggestion box for empty prefix https://bugs.webkit.org/show_bug.cgi?id=99711 Reviewed by Vsevolod Vlasov. Suggestions should be returned unconditionally for CSS property names, regardless of the prefix. * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions): (WebInspector.CSSCompletions.requestCSSNameCompletions): (WebInspector.CSSCompletions.prototype._firstIndexOfPrefix): * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.forProperty): 2012-10-18 Raphael Kubo da Costa Unreviewed, do not make UseV8.cmake executable. * UseV8.cmake: Removed property svn:executable. 2012-10-18 Tommy Widenflycht MediaStream API: Add better RTCPeerConnectionHandler creation logic https://bugs.webkit.org/show_bug.cgi?id=99308 Reviewed by Adam Barth. This patch makes sure that if the RTCPeerConnectionHandler can't be fully initialized/created the RTCPeerConnection constructor throws an exception. Not full testable, existing tests cover the normal case though. * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandler::create): (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium): (WebCore::RTCPeerConnectionHandlerChromium::createWebHandler): (WebCore::RTCPeerConnectionHandlerChromium::initialize): (WebCore::RTCPeerConnectionHandlerChromium::createOffer): (WebCore::RTCPeerConnectionHandlerChromium::createAnswer): (WebCore::RTCPeerConnectionHandlerChromium::setLocalDescription): (WebCore::RTCPeerConnectionHandlerChromium::setRemoteDescription): (WebCore::RTCPeerConnectionHandlerChromium::updateIce): (WebCore::RTCPeerConnectionHandlerChromium::addIceCandidate): (WebCore::RTCPeerConnectionHandlerChromium::localDescription): (WebCore::RTCPeerConnectionHandlerChromium::remoteDescription): (WebCore::RTCPeerConnectionHandlerChromium::addStream): (WebCore::RTCPeerConnectionHandlerChromium::removeStream): (WebCore::RTCPeerConnectionHandlerChromium::getStats): (WebCore::RTCPeerConnectionHandlerChromium::openDataChannel): (WebCore::RTCPeerConnectionHandlerChromium::sendStringData): (WebCore::RTCPeerConnectionHandlerChromium::sendRawData): (WebCore::RTCPeerConnectionHandlerChromium::closeDataChannel): (WebCore::RTCPeerConnectionHandlerChromium::stop): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (RTCPeerConnectionHandlerChromium): 2012-10-19 Zeno Albisser Temporarily disable use of QCocoaNativeInterface in GraphicsSurfaceMac. https://bugs.webkit.org/show_bug.cgi?id=99320 The current version of Qt5 deployed on the buildbots does not yet have an implementation for QCocoaNativeInterface::nativeResourceForContext(). Therefore we disable this code path until Qt5/qtbase has been updated to a revision above Change-Id: Id00efc88a73d7df04a68c022f19d9d1c4f6d386b. Once Qt5 has been updated, this patch must be reverted. Reviewed by Noam Rosenthal. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): 2012-10-18 Zeno Albisser GraphicsSurface should not modify the current GL context. https://bugs.webkit.org/show_bug.cgi?id=99320 Instead of reusing the currently bound GL context for drawing the texture onto the GraphicsSurface, GraphicsSurface should create a new context that shares the texture names with a context provided by the caller. This way the OpenGL states are clearly separated and we do not risk interfeering with the currently bound GL context. Reviewed by Noam Rosenthal. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): When creating a GraphicsSurface pass the platform GL context as a parameter, so it can be used for sharing textures with. (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface): Pass the texture instead of the FBO. A Texture can be drawn directly or bound to another FBO, where a framebuffer always needs to be blit onto the surface. (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces): Pass the platform GL context as a parameter. * platform/graphics/surfaces/GraphicsSurface.cpp: (WebCore::GraphicsSurface::create): (WebCore::GraphicsSurface::copyFromTexture): * platform/graphics/surfaces/GraphicsSurface.h: (GraphicsSurface): * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): Create a new GL context that shares the textures with the context provided by the caller. (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::makeCurrent): Add a convenience function to make the context that belongs to the surface current. (GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::doneCurrent): Add a convenience function to make the previously bound context current again. (WebCore::GraphicsSurfacePrivate::copyFromTexture): Move blitting of the texture onto the surface into a separate function within GraphicsSurfacePrivate. (WebCore::GraphicsSurface::platformCopyFromTexture): Rename function platformCopyFromFramebuffer to platformCopyFromTexture, as we are now passing the texture only. (WebCore::GraphicsSurface::platformCreate): * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: (WebCore): (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::makeCurrent): Add a convenience function to make the context that belongs to the surface current. (GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::doneCurrent): Add a convenience function to make the previously (WebCore::GraphicsSurfacePrivate::copyFromTexture): Move blitting of the texture onto the surface into a separate function within GraphicsSurfacePrivate. (WebCore::resolveGLMethods): Resolve additional GL methods necessary for this change. (WebCore::GraphicsSurface::platformCopyFromTexture): Rename function platformCopyFromFramebuffer to platformCopyFromTexture, as we are now passing the texture only. (WebCore::GraphicsSurface::platformCreate): 2012-10-18 Kent Tamura Set min-width property instead of width property for date/time fields https://bugs.webkit.org/show_bug.cgi?id=99673 Reviewed by Hajime Morita. A field can have a text wider than pre-computed width because of :first-letter property. So, we should set min-width, not width. Tests: Covered by fast/forms/*-multiple-fields/*-multipe-fields-appearance-style.html * html/shadow/DateTimeNumericFieldElement.cpp: (WebCore::DateTimeNumericFieldElement::customStyleForRenderer): Set min-width instead of width. * html/shadow/DateTimeSymbolicFieldElement.cpp: (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto. 2012-10-18 MORITA Hajime Assertion failure at TreeScopeAdopter::moveNodeToNewDocument() https://bugs.webkit.org/show_bug.cgi?id=99510 Reviewed by Kent Tamura. Shadow DOM notification call didn't have checks for mutation detection. This change adds such checks. Test: fast/forms/textarea/textarea-autofocus-removal-while-focusing-with-style.html * dom/ContainerNodeAlgorithms.cpp: (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument): (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument): 2012-10-17 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): 2012-10-17 Mike West Move mixed content logic out of FrameLoader https://bugs.webkit.org/show_bug.cgi?id=45638 Reviewed by Eric Seidel. This change moves checks for mixed content out of FrameLoader, and into a new MixedContentChecker object. It's a pretty straightforward refactoring with no change to the overall logic, and only minor changes to the code to reduce repetition. The only substantive change is renaming the methods from 'checkIf*' to 'can*' to reflect the value of the boolean they return. The visible functionality shouldn't change; this change should be covered by existing tests in http/tests/security/mixedContent. This patch is mostly a revitalization of Eric Sidel's original patch: https://bugs.webkit.org/attachment.cgi?id=67432&action=prettypatch * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Hey, look! A new file! * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): * loader/FrameLoader.h: (WebCore::FrameLoader::mixedContentChecker): (FrameLoader): * loader/MixedContentChecker.cpp: Added. (WebCore): (WebCore::MixedContentChecker::MixedContentChecker): (WebCore::MixedContentChecker::client): (WebCore::asUTF8): (WebCore::MixedContentChecker::isMixedContent): (WebCore::MixedContentChecker::canDisplayInsecureContent): (WebCore::MixedContentChecker::canRunInsecureContent): (WebCore::MixedContentChecker::logWarning): * loader/MixedContentChecker.h: Added. (WebCore): (MixedContentChecker): Migrate functionality from FrameLoader::checkIf* to MixedContentChecker::can*. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::willSendRequest): * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::pluginIsLoadable): (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::checkInsecureContent): Use the new method locations. 2012-10-17 Dan Bernstein REGRESSION (r95391): ComplexTextController is unnecessarily slow with characters with combining marks when the base character is not covered by any font https://bugs.webkit.org/show_bug.cgi?id=99654 Reviewed by Adele Peterson. When the base character of a combining character sequence is not covered by any one of the available fonts, there is no point looking for a font that covers the entire sequence, nor to try to use a combination of fallback fonts for the entire sequence. * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::systemFallback): Moved ComplexTextController::systemFallbackFontData here and renamed it. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::collectComplexTextRuns): This function used to use systemFallbackFontData() whenever Font::fontDataForCombiningCharacterSequence returned 0 for a base character with combining marks, regardless of whether the base character was covered by any font. Changed it to preserve the return value of fontDataForCombiningCharacterSequence, which is now 0 only if the base charcater is not in any font, while systemFallbackFontData() is used to indicate that no single font in the fallback list covers all characters in the sequence, but the base character is in some font. * platform/graphics/mac/ComplexTextController.h: (ComplexTextController): Moved systemFallbackFontData from here to SimpleFontData. * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Updated for the above move. * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore::Font::fontDataForCombiningCharacterSequence): Changed to return systemFallbackFontData() if no single font in the fallback list covers all characters in the sequence, while using 0 to signal the base character does not exist in any font. 2012-10-17 Dan Bernstein Try to fix the build after r131701. * WebCore.exp.in: 2012-10-17 Hayato Ito Content element does not expose distributedNodes property. https://bugs.webkit.org/show_bug.cgi?id=99232 Reviewed by Dimitri Glazkov. Add getDistributedNodes() to HTMLContentElement's IDL, which returns a static NodeList whose node are distributed to the content element. Test: fast/dom/shadow/content-element-distributed-nodes.html * html/shadow/HTMLContentElement.idl: * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::getDistributedNodes): * html/shadow/InsertionPoint.h: (InsertionPoint): * testing/Internals.cpp: * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-10-17 Pan Deng [User Timing] implement main interface in of User Timing, according to http://www.w3.org/TR/2012/CR-user-timing-20120726/ https://bugs.webkit.org/show_bug.cgi?id=90963 Reviewed by Tony Gentilcore. This patch implemented mark(), measure(), clearMarks() and clearMeasures() interface of User Timing. Getters are not exposed by Performance Timeline yet, it will be future patch. Tests: http/tests/w3c/webperf/submission/user-timing/test_user_timing_clearMarks.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_clearMeasures.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_mark.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_mark_exception.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_measure.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_measure_associate_with_navigation_timing.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_measure_exception.html http/tests/w3c/webperf/submission/user-timing/test_user_timing_method_exist.html * GNUmakefile.list.am: * WebCore.gypi: * page/Performance.cpp: (WebCore::Performance::webkitGetEntries): (WebCore::Performance::webkitGetEntriesByType): (WebCore::Performance::webkitGetEntriesByName): (WebCore): (WebCore::Performance::webkitMark): (WebCore::Performance::webkitClearMarks): (WebCore::Performance::webkitMeasure): (WebCore::Performance::webkitClearMeasures): * page/Performance.h: (WebCore): (Performance): * page/Performance.idl: * page/PerformanceMark.h: Added. (WebCore): (PerformanceMark): (WebCore::PerformanceMark::create): (WebCore::PerformanceMark::PerformanceMark): (WebCore::PerformanceMark::~PerformanceMark): * page/PerformanceMark.idl: Added. * page/PerformanceMeasure.h: Added. (WebCore): (PerformanceMeasure): (WebCore::PerformanceMeasure::create): (WebCore::PerformanceMeasure::PerformanceMeasure): (WebCore::PerformanceMeasure::~PerformanceMeasure): * page/PerformanceMeasure.idl: Added. * page/PerformanceUserTiming.cpp: Added. (WebCore): (WebCore::UserTiming::UserTiming): (WebCore::insertPerformanceEntry): (WebCore::clearPeformanceEntries): (WebCore::UserTiming::mark): (WebCore::UserTiming::clearMarks): (WebCore::UserTiming::findExistingMarkStartTime): (WebCore::UserTiming::measure): (WebCore::UserTiming::clearMeasures): * page/PerformanceUserTiming.h: Added. (WebCore): (UserTiming): (WebCore::UserTiming::create): 2012-10-17 James Robinson Unreviewed clang compile fix - GraphicsLayerUpdater needs a virtual destructor. * platform/graphics/GraphicsLayerUpdater.h: (GraphicsLayerUpdater): 2012-10-17 Ryuan Choi Attempt to fix the build after r131680. Unreviewed build fix. * dom/Document.cpp: Guard ACCELERATED_COMPOSITING for RenderLayerCompositor.h 2012-10-17 Elliott Sprehn StyleRareNonInheritedData::contentDataEquivalent only looks at the first ContentData https://bugs.webkit.org/show_bug.cgi?id=99560 Reviewed by Eric Seidel. Previously we only compared the first ContentData in the linked list of ContentData's which meant that if the resolved style for content had the same prefix we wouldn't update the content. This patch adds a loop to compare each of the ContentData objects in the linked list. Test: fast/css-generated-content/content-property-change.html * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::contentDataEquivalent): 2012-10-17 Elliott Sprehn Remove StyleContentType since it's not used anymore https://bugs.webkit.org/show_bug.cgi?id=99659 Reviewed by Eric Seidel. Remove StyleContentType enum since it's not used anymore and make the is*() type checking methods on ContentData public. No new tests needed, this is just deleting dead code. * rendering/style/ContentData.h: (ContentData): * rendering/style/RenderStyleConstants.h: 2012-10-17 Simon Fraser Create a GraphicsLayerUpdater class that will do periodic layer flushes for layer trees containing tile caches https://bugs.webkit.org/show_bug.cgi?id=99518 Reviewed by Dean Jackson. When using tile caches in place of tiled layers, we need to recompute their visible area periodically while animations and scrolling are happening. Make a new class, GraphicsLayerUpdater, to handle this updating. Internally, it uses DisplayRefreshMonitor to generate the periodic updates. GraphicsLayer clients are notified that layers need periodic updates. Clients are free to make use of GraphicsLayerUpdater to handle this updating, as RenderLayerCompositor does. Also do some minor refactoring of methods in RenderLayerCompositor that get to Page. * CMakeLists.txt: Add GraphicsLayerUpdater.cpp to the build. * GNUmakefile.list.am: Ditto. * PlatformBlackBerry.cmake: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * dom/Document.cpp: (WebCore::Document::windowScreenDidChange): Tell the compositor that the screen changed, so it can tell the GraphicsLayerUpdater if it has one. * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::notifyFlushBeforeDisplayRefresh): Method called for layers that need periodic updates, like tile cache layers. * platform/graphics/GraphicsLayerUpdater.cpp: Added. Uses DisplayRefreshMonitorManager to flush layers before the next refresh. (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater): (WebCore::GraphicsLayerUpdater::~GraphicsLayerUpdater): (WebCore::GraphicsLayerUpdater::scheduleUpdate): (WebCore::GraphicsLayerUpdater::screenDidChange): (WebCore::GraphicsLayerUpdater::displayRefreshFired): * platform/graphics/GraphicsLayerUpdater.h: Added. (GraphicsLayerUpdaterClient): Clients need to implement flushLayers(). (WebCore::GraphicsLayerUpdaterClient::~GraphicsLayerUpdaterClient): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): For tile cache layers, tell the client that this layer should be updated soon to update the visible rect. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::notifyFlushBeforeDisplayRefresh): Pass this message on to the compositor. * rendering/RenderLayerBacking.h: (RenderLayerBacking): Implement notifyFlushBeforeDisplayRefresh. Add OVERRIDE to all the client overrides. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): Use helper to get to Page. (WebCore::RenderLayerCompositor::scheduleLayerFlush): Ditto. (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Soon we're going to be asking about the current state of animations inside the flush (for visible rect computation), so we need a AnimationUpdateBlock to make sure all the animation times are in sync. (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Make a GraphicsLayerUpdater if necessary, and tell it to update soon. (WebCore::RenderLayerCompositor::flushLayers): The GraphicsLayerUpdater client method. Just does a flush. For now, considers this Frame as the flush root, which will need fixing for iframes. (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Use helper to get to Page. (WebCore::RenderLayerCompositor::deviceScaleFactor): Ditto. (WebCore::RenderLayerCompositor::pageScaleFactor): Ditto. (WebCore::RenderLayerCompositor::destroyRootLayer): Ditto. (WebCore::RenderLayerCompositor::windowScreenDidChange): Tell the updater if we have one. (WebCore::RenderLayerCompositor::scrollingCoordinator): Use helper to get to Page. (WebCore::RenderLayerCompositor::graphicsLayerFactory): Use helper to get to Page. (WebCore::RenderLayerCompositor::page): The helper. * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): Add OVERRIDE to all the client overrides. 2012-10-17 Eric Seidel Make dom-query.html slightly faster by removing unnecessary ref-churn in StringTraits https://bugs.webkit.org/show_bug.cgi?id=99652 Reviewed by Adam Barth. My testing showed this moved dom-query.html from 465560 runs/s to 479019 which is about 2% if I'm doing my math correctly. I suspect that's due to avoiding the ref-churn we were incurring by using return-by-value symantics here. This is just the tip of the iceburg. :) * bindings/v8/V8StringResource.cpp: (StringTraits): * bindings/v8/V8ValueCache.h: (WebCore::WebCoreStringResource::webcoreString): (WebCore::WebCoreStringResource::atomicString): 2012-10-17 Luke Macpherson Move handling of CSSPropertyWebkitLineClamp from StyleResolver into StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=99534 Reviewed by Alexis Menard. One small step towards removing the giant switch statement in StyleResolver, this patch moves line clamp handling into StyleBuilder. Covered by fast/overflow/line-clamp.html * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): 2012-10-17 Andy Estes [WebKit2] Add removeChild: to WKDOMNode and make WKDOMText.data read/write https://bugs.webkit.org/show_bug.cgi?id=99662 Reviewed by Sam Weinig. Export needed symbols. * WebCore.exp.in: 2012-10-17 Adam Barth [V8] Don't generate code that declares visitDOMWrapper if we're not going to generate the implementation https://bugs.webkit.org/show_bug.cgi?id=99653 Reviewed by Eric Seidel. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): 2012-10-17 David Grogan IndexedDB: Destroy leveldb directory if unknown schema is detected https://bugs.webkit.org/show_bug.cgi?id=99636 Reviewed by Tony Chang. chromium browser test in progress at https://codereview.chromium.org/11196029 * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore): (WebCore::isSchemaKnown): Return true when the schema key doesn't exist because new databases won't have one. (WebCore::setUpMetadata): (WebCore::IDBLevelDBBackingStore::open): Piggy-back on existing leveldb::destroy code. 2012-10-17 Arpita Bahuguna Incorrect rendering of borders on with span > 1 https://bugs.webkit.org/show_bug.cgi?id=76246 Reviewed by Julien Chaffraix. The HTML5 rendering specification [10.2.2 - Display Types] states that "For the purposes of the CSS table model, the col element is expected to be treated as if it was present as many times as its span attribute specifies." We should thus apply a col element's border as if the element is present as many number of times as its span attribute. Apart from this, we should also treat the col and its enclosing colgroup separately while computing the collapsed borders. Test: fast/table/border-collapsing/collapsed-border-with-col-colgroup-span.html * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeCollapsedStartBorder): (WebCore::RenderTableCell::computeCollapsedEndBorder): Borders from col and its enclosing colgroup element should be handled separately, while considering the preceeding col's end border (for start border computation) and the next col's start border (for end border computation). Also, have made changes for handling of col elements with span attribute as per the specification. We now apply the border (start or end) of the col element irrespective of whether it has any span specified for it or not. 2012-10-17 Tom Sepez Crash in ContainerNode::removeAllChildren() https://bugs.webkit.org/show_bug.cgi?id=98443 Reviewed by Eric Carlson. This patch makes the errorEventSender added in WebKit Revision 112190 interact with the updatedHasPendingLoadEvent() mechanism in the same manner as the other existing event senders. Test: http/tests/security/video-poster-cross-origin-crash2.html * loader/ImageLoader.cpp: (WebCore::ImageLoader::setImage): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::updatedHasPendingEvent): (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): (WebCore::ImageLoader::dispatchPendingLoadEvent): * loader/ImageLoader.h: (ImageLoader): 2012-10-17 Joshua Bell IndexedDB: Closing connection in upgradeneeded should result in error event https://bugs.webkit.org/show_bug.cgi?id=99486 Reviewed by Tony Chang. The IDB spec requires that "...if connection is closed, return a DOMError of type AbortError". This was being handled during the "enqueue" phase, which was too early either for synchronously executing scripts or asynchronous messaging in multiprocess ports (crbug.com/150691). Move the logic to the "dispatch" phase. Test: storage/indexeddb/intversion-close-in-oncomplete.html * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::onSuccess): Move success to error morphing from here... (WebCore::IDBOpenDBRequest::dispatchEvent): To here. * Modules/indexeddb/IDBOpenDBRequest.h: (IDBOpenDBRequest): 2012-10-17 Elliott Sprehn Use virtual dispatch to create ContentData renderers https://bugs.webkit.org/show_bug.cgi?id=99646 Reviewed by Eric Seidel. ContentData are conceptually very similar to Nodes and we can use the same createRenderer pattern on them to simplify creating renderers for generated content. Now each ContentData class knows how to create its own renderer. Previously we switched over the StyleContentType which required a case for CONTENT_NONE and made the code look like it could return null, but this case is actually impossible because no ContentData class ever has a type of CONTENT_NONE and no null checks are really needed. This is the final step in removing dependence on StyleContentType. No new tests needed, this is just a refactor. * rendering/RenderObjectChildList.cpp: Remove createRendererForBeforeAfterContent. (WebCore::RenderObjectChildList::updateBeforeAfterContent): * rendering/style/ContentData.cpp: (WebCore::ImageContentData::createRenderer): (WebCore): (WebCore::TextContentData::createRenderer): (WebCore::CounterContentData::createRenderer): (WebCore::QuoteContentData::createRenderer): * rendering/style/ContentData.h: Added a new virtual method createRenderer. (WebCore): (ContentData): (ImageContentData): (TextContentData): (CounterContentData): (QuoteContentData): 2012-10-17 Julien Chaffraix RenderLayer subtrees without any self-painting layer shouldn't be walked during hit testing https://bugs.webkit.org/show_bug.cgi?id=89393 Reviewed by Eric Seidel. Performance optimization, covered by existing tests. Bug 88888 added an peformance optimization for painting. As hit testing is very similar to painting, it would benefit from the same optimization. On http://dglazkov.github.com/performance-tests/biggrid.html, with a 10,000 * 100 tables, it reduces the time to select some text inside a cell from 1-2 seconds to a usable time (I didn't measure the exact timing). Note that as in bug 88888, the multi-column code is not covered by this optimization. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): This is the entrance to the hit testing code so we check if we can bail out early. (WebCore::RenderLayer::hitTestList): If we have no self-painting descendant layers, we can bail out. (WebCore::RenderLayer::hitTestContents): (WebCore::RenderLayer::hitTestLayer): hitTest should filter the layers that call these functions. Added some ASSERT to make sure we don't mistakenly call them when could avoid it. 2012-10-17 Allan Sandfeld Jensen [Qt] Certain SVG content freezes QtWebKit https://bugs.webkit.org/show_bug.cgi?id=97258 Reviewed by Simon Hausmann. Ensure dashpattern is well-formed by avoiding divisions by zero. Test: svg/stroke/zero-width-hang.html * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::setLineDash): 2012-10-17 Alec Flett IndexedDB: Explicitly send null/undefined/integers to frontend IDBCallbacks https://bugs.webkit.org/show_bug.cgi?id=99619 Reviewed by Adam Barth. Rather than pass SerializedScriptValue tokens from the backend, send explicit null, (as onSuccess(static_cast(0))) undefined, (as onSucess()), and integers (as onSuccess(long long)) This reduces backend dependency on things that might require a JS interpreter on the backend. No new tests, this is a refactor and existing tests cover correctness. Tests that might fail include: Test: storage/indexeddb/index-count.html Test: storage/indexeddb/objectstore-count.html Test: storage/indexeddb/database-basics.html * Modules/indexeddb/IDBCallbacks.h: (IDBCallbacks): * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::advanceInternal): (WebCore::IDBCursorBackendImpl::continueFunctionInternal): (WebCore::IDBCursorBackendImpl::prefetchContinueInternal): * Modules/indexeddb/IDBCursorBackendImpl.h: (WebCore::IDBCursorBackendImpl::value): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::deleteDatabase): * Modules/indexeddb/IDBIndex.cpp: * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::openCursorInternal): (WebCore::IDBIndexBackendImpl::countInternal): (WebCore::IDBIndexBackendImpl::getInternal): * Modules/indexeddb/IDBObjectStore.cpp: * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getInternal): (WebCore::IDBObjectStoreBackendImpl::deleteInternal): (WebCore::IDBObjectStoreBackendImpl::clearInternal): (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): (WebCore::IDBObjectStoreBackendImpl::countInternal): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): (WebCore): * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBTransaction.cpp: * Modules/indexeddb/IDBTransactionBackendImpl.cpp: * Modules/indexeddb/IDBTransactionBackendImpl.h: * Modules/indexeddb/IDBTransactionBackendInterface.h: * bindings/v8/IDBBindingUtilities.cpp: (WebCore::deserializeIDBValue): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-10-17 Nate Chapin Move ResourceRequest construction out of SubresourceLoader https://bugs.webkit.org/show_bug.cgi?id=99627 Reviewed by Adam Barth. CachedResource::load() fills out a bunch of http headers. SubresourceLoader::create() adds a bunch more. Merge them. Note that this merge requires a bit more care in CachedRawResource::canReuse(), because more headers are set directly on CachedResource::m_resourceRequest, rather than on a copy of it. No new tests, no functionality change intended. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): * loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse): (WebCore): (WebCore::CachedRawResource::canReuse): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::failBeforeStarting): (WebCore): (WebCore::CachedResource::addAdditionalRequestHeaders): (WebCore::CachedResource::load): * loader/cache/CachedResource.h: (CachedResource): 2012-10-17 Anders Carlsson Clean up Vector.h https://bugs.webkit.org/show_bug.cgi?id=99622 Reviewed by Benjamin Poulain. Fix fallout from removing std::max and std::min using declarations. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::currentAge): 2012-10-17 Joshua Bell IndexedDB: Enforce unsigned long/unsigned long long ranges https://bugs.webkit.org/show_bug.cgi?id=99637 Reviewed by Tony Chang. The IndexedDB spec has [EnforceRange] specified on unsigned long and unsigned long long arguments, which requires the implementation to throw TypeError for negative values or values that exceed 2^53-1 (maximum JS number that behaves like an integer) - and 0 is specifically forbidden by the APIs as well. A more correct fix in the binding layer is in webkit.org/b/96798 but we can temporarily address this in the implementation. Also refactor to prevent IDBFactory.open(name, -1) from triggering an internal code path. Tests: storage/indexeddb/cursor-advance.html storage/indexeddb/intversion-bad-parameters.html storage/indexeddb/intversion-encoding.html * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): Validate argument range. * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: Drop "unsigned" qualifier as the binding code is not yet doing the correct validation. * Modules/indexeddb/IDBFactory.cpp: Refactor to prevent open(name, -1) (WebCore): (WebCore::IDBFactory::open): Validate the int version here, then pass to... (WebCore::IDBFactory::openInternal): ... this method. * Modules/indexeddb/IDBFactory.h: (IDBFactory): * Modules/indexeddb/IDBFactory.idl: Drop "unsigned" qualifier; meaningless to binding code right now, can be re-added once webkit.org/b/96798 lands. 2012-10-17 Tony Chang fast/forms/range/input-appearance-range-rtl.html off by one pixel https://bugs.webkit.org/show_bug.cgi?id=99625 Reviewed by Ojan Vafai. Previously, we would assume that a vertical slider in RTL would render identically to a vertical slider in LTR. Due to differing thumb sizes, there is an off by one. This worked in deprecated flexbox because it doesn't adjust for RTL when applying box-align: center. Tests: fast/forms/range/input-appearance-range-rtl.html * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderContainer::layout): Force LTR for flexbox layout when vertical. We have to restore the old value just in case the user switches from vertical to horizontal. 2012-10-17 Michael Saboff Creating a String from an NSString should check for all 8 bit strings https://bugs.webkit.org/show_bug.cgi?id=99392 Reviewed by Geoffrey Garen. Use CFStringGetBytes() to try to get Latin1 data to create an 8 bit string. No functional change, change covered by existing tests. * platform/text/mac/StringMac.mm: (WTF::String::String): 2012-10-17 Raphael Kubo da Costa [EFL] Remove redundant OpenGL library addition from the build system. https://bugs.webkit.org/show_bug.cgi?id=99629 Reviewed by Rob Buis. * PlatformEfl.cmake: Do not add OPENGL_gl_LIBRARY to WebCore_LIBRARIES, this is already done in CMakeLists.txt these days. 2012-10-17 Raphael Kubo da Costa [CMake] Set WebCore_LIBRARIES earlier. https://bugs.webkit.org/show_bug.cgi?id=99630 Reviewed by Rob Buis. * CMakeLists.txt: Follow the style we use in other CMakeList.txt files and set the Foo_LIBRARIES variables before we start checking for optional features, as they might append other libraries to the list (it already happens with WTF_USE_3D_GRAPHICS, for example). 2012-10-17 Philip Rogers Allow lazy initialization of SVG XML animated properties. https://bugs.webkit.org/show_bug.cgi?id=84657 Reviewed by Tim Horton. When animating a property in the shadow tree, instance properties and tearoffs are created but they simply reference the animated element's animating properties. When starting an animation for the first time (see SVGAnimateElement::resetAnimatedType), we initialize the root property and instance properties using startAnimValAnimation(...). If an instance property is added while the root property is animating, this initialization will not occur and we crash. This patch updates the resetAnimValToBaseVal codepath to start (and initialize) an animated property if it is not already animating. After this patch, instance properties can be added in the middle of animation and they will be properly started/initialized. Test: svg/animations/use-while-animating-crash.html * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue): (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues): (WebCore::SVGAnimatedTypeAnimator::executeAction): 2012-10-17 Dan Carney Bind isolatedWorldSecurityOrigin to world https://bugs.webkit.org/show_bug.cgi?id=99582 Reviewed by Adam Barth. Security origin of isolated worlds was not previously set at the world level, although it could have been. No new tests. No change in functionality. * bindings/v8/DOMWrapperWorld.cpp: (WebCore::DOMWrapperWorld::deallocate): (WebCore): (WebCore::isolatedWorldSecurityOrigins): (WebCore::DOMWrapperWorld::isolatedWorldSecurityOrigin): (WebCore::DOMWrapperWorld::setIsolatedWorldSecurityOrigin): (WebCore::DOMWrapperWorld::clearIsolatedWorldSecurityOrigin): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::isIsolatedWorldId): (WebCore::DOMWrapperWorld::isIsolatedWorld): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::resetIsolatedWorlds): (WebCore::ScriptController::evaluateInIsolatedWorld): (WebCore::ScriptController::collectIsolatedContexts): * bindings/v8/ScriptController.h: (ScriptController): (WebCore::ScriptController::setIsolatedWorldSecurityOrigin): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): * bindings/v8/V8DOMWindowShell.h: (V8DOMWindowShell): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-10-17 Simon Fraser GraphicsLayer visible rect computation needs to use the current animating transform https://bugs.webkit.org/show_bug.cgi?id=99529 Reviewed by Dean Jackson. If we're running an accelerated animation of transform on a GraphicsLayerCA, the current value of the transform won't be reflected in the GraphicsLayer's m_transform. However, we need the current value of the transform in order to correctly compute the visible rect of this layer and descendants. Add a function to GraphicsLayerClient to retrieve the current value of the transform from the client. RenderLayer's currentTransform() used to return a transform with transform-origin baked in; GraphicsLayerClient needs one that excludes transform-origin, so enhance RenderLayer::currentTransform() to be able to produce either. Tests: compositing/visible-rect/animated-from-none.html compositing/visible-rect/animated.html * platform/graphics/GraphicsLayerClient.h: (WebCore): (GraphicsLayerClient): (WebCore::GraphicsLayerClient::getCurrentTransform): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::computeVisibleRect): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::currentTransform): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::currentTransform): * rendering/RenderLayerBacking.h: (RenderLayerBacking): 2012-10-17 Sadrul Habib Chowdhury plugins: Allow a plugin to dictate whether it can receive drag events or not. https://bugs.webkit.org/show_bug.cgi?id=99355 Reviewed by Tony Chang. When doing a drag over a plugin, ask the plugin whether it can accept drag/drop to decide whether drag/drop is possible or not. At present, plugins do not receive drag events through WebCore (i.e. various implementations of PluginView::handleMouseEvent ignores the drop-events). This change makes it possible for the ports to ask the plugin first to decide whether it can (or wants to) accept drag events. The default implementation remains the same, i.e. plugins do not receive drag events. For chromium, the overridden implementation uses the WebPlugin interface to check whether the plugin can accept drag events. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::canProcessDrag): (WebCore): * html/HTMLPlugInElement.h: (WebCore): (HTMLPlugInElement): * page/DragController.cpp: (WebCore::DragController::canProcessDrag): * plugins/PluginViewBase.h: (WebCore): (WebCore::PluginViewBase::canProcessDrag): 2012-10-17 Andreas Kling Shrink EventTargetData by making firingEventListeners vector optional. Reviewed by Anders Carlsson. The majority of event listeners never actually fire, and EventTargetData::firingEventListeners is just sitting there taking up space. Make it an OwnPtr instead, shrinking EventTargetData by 48 bytes and progressing Membuster3 by 395kB. * dom/EventTarget.cpp: (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::fireEventListeners): (WebCore::EventTarget::removeAllEventListeners): * dom/EventTarget.h: (WebCore::EventTarget::isFiringEventListeners): 2012-10-17 Christophe Dumez xss-DENIED-xsl-document-securityOrigin.xml crashes with icon assertion https://bugs.webkit.org/show_bug.cgi?id=99571 Reviewed by Kenneth Rohde Christiansen. Check that the iconURL is not empty in IconController::continueLoadWithDecision() to avoid hitting assertions later when trying to commit this empty URL to the database. IconController::url() may indeed return an empty URL but there was no check for it. No new tests, already covered by http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml. * loader/icon/IconController.cpp: (WebCore::IconController::continueLoadWithDecision): 2012-10-17 Byungwoo Lee Fix build warnings : -Wunused-parameter, -Wunused-variable https://bugs.webkit.org/show_bug.cgi?id=99539 Reviewed by Kentaro Hara. Fix build warnings about unused parameter or unused variable when WTF_USE_TILED_BACKING_STORE option is enabled. * html/shadow/HTMLContentElement.cpp: (WebCore::contentTagName): * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::getImageData): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::createSurface): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::bindVertexArrayOES): * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::canReuseWith): (WebCore::TextureMapper::beginPainting): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawRepaintCounter): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): * platform/graphics/texmap/TextureMapperImageBuffer.h: * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::sortByZOrder): (WebCore::TextureMapperLayer::flushCompositingStateSelf): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): 2012-10-17 Shinya Kawanaka Dynamically added elements do not get re-projected. https://bugs.webkit.org/show_bug.cgi?id=99227 Reviewed by Dimitri Glazkov. When distribution happens, we have to invalidate its host shadow's distribution, since the children of the host is changed. Test: fast/dom/shadow/content-reprojection-dynamic.html * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::distribute): 2012-10-17 Yury Semikhatsky Web Inspector: no "delete watch expression" context menu item when clicking on the expression value https://bugs.webkit.org/show_bug.cgi?id=99602 Reviewed by Pavel Feldman. Add delete items to the watch expression's value's context menu. * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuFired): (WebInspector.ObjectPropertyTreeElement.prototype.populateContextMenu): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionTreeElement.prototype.populateContextMenu): (WebInspector.WatchExpressionTreeElement.prototype._contextMenu): 2012-10-17 Vsevolod Vlasov Web Inspector: [Regression] Undoing script changes does not restore breakpoints. https://bugs.webkit.org/show_bug.cgi?id=99598 Reviewed by Pavel Feldman. workingCopyChanged now dispatches did/willMergeToVM instead of did/willDivergeFromVM when change returns uiSourceCode to non dirty state. Added wasDirty parameter to workingCopyChanged event. Test: inspector/debugger/live-edit-breakpoints.html * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted): (WebInspector.ResourceScriptFile.prototype._workingCopyChanged): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.setWorkingCopy): 2012-10-17 Simon Hausmann [Qt] Avoid re-creating CSSGrammar.cpp with each (incremental) build Reviewed by Tor Arne Vestbø. The expected output is CSSGrammar.cpp and the input file used to be CSSGrammar.y, so ${QMAKE_FILE_BASE}.cpp did the correct transformation. Recently the input has changed to CSSGrammar.y.in, in which case the ${QMAKE_FILE_BASE} is CSSGrammar.y unfortunately. The resulting target CSSGrammar.y.cpp will never be created and therefore the target will always run. * DerivedSources.pri: 2012-10-17 Ilya Tikhonovsky Unreviewed fix for ImageSourceCG. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::reportMemoryUsage): 2012-10-17 Ilya Tikhonovsky Unreviewed fix for compilation on CG bots. * platform/graphics/cg/ImageSourceCG.cpp: 2012-10-16 Ilya Tikhonovsky Web Inspector: NMI instrument ImageDecoder. It owns a buffer that could be quite big. https://bugs.webkit.org/show_bug.cgi?id=99540 Reviewed by Yury Semikhatsky. * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::reportMemoryUsage): (WebCore): * platform/graphics/ImageSource.h: (ImageSource): * platform/image-decoders/ImageDecoder.cpp: (WebCore::ImageFrame::reportMemoryUsage): (WebCore): (WebCore::ImageDecoder::reportMemoryUsage): * platform/image-decoders/ImageDecoder.h: (ImageFrame): (ImageDecoder): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::reportMemoryUsage): (WebCore): 2012-10-17 Zeno Albisser [Qt] Fix build on Mac OSX 10.6 and earlier. https://bugs.webkit.org/show_bug.cgi?id=99595 Reviewed by Simon Hausmann. * Target.pri: 2012-10-17 Pavel Feldman Web Inspector: display "disconnected" message when remote debugging terminates https://bugs.webkit.org/show_bug.cgi?id=99316 Reviewed by Yury Semikhatsky. Otherwise, it is not clear that the front-end is no longer functional. * inspector/front-end/InspectorFrontendHostStub.js: (WebInspector.RemoteDebuggingTerminatedScreen): * inspector/front-end/inspector.js: (WebInspector.loaded.WebInspector.socket.onclose): (WebInspector.loaded): 2012-10-17 Yury Semikhatsky Web Inspector: delete watch expression button overlaps with the expression value https://bugs.webkit.org/show_bug.cgi?id=99569 Reviewed by Vsevolod Vlasov. Delete watch expression button now doesn't overlap with the watch expression. * inspector/front-end/inspector.css: (.properties-tree.watch-expressions > li > .value): 2012-10-17 Luke Macpherson Move handling of CSSPropertyPointerEvents from StyleResolver into StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=99536 Reviewed by Alexis Menard. One small step towards removing the giant switch statement in StyleResolver, this patch moves pointer event property into StyleBuilder. Covered by fast/events/pointer-events.html and fast/events/pointer-events-2.html. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): 2012-10-17 Keishi Hattori Localized date should be based on LDML https://bugs.webkit.org/show_bug.cgi?id=99570 Reviewed by Kent Tamura. Localized date should be based on LDML to match the format inside DateTimeEditElement. No new tests. Covered by LocaleMacTest.formatDate and LocaleWinTest.formatDate. * platform/text/LocaleICU.cpp: Removed formatDateTime. * platform/text/LocaleICU.h: (LocaleICU): * platform/text/LocaleNone.cpp: Removed formatDateTime. (LocaleNone): * platform/text/LocaleWin.cpp: Removed formatDateTime and formatDate. (WebCore): * platform/text/LocaleWin.h: (LocaleWin): * platform/text/Localizer.cpp: (WebCore::DateTimeStringBuilder::visitField): Added support for year/month/day. (WebCore::Localizer::formatDateTime): Creates the formatted string based on the format from dateFormat(). * platform/text/Localizer.h: * platform/text/mac/LocaleMac.h: (LocaleMac): * platform/text/mac/LocaleMac.mm: Removed formatDateTime. 2012-10-17 Harald Alvestrand Implement the Selector argument to RTCPeerConnection.getStats https://bugs.webkit.org/show_bug.cgi?id=99460 Reviewed by Adam Barth. The change adds two new parameters to the RTCStatsRequest object: stream and component. Together these are enough to identify a MediaStreamTrack. Test: fast/mediastream/RTCPeerConnection-statsSelector.html * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::streamDescriptor): (WebCore): * Modules/mediastream/MediaStreamTrack.h: * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::getStats): * Modules/mediastream/RTCStatsRequestImpl.cpp: (WebCore::RTCStatsRequestImpl::create): (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): (WebCore::RTCStatsRequestImpl::hasSelector): (WebCore): (WebCore::RTCStatsRequestImpl::stream): (WebCore::RTCStatsRequestImpl::component): * Modules/mediastream/RTCStatsRequestImpl.h: (RTCStatsRequestImpl): * platform/chromium/support/WebRTCStatsRequest.cpp: (WebKit): (WebKit::WebRTCStatsRequest::hasSelector): (WebKit::WebRTCStatsRequest::stream): (WebKit::WebRTCStatsRequest::component): * platform/mediastream/RTCStatsRequest.h: (WebCore): (RTCStatsRequest): 2012-10-17 Simon Hausmann [Qt] Enable use of more AllInOne files https://bugs.webkit.org/show_bug.cgi?id=99579 Reviewed by Tor Arne Vestbø. The AllInOne files reduce pressure during final link time because the object files contain less duplicated symbols. * Target.pri: Add HTMLElementsAllInOne, EditingAllInOne and RenderingAllInOne to the build * editing/EditingAllInOne.cpp: Place a #if USE(CF) around the inclusion of SmartReplaceCF.cpp * html/HTMLElementsAllInOne.cpp: Move HTMLPlugInElement.cpp to the top to fix builds on X11 based platforms where the X headers get confused by the "Region" type that's also declared in WebCore. * rendering/RenderingAllInOne.cpp: Fix build on case-sensitive file systems (Plugin -> PlugIn) and added a #if PLATFORM(WIN) around the inclusion of RenderThemeWin.cpp. 2012-10-17 Kent Tamura REGRESSION(r131421): Text baseline becomes incorrect after re-layout of input[type=time] https://bugs.webkit.org/show_bug.cgi?id=99572 Reviewed by Kentaro Hara. We use flexible box since r131421, and it seems text baseline becomes incorrect if there are text nodes in a flex container. Test: fast/forms/time-multiple-fields/time-multiple-fields-static-relayout.html * css/html.css: (input::-webkit-datetime-edit-text): Added. * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditBuilder::visitLiteral): Wrap text with an element with ::-webkit-datetime-edit-text. 2012-10-17 Grzegorz Czajkowski , Michal Roj [WK2][EFL] Implementation of spellchecking feature. https://bugs.webkit.org/show_bug.cgi?id=91854 Reviewed by Gyuyoung Kim. * PlatformEfl.cmake: Add enchant-related compiler flags: header paths and the library flag. 2012-10-17 Alexander Pavlov Web Inspector: Avoid style updates when retrieving the inline stylesheet text https://bugs.webkit.org/show_bug.cgi?id=99576 Reviewed by Vsevolod Vlasov. Avoid using innerText() to retrieve inline stylesheet text, which may result in style and layout updates. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::inlineStyleSheetText): 2012-10-17 Patrick Gansterer Build fix for WinCE after r131365. * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBufferAdvance::width): * platform/graphics/wince/FontWinCE.cpp: (WebCore::cursorToX): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::drawText): 2012-10-17 Mike West V8 should throw a more descriptive exception when blocking 'eval' via CSP. https://bugs.webkit.org/show_bug.cgi?id=94332 Reviewed by Adam Barth. Following up on https://bugs.webkit.org/show_bug.cgi?id=94331, this patch wires up the new error message mechanism to V8, and updates the Chromium test expectations accordingly. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::disableEval): Pass 'errorMessage' through to V8. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): Grab the error message from ContentSecurityPolicy, and pass it through to V8. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::evaluate): (WebCore::WorkerContextExecutionProxy::setEvalAllowed): * bindings/v8/WorkerContextExecutionProxy.h: (WorkerContextExecutionProxy): Convert 'm_disableEvalPending' to a string to store the current error message, and use it to set the eval state. * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): Pass 'errorMessage' through to V8. 2012-10-17 MORITA Hajime Assertion failed on HTMLFormControlElement.cpp: updateFromElementCallback() https://bugs.webkit.org/show_bug.cgi?id=99566 Reviewed by Kent Tamura. It had a too optimistic assertion. This change removes it. Test: fast/forms/textarea/textarea-autofocus-removal-while-focusing.html * html/HTMLFormControlElement.cpp: (WebCore::updateFromElementCallback): 2012-10-17 Vsevolod Vlasov Web Inspector: When dirty uiSourceCode is saved to disk from scripts navigator context menu working copy is not committed. https://bugs.webkit.org/show_bug.cgi?id=99555 Reviewed by Yury Semikhatsky. Save As context menu handler now commits working copy for dirty UISourceCodes. * inspector/front-end/HandlerRegistry.js: 2012-10-17 Vsevolod Vlasov Web Inspector: Stylesheets saved with FileManager are not saved to disk when edited from Elements panel. https://bugs.webkit.org/show_bug.cgi?id=99554 Reviewed by Yury Semikhatsky. Moved saving to disk from SourceFrame to UISourceCode. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._commitEditing): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._commitContent): 2012-10-17 Vsevolod Vlasov Web Inspector: [Regression] SASS sources are not saved to disk. https://bugs.webkit.org/show_bug.cgi?id=99551 Reviewed by Yury Semikhatsky. Added resource null checks. * inspector/front-end/StylesSourceMapping.js: (WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace): 2012-10-17 Elliott Sprehn Clean up ContentData operator overloads https://bugs.webkit.org/show_bug.cgi?id=99556 Reviewed by Eric Seidel. Use virtual dispatch for checking ContentData equality instead of a switch over the type. This the first step in getting rid of the StyleContentType enum and all the switch statements over the type(). No tests needed, this is just a refactor. * rendering/style/ContentData.cpp: * rendering/style/ContentData.h: (ContentData): (WebCore::operator==): (WebCore): (WebCore::operator!=): 2012-10-17 Gabor Rapcsanyi NEON intrinsics Gauss filter does not work properly https://bugs.webkit.org/show_bug.cgi?id=98875 Reviewed by Zoltan Herczeg. Fixing the NEON intrinsics Gauss filter. The stride parameter was missing from the intrinsics algorithm. Tested with pixel checks, now it's working properly. * platform/graphics/filters/arm/FEGaussianBlurNEON.h: (WebCore::boxBlurNEON): 2012-10-17 MORITA Hajime Crash on Frame::inScope() part 2 https://bugs.webkit.org/show_bug.cgi?id=99543 Reviewed by Kent Tamura. FrameTree::scopedChildCount() can be called even when the one of child frames is in orphan state. This change added a guard for that case. No new tests. A hard-to-test timing issue. * page/Frame.cpp: (WebCore::Frame::inScope): 2012-10-17 Shinya Kawanaka Remove shadowAncestorNode() from VisibleSelection https://bugs.webkit.org/show_bug.cgi?id=99544 Reviewed by Hajime Morita. An effort to replace shadowAncestorNode() with shadowHost(), since shadowAncestorNode() is now deprecated. No new tests, no change in behavior. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries): Since shadowHost() returns 0 if an element is not in shadowRoot, it's ok to compare shadowAncestor to 0. 2012-10-17 Douglas Stockwell Content of replaced elements should be trimmed to the content edge curve. https://bugs.webkit.org/show_bug.cgi?id=63899 Reviewed by Simon Fraser. When a border-radius is specified the content of replaced elements needs to be clipped to avoid being painted over the padding or border in the corners. Previously the clip that was applied was set to the border-edge curve, this patch contracts the clip by the size of the border and padding (the content-edge curve) to match the css3 spec. Spec: http://www.w3.org/TR/css3-background/#corner-clipping Test: fast/replaced/border-radius-clip-content-edge.html * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): 2012-10-17 Kunihiko Sakamoto The HTML5 formtarget/formaction/formenctyp/formmethod/formnovalidate attributes don't work in button tags with nested elements https://bugs.webkit.org/show_bug.cgi?id=90539 Reviewed by Kent Tamura. Fix a bug where form(action|enctype|method|target) attributes of