2013-01-17 Eugene Klyuchnikov Web Inspector: [Network] Remove boilerplate CSS selectors. https://bugs.webkit.org/show_bug.cgi?id=107121 Reviewed by Vsevolod Vlasov. There are rules that are used for filtration and styling whose selectors should be autogenerated. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._injectStyles): * inspector/front-end/networkLogView.css: 2013-01-17 Tim Horton Fix the Mac build sans ENABLE(CSS_FILTERS) Reviewed by Darin Adler. Move an export from a USE(ACCELERATED_COMPOSITING) block to a ENABLE(CSS_FILTERS) block, to match the code that backs it. * WebCore.exp.in: 2013-01-17 Shinya Kawanaka [Mac] svg/custom/text-use-click-crash.xhtml added by r139029 hits assertion in enclosingTextFormControl https://bugs.webkit.org/show_bug.cgi?id=106361 Reviewed by Darin Adler. When ASSERT hit in enclosingTextFormControl(Position), position.anchorNode() was /use/shadow-root/text, and position.anchorType() was PositionIsBeforeAnchor. In this case, position.containerNode() should be ShadowRoot if SHADOW_DOM flag is enabled. However, SHADOW_DOM flag is not enabled in mac port, position.containerNode() returns 0. This hits ASSERT. We have two options to solve this problem. (1) is to allow Position to have ShadowRoot as a container node, but this will affect a lot of code. (2) is to loosen ASSERT condition. I've chosen (2) option in this patch. Test: svg/custom/text-use-click-crash.xhtml should cover this. * html/HTMLTextFormControlElement.cpp: (WebCore::enclosingTextFormControl): 2013-01-17 Eugene Klyuchnikov Web Inspector: Profiler: split "getProfile" to "getCPUProfile" and "loadHeapSnapshot" https://bugs.webkit.org/show_bug.cgi?id=104545 Reviewed by Yury Semikhatsky. This change will allow stronger typing of profiler output. * inspector/Inspector.json: Split "getProfile" to "getCPUProfile" and "getHeapSnapshot". * inspector/InspectorProfilerAgent.cpp: Ditto. * inspector/InspectorProfilerAgent.h: Ditto. * inspector/front-end/CPUProfileView.js: Adopd changes. * inspector/front-end/HeapSnapshotView.js: Ditto. 2013-01-17 Eugene Klyuchnikov Web Inspector: [Network] Memory leaks when user walks between requests. https://bugs.webkit.org/show_bug.cgi?id=107114 Reviewed by Vsevolod Vlasov. Unregister event listeners when view is detached. * inspector/front-end/RequestCookiesView.js: Fixed memory leak. * inspector/front-end/RequestHeadersView.js: Ditto. * inspector/front-end/RequestTimingView.js: Ditto. 2013-01-17 Eugene Klyuchnikov Web Inspector: [Timeline] REGRESSION: Sidebar shrinks when user switches to memory statistics mode. https://bugs.webkit.org/show_bug.cgi?id=105857 Reviewed by Pavel Feldman. Fix: do not apply constraints to sidebar width while view is offscreen; constraint check will be applied when view goes visible. * inspector/front-end/SidebarView.js: (WebInspector.SidebarView.prototype.applyConstraints): Check if view is offscreen. 2013-01-17 Alexander Pavlov Web Inspector: [Spectrum] Color picker in CSS editor does not update textual color value https://bugs.webkit.org/show_bug.cgi?id=107110 Reviewed by Vsevolod Vlasov. The Spectrum picker was never told to update the textual color upon user-initiated color changes. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): 2013-01-17 Jae Hyun Park Remove unnecessary public method TiledBackingStore::supportsAlpha() https://bugs.webkit.org/show_bug.cgi?id=107067 Reviewed by Kentaro Hara. This patch removes unnecessary public method TiledBackingStore::supportsAlpha() because supportsAlpha() is never called from other classes. No new tests, no change in behavior. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::setSupportsAlpha): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): 2013-01-17 Peter Rybin [V8] Remove a --es5_readonly flag from V8 initialization and address duplicated code https://bugs.webkit.org/show_bug.cgi?id=106790 Reviewed by Kentaro Hara. Couple of statements are moved to a newly created method. Old V8 flag setter is removed according to FIXME and per V8 change http://code.google.com/p/v8/source/detail?r=12415 * bindings/v8/V8Initializer.cpp: (WebCore::initializeV8Common): newly created method (WebCore): (WebCore::V8Initializer::initializeMainThreadIfNeeded): (WebCore::V8Initializer::initializeWorker): 2013-01-17 John Bauman Fix texImage2D from a WebGL canvas. https://bugs.webkit.org/show_bug.cgi?id=106941 Reviewed by Kenneth Russell. Clear the copied image whenever the canvas is modified, even if using accelerated compositing. Test: fast/canvas/webgl/tex-image-webgl.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::markContextChanged): 2013-01-17 Sudarsana Nagineni [AC] Memory leak in GLXConfigSelector::createConfig() https://bugs.webkit.org/show_bug.cgi?id=106657 Reviewed by Laszlo Gombos. Free the memory returned by glXGetVisualFromFBConfig() using XFree to avoid a memory leak. No new tests. No change in behavior. * platform/graphics/surfaces/glx/GLXConfigSelector.h: (WebCore::GLXConfigSelector::createConfig): 2013-01-17 Sheriff Bot Unreviewed, rolling out r139929. http://trac.webkit.org/changeset/139929 https://bugs.webkit.org/show_bug.cgi?id=107141 Speculative fix didn't work (Requested by jsbell on #webkit). * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): 2013-01-16 Alexey Proskuryakov Don't use NSApplication run loop in NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=107061 Reviewed by Anders Carlsson. Added a way to tell RunLoop whether it should use NSApplication run loop (defaulting to not using it, as this should be an exception for child processes). * WebCore.exp.in: * platform/RunLoop.cpp: (WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop): * platform/RunLoop.h: * platform/mac/RunLoopMac.mm: (WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop): (WebCore::RunLoop::run): (WebCore::RunLoop::stop): 2013-01-17 Andrey Lushnikov Web Inspector: fix DefaultTextEditor's broken backspace https://bugs.webkit.org/show_bug.cgi?id=107130 Reviewed by Pavel Feldman. Remove css "position: relative;" style from "webkit-line-content" class, which somehow brakes editing experience. Remove "height: 100%" from text-editor-overlay-highlight class and cast necessary height via inserting " " into overlay span elements. No new tests: no change in behaviour. * inspector/front-end/DefaultTextEditor.js: (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight): * inspector/front-end/textEditor.css: (.text-editor-overlay-highlight): 2013-01-16 Vsevolod Vlasov Web Inspector: Introduce FileSystemWorkspaceProvider to allow showing files from file system in workspace. https://bugs.webkit.org/show_bug.cgi?id=107021 Reviewed by Pavel Feldman. Added FileSystemWorkspaceProvider that populates workspace with files loaded from file systems registered in FileSystemMapping and listens for FileSystemAdded / FileSystemRemoved events to update workspace. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileMapping.js: (WebInspector.FileMapping.prototype.urlForURI): (WebInspector.FileMapping.MappingEntry.prototype.urlForURI): * inspector/front-end/FileSystemMapping.js: (WebInspector.FileSystemMapping.prototype.uriForPath): (WebInspector.FileSystemMapping.prototype.addEventListener): (WebInspector.FileSystemMapping.prototype.removeEventListener): (WebInspector.FileSystemMappingImpl): (get WebInspector.FileSystemMappingImpl.prototype.uriForPath): * inspector/front-end/FileSystemWorkspaceProvider.js: Added. * inspector/front-end/IsolatedFileSystemModel.js: (WebInspector.IsolatedFileSystemModel): (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem): * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: * inspector/front-end/externs.js: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: * inspector/front-end/navigatorView.css: (.navigator-other-tree-item .icon): 2013-01-17 Andrey Adaikin Web Inspector: add createOption method to WebInspector.StatusBarComboBox https://bugs.webkit.org/show_bug.cgi?id=107102 Reviewed by Vsevolod Vlasov. * inspector/front-end/CPUProfileView.js: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._addFrame): (WebInspector.ConsoleView.prototype._appendContextOption): * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarButton.prototype.set state): (WebInspector.StatusBarButton.prototype.set visible): (WebInspector.StatusBarComboBox.prototype.createOption): 2013-01-16 Grzegorz Czajkowski [EFL][GTK] checkSpellingOfString treats the multiple words as spelled correctly https://bugs.webkit.org/show_bug.cgi?id=106662 Reviewed by Antonio Gomes. No new tests, covered by spelling-backspace-between-lines.html. TextCheckerEnchant::checkSpellingOfString() method, treats the multiple words as spelled correctly if one of them is ok. For example, string such as "OK zz OK" is spelled correctly! The method at the beginning assumes that the given string is spelled correctly, then it iterates over the words to find out the misspelled location and length in the whole string. In checkSpellingOfWord, if the word is ok, we mark it as spelled correctly and we do return to check the next words. In the fact, the location and length of the previously misspelled words are overwritten. * platform/text/enchant/TextCheckerEnchant.cpp: (WebCore::TextCheckerEnchant::checkSpellingOfWord): Update of the word's misspeling location and length was moved out the loop. (WebCore::TextCheckerEnchant::checkSpellingOfString): Stop checking the next words If the current word is misspelled, to do not overwrite its misspelled location and length. 2013-01-17 Chris Fleizach WebSpeech: implement voices list https://bugs.webkit.org/show_bug.cgi?id=107014 Reviewed by Adam Barth. Add in the Mac side code to return a list of voices. Adds a layout test, which is skipped for now, until the feature is enabled. Test: platform/mac/fast/speechsynthesis/speech-synthesis-voices.html * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::SpeechSynthesis): * Modules/speech/SpeechSynthesis.h: (SpeechSynthesis): * Modules/speech/mac/SpeechSynthesisMac.mm: (WebCore::SpeechSynthesis::initializeVoiceList): 2013-01-16 Rik Cabanier Update GraphicsContext to support winding rule in clip operator for Core Graphics https://bugs.webkit.org/show_bug.cgi?id=106871 Reviewed by Dirk Schulze. Changed the interface to GraphicsContext so it's possible to pass the winding rule to canvasClip() and clip(). No new tests, no change in functionality. * WebCore.exp.in: Change signature of canvasClip function. * platform/graphics/GraphicsContext.h: Change canvasClip and clip signature with default winding rule. * platform/graphics/cairo/GraphicsContextCairo.cpp: Update interface with new signature so it still compiles. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): * platform/graphics/cg/GraphicsContextCG.cpp: Update interface with new signature and implement winding rules. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: Update interface with new signature so it still compiles. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): * platform/graphics/qt/GraphicsContextQt.cpp: Update interface with new signature so it still compiles. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): * platform/graphics/skia/GraphicsContextSkia.cpp: Update interface with new signature so it still compiles. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): * platform/graphics/wince/GraphicsContextWinCE.cpp: Update interface with new signature so it still compiles. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): * platform/graphics/wx/GraphicsContextWx.cpp: Update interface with new signature so it still compiles. (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): 2013-01-16 Hajime Morrita NoEventDispatchAssertion in ContainerNode::removeChildren is too strict https://bugs.webkit.org/show_bug.cgi?id=106985 Reviewed by Ryosuke Niwa. This change narrowed the lifetime of NoEventDispatchAssertion in removeChildren(). It is as safe as other mutation method even after this change: childrenChanged() and ChildNodeRemovalNotifier are used outside the assertion scope. Test: svg/custom/use-mutation-crash.xhtml * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChildren): 2013-01-16 Shinya Kawanaka [Refactoring] HTMLTextFormControlElement should use shadowHost instead of shadowAncestorNode https://bugs.webkit.org/show_bug.cgi?id=106533 Reviewed by Kent Tamura. Since Node::shadowAncestorNode() is deprecated, we would like to use Node::shadowHost(). No new tests, simple refactoring. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setSelectionRange): Here, startPosition and endPosition is in ShadowDOM, converting shadowAncestorNode to shadowHost is safe. (WebCore::enclosingTextFormControl): Actually ASSERT in this method is wrong since shadowAncestorNode() does not return NULL. This should be shadowHost(). 2013-01-16 Tony Gentilcore Disable an ASSERT for the threaded parser https://bugs.webkit.org/show_bug.cgi?id=107087 Reviewed by Adam Barth. Since tokenizing happens on the background thread, when the tree builder runs there isn't a valid tokenizer for which to check the state. The background parser has minimal code to update its tokenizer's state properly. No new tests because covered by existing fast/parser tests. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): * html/parser/HTMLParserOptions.h: (HTMLParserOptions): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTag): 2013-01-16 MORITA Hajime Attr.ownerDocument should change if its parent's owner did https://bugs.webkit.org/show_bug.cgi?id=97644 Reviewed by Darin Adler. moveTreeToNewScope() didn't traverse its Attr instances. But it should. Test: fast/dom/Attr/parent-adopt-node.html * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::getExistingAttrs): (WebCore): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): 2013-01-16 Adam Barth Address tonyg's feedback on BackgroundHTMLParser https://bugs.webkit.org/show_bug.cgi?id=107086 Reviewed by Tony Gentilcore. As requested in https://bugs.webkit.org/show_bug.cgi?id=107083#c5 * html/parser/BackgroundHTMLParser.cpp: (WebCore::BackgroundHTMLParser::pumpTokenizer): (TokenDelivery): (WebCore::TokenDelivery::TokenDelivery): (WebCore::TokenDelivery::execute): 2013-01-16 Tony Gentilcore Introduce a method to build the tree from a CompactHTMLToken https://bugs.webkit.org/show_bug.cgi?id=107082 Reviewed by Adam Barth. No new tests because covered by existing fast/parser tests. * html/parser/HTMLDocumentParser.cpp: (WebCore): (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken): * html/parser/HTMLDocumentParser.h: * html/parser/HTMLToken.h: (AtomicHTMLToken): (WebCore::AtomicHTMLToken::create): (WebCore::AtomicHTMLToken::AtomicHTMLToken): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): (AtomicMarkupTokenBase): 2013-01-16 Roger Fong Unreviewed build fix following r139918. Add speech synthesis to include path and WebCore vcproj file. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: 2013-01-16 Chris Rogers Switch AudioDestinationChromium over to new createAudioDevice() method https://bugs.webkit.org/show_bug.cgi?id=106816 Reviewed by James Robinson. * platform/audio/chromium/AudioDestinationChromium.cpp: (WebCore::AudioDestinationChromium::AudioDestinationChromium): 2013-01-16 Adam Barth Introduce BackgroundHTMLParser for parsing HTML on a background thread https://bugs.webkit.org/show_bug.cgi?id=107083 Reviewed by Eric Seidel. This patch contains a basic version of an HTML parser that runs on a background thread. The parser passes the majority of the tests in fast/parser and a large number of the subtests in html5lib. Notably absent from this early version of the parser is speculation (which will eventually replace preload scanning) and atomization (which we suspect will be important for performance). Our plan is to introduce those elements in subsequent patches. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/parser/BackgroundHTMLParser.cpp: Added. (WebCore): (WebCore::checkThatTokensAreSafeToSendToAnotherThread): (WebCore::parserMap): (WebCore::ParserMap::backgroundParsers): (WebCore::ParserMap::mainThreadParsers): (WebCore::BackgroundHTMLParser::BackgroundHTMLParser): (WebCore::BackgroundHTMLParser::append): (WebCore::BackgroundHTMLParser::continueParsing): (WebCore::BackgroundHTMLParser::finish): (WebCore::BackgroundHTMLParser::pumpTokenizer): (TokenDelivery): (WebCore::TokenDelivery::execute): (WebCore::BackgroundHTMLParser::sendTokensToMainThread): (WebCore::BackgroundHTMLParser::createPartial): (WebCore::BackgroundHTMLParser::stopPartial): (WebCore::BackgroundHTMLParser::appendPartial): (WebCore::BackgroundHTMLParser::continuePartial): (WebCore::BackgroundHTMLParser::finishPartial): * html/parser/BackgroundHTMLParser.h: Added. (WebCore): (BackgroundHTMLParser): (WebCore::BackgroundHTMLParser::create): (ParserMap): (WebCore::ParserMap::identifierForParser): * html/parser/HTMLDocumentParser.cpp: (WebCore): (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser): * html/parser/HTMLDocumentParser.h: (WebCore): (HTMLDocumentParser): 2013-01-16 Donghyun Kim [soup] Fix build warning in ResourceHandleSoup.cpp https://bugs.webkit.org/show_bug.cgi?id=107063 Reviewed by Martin Robinson. The restartedCallback has unused parameter 'message', remove the parameter name to fix 'unused parameter' build warning. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::restartedCallback): 2013-01-16 Tony Gentilcore Introduce a CompactHTMLToken for the threaded HTML parser https://bugs.webkit.org/show_bug.cgi?id=107069 Reviewed by Adam Barth. This class is used for transporting tokens from the parser thread to the main thread where they are fed to the tree builder. No new tests because covered by existing fast/parser tests. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/parser/CompactHTMLToken.cpp: Added. (WebCore): (WebCore::CompactHTMLToken::CompactHTMLToken): (WebCore::isStringSafeToSendToAnotherThread): (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread): * html/parser/CompactHTMLToken.h: Added. (WebCore): (CompactAttribute): (WebCore::CompactAttribute::CompactAttribute): (WebCore::CompactAttribute::name): (WebCore::CompactAttribute::value): (CompactHTMLToken): (WebCore::CompactHTMLToken::type): (WebCore::CompactHTMLToken::data): (WebCore::CompactHTMLToken::selfClosing): (WebCore::CompactHTMLToken::attributes): (WebCore::CompactHTMLToken::publicIdentifier): (WebCore::CompactHTMLToken::systemIdentifier): * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::data): (MarkupTokenBase): 2013-01-16 Adam Barth Introduce HTMLParserThread to be able to parse on a background thread https://bugs.webkit.org/show_bug.cgi?id=107071 Reviewed by Tony Gentilcore. This patch introduces a simple thread class that we can use to parse HTML. This patch is unlikely to be the final design because we'll likely want to use libdispatch or some other platform-specific thread pool. However, this implementation is enough to let us work on the parser-specific aspects of this feature. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/parser/HTMLParserThread.cpp: Added. (WebCore): (WebCore::HTMLParserThread::HTMLParserThread): (WebCore::HTMLParserThread::~HTMLParserThread): (WebCore::HTMLParserThread::start): (WebCore::HTMLParserThread::stop): (WebCore::HTMLParserThread::shared): (WebCore::HTMLParserThread::postTask): (WebCore::HTMLParserThread::threadStart): (WebCore::HTMLParserThread::runLoop): * html/parser/HTMLParserThread.h: Added. (WebCore): (HTMLParserThread): (WebCore::HTMLParserThread::create): (WebCore::HTMLParserThread::threadId): 2013-01-16 MORITA Hajime WebCore::ScriptRunner::timerFired() is reported to crash. https://bugs.webkit.org/show_bug.cgi?id=92211 Reviewed by Darin Adler. This is a speculative fix to address some crash reports. Here is my rough guess. The crash report says there is a PendingScript instance whose m_element is null. - It happens only if the instance is created through the default constructor, - that could happen if m_pendingAsyncScripts doesn't contains matched PendingScript in ScriptRunner::notifyScriptReady(), - that could happen when notifyScriptReady() is called more than once. - It turns out that the call site, ScriptElement::notifyFinished(), could be called multiple times since it doesn't remove itself from the CachedResource, which is done separately in ScriptElement::execute(). - So if notifyFinished() is called before execute(), it could happen This change added a guard to prevent notifyFinished() from being invoked multiple times. We should watch if these crash reports disappear. No new tests. I couldn't create any repro for this. * dom/ScriptElement.cpp: (WebCore::ScriptElement::notifyFinished): 2013-01-16 Pablo Flouret Fix mac build system warnings introduced by r139866 https://bugs.webkit.org/show_bug.cgi?id=107056 Reviewed by Benjamin Poulain. warning: no rule to process file '$(PROJECT_DIR)/css/CSSSupportsRule.h' of type sourcecode.c.h for architecture x86_64 warning: no rule to process file '$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSSupportsRule.h' of type sourcecode.c.h for architecture x86_64 {JS,}CSSSupportsRule.h somehow ended up marked as sources in the XCode project. No new tests. Build warning fix. * WebCore.xcodeproj/project.pbxproj: 2013-01-16 Elliott Sprehn Merge RenderObjectChildList::appendChildNode and insertChildNode https://bugs.webkit.org/show_bug.cgi?id=106392 Reviewed by Eric Seidel. insertChildNode and appendChildNode are nearly identical methods and we can combine them into insertChildNode and handle cases where the renderer to insert before is null as if it was an append. No new tests, just refactoring. * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): * rendering/RenderObjectChildList.h: (RenderObjectChildList): (WebCore::RenderObjectChildList::appendChildNode): Now inline and delegates to insertChildNode. 2013-01-16 Elliott Sprehn Cursor stops blinking after clicking on scrollbar https://bugs.webkit.org/show_bug.cgi?id=106470 Reviewed by Ojan Vafai. Restore the caret blinking when doing a mouseup on a scrollbar so scrolling a textarea doesn't cause the caret to freeze. No new tests, there doesn't seem to be any way to test cursor blinking. * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): 2013-01-16 Adam Barth Teach HTMLParserOptions about Settings::threadedHTMLParser https://bugs.webkit.org/show_bug.cgi?id=107068 Reviewed by Tony Gentilcore. We use this option to enable the threaded HTML parser at runtime. * html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): * html/parser/HTMLParserOptions.h: (HTMLParserOptions): 2013-01-16 Brady Eidson Synchronous XMLHTTPRequests need to go to the NetworkProcess. and https://bugs.webkit.org/show_bug.cgi?id=106826 Reviewed by Sam Weinig and Alexey Proskuryakov. No new tests (No changes to any config that is currently tested) * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): Consult the LoaderStrategy when strategies are being used. * loader/LoaderStrategy.cpp: (WebCore::LoaderStrategy::loadResourceSynchronously): Defaults to using ResourceHandle directly. * loader/LoaderStrategy.h: Break out the StoredCredentials enum to a new header: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleTypes.h: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2013-01-16 Robert Iannucci Explicitly set msvs_cygwin_shell to true for bison rule https://bugs.webkit.org/show_bug.cgi?id=107058 Reviewed by Tony Chang. Currently, msvs_cygwin_shell is set to 1 by default. This patch explicitly sets it on the actions which will break if msvs_cygwin_shell were set to 0. This is in preparation for changing the default value of msvs_cygwin_shell, which in turn is in preparation of the removal of cygwin as a buld-system requirement. Since this change will have no semantic effect, no new tests are required. A previous instance of this bug is here: https://bugs.webkit.org/show_bug.cgi?id=106706 * WebCore.gyp/WebCore.gyp: 2013-01-16 Benjamin Poulain Fix the warning for the exported Objective-C binding of DOMCSSSupportsRule Rubber-stamped by Simon Fraser. * WebCore.exp.in: r139866 exported the Objective-C class DOMCSSSupportsRule without #ifdefing the symbol between its feature flag. 2013-01-16 Victor Carbune Cues not rendered when they should be https://bugs.webkit.org/show_bug.cgi?id=106943 Reviewed by Eric Carlson. Forced rendering update, even if the active set of cues didn't change. Test: media/track/track-cue-rendering-mode-changed.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): If exiting early, update the cues rendered by the text track container. (WebCore::HTMLMediaElement::textTrackModeChanged): Trigger update of the re-checking the active cues and render the ones not yet on screen. 2013-01-16 Benjamin Poulain Force a rebuild of RenderObject Unreviewed. One bot is using old object file. Change RenderObject.cpp to force it to build the file again. * rendering/RenderObject.cpp: (WebCore::addLayers): (WebCore::RenderObject::findNextLayer): 2013-01-16 Joshua Bell IndexedDB: Possible null ScriptExecutionContext passed to callbacks during frame destruction https://bugs.webkit.org/show_bug.cgi?id=107050 Reviewed by Tony Chang. Temporary code to defend against null contexts. Will either refute a hypothesis, or we'll need to make a more systemic fix elsewhere. Either way it will be removed in a few days. We're unable to repro, but watching crash reports from users. One possible source is that during page tear-down WorkerScriptController::controllerForContext() returns null (there's a comment about that case) leading to a null context. No new tests - this shouldn't be happening. * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): 2013-01-16 Kenneth Russell Simplify validation and data copying in WebGLBuffer https://bugs.webkit.org/show_bug.cgi?id=106975 Reviewed by Dean Jackson. Re-landing after testing locally; was not able to reproduce the crash seen once with the earlier patch. No new tests; covered by existing tests. Ran WebGL layout tests and conformance tests. * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::associateBufferDataImpl): Take (void*, int) pair instead of ArrayBuffer and offset. Simplifies code significantly. (WebCore::WebGLBuffer::associateBufferData): Pass down base pointers and sizes rather than ArrayBuffer and optional offset. (WebCore::WebGLBuffer::associateBufferSubDataImpl): Take (void*, int) pair instead of ArrayBuffer and offset. Simplifies code significantly. (WebCore::WebGLBuffer::associateBufferSubData): Pass down base pointers and sizes rather than ArrayBuffer and optional offset. * html/canvas/WebGLBuffer.h: (WebGLBuffer): Change signatures of associateBufferDataImpl and associateBufferSubDataImpl. 2013-01-16 Timothy Hatcher Fix a crash when printing console messages to STDOUT. https://bugs.webkit.org/show_bug.cgi?id=107039 Reviewed by Joseph Pecoraro. * page/Console.cpp: (WebCore::internalAddMessage): Don't release the RefPtr early. Also log the line number and convert non-string arguments to strings when printing them. 2013-01-16 Kenneth Russell Unreviewed, rolling out r139914. http://trac.webkit.org/changeset/139914 https://bugs.webkit.org/show_bug.cgi?id=106975 Caused crashes in compositing/visibility/visibility-simple- webgl-layer.html * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::associateBufferDataImpl): (WebCore::WebGLBuffer::associateBufferData): (WebCore::WebGLBuffer::associateBufferSubDataImpl): (WebCore::WebGLBuffer::associateBufferSubData): * html/canvas/WebGLBuffer.h: (WebGLBuffer): 2013-01-16 Alexis Menard Monitor usage of unprefixed and prefixed DOM events for CSS Transitions. https://bugs.webkit.org/show_bug.cgi?id=107004 Reviewed by Adam Barth. Monitor the usage of transitionEnd events as well as webkitTransitionEnd events so we can know in the future how much the prefixed version is used to remove it becomes irrelevant. No new tests : no behavior changes, we're just adding monitoring. * dom/EventTarget.cpp: (WebCore): (WebCore::EventTarget::fireEventListeners): * page/FeatureObserver.h: 2013-01-16 Antti Koivisto Tighten RenderLayerModelObject subclass constructors to operate on ContainerNodes. https://bugs.webkit.org/show_bug.cgi?id=107041 Reviewed by Simon Fraser. In rendering code only Nodes that are not ContainerNodes are used by RenderText. Tighter typing is better in general. It also enables better code generation (especially with Document* moving from Node to ContainerNode). This patch tightens constuctors for better static type checking. It also overrides node() with a covariant ContainerNode* return type version in RenderLayerModelObject. RenderObject::createObject() is tightened to take Element*. This patch does not change Node* usage in non-construction code (expect for the node() override). With some further work it should be possible to tighten most of the rendering tree to operate on Elements for even less branchiness. * dom/Document.cpp: (WebCore::Document::attach): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::RenderSliderThumb): (WebCore::RenderSliderContainer::RenderSliderContainer): * html/shadow/SliderThumbElement.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::RenderBox): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::RenderBoxModelObject): * rendering/RenderBoxModelObject.h: * rendering/RenderButton.cpp: (WebCore::RenderButton::RenderButton): * rendering/RenderButton.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox): * rendering/RenderDeprecatedFlexibleBox.h: * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::RenderDetailsMarker): * rendering/RenderDetailsMarker.h: * rendering/RenderDialog.h: (WebCore::RenderDialog::RenderDialog): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::RenderFieldset): * rendering/RenderFieldset.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::RenderFlexibleBox): * rendering/RenderFlexibleBox.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): * rendering/RenderFlowThread.h: * rendering/RenderFullScreen.cpp: (RenderFullScreen::RenderFullScreen): * rendering/RenderFullScreen.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::RenderGrid): * rendering/RenderGrid.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::RenderInline): * rendering/RenderInline.h: * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::RenderLayerModelObject): * rendering/RenderLayerModelObject.h: (WebCore::RenderLayerModelObject::node): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::RenderListItem): * rendering/RenderListItem.h: * rendering/RenderMediaControlElements.cpp: (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer): (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay): (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): * rendering/RenderMediaControlElements.h: * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock): * rendering/RenderMultiColumnBlock.h: * rendering/RenderMultiColumnFlowThread.cpp: (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread): * rendering/RenderMultiColumnFlowThread.h: * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::RenderMultiColumnSet): * rendering/RenderMultiColumnSet.h: (RenderMultiColumnSet): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::RenderNamedFlowThread): * rendering/RenderNamedFlowThread.h: (RenderNamedFlowThread): * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderObject.h: (RenderObject): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): * rendering/RenderRegion.h: (RenderRegion): * rendering/RenderRegionSet.cpp: (WebCore::RenderRegionSet::RenderRegionSet): * rendering/RenderRegionSet.h: (RenderRegionSet): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::RenderReplaced): * rendering/RenderReplaced.h: (RenderReplaced): * rendering/RenderReplica.cpp: (WebCore::RenderReplica::RenderReplica): (WebCore::RenderReplica::~RenderReplica): * rendering/RenderReplica.h: * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::RenderRubyAsInline): (WebCore::RenderRubyAsBlock::RenderRubyAsBlock): * rendering/RenderRuby.h: * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::RenderRubyBase): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): * rendering/RenderRubyRun.h: (RenderRubyRun): * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::RenderRubyText): * rendering/RenderRubyText.h: (RenderRubyText): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::RenderScrollbarPart): * rendering/RenderScrollbarPart.h: (RenderScrollbarPart): * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::RenderSearchField): * rendering/RenderSearchField.h: (RenderSearchField): * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): * rendering/RenderTable.h: (RenderTable): * rendering/RenderTableCaption.cpp: (WebCore::RenderTableCaption::RenderTableCaption): * rendering/RenderTableCaption.h: (RenderTableCaption): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::RenderTableCell): * rendering/RenderTableCell.h: (RenderTableCell): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::RenderTableCol): * rendering/RenderTableCol.h: (RenderTableCol): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::RenderTableRow): * rendering/RenderTableRow.h: (RenderTableRow): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): * rendering/RenderTableSection.h: (RenderTableSection): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine): * rendering/RenderTextControlMultiLine.h: (RenderTextControlMultiLine): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): * rendering/RenderTextControlSingleLine.h: (RenderTextControlSingleLine): (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): * rendering/RenderTextTrackCue.cpp: (WebCore::RenderTextTrackCue::RenderTextTrackCue): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::RenderWidget): * rendering/RenderWidget.h: * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::RenderMathMLBlock): * rendering/mathml/RenderMathMLBlock.h: (WebCore::RenderMathMLTable::RenderMathMLTable): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::RenderMathMLOperator): * rendering/mathml/RenderMathMLOperator.h: * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::RenderMathMLRow): * rendering/mathml/RenderMathMLRow.h: (RenderMathMLRow): (WebCore::RenderSVGInline::RenderSVGInline): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGTSpan.cpp: (WebCore::RenderSVGTSpan::RenderSVGTSpan): * rendering/svg/RenderSVGTSpan.h: * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::RenderSVGTextPath): * rendering/svg/RenderSVGTextPath.h: 2013-01-16 Chris Fleizach Stub out WebSpeech synthesis https://bugs.webkit.org/show_bug.cgi?id=106847 Reviewed by Adam Barth. This adds in the necessary IDLs and stubs out the code for the WebSpeech synthesis specification. It does not turn on the feature in any platform, but it can be enabled and built for Mac. The feature flag is SPEECH_SYNTHESIS. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * Modules/speech/DOMWindowSpeechSynthesis.cpp: Added. (WebCore::DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis): (WebCore::DOMWindowSpeechSynthesis::~DOMWindowSpeechSynthesis): (WebCore::DOMWindowSpeechSynthesis::from): (WebCore::DOMWindowSpeechSynthesis::speechSynthesis): * Modules/speech/DOMWindowSpeechSynthesis.h: Added. * Modules/speech/DOMWindowSpeechSynthesis.idl: Added. * Modules/speech/SpeechSynthesis.cpp: Added. (WebCore::SpeechSynthesis::create): (WebCore::SpeechSynthesis::SpeechSynthesis): * Modules/speech/SpeechSynthesis.h: Added. (SpeechSynthesis): (WebCore::SpeechSynthesis::getVoices): * Modules/speech/SpeechSynthesis.idl: Added. * Modules/speech/SpeechSynthesisEvent.cpp: Added. (WebCore::SpeechSynthesisEvent::create): (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent): * Modules/speech/SpeechSynthesisEvent.h: Added. (SpeechSynthesisEvent): (WebCore::SpeechSynthesisEvent::charIndex): (WebCore::SpeechSynthesisEvent::elapsedTime): (WebCore::SpeechSynthesisEvent::name): * Modules/speech/SpeechSynthesisEvent.idl: Added. * Modules/speech/SpeechSynthesisUtterance.cpp: Added. (WebCore::SpeechSynthesisUtterance::create): (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance): (WebCore::SpeechSynthesisUtterance::scriptExecutionContext): (WebCore::SpeechSynthesisUtterance::interfaceName): * Modules/speech/SpeechSynthesisUtterance.h: Added. (SpeechSynthesisUtterance): (WebCore::SpeechSynthesisUtterance::text): (WebCore::SpeechSynthesisUtterance::setText): (WebCore::SpeechSynthesisUtterance::lang): (WebCore::SpeechSynthesisUtterance::setLang): (WebCore::SpeechSynthesisUtterance::voiceURI): (WebCore::SpeechSynthesisUtterance::setVoiceURI): (WebCore::SpeechSynthesisUtterance::volume): (WebCore::SpeechSynthesisUtterance::setVolume): (WebCore::SpeechSynthesisUtterance::rate): (WebCore::SpeechSynthesisUtterance::setRate): (WebCore::SpeechSynthesisUtterance::pitch): (WebCore::SpeechSynthesisUtterance::setPitch): * Modules/speech/SpeechSynthesisUtterance.idl: Added. * Modules/speech/SpeechSynthesisVoice.cpp: Added. (WebCore::SpeechSynthesisVoice::create): (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice): * Modules/speech/SpeechSynthesisVoice.h: Added. (SpeechSynthesisVoice): (WebCore::SpeechSynthesisVoice::voiceURI): (WebCore::SpeechSynthesisVoice::name): (WebCore::SpeechSynthesisVoice::lang): (WebCore::SpeechSynthesisVoice::localService): (WebCore::SpeechSynthesisVoice::isDefault): * Modules/speech/SpeechSynthesisVoice.idl: Added. * Modules/speech/mac: Added. * Modules/speech/mac/SpeechSynthesisMac.mm: Added. (WebCore::SpeechSynthesis::pending): (WebCore::SpeechSynthesis::speaking): (WebCore::SpeechSynthesis::paused): (WebCore::SpeechSynthesis::speak): (WebCore::SpeechSynthesis::cancel): (WebCore::SpeechSynthesis::pause): (WebCore::SpeechSynthesis::resume): * WebCore.xcodeproj/project.pbxproj: * dom/EventNames.h: * dom/EventNames.in: * dom/EventTargetFactory.in: 2013-01-16 Sheriff Bot Unreviewed, rolling out r139853. http://trac.webkit.org/changeset/139853 https://bugs.webkit.org/show_bug.cgi?id=107049 Broke the ChromeOS ppapi_unittests (Requested by leviw on #webkit). * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/InspectorPageAgent.cpp: * inspector/InspectorPageAgent.h: * inspector/front-end/ResourceTreeModel.js: (WebInspector.PageDispatcher.prototype.frameDetached): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::clear): (WebCore::NavigationScheduler::timerFired): (WebCore::NavigationScheduler::startTimer): (WebCore::NavigationScheduler::cancel): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::progressStarted): (WebCore::ProgressTracker::finalProgressComplete): 2013-01-16 Kenneth Russell Simplify validation and data copying in WebGLBuffer https://bugs.webkit.org/show_bug.cgi?id=106975 Reviewed by Dean Jackson. No new tests; covered by existing tests. Ran WebGL layout tests and conformance tests. * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::associateBufferDataImpl): Take (void*, int) pair instead of ArrayBuffer and offset. Simplifies code significantly. (WebCore::WebGLBuffer::associateBufferData): Pass down base pointers and sizes rather than ArrayBuffer and optional offset. (WebCore::WebGLBuffer::associateBufferSubDataImpl): Take (void*, int) pair instead of ArrayBuffer and offset. Simplifies code significantly. (WebCore::WebGLBuffer::associateBufferSubData): Pass down base pointers and sizes rather than ArrayBuffer and optional offset. * html/canvas/WebGLBuffer.h: (WebGLBuffer): Change signatures of associateBufferDataImpl and associateBufferSubDataImpl. 2013-01-16 Arnaud Renevier inconsistency in drawImage with target rect negative dimensions. https://bugs.webkit.org/show_bug.cgi?id=100026 Reviewed by Dean Jackson. Remove -1, -1 special case in drawImage and drawImageBuffer. Replace all -1 -1 arguments calls to with the correct rectangle dimensions. Remove FloatRect(0, 0, -1, -1) default argument for srcRect, and instead, add new overloaded functions to create a FloatRect from image size. Replace -1 -1 arguments calls in FEComposite::platformApplySoftware with correct rectangle dimensions. Replace ImageGStreamer rect method (which may return -1 -1 rectangle) with cropRect method, and make caller check for rectangle emptiness. * fast/canvas/drawImage-with-negative-source-destination-expected.txt: * fast/canvas/drawImage-with-negative-source-destination.js: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore): (WebCore::GraphicsContext::drawImageBuffer): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * platform/graphics/gstreamer/ImageGStreamer.h: (WebCore::ImageGStreamer::rect): 2013-01-16 Simon Fraser Allow PaintInfo to carry all PaintBehavior flags https://bugs.webkit.org/show_bug.cgi?id=106980 Reviewed by Sam Weinig. PaintInfo has a single boolean for forceBlackText, but I'll be adding additional paint behaviors that I'd like to access from PaintInfo, so it makes sense for PaintInfo to just include the set of PaintBehavior flags. Also add default values in the constructor arguments for rarely used parameters. No behavior change, no tests. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): Use the forceBlackText() function. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Call forceBlackText(). * rendering/PaintInfo.h: (WebCore::PaintInfo::PaintInfo): Pass PaintBehavior rather than a forceBlackText boolean. (WebCore::PaintInfo::forceBlackText): Return true if the behavior flags contain PaintBehaviorForceBlackText. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Pass PaintBehaviorForceBlackText instead of 'true' when painting for background-clip: text. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): Pass PaintBehaviorNormal where we used to pass 'false', and omit default 0 parameters. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): PaintBehaviorNormal and remove default params. 2013-01-16 Tim Horton Add a missing #if to fix the Mac build sans ENABLE_CSS_FILTERS. Rubber-stamped by Simon Fraser. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::cloneLayer): 2013-01-16 Kentaro Hara [V8] Make a creationContext parameter of toV8() mandatory https://bugs.webkit.org/show_bug.cgi?id=107020 Reviewed by Adam Barth. Currently a creationContext parameter of toV8() is optional: Handle toV8(..., Handle creationContext = Handle(), ...) { ...; } On the other hand, looking at the implementation of V8WrapperInstantiationScope: explicit V8WrapperInstantiationScope(v8::Handle creationContext) : m_didEnterContext(false) , m_context(v8::Context::GetCurrent()) { if (creationContext.IsEmpty()) // We do nothing for this case! return; v8::Handle contextForWrapper = creationContext->CreationContext(); if (contextForWrapper == m_context) return; m_context = v8::Local::New(contextForWrapper); m_didEnterContext = true; m_context->Enter(); } we're assuming that a creationContext parameter is passed to toV8() when a creationContext exists. In other words, if we forget to pass a creationContext parameter, we will end up with creating an object on the current context, which is wrong. To avoid the mistake, we should make the creationContext parameter mandatory. When we really do not have a creationContext, we can pass Handle() explicitly. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/test/V8/V8Float64Array.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestException.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::injectIDBKeyIntoScriptValue): (WebCore::idbKeyToScriptValue): * bindings/v8/ScriptController.cpp: (WebCore::createScriptObject): (WebCore::ScriptController::createScriptObjectForPluginElement): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::currentCallFrame): * bindings/v8/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::handleEvent): (WebCore::V8AbstractEventListener::getReceiverObject): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::updateDocumentProperty): * bindings/v8/V8LazyEventListener.cpp: (WebCore::toObjectWrapper): * bindings/v8/V8MutationCallback.cpp: (WebCore::V8MutationCallback::handleEvent): * bindings/v8/V8NodeFilterCondition.cpp: (WebCore::V8NodeFilterCondition::acceptNode): * bindings/v8/V8WorkerContextEventListener.cpp: (WebCore::V8WorkerContextEventListener::handleEvent): (WebCore::V8WorkerContextEventListener::getReceiverObject): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::nodeAsScriptValue): * css/MediaQueryListListener.cpp: (WebCore::MediaQueryListListener::queryChanged): * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): 2013-01-15 Jer Noble Add a Setting to disable QTKit media engine. https://bugs.webkit.org/show_bug.cgi?id=106972 Reviewed by Eric Carlson. Allow the MediaPlayerPrivateQTKit engine to be disabled by adding a runtime setting to Settings. Make the setting 'live' by requerying the installed media engines when the setting changes. * WebCore.exp.in: Add new symbols to export list. * page/Settings.cpp: Add new gQTKitEnabled global. (WebCore::Settings::setAVFoundationEnabled): Requery media engines. (WebCore::Settings::setQTKitEnabled): Ditto. Setter for global setting variable. * page/Settings.h: (WebCore::Settings::isQTKitEnabled): Getter for same. * platform/graphics/MediaPlayer.cpp: (WebCore::installedMediaEngines): Check isQTKitEnabled() before adding MediaPlayerPrivateQTKit engine. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::requeryMediaEngines): Pass through to MediaPlayer. * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.cpp: (WebCore::installedMediaEngines): Take an optional requery options parameter. (WebCore::MediaPlayer::requeryMediaEngines): Pass through to installedMediaEngines(). * platform/graphics/MediaPlayer.h: 2013-01-16 Christophe Dumez [gstreamer] Some media tests occasionally crash with gstreamer 1.0 backend https://bugs.webkit.org/show_bug.cgi?id=106551 Reviewed by Philippe Normand. ImageGStreamerCairo was passing mapped memory to cairo_image_surface_create_for_data() and then unmapping it straight away even though the cairo_surface_t is still used. The cairo documentation states: "The output buffer must be kept around until the cairo_surface_t is destroyed or cairo_surface_finish() is called on the surface." This patch keeps the GstBuffer memory mapped until the ImageGStreamer is destroyed so that the internal cairo_surface_t stays valid while avoiding copying the image data. No new tests, already covered by existing tests. * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): (WTF): (WTF::GstBuffer): * platform/graphics/gstreamer/GRefPtrGStreamer.h: (WTF): Add support for using GRefPtr with GstBuffer. * platform/graphics/gstreamer/ImageGStreamer.h: (ImageGStreamer): * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: (ImageGStreamer::ImageGStreamer): (ImageGStreamer::~ImageGStreamer): 2013-01-16 Mike Reed Use SkMatrix::I() when we need to pass identity, rather than constructing a new matrix. https://bugs.webkit.org/show_bug.cgi?id=107016 Reviewed by James Robinson. No new tests. existing tests exercise this code. The default constructor is being deprecated, so this change is also part of that effort, though it is a perf-improvement regardless, since we avoid making a new (temp) matrix. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): 2013-01-16 Ojan Vafai RenderListMarker::computePreferredLogicalWidth should not be public https://bugs.webkit.org/show_bug.cgi?id=106956 Reviewed by Tony Chang. RenderListItem was calling computePreferredLogicalWidths for the side effects of updating the marker content and margins. Instead, call updateMarginsAndContent directly. * rendering/RenderListItem.cpp: (WebCore::RenderListItem::updateMarkerLocation): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::layout): The isImage() codepath never calls computePreferredLogicalWidths, so we need to make sure the content and margins are updated. (WebCore::RenderListMarker::updateContent): (WebCore::RenderListMarker::computePreferredLogicalWidths): (WebCore::RenderListMarker::updateMarginsAndContent): * rendering/RenderListMarker.h: 2013-01-16 Claudio Saavedra [GTK] Safeguard against possible NULL-dereference https://bugs.webkit.org/show_bug.cgi?id=104931 Reviewed by Martin Robinson. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetIndexInParent): Move the NULL-safeguard to a place where it actually makes sense. 2013-01-16 Avi Drissman West-panning cursor does not match resize cursor, unlike all other directions https://bugs.webkit.org/show_bug.cgi?id=89405 Reviewed by Alexey Proskuryakov. Existing manual tests. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): 2013-01-16 Andrey Adaikin Web Inspector: array grouping does not work for float number keys https://bugs.webkit.org/show_bug.cgi?id=106998 Reviewed by Pavel Feldman. Now we do the array index check according to the ECMAScript 5, section 15.4: "A property name P (in the form of a String value) is an array index if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32-1." * inspector/front-end/ObjectPropertiesSection.js: (.buildObjectFragment): 2013-01-16 Sergey Ryazanov Web Inspector: Show formatted content of JSON request https://bugs.webkit.org/show_bug.cgi?id=106900 Reviewed by Vsevolod Vlasov. "Request payload" section showed raw content for POST requests. This change show it in structured format if it's JSON parsable. Raw format is also available. * inspector/front-end/RequestHeadersView.js: (WebInspector.RequestHeadersView.prototype._refreshQueryString): (WebInspector.RequestHeadersView.prototype._refreshFormData): (WebInspector.RequestHeadersView.prototype.toggleViewSource): (WebInspector.RequestHeadersView.prototype._refreshParams): 2013-01-16 Vsevolod Vlasov Web Inspector: UISourceCode scriptFile / styleFile should be reset on navigation (debugger or css model reset). https://bugs.webkit.org/show_bug.cgi?id=107008 Reviewed by Pavel Feldman. ScriptFiles and styleFiles are now reset and disposed on UISourceCodes on corresponding models reset. StyleSourceMapping now tries to setup mapping for newly added resource as well as for uiSourceCodes previously. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel): (WebInspector.CSSStyleModel.prototype._mainFrameCreatedOrNavigated): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping): (WebInspector.ResourceScriptMapping.prototype._unbindUISourceCodeFromScripts): (WebInspector.ResourceScriptMapping.prototype._initialize): (WebInspector.ResourceScriptMapping.prototype._debuggerReset): (WebInspector.ResourceScriptFile.prototype.dispose): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._addFrame): (WebInspector.ResourceTreeModel.prototype._frameNavigated): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype._debuggerReset): * inspector/front-end/StylesSourceMapping.js: (WebInspector.StylesSourceMapping): (WebInspector.StylesSourceMapping.prototype._resourceAdded): (WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace): (WebInspector.StylesSourceMapping.prototype._bindUISourceCode): (WebInspector.StylesSourceMapping.prototype._projectWillReset): (WebInspector.StylesSourceMapping.prototype._initialize): (WebInspector.StylesSourceMapping.prototype._mainFrameCreatedOrNavigated): (WebInspector.StyleFile.prototype.dispose): 2013-01-16 Gustavo Noronha Silva [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying https://bugs.webkit.org/show_bug.cgi?id=105552 Reverting 139877. It made a couple of API tests fail. * platform/graphics/gstreamer/GStreamerVersioning.cpp: * platform/graphics/gstreamer/GStreamerVersioning.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient): (_WebKitWebSrcPrivate): (webKitWebSrcFinalize): (webKitWebSrcStop): (StreamingClient::didReceiveData): * platform/network/ResourceHandleClient.h: (ResourceHandleClient): * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): (ResourceHandleInternal): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::cleanupSoupRequestOperation): (WebCore::nextMultipartResponsePartCallback): (WebCore::sendRequestCallback): (WebCore::readCallback): 2013-01-16 Andrey Kosyakov Web Inspector: cookies with empty value are parsed incorrectly https://bugs.webkit.org/show_bug.cgi?id=107012 Reviewed by Pavel Feldman. Require cookie value to be a string, not a non-empty string, before employing legacy compatibility hack of treating bare token as value for the cookie with an empty name. * inspector/front-end/CookieParser.js: (WebInspector.CookieParser.prototype._addCookie): 2013-01-16 Grzegorz Czajkowski Unreviewed EFL build fix after r139877. * platform/graphics/gstreamer/GStreamerVersioning.cpp: (getGstBufferDataPointer): Add const modifier to webkitGstMapInfoQuarkString. 2013-01-16 Andrey Kosyakov Web Inspector: [Extensions API] remove inspectedWindow.onReset event https://bugs.webkit.org/show_bug.cgi?id=107009 Reviewed by Vsevolod Vlasov. * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (injectedExtensionAPI.InspectorExtensionAPI): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype.initExtensions): 2013-01-16 Andrey Lushnikov Web Inspector: fix text-editor-highlight-regexp test https://bugs.webkit.org/show_bug.cgi?id=107006 Reviewed by Vsevolod Vlasov. Use 'height: 100%' instead of pixel values on highlight spans to bring in some platform independency in test expectations. No new tests: no changes in behaviour. * inspector/front-end/DefaultTextEditor.js: (WebInspector.TextEditorMainPanel.prototype._measureRegex): (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight): * inspector/front-end/textEditor.css: (.text-editor-overlay-highlight): (.webkit-line-content): 2013-01-16 Jocelyn Turcotte [Qt] Use the shared HistoryItem serialization for QWebHistory https://bugs.webkit.org/show_bug.cgi?id=106671 Reviewed by Allan Sandfeld Jensen. This allows a few things missing from the previous serialization code to function while using commonly maintained code: - The itemSequenceNumber and documentSequenceNumber that were needed to properly restore same-document navigations - The form data - The navigation hierarchy mapping the frame tree * history/HistoryItem.h: (HistoryItem): * history/qt/HistoryItemQt.cpp: (QDataStreamCoder): (WebCore): (WebCore::QDataStreamCoder::QDataStreamCoder): (WebCore::QDataStreamCoder::encodeBytes): (WebCore::QDataStreamCoder::encodeBool): (WebCore::QDataStreamCoder::encodeUInt32): (WebCore::QDataStreamCoder::encodeUInt64): (WebCore::QDataStreamCoder::encodeInt32): (WebCore::QDataStreamCoder::encodeInt64): (WebCore::QDataStreamCoder::encodeFloat): (WebCore::QDataStreamCoder::encodeDouble): (WebCore::QDataStreamCoder::encodeString): (WebCore::QDataStreamCoder::decodeBytes): (WebCore::QDataStreamCoder::decodeBool): (WebCore::QDataStreamCoder::decodeUInt32): (WebCore::QDataStreamCoder::decodeUInt64): (WebCore::QDataStreamCoder::decodeInt32): (WebCore::QDataStreamCoder::decodeInt64): (WebCore::QDataStreamCoder::decodeFloat): (WebCore::QDataStreamCoder::decodeDouble): (WebCore::QDataStreamCoder::decodeString): (WebCore::HistoryItem::restoreState): (WebCore::WebCore::HistoryItem::saveState): 2013-01-15 Gustavo Noronha Silva [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying https://bugs.webkit.org/show_bug.cgi?id=105552 Reviewed by Philippe Normand. Makes it possible for the GStreamer media backend to provide the buffer to which the Soup networking backend will use to download data to. This makes copying memory unnecessary when ResourceHandle hands data over to the media player's StreamingClient. Thanks to Dan Winship for help designing the interface. No behaviour change, covered by existing tests. * platform/graphics/gstreamer/GStreamerVersioning.cpp: (getGstBufferSize): Abstract obtaining the size of the buffer, so the code is cleaner while still working for both GST 0.10 and 1.0. (setGstBufferSize): Ditto, but for setting the size. (getGstBufferDataPointer): Ditto, but for grabbing the data pointer. (mapGstBuffer): Convenience method to take care of mapping the buffer so that we can provide the data pointer to ResourceHandle. (unmapGstBuffer): Convenience method which takes care of unmapping the buffer and properly freeing the GstMapInfo. * platform/graphics/gstreamer/GStreamerVersioning.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient): New methods. (_WebKitWebSrcPrivate): We now store the GstBuffer we provided the data pointer from so we can later unmap it and push it to the pipeline. (webKitWebSrcDispose): Deal with the GstBuffer in case it exists when the source is destroyed. (webKitWebSrcStop): Also clear the GstBuffer in this case. (StreamingClient::didReceiveData): Handle the hand-over of the buffer. (StreamingClient::getBuffer): Provide ResourceHandle with a new GstBuffer's data pointer. * platform/network/ResourceHandleClient.h: (ResourceHandleClient): (WebCore::ResourceHandleClient::ResourceHandleClient): Constructor to initialize the buffer member variable to 0. (WebCore::ResourceHandleClient::~ResourceHandleClient): Destructor to free the buffer if it has been allocated. (WebCore::ResourceHandleClient::getBuffer): Default implementation which returns a newly allocated char pointer. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): (ResourceHandleInternal): Store actual buffer size, which is no longer a constant. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::cleanupSoupRequestOperation): Clear the buffer pointer, the life-cycle of the buffer is handled by the ResourceHandleClient. (WebCore::nextMultipartResponsePartCallback): Get a new buffer from the client before reading. (WebCore::sendRequestCallback): Ditto. (WebCore::readCallback): Ditto. 2013-01-16 Jocelyn Turcotte [Qt] Crash in WebCore::CachedFrame::destroy https://bugs.webkit.org/show_bug.cgi?id=104525 Reviewed by Adam Barth. Add an assert to increase the chances of catching this crash early on in the future. * dom/Document.cpp: (WebCore::Document::takeDOMWindowFrom): 2013-01-16 Andrey Lushnikov Web Inspector: fix Сlosure warnings in devTools front-end https://bugs.webkit.org/show_bug.cgi?id=106993 Reviewed by Vsevolod Vlasov. Add missing annotations and rename Element.remove() method to avoid collision with HTMLSelectElement.remove() method. No new tests: no change in behaviour. * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.hasChildNodes): (WebInspector.DOMNode.prototype.getChildNodes): * inspector/front-end/DOMExtension.js: (Element.prototype.removeSelf): (removeSubsequentNodes): * inspector/front-end/DefaultTextEditor.js: * inspector/front-end/SettingsScreen.js: (WebInspector.OverridesSettingsTab): * inspector/front-end/SourceTokenizer.js: (WebInspector.SourceTokenizer): 2013-01-16 Andrey Lushnikov Web Inspector: fix backward compatibility issues with Element.remove() method https://bugs.webkit.org/show_bug.cgi?id=106996 Reviewed by Vsevolod Vlasov. Add javascript implementations for CharacterData.prototype.remove and DocumentType.prototype.remove. No new tests: no change in behaviour. * inspector/front-end/DOMExtension.js: 2013-01-16 Zeno Albisser GraphicsSurfaceGLX is leaking an XWindow https://bugs.webkit.org/show_bug.cgi?id=107002 The XWindow created as a backing surface for the GraphicsSurfaceGLX needs to be destroyed together with the GraphicsSurface. Reviewed by Noam Rosenthal. * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: (WebCore::GraphicsSurfacePrivate::clear): 2013-01-16 Pablo Flouret Implement CSSSupportsRule https://bugs.webkit.org/show_bug.cgi?id=104822 Reviewed by Allan Sandfeld Jensen. http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface Right now, @supports is not implemented as a proper CSSRule. Apart from the CSSOM implications it gives wrong results when, for instance, an @supports rule is nested inside a @media rule. Test: css3/supports-cssom.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Add CSSSupportsRule.* and associated files. * bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS): * bindings/objc/DOMCSS.mm: (kitClass): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::wrap): Create the correct wrappers for the rule. * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::createSupportsRule): (WebCore::CSSParser::markSupportsRuleHeaderStart): (WebCore::CSSParser::markSupportsRuleHeaderEnd): * css/CSSParser.h: Create the supports rule when parsing and add it where it corresponds, instead of directly adding the child rules to the stylesheet. * css/CSSPropertySourceData.h: * css/CSSRule.h: * css/CSSRule.idl: Add SUPPORTS_RULE type to enums. * css/CSSSupportsRule.cpp: Added. (WebCore::CSSSupportsRule::CSSSupportsRule): (WebCore::CSSSupportsRule::~CSSSupportsRule): (WebCore::CSSSupportsRule::cssText): (WebCore::CSSSupportsRule::conditionText): * css/CSSSupportsRule.h: Added. (WebCore::CSSSupportsRule::create): * css/CSSSupportsRule.idl: Added. DOM interface. * css/RuleSet.cpp: (WebCore::RuleSet::addChildRules): Add rules included in the @supports rule. * css/StyleResolver.cpp: (WebCore::collectCSSOMWrappers): Collect CSSSupportsRule wrappers. * css/StyleRule.cpp: (WebCore::StyleRuleBase::reportMemoryUsage): (WebCore::StyleRuleBase::destroy): (WebCore::StyleRuleBase::copy): (WebCore::StyleRuleBase::createCSSOMWrapper): (WebCore::StyleRuleSupports::StyleRuleSupports): * css/StyleRule.h: (StyleRuleBase): (WebCore::StyleRuleBase::isSupportsRule): (StyleRuleSupports): (WebCore::StyleRuleSupports::create): (WebCore::StyleRuleSupports::conditionText): (WebCore::StyleRuleSupports::conditionIsSupported): (WebCore::StyleRuleSupports::copy): (WebCore::toStyleRuleSupports): New subclass of StyleRuleBlock: StyleRuleSupports. * css/StyleSheetContents.cpp: (WebCore::childRulesHaveFailedOrCanceledSubresources): * inspector/InspectorStyleSheet.cpp: (flattenSourceData): (WebCore::asCSSRuleList): Handle @supports rules where needed. 2013-01-16 Kent Tamura INPUT_MULTIPLE_FIELDS_UI: Unable to edit a time field with step=86400, and confusing appearance https://bugs.webkit.org/show_bug.cgi?id=106983 Reviewed by Kentaro Hara. For example, we show a read-only hour field and a read-only minutes field for because the step value is 24 hours and the hour field can be only 17. However, we need to provide a way to clear the value of the time field in such case. We shouldn't make the hour field read-only if no other fields are editable. - We don't make hour fields read-only for input[type=time]. - We make hour fields read-only for input[type=datetime-local] only if year, month, or day field is editable. e.g. : The hour field is read-only, and year/month/day fields are editable. : The hour field is editable, and year/month/day fields are read-only. Test: fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-readonly-subfield.html * html/shadow/DateTimeEditElement.cpp: (DateTimeEditBuilder): Declare new functions. (WebCore::DateTimeEditBuilder::getRangeOfDayOfMonthField): Added a function by extracting some code from visitField. (WebCore::DateTimeEditBuilder::visitField): (WebCore::DateTimeEditBuilder::shouldDayOfMonthFieldReadOnly): Added a function by extracting some code from visitField. (WebCore::DateTimeEditBuilder::shouldHourFieldReadOnly): If the type is "time", we don't make hour fields read-only. Otherwise, we don't make hour fields read-only if year/month/day fields are read-only. Note that we don't need to check read-only status of year and month fields explicitly here because a day field can be read-only only if the year field and the month field are read-only. 2013-01-16 Allan Sandfeld Jensen [TexMap] Composited CSS shaders crash when using non-GL TextureMapper https://bugs.webkit.org/show_bug.cgi?id=106796 Reviewed by Noam Rosenthal. Fail gracefully when FilterEffectRenderer fails to build the filter effects. * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): 2013-01-15 Vsevolod Vlasov Web Inspector: Store project UISourceCodes in a map with uri as a key for faster lookup. https://bugs.webkit.org/show_bug.cgi?id=106911 Reviewed by Pavel Feldman. * inspector/front-end/Workspace.js: (WebInspector.Project): (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype._fileRemoved): (WebInspector.Project.prototype._reset): (WebInspector.Project.prototype.uiSourceCodeForOriginURL): (WebInspector.Project.prototype.uiSourceCodeForURI): (WebInspector.Project.prototype.uiSourceCodes): 2013-01-15 Vsevolod Vlasov Web Inspector: Introduce file mapping allowing to map network loaded scripts and stylesheets to file system files. https://bugs.webkit.org/show_bug.cgi?id=106795 Reviewed by Pavel Feldman. Introduced file mapping for inspector. FileMapping is essentially an array of MappingEntries where each MappingEntry is a pair of urlPrefix and pathPrefix. When scripts and stylesheets are mapped to uiSourceCodes FileMapping methods are used to establish prefix based matching with file system uiSourceCodes if possible. Test: inspector/file-mapping.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping): (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation): (WebInspector.CompilerScriptMapping.prototype.uiLocationToRawLocation): (WebInspector.CompilerScriptMapping.prototype.get addScript.get this): (WebInspector.CompilerScriptMapping.prototype.get addScript): (WebInspector.CompilerScriptMapping.prototype._bindUISourceCode): (WebInspector.CompilerScriptMapping.prototype._uiSourceCodeAddedToWorkspace): * inspector/front-end/FileMapping.js: Added. (WebInspector.FileMapping): (WebInspector.FileMapping.prototype.hasMappingForURL): (WebInspector.FileMapping.prototype.uriForURL): (WebInspector.FileMapping.prototype.urlForURI): (WebInspector.FileMapping.prototype.setMappings): (WebInspector.FileMapping.prototype.mappings): (WebInspector.FileMapping.prototype._deserialize): (WebInspector.FileMapping.prototype._serialize): (WebInspector.FileMapping.MappingEntry): (WebInspector.FileMapping.MappingEntry.deserialize): (WebInspector.FileMapping.MappingEntry.prototype.matchesURL): (WebInspector.FileMapping.MappingEntry.prototype.matchesURI): (WebInspector.FileMapping.MappingEntry.prototype.uriForURL): (WebInspector.FileMapping.MappingEntry.prototype.urlForURI): (WebInspector.FileMapping.MappingEntry.prototype.serialize): * inspector/front-end/NetworkUISourceCodeProvider.js: (WebInspector.NetworkUISourceCodeProvider.prototype._addFile): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._workspaceUISourceCodeForScript): (WebInspector.ResourceScriptMapping.prototype._scriptsForUISourceCode): * inspector/front-end/ResourceUtils.js: (WebInspector.displayNameForURL): * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping): (WebInspector.SASSSourceMapping.prototype._reloadCSS): (_addURLMapping): (rawLocationToUILocation): (_reset): (WebInspector.SASSSourceMapping.MappingEntry): * inspector/front-end/StylesSourceMapping.js: (WebInspector.StylesSourceMapping): (WebInspector.StylesSourceMapping.prototype.rawLocationToUILocation): (WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace): (WebInspector.StylesSourceMapping.prototype._projectWillReset): (WebInspector.StyleContentBinding.prototype.): (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged): * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2013-01-15 Vsevolod Vlasov Web Inspector: Introduce UISourceCode.originURL(). https://bugs.webkit.org/show_bug.cgi?id=106909 Reviewed by Pavel Feldman. Introduced originURL on UISourceCode showing where UISourceCode in workspace was loaded from. This is neeeded to distinguish it from network request url used by mappings. * inspector/front-end/AdvancedSearchController.js: (WebInspector.FileBasedSearchResultsPane.prototype._createAnchor): (WebInspector.FileBasedSearchResultsPane.prototype.addSearchResult): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints): * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.Placard.prototype._update): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._handleOpenURL): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint): * inspector/front-end/Linkifier.js: (WebInspector.Linkifier.prototype._updateAnchor): (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor): * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorSourceTreeElement): * inspector/front-end/SASSSourceMapping.js: (uiLocationToRawLocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/ScriptsSearchScope.js: (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes): (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes.comparator): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleWorkspaceProvider.prototype.addFile): * inspector/front-end/StyleSheetOutlineDialog.js: (WebInspector.StyleSheetOutlineDialog.prototype.requestItems): * inspector/front-end/StylesSourceMapping.js: (WebInspector.StylesSourceMapping.prototype.uiLocationToRawLocation): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype._tooltipForFile): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.originURL): (WebInspector.UISourceCode.prototype.urlChanged): (WebInspector.UISourceCode.prototype.contentURL): (WebInspector.Revision.prototype.contentURL): * inspector/front-end/Workspace.js: (WebInspector.FileDescriptor): (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype.uiSourceCodeForOriginURL): (WebInspector.Workspace.prototype.uiSourceCodeForOriginURL): 2013-01-16 Gyuyoung Kim [EFL] Move 'DefaultTheme' folder to WebCore/platform/efl https://bugs.webkit.org/show_bug.cgi?id=106969 Reviewed by Benjamin Poulain. DefaultTheme is used by both EFL WK1 and WK2 ports. So, WebCore/platform/efl is appropriate place for it. * platform/efl/DefaultTheme/CMakeLists.txt: Renamed from Source/WebKit/efl/DefaultTheme/CMakeLists.txt. * platform/efl/DefaultTheme/default.edc: Renamed from Source/WebKit/efl/DefaultTheme/default.edc. * platform/efl/DefaultTheme/widget/button/button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/button/button.edc. * platform/efl/DefaultTheme/widget/button/img_button_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/button/img_button_focus.png. * platform/efl/DefaultTheme/widget/button/img_button_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/button/img_button_hover.png. * platform/efl/DefaultTheme/widget/button/img_button_normal.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/button/img_button_normal.png. * platform/efl/DefaultTheme/widget/button/img_button_press.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/button/img_button_press.png. * platform/efl/DefaultTheme/widget/check/check.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/check.edc. * platform/efl/DefaultTheme/widget/check/img_check_bg_disabled.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_disabled.png. * platform/efl/DefaultTheme/widget/check/img_check_bg_enabled.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_enabled.png. * platform/efl/DefaultTheme/widget/check/img_check_off.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_off.png. * platform/efl/DefaultTheme/widget/check/img_check_off_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_off_focus.png. * platform/efl/DefaultTheme/widget/check/img_check_off_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_off_hover.png. * platform/efl/DefaultTheme/widget/check/img_check_on.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_on.png. * platform/efl/DefaultTheme/widget/check/img_check_on_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_on_focus.png. * platform/efl/DefaultTheme/widget/check/img_check_on_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/check/img_check_on_hover.png. * platform/efl/DefaultTheme/widget/combo/combo.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo.edc. * platform/efl/DefaultTheme/widget/combo/combo_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_focus.png. * platform/efl/DefaultTheme/widget/combo/combo_focus_button.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_focus_button.png. * platform/efl/DefaultTheme/widget/combo/combo_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_hover.png. * platform/efl/DefaultTheme/widget/combo/combo_hover_button.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_hover_button.png. * platform/efl/DefaultTheme/widget/combo/combo_normal.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_normal.png. * platform/efl/DefaultTheme/widget/combo/combo_normal_button.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_normal_button.png. * platform/efl/DefaultTheme/widget/combo/combo_press.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_press.png. * platform/efl/DefaultTheme/widget/combo/combo_press_button.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/combo_press_button.png. * platform/efl/DefaultTheme/widget/combo/icon.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/combo/icon.png. * platform/efl/DefaultTheme/widget/entry/entry.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/entry/entry.edc. * platform/efl/DefaultTheme/widget/entry/img_focused.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/entry/img_focused.png. * platform/efl/DefaultTheme/widget/entry/img_hovered.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/entry/img_hovered.png. * platform/efl/DefaultTheme/widget/entry/img_normal.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/entry/img_normal.png. * platform/efl/DefaultTheme/widget/file/file.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/file/file.edc. * platform/efl/DefaultTheme/widget/file/file_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/file/file_focus.png. * platform/efl/DefaultTheme/widget/file/file_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/file/file_hover.png. * platform/efl/DefaultTheme/widget/file/file_normal.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/file/file_normal.png. * platform/efl/DefaultTheme/widget/file/file_press.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/file/file_press.png. * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc. * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc. * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mutebutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/mutebutton/mutebutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/unmutebutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/mutebutton/unmutebutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/pausebutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/playpausebutton/pausebutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playbutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playbutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc. * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc. * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc. * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png. * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption.png. * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png. * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc. * platform/efl/DefaultTheme/widget/progressbar/bt_base.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png. * platform/efl/DefaultTheme/widget/progressbar/progressbar.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc. * platform/efl/DefaultTheme/widget/progressbar/shelf_inset.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png. * platform/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.png. * platform/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.png. * platform/efl/DefaultTheme/widget/radio/img_radio_off.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_off.png. * platform/efl/DefaultTheme/widget/radio/img_radio_off_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_focus.png. * platform/efl/DefaultTheme/widget/radio/img_radio_off_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_hover.png. * platform/efl/DefaultTheme/widget/radio/img_radio_on.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_on.png. * platform/efl/DefaultTheme/widget/radio/img_radio_on_focus.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_focus.png. * platform/efl/DefaultTheme/widget/radio/img_radio_on_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_hover.png. * platform/efl/DefaultTheme/widget/radio/radio.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/radio/radio.edc. * platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar.edc. * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png. * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png. * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png. * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png. * platform/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png. * platform/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png. * platform/efl/DefaultTheme/widget/search/cancel/search_cancel.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/cancel/search_cancel.edc. * platform/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png. * platform/efl/DefaultTheme/widget/search/decoration/search_decoration.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/decoration/search_decoration.edc. * platform/efl/DefaultTheme/widget/search/field/field_focused.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/field/field_focused.png. * platform/efl/DefaultTheme/widget/search/field/field_hovered.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/field/field_hovered.png. * platform/efl/DefaultTheme/widget/search/field/field_normal.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/field/field_normal.png. * platform/efl/DefaultTheme/widget/search/field/search_field.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/search/field/search_field.edc. * platform/efl/DefaultTheme/widget/slider/slider.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider.edc. * platform/efl/DefaultTheme/widget/slider/slider_fill_h.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_fill_h.png. * platform/efl/DefaultTheme/widget/slider/slider_fill_v.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_fill_v.png. * platform/efl/DefaultTheme/widget/slider/slider_h.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_h.png. * platform/efl/DefaultTheme/widget/slider/slider_thumb_h.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_thumb_h.png. * platform/efl/DefaultTheme/widget/slider/slider_thumb_press_h.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_thumb_press_h.png. * platform/efl/DefaultTheme/widget/slider/slider_thumb_press_v.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_thumb_press_v.png. * platform/efl/DefaultTheme/widget/slider/slider_thumb_v.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_thumb_v.png. * platform/efl/DefaultTheme/widget/slider/slider_v.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/slider/slider_v.png. * platform/efl/DefaultTheme/widget/spinner/sp_bg.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_bg.png. * platform/efl/DefaultTheme/widget/spinner/sp_down_default.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_down_default.png. * platform/efl/DefaultTheme/widget/spinner/sp_down_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_down_hover.png. * platform/efl/DefaultTheme/widget/spinner/sp_down_pressed.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_down_pressed.png. * platform/efl/DefaultTheme/widget/spinner/sp_up_default.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_up_default.png. * platform/efl/DefaultTheme/widget/spinner/sp_up_hover.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_up_hover.png. * platform/efl/DefaultTheme/widget/spinner/sp_up_pressed.png: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/sp_up_pressed.png. * platform/efl/DefaultTheme/widget/spinner/spinner.edc: Renamed from Source/WebKit/efl/DefaultTheme/widget/spinner/spinner.edc. 2013-01-16 Kentaro Hara [V8] Make an Isolate parameter mandatory in SerializedScriptValue::deserialize() https://bugs.webkit.org/show_bug.cgi?id=106916 Reviewed by Adam Barth. This is one of steps to remove optional Isolate parameters. No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserialize): (WebCore): (WebCore::SerializedScriptValue::deserializeForInspector): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): 2013-01-16 Ken Kania [Inspector] Add events for tracking page loads and scheduled navigations. https://bugs.webkit.org/show_bug.cgi?id=104168 Reviewed by Pavel Feldman. These events are needed for clients who need to be aware of when a page is navigating or about to navigate. Some clients may wish to prevent interaction with the page during this time. Two of the new events track loading start and stop, as measured by the ProgressTracker. The other two events track when a page has a new scheduled navigation and when it no longer has a scheduled navigation. These latter two events won't allow the client to determine if a load is going to happen in all circumstances, but is sufficient for many cases. Tests: inspector-protocol/page/frameScheduledNavigation.html inspector-protocol/page/frameStartedLoading.html * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::frameStartedLoadingImpl): (WebCore::InspectorInstrumentation::frameStoppedLoadingImpl): (WebCore::InspectorInstrumentation::frameScheduledNavigationImpl): (WebCore::InspectorInstrumentation::frameClearedScheduledNavigationImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::frameStartedLoading): (WebCore): (WebCore::InspectorInstrumentation::frameStoppedLoading): (WebCore::InspectorInstrumentation::frameScheduledNavigation): (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameStartedLoading): (WebCore): (WebCore::InspectorPageAgent::frameStoppedLoading): (WebCore::InspectorPageAgent::frameScheduledNavigation): (WebCore::InspectorPageAgent::frameClearedScheduledNavigation): * inspector/InspectorPageAgent.h: * inspector/front-end/ResourceTreeModel.js: (WebInspector.PageDispatcher.prototype.frameDetached): (WebInspector.PageDispatcher.prototype.frameStartedLoading): (WebInspector.PageDispatcher.prototype.frameStoppedLoading): (WebInspector.PageDispatcher.prototype.frameScheduledNavigation): (WebInspector.PageDispatcher.prototype.frameClearedScheduledNavigation): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::clear): (WebCore::NavigationScheduler::timerFired): (WebCore::NavigationScheduler::startTimer): (WebCore::NavigationScheduler::cancel): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::progressStarted): (WebCore::ProgressTracker::finalProgressComplete): 2013-01-16 Tommy Widenflycht MediaStream API: Update MediaStreamTrack::readyState to match specification https://bugs.webkit.org/show_bug.cgi?id=106781 Reviewed by Kentaro Hara. MediaStreamTrack::readyState now returns a string like the rest of the RTC classes. Existing tests expanded to cover patch. * Modules/mediastream/MediaStream.cpp: (WebCore::processTrack): * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::readyState): (WebCore::MediaStreamTrack::ended): (WebCore): * Modules/mediastream/MediaStreamTrack.h: (MediaStreamTrack): * Modules/mediastream/MediaStreamTrack.idl: 2013-01-16 Andrey Adaikin Web Inspector: array grouping does not work for big and negative number keys https://bugs.webkit.org/show_bug.cgi?id=106891 Reviewed by Pavel Feldman. Fixing array grouping for arrays that contain big or negative number representations as object keys. * inspector/front-end/ObjectPropertiesSection.js: (.buildObjectFragment): 2013-01-16 Andrey Lushnikov Web Inspector: highlight regexp API for DefaultTextEditor https://bugs.webkit.org/show_bug.cgi?id=106801 Reviewed by Pavel Feldman. Add highlightRegexp and removeRegexpHighlight methods to DefaultTextEditor that highlight all occurrences of given regexp in text with given css class. Highlight is done via spans positioned absolutely over the regexp occurences in text. Test: inspector/editor/text-editor-highlight-regexp.html * inspector/front-end/DefaultTextEditor.js: (WebInspector.DefaultTextEditor.prototype.highlightRegex): (WebInspector.DefaultTextEditor.prototype.removeRegexHighlight): (WebInspector.TextEditorMainPanel): (WebInspector.TextEditorMainPanel.prototype.highlightRegex): (WebInspector.TextEditorMainPanel.prototype.removeRegexHighlight): (WebInspector.TextEditorMainPanel.prototype._repaintVisibleChunks): (WebInspector.TextEditorMainPanel.prototype._findRegexOccurrences): (WebInspector.TextEditorMainPanel.prototype._measureRegex): (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight): (WebInspector.TextEditorMainPanel.prototype._paintLine): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.highlightRegex): (WebInspector.TextEditor.prototype.removeRegexHighlight): * inspector/front-end/textEditor.css: (.text-editor-overlay-highlight): (.debug-fadeout): 2013-01-16 Ryosuke Niwa Get rid of Node::createRareData https://bugs.webkit.org/show_bug.cgi?id=106981 Reviewed by Benjamin Poulain. Deleted Node::createRareData. Node::ensureRareData() instantiates NodeRareData or ElementRareData according to the node type. Also encapsulate new by create functions in NodeRareData and ElementRareData. * dom/Element.cpp: (WebCore): * dom/Element.h: (Element): * dom/ElementRareData.h: (WebCore::ElementRareData::create): (ElementRareData): (WebCore::ElementRareData::ElementRareData): * dom/Node.cpp: (WebCore::Node::ensureRareData): (WebCore): * dom/Node.h: (WebCore::NodeRareDataBase::NodeRareDataBase): * dom/NodeRareData.h: (NodeRareData): (WebCore::NodeRareData::create): (WebCore::NodeRareData::NodeRareData): 2013-01-15 Ryosuke Niwa GTK+ and Qt build fix after r139833. Explicitly cast NodeRareDataBase to NodeRareData before deleting it. * dom/Node.cpp: (WebCore::Node::clearRareData): 2013-01-15 Qiankun Miao Remove extra space in CustomFilterRenderer.h https://bugs.webkit.org/show_bug.cgi?id=105783 Reviewed by Dean Jackson. * platform/graphics/filters/CustomFilterRenderer.h: (CustomFilterRenderer): 2013-01-15 Tab Atkins Update CSS3 gradient support to the latest spec version and unprefix. https://bugs.webkit.org/show_bug.cgi?id=67166 Reviewed by Dean Jackson. Tests: fast/gradients/unprefixed-color-stop-units.html fast/gradients/unprefixed-color-stops.html fast/gradients/unprefixed-generated-gradients.html fast/gradients/unprefixed-gradient-parsing.html fast/gradients/unprefixed-linear-angle-gradients.html fast/gradients/unprefixed-linear-right-angle-gradients.html fast/gradients/unprefixed-list-item-gradient.html fast/gradients/unprefixed-radial-gradients.html fast/gradients/unprefixed-radial-gradients2.html fast/gradients/unprefixed-radial-gradients3.html fast/gradients/unprefixed-repeating-end-fill.html fast/gradients/unprefixed-repeating-linear-gradient.html fast/gradients/unprefixed-repeating-radial-gradients.html fast/gradients/unprefixed-zero-range-repeating-gradient-hang.html * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::computeEndPoint): Rename parameters to make more sense. (WebCore::CSSLinearGradientValue::customCssText): (WebCore::CSSLinearGradientValue::createGradient): (WebCore::CSSRadialGradientValue::customCssText): (WebCore::CSSRadialGradientValue::createGradient): * css/CSSGradientValue.h: (CSSGradientValue): (CSSRadialGradientValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseLinearGradient): (WebCore::CSSParser::parseRadialGradient): (WebCore::CSSParser::isGeneratedImageValue): (WebCore::CSSParser::parseGeneratedImage): * css/CSSParser.h: 2013-01-15 Ryosuke Niwa NodeRareData doesn't need to have a vtable pointer https://bugs.webkit.org/show_bug.cgi?id=106965 Reviewed by Benjamin Poulain. Made the destructor and reportMemoryUsage of NodeRareDataBase and NodeRareData respectively and their subclasses non-virtual. * dom/ElementRareData.cpp: (SameSizeAsElementRareData): Added. (WebCore): Added a compile assertion for the size of ElementRareData. * dom/ElementRareData.h: (ElementRareData): * dom/Node.cpp: (WebCore::Node::clearRareData): Explicitely delete NodeRareData or ElementRareData. (WebCore::Node::reportMemoryUsage): Explicitely add NodeRareData or ElementRareData. * dom/Node.h: (NodeRareDataBase): Deleted the virtual destructor. * dom/NodeRareData.cpp: (SameSizeAsNodeRareData): Removed one pointer. * dom/NodeRareData.h: (NodeRareData): Removed the virtual destructor. (NodeRareData::reportMemoryUsage): Made non-virtual. 2013-01-15 Ian Vollick [chromium] Create GraphicsLayerChromiums using a factory https://bugs.webkit.org/show_bug.cgi?id=103635 Reviewed by James Robinson. Refactor graphics layer creation for chromium to go through a factory. No new tests, no change in functionality. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayer::create): 2013-01-15 Charles Wei [BlackBerry] LayerRenderingResults doesn't need to maintain the hole punch rect https://bugs.webkit.org/show_bug.cgi?id=106896 Reviewed by George Staikos. Internally reviewed by Arvid Nilsson and John Griggs. No new tests,clean up code which is not used anymore. * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::drawHolePunchRect): * platform/graphics/blackberry/LayerRenderer.h: (LayerRenderingResults): 2013-01-15 Charles Wei Fullscreen element should not share styles with it's siblings. https://bugs.webkit.org/show_bug.cgi?id=106888 Reviewed by George Staikos. Test: fullscreen/full-screen-no-style-sharing.html * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): 2013-01-15 Tim Horton Clamp TileCache visibleRect to WKView's visibleRect https://bugs.webkit.org/show_bug.cgi?id=106601 Reviewed by Simon Fraser. * platform/graphics/TiledBacking.h: (TiledBacking): Add setExposedRect and setClipsToExposedRect. * platform/graphics/ca/mac/TileCache.h: (TileCache): Add setExposedRect, setClipsToExposedRect, and storage for their respective values. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): Initialize m_clipsToExposedRect to false. (WebCore::TileCache::setExposedRect): Update exposedRect and revalidate tiles. (WebCore::TileCache::setClipsToExposedRect): Update clipsToExposedRect and revalidate tiles; if we're going from unclipped to clipped, we already have tiles, so we can skip tile revalidation. (WebCore::TileCache::computeTileCoverageRect): Intersect exisiting visible rect with exposed rect to get the visible rect we actually care about. (WebCore::TileCache::revalidateTiles): Ditto. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer): Don't create an overhang layer if the frame isn't scrollable. (WebCore::RenderLayerCompositor::requiresContentShadowLayer): Don't create a shadow layer if the frame isn't scrollable. 2013-01-15 Roger Fong Get rid of a straggling dependency on SafariThemeConstants in RenderThemeWin. Rubberstamped by Timothy Horton. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::supportsClosedCaptioning): * rendering/RenderThemeWin.h: 2013-01-15 Hayato Ito Group all request parameters which are used to match CSS Rules into a parameter object. https://bugs.webkit.org/show_bug.cgi?id=106879 Reviewed by Dimitri Glazkov. Introduces a MatchRequest which groups all request parameters to match CSS rules. Factoring, no change in behavior. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRules): (WebCore::StyleResolver::collectMatchingRulesForRegion): (WebCore::StyleResolver::matchScopedAuthorRules): (WebCore::StyleResolver::matchHostRules): (WebCore::StyleResolver::matchAuthorRules): (WebCore::StyleResolver::matchUserRules): (WebCore::StyleResolver::matchUARules): (WebCore::StyleResolver::collectMatchingRulesForList): (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet): * css/StyleResolver.h: (WebCore::StyleResolver::MatchRequest::MatchRequest): (MatchRequest): (StyleResolver): 2013-01-15 Simon Fraser Add the ability for a RenderLayerBacking to have a layer that renders backgrounds. https://bugs.webkit.org/show_bug.cgi?id=106961 Reviewed by Dean Jackson. In some cases we need a compositing layer to render its background into a separate GraphicsLayer (e.g. for background-attachment: fixed in some scenarios). To support this, have RenderLayer optionally create a GraphicsLayer for the background. Currently nothing causes background layers to get created. Having a background layer requires that we add an additional containment layer which encloses the background, primary and foreground layers, since the background layer has to be composited behind the primary content. This containment layer gets any transform, including page scale on the RenderView's layer. No new tests; there's no way to create a background layer yet. This was tested during development by forcing a background layer. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateDebugIndicators): Show borders on both new layers and repaint counters on the background layer. (WebCore::RenderLayerBacking::destroyGraphicsLayers): Clear the two new layers. (WebCore::RenderLayerBacking::updateTransform): If we have a containment layer, it takes the transform (and clear the transform on the primary layer). (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Make the background layer if we need one (currently never). (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Position and size the containment layer if we have one. If we do, then the m_graphicsLayer will be at 0,0 in that containment layer. The background layer is also sized similarly to the foreground layer. (WebCore::RenderLayerBacking::updateInternalHierarchy): Adapt to the new hierarchy with containment and background layers if we have them. (WebCore::RenderLayerBacking::updateBackgroundLayer): Here's where we create the background and containment layers. (WebCore::RenderLayerBacking::childForSuperlayers): If we have a containment layer, that's what gets attached to our parent. (WebCore::RenderLayerBacking::getCurrentTransform): The containment layer gets the transform if we have one, so check that here. (WebCore::RenderLayerBacking::backingStoreMemoryEstimate): (WebCore::RenderLayerBacking::reportMemoryUsage): * rendering/RenderLayerBacking.h: (RenderLayerBacking): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged): We need to start notifying about page/device scale on the containment layer if there is one (since it takes page scale), so use childForSuperlayers() rather than just getting the primary layer. 2013-01-15 Pan Deng Remove Key3 and Challenge Response fields from Websocket implementation and Web Inspector. https://bugs.webkit.org/show_bug.cgi?id=105738. Reviewed by Kent Tamura. Key3 and Challenge Response fields were obsoleted in IETF websocket spec, this patch removes related code in Websocket and Web Inspector No new tests as no new functionality added. * Modules/websockets/WebSocketHandshakeRequest.cpp: remove Key3 related code * Modules/websockets/WebSocketHandshakeRequest.h: (WebSocketHandshakeRequest): * Modules/websockets/WebSocketHandshakeResponse.cpp: remove Challenge response related code * Modules/websockets/WebSocketHandshakeResponse.h: (WebSocketHandshakeResponse): * inspector/Inspector.json: remove Key3 and Challenge response fields definition * inspector/InspectorResourceAgent.cpp: remove Key3 and Challenge response field from inspector agent (WebCore): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest): (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived): * inspector/front-end/RequestHeadersView.js: remove Key3 and Challenge response item from front-end. (WebInspector.RequestHeadersView.prototype._refreshRequestHeaders): (WebInspector.RequestHeadersView.prototype._refreshResponseHeaders): (WebInspector.RequestHeadersView.prototype._refreshHeaders): 2013-01-15 Antti Koivisto ASSERT(!m_queue.killed() && m_threadID) hit in StorageThread::scheduleTask on low memory warning https://bugs.webkit.org/show_bug.cgi?id=106960 Reviewed by Mark Rowe. We were scheduling a memory clearing task to terminated StorageThreads. Remove thread from the active thread list when terminate is scheduled. Add when thread is started. * storage/StorageThread.cpp: (WebCore::activeStorageThreads): (WebCore::StorageThread::StorageThread): (WebCore::StorageThread::~StorageThread): (WebCore::StorageThread::start): (WebCore::StorageThread::terminate): (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads): 2013-01-15 Luke Macpherson Don't do indiscriminate cast & call in StylePropertySet::PropertyReference::cssName() on release builds. https://bugs.webkit.org/show_bug.cgi?id=106867 Reviewed by Darin Adler. Check CSSValue::isVariableValue() before casting to CSSVariableValue. Covered by existing variables tests. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::PropertyReference::cssName): 2013-01-15 Emil A Eklund [Sub pixel layout] RTL cells with padding wraps https://bugs.webkit.org/show_bug.cgi?id=106843 Reviewed by Levi Weintraub. At certain zoom levels table cells with padding wraps for rtl content. Test: fast/sub-pixel/table-rtl-padding.html * rendering/RenderTable.h: Override paddingStart/End to return integer values for padding as we do elsewhere in the table code. 2013-01-15 Dominic Mazzoni Use-after-free in AXObjectCache::notificationPostTimerFired https://bugs.webkit.org/show_bug.cgi?id=106106 Reviewed by Ryosuke Niwa. Fixes a crash that occurs when a Node is adopted by another document, in particular one that isn't part of the page, and then deleted, which wasn't triggering the code that removed the Node from AXObjectCache. Now, a Node is removed from the AXObjectCache whenever its Document changes. Test: accessibility/crash-adopt-node-from-new-document.html * dom/Node.cpp: (WebCore::Node::didMoveToNewDocument): 2013-01-15 Arnaud Renevier Add Canvas blend modes to Cairo https://bugs.webkit.org/show_bug.cgi?id=105074 Reviewed by Martin Robinson. Blend mode implementation for cairo. If BlendMode is normal, use CompositeOperator; otherwise, consider CompositeOperator is source-over. Add toCairoOperator(BlendMode) to translate BlendMode to matching cairo_operator_t. * platform/graphics/cairo/BitmapImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::toCairoOperator): * platform/graphics/cairo/CairoUtilities.h: (WebCore): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): 2013-01-15 Dima Gorbik Implement matching by the voice attribute for WebVTT ::cue pseudo element https://bugs.webkit.org/show_bug.cgi?id=106762 Reviewed by Eric Carlson. Implemented matching cue WebVTT elements by a voice attribute by adding a WebVTT specific voice attribute. For DOM trees title attribute is used instead as this is required by specs. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): set a title argument instead of a voice attribute for the DOM tree. * html/track/TextTrackCue.h: (WebCore::TextTrackCue::voiceAttributeName): * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2013-01-15 Simon Fraser Some ScrollingCoördinator-related cleanup in RenderLayerBacking https://bugs.webkit.org/show_bug.cgi?id=106950 Reviewed by Beth Dakin. Wrap up code that gets the ScrollingCoordinator into a utility function. Pull code out of updateGraphicsLayerGeometry() that registers layers with the ScrollingCoordinator, for cleanliness. * rendering/RenderLayerBacking.cpp: (WebCore::scrollingCoordinatorFromLayer): (WebCore::RenderLayerBacking::adjustTileCacheCoverage): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::registerScrollingLayers): (WebCore::RenderLayerBacking::attachToScrollingCoordinatorWithParent): (WebCore::RenderLayerBacking::detachFromScrollingCoordinator): * rendering/RenderLayerBacking.h: (RenderLayerBacking): 2013-01-15 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=106940 Suspend CSS animations for background tabs Reviewed by Simon Fraser. * page/Page.cpp: (WebCore::Page::setVisibilityState): 2013-01-15 Levi Weintraub Unreviewed, rolling out r139790. http://trac.webkit.org/changeset/139790 https://bugs.webkit.org/show_bug.cgi?id=106948 The patch is failing its own test. * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::parserRemoveChild): (WebCore::ContainerNode::parserAppendChild): * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::executeParsingBlockingScript): (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): (WebCore::HTMLScriptRunner::execute): (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad): (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets): (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): (WebCore::HTMLScriptRunner::runScript): 2013-01-15 Emil A Eklund REGRESSION (r121599): incorrect border scaling when zoomed https://bugs.webkit.org/show_bug.cgi?id=106944 Reviewed by Levi Weintraub. Fix bug in ApplyPropertyComputeLength::applyValue where zooming of non-pixel values was incorrect. Test: fast/sub-pixel/zoomed-em-border.html * css/StyleBuilder.cpp: (WebCore::ApplyPropertyComputeLength::applyValue): 2013-01-15 Simon Fraser Rename RenderLayerBacking's m_containmentLayer to m_childContainmentLayer to better describe its purpose https://bugs.webkit.org/show_bug.cgi?id=106947 Reviewed by Dean Jackson. Simple rename of m_containmentLayer to m_childContainmentLayer. I'll be adding another "container" layer for background layers shortly, and wanted to improve clarity. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateInternalHierarchy): (WebCore::RenderLayerBacking::updateClippingLayers): (WebCore::RenderLayerBacking::parentForSublayers): (WebCore::RenderLayerBacking::backingStoreMemoryEstimate): (WebCore::RenderLayerBacking::reportMemoryUsage): * rendering/RenderLayerBacking.h: (WebCore::RenderLayerBacking::hasClippingLayer): (WebCore::RenderLayerBacking::clippingLayer): (WebCore::RenderLayerBacking::hasTileCacheFlatteningLayer): (WebCore::RenderLayerBacking::tileCacheFlatteningLayer): (RenderLayerBacking): 2013-01-15 Enrica Casucci Add a new set of WebKit2 APIs for text search and search results management. https://bugs.webkit.org/show_bug.cgi?id=106834. Reviewed by Simon Fraser. Adding new API to perform text search in WebKit2 without using the stock UI. The new interface provides all the information necessary to write a custom UI for search. Added new TextWebKitAPI test. * WebCore.exp.in: Added new exported methods. * editing/Editor.cpp: (WebCore::Editor::countMatchesForText): Added new parameter to store all the ranges relative to the matches found. * editing/Editor.h: Modified the interface of countMatchesForText and removed the other definition of countMatchesForText with a different signature. * page/Page.cpp: (WebCore::Page::findStringMatchingRanges): Added. (WebCore::Page::markAllMatchesForText): Changed to use the new unified countMatchesForText. * page/Page.h: 2013-01-15 Alexandru Chiculita [Compositor] Do not disable overlap testing for layers in front of 3D transformed layers https://bugs.webkit.org/show_bug.cgi?id=106721 Reviewed by Simon Fraser. RenderLayerCompositor is checking for overlapping layers and tries to figure out all the layers that need to be drawn using composited layers. It doesn't know anything about animations yet and it only works with "start" and "end" states. However, it knows that animations might happen, so in that cases it will avoid to do any optimizations, as layers might get moved. The overlapping layers optimization was also disabled for 3D layers. However, 3D layers can be computed in WebKit and can be checked for overlap using just the "start"/"stop" states. In this patch I enable that optimization for 3D layers, too. The result is that more layers are drawn in software mode now, so I've updated a couple of test results. Tests: compositing/layer-creation/overlap-transformed-3d.html compositing/layer-creation/overlap-transformed-preserved-3d.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): 2013-01-15 Elliott Sprehn HTML parser should queue MutationRecords for its operations https://bugs.webkit.org/show_bug.cgi?id=89351 Reviewed by Eric Seidel. Generate mutation records inside the parser. This is done by using a ChildListMutationScope in the ContainerNode::parser* methods and then adding delivery before each ' tag. (WebCore): * page/Console.h: (WebCore): (Console): Update the public API to accept a Document* and little else. * page/DOMWindow.cpp: (WebCore::DOMWindow::printErrorMessage): Don't generate a stack here. We can do it later. * svg/SVGDocumentExtensions.cpp: (WebCore::reportMessage): Drop the URL and line number. We'll generate them. It'll be sweet. * workers/WorkerContext.cpp: (WebCore::WorkerContext::addConsoleMessage): (WebCore): * workers/WorkerContext.h: (WorkerContext): Implement the new addConsoleMessage variant. 2012-12-04 Carlos Garcia Campos Reduce the children repaints when moved multiple times during the layout https://bugs.webkit.org/show_bug.cgi?id=103510 Reviewed by Darin Adler. Cache the children positions before the layout and move to the final position after the layout. Test: css3/flexbox/repaint-column-reverse.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator): Do not call first() on the consructor. (WebCore::RenderFlexibleBox::layoutBlock): Use a Vector with the children frame rects before the layout and call repaintChildrenDuringLayoutIfMoved() to repaint the children that have been moved. (WebCore::RenderFlexibleBox::appendChildrenFrameRects): Return a Vector with children frame rects. (WebCore::RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved): Call repaintDuringLayoutIfMoved() for every children using the old frame rects. (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Do not call repaintDuringLayoutIfMoved(). (WebCore::RenderFlexibleBox::layoutFlexItems): Make sure the passed iterator points to the first child. * rendering/RenderFlexibleBox.h: 2012-12-05 Dan Carney [V8] toV8Fast for all classes with ScriptWrapper Holder objects https://bugs.webkit.org/show_bug.cgi?id=102686 Reviewed by Adam Barth. This patch makes most generated bindings use toV8Fast by adding a fast path to the main world DOMDataStore. Additionally, toV8Fast is now being called on callbacks which use v8::Arguments. No new tests. No change in functionality. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNormalAttrGetter): (GenerateFunctionCallString): (NativeToJSValue): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::mainWorldStore): (WebCore::DOMDataStore::current): * bindings/v8/DOMDataStore.h: 2012-12-05 Andrey Adaikin Web Inspector: [Canvas] nit: add more typization for js compiler https://bugs.webkit.org/show_bug.cgi?id=103994 Reviewed by Pavel Feldman. * inspector/InjectedScriptCanvasModuleSource.js: (.): 2012-12-05 Hans Muller [CSS Exclusions] ExclusionShape inlines should use isFlippedBlocksWritingMode() https://bugs.webkit.org/show_bug.cgi?id=103939 Reviewed by Dirk Schulze. Just a minor cleanup: the protected ExclusionShape inlines, like minYForLogicalLine(), now use isFlippedBlocksWritingMode() instead of testing for RightToLeftWritingMode directly. This changeimproves consistency with the rest of WebKit and will work correctly if "horizontal-bt" writing-mode support is ever added. No new tests were added since the existing tests cover these methods. * rendering/ExclusionShape.h: (WebCore::ExclusionShape::minYForLogicalLine): (WebCore::ExclusionShape::maxYForLogicalLine): (WebCore::ExclusionShape::internalToLogicalBoundingBox): 2012-12-05 Bear Travis Absolutely positioned non-replaced elements should resolve vertical margins against their containing block's logical width https://bugs.webkit.org/show_bug.cgi?id=103576 Reviewed by Emil A Eklund. According to the CSS box model specification, all percentage margin & padding values, including top & bottom, should be resolved based on the containing block's width. http://www.w3.org/TR/CSS2/box.html#margin-properties The writing modes specification has refined this definition to use the containing block's logical width to resolve percentage margin & padding values. http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping Previously, positioned elements measured their container in the element's block direction (containerLogicalHeight) to resolve margin-before/after, and in the inline direction (containerLogicalWidth) to resolve margin-start/end. This patch measures the container's logical width in its own inline direction (containerRelativeLogicalWidth) to resolve all margin percentage values. Test: fast/writing-mode/percentage-margins-absolute.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePositionedLogicalWidthUsing): Calculate the logical width of the container, and use it to calculate margins. (WebCore::RenderBox::computePositionedLogicalHeightUsing): Ditto. 2012-12-04 Kentaro Hara [V8] Replace String::New("symbol") with String::NewSymbol("symbol") (part 2) https://bugs.webkit.org/show_bug.cgi?id=104082 Reviewed by Adam Barth. V8 can look up symbols faster than strings. No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferViewCustom.cpp: (WebCore::getHiddenCopyMethod): (WebCore::installHiddenCopyMethod): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::DialogHandler::dialogCreated): (WebCore::DialogHandler::returnValue): * bindings/v8/custom/V8GeolocationCustom.cpp: (WebCore::createPositionOptions): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::wrapInShadowObject): (WebCore::V8HTMLDocument::openCallback): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::V8HTMLImageElementConstructor::GetTemplate): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): 2012-12-04 Elliott Sprehn Clicking a scrollbar unfocuses the current activeElement https://bugs.webkit.org/show_bug.cgi?id=96335 Reviewed by Ojan Vafai. Previously we only tested for clicks inside frame scrollbars before moving the focus, this patch expands the check to overflow scrollbars. Now clicking inside a scrollbar only moves the focus when the scrollbar has an ancestor that is mouse focusable. This matches Gecko behavior, and was agreed to be the most sensible for now: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037759.html Test: fast/overflow/scrollbar-click-retains-focus.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): Never start selections inside scrollbars because it would cause asserts. This wasn't a problem before because we always moved the focus when clicking a scrollbar. (WebCore::EventHandler::dispatchMouseEvent): Check that the click is not inside a scrollbar before moving the focus. (WebCore::EventHandler::isInsideScrollbar): Tests if a point is in a scrollbar. (WebCore): (WebCore::EventHandler::sendContextMenuEvent): Never start selections inside scrollbars because it would cause asserts. * page/EventHandler.h: (EventHandler): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestOverflowControls): 2012-12-04 Kentaro Hara [V8] Replace String::New("symbol") with String::NewSymbol("symbol") https://bugs.webkit.org/show_bug.cgi?id=104084 Reviewed by Adam Barth. V8 can look up symbols faster than strings. This is a final patch for the replacement. No tests. No change in behavior. * bindings/v8/DateExtension.cpp: (WebCore::DateExtension::setAllowSleep): (WebCore::DateExtension::GetNativeFunction): * bindings/v8/NPV8Object.cpp: (WebCore::npIdentifierToV8Identifier): (_NPN_Invoke): * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::setContextDebugId): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::callDebuggerMethod): (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::removeBreakpoint): (WebCore::ScriptDebugServer::clearBreakpoints): (WebCore::ScriptDebugServer::setBreakpointsActivated): (WebCore::ScriptDebugServer::handleV8DebugEvent): (WebCore::ScriptDebugServer::dispatchDidParseSource): * bindings/v8/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): (WebCore::ScriptGlobalObject::get): (WebCore::ScriptGlobalObject::remove): * bindings/v8/V8Binding.h: (WebCore::toV8Sequence): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::setInjectedScriptContextDebugId): (WebCore::V8DOMWindowShell::updateDocumentProperty): (WebCore::V8DOMWindowShell::clearDocumentProperty): * bindings/v8/V8NPObject.cpp: (WebCore::npObjectPropertyEnumerator): * bindings/v8/V8NodeFilterCondition.cpp: (WebCore::V8NodeFilterCondition::acceptNode): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::constructorOfToString): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initializeContextIfNeeded): * bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::addListener): 2012-12-04 Dan Bernstein Support text-orientation: sideways-right (and sideways when it maps to sideways-right) https://bugs.webkit.org/show_bug.cgi?id=104035 Reviewed by Anders Carlsson. Test: fast/text/orientation-sideways.html * GNUmakefile.list.am: Updated for rename of TextOrientation.h. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to retrieve text-orientation from RenderStyle rather than from the font description. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Added sideways and sideways-right as acceptable text-orientation values. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mappings for sideways and sideways-right. (WebCore::CSSPrimitiveValue::operator TextOrientation): Ditto. * css/CSSValueKeywords.in: Added sideways and sideways-right. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Removed text-orientation property handler, as it is now handled in CSSStyleResolver. * css/StyleResolver.cpp: (WebCore::getFontAndGlyphOrientation): Added this helper function that determines the font orientation and non-CJK glyph orientation based on writing-mode and text-orientation. (WebCore::StyleResolver::styleForDocument): Added code to set the font orientation and non-CJK glyph orientation in the document style. (WebCore::checkForOrientationChange): Added. Sets the font orientation and non-CJK glyph orientation in the child style if the difference between the parent and child styles requires doing so. (WebCore::StyleResolver::updateFont): Added call to checkForOrientationChange(). (WebCore::StyleResolver::applyProperty): Changed the writing-mode case to call the new setWritingMode helper, which dirties the font as needed, rather than changing the font here. Moved handling of text-orientation here, by calling setTextOrientation, which also dirties the font as needed. * css/StyleResolver.h: (WebCore::StyleResolver::setWritingMode): Added. Dirties the font if the writing mode changes. (WebCore::StyleResolver::setTextOrientation): Ditto for text orientation. * platform/graphics/FontDescription.h: (WebCore::FontDescription::FontDescription): Updated initializer for rename. (WebCore::FontDescription::nonCJKGlyphOrientation): Renamed textOrientation to this. (WebCore::FontDescription::setNonCJKGlyphOrientation): Renamed setTextOrientation to this. (FontDescription): Renamed member variable m_textOrientation to m_nonCJKGlyphOrientation. (WebCore::FontDescription::operator==): Updated for rename. * platform/graphics/FontFastPath.cpp: (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Renamed glyphDataAndPageForCharacterWithTextOrientation to this and changed the parameter type from TextOrientation to NonCJKGlyphOrientation. (WebCore::Font::glyphDataAndPageForCharacter): Updated for above rename. * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore::Font::fontDataForCombiningCharacterSequence): Updated for rename of FontDescription::textOrientation(). * platform/text/NonCJKGlyphOrientation.h: Renamed TextOrientation.h to this, and renamed the enum and its values to better reflect that they describe how glyphs for non-CJK characters are to be rendered in vertical text. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::requiresIdeographicBaseline): Updated for rename of FontDescription::textOrientation(). * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): Made text-orientation change a layout change. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::setTextOrientation): Added. * rendering/style/RenderStyleConstants.h: Added a new TextOrientation enum here. * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialization and copying of m_textOrientation member variable. (WebCore::StyleRareInheritedData::operator==): Added comparing of m_textOrientation. * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): Added m_textOrientation member variable. 2012-12-04 Kentaro Hara [V8] Use ScopedPersistent for IntegerCache::smallIntegers https://bugs.webkit.org/show_bug.cgi?id=104066 Reviewed by Adam Barth. We can use ScopedPersistent for IntegerCache::smallIntegers instead of manual Persistent::New(). I confirmed no performance regression in Bindings/scroll-top.html No tests. No change in behavior. * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::V8PerIsolateData): * bindings/v8/V8ValueCache.cpp: (WebCore::IntegerCache::IntegerCache): * bindings/v8/V8ValueCache.h: (IntegerCache): (WebCore::IntegerCache::v8Integer): (WebCore::IntegerCache::v8UnsignedInteger): 2012-12-04 Eugene Klyuchnikov Web Inspector: Resources: domain cookies are not shown for sub-sub domain pages. https://bugs.webkit.org/show_bug.cgi?id=104016 Reviewed by Pavel Feldman. Fixed regexp to allow zero or more subdomain prefix (was zero or one). * inspector/front-end/CookieParser.js: (WebInspector.Cookies.cookieDomainMatchesResourceDomain): Fixed regexp. 2012-12-04 Alpha Lam Not reviewed. Build fix. Fix Chromium Windows build. * platform/graphics/chromium/ImageDecodingStore.h: (CacheEntry): 2012-12-04 Kentaro Hara [V8] Remove toV8Object() https://bugs.webkit.org/show_bug.cgi?id=103987 Reviewed by Adam Barth. toV8Object() is used only for MessagePort and ArrayBuffer only by SerializedScriptValue. It is wasteful to generate toV8Object() for all interfaces. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/test/V8/V8Float64Array.h: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: * bindings/scripts/test/V8/V8TestEventConstructor.h: * bindings/scripts/test/V8/V8TestEventTarget.h: * bindings/scripts/test/V8/V8TestException.h: * bindings/scripts/test/V8/V8TestInterface.h: * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: * bindings/scripts/test/V8/V8TestNamedConstructor.h: * bindings/scripts/test/V8/V8TestNode.h: * bindings/scripts/test/V8/V8TestObj.h: * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: * bindings/v8/SerializedScriptValue.cpp: 2012-12-04 Kentaro Hara [V8] Replace v8::Null(isolate) with v8Null(isolate) https://bugs.webkit.org/show_bug.cgi?id=104070 Reviewed by Adam Barth. v8Null(isolate) is a faster version of v8::Null(isolate). No tests. No change in behavior. * bindings/v8/V8Binding.h: (WebCore::v8StringOrNull): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAccessorGetter): (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter): (WebCore::V8Coordinates::headingAccessorGetter): (WebCore::V8Coordinates::speedAccessorGetter): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter): (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter): (WebCore::V8DeviceMotionEvent::intervalAccessorGetter): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter): (WebCore::V8DeviceOrientationEvent::betaAccessorGetter): (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter): (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAccessorGetter): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAccessorGetter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): 2012-12-04 Min Qin Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it https://bugs.webkit.org/show_bug.cgi?id=103555 Reviewed by Stephen White. Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef. No test added for now as impl side paiting is still WIP. * platform/graphics/chromium/LazyDecodingPixelRef.cpp: (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::PrepareToDecode): (WebCore): (WebCore::LazyDecodingPixelRef::Decode): * platform/graphics/chromium/LazyDecodingPixelRef.h: (LazyDecodingPixelRef): 2012-12-04 Takashi Sakamoto Fix compile error when SVG is disabled. Unreviewed gardening. * css/StyleResolver.cpp: (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes): 2012-12-04 Anthony Scian Static code analysis warning fixes https://bugs.webkit.org/show_bug.cgi?id=103837 Reviewed by Rob Buis. 172,174: disable copy ctor, op= in AutofillBackingStore 504,506: disable copy ctor, op= in CookieManager 1488,1491: disable copy ctor, op= in RSSParserBase 1489,1490: disable copy ctor, op= in RSSItem 514,516: disable copy ctor, op= in CredentialBackingStore 1363: m_state not initialized in ctor * platform/blackberry/CookieManager.h: * platform/blackberry/PlatformTouchPointBlackBerry.cpp: (WebCore::PlatformTouchPoint::PlatformTouchPoint): * platform/network/blackberry/AutofillBackingStore.h: (AutofillBackingStore): * platform/network/blackberry/CredentialBackingStore.h: (CredentialBackingStore): * platform/network/blackberry/rss/RSSParserBase.h: (RSSParserBase): 2012-12-04 Noel Gordon [v8] Improve worker.postMessage() string performance: avoid utf8 conversion https://bugs.webkit.org/show_bug.cgi?id=102230 Reviewed by Eric Seidel. Avoid utf8 conversion when serializing strings with SerializedScriptValue. Provide Ascii and UChar writers for v8 string serialization and provide a UChar reader for deserialization. Define/use serialization StringUCharTag to indicate UChar strings in the wire format. Increment the SerializedScriptValue wire format version. In the wire format, StringUCharTag is followed by the string length in bytes, then the length/2 UChars of the string. Note the string length is VarInt encoded. During serialization, compute the number of bytes used to encode the length and prepend a PaddingTag if needed so the UChar data appears on an even-byte boundary. This prevents unaligned reads of UChar data during deserialization (the deserialization buffer is even-byte aligned). Testing transfers of large strings to and from workers indicates a 10X improvement in transfer rate for strings, and strings within js objects, with this change. For example, 500 MByte/s on my test machine (50 MByte/s without this change) for flat, 32 MByte string postMessage() transfers. Covered by platform/chromium/fast/storage/serialized-script-value.html * bindings/v8/SerializedScriptValue.cpp: 2012-12-04 Kentaro Hara [V8] V8Binding::v8ExternalString() is redundant https://bugs.webkit.org/show_bug.cgi?id=103979 Reviewed by Adam Barth. v8String(), v8StringOrNull() and v8StringOrUndefined() are enough. We can remove V8Binding::v8ExternalString(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::compileAndRunScript): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::compileScript): * bindings/v8/V8Binding.h: (WebCore): (WebCore::v8String): (WebCore::v8StringOrNull): (WebCore::v8StringOrUndefined): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): 2012-12-04 Kentaro Hara [V8] Remove v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString() https://bugs.webkit.org/show_bug.cgi?id=103981 Reviewed by Adam Barth. v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString() are equivalent to what StringResource does. No tests. No change in behavior. * bindings/v8/V8Binding.cpp: * bindings/v8/V8Binding.h: (WebCore::toWebCoreString): (WebCore): (WebCore::toWebCoreStringWithNullCheck): (WebCore::toWebCoreStringWithUndefinedOrNullCheck): (WebCore::toWebCoreAtomicString): (WebCore::toWebCoreAtomicStringWithNullCheck): * bindings/v8/V8StringResource.h: (WebCore::V8StringResource::V8StringResource): (V8StringResource): 2012-12-04 Abhishek Arya Crash in WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode https://bugs.webkit.org/show_bug.cgi?id=103515 Reviewed by Ryosuke Niwa. |current| is weak node pointer that iterates in the hierarchy chain between |highestAncestor| and |targetNode|. Script executed as part of iframe onload event can blow away the nodes and we no longer have |targetNode| in our descendants chain. So, we RefPtr |current| and bail out when |targetNode| stops being a part of descendant chain. Test blocked on https://bugs.webkit.org/show_bug.cgi?id=104044. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): 2012-12-04 Bruno de Oliveira Abinader Avoid repeated calls to decorationColor on RenderObject::getTextDecorationColors https://bugs.webkit.org/show_bug.cgi?id=94131 Reviewed by Brent Fulgham. Replaces repeated calls to decorationColor by adding a variable that reads the return value from that function just once on each loop and gets used upon need. This change won't affect text decoration behavior, so current tests suffice. * rendering/RenderObject.cpp: (WebCore::RenderObject::getTextDecorationColors): 2012-12-04 Alpha Lam [chromium] Implement cache eviction logic in ImageDecodingStore https://bugs.webkit.org/show_bug.cgi?id=103480 Reviewed by James Robinson. This patch implements these features in the new image cache: - Least-recently-used eviction logic - Setting cache limit (default is 32MB) - Remove cache entries when ImageFrameGenerator is removed New tests in ImageDecodingTestTest. Also covered by platform/chromium/virtual/deferred. * platform/graphics/chromium/ImageDecodingStore.cpp: (WebCore::ImageDecodingStore::ImageDecodingStore): (WebCore::ImageDecodingStore::~ImageDecodingStore): Code to assert that everything is cleaned up. (WebCore::ImageDecodingStore::lockCompleteCache): (WebCore::ImageDecodingStore::unlockCache): (WebCore::ImageDecodingStore::insertAndLockCache): (WebCore::ImageDecodingStore::removeCacheIndexedByGenerator): New method to remove all cache entries index by ImageFrameGenerator. (WebCore): (WebCore::ImageDecodingStore::setCacheLimitInBytes): (WebCore::ImageDecodingStore::memoryUsageInBytes): (WebCore::ImageDecodingStore::cacheEntries): (WebCore::ImageDecodingStore::prune): New code to implement LRU eviction logic. (WebCore::ImageDecodingStore::insertCacheInternal): New method to help new cache insertion. This is separately because it touches 3 containers. (WebCore::ImageDecodingStore::removeFromCacheInternal): New method to help remove a cache entry from containers. (WebCore::ImageDecodingStore::removeFromCacheListInternal): New helper method to help remove cache entry from doubly linked list. * platform/graphics/chromium/ImageDecodingStore.h: (ImageDecodingStore): (CacheEntry): (WebCore::ImageDecodingStore::CacheEntry::createAndUse): (WebCore::ImageDecodingStore::CacheEntry::CacheEntry): (WebCore::ImageDecodingStore::CacheEntry::~CacheEntry): (WebCore::ImageDecodingStore::CacheEntry::cacheKey): (WebCore::ImageDecodingStore::CacheEntry::cachedImage): (WebCore::ImageDecodingStore::CacheEntry::useCount): (WebCore::ImageDecodingStore::CacheEntry::incrementUseCount): (WebCore::ImageDecodingStore::CacheEntry::decrementUseCount): (WebCore::ImageDecodingStore::CacheEntry::memoryUsageInBytes): (WebCore::ImageDecodingStore::incrementMemoryUsage): (WebCore::ImageDecodingStore::decrementMemoryUsage): New helper methods. * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::~ImageFrameGenerator): 2012-12-04 Andreas Kling Style sharing: Allow sharing between elements with classes not referenced by any selectors. Reviewed by Antti Koivisto. When looking for elements that can share style, instead of blindly rejecting candidates with a different "class" attribute, check if it's actually referenced by any of the tracked style rules. It's surprisingly common for web pages to have elements with classes to which no rules apply, mediawiki content is especially good at this. ~2100 new sharing "hits" on . * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Don't bail early if the two elements have different return values for hasClass(). (WebCore::StyleResolver::classNamesAffectedByRules): Helper function that returns whether a SpaceSplitString contains a class name referenced by any style rules. (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes): Make this a member function since we need access to m_features.classesInRules. * css/StyleResolver.h: (StyleResolver): * css/StyleResolver.cpp: (WebCore::StyleResolver::locateSharedStyle): Cache whether the element we're resolving style for has a "class" attribute referenced by style rules. 2012-12-04 Silvia Pfeiffer Refactor Media Control Elements to remove code duplication. https://bugs.webkit.org/show_bug.cgi?id=101877 Reviewed by Eric Carlson. Instead of having two different types of inheritance trees for MediaControlElement and MediaControlInputElement, this creates a stand-alone virtual class MediaControlElement that provides the common functions: show(), hide(), isShowing(), setMediaController(), displayType(), isMediaControlElement(), shadowPseudoId(), mediaController(), setDisplayType(). The individual elements inherit from MediaControlElement and either HTMLInputElement or HTMLDivElement. They extend/override the base functions as appropriate. As part of this, the RenderXXX classes mixed in between the media controls in MediaControlElements.cpp are also moved to rendering/RenderMediaControls.h/cpp to follow common code separation. No new tests since this is just a refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Build files extended with new files. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::textTracksIndexNotFound): Replaced const with function, since it is used in multiple files. * html/shadow/MediaControlElementTypes.cpp: new file * html/shadow/MediaControlElementTypes.h: new file Added new MediaControlElement class. Moved MediaControlDivElement and MediaControlInputElement classes into these files from MediaControlElements.cpp/h. Moved MediaControlElementTypes enum into these. Moved other media control element classes that are the basis for inheriting media control elements into these (MediaControlTimeDisplayElement, MediaControlMuteButtonElement, MediaControlSeekButtonElement, MediaControlVolumeSliderElement). * html/shadow/MediaControlElements.cpp: * html/shadow/MediaControlElements.h: Removed common functions between media elements that are now in the common base class MediaControlElement. Also moved common base classes to MediaControlElementTypes.h/cpp * html/shadow/MediaControls.cpp: * html/shadow/MediaControls.h: Renamed MediaControlVolumeSliderElement to MediaControlPanelVolumeSliderElement to be consistent in inheritance tree. Updated copyright date. * html/shadow/MediaControlsApple.cpp: * html/shadow/MediaControlsApple.h: Renamed MediaControlVolumeSliderElement to MediaControlPanelVolumeSliderElement to be consistent in inheritance tree. Updated copyright dates.n * html/shadow/MediaControlsChromium.cpp: * html/shadow/MediaControlsChromium.h: Renamed MediaControlVolumeSliderElement to MediaControlPanelVolumeSliderElement to be consistent in inheritance tree. Moved enclosure element definitions to common MediaControlElements.cpp/h file through which different media elements are made available to different ports. * html/shadow/MediaControlsChromiumAndroid.cpp: * html/shadow/MediaControlsChromiumAndroid.h: Moved enclosure for overlay button to MediaControlElements.cpp/h files through which different media elements are made available to different ports. * rendering/RenderMediaControlElements.cpp: new file * rendering/RenderMediaControlElements.h: new file Moved rendering classes for media control elements into these files from MediaControlElements.cpp/h. * rendering/RenderThemeMac.mm: Added new RenderMediaControlElements.h file. * rendering/RenderingAllInOne.cpp: Added new RenderMediaControlEleemnt.cpp file. 2012-12-04 Kenneth Russell Associate URLs with GraphicsContext3D instances created for WebGL https://bugs.webkit.org/show_bug.cgi?id=103793 Reviewed by Adam Barth. Pass down the URL of the topmost frame's document creating the WebGL context to the platform layer through GraphicsContext3D::Attributes. Not feasible to write a layout test for this change; has no user-visible effect. Tested manually with failure injection in Chromium port. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::create): Pass top document's URL in context creation attributes. * platform/chromium/support/GraphicsContext3DChromium.cpp: (WebCore::GraphicsContext3D::create): Pass URL through WebKit API. * platform/graphics/GraphicsContext3D.h: (Attributes): Add top document's URL to context creation attributes. 2012-12-04 Yury Semikhatsky Web Inspector: simplify reportMemoryUsage signature https://bugs.webkit.org/show_bug.cgi?id=104028 Reviewed by Vsevolod Vlasov. Removed const& modifier from instrumented pointer type. Was const T* const&, now it is const T* * platform/graphics/NativeImagePtr.h: (WebCore): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::reportMemoryUsage): 2012-12-04 Adam Barth [V8] Rename V8DOMWrapper member functions to be more descriptive https://bugs.webkit.org/show_bug.cgi?id=104069 Reviewed by Eric Seidel. In addition to the renames, this patch also inline lookupDOMWrapper into its callers. * bindings/scripts/CodeGeneratorV8.pm: (GenerateDomainSafeFunctionGetter): (GenerateDomainSafeFunctionSetter): (GenerateNormalAttrGetter): (GenerateSingleConstructorCallback): (GenerateEventConstructorCallback): (GenerateNamedConstructorCallback): (GenerateToV8Converters): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): * bindings/v8/PageScriptDebugServer.cpp: (WebCore::retrieveFrameWithGlobalObjectCheck): * bindings/v8/V8Binding.cpp: (WebCore::toDOMWindow): (WebCore::toScriptExecutionContext): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::clearForNavigation): (WebCore::V8DOMWindowShell::installDOMWindow): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::create): * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): (WebCore::V8DOMWrapper::setNativeInfo): (WebCore::V8DOMWrapper::clearNativeInfo): (WebCore::V8DOMWrapper::associateObjectWithWrapper): * bindings/v8/V8Initializer.cpp: (WebCore::findFrame): * bindings/v8/V8NPObject.cpp: (WebCore::createV8ObjectForNPObject): (WebCore::forgetV8ObjectForNPObject): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initializeContextIfNeeded): (WebCore::WorkerScriptController::controllerForContext): * bindings/v8/custom/V8ArrayBufferCustom.cpp: (WebCore::V8ArrayBuffer::constructorCallbackCustom): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::wrapArrayBufferView): (WebCore::constructWebGLArray): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallbackCustom): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCallbackCustom): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::eventAccessorGetter): (WebCore::V8DOMWindow::eventAccessorSetter): (WebCore::V8DOMWindow::toStringCallback): (WebCore::V8DOMWindow::namedSecurityCheck): (WebCore::V8DOMWindow::indexedSecurityCheck): (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCallbackCustom): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::wrapInShadowObject): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): * bindings/v8/custom/V8InjectedScriptManager.cpp: (WebCore::createInjectedScriptHostV8Wrapper): (WebCore::InjectedScriptManager::canAccessInspectedWindow): * bindings/v8/custom/V8IntentCustom.cpp: (WebCore::V8Intent::constructorCallbackCustom): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAccessorGetter): (WebCore::V8Location::replaceAccessorGetter): (WebCore::V8Location::assignAccessorGetter): * bindings/v8/custom/V8MessageChannelCustom.cpp: (WebCore::V8MessageChannel::constructorCallbackCustom): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::initMessageEventCallback): * bindings/v8/custom/V8MutationObserverCustom.cpp: (WebCore::V8MutationObserver::constructorCallbackCustom): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WebKitPointCustom.cpp: (WebCore::V8WebKitPoint::constructorCallbackCustom): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::constructorCallbackCustom): 2012-12-04 Adam Barth [V8] Cleanup style in V8DOMWrapper https://bugs.webkit.org/show_bug.cgi?id=104062 Reviewed by Kentaro Hara. This patch moves a number of functions from inside the class declaration to below the class declaration. I've also inlined domWrapperType into each of its callers and renamed a few functions. A subsequent patch will improve the names of the remaining functions. * bindings/scripts/CodeGeneratorV8.pm: (GenerateToV8Converters): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::visitExternalArrays): * bindings/v8/V8Collection.h: (WebCore::getNamedPropertyOfCollection): (WebCore::getIndexedPropertyOfCollection): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateDOMWrapper): (WebCore::V8DOMWrapper::isWrapperOfType): * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): (WebCore::V8DOMWrapper::setWrapperClass): (WebCore::V8DOMWrapper::setDOMWrapper): (WebCore): (WebCore::V8DOMWrapper::clearDOMWrapper): (WebCore::V8DOMWrapper::lookupDOMWrapper): (WebCore::V8DOMWrapper::createDOMWrapper): * bindings/v8/V8GCController.cpp: * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::showContextMenuCallback): 2012-12-04 Sheriff Bot Unreviewed, rolling out r136597. http://trac.webkit.org/changeset/136597 https://bugs.webkit.org/show_bug.cgi?id=104065 broke Windows compilation (Requested by yurys on #webkit). * platform/graphics/NativeImagePtr.h: (WebCore): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::reportMemoryUsage): 2012-12-04 Yury Semikhatsky Web Inspector: simplify reportMemoryUsage signature https://bugs.webkit.org/show_bug.cgi?id=104028 Reviewed by Vsevolod Vlasov. Removed const& modifier from instrumented pointer type. Was const T* const&, now it is const T* * platform/graphics/NativeImagePtr.h: (WebCore): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::reportMemoryUsage): 2012-12-04 Adam Barth [V8] V8DOMWrapper shouldn't know about NodeFilter https://bugs.webkit.org/show_bug.cgi?id=104057 Reviewed by Kentaro Hara. This patch just moves this code into V8Bindings.h, which is where we have our other type conversion functions. It's too bad that we still need to special case NodeFilter, but fixing that is going to be a bit more work. * bindings/scripts/CodeGeneratorV8.pm: (JSValueToNative): * bindings/v8/V8Binding.cpp: (WebCore::toNodeFilter): (WebCore): * bindings/v8/V8Binding.h: (WebCore): * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8DOMWrapper.h: (WebCore): (V8DOMWrapper): 2012-12-04 Simon Fraser Show a mini visualizer for the tile cache tiles https://bugs.webkit.org/show_bug.cgi?id=104053 Reviewed by Beth Dakin. Replace the current red/green/yellow scrolling indicator with a mini map of the tile cache that shows the current tiles, and the visible rect. Visibility is controlled via a new preference. * WebCore.exp.in: Add Settings::setShowTiledScrollingIndicator(bool), and remove ScrollingTree::setDebugRootLayer(CALayer*) * WebCore.xcodeproj/project.pbxproj: Remove ScrollingTreeMac.mm which is no longer needed; it just contained debug layer stuff. * page/Settings.cpp: (WebCore::Settings::Settings): Support the new setting. (WebCore::Settings::setShowTiledScrollingIndicator): * page/Settings.h: (WebCore::Settings::showTiledScrollingIndicator): * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitNewTreeState): We no longer update the debug indicator on tree commit. * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::hasWheelEventHandlers): Needed for the tiled scrolling indicator. (ScrollingTree): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::commitTreeState): Tell the TiledBacking about the current scrolling mode. * page/scrolling/mac/ScrollingTreeMac.mm: Removed. * platform/graphics/TiledBacking.h: Add functions to set the indicator scrolling mode, and to get the tiled scrolling indicator layer. This has to be parented by the DrawingArea, to ensure that it's in front of all other layers. * platform/graphics/ca/mac/TileCache.h: (WebCore::TileCache::scale): Exposed for the indicator drawing code to use. * platform/graphics/ca/mac/TileCache.mm: (-[WebTileCacheMapLayer init]): The indicator has a sublayer which renders the visible rect frame, owned by it. (-[WebTileCacheMapLayer drawInContext:]): (WebCore::TileCache::TileCache): The indicator mode has to be stored here, since it can be pushed down before we have an indicator layer. (WebCore::TileCache::~TileCache): Clear the TileCache on the indicator layer, which may outlive us. (WebCore::TileCache::revalidateTiles): Call updateTileCoverageMap(). (WebCore::TileCache::updateTileCoverageMap): Resize the indicator layer to fit within the window, and update the indicator color. (WebCore::TileCache::tiledScrollingIndicatorLayer): Create and initialize the layer. (WebCore::TileCache::setScrollingModeIndication): (WebCore::TileCache::drawTileMapContents): Draw small white rects for the tiles over an translucent gray background. 2012-12-04 David Grogan IndexedDB: Propagate more leveldb errors to IDBIndex and IDBObjectStore https://bugs.webkit.org/show_bug.cgi?id=103782 Reviewed by Tony Chang. index.get[Key]() and objectStore.get() will receive more error events. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::IDBBackingStore::getRecord): (WebCore::versionExists): (WebCore::IDBBackingStore::findKeyInIndex): (WebCore::IDBBackingStore::getPrimaryKeyViaIndex): (WebCore::IDBBackingStore::keyExistsInIndex): * Modules/indexeddb/IDBBackingStore.h: (IDBBackingStore): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::getInternal): (WebCore::IDBIndexBackendImpl::getKeyInternal): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getInternal): (WebCore): 2012-12-04 Kentaro Hara [V8] Remove IntegerCache::m_initialized https://bugs.webkit.org/show_bug.cgi?id=103978 Reviewed by Adam Barth. Thanks to r136479, we can now initialize V8 integers in IntegerCache's constructor. We can remove IntegerCache::m_initialized, which slightly improves performance. [Bindings/scroll-top.html in Chromium/Linux] Before this patch: 285 runs/sec, 281 runs/sec, 281 runs/sec, 280 runs/sec After this patch : 290 runs/sec, 291 runs/sec, 297 runs/sec, 291 runs/sec No tests. No change in behavior. * bindings/v8/V8ValueCache.cpp: (WebCore::IntegerCache::IntegerCache): (WebCore::IntegerCache::~IntegerCache): * bindings/v8/V8ValueCache.h: (IntegerCache): (WebCore::IntegerCache::v8Integer): (WebCore::IntegerCache::v8UnsignedInteger): (WebCore): 2012-12-04 Kentaro Hara [V8] Replace String::New("symbol") with String::NewSymbol("symbol") https://bugs.webkit.org/show_bug.cgi?id=103989 Reviewed by Adam Barth. In V8, a symbol lookup is faster than a string lookup. We should use String::NewSymbol("symbol") for symbols. No tests. No change in behavior. * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::typeCallback): (WebCore::V8InjectedScriptHost::functionDetailsCallback): (WebCore::getJSListenerFunctions): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::populateContextMenuItems): 2012-12-04 Julien Chaffraix [CSS Grid Layout] Implement CSS parsing and handling for https://bugs.webkit.org/show_bug.cgi?id=103799 Reviewed by Tony Chang. This change adds support for: => minmax( , ) | auto | (note that we already supported auto | ). The change is mostly mechanical, the only newness is that GridTrackSize was updated to hold 2 Lengths internally and we map the single Length case to 2 by duplicating the value as this matches the rendering algorithm in the spec. Tests: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackBreadth): Changed the function to do the conversion of one track breadth (one Length). This was forgotten in the preparatory change in bug 103703. (WebCore::valueForGridTrackMinMax): Convert the value back using valueForGridTrackBreadth. * css/CSSFunctionValue.cpp: (WebCore::CSSFunctionValue::CSSFunctionValue): * css/CSSFunctionValue.h: (WebCore::CSSFunctionValue::create): (CSSFunctionValue): Added a new constructor. This enables us to return minmax(..., ...) when queried from JavaScript. I couldn't find a better way to serialize inside CSSComputedStyleDeclaration so that it properly match the function output. * css/CSSParser.cpp: (WebCore::CSSParser::parseGridTrackMinMax): Added parsing for the new syntax. We convert the 2 values into a Pair if we manage to parse both values correctly. * css/StyleResolver.cpp: (WebCore::createGridTrackMinMax): Updated to handle a Pair - for minmax - and set the 2 values on GridTrackSize. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Updated to check the style. For now, we don't handle minmax values. * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::GridTrackSize): (WebCore::GridTrackSize::length): (WebCore::GridTrackSize::setLength): (WebCore::GridTrackSize::minTrackBreadth): (WebCore::GridTrackSize::maxTrackBreadth): (WebCore::GridTrackSize::setMinMax): (WebCore::GridTrackSize::operator==): Updated the class to handle minmax values. This means that we now always store 2 values (the case being a subset of minmax, however we kept the distinction to be able to reconstruct a for getComputedStyle). 2012-12-04 Elliott Sprehn parser* methods in ContainerNode should not support DocumentFragment https://bugs.webkit.org/show_bug.cgi?id=103965 Reviewed by Darin Adler. Only parserInsertBefore ever supported DocumentFragment and this feature is never used. It appears this code ended up in parserInsertBefore when it was created as a copy of insertBefore that didn't fire events. This patch removes that code and adds assertions that we never pass DocumentFragments since doing so would cause a corrupted tree as we never check checkAcceptChild or do other validation in the parser methods. No new tests, just refactoring. * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::parserRemoveChild): (WebCore::ContainerNode::parserAppendChild): 2012-12-04 Elliott Sprehn Simplify ShadowRoot::cloneNode(bool,ExceptionCode) https://bugs.webkit.org/show_bug.cgi?id=103928 Reviewed by Dimitri Glazkov. ShadowRoot can never be cloned and ShadowRoot::cloneNode(bool) always returns null so there's no reason to have code in the cloneNode method for script that acts as if it may not return null. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::cloneNode): 2012-12-04 Elliott Sprehn setIsInTopLayer is not really a setter https://bugs.webkit.org/show_bug.cgi?id=103912 Reviewed by Eric Seidel. Element::setInTopLayer isn't just a setter, it also adds the element to the top layer vector in the document which changes it's display and causes a reattach. To make this more obvious make HTMLDialogElement use the methods on Document and make those update the state boolean. There also doesn't seem to be any reason for setInTopLayer or isInTopLayer to be virtual, it appears it was a typo. No new tests, just refactoring. * dom/Document.cpp: (WebCore::Document::addToTopLayer): (WebCore::Document::removeFromTopLayer): * dom/Element.cpp: (WebCore::Element::setIsInTopLayer): * dom/Element.h: * html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::showModal): 2012-12-04 Elliott Sprehn Automatically handle suspend and resume of post attach callbacks https://bugs.webkit.org/show_bug.cgi?id=103910 Reviewed by Eric Seidel. Use RAII to handle suspend and resume of post attach callbacks since they should always be called in pairs. No new tests, just refactoring. * dom/ContainerNode.h: (PostAttachCallbackDisabler): (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler): (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler): (ContainerNode): * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Element.cpp: (WebCore::Element::attach): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::attach): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::attach): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::attach): (WebCore): 2012-12-04 Elliott Sprehn createRareData should return a PassOwnPtr https://bugs.webkit.org/show_bug.cgi?id=103851 Reviewed by Eric Seidel. createRareData should return a PassOwnPtr, not an OwnPtr since it's transfering ownership. * dom/Element.cpp: (WebCore::Element::createRareData): * dom/Element.h: (Element): * dom/Node.cpp: (WebCore::Node::createRareData): * dom/Node.h: 2012-12-04 Filip Pizlo Rename Profiler to LegacyProfiler https://bugs.webkit.org/show_bug.cgi?id=104031 Rubber stamped by Mark Hahnenberg Just renaming, no new tests. * ForwardingHeaders/profiler/LegacyProfiler.h: Copied from Source/WebCore/ForwardingHeaders/profiler/Profiler.h. * ForwardingHeaders/profiler/Profiler.h: Removed. * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::start): (WebCore::ScriptProfiler::stop): 2012-12-04 James Simonsen [User Timing] Fix clang build by removing need for exit time destructor https://bugs.webkit.org/show_bug.cgi?id=104036 Reviewed by Tony Gentilcore. Modeled after r99588. No new tests. No change in functionality. * page/PerformanceUserTiming.cpp: (WebCore::UserTiming::UserTiming): (WebCore::UserTiming::mark): (WebCore::UserTiming::findExistingMarkStartTime): * page/PerformanceUserTiming.h: (UserTiming): 2012-12-04 James Simonsen [User Timing] Fix negative durations https://bugs.webkit.org/show_bug.cgi?id=104038 Reviewed by Tony Gentilcore. At some point, we went from passing in a duration to passing in the end time. User Timing wasn't updated. Tests: http/tests/w3c/webperf/submission/Intel/user-timing * page/PerformanceMark.h: (WebCore::PerformanceMark::PerformanceMark): * page/PerformanceUserTiming.cpp: (WebCore::UserTiming::measure): 2012-12-04 Abhishek Arya Heap-use-after-free in WebCore::StyleCachedImageSet::cssValue https://bugs.webkit.org/show_bug.cgi?id=100621 Reviewed by Eric Seidel. r115639 fixed a memory leak caused by reference cycle between StyleCachedImageSet and its owner CSSImageSetValue. The fix caused StyleCachedImageSet to maintain a weak pointer to CSSImageSetValue. This patch makes sure that the weak pointer is cleared when CSSImageSetValue is going away. Test: fast/css/image-set-value-not-removed-crash.html * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::~CSSImageSetValue): * rendering/style/StyleCachedImageSet.h: (WebCore::StyleCachedImageSet::clearImageSetValue): (StyleCachedImageSet): 2012-12-04 Adam Barth NodeFilter leaks memory in V8 https://bugs.webkit.org/show_bug.cgi?id=104027 Reviewed by Eric Seidel. NodeFilter holds a RefPtr to NodeFilterCondition, which holds a ScopedPersistent to its callback function. If the callback function can see the NodeFilter wrapper, we have a cycle and a leak. This patch makes the NodeFilterCondition hold a weak pointer to the callback function and ties the lifetime of that callback function to the NodeFilter wrapper (so they live and die together). * bindings/v8/V8GCController.cpp: * bindings/v8/V8NodeFilterCondition.cpp: (WebCore::V8NodeFilterCondition::V8NodeFilterCondition): (WebCore::V8NodeFilterCondition::weakCallback): (WebCore): (WebCore::V8NodeFilterCondition::acceptNode): * bindings/v8/V8NodeFilterCondition.h: (WebCore::V8NodeFilterCondition::create): (V8NodeFilterCondition): (WebCore::V8NodeFilterCondition::callback): * dom/NodeFilter.h: (WebCore::NodeFilter::condition): 2012-12-04 Abhishek Arya Crash in CachedResource::checkNotify due to -webkit-crossfade. https://bugs.webkit.org/show_bug.cgi?id=98068 Reviewed by Nate Chapin. Make sure to not re-add the same client again for |m_cachedFromImage| and |m_cachedToImage|. This would otherwise cause the CSSCrossfadeValue client to not get removed from its cached image resource (when it is going away). Test: fast/images/crossfade-client-not-removed-crash.html * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::loadSubimages): 2012-12-04 Julien Chaffraix Heap-use-after-free in WebCore::RenderLayer::paintList [MathML] https://bugs.webkit.org/show_bug.cgi?id=100764 Reviewed by Eric Seidel. Test: mathml/mfenced-root-layer.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::stackingContext): Fixed this function to ensure that it always returns a stacking context, the bug was that the document element's layer wasn't guaranteed to be a stacking context. 2012-12-04 Adam Barth [V8] GetNativeType in CodeGeneratorV8.pm needs a bath https://bugs.webkit.org/show_bug.cgi?id=104022 Reviewed by Eric Seidel. This change shouldn't have any effect on the generated code. * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): - DOMUserData was removed in 2005. There's no need for the code generator to still know about it. (JSValueToNative): (ConvertToV8StringResource): 2012-12-04 Adam Barth [V8] EventTarget shouldn't be a special snowflake https://bugs.webkit.org/show_bug.cgi?id=104018 Reviewed by Eric Seidel. Previously we special-cased the toV8 operation for event targets. There's no need for that. We can use IDL attribute to handle EventTarget using the same general-purpose code that we use for other interfaces. * WebCore.gypi: * bindings/scripts/CodeGeneratorV8.pm: (NativeToJSValue): * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::getReceiverObject): * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): * bindings/v8/V8WorkerContextEventListener.cpp: (WebCore::V8WorkerContextEventListener::getReceiverObject): * bindings/v8/custom/V8EventTargetCustom.cpp: Added. (WebCore): (WebCore::toV8): * dom/EventTarget.idl: 2012-12-04 Florin Malita Stale SVGUseElement reference in CachedResource::checkNotify() https://bugs.webkit.org/show_bug.cgi?id=104004 Reviewed by Eric Seidel. SVGUseElement tracks one CachedSVGDocument at a time (for external references), but when the href attribute is updated it fails to unregister with the current CachedSVGDocument and only updates its CachedSVGDocument with the new instance. This leaves an untracked reference with the original CachedSVGDocument. The patch adds the missing removeClient() call on href change, and encapsulates the CachedSVGDocument manipulation in a helper method which handles the necessary cleanup. Test: svg/custom/use-href-update-crash.svg * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::~SVGUseElement): (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::setCachedDocument): (WebCore): * svg/SVGUseElement.h: (SVGUseElement): 2012-12-04 Yury Semikhatsky Web Inspector: Can't take a heap snapshot in chromium ("Uncaught ReferenceError") https://bugs.webkit.org/show_bug.cgi?id=103997 Reviewed by Pavel Feldman. utilities.js used in both page and worker contexts should not access window object as there is no one in case of workers. NonLeakingMutationObserver implementation has moved to DOMExtension.js * inspector/front-end/DOMExtension.js: (NonLeakingMutationObserver.NonLeakingMutationObserver._unloadListener): (NonLeakingMutationObserver): (NonLeakingMutationObserver.prototype.observe): (NonLeakingMutationObserver.prototype.disconnect): * inspector/front-end/utilities.js: 2012-12-04 Sheriff Bot Unreviewed, rolling out r136509. http://trac.webkit.org/changeset/136509 https://bugs.webkit.org/show_bug.cgi?id=104015 broke layout tests (Requested by eae on #webkit). * platform/graphics/IntSize.h: (WebCore::IntSize::scale): 2012-12-04 Antoine Quint INVALID_STATE_ERR error upon calling .addCue() for an already-in-use cue https://bugs.webkit.org/show_bug.cgi?id=103264 Reviewed by Eric Carlson. Adhere to the latest spec for TextTrack's .addCue() method. This also fixes https://bugs.webkit.org/show_bug.cgi?id=103265 and we've removed media/track/opera/interfaces/TextTrack/addCue.html from the Skipped list. * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): * html/track/TextTrack.h: (TextTrack): * html/track/TextTrack.idl: 2012-12-04 Mike West Log to console when forms and popups are blocked by 'sandbox'. https://bugs.webkit.org/show_bug.cgi?id=103615 Reviewed by Adam Barth. Adds two console messages to cover form submissions blocked by a sandboxed frame lacking the 'allow-forms' permission, and window creation blocked by a sandboxed frame lacking the 'allow-popups' permission. * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): Log a warning when form submission is blocked by sandboxing flags. (WebCore::createWindow): Log a warning when window.open is blocked due to sandboxing flags. 2012-12-04 Kentaro Hara [V8] Make v8::Null(isolate) faster by caching the value in V8 bindings https://bugs.webkit.org/show_bug.cgi?id=103862 Reviewed by Adam Barth. Performance comparison between V8 and JSC revealed that DOM attributes that return v8::Null(isolate) are much slower than JSC. (https://docs.google.com/a/chromium.org/spreadsheet/ccc?key=0AlobCOyvTnPKdDg5S0dMdGRGRTRSaW53V1ppVzh6eXc#gid=2) We can optimize v8::Null(isolate) by caching the value to V8PerIsolateData. (Although I don't like the optimization, it looks difficult to optimize v8::Null(isolate) more.) [Bindings/undefined-first-child.html] Before: 969 runs/sec, 970 runs/sec, 962 runs/sec After: 1086 runs/sec, 1085 runs/sec, 1086 runs/sec No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNormalAttrGetter): (GenerateFunctionCallback): (NativeToJSValue): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8Fast): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::contentDocumentAttrGetter): (WebCore::TestObjV8Internal::getSVGDocumentCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): * bindings/v8/V8Binding.h: (WebCore): (WebCore::v8Null): (WebCore::v8NullWithCheck): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::V8PerIsolateData): * bindings/v8/V8PerIsolateData.h: (WebCore::V8PerIsolateData::v8Null): (V8PerIsolateData): 2012-12-04 Alexis Menard Add an helper function in CSSParser to check for '/' character. https://bugs.webkit.org/show_bug.cgi?id=104009 Reviewed by Ryosuke Niwa. Remove unwanted null check from r136525 No new tests : just a refactor, existing tests should cover. * css/CSSParser.cpp: (WebCore::isForwardSlashOperator): 2012-12-04 Alexis Menard Add an helper function in CSSParser to check for '/' character. https://bugs.webkit.org/show_bug.cgi?id=104009 Reviewed by Ryosuke Niwa. I'm about to add the same pattern in a following patch. Let's do an helper function first. We also did that for the comma. The slash character is pretty used in shorthands definitions. No new tests : just a refactor, existing tests should cover. * css/CSSParser.cpp: (WebCore::isForwardSlashOperator): (WebCore): (WebCore::CSSParser::parseFillShorthand): (WebCore::CSSParser::parseFont): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseAspectRatio): 2012-12-04 Ken Kania Inspector: Introduce Input.dispatchKeyEvent and DOM.focus for typing simulation. https://bugs.webkit.org/show_bug.cgi?id=103530 Reviewed by Yury Semikhatsky. Input.dispatchKeyEvent simply calls EventHandler::keyEvent with the key event data from the command parameters. The client will be responsible for providing proper events to simulate desired typing behavior. DOM.focus calls focus on a dom element. Tests: inspector-protocol/dom-focus.html inspector-protocol/input-dispatchKeyEvent.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::focus): (WebCore): (WebCore::InspectorDOMAgent::resolveNode): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/InspectorInputAgent.cpp: Added. (WebCore): (WebCore::InspectorInputAgent::InspectorInputAgent): (WebCore::InspectorInputAgent::~InspectorInputAgent): (WebCore::InspectorInputAgent::dispatchKeyEvent): * inspector/InspectorInputAgent.h: Added. (WebCore): (InspectorInputAgent): (WebCore::InspectorInputAgent::create): 2012-12-04 Dan Bernstein FontPlatformData has unnecessary m_textOrientation member https://bugs.webkit.org/show_bug.cgi?id=103971 Reviewed by Darin Adler. Nothing in SimpleFontData depends on the FontPlatformData’s textOrientation, so we don’t need separate data for vertical-right and upright. We simply choose between verticalRightOrientationFontData() and uprightOrientationFontData() based on the textOrientation in the FontDescription. * WebCore.exp.in: Updated FontPlatformData constructor exports. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Removed the text orientation bit from the hash key, and updated for the removal of the TextOrientation parameter to CachedFont::platformDataFromCustomData(). * loader/cache/CachedFont.cpp: (WebCore::CachedFont::platformDataFromCustomData): Removed the TextOrientation parameter. * loader/cache/CachedFont.h: * platform/graphics/FontCache.cpp: (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Removed the TextOrientation parameter and initializer. (WebCore::FontPlatformDataCacheKey::operator==): Updated for removal of m_textOrientation member variable. (FontPlatformDataCacheKey): Removed m_textOrientation member variable. (WebCore::computeHash): Removed text orientation bit from the hash. (WebCore::FontCache::getCachedFontPlatformData): Updated for FontPlatformDataCacheKey change. * platform/graphics/FontPlatformData.cpp: (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameters and initializers. (WebCore::FontPlatformData::operator=): Updated for removal of m_textOrientation member variable. * platform/graphics/FontPlatformData.h: (FontPlatformData): Removed m_textOrientation member variable, removed TextOrientation parameters from constructors. (WebCore::FontPlatformData::hash): Removed text orientation bit. (WebCore::FontPlatformData::operator==): Updated for removed member variable. * platform/graphics/cairo/FontCustomPlatformData.h: (FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/chromium/FontCacheAndroid.cpp: (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and initializer. * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and initializers. (WebCore::FontPlatformData::operator=): Updated for removed member variable. (WebCore::FontPlatformData::operator==): Ditto. (WebCore::FontPlatformData::hash): Removed text orientation bit. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): Removed TextOrientation parameter from the constructor declaration. * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/mac/FontCustomPlatformData.h: (FontCustomPlatformData): Removed TextOrientation parameter from declaration of fontPlatformData(). * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::getCompositeFontReferenceFontData): Updated for FontPlatformData change. * platform/graphics/pango/FontCustomPlatformDataPango.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/qt/FontCustomPlatformData.h: * platform/graphics/qt/FontCustomPlatformDataQt.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Ditto. * platform/graphics/skia/FontCacheSkia.cpp: (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change. * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/skia/FontCustomPlatformData.h: * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/win/FontCustomPlatformData.h: * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/win/FontCustomPlatformDataCairo.h: * platform/graphics/win/FontPlatformDataCGWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Removed m_textOrientation initializer. * platform/graphics/win/FontPlatformDataCairoWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Ditto. * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Ditto. * platform/graphics/wince/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter. * platform/graphics/wince/FontCustomPlatformData.h: 2012-12-04 Charlie Reis Add FrameLoaderClient::didDisownOpener https://bugs.webkit.org/show_bug.cgi?id=103789 Reviewed by Darin Fisher. Adds a didDisownOwner notification when a frame's opener is cleared, so that FrameLoaderClients can react. No new tests. * loader/FrameLoader.cpp: (WebCore::FrameLoader::setOpener): Calls didDisownOpener if opener is cleared. * loader/FrameLoaderClient.h: (FrameLoaderClient): (WebCore::FrameLoaderClient::didDisownOpener): 2012-12-04 Robert Hogan Redrawing issue with inserting new inline element between existing inline elements https://bugs.webkit.org/show_bug.cgi?id=50315 Reviewed by Levi Weintraub. When inserting an element such as 'text
' between two lineboxes, the second of which has leading space collapsed away after a line-break, dirtyLinesFromChangeChild() needs to ensure that the linebox the fragment is inserted into (the second of the two lineboxes) gets dirtied. Since the element has been inserted before the first element in the linebox, but after the collapsed leading space, the search for the new element's linebox will go past the leading space to the previous linebox and select that one by mistake. So in order to ensure the element's linebox is dirtied make sure its previous sibling is not the line-break object of the linebox we selected when searching for a linebox to dirty. If the previous sibling is the linebox's line-break object then the element is in the one after the one we selected and we should dirty that linebox too. Test: fast/inline/layout-after-inserting-nested-br.html * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): 2012-12-04 Mikhail Pozdnyakov IntSize::scale() should return rounded value https://bugs.webkit.org/show_bug.cgi?id=103984 Reviewed by Kenneth Rohde Christiansen. IntSize::scale() is now rounding float value to the nearest integer instead of blind type casting. Test: css3/device-adapt/viewport-width-not-affecting-next-page.html * platform/graphics/IntSize.h: (WebCore::IntSize::scale): 2012-12-04 Adam Bergkvist Add support for generic types in arrays and sequences to the code generators https://bugs.webkit.org/show_bug.cgi?id=103642 Reviewed by Kentaro Hara. Updated the bindings generators to support arrays and sequences of host objects. - Arrays and sequences of host objects are mapped to Vector >. - Fixed issue where "sequence" was used in IDL files instead of "sequence". Updated existing test results. * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/mediastream/RTCStatsElement.idl: * Modules/websockets/WebSocket.idl: * bindings/js/JSDOMBinding.h: (WebCore::toRefPtrNativeArray): (WebCore): * bindings/scripts/CodeGenerator.pm: (IsRefPtrType): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): (GetNativeType): (GetNativeVectorInnerType): (JSValueToNative): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateParametersCheckExpression): (GenerateFunctionCallString): (GetNativeType): (JSValueToNative): (CreateCustomSignature): (NativeToJSValue): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::longLongAttrAttrSetter): (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetter): (WebCore::TestObjV8Internal::methodWithSequenceArgCallback): (WebCore::TestObjV8Internal::overloadedMethod10Callback): * bindings/v8/V8Binding.h: (WebCore::toRefPtrNativeArray): * testing/Internals.idl: 2012-12-04 Antoine Quint TextTrack's .kind property should return lower-case values https://bugs.webkit.org/show_bug.cgi?id=103411 Reviewed by Eric Carlson. While the HTML "kind" attribute on the element allows upper-case values, the related APIs on HTMLMediaElement and TextTrack expect only to deal with lower-case values. As such, we're updating TextTrack::isValidKindKeyword() to be case-sensitive and ensure that values fed from the DOM (the values read from HTML attributes) are lower-case'd. Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrack/kind.html and media/track/opera/interfaces/HTMLElement/HTMLMediaElement/addTextTrack.html This patch also fixes https://bugs.webkit.org/show_bug.cgi?id=103256. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::parseAttribute): (WebCore::HTMLTrackElement::ensureTrack): * html/track/TextTrack.cpp: (WebCore::TextTrack::isValidKindKeyword): 2012-12-04 Sheriff Bot Unreviewed, rolling out r136498. http://trac.webkit.org/changeset/136498 https://bugs.webkit.org/show_bug.cgi?id=103992 Patch causes a lot of tests to crash in GTK+ bots (Requested by KaL on #webkit). * bindings/scripts/CodeGeneratorGObject.pm: (GenerateProperties): (GenerateHeader): (GenerateCFile): (GenerateEventTargetIface): (WriteData): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (WebKit::core): (WebKit::wrapFloat64Array): (webkit_dom_float64array_finalize): (webkit_dom_float64array_class_init): (webkit_dom_float64array_init): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (WebKit::core): (WebKit::wrapTestActiveDOMObject): (webkit_dom_test_active_dom_object_finalize): (webkit_dom_test_active_dom_object_class_init): (webkit_dom_test_active_dom_object_init): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (WebKit::core): (WebKit::wrapTestCallback): (webkit_dom_test_callback_finalize): (webkit_dom_test_callback_class_init): (webkit_dom_test_callback_init): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (WebKit::core): (WebKit::wrapTestCustomNamedGetter): (webkit_dom_test_custom_named_getter_finalize): (webkit_dom_test_custom_named_getter_class_init): (webkit_dom_test_custom_named_getter_init): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (WebKit::core): (WebKit::wrapTestEventConstructor): (webkit_dom_test_event_constructor_finalize): (webkit_dom_test_event_constructor_class_init): (webkit_dom_test_event_constructor_init): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (WebKit::core): (WebKit::wrapTestEventTarget): (webkit_dom_test_event_target_dispatch_event): (webkit_dom_test_event_target_add_event_listener): (webkit_dom_test_event_target_remove_event_listener): (webkit_dom_test_event_target_finalize): (webkit_dom_test_event_target_class_init): (webkit_dom_test_event_target_init): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: (WebKit::core): (WebKit::wrapTestException): (webkit_dom_test_exception_finalize): (webkit_dom_test_exception_class_init): (webkit_dom_test_exception_init): * bindings/scripts/test/GObject/WebKitDOMTestException.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (WebKit::core): (WebKit::wrapTestInterface): (webkit_dom_test_interface_finalize): (webkit_dom_test_interface_class_init): (webkit_dom_test_interface_init): * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (WebKit::core): (WebKit::wrapTestMediaQueryListListener): (webkit_dom_test_media_query_list_listener_finalize): (webkit_dom_test_media_query_list_listener_class_init): (webkit_dom_test_media_query_list_listener_init): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (WebKit::core): (WebKit::wrapTestNamedConstructor): (webkit_dom_test_named_constructor_finalize): (webkit_dom_test_named_constructor_class_init): (webkit_dom_test_named_constructor_init): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (WebKit::core): (WebKit::wrapTestNode): (webkit_dom_test_node_dispatch_event): (webkit_dom_test_node_add_event_listener): (webkit_dom_test_node_remove_event_listener): (webkit_dom_test_node_finalize): (webkit_dom_test_node_class_init): (webkit_dom_test_node_init): * bindings/scripts/test/GObject/WebKitDOMTestNode.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (WebKit::core): (WebKit::wrapTestObj): (webkit_dom_test_obj_finalize): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp: (WebKit::core): (WebKit::wrapTestOverloadedConstructors): (webkit_dom_test_overloaded_constructors_finalize): (webkit_dom_test_overloaded_constructors_class_init): (webkit_dom_test_overloaded_constructors_init): * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (WebKit::core): (WebKit::wrapTestSerializedScriptValueInterface): (webkit_dom_test_serialized_script_value_interface_finalize): (webkit_dom_test_serialized_script_value_interface_class_init): (webkit_dom_test_serialized_script_value_interface_init): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: 2012-12-04 Markus Heintz Web Inspector: Viewport console warnings cleanup. https://bugs.webkit.org/show_bug.cgi?id=102890 Reviewed by Jochen Eisinger. Improve the console message text for a viewport console warning and change the log level to warning. No new tests added, as this change is covered by updates to existing test expectations. * dom/ViewportArguments.cpp: (WebCore::viewportErrorMessageTemplate): Improve the console message text for invalid values. (WebCore::viewportErrorMessageLevel): Upgraded the TruncatedViewportArgumentValueError and the TargetDensityDpiUnsupported messages's MessageLeval to warning. (WebCore::reportViewportWarning): Adding only a comment for a FIXIT reminder. 2012-12-04 Carlos Garcia Campos [GTK] Use a private struct and placement new syntax in GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=101074 Reviewed by Xan Lopez. It allows to use RefPtr for the wrapped object and it simplifies the code. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateProperties): (GenerateHeader): (GenerateCFile): (GenerateEventTargetIface): (WriteData): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (_WebKitDOMFloat64ArrayPrivate): (WebKit::core): (WebKit::wrapFloat64Array): (webkit_dom_float64array_finalize): (webkit_dom_float64array_constructor): (webkit_dom_float64array_class_init): (webkit_dom_float64array_init): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: (_WebKitDOMFloat64Array): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (_WebKitDOMTestActiveDOMObjectPrivate): (WebKit::core): (WebKit::wrapTestActiveDOMObject): (webkit_dom_test_active_dom_object_finalize): (webkit_dom_test_active_dom_object_constructor): (webkit_dom_test_active_dom_object_class_init): (webkit_dom_test_active_dom_object_init): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: (_WebKitDOMTestActiveDOMObject): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (_WebKitDOMTestCallbackPrivate): (WebKit::core): (WebKit::wrapTestCallback): (webkit_dom_test_callback_finalize): (webkit_dom_test_callback_constructor): (webkit_dom_test_callback_class_init): (webkit_dom_test_callback_init): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: (_WebKitDOMTestCallback): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (_WebKitDOMTestCustomNamedGetterPrivate): (WebKit::core): (WebKit::wrapTestCustomNamedGetter): (webkit_dom_test_custom_named_getter_finalize): (webkit_dom_test_custom_named_getter_constructor): (webkit_dom_test_custom_named_getter_class_init): (webkit_dom_test_custom_named_getter_init): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: (_WebKitDOMTestCustomNamedGetter): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (_WebKitDOMTestEventConstructorPrivate): (WebKit::core): (WebKit::wrapTestEventConstructor): (webkit_dom_test_event_constructor_finalize): (webkit_dom_test_event_constructor_constructor): (webkit_dom_test_event_constructor_class_init): (webkit_dom_test_event_constructor_init): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h: (_WebKitDOMTestEventConstructor): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (_WebKitDOMTestEventTargetPrivate): (WebKit::core): (WebKit::wrapTestEventTarget): (webkit_dom_test_event_target_dispatch_event): (webkit_dom_test_event_target_add_event_listener): (webkit_dom_test_event_target_remove_event_listener): (webkit_dom_test_event_target_finalize): (webkit_dom_test_event_target_constructor): (webkit_dom_test_event_target_class_init): (webkit_dom_test_event_target_init): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: (_WebKitDOMTestEventTarget): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: (_WebKitDOMTestExceptionPrivate): (WebKit::core): (WebKit::wrapTestException): (webkit_dom_test_exception_finalize): (webkit_dom_test_exception_constructor): (webkit_dom_test_exception_class_init): (webkit_dom_test_exception_init): * bindings/scripts/test/GObject/WebKitDOMTestException.h: (_WebKitDOMTestException): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (_WebKitDOMTestInterfacePrivate): (WebKit::core): (WebKit::wrapTestInterface): (webkit_dom_test_interface_finalize): (webkit_dom_test_interface_constructor): (webkit_dom_test_interface_class_init): (webkit_dom_test_interface_init): * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: (_WebKitDOMTestInterface): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (_WebKitDOMTestMediaQueryListListenerPrivate): (WebKit::core): (WebKit::wrapTestMediaQueryListListener): (webkit_dom_test_media_query_list_listener_finalize): (webkit_dom_test_media_query_list_listener_constructor): (webkit_dom_test_media_query_list_listener_class_init): (webkit_dom_test_media_query_list_listener_init): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: (_WebKitDOMTestMediaQueryListListener): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (_WebKitDOMTestNamedConstructorPrivate): (WebKit::core): (WebKit::wrapTestNamedConstructor): (webkit_dom_test_named_constructor_finalize): (webkit_dom_test_named_constructor_constructor): (webkit_dom_test_named_constructor_class_init): (webkit_dom_test_named_constructor_init): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h: (_WebKitDOMTestNamedConstructor): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (_WebKitDOMTestNodePrivate): (WebKit::core): (WebKit::wrapTestNode): (webkit_dom_test_node_dispatch_event): (webkit_dom_test_node_add_event_listener): (webkit_dom_test_node_remove_event_listener): (webkit_dom_test_node_finalize): (webkit_dom_test_node_constructor): (webkit_dom_test_node_class_init): (webkit_dom_test_node_init): * bindings/scripts/test/GObject/WebKitDOMTestNode.h: (_WebKitDOMTestNode): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (_WebKitDOMTestObjPrivate): (WebKit::core): (WebKit::wrapTestObj): (webkit_dom_test_obj_finalize): (webkit_dom_test_obj_constructor): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: (_WebKitDOMTestObj): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (_WebKitDOMTestSerializedScriptValueInterfacePrivate): (WebKit::core): (WebKit::wrapTestSerializedScriptValueInterface): (webkit_dom_test_serialized_script_value_interface_finalize): (webkit_dom_test_serialized_script_value_interface_constructor): (webkit_dom_test_serialized_script_value_interface_class_init): (webkit_dom_test_serialized_script_value_interface_init): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: (_WebKitDOMTestSerializedScriptValueInterface): 2012-12-04 David Grogan IndexedDB: Make leveldb histogram entries more fine-grained https://bugs.webkit.org/show_bug.cgi?id=103688 Reviewed by Tony Chang. Allow us better insight into which functions the IO errors originate from. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::setUpMetadata): (WebCore::IDBBackingStore::getIDBDatabaseMetaData): (WebCore::IDBBackingStore::getObjectStores): (WebCore::IDBBackingStore::getRecord): (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber): (WebCore::IDBBackingStore::keyExistsInObjectStore): (WebCore::IDBBackingStore::getIndexes): (WebCore::IDBBackingStore::findKeyInIndex): (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow): (WebCore::ObjectStoreCursorImpl::loadCurrentRow): (WebCore::IndexKeyCursorImpl::loadCurrentRow): (WebCore::IndexCursorImpl::loadCurrentRow): 2012-12-04 Carlos Garcia Campos [GTK] Avoid unnecessary heap allocations during drag and drop operations https://bugs.webkit.org/show_bug.cgi?id=87938 Reviewed by Martin Robinson. * platform/gtk/GtkDragAndDropHelper.cpp: (WebCore::GtkDragAndDropHelper::handleDragMotion): Return a pointer to the DataObjectGtk so that the caller can create the DragData object in the stack. (WebCore::GtkDragAndDropHelper::handleDragDataReceived): Ditto. (WebCore::GtkDragAndDropHelper::handleDragDrop): Ditto. * platform/gtk/GtkDragAndDropHelper.h: 2012-12-04 Alexander Pavlov Web Inspector: [Overrides] Add ability to override the page CSS media type https://bugs.webkit.org/show_bug.cgi?id=103752 Reviewed by Pavel Feldman. This change emulates the CSS media types through the instrumentation of FrameView::mediaType(). Even though it already checks the associated FrameLoaderClient::overrideMediaType(), instrumenting every single platform FrameLoaderClient implementation out there seems wrong. Test: inspector/styles/media-emulation.html * English.lproj/localizedStrings.js: * inspector/Inspector.json: Add Page.setEmulatedMedia(). * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Added. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::applyEmulatedMedia): Added. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::restore): Restores the media emulation state. (WebCore::InspectorPageAgent::disable): Resets the media emulation state. (WebCore::InspectorPageAgent::setEmulatedMedia): Added. (WebCore::InspectorPageAgent::applyEmulatedMedia): Applies the emulated CSS media if needed. * inspector/InspectorPageAgent.h: * inspector/front-end/CSSStyleModel.js: Add the list of media types. * inspector/front-end/OverridesView.js: Add the CSS media type override UI. (WebInspector.OverridesView): (WebInspector.OverridesView.prototype._createMediaEmulationElement): Builds the UI. (WebInspector.OverridesView.prototype._emulateMediaChanged): Handles the control value changes. * inspector/front-end/Settings.js: Add the "emulatedCSSMedia" setting. * page/FrameView.cpp: (WebCore::FrameView::mediaType): Uses InspectorInstrumentation::applyEmulatedMedia() to provide the emulated value. 2012-12-03 Carlos Garcia Campos [GTK] Simplify GObject DOM bindings code for handling properties https://bugs.webkit.org/show_bug.cgi?id=101072 Reviewed by Xan Lopez. Do not override GObjectClass::set_property if the wrapped object doesn't have writable properties, and don't override GObjectClass::get_property if the wrapped object doesn't have properties at all. It reduces some GObject boilerplate in generated code for some objects. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateProperties): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (webkit_dom_float64array_class_init): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (webkit_dom_test_active_dom_object_class_init): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (webkit_dom_test_callback_class_init): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (webkit_dom_test_custom_named_getter_class_init): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (webkit_dom_test_event_constructor_class_init): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (webkit_dom_test_event_target_class_init): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: (webkit_dom_test_exception_class_init): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (webkit_dom_test_interface_class_init): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (webkit_dom_test_media_query_list_listener_class_init): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (webkit_dom_test_named_constructor_class_init): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (webkit_dom_test_node_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (webkit_dom_test_serialized_script_value_interface_class_init): 2012-12-04 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::JSTestNode::visitChildren): (WebCore): 2012-12-03 Alexander Pavlov Web Inspector: [REGRESSION] [Styles] Rule disappears if edited selector does not affect selected node https://bugs.webkit.org/show_bug.cgi?id=103059 Reviewed by Pavel Feldman. This change effectively turns WebInspector.cssModel.setRuleSelector() into a _userOperation (in terms of StylesSidebarPane), which finishes upon the _finishOperationAndMoveEditor() invocation. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSRule): Fix selectorText now that r136370 has landed. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.update): Update the selector text from the model. (WebInspector.StylePropertiesSection.prototype._markSelectorMatches): Set the "selector" className regardless of the matched selectors presence. (WebInspector.StylePropertiesSection.prototype.successCallback): Make use of the _userOperation flag. (WebInspector.StylePropertiesSection.prototype.finishOperationAndMoveEditor): Delete the _userOperation flag. (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Make use of the _userOperation flag. (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): Mark selector matches. (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCancelled): Delete the _userOperation flag. 2012-12-04 Kondapally Kalyan [EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found. https://bugs.webkit.org/show_bug.cgi?id=103710. Reviewed by Kenneth Rohde Christiansen. When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions. In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions. USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found. * platform/graphics/opengl/GLPlatformSurface.cpp: (WebCore::GLPlatformSurface::createTransportSurface): * platform/graphics/surfaces/glx/GLXSurface.cpp: (WebCore): * platform/graphics/surfaces/glx/GLXSurface.h: (WebCore::SharedX11Resources::createConfig): (SharedX11Resources): 2012-12-04 Michael Pruett [JSC] Generate visitChildren() for uncustomized EventTarget interfaces https://bugs.webkit.org/show_bug.cgi?id=103908 Reviewed by Geoffrey Garen. CodeGeneratorJS.pm should automatically generate visitChildren() for EventTarget interfaces without custom mark functions even if those interfaces have no functions or cached attributes. This change is needed for IDBOpenDBRequest and IDBVersionChangeRequest. No new tests. Covered by existing tests. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2012-12-04 Kentaro Hara Change ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets from a Vector to an OwnPtr https://bugs.webkit.org/show_bug.cgi?id=103868 Reviewed by Darin Adler. ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets is used for HTMLFrameElement and HTMLBodyElement only, which would be a cold path. We can change it from a Vector to an OwnPtr so that ChildNodeInsertionNotifier can be allocated faster. This patch optimizes Dromaeo/dom-modify by 1.4%. [Dromaeo/dom-modify in Chromium/Linux] Before: 4532 runs/sec, 4545 runs/sec, 4530 runs/sec, 4536 runs/sec After: 4595 runs/sec, 4606 runs/sec, 4597 runs/sec, 4602 runs/sec No tests. No change in behavior. * dom/ContainerNodeAlgorithms.h: (ChildNodeInsertionNotifier): (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument): (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): (WebCore::ChildNodeInsertionNotifier::notify): 2012-12-03 Rafael Weinstein Unreviewed build fix after r136467 The template element patch added asserts in parserAppendChild and parserInsertBefore which should be valid, but DOMImplementation::createDocument() calls parserAppendChild with docType without regard to its owner. This patch removes the assert and adds a FIXME. * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::parserAppendChild): 2012-12-03 Kentaro Hara [V8] Enter an Isolate before initializing PerIsolateData https://bugs.webkit.org/show_bug.cgi?id=103949 Reviewed by Adam Barth. Currently we initialize PerIsolateData before entering an Isolate, which prevents us from using an Isolate in the PerIsolateData constructor. We should enter an Isolate first and then initialize PerIsolateData. No tests. No change in behavior. * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::WorkerScriptController): 2012-12-03 Sergio Villar Senin [GTK] Add WebKitDOMShadowRoot.h to the list of public API headers after r135693 https://bugs.webkit.org/show_bug.cgi?id=103909 Reviewed by Martin Robinson. WebKitDOMShadowRoot was added in r135693. As it is added to webkitdom.h we have to export the include file, otherwise clients will fail to build due to the missing file. * bindings/gobject/GNUmakefile.am: 2012-12-03 Joshua Bell IndexedDB: Correct database version after aborted upgrade https://bugs.webkit.org/show_bug.cgi?id=103763 Reviewed by Tony Chang. After an aborted "versionchange" transaction, the IDBDatabase would fetch a fresh snapshot of the metadata from the back end. If the back end had already started a new "versionchange" transaction the snapshot would be bogus. Instead, save a copy of the IDBDatabase's metadata and roll back to that, as is done for IDBObjectStore. Tests: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html storage/indexeddb/mozilla/versionchange-abort.html storage/indexeddb/unblocked-version-changes.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::IDBDatabase): (WebCore::IDBDatabase::transactionCreated): * Modules/indexeddb/IDBDatabase.h: (WebCore::IDBDatabase::setMetadata): Let IDBOpenDBRequest and IDBTransaction tinker. * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::onUpgradeNeeded): Fetch new and compute old metadata. (WebCore::IDBOpenDBRequest::onSuccess): Fetch new metadata, in case upgrade changed it. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::create): Stash the old metadata, in case of rollback. (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::onAbort): Revert the database as well as the stores. * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): 2012-12-03 Rafael Weinstein Implement HTMLTemplateElement https://bugs.webkit.org/show_bug.cgi?id=86031 Reviewed by Adam Barth. Initial implementation. This patch includes the parser changes, new IDL and element implementation for