2013-03-19 Mario Sanchez Prada [GTK] Wrong guard USE(GLX) in RedirectedXCompositeWindow https://bugs.webkit.org/show_bug.cgi?id=112600 Reviewed by Martin Robinson. Replace USE(GLX) condition with USE(OPENGL) && PLATFORM(X11). * platform/gtk/RedirectedXCompositeWindow.cpp: Updated guard. * platform/gtk/RedirectedXCompositeWindow.h: Ditto. 2013-03-19 Mihnea Ovidenie [CSSRegions] Crash reflowing content in variable width regions https://bugs.webkit.org/show_bug.cgi?id=112515 Reviewed by David Hyatt. When removing floats during relayout of a line in a paginated context, we have to make sure that the floats collection actually has elements before accessing the last float from the collection. This situation arises when a block had floats in a previous layout and after they were removed, m_floatingObjects is not destroyed, only emptied. Test: fast/regions/crash-reflow-inline-content-in-variable-width-regions.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeFloatingObjectsBelow): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::layoutRunsAndFloatsInRange): 2013-03-18 Vsevolod Vlasov Web Inspector: Debugger scripts should visually differ from network/filesystem files in workspace. https://bugs.webkit.org/show_bug.cgi?id=112552 Reviewed by Pavel Feldman. Extracted ContentProviderBasedProjectDelegate from SimpleProjectDelegate. Implemented DebuggerProjectDelegate for DefaultScriptMapping. Debugger scripts are now added to workspace with a name starting with [VM] and ending with scriptId. Added yellow background to debugger scripts editor. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ContentProviderBasedProjectDelegate.js: Added. * inspector/front-end/DefaultScriptMapping.js: (WebInspector.DefaultScriptMapping): (WebInspector.DefaultScriptMapping.prototype.addScript): (WebInspector.DefaultScriptMapping.prototype._debuggerReset): (WebInspector.DebuggerProjectDelegate): (WebInspector.DebuggerProjectDelegate.prototype.id): (WebInspector.DebuggerProjectDelegate.prototype.type): (WebInspector.DebuggerProjectDelegate.prototype.displayName): (WebInspector.DebuggerProjectDelegate.prototype.addScript): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): * inspector/front-end/ParsedURL.js: (WebInspector.ParsedURL.splitURL): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleProjectDelegate): (WebInspector.SimpleProjectDelegate.prototype.addFile): (WebInspector.SimpleProjectDelegate.prototype._ensureUniquePath): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL): * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: (WebInspector.Workspace.prototype.uiSourceCodeForURL): * inspector/front-end/inspector.html: * inspector/front-end/javaScriptSourceFrame.css: Added. (.source-frame-debugger-script): 2013-03-19 Andrey Lushnikov Web Inspector: [CodeMirror] add smart braces functionality https://bugs.webkit.org/show_bug.cgi?id=112138 Reviewed by Vsevolod Vlasov. No new tests. Add closebrackets add-on to codemirror which implements smart braces functionality and guard this setting with the "Text Editor smart braces" experiment. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * inspector/front-end/CodeMirrorTextEditor.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/cm/closebrackets.js: Added. (.): 2013-03-19 Andrey Lushnikov Web Inspector: Avoid forcing text editor resize https://bugs.webkit.org/show_bug.cgi?id=112581 Reviewed by Vsevolod Vlasov. No new tests. Avoid unnecessary text editor resizing by removing line decoration via removeDecoration method instead of DOM remove operation. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.clearMessages): (WebInspector.SourceFrame.prototype._setTextEditorDecorations): 2013-03-19 Andrey Lushnikov Web Inspector: [CodeMirror] fix cursor movements https://bugs.webkit.org/show_bug.cgi?id=112555 Reviewed by Vsevolod Vlasov. No new tests. - Update CodeMirror to ToT to include its improved cursor movement - Add a small keymap to force cursor stop on both line endings and line starts. * inspector/front-end/CodeMirrorTextEditor.js: (WebInspector.CodeMirrorTextEditor): (WebInspector.CodeMirrorTextEditor.FixWordMovement): (WebInspector.CodeMirrorTextEditor.FixWordMovement.moveRight): * inspector/front-end/cm/codemirror.css: (.CodeMirror div.CodeMirror-cursor): (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor): (.CodeMirror): * inspector/front-end/cm/codemirror.js: (window.CodeMirror): (window.CodeMirror.): 2013-03-19 Adam Barth [chromium] Regression(143825): select elements don't open when there is a marquee on the page https://bugs.webkit.org/show_bug.cgi?id=111278 Unreviewed. This patch is a rollout of http://trac.webkit.org/changeset/143825. The original patch caused a regression in the Chromium port. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): 2013-03-19 Alexander Pavlov Web Inspector: [Styles] Matching @host rule children are not displayed https://bugs.webkit.org/show_bug.cgi?id=112664 Reviewed by Vsevolod Vlasov. Process host rules' contents akin to media rules' when handling the CSS model and source data. Test: platform/chromium/inspector/styles/host-rules.html * inspector/InspectorStyleSheet.cpp: (flattenSourceData): (WebCore::asCSSRuleList): 2013-03-18 Alexander Pavlov Web Inspector: [Styles] The "inherit" property value should be suggested for all properties https://bugs.webkit.org/show_bug.cgi?id=112662 Reviewed by Vsevolod Vlasov. * inspector/front-end/CSSMetadata.js: (WebInspector.CSSMetadata.keywordsForProperty): 2013-03-18 David Kilzer BUILD FIX (r146088): ResourceRequest::cfURLRequest() is defined twice on iOS * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::cfURLRequest): Move method into !USE(CFNETWORK) section since it's also defined in cf/ResourceRequestCFNet.cpp on iOS. 2013-03-18 Alpha Lam [chromium] More tracing in deferred image decoding https://bugs.webkit.org/show_bug.cgi?id=112648 Reviewed by James Robinson. Adding more trace events for a couple things in deferred image decoding path: - Time span for each lock pixels of SkPixelRef. - Time spent on decoding, scaling and pruning. Also the stack trace for these events. - Memory usage and number of cached entries. - Number of decode & scale operations done per image. No test as this just add tracing information and no behavior change. * platform/graphics/chromium/ImageDecodingStore.cpp: (WebCore::ImageDecodingStore::prune): (WebCore::ImageDecodingStore::insertCacheInternal): (WebCore::ImageDecodingStore::removeFromCacheInternal): * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::ImageFrameGenerator): (WebCore::ImageFrameGenerator::decodeAndScale): (WebCore::ImageFrameGenerator::tryToScale): (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale): (WebCore::ImageFrameGenerator::tryToDecodeAndScale): (WebCore::ImageFrameGenerator::decode): * platform/graphics/chromium/ImageFrameGenerator.h: (ImageFrameGenerator): * platform/graphics/chromium/LazyDecodingPixelRef.cpp: (WebCore::LazyDecodingPixelRef::onLockPixels): (WebCore::LazyDecodingPixelRef::onUnlockPixels): (WebCore::LazyDecodingPixelRef::PrepareToDecode): 2013-03-18 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests after r146161. * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::setJSTestObjEnumAttr): (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): 2013-03-18 Robert Flack [chromium] Small pixel differences in scroll bars after r145844 https://bugs.webkit.org/show_bug.cgi?id=112384 Reviewed by Kenneth Russell. Tests: fast/forms/basic-textareas-quirks.html fast/forms/basic-textareas.html fast/overflow/overflow-x-y.html fast/parser/open-comment-in-textarea.html fast/replaced/width100percent-textarea.html * platform/chromium/ScrollbarThemeChromium.cpp: (WebCore::ScrollbarThemeChromium::trackRect): 2013-03-18 Brent Fulgham [WinCairo] Unreviewed build correction. The "ImageDecoder.h" file was improperly tagged as a source file to build, causing a build failure on initial build attempts. Subsequent or incremental builds would work. * WebCore.vcxproj/WebCore.vcxproj: Exclude CG-specific font files. Switch 'ImageDecoder.h' to proper source file type. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. 2013-03-18 James Robinson [chromium] Remove unused type WebTransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=112634 Reviewed by Adam Barth. * WebCore.gypi: * platform/chromium/support/WebTransformationMatrix.cpp: Removed. 2013-03-18 Arnaud Renevier Add IDL 'enum' support to CodeGeneratorJS.pm https://bugs.webkit.org/show_bug.cgi?id=112475 Reviewed by Kentaro Hara. This adds support for enumerations in JS, adding validation checking to setters. It also does validation checking to methods, and a new method methodWithEnumArg in TestObj.idl Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): (GenerateParametersCheck): (NativeToJSValue): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::methodWithEnumArg): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_method_with_enum_arg): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjEnumAttr): (WebCore::setJSTestObjEnumAttr): (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj methodWithEnumArg:]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::methodWithEnumArgMethod): (TestObjV8Internal): (WebCore::TestObjV8Internal::methodWithEnumArgMethodCallback): (WebCore::ConfigureV8TestObjTemplate): 2013-03-18 Sam Weinig Need a bundle SPI to generate a snapshot of a specific DOM node (like [DOMNode renderedImage]) https://bugs.webkit.org/show_bug.cgi?id=110034 Reviewed by Tim Horton. * WebCore.exp.in: Add some necessary exports. 2013-03-18 Brent Fulgham [WinCairo] Build WebCore under VS2010 https://bugs.webkit.org/show_bug.cgi?id=112637 Reviewed by Tim Horton. * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Extend project with WinCairo-specific build targets. * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props: Added. * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props: Added. * WebCore.vcxproj/WebCore.vcxproj: Update to build WinCairo version of code. * WebCore.vcxproj/WebCoreCURL.props: Added. * WebCore.vcxproj/WebCoreCairo.props: Added. * WebCore.vcxproj/WebCoreDebugWinCairo.props: Added. * WebCore.vcxproj/WebCoreGenerated.vcxproj: * WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props: Added. * WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props: Added. * WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Added. * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: Added. * WebCore.vcxproj/WebCoreReleaseWinCairo.props: Added. * WebCore.vcxproj/WebCoreTestSupport.vcxproj: * WebCorePrefix.h: Update header to not include Apple-specific headers during WinCairo build. 2013-03-18 Joshua Bell IDB Cursor continue moves one item at a time https://bugs.webkit.org/show_bug.cgi?id=109972 Reviewed by Tony Chang. IndexedDB: Use seek on the underlying levelDB iterator to implement the continue operation on a cursor, instead of advancing one item at a time. On a simple test in Chrome - open a key cursor on an index w/ 100 items, then do continue(50), rinse and repeat - this cuts the time 50% (850c/s to 1700c/s). (Original patch c/o Pankaj Kakkar ) Covered by existing storage/indexeddb cursor tests; just a performance optimization. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::IDBBackingStore::Cursor::continueFunction): Special case first iteration w/ key to use leveldb seek (forward cursors only, since reverse seek isn't exposed). (WebCore::ObjectStoreKeyCursorImpl::encodeKey): Helper for encoding key to seek to. (WebCore::ObjectStoreCursorImpl::encodeKey): Ditto. (WebCore::IndexKeyCursorImpl::encodeKey): Ditto. (WebCore::IndexCursorImpl::encodeKey): Ditto. (WebCore::objectStoreCursorOptions): Store IDs for encodeKey() to use. (WebCore::indexCursorOptions): Ditto. * Modules/indexeddb/IDBBackingStore.h: (CursorOptions): Storage for IDs. (Cursor): Add encodeKey() to interface. 2013-03-18 Alexey Proskuryakov MessagePortChannel::EventData should not be exposed https://bugs.webkit.org/show_bug.cgi?id=112635 Reviewed by Geoff Garen. MessagePortChannel::EventData is an implementation detail that's only needed to store events in MessageQueue. Other existing code already gets away without it, just passing message and ports separately. * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::dispatchMessages): * dom/MessagePortChannel.cpp: * dom/MessagePortChannel.h: * dom/default/PlatformMessagePortChannel.cpp: (WebCore::PlatformMessagePortChannel::EventData::create): (WebCore::PlatformMessagePortChannel::EventData::EventData): (WebCore::MessagePortChannel::postMessageToRemote): (WebCore::MessagePortChannel::tryGetMessageFromRemote): * dom/default/PlatformMessagePortChannel.h: (WebCore::PlatformMessagePortChannel::EventData::message): (WebCore::PlatformMessagePortChannel::EventData::channels): (PlatformMessagePortChannel): (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage): (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty): * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: (WebCore::MessagePortChannel::postMessageToRemote): (WebCore::MessagePortChannel::tryGetMessageFromRemote): (WebCore::PlatformMessagePortChannel::postMessageToRemote): (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): * dom/default/chromium/PlatformMessagePortChannelChromium.h: 2013-03-18 Tom Sepez [v8] Suppress binding integrity check of HTMLContentElement. https://bugs.webkit.org/show_bug.cgi?id=112613 Reviewed by Adam Barth. Patch is correct so long as fast/dom/shadow/content-element-user-agent-shadow.html continues to pass. * html/shadow/HTMLContentElement.idl: 2013-03-18 Dominic Mazzoni Support Windows HTMLSelectElement keystrokes on Chromium win https://bugs.webkit.org/show_bug.cgi?id=112460 Reviewed by Kent Tamura. Compile in the windows-specific variant of HTMLSelectElement::platformHandleKeydownEvent on Chromium win, in addition to PLATFORM(WIN). * WebCore.gypi: Add html/HTMLSelectElementWin.cpp. * html/HTMLSelectElement.cpp: Don't compile generic platformHandleKeydownEvent on Chromium win. * html/HTMLSelectElementWin.cpp: Only compile platformHandleKeydownEvent on Windows. Fix compile error in assertion. (WebCore): 2013-03-18 Mike West CSP 1.1: Schemeless source expressions match HTTPS resources on HTTP sites. https://bugs.webkit.org/show_bug.cgi?id=112573 Reviewed by Adam Barth. Currently, the directive 'script-src example.com' would match only scripts served from 'http://example.com' when served on an HTTP site, and only scripts served from 'https://example.com' when served on an HTTPS site. This patch changes the matching behavior for ports that have enabled CSP_NEXT in order to encourage use of HTTPS resources by allow schemeless source expressions to match HTTPS origins when on HTTP sites. Thread: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0013.html Spec change: https://dvcs.w3.org/hg/content-security-policy/rev/a7dc8820946e Test: http/tests/security/contentSecurityPolicy/source-list-parsing-10.html * page/ContentSecurityPolicy.cpp: (WebCore::CSPSource::CSPSource): Pass the current policy into CSPSource so that we can check the protected resource's scheme inside schemeMatches, rather than overwriting the source expression's scheme before creating the CSPSource. (WebCore::CSPSource::schemeMatches): If CSP_NEXT is enabled, ensure that HTTPS resources match the HTTP scheme when loaded on HTTP pages with schemaless source expressions. (WebCore::CSPSource::portMatches): Check the port against the URL's scheme: if m_scheme isn't empty, this will match it. If m_scheme is empty, we can't do a strict match against it, nor can we do a strict match against the protected resource's port. Checking the URL's port against the default port for its scheme solves this problem elegantly. (WebCore::CSPSourceList::parse): (WebCore::CSPSourceList::addSourceSelf): Pass in the policy when creating a CSPSource object. 2013-03-15 Jer Noble Text track cues do not update sizes when entering or exiting full screen. https://bugs.webkit.org/show_bug.cgi?id=112472 Reviewed by Eric Carlson. The style properties of the TextCueBoxes were not being updated after the size of the video bounds changed. Because getDisplayTree() will not do it when the cue itself has not changed, explicitly call videoSizeDidChange() from updateSizes(). * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateSizes): call videoSizeDidChange() on every active cue. * html/track/TextTrackCue.h: (WebCore::TextTrackCue::hasDisplayTree): returns whether or not the cue has created a display tree without side effects. (WebCore::TextTrackCue::videoSizeDidChange): Overridable empty method. * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::videoSizeDidChange): Update the CSS height attribute of the cue box using the new video size. * html/track/TextTrackCueGeneric.h: 2013-03-18 Mike West CSP 1.1: Add 'effective-directive' to violation reports. https://bugs.webkit.org/show_bug.cgi?id=112568 Reviewed by Adam Barth. https://dvcs.w3.org/hg/content-security-policy/rev/bc2bb0e5072a introduced an 'effective-directive' field on CSP violation reports, which allows developers to distinguish between resource types when 'default-src' is the violated directive. This patch implements the new field behind the CSP_NEXT flag. Test: http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.html * page/ContentSecurityPolicy.cpp: (WebCore::CSPDirectiveList::checkSourceAndReportViolation): (WebCore::CSPDirectiveList::reportViolation): These methods now accept an additional parameter to pipe the effective directive from the initial callsite down into ContentSecurityPolicy::reportViolation. (WebCore::CSPDirectiveList::checkEvalAndReportViolation): (WebCore::CSPDirectiveList::checkNonceAndReportViolation): (WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation): (WebCore::CSPDirectiveList::checkInlineAndReportViolation): (WebCore::CSPDirectiveList::allowScriptFromSource): (WebCore::CSPDirectiveList::allowObjectFromSource): (WebCore::CSPDirectiveList::allowChildFrameFromSource): (WebCore::CSPDirectiveList::allowImageFromSource): (WebCore::CSPDirectiveList::allowStyleFromSource): (WebCore::CSPDirectiveList::allowFontFromSource): (WebCore::CSPDirectiveList::allowMediaFromSource): (WebCore::CSPDirectiveList::allowConnectToSource): (WebCore::CSPDirectiveList::allowFormAction): These methods now pass the effective directive name down into checkSourceAndReportViolation or reportViolation. (WebCore::ContentSecurityPolicy::reportViolation): * page/ContentSecurityPolicy.h: This method now accepts a new parameter that carries the effective directive name. If CSP_NEXT is enabled, the field is added to the violation report before it's sent out into the world. 2013-03-18 W. James MacLean [chromium] Remove NCCH code that relies on boundsContainsPageScale(). https://bugs.webkit.org/show_bug.cgi?id=112465 Reviewed by James Robinson. The boundsContainsPageScale() API is going away, remove code that depends on it. Uses existing tests as no behaviour change. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setAppliesPageScale): (WebCore::GraphicsLayerChromium::appliesPageScale): 2013-03-18 Alec Flett IndexedDB: Protect against key prefix overflows https://bugs.webkit.org/show_bug.cgi?id=111138 Reviewed by Tony Chang. This reworks the boundary checking for all databaseId, objectStoreId, and indexId, including negative and zero-based ids. All entrypoints into IDBLevelDBCoding are protected with explicit checks and all internal uses of KeyPrefix are protected with ASSERTs in the various constructors. Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors. * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId. 2013-03-18 Roger Fong AppleWin VS2010 Debug configuration build fix. * WebCore.vcxproj/WebCore.vcxproj: 2013-03-18 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=112627 MessagePort::disentangle() takes an ExceptionCode argument without any need Reviewed by Geoffrey Garen. MessagePort::disentangle() is called in two places. One has ASSERT_NO_EXCEPTION, and another fails to check the exception, but clearly cannot get one. This function is also not exposed to bindings. * dom/MessagePort.cpp: (WebCore::MessagePort::disentangle): (WebCore::MessagePort::disentanglePorts): * dom/MessagePort.h: * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): Also removed some unhelpful comments. 2013-03-18 Xianzhu Wang Variant of non-primary fell-back SVGFont causes crash. https://bugs.webkit.org/show_bug.cgi?id=112367 Reviewed by Stephen Chenney. Don't go to PlatformFontData path for SimpleFontData::createScaledFontData() for SVG fonts. Test: svg/css/font-face-variant-crash.html * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::~SimpleFontData): (WebCore::SimpleFontData::createScaledFontData): Don't go to PlatformFontData path for SVG fonts. (WebCore): * platform/graphics/SimpleFontData.h: (SimpleFontData): Added createScaledFontData and renamed the original createScaledFontData to platformCreateScaledFontData. BTW, Removed unreferenced commonInit. * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Renamed from createScaledFontData. * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/skia/SimpleFontDataSkia.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/wince/SimpleFontDataWinCE.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformCreateScaledFontData): Ditto. 2013-03-18 Victor Carbune Determine text direction for rendering a TextTrackCue https://bugs.webkit.org/show_bug.cgi?id=79749 Reviewed by Levi Weintraub. The rendering rules for WebVTT cues are slightly different depending on the directionality determined from the characters of the cue text. This patch implements the preliminary step to be able to take directionality into account. It iterates through the cue characters and setting the CSS directionality to the one of the first strong directional character. Test: media/track/track-cue-rendering-rtl.html * html/track/TextTrackCue.cpp: (WebCore::TextTrackCueBox::applyCSSProperties): Applies the determined direction. (WebCore::TextTrackCue::TextTrackCue): Sets the default value for the display direction. (WebCore::isCueParagraphSeparator): Tests for explicit unicode characters that are paragraph separators. (WebCore): (WebCore::TextTrackCue::determineTextDirection): Determined the direction by the first strong directional character found. (WebCore::TextTrackCue::calculateDisplayParameters): Updated. (WebCore::TextTrackCue::getCSSWritingDirection): Return the determined CSS writing direction. * html/track/TextTrackCue.h: (TextTrackCue): 2013-03-18 Hans Wennborg Fix GridTrackSize::operator== https://bugs.webkit.org/show_bug.cgi?id=112501 Reviewed by Eric Seidel. There was a missing "other." in the function. This was found by experimenting with a potential new Clang warning. Test: fast/css-grid-layout/grid-dynamic-updates-relayout.html * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::operator==): 2013-03-18 Alec Flett Inspector: [Chromium] http/tests/inspector/indexeddb/database-data.html ASSERT on Win7 following r133855 https://bugs.webkit.org/show_bug.cgi?id=101618 Deactivate transactions created by the inspector, before they are reactivated by IndexedDB. This puts transactions in an identical state as when they are created by scripts. Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/indexeddb/database-data.html * inspector/InspectorIndexedDBAgent.cpp: Make transactions inactive upon leaving the inspector code. 2013-03-15 Jeffrey Pfau Allow blocking of application cache in third-party contexts https://bugs.webkit.org/show_bug.cgi?id=112288 Reviewed by Adam Barth. Return early if we can't access the application cache due to security restrictions. Tests: http/tests/security/cross-origin-appcache-allowed.html http/tests/security/cross-origin-appcache.html http/tests/security/same-origin-appcache-blocked.html * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache): (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL): * page/SecurityOrigin.h: (WebCore::SecurityOrigin::canAccessApplicationCache): 2013-03-18 Vsevolod Vlasov Web Inspector: Script should know nothing about disabled source mappings. https://bugs.webkit.org/show_bug.cgi?id=112580 Reviewed by Pavel Feldman. ResourceScriptMapping handles diverged uiSourceCodes internally now. Tested in inspector/debugger/live-edit-breakpoints.html already. * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation): (WebInspector.ResourceScriptMapping.prototype._hasMergedToVM): (WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVM): * inspector/front-end/Script.js: (WebInspector.Script.prototype.rawLocationToUILocation): 2013-03-18 Alexey Proskuryakov Update MessagePort terminology to match HTML5 https://bugs.webkit.org/show_bug.cgi?id=112611 Reviewed by Anders Carlsson. Transferable objects are "neutered" when transfered. Cloning is a different operation. * dom/MessagePort.cpp: (WebCore::MessagePort::disentanglePorts): * dom/MessagePort.h: (WebCore::MessagePort::isEntangled): (WebCore::MessagePort::isNeutered): 2013-03-18 Roger Fong AppleWin VS2010 build fix. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: 2013-03-18 Lamarque V. Souza [css3-text] Add rendering support for -webkit-text-underline-position https://bugs.webkit.org/show_bug.cgi?id=102795 Reviewed by Levi Weintraub. This patch implements rendering support for values [ auto | alphabetic | under ] of CSS3 property text-underline-position. We don't fully match the specification as we don't support [ left | right ] and this is left for another implementation as the rendering will need to be added. Tests: fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-all.html fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-alphabetic.html fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-auto.html fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-out-of-flow.html fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under.html * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::computeMaxLogicalTop): Added method to compute maximal logical top among all chidren of this InlineTextBox. * rendering/InlineFlowBox.h: (InlineFlowBox): * rendering/InlineTextBox.cpp: (WebCore::computeUnderlineOffset): Added method to compute offset for text-underline-position property. (WebCore::InlineTextBox::paintDecoration): Paint decoration at position calculated using computeUnderlineOffset(). * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::RootInlineBox): (WebCore::RootInlineBox::alignBoxesInBlockDirection): Call method to compute maximal logical top among all children of this RootInlineBox. * rendering/RootInlineBox.h: (RootInlineBox): (WebCore::RootInlineBox::maxLogicalTop): Added getter for m_maxLogicalTop class member. * rendering/style/RenderStyle.h: Added the usual getter / setter / initial methods for text-underline-position property 2013-03-18 Christian Biesinger Convert old flexbox uses in html.css to new flexbox (non- element on Android should also switch to new-flexbox https://bugs.webkit.org/show_bug.cgi?id=112559 Reviewed by Ojan Vafai. Following r145959, also update themeChromiumAndroid.css to use the new flexible box CSS properties. Covered by existing tests. * css/themeChromiumAndroid.css: (select[size][multiple]): 2013-03-18 Renata Hodovan Assertion faulire in SVGAnimatedPath. https://bugs.webkit.org/show_bug.cgi?id=106428 Reviewed by Allan Sandfeld Jensen. The asserts are too restricted. The size must be greater or equal to 1. Test: svg/animations/animated-path-via-use-debug-crash.svg * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): 2013-03-18 Simon Fraser [Mac] Some tests intermittently asserts in SharedBuffer::releasePurgeableBuffer() https://bugs.webkit.org/show_bug.cgi?id=105986 Reviewed by Brady Eidson. A ResourceBuffer's SharedBuffer can be vended out to other clients, for example Images, so there's no guarantee that when the ResourceBuffer only has one ref its SharedBuffer will also have just one. When this assumption was broken, SharedBuffer::releasePurgeableBuffer() would assert. Ideally SharedBuffer would be entirely encapsulated by ResourceBuffer to avoid this problem, but ResourceBuffer can't be used by code in platform/. Fix by having ResourceBuffer::createPurgeableBuffer() refuse to make a purgeable buffer if the sharedBuffer has more than one ref. Tested by existing tests. * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::createPurgeableBuffer): 2013-03-18 Ilya Tikhonovsky Web Inspector: move _timelineGrid && _timelineOverviewWindow from TimelineOverviewPane into a new class OverviewGrid. https://bugs.webkit.org/show_bug.cgi?id=112584 Reviewed by Pavel Feldman. It is the first path in the set. The end goal is to extract OverviewGrid with window selectors into a separate class in separate file and reuse it in CPU FlameChart. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.OverviewGrid): (WebInspector.OverviewGrid.prototype.get grid): (WebInspector.OverviewGrid.prototype.get clientWidth): (WebInspector.OverviewGrid.prototype.showItemsGraphsElement): (WebInspector.OverviewGrid.prototype.hideItemsGraphsElement): (WebInspector.OverviewGrid.prototype.updateDividers): (WebInspector.OverviewGrid.prototype.addEventDividers): (WebInspector.OverviewGrid.prototype.removeEventDividers): (WebInspector.OverviewGrid.prototype.setWindowPosition): (WebInspector.OverviewGrid.prototype.reset): (WebInspector.OverviewGrid.prototype.get windowLeft): (WebInspector.OverviewGrid.prototype.get windowRight): (WebInspector.OverviewGrid.prototype.setWindow): (WebInspector.OverviewGrid.prototype.addEventListener): (WebInspector.TimelineOverviewPane.prototype.setMode): (WebInspector.TimelineOverviewPane.prototype._setFrameMode): (WebInspector.TimelineOverviewPane.prototype._update): (WebInspector.TimelineOverviewPane.prototype.sidebarResized): (WebInspector.TimelineOverviewPane.prototype.zoomToFrame): (WebInspector.TimelineOverviewPane.prototype._reset): (WebInspector.TimelineOverviewPane.prototype.windowLeft): (WebInspector.TimelineOverviewPane.prototype.windowRight): (WebInspector.TimelineOverviewPane.prototype._updateWindow): 2013-03-18 Adam Barth [V8] Crash when accessing onclick attribute of document from XMLHttpRequest https://bugs.webkit.org/show_bug.cgi?id=112585 Reviewed by Eric Seidel. This ASSERT was bogus. The frame can be 0 for frameless documents, like those created by XMLHttpRequest. When there is no frame, we act as if JavaScript was disabled, which it is. Test: fast/events/xhr-onclick-crash.html * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): 2013-03-18 Hans Muller [CSS Exclusions] Specifying polygonal -webkit-shape-inside value can crash browser (debug mode) https://bugs.webkit.org/show_bug.cgi?id=112157 Reviewed by David Hyatt. Corrected the code which maps exclusion segments to pairs of InlineIterators. We now handle the cases where the end of the line occurs within an exclusion segment or when it occurs before the last exclusion segment has been reached. This can occur when a non-convex polygonal shape-inside breaks a line up into two segments, but the shape-inside element's content only fills (or partially fills) the first exclusion shape segment. Tests: fast/exclusions/shape-inside/shape-inside-partial-fill-001.html fast/exclusions/shape-inside/shape-inside-partial-fill-002.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2013-03-18 Emil A Eklund Change RenderTableCell to use pixelSnappedSize when painting https://bugs.webkit.org/show_bug.cgi?id=112562 Reviewed by Eric Seidel. Change the paining code in RenderTableCell to use the pixel snapped size to ensure consistent rounding given that the location was rounded during layout. It is currently constructing a paint rect by taking the rounded location and the precise size and then pixel snapping it. This causes the size to be rounded incorrectly. By instead using the pixel snapped size the rounding problem can be avoided. Test: fast/sub-pixel/table-cell-background.html * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintCollapsedBorders): (WebCore::RenderTableCell::paintBackgroundsBehindCell): (WebCore::RenderTableCell::paintBoxDecorations): (WebCore::RenderTableCell::paintMask): 2013-03-18 Tao Bai Need to use const String in HTMLVideoElement::posterImageURL https://bugs.webkit.org/show_bug.cgi?id=112317 Reviewed by Andreas Kling. No behavioral changes. This is the followup of https://bugs.webkit.org/show_bug.cgi?id=110263 Need to use String instead of const AtomicString& which means we will do an extra hash lookup * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::posterImageURL): Change to use String for url 2013-03-18 Eugene Klyuchnikov Web Inspector: [Settings] Register "?" shortcut. https://bugs.webkit.org/show_bug.cgi?id=112545 Reviewed by Vsevolod Vlasov. F1 and "?" (show shortcuts page) are not mentioned on shortcuts page. * English.lproj/localizedStrings.js: Added string. * inspector/front-end/inspector.js: Registered F1 / "?" shortcut. 2013-03-18 Carlos Garcia Campos Add USE(PLATFORM_STRATEGIES) ifdefs to StorageNamespace.cpp https://bugs.webkit.org/show_bug.cgi?id=112004 Reviewed by Rob Buis. Check if platform strategies is enabled before using it, falling back to StorageNamespaceImpl if it isn't. * storage/StorageNamespace.cpp: (WebCore::StorageNamespace::localStorageNamespace): (WebCore::StorageNamespace::sessionStorageNamespace): 2013-03-18 Vsevolod Vlasov Web Inspector: TabbedEditorContainer does not restore last shown file on reload sometimes. https://bugs.webkit.org/show_bug.cgi?id=112561 Reviewed by Alexander Pavlov. * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype.addUISourceCode): 2013-03-18 Arvid Nilsson [BlackBerry] Detach overlays from page when compositor is detached https://bugs.webkit.org/show_bug.cgi?id=112424 Reviewed by Rob Buis. PR 309160 Expose a method to retrieve a compositing thread layer's client. No change in behavior, no new tests. * platform/graphics/blackberry/LayerCompositingThread.h: (WebCore::LayerCompositingThread::client): 2013-03-18 Eugene Klyuchnikov Web Inspector: [Resources] Local Storage: duplicate keys are processed inappropriately. https://bugs.webkit.org/show_bug.cgi?id=112402 Reviewed by Alexander Pavlov. When user creates new items or renames existing one some existing item may be overriden. If value is changed, then frontend will receive notification and update record appropriately. If item value hasn't been changed, then no notification comes. But UI still expect / rely on this notification. With this patch the "no notification" scenario is fixed: duplicate items are removed. Another scenario is when update notification comes when we started editing value (after entering / renaming key). In this case selected node should not be changed to leave user in editing mode. * inspector/front-end/DOMStorageItemsView.js: Added workarounds for "no notification" and "useless notification". 2013-03-18 Allan Sandfeld Jensen Clean up RenderFrameSet::nodeAtPoint https://bugs.webkit.org/show_bug.cgi?id=112450 Reviewed by Eric Seidel. Remove handling of resizing framesets from RenderFrameSet::nodeAtPoint. The code has been incorrect since a mistake in r18333 (December 2006), but has been dead code since r17770 (November 2006) where the then new EventHandler started taking care of routing events to resizing FrameSets. Since this was the only special feature of RenderFrameSet::nodeAtPoint, the method has been removed. * rendering/RenderFrameSet.cpp: * rendering/RenderFrameSet.h: (RenderFrameSet): 2013-03-18 Kunihiko Sakamoto The 'formnovalidate' attribute doesn't work correctly on button elements with child elements https://bugs.webkit.org/show_bug.cgi?id=112541 Reviewed by Kent Tamura. Fix a bug where formnovalidate attribute of