2012-07-24 Anna Cavender Create SourceBuffer and SourceBufferList objects https://bugs.webkit.org/show_bug.cgi?id=91771 Reviewed by Eric Carlson. SourceBuffer and SourceBufferList objects are needed in order to implement the new object-oriented MediaSource API: http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html No new tests - will be able to test after landing BUGWK91775 Adding new files to build files: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * WebCore.xcodeproj/project.pbxproj: New objects: * Modules/mediasource/SourceBuffer.cpp: Added. * Modules/mediasource/SourceBuffer.h: Added. * Modules/mediasource/SourceBuffer.idl: Added. * Modules/mediasource/SourceBufferList.cpp: Added. * Modules/mediasource/SourceBufferList.h: Added. * Modules/mediasource/SourceBufferList.idl: Added. New events: * dom/EventNames.h: (WebCore): * dom/EventTarget.h: (WebCore): * dom/EventTargetFactory.in: Object constructors: * page/DOMWindow.idl: 2012-07-24 Patrick Gansterer Store the full year in GregorianDateTime https://bugs.webkit.org/show_bug.cgi?id=92067 Reviewed by Geoffrey Garen. Use the full year instead of the offset from year 1900 for the year member variable of GregorianDateTime. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): 2012-07-24 Benjamin Poulain Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString https://bugs.webkit.org/show_bug.cgi?id=90720 Reviewed by Geoffrey Garen. In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have a relatively cheap conversion from WTF::String to CFString. When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call to String::characters(). This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes. This is covered by existing tests. * platform/text/cf/StringCF.cpp: (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it. * platform/text/cf/StringImplCF.cpp: (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified. The allocator creation is now closer to where it is useful. 2012-07-24 Kentaro Hara [V8] String wrappers should be marked Independent https://bugs.webkit.org/show_bug.cgi?id=91251 Reviewed by Adam Barth. Currently V8 String wrappers are not marked Independent. By marking them Independent, they can be reclaimed by the scavenger GC. Although I couldn't find a case where this change reduces memory usage, this change would be important for upcoming changes in string conversion between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850). 'm_lastStringImpl = 0' in StringCache::remove() is important. Look at the following code: static void cachedStringCallback(v8::Persistent wrapper, void* parameter) { ...; stringCache()->remove(stringImpl); wrapper.Dispose(); } void StringCache::remove(StringImpl* stringImpl) { ... if (m_lastStringImpl.get() == stringImpl) m_lastStringImpl = 0; } v8::Local v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate) { if (m_lastStringImpl.get() == stringImpl) { return v8::Local::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently. } return v8ExternalStringSlow(stringImpl, isolate); } Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used in v8ExternalString(). This was a cause of the crashes of r122614. Tests: At the initial commit of this patch (r122614), the following tests had been broken due to missing 'm_lastStringImpl = 0'. fast/workers/worker-location.html Dromaeo/cssquery-jquery.html Dromaeo/jslib-event-jquery.html Dromaeo/jslib-style-jquery.html Dromaeo/jslib-style-prototype.html * bindings/v8/V8Binding.cpp: (WebCore::StringCache::remove): (WebCore::StringCache::v8ExternalStringSlow): 2012-07-24 Tommy Widenflycht MediaStream API: Update MediaStreamTrack to match the specification https://bugs.webkit.org/show_bug.cgi?id=90180 Reviewed by Adam Barth. MediaStreamTracks are now required to show the status of the underlying source, and trigger events when that status changes. Test: fast/mediastream/MediaStreamTrack.html * GNUmakefile.list.am: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::addTrack): * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::create): (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::setEnabled): (WebCore::MediaStreamTrack::readyState): (WebCore): (WebCore::MediaStreamTrack::sourceChangedState): (WebCore::MediaStreamTrack::stop): (WebCore::MediaStreamTrack::interfaceName): (WebCore::MediaStreamTrack::scriptExecutionContext): (WebCore::MediaStreamTrack::eventTargetData): (WebCore::MediaStreamTrack::ensureEventTargetData): * Modules/mediastream/MediaStreamTrack.h: * Modules/mediastream/MediaStreamTrack.idl: * WebCore.gypi: * dom/EventNames.h: (WebCore): * dom/EventTargetFactory.in: * platform/chromium/support/WebMediaStreamDescriptor.cpp: * platform/chromium/support/WebMediaStreamSource.cpp: (WebKit::WebMediaStreamSource::setReadyState): (WebKit): (WebKit::WebMediaStreamSource::readyState): * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h. (WebCore): (WebCore::MediaStreamSource::create): (WebCore::MediaStreamSource::MediaStreamSource): (WebCore::MediaStreamSource::setReadyState): (WebCore::MediaStreamSource::addObserver): (WebCore::MediaStreamSource::removeObserver): * platform/mediastream/MediaStreamSource.h: (Observer): (WebCore::MediaStreamSource::Observer::~Observer): (MediaStreamSource): (WebCore::MediaStreamSource::readyState): * platform/mediastream/chromium/MediaStreamCenterChromium.cpp: (WebCore::MediaStreamCenterChromium::queryMediaStreamSources): (WebCore::MediaStreamCenterChromium::didCreateMediaStream): 2012-07-24 Scott Graham Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium https://bugs.webkit.org/show_bug.cgi?id=91667 Reviewed by Tony Chang. Using native tools instead of cygwin version improves build time performance by roughly 50% (on top of previous cl-instead-of-gcc change). Also, use - instead of / for cl flags, otherwise preprocessing fails very slowly (due to retry loop). And, replace \ with / in gperf command line. Without this, gperf emits the filename literally in #line directives which causes VS to error with "unescaped \ in string". Bizarrely, building ColorData.cpp with those \ in place causes the IDE to exit with no error message, which was the cause of the previous canary failures. No new tests. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-24 Daniel Cheng Files from drag and file should use getMIMETypeForExtension to determine content type. https://bugs.webkit.org/show_bug.cgi?id=91702 Reviewed by Jian Li. Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web pages from being able to detect what applications a user has installed indirectly through the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types that aren't in WebKit's internal list, so we relax the restriction for Files that originate from an user action. * fileapi/File.cpp: (WebCore::getContentTypeFromFileName): (WebCore::createBlobDataForFile): (WebCore::createBlobDataForFileWithName): (WebCore::createBlobDataForFileWithMetadata): (WebCore::File::createWithRelativePath): (WebCore::File::File): * fileapi/File.h: (File): (WebCore::File::create): (WebCore::File::createWithName): * html/FileInputType.cpp: (WebCore::FileInputType::createFileList): * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::addFilename): * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::files): * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::files): * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::files): * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::files): 2012-07-24 Vsevolod Vlasov Web Inspector: Snippets UI polish https://bugs.webkit.org/show_bug.cgi?id=92142 Reviewed by Pavel Feldman. Changed snippets context menu items. Added run snippet status bar button. Removed unused edit source button. * English.lproj/localizedStrings.js: * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/ScriptSnippetModel.js: (WebInspector.SnippetJavaScriptSourceFrame): (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems): (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked): * inspector/front-end/ScriptsNavigator.js: (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement): (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems): (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.statusBarItems): * inspector/front-end/inspector.css: * inspector/front-end/scriptsPanel.css: (.evaluate-snippet-status-bar-item .glyph): (.evaluate-snippet-status-bar-item.toggled .glyph): 2012-07-24 Nico Weber [chromium/mac] Remove webcore_resource_files from WebCore.gypi https://bugs.webkit.org/show_bug.cgi?id=92129 Reviewed by Adam Barth. It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi . The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 , but this block was forgotten. Since it just confused me for a bit, remove it. * WebCore.gyp/WebCore.gyp: 2012-07-24 Julien Chaffraix inline-table wrapper should be generated for display: inline element only https://bugs.webkit.org/show_bug.cgi?id=92054 Reviewed by Abhishek Arya. CSS 2.1 only takes into account the display when determining if we should generate an inline-table. My misreading of the spec would make us generate an inline-table wrapper for any inline formatting context. Test: fast/table/inline-block-generates-table-wrapper.html * rendering/RenderTable.cpp: (WebCore::RenderTable::createAnonymousWithParentRenderer): Changed to use display instead of isInline to properly match the spec. 2012-07-24 Alec Flett IndexedDB: Temporarily continue generating backend keys for empty key lists https://bugs.webkit.org/show_bug.cgi?id=92012 Reviewed by Tony Chang. Temporarily change key behavior to allow chromium in_process_webkit to call putWithIndexKeys without inadvertently preventing index key generation. Note this is temporary until frontend key generation patch lands. No new tests, this is part of a refactor that doesn't change behavior. * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): 2012-07-24 Pavel Feldman Web Inspector: introduce UISourceCodeFrame. https://bugs.webkit.org/show_bug.cgi?id=92124 Reviewed by Vsevolod Vlasov. Generic implementation of SourceFrame over UISourceCode added. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/StylesPanel.js: * inspector/front-end/UISourceCodeFrame.js: Added. (WebInspector.UISourceCodeFrame): (WebInspector.UISourceCodeFrame.prototype.canEditSource): (WebInspector.UISourceCodeFrame.prototype.commitEditing): (WebInspector.UISourceCodeFrame.prototype.afterTextChanged): (WebInspector.UISourceCodeFrame.prototype._didEditContent): (WebInspector.UISourceCodeFrame.prototype._onContentChanged): (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-24 Dan Bernstein REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color https://bugs.webkit.org/show_bug.cgi?id=92115 Reviewed by Mark Rowe. * platform/Scrollbar.cpp: (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check. 2012-07-24 Andrew Wilson Another prospective build fix for Chromium. Unreviewed. * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: 2012-07-24 Andrew Wilson Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: 2012-07-24 Dominik Röttsches HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz https://bugs.webkit.org/show_bug.cgi?id=92103 Reviewed by Philippe Normand. As preparation for enabling harfbuzz-ng for EFL, I would like to include the header here since the forward declarations are conflicting with the harfbuzz version we will use for EFL. No new tests, no change in behavior. * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: 2012-07-24 Allan Sandfeld Jensen Fix blend filter for autovectorizing https://bugs.webkit.org/show_bug.cgi?id=91398 Reviewed by Nikolas Zimmermann. To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that did not do boundary-checks in the inner loop. Finally the integer division by 255 was optimized not use integer division intrinsics. On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x. * platform/graphics/filters/FEBlend.cpp: (WebCore::fastDivideBy255): (BlendNormal): (WebCore::BlendNormal::apply): (BlendMultiply): (WebCore::BlendMultiply::apply): (BlendScreen): (WebCore::BlendScreen::apply): (BlendDarken): (WebCore::BlendDarken::apply): (BlendLighten): (WebCore::BlendLighten::apply): (BlendUnknown): (WebCore::BlendUnknown::apply): (WebCore::platformApply): (WebCore::FEBlend::platformApplyGeneric): (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEBlend.h: (FEBlend): 2012-07-23 Hans Wennborg Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute https://bugs.webkit.org/show_bug.cgi?id=91743 Reviewed by Adam Barth. Implement the 'emma' attribute as described in the spec draft at http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html Test: fast/speech/scripted/emma.html * Modules/speech/SpeechRecognitionResult.cpp: (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult): (WebCore): (WebCore::SpeechRecognitionResult::emma): * Modules/speech/SpeechRecognitionResult.h: (WebCore): (SpeechRecognitionResult): * Modules/speech/SpeechRecognitionResult.idl: * WebCore.gypi: * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: (WebCore): (WebCore::V8SpeechRecognitionResult::visitDOMWrapper): We need to add an implicit reference from the result object to the emma object to keep the latters DOM tree alive across garbage-collection. 2012-07-24 Andrei Poenaru Web Inspector: Protocol Extension: add getFlowByName command https://bugs.webkit.org/show_bug.cgi?id=91855 Reviewed by Pavel Feldman. The "getFlowByName" command should return a NamedFlow for a given document and name. Test: inspector/styles/protocol-css-regions-commands.html * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getFlowByName): (WebCore): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync): (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync): (WebInspector.NamedFlow): (WebInspector.NamedFlow.parsePayload): 2012-07-23 Oswald Buddenhagen [Qt] Fix compilation against namespaced Qt Reviewed by Simon Hausmann. * platform/graphics/Font.h: * platform/network/ResourceHandleInternal.h: * platform/qt/ThirdPartyCookiesQt.h: 2012-07-24 Anthony Scian Web Inspector [JSC]: Enable initiator column in network panel. https://bugs.webkit.org/show_bug.cgi?id=65533 Reviewed by Vsevolod Vlasov. With 40118 fixed for webkit, Preferences.displayInitiator should be set to true. Removed references to it since the optionality is no longer required. Test: http/tests/inspector/network/network-initiator.html * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype.switchToDetailedView): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkDataGridNode.prototype.createCells): (WebInspector.NetworkDataGridNode.prototype.refreshRequest): * inspector/front-end/Settings.js: 2012-07-24 Gyuyoung Kim Missing *explicit* keyword in dom and page. https://bugs.webkit.org/show_bug.cgi?id=92074 Reviewed by Kentaro Hara. Some constructors missed to use *explicit* keyword. They need to be added *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion. Some files in dom directory can't use explicit keyword because of build breaks. No new tests. Covered by existing tests. * dom/BeforeLoadEvent.h: (WebCore::BeforeLoadEvent::BeforeLoadEvent): * dom/BeforeTextInsertedEvent.h: (BeforeTextInsertedEvent): * dom/ChildListMutationScope.h: (WebCore::ChildListMutationScope::ChildListMutationScope): * dom/ChildNodeList.h: (ChildNodeList): * dom/ClientRect.h: (ClientRect): * dom/ClientRectList.h: (ClientRectList): * dom/ComposedShadowTreeWalker.h: (ComposedShadowTreeParentWalker): * dom/DOMCoreException.h: (WebCore::DOMCoreException::DOMCoreException): * dom/DOMImplementation.h: (DOMImplementation): * dom/DatasetDOMStringMap.h: (WebCore::DatasetDOMStringMap::DatasetDOMStringMap): * dom/DeviceMotionController.h: (DeviceMotionController): * dom/DeviceOrientationController.h: (DeviceOrientationController): * dom/DocumentParser.h: (DocumentParser): * dom/EventException.h: (WebCore::EventException::EventException): * dom/EventListener.h: (WebCore::EventListener::EventListener): * dom/ExceptionBase.h: (ExceptionBase): * dom/GenericEventQueue.h: (GenericEventQueue): * dom/KeyboardEvent.h: (WebCore::KeypressCommand::KeypressCommand): * dom/MemoryInstrumentation.h: (WebCore::MemoryObjectInfo::MemoryObjectInfo): * dom/MessageChannel.h: (MessageChannel): * dom/MessagePort.h: (MessagePort): * dom/MessagePortChannel.h: (MessagePortChannel): * dom/MutationObserver.h: * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::NamedNodeMap): * dom/NodeFilter.h: (WebCore::NodeFilter::NodeFilter): * dom/NodeWithIndex.h: (WebCore::NodeWithIndex::NodeWithIndex): * dom/Range.h: * dom/RangeException.h: (WebCore::RangeException::RangeException): * dom/RawDataDocumentParser.h: (WebCore::RawDataDocumentParser::RawDataDocumentParser): * dom/ScriptRunner.h: (ScriptRunner): * dom/SelectorQuery.h: (SelectorQuery): * dom/ShadowRoot.h: (ShadowRoot): * dom/SpaceSplitString.h: (SpaceSplitStringData): * dom/StaticHashSetNodeList.h: (StaticHashSetNodeList): * dom/StaticNodeList.h: (WebCore::StaticNodeList::StaticNodeList): * dom/TransformSource.h: (TransformSource): * dom/TreeScope.h: (TreeScope): * dom/WebKitNamedFlowCollection.h: (WebKitNamedFlowCollection): * page/EventHandler.h: (EventHandler): * page/FocusController.h: (FocusController): * page/FrameView.h: (FrameView): * page/MemoryInfo.h: (MemoryInfo): * page/Page.h: (Page): * page/PageGroup.h: (PageGroup): * page/PrintContext.h: (PrintContext): * page/Settings.h: (Settings): * page/SpeechInput.h: (SpeechInput): * page/SpeechInputResultList.h: (SpeechInputResultList): * page/WebKitAnimation.h: * page/WindowFeatures.h: (WindowFeatures): * page/WorkerNavigator.h: (WorkerNavigator): 2012-07-24 Kent Tamura Replace some callsites of shadowAncestorNode() with shadowHost() https://bugs.webkit.org/show_bug.cgi?id=92060 Reviewed by Hajime Morita. shadowAncestorNode() is deprecated. No new tests. This shouldn't change behaviors. * html/shadow/MediaControlElements.cpp: (WebCore::toParentMediaElement): * html/shadow/TextControlInnerElements.h: (WebCore::SpinButtonElement::isEnabledFormControl): (WebCore::SpinButtonElement::isReadOnlyFormControl): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintMediaFullscreenButton): (WebCore::RenderThemeEfl::paintMediaMuteButton): * platform/gtk/RenderThemeGtk.cpp: (WebCore::getMediaElementFromRenderObject): (WebCore::centerRectVerticallyInParentInputElement): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintSearchFieldCancelButton): (WebCore::RenderThemeQt::paintMediaSliderThumb): Removed an ASSERT() because nullness of o->node() is already asserted. * rendering/RenderInputSpeech.cpp: (WebCore::RenderInputSpeech::paintInputFieldSpeechButton): * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaSliderThumb): Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0. (WebCore::paintMediaVolumeSliderThumb): ditto. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Remove an ASSERT(input) because input never be null unless o->node() is null. If o->node() is null, this function crashes. (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): (WebCore::RenderThemeMac::paintSearchFieldResultsButton): (WebCore::RenderThemeMac::paintMediaMuteButton): It's ok to ignore "node is a media element" case because this function works only if node->isMediaControlElement(). (WebCore::RenderThemeMac::paintMediaPlayButton): ditto. (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto. * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintSearchFieldCancelButton): Remove an ASSERT(input) because input never be null unless o->node() is null. If o->node() is null, this function crashes. (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto. (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto. * rendering/RenderThemeWinCE.cpp: (WebCore::mediaElementParent): 2012-07-24 Peter Beverloo [Chromium] Build fix for Android after r123424 https://bugs.webkit.org/show_bug.cgi?id=92082 Unreviewed build fix. Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp in r123424, while there still are two references left to another method and a constant. Re-add the include directive. * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: 2012-07-24 Kentaro Hara [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code for static attributes in supplemental IDL files https://bugs.webkit.org/show_bug.cgi?id=91925 Reviewed by Adam Barth. r122912 implemented static attributes in CodeGeneratorJS.pm. However, it generates wrong code for static attributes in supplemental IDL files. This patch fixes it as shown in JSTestInterface.cpp. This fix aligns with the fix in CodeGeneratorV8.pm (r123308). Test: bindings/scripts/test/TestSupplemental.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr): (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr): 2012-07-24 Gyuyoung Kim Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins. https://bugs.webkit.org/show_bug.cgi?id=92064 Reviewed by Kentaro Hara. Some constructors missed to use *explicit* keyword. They need to be added *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion. No new tests. Covered by existing tests. * bridge/IdentifierRep.h: (WebCore::IdentifierRep::IdentifierRep): * history/BackForwardListImpl.h: (BackForwardListImpl): * history/CachedFrame.h: (CachedFrame): * history/HistoryItem.h: (HistoryItem): * loader/DocumentWriter.h: (DocumentWriter): * loader/FrameNetworkingContext.h: (WebCore::FrameNetworkingContext::FrameNetworkingContext): * loader/HistoryController.h: * loader/ImageLoader.h: (ImageLoader): * loader/LinkLoader.h: (LinkLoader): * loader/MainResourceLoader.h: (MainResourceLoader): * loader/NavigationAction.h: (NavigationAction): * loader/NavigationScheduler.h: (NavigationScheduler): * loader/PolicyChecker.h: (PolicyChecker): * loader/SubframeLoader.h: (SubframeLoader): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper): * plugins/PluginData.h: (PluginData): * plugins/PluginViewBase.h: (WebCore::PluginViewBase::PluginViewBase): 2012-07-24 Patrick Gansterer [Qt] Fix conversion from GregorianDateTime to QTime https://bugs.webkit.org/show_bug.cgi?id=92068 Reviewed by Simon Hausmann. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertValueToQVariant): 2012-07-24 Arko Saha Microdata: Implement PropertyNodeList interface. https://bugs.webkit.org/show_bug.cgi?id=80269 Reviewed by Ryosuke Niwa. Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name) returns NodeList object. Made changes so that it will return PropertyNodeList object. Implemented propertyNodeList.getValues() method. It returns an array of various values. Its values are obtained from the "itemValue" DOM property of each of the elements represented by the object, in tree order. Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html fast/dom/MicroData/propertynodelist-getvalues-test.html fast/dom/MicroData/propertynodelist-test-add-remove-element.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSMicroDataItemValueCustom.cpp: Added. (WebCore): (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String. * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added. (WebCore): (WebCore::toV8): Added toV8 custom code. * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified. (WebCore): (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr. (WebCore::DynamicNodeListCacheBase::invalidateCache): (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr. * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache is valid. (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::isRootedAtDocument): (DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid): (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid): (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type. (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref attribute change. * dom/Node.cpp: (WebCore::Node::propertyNodeList): * dom/Node.h: (WebCore): (Node): * dom/PropertyNodeList.cpp: Added. (WebCore): (WebCore::PropertyNodeList::PropertyNodeList): (WebCore::PropertyNodeList::~PropertyNodeList): (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata item. (WebCore::PropertyNodeList::updateRefElements): (WebCore::PropertyNodeList::nodeMatches): (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the itemValue DOM property of each of the elements represented by the object, in tree order. * dom/PropertyNodeList.h: Added. (WebCore): (PropertyNodeList): (WebCore::PropertyNodeList::create): * dom/PropertyNodeList.idl: Added. * html/HTMLCollection.cpp: (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr. * html/HTMLElement.cpp: (WebCore::HTMLElement::properties): (WebCore): (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements. * html/HTMLElement.h: (HTMLElement): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::updateRefElements): (WebCore::HTMLPropertiesCollection::updateNameCache): (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList. (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given name in the properties collection. * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has hasNameCache() and setHasNameCache(). (WebCore): (HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::invalidateCache): (WebCore::HTMLPropertiesCollection::updatePropertyCache): * html/HTMLPropertiesCollection.idl: * html/MicroDataItemValue.idl: Added. * page/DOMWindow.idl: 2012-07-24 Kentaro Hara [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not implicitly assume ScriptExecutionContext for static attributes https://bugs.webkit.org/show_bug.cgi?id=91924 Reviewed by Adam Barth. r122912 implemented static attributes in CodeGeneratorJS.pm. However, the generated code assumes that static attributes always require ScriptExecutionContext, which is wrong. If we need a ScriptExecutionContext, we should specify [CallWith=ScriptExecutionContext]. This patch fixes CodeGeneratorJS.pm so that static attributes do not assume ScriptExecutionContext. This fix aligns with the fix in CodeGeneratorV8.pm in r123308. Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr): (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr): (WebCore::jsTestObjConstructorStaticStringAttr): (WebCore::setJSTestObjConstructorStaticStringAttr): 2012-07-23 Gyuyoung Kim Missing *explicit* keyword in editing. https://bugs.webkit.org/show_bug.cgi?id=92055 Reviewed by Ryosuke Niwa. Some constructors missed to use *explicit* keyword. They need to be added *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion. No new tests. Covered by existing tests. * editing/AlternativeTextController.h: (WebCore::AlternativeTextController::UNLESS_ENABLED): * editing/BreakBlockquoteCommand.h: (BreakBlockquoteCommand): * editing/DeleteButton.h: (DeleteButton): * editing/DeleteButtonController.h: (DeleteButtonController): * editing/EditCommand.h: (EditCommand): (WebCore::SimpleEditCommand::SimpleEditCommand): * editing/EditingBehavior.h: (WebCore::EditingBehavior::EditingBehavior): * editing/EditingStyle.h: (EditingStyle): * editing/Editor.h: (Editor): * editing/FrameSelection.h: (FrameSelection): * editing/InsertLineBreakCommand.h: (InsertLineBreakCommand): * editing/ModifySelectionListLevel.h: (ModifySelectionListLevelCommand): (DecreaseSelectionListLevelCommand): * editing/RemoveFormatCommand.h: (RemoveFormatCommand): * editing/RemoveNodeCommand.h: (RemoveNodeCommand): * editing/RemoveNodePreservingChildrenCommand.h: (RemoveNodePreservingChildrenCommand): * editing/ReplaceNodeWithSpanCommand.h: (ReplaceNodeWithSpanCommand): * editing/TextInsertionBaseCommand.h: (TextInsertionBaseCommand): * editing/UndoManager.h: (UndoManager): * editing/UnlinkCommand.h: (UnlinkCommand): * editing/WrapContentsInDummySpanCommand.h: (WrapContentsInDummySpanCommand): 2012-07-23 Dominic Mazzoni AX: Need AccessibilityObjects for nodes without renderers in canvas subtree https://bugs.webkit.org/show_bug.cgi?id=87899 Reviewed by Chris Fleizach. Refactors AccessibilityRenderObject so that it inherits from a new class, AccessibilityNodeObject, that can be constructed from a Node without a renderer. Modifies AXObjectCache so that it automatically creates an AccessibilityNodeObject for elements in a canvas subtree but not otherwise. A new layout test verifies that this correctly exposes an accessibility tree with appropriate roles for elements in a canvas subtree. This patch does not try to complete the implementation of AccessibilityNodeObject. Most AX methods are still unimplemented and need to be migrated from AccessibilityRenderObject to AccessibilityNodeObject in a future patch. This patch also doesn't change anything outside of WebCore/accessibility, so the rest of WebCore only calls AXObjectCache when there are changes to a RenderObject, not to a Node. Accessible notifications on nodes without renderers need to be implemented in a future patch. Test: accessibility/canvas-accessibilitynodeobject.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::get): (WebCore): (WebCore::createFromNode): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::remove): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::remove): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid): (WebCore): (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid): (WebCore::AccessibilityARIAGrid::init): (WebCore::AccessibilityARIAGrid::create): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::create): * accessibility/AccessibilityARIAGridRow.cpp: (WebCore::AccessibilityARIAGridRow::create): * accessibility/AccessibilityAllInOne.cpp: * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::create): * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::create): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::create): (WebCore::AccessibilityMediaControlsContainer::create): (WebCore::AccessibilityMediaTimeline::create): (WebCore::AccessibilityMediaTimeDisplay::create): * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::create): (WebCore): * accessibility/AccessibilityMenuList.h: (AccessibilityMenuList): * accessibility/AccessibilityNodeObject.cpp: Added. (WebCore): (WebCore::AccessibilityNodeObject::AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::init): (WebCore::AccessibilityNodeObject::create): (WebCore::AccessibilityNodeObject::detach): (WebCore::AccessibilityNodeObject::childrenChanged): (WebCore::AccessibilityNodeObject::updateAccessibilityRole): (WebCore::AccessibilityNodeObject::firstChild): (WebCore::AccessibilityNodeObject::lastChild): (WebCore::AccessibilityNodeObject::previousSibling): (WebCore::AccessibilityNodeObject::nextSibling): (WebCore::AccessibilityNodeObject::parentObjectIfExists): (WebCore::AccessibilityNodeObject::parentObject): (WebCore::AccessibilityNodeObject::elementRect): (WebCore::AccessibilityNodeObject::setNode): (WebCore::AccessibilityNodeObject::document): (WebCore::AccessibilityNodeObject::determineAccessibilityRole): (WebCore::AccessibilityNodeObject::addChildren): (WebCore::AccessibilityNodeObject::accessibilityIsIgnored): (WebCore::AccessibilityNodeObject::canSetFocusAttribute): (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute): (WebCore::AccessibilityNodeObject::ariaRoleAttribute): (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent): * accessibility/AccessibilityNodeObject.h: Added. (WebCore): (AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject): (WebCore::AccessibilityNodeObject::node): (WebCore::AccessibilityNodeObject::isDetached): (WebCore::toAccessibilityNodeObject): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isAccessibilityNodeObject): * accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::create): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::init): (WebCore): (WebCore::AccessibilityRenderObject::create): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::setRenderer): (WebCore::AccessibilityRenderObject::canHaveChildren): (WebCore::AccessibilityRenderObject::addCanvasChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::create): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore): (WebCore::AccessibilityTable::~AccessibilityTable): (WebCore::AccessibilityTable::init): (WebCore::AccessibilityTable::create): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::create): * accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::create): 2012-07-23 David Barr Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag https://bugs.webkit.org/show_bug.cgi?id=91961 Reviewed by Tony Chang. https://bugs.webkit.org/show_bug.cgi?id=89055 A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag. https://bugs.webkit.org/show_bug.cgi?id=90046 Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION. No new tests; build configuration fix. * Configurations/FeatureDefines.xcconfig: 2012-07-23 Douglas Stockwell Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop https://bugs.webkit.org/show_bug.cgi?id=89148 Reviewed by Simon Fraser. CSSGradientValue attempted to resolve colors during paint, this crashed when a derived color like -webkit-activelink was encountered because the corresponding element was no longer available in the StyleResolver. Instead, by adding a field to CSSGradientColorStop we can resolve and then cache the resolved colors at the correct time. To avoid sharing cached derived colors between elements we clone the gradient values when needed. Test: fast/css/crash-on-gradient-with-derived-color.html * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache resolved colors, clone if colors are derived from the element. (WebCore): (WebCore::CSSGradientValue::addStops): (WebCore::CSSGradientValue::isCacheable): Defer to new logic in StyleResolver. * css/CSSGradientValue.h: (CSSGradientColorStop): Added cache of resolved color. (CSSGradientValue): (CSSLinearGradientValue): (CSSRadialGradientValue): * css/CSSImageGeneratorValue.h: (WebCore): * css/CSSValue.h: (WebCore::CSSValue::isGradientValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::image): Revert change from r96449. This is no longer necessary as the gradient colors are now resolved at a time when the style is set on StyleResolver. 2012-07-23 Patrick Gansterer Move GregorianDateTime from JSC to WTF namespace https://bugs.webkit.org/show_bug.cgi?id=91948 Reviewed by Geoffrey Garen. Moving GregorianDateTime into the WTF namespace allows us to us to use it in WebCore too. The new class has the same behaviour as the old struct. Only the unused timeZone member has been removed. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): 2012-07-23 Mark Pilgrim [Chromium] Move layoutTestMode to WebCore https://bugs.webkit.org/show_bug.cgi?id=92010 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): * platform/LayoutTestSupport.cpp: Added. (WebCore): (WebCore::isRunningLayoutTest): (WebCore::setIsRunningLayoutTest): * platform/LayoutTestSupport.h: Added. (WebCore): * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness): (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness): (WebCore::ScrollbarThemeChromiumWin::buttonSize): * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore): (WebCore::LookupAltName): (WebCore::fontContainsCharacter): (WebCore::FillLogFont): (WebCore::FontCache::getFontDataForCharacters): (WebCore::FontCache::createFontPlatformData): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): * rendering/RenderThemeChromiumAndroid.cpp: (WebCore::RenderThemeChromiumAndroid::systemColor): (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::caretBlinkInterval): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor): (WebCore::RenderThemeChromiumWin::systemColor): (WebCore::menuListButtonWidth): (WebCore::RenderThemeChromiumWin::determineClassicState): 2012-07-23 Dave Tu [chromium] Add droppedFrameCount to renderingStats. https://bugs.webkit.org/show_bug.cgi?id=91694 Reviewed by Adrienne Walker. * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: (WebCore): (WebCore::CCFrameRateCounter::frameInterval): (WebCore::CCFrameRateCounter::frameIndex): (WebCore::CCFrameRateCounter::CCFrameRateCounter): (WebCore::CCFrameRateCounter::markBeginningOfFrame): (WebCore::CCFrameRateCounter::isBadFrame): * platform/graphics/chromium/cc/CCFrameRateCounter.h: (WebCore::CCFrameRateCounter::droppedFrameCount): (CCFrameRateCounter): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::renderingStats): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderingStats.h: (CCRenderingStats): (WebCore::CCRenderingStats::CCRenderingStats): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::implSideRenderingStats): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread): 2012-07-23 Dan Bernstein Fixed the build after r123418. * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker. 2012-07-23 Mike Lawther CSS3 calc: optimise blending expression https://bugs.webkit.org/show_bug.cgi?id=90037 Reviewed by Tony Chang. Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress this blends them together when evaluated. An alternative and more general approach of being able to blend two CalcExpressionNodes was tested, but involves more memory allocations, was measurably slower, and nothing currently would make use of the generality. No functional change. Covered by existing tests. * platform/CalculationValue.h: (CalcExpressionBlendLength): (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength): (WebCore::CalcExpressionBlendLength::operator==): (WebCore::CalcExpressionBlendLength::evaluate): (WebCore): * platform/Length.cpp: (WebCore::Length::blendCalculation): 2012-07-23 Nico Weber [chromium] Show search tickmarks on css-styled scrollbars https://bugs.webkit.org/show_bug.cgi?id=91949 Reviewed by Adrienne Walker. This is done by letting RenderScrollbarTheme::paintTickmarks() delegate to the native ScrollbarTheme. To make this possible, move paintTickmarks() from ScrollbarThemeComposite to the superclass ScrollbarTheme. For testing, add internals.addTextMatchMarker() and add a pixel test. * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::paintTickmarks): Moved paintTickmarks() from ScrollbarThemeComposite to here. * platform/ScrollbarThemeComposite.h: Remove paintTickmarks(). * platform/chromium/ScrollbarThemeChromium.cpp: (WebCore::ScrollbarThemeChromium::paintTickmarks): Switch to drawing tickmarks as vectors, so they can be arbitrarily wide. * platform/chromium/ScrollbarThemeChromiumMac.h: (ScrollbarThemeChromiumMac): Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac. * rendering/RenderScrollbarTheme.cpp: (WebCore::RenderScrollbarTheme::paintTickmarks): Delegate to the native ScrollbarTheme for tickmark drawing. (WebCore): * rendering/RenderScrollbarTheme.h: (RenderScrollbarTheme): Override paintTickmarks(). 2012-07-23 Brian Anderson [chromium] Use shallow flushes that don't glFlush https://bugs.webkit.org/show_bug.cgi?id=90325 Reviewed by Kenneth Russell. Adds plumbing for the shallowFlushCHROMIUM extension and uses shallow flushes instead of normal flushes when uploading textures. Shallow flushes allow us to initiate command buffer flushes to the GPU thread/process without the overhead of a true glFlush. CCTextureUpdaterTest updated to recognize shallow flushes. * platform/chromium/support/Extensions3DChromium.cpp: (WebCore::Extensions3DChromium::shallowFlushCHROMIUM): (WebCore): * platform/graphics/chromium/Extensions3DChromium.h: (Extensions3DChromium): * platform/graphics/chromium/cc/CCGraphicsContext.h: * platform/graphics/chromium/cc/CCResourceProvider.cpp: (WebCore::CCResourceProvider::shallowFlushIfSupported): (WebCore): (WebCore::CCResourceProvider::CCResourceProvider): (WebCore::CCResourceProvider::initialize): * platform/graphics/chromium/cc/CCResourceProvider.h: (CCResourceProvider): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::update): 2012-07-23 Hanyee Kim When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame. https://bugs.webkit.org/show_bug.cgi?id=91322 Reviewed by Noam Rosenthal. When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply the property values defined in the last executing keyframe after the final iteration of animation. This patch does not return right after the end of animation, but it keeps applying the property values defined in the last executing keyframe. Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the last executing keyframe. Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property Test: animations/fill-mode-forwards2.html * platform/graphics/GraphicsLayerAnimation.cpp: (WebCore::normalizedAnimationValueForFillsForwards): (WebCore): (WebCore::GraphicsLayerAnimation::apply): 2012-07-23 Sheriff Bot Unreviewed, rolling out r123184, r123195, and r123197. http://trac.webkit.org/changeset/123184 http://trac.webkit.org/changeset/123195 http://trac.webkit.org/changeset/123197 https://bugs.webkit.org/show_bug.cgi?id=92049 pagecycler regression (Requested by morrita on #webkit). * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::suggestedMIMEType): * dom/Document.h: (WebCore): (WebCore::Node::isDocumentNode): (WebCore::Node::Node): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::setDocument): (WebCore): (WebCore::Node::setTreeScope): (WebCore::Node::treeScope): (WebCore::Node::isInShadowTree): (WebCore::Node::reportMemoryUsage): * dom/Node.h: (Node): (WebCore::Node::document): (WebCore::Node::inDocument): * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): (WebCore::NodeRareData::treeScope): (WebCore::NodeRareData::setTreeScope): (NodeRareData): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::setParentTreeScope): * dom/TreeScope.h: (WebCore): (WebCore::TreeScope::idTargetObserverRegistry): (TreeScope): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): (WebCore::TreeScopeAdopter::moveNodeToNewDocument): * editing/MoveSelectionCommand.cpp: * editing/RemoveNodeCommand.cpp: * editing/RemoveNodePreservingChildrenCommand.cpp: * inspector/PageConsoleAgent.cpp: 2012-07-23 Roger Fong On Windows, if select element is off screen horizontally, menu is either inappropriately resized or positioned offscreen. https://bugs.webkit.org/show_bug.cgi?id=91913 Reviewed by Tim Horton. If the select element is positioned off the edge of the screen to the left, the menu is resized. It should not be resized, just shifted to remain on the screen. If the select element is positioned off the edge of the screen to the right, the menu goes off screen instead of being shifted over to appear on screen. This problem only occurs on Windows. Test: ManualTests/win/select-menu-off-screen.html * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::calculatePositionAndSize): Modified final horizontal position calculation code to position popup menu on screen if it would otherwise go off. 2012-07-23 David Dorwin Fixed crash in webkitAddKey() when key parameter is null. https://bugs.webkit.org/show_bug.cgi?id=85444 Reviewed by Kentaro Hara. Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey Tests: media/encrypted-media/encrypted-media-syntax.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::webkitAddKey): 2012-07-23 Hayato Ito A FocusScope for a distributed node should not be its TreeScope. https://bugs.webkit.org/show_bug.cgi?id=91829 Reviewed by Dimitri Glazkov. Current implementation of FocusScope::focusScopeOf(Node*) returns the given node's treeScope(). That does not apply if the node is a distributed node. We should calculate a FocusScope for a distributed node by traversing ancestor nodes in Composed Shadow Tree. Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html * page/FocusController.cpp: (WebCore::FocusScope::focusScopeOf): 2012-07-23 Douglas Stockwell Null-pointer crash when parsing border-image https://bugs.webkit.org/show_bug.cgi?id=91963 Reviewed by Darin Adler. Test: fast/css/border-image-fill-crash.html * css/CSSParser.cpp: (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where parseBorderImageRepeat is called when the value list is empty. 2012-07-23 Bem Jones-Bey [CSS Exclusions] SVG shape errors should invalidate exclusion shapes https://bugs.webkit.org/show_bug.cgi?id=91761 Reviewed by Andreas Kling. CSS exclusion shapes that are specified with negative radiuses or height/width are now considered invalid and ignored. Tests added to LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html * css/CSSParser.cpp: (WebCore::CSSParser::parseExclusionShapeRectangle): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): 2012-07-23 Tien-Ren Chen [chromium] Implement scrollbar theme for Android https://bugs.webkit.org/show_bug.cgi?id=91674 Reviewed by Adam Barth. Previously the scrollbar for Android was implemented as an extra drawing pass in the compositor. Now we switch to use the standard ScrollbarTheme mechanism. No new tests. We use mock scrollbars during layout test to share pixel results with Linux. * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness): (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition): (WebCore::ScrollbarThemeChromiumAndroid::thumbLength): (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect): (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect): (WebCore::ScrollbarThemeChromiumAndroid::trackRect): (WebCore): (WebCore::ScrollbarThemeChromiumAndroid::paintThumb): (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground): * platform/chromium/ScrollbarThemeChromiumAndroid.h: (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars): (ScrollbarThemeChromiumAndroid): (WebCore::ScrollbarThemeChromiumAndroid::hasButtons): (WebCore::ScrollbarThemeChromiumAndroid::hasThumb): 2012-07-23 Kwang Yul Seo Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency" https://bugs.webkit.org/show_bug.cgi?id=91703 Reviewed by Adam Barth. The current WebKit HTML5 parser implementation does not hold the original token in the stack of open elements and the active formatting elements. This is problematic because the original token is used to create an element in "reconstruct the active formatting elements" and "call the adoption agency". As a workaround, WebKit uses the saved element instead of the original token to create an element. But this causes us to fail examples like this:

TEXT
reconstructTheActiveFormattingElements calls this method to open a second tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it should be "1". Created a ref-counted container class, HTMLStackItem to hold the original token and the namespace URI as well as the element. Changed HTMLElementStack and HTMLFormattingElementList to use HTMLStackItem. Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token instead of the saved element. Updated test expectation for html5lib/runner-expected.txt because now resources/scripted/adoption01.dat passes. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertFormattingElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::createElementFromSavedToken): (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): * html/parser/HTMLConstructionSite.h: (HTMLConstructionSite): (WebCore::HTMLConstructionSite::currentElementRecord): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::ElementRecord::ElementRecord): (WebCore::HTMLElementStack::ElementRecord::replaceElement): (WebCore::HTMLElementStack::pushRootNode): (WebCore::HTMLElementStack::pushHTMLHtmlElement): (WebCore::HTMLElementStack::pushRootNodeCommon): (WebCore::HTMLElementStack::pushHTMLHeadElement): (WebCore::HTMLElementStack::pushHTMLBodyElement): (WebCore::HTMLElementStack::push): (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLElementStack.h: (WebCore::HTMLElementStack::ElementRecord::element): (WebCore::HTMLElementStack::ElementRecord::node): (WebCore::HTMLElementStack::ElementRecord::stackItem): (ElementRecord): (HTMLElementStack): * html/parser/HTMLFormattingElementList.cpp: (WebCore::HTMLFormattingElementList::swapTo): (WebCore::HTMLFormattingElementList::append): * html/parser/HTMLFormattingElementList.h: (WebCore::HTMLFormattingElementList::Entry::Entry): (WebCore::HTMLFormattingElementList::Entry::isMarker): (WebCore::HTMLFormattingElementList::Entry::stackItem): (WebCore::HTMLFormattingElementList::Entry::element): (WebCore::HTMLFormattingElementList::Entry::replaceElement): (WebCore::HTMLFormattingElementList::Entry::operator==): (WebCore::HTMLFormattingElementList::Entry::operator!=): (Entry): (HTMLFormattingElementList): * html/parser/HTMLStackItem.h: Added. (WebCore): (HTMLStackItem): (WebCore::HTMLStackItem::create): (WebCore::HTMLStackItem::element): (WebCore::HTMLStackItem::node): (WebCore::HTMLStackItem::token): (WebCore::HTMLStackItem::namespaceURI): (WebCore::HTMLStackItem::HTMLStackItem): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2012-07-23 Andreas Kling Report the extra memory used by immutable StylePropertySet objects. Reviewed by Anders Carlsson. Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object size on top of sizeof(T). Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array tacked onto the end of the object when m_isMutable == false. * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/MemoryInstrumentation.h: (WebCore::MemoryObjectInfo::reportObjectInfo): (WebCore::MemoryClassInfo::MemoryClassInfo): 2012-07-23 Gregg Tavares Fix WebGL texSubImage2D for cube maps https://bugs.webkit.org/show_bug.cgi?id=91927 Reviewed by Kenneth Russell. Fixes texSubImage2D so any size rectangle can be passed in for cube maps. Test: fast/canvas/webgl/tex-sub-image-cube-maps.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::copyTexImage2D): (WebCore::WebGLRenderingContext::texImage2DBase): (WebCore::WebGLRenderingContext::texSubImage2DBase): (WebCore::WebGLRenderingContext::validateTexFuncParameters): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-07-23 Sheriff Bot Unreviewed, rolling out r123387. http://trac.webkit.org/changeset/123387 https://bugs.webkit.org/show_bug.cgi?id=92036 Broke chromium win build (Requested by tony^work on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-23 Kwang Yul Seo Ref-count AtomicHTMLToken https://bugs.webkit.org/show_bug.cgi?id=91981 Reviewed by Adam Barth. Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703. No new tests - no functional changes. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): (WebCore::HTMLConstructionSite::insertDoctype): (WebCore::HTMLConstructionSite::insertComment): (WebCore::HTMLConstructionSite::insertCommentOnDocument): (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertFormattingElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLConstructionSite.h: (HTMLConstructionSite): * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::create): (AtomicHTMLToken): (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer): (WebCore::HTMLTreeBuilder::constructTreeFromToken): (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken): (WebCore::HTMLTreeBuilder::processToken): (WebCore::HTMLTreeBuilder::processDoctypeToken): (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::processFakeEndTag): (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): (WebCore::HTMLTreeBuilder::attributesForIsindexInput): (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): (WebCore): (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processStartTagForInTable): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): (WebCore::HTMLTreeBuilder::processEndTagForInTableBody): (WebCore::HTMLTreeBuilder::processEndTagForInRow): (WebCore::HTMLTreeBuilder::processEndTagForInCell): (WebCore::HTMLTreeBuilder::processEndTagForInBody): (WebCore::HTMLTreeBuilder::processEndTagForInTable): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processComment): (WebCore::HTMLTreeBuilder::processCharacter): (WebCore::HTMLTreeBuilder::processEndOfFile): (WebCore::HTMLTreeBuilder::defaultForBeforeHTML): (WebCore::HTMLTreeBuilder::defaultForBeforeHead): (WebCore::HTMLTreeBuilder::defaultForInHead): (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript): (WebCore::HTMLTreeBuilder::defaultForAfterHead): (WebCore::HTMLTreeBuilder::processStartTagForInHead): (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): (WebCore::HTMLTreeBuilder::processScriptStartTag): (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): (WebCore::HTMLTreeBuilder::processTokenInForeignContent): (WebCore::HTMLTreeBuilder::parseError): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): 2012-07-23 Scott Graham Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium https://bugs.webkit.org/show_bug.cgi?id=91667 Reviewed by Tony Chang. Using native tools instead of cygwin version improves build time performance by roughly 50% (on top of previous cl-instead-of-gcc change). Also, use - instead of / for cl flags because a layer of project generator converts them to \ otherwise, which causes the preprocessing to fail (very slowly because of the cygwin-loop with a sleep 1). No new tests. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-06-12 Jer Noble MediaController.currentTime should be kept stable during script execution. https://bugs.webkit.org/show_bug.cgi?id=88555 Reviewed by Eric Carlson. Test: media/media-controller-time-constant.html To keep MediaController.currentTime stable, add a new m_position variable and a new m_clearPositionTimer timer. Both must be mutable variables as they will be updated from within const functions. Calls to currentTime() will result in stable values until the next runloop iteration. * html/MediaController.cpp: (MediaController::MediaController): (MediaController::currentTime): (MediaController::setCurrentTime): (MediaController::clearPositionTimerFired): * html/MediaController.h: 2012-07-23 Huang Dongsung Destroy CSS decoded data more eagerly once they become dead caches. https://bugs.webkit.org/show_bug.cgi?id=91733 Reviewed by Geoffrey Garen. Internal review by Kwang Yul Seo. There are three CachedResources with decoded data: CachedImage, CachedScript and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved(). We must apply the same policy here in CachedCSSStyleSheet because priority inversion can occur. For example, we can't destroy the decoded data of CachedImages when they are referenced by CachedCSSStyleSheet as background, mask or border images. No new tests - no new testable functionality. * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): (WebCore::CachedCSSStyleSheet::didAddClient): (WebCore::CachedCSSStyleSheet::allClientsRemoved): (WebCore::CachedCSSStyleSheet::destroyDecodedData): (WebCore): (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired): * loader/cache/CachedCSSStyleSheet.h: (CachedCSSStyleSheet): 2012-07-23 Simon Fraser Part 2 of: Implement sticky positioning https://bugs.webkit.org/show_bug.cgi?id=90046 Reviewed by Ojan Vafai. Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky' value for position, returning it from getComputedStyle(), and storing it in RenderStyle. Test: fast/css/sticky/parsing-position-sticky.html * Configurations/FeatureDefines.xcconfig: * css/CSSComputedStyleDeclaration.cpp: (WebCore::getPositionOffsetValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EPosition): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2012-07-23 Stephen Chenney Crash when setting empty class name on a new element https://bugs.webkit.org/show_bug.cgi?id=92024 Reviewed by Andreas Kling. Add a check for null attributeData() when setting the className to an empty string on a newly created element. New SVG elements have null attributeData() on baseVal upon creation. Test: svg/custom/empty-className-baseVal-crash.html * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData() 2012-07-23 Shawn Singh [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design https://bugs.webkit.org/show_bug.cgi?id=80622 Reviewed by Adrienne Walker. clipRect(), usesLayerClipping(), and drawableContentRect() have been very confusing in CCLayerTreeHostCommon for a while. This patch refactors it so that (1) clipping is only done locally in calcDrawTransforms, and (2) the layer's drawableContentRect value is now meaningful value outside of calcDrawTransforms. Additionally, the layer is now always clipped to the root surface's contentBounds (which are set to the viewport bounds). This refactor not only makes calcDrawTransforms far more readable and intuitive, but this patch enables more upcoming beneficial refactors, including the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953. Tests are also significantly updated to keep up with this refactoring change. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): Removed m_usesLayerClipping and m_clipRect and associated accessors. * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): Updated comment * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): Removed m_usesLayerClipping and m_clipRect and associated accessors. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): removed setClipRect code that no longer applies * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateLayerScissorRect): scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect. (WebCore::calculateSurfaceScissorRect): scissor rect is now a little bit tighter, except when filters are involved. (WebCore::layerClipsSubtree): new helper function (WebCore): (WebCore::calculateVisibleContentRect): (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsInternal): - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns, - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping. - removed the boolean return value, which was redundant with drawableContentRectOfSubtree. - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic. - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space. (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms): (WebCore::pointIsClippedBySurfaceOrClipRect): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::layerScissorRectInTargetSurface): Updated this accessor. It could be removed in the future, but not appropriate for this patch. * platform/graphics/chromium/cc/CCRenderSurface.h: 2012-07-23 Patrick Gansterer [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system. * CMakeLists.txt: 2012-07-23 Ryosuke Niwa REGRESSION(r123281): childNodes sometimes returns wrong nodes https://bugs.webkit.org/show_bug.cgi?id=92014 Reviewed by Anders Carlsson. The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()), NOT firstNode(forward, rootNode(), previous) as evident from the argument list of the function. Test: fast/dom/NodeList/childNodes-reverse-iteration.html * html/HTMLCollection.cpp: (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): 2012-07-23 Steve VanDeBogart Chrome/Skia: PDF print output does not have clickable links. https://bugs.webkit.org/show_bug.cgi?id=91171 Reviewed by Stephen White. Connect GraphicsContext::setURLForRect to Skia's new API for annotations. Printing is not generally testable. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setURLForRect): 2012-07-23 Pierre Rossi Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client https://bugs.webkit.org/show_bug.cgi?id=91006 Reviewed by Ryosuke Niwa. The rationale here is that the client doesn't need to know about the touch event handler count. needTouchEvents was already used for that purpose. Test: fast/events/touch/touch-handler-count.html * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed. (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER flag for the document if we reach a count of zero. The rationale being that hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for the same purpose. * dom/Document.h: (Document): (WebCore::Document::touchEventHandlerCount): * loader/EmptyClients.h: * page/ChromeClient.h: (ChromeClient): * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged. (WebCore::Frame::setDocument): call needsTouchEvents directly. * page/Frame.h: Ditto. (Frame): * testing/Internals.cpp: (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly for additional testing. (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-07-23 Caio Marcelo de Oliveira Filho [Qt] RenderThemeQtMobile highlight colors are not being used https://bugs.webkit.org/show_bug.cgi?id=92004 Reviewed by Noam Rosenthal. The issue here is that setPaletteFromPageClientIfExists() is being used as a virtual function, but it isn't, so when platformActiveSelectionBackgroundColor() runs, it doesn't pick the right palette. Besides fixing this virtual behavior, the patch changes the structure a bit, because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme to set the palette, which isn't exactly what the function name says. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor): (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor): (WebCore::RenderThemeQt::platformFocusRingColor): (WebCore::RenderThemeQt::systemColor): (WebCore::RenderThemeQt::getMediaControlForegroundColor): (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack): Use the virtual colorPalette() to get the palette. (WebCore::RenderThemeQt::colorPalette): (WebCore): Removed the code for getting the page client from here since it is used only by the QStyle variant. * platform/qt/RenderThemeQt.h: (RenderThemeQt): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::colorPalette): (WebCore): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): 2012-07-23 Simon Fraser Part 1 of: Implement sticky positioning https://bugs.webkit.org/show_bug.cgi?id=90046 Reviewed by Ojan Vafai. Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially. Sort the ENABLE_CSS lines in the file. Make sure all the flags are in FEATURE_DEFINES. * Configurations/FeatureDefines.xcconfig: 2012-07-23 Sheriff Bot Unreviewed, rolling out r123339. http://trac.webkit.org/changeset/123339 https://bugs.webkit.org/show_bug.cgi?id=92006 massive media tests failure (Requested by philn on #webkit). * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): * platform/graphics/gstreamer/GStreamerVersioning.cpp: (setGstElementClassMetadata): * platform/graphics/gstreamer/GStreamerVersioning.h: 2012-07-21 Vincent Scheib webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access. https://bugs.webkit.org/show_bug.cgi?id=91892 Reviewed by Adam Barth. PointerLockElement only returned when requested from the document that owns it. Tests: http/tests/fullscreen/fullscreenelement-different-origin.html http/tests/fullscreen/fullscreenelement-same-origin.html http/tests/pointer-lock/pointerlockelement-different-origin.html http/tests/pointer-lock/pointerlockelement-same-origin.html * dom/Document.cpp: (WebCore::Document::webkitPointerLockElement): 2012-07-23 Philippe Normand [GTK][jhbuild] Switch to GStreamer 0.11 build https://bugs.webkit.org/show_bug.cgi?id=91727 Reviewed by Gustavo Noronha Silva. Add a new function to encapsulate the GStreamer API removal of GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this macro can now be replaced by calling the g_object_is_floating function. * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): * platform/graphics/gstreamer/GStreamerVersioning.cpp: (gstObjectIsFloating): * platform/graphics/gstreamer/GStreamerVersioning.h: 2012-07-23 Christophe Dumez [EFL] media/controls-styling.html is failing https://bugs.webkit.org/show_bug.cgi?id=91984 Reviewed by Eric Carlson. Make sure that the CSS properties letter-spacing, word-spacing, line-height, text-transform, text-indent, text-shadow, text-decoration and color do not affect the media element controls, that display text. No new tests. Already tested by media/controls-styling.html and media/controls-styling-strict.html * css/mediaControlsEfl.css: (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): 2012-07-23 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing header files. 2012-07-23 Kent Tamura Replace some instances of shadowAncestorNode() with shadowHost() https://bugs.webkit.org/show_bug.cgi?id=91966 Reviewed by Hajime Morita. shadowAncestorNode() is deprecated. We should use shadowHost(). No new tests. This doesn't change any behavior. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): * dom/TreeScope.cpp: (WebCore::listTreeScopes): * html/HTMLSummaryElement.cpp: (WebCore::isClickableControl): * html/shadow/DetailsMarkerControl.cpp: (WebCore::DetailsMarkerControl::summaryElement): * html/shadow/MeterShadowElement.cpp: (WebCore::MeterShadowElement::meterElement): * html/shadow/ProgressShadowElement.cpp: (WebCore::ProgressShadowElement::progressElement): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::layout): (WebCore::RenderSliderContainer::layout): (WebCore::SliderThumbElement::hostInput): (WebCore::TrackLimiterElement::shadowPseudoId): (WebCore::SliderContainerElement::shadowPseudoId): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::customStyleForRenderer): (WebCore::TextControlInnerTextElement::defaultEventHandler): (WebCore::TextControlInnerTextElement::createRenderer): (WebCore::TextControlInnerTextElement::customStyleForRenderer): (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::step): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::setState): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlInnerBlock::positionForPoint): 2012-07-23 Pavel Feldman [WK2] REGRESSION r122966: Crash when closing tab with Web Inspector open in WebKit::PageOverlay https://bugs.webkit.org/show_bug.cgi?id=91782 Reviewed by Yury Semikhatsky. hideHighlight was never called once user hovered over a node. * inspector/DOMNodeHighlighter.cpp: (WebCore::InspectorOverlay::update): 2012-07-23 Peter Beverloo [Chromium] Build fix for the Windows builder following r123311 https://bugs.webkit.org/show_bug.cgi?id=91979 Unreviewed build fix. Changeset r123311 moved the TextCodecWinCE.{cpp,h} files to the Windows directory. Update Chromium's references to these files to fix the build. * WebCore.gypi: 2012-07-23 Patrick Gansterer [WIN] Remove ICU dependencies from UniscribeController https://bugs.webkit.org/show_bug.cgi?id=91921 Reviewed by Ryosuke Niwa. Replace ICU specific functions and macros with the corresponding code from WTF::Unicode. This allows us to use UniscribeController with an other Unicode implementation too. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::advance): 2012-07-23 Christophe Dumez [EFL] media/controls-styling-strict.html is failing https://bugs.webkit.org/show_bug.cgi?id=91960 Reviewed by Kenneth Rohde Christiansen. Use "display: -webkit-box;" instead of inline-block for current-time control. This is needed because inline-block behaves differently in strict mode. No new test, already tested by media/controls-styling-strict.html * css/mediaControlsEfl.css: (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): 2012-07-23 Carlos Garcia Campos Unreviewed. Fix GTK+ build with ENABLE_DATALIST_ELEMENT. Add an implementation for virtual pure methods sliderTickSize() and sliderTickOffsetFromTrackCenter() when HTML5 datalist element is enabled. * platform/gtk/RenderThemeGtk.cpp: (WebCore): (WebCore::RenderThemeGtk::sliderTickSize): (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter): * platform/gtk/RenderThemeGtk.h: 2012-07-23 Patrick Gansterer Replace getCurrentLocalTime() with GetLocalTime() in LocaleWin.cpp https://bugs.webkit.org/show_bug.cgi?id=91937 Reviewed by Ryosuke Niwa. The windows function returns the required year directly and removes one additonal dependecy on getCurrentLocalTime(). * platform/text/LocaleWin.cpp: (WebCore::LocaleWin::LocaleWin): 2012-07-23 Vsevolod Vlasov Web Inspector: Drag and drop should not be started on right mouse click. https://bugs.webkit.org/show_bug.cgi?id=91728 Reviewed by Pavel Feldman. Introduced WebInspector.installDragHandle method to control drag and drop support, checking whichg mouse button is pressed. Simplified WebInspector._elementDragStart, removed "element" parameter. Simplified tab moving support in TabbedPane, removed "mousemove" handler. Removed while loop determining which element was dragged in TimelineOverviewPane, each drag support is now installed independently. Drive-by: fixed TimelineOverviewPane window moving on resources-dividers-label-bar drang-and-drop. Drive-by: fixed CSSStyleModel compilation. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._positionResizers): (WebInspector.DataGrid.prototype._startResizerDragging): (WebInspector.DataGrid.prototype._endResizerDragging): * inspector/front-end/Drawer.js: (WebInspector.Drawer): (WebInspector.Drawer.prototype._animationDuration): (WebInspector.Drawer.prototype._startStatusBarDragging): (WebInspector.Drawer.prototype._endStatusBarDragging): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype._startRetainersHeaderDragging): (WebInspector.HeapSnapshotView.prototype._endRetainersHeaderDragging): * inspector/front-end/SidebarOverlay.js: (WebInspector.SidebarOverlay.prototype.set _startResizerDragging): (WebInspector.SidebarOverlay.prototype._endResizerDragging): (WebInspector.SidebarOverlay.prototype._installResizer): * inspector/front-end/Spectrum.js: * inspector/front-end/SplitView.js: (WebInspector.SplitView.prototype._startResizerDragging): (WebInspector.SplitView.prototype._endResizerDragging): (WebInspector.SplitView.prototype.installResizer): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPaneTab.prototype._createTabElement): (WebInspector.TabbedPaneTab.prototype._tabMouseDown): (WebInspector.TabbedPaneTab.prototype._startTabDragging): (WebInspector.TabbedPaneTab.prototype._endTabDragging): * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewWindow): (WebInspector.TimelineOverviewWindow.prototype._leftResizeElementDragging): (WebInspector.TimelineOverviewWindow.prototype._rightResizeElementDragging): (WebInspector.TimelineOverviewWindow.prototype._startWindowSelectorDragging): (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging): (WebInspector.TimelineOverviewWindow.prototype._startWindowDragging): (WebInspector.TimelineOverviewWindow.prototype._windowDragging): (WebInspector.TimelineOverviewWindow.prototype._endWindowDragging): (WebInspector.TimelineOverviewWindow.prototype._moveWindow): (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._startSplitterDragging): (WebInspector.TimelinePanel.prototype._endSplitterDragging): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDragEnd): * inspector/front-end/UIUtils.js: (WebInspector.installDragHandle): (WebInspector._elementDragStart): (WebInspector._elementDragEnd): * inspector/front-end/timelinePanel.css: (#timeline-overview-grid .resources-dividers-label-bar): 2012-07-23 Hayato Ito ComposedShadowTreeWalker should skip an empty insertion points. https://bugs.webkit.org/show_bug.cgi?id=91826 Reviewed by Hajime Morita. ComposedShadowTreeWalker wrongly returns 'null' if it encounters an insertion point into where no nodes are distributed. We should skip such an insertion point and continue walking using the next possible node, which might be a next sibling or a next distributed node, and resolve the next node recursively. Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseLightChildren): (WebCore): (WebCore::ComposedShadowTreeWalker::traverseSiblings): (WebCore::ComposedShadowTreeWalker::traverseNode): (WebCore::ComposedShadowTreeWalker::traverseDistributedeNodes): (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint): (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree): (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot): * dom/ComposedShadowTreeWalker.h: (ComposedShadowTreeWalker): 2012-07-23 Patrick Gansterer Rename TextCodecWinCE to TextCodecWin https://bugs.webkit.org/show_bug.cgi?id=91947 Reviewed by Ryosuke Niwa. Since TextCodecWinCE is used by other (non-upstreamed) windows ports too, TextCodecWin is a better name for the implementation. Also remove the dependency on WinCE FontCache to make it more usable. * PlatformWinCE.cmake: * platform/text/TextEncodingRegistry.cpp: (WebCore::extendTextCodecMaps): * platform/text/win/TextCodecWin.cpp: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.cpp. * platform/text/win/TextCodecWin.h: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.h. 2012-07-22 Kentaro Hara [V8] CodeGeneratorV8.pm should support static attributes https://bugs.webkit.org/show_bug.cgi?id=91764 Reviewed by Adam Barth. CodeGeneratorJS.pm already supports static attributes. CodeGeneratorV8.pm should also support them. Tests: bindings/scripts/test/TestObj.idl bindings/scripts/test/TestSupplemental.idl * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): * bindings/scripts/test/TestObj.idl: Added defined(TESTING_V8). * bindings/scripts/test/TestSupplemental.idl: Added test cases for static attributes in supplemental IDL files. * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests results. (WebCore): (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr): The generated code is wrong since CodeGeneratorJS.pm does not support static attributes for supplemental IDL files. I will fix it in a follow-up patch. (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr): (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results. (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter): (TestInterfaceV8Internal): (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter): (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::staticReadOnlyIntAttrAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::staticStringAttrAttrGetter): (WebCore::TestObjV8Internal::staticStringAttrAttrSetter): (WebCore): 2012-07-22 Gyuyoung Kim Missing *explicit* keyword in storage and workers. https://bugs.webkit.org/show_bug.cgi?id=91934 Reviewed by Kentaro Hara. Some constructors missed to use *explicit* keyword. They need to be added *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion. No new tests. Convered by existing tests. * storage/StorageAreaImpl.h: (StorageAreaImpl): * storage/StorageMap.h: (StorageMap): * storage/StorageSyncManager.h: (StorageSyncManager): * storage/StorageTask.h: (StorageTask): * storage/StorageTracker.h: (StorageTracker): * workers/SharedWorker.h: (SharedWorker): * workers/Worker.h: (Worker): * workers/WorkerLocation.h: (WebCore::WorkerLocation::WorkerLocation): * workers/WorkerMessagingProxy.h: (WorkerMessagingProxy): 2012-07-23 Kent Tamura Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively https://bugs.webkit.org/show_bug.cgi?id=91941 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * accessibility/AXObjectCache.cpp: (WebCore::createFromRenderer): * accessibility/AccessibilityProgressIndicator.cpp: * accessibility/AccessibilityProgressIndicator.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/html.css: * html/HTMLMeterElement.cpp: * html/HTMLMeterElement.h: * html/HTMLMeterElement.idl: * html/HTMLProgressElement.cpp: * html/HTMLProgressElement.h: * html/HTMLProgressElement.idl: * html/HTMLTagNames.in: * html/shadow/MeterShadowElement.cpp: * html/shadow/MeterShadowElement.h: Wrap with #if ENABLE(METER_ELEMENT). * html/shadow/ProgressShadowElement.cpp: * html/shadow/ProgressShadowElement.h: Wrap with #if ENABLE(PROGRESS_ELEMENT). * page/DOMWindow.idl: * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): (WebCore::RenderThemeEfl::edjeGroupFromFormType): (WebCore): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/gtk/RenderThemeGtk.cpp: (WebCore): * platform/gtk/RenderThemeGtk.h: (RenderThemeGtk): * platform/gtk/RenderThemeGtk2.cpp: (WebCore): * platform/gtk/RenderThemeGtk3.cpp: (WebCore): * platform/qt/RenderThemeQt.cpp: (WebCore): * platform/qt/RenderThemeQt.h: (WebCore): (RenderThemeQt): * platform/qt/RenderThemeQtMobile.cpp: (WebCore): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): * rendering/RenderMeter.cpp: * rendering/RenderMeter.h: * rendering/RenderObject.h: (RenderObject): * rendering/RenderProgress.cpp: * rendering/RenderProgress.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::paintBorderOnly): (WebCore::RenderTheme::paintDecorations): (WebCore): * rendering/RenderTheme.h: (WebCore): (RenderTheme): * rendering/RenderThemeChromiumLinux.cpp: (WebCore): * rendering/RenderThemeChromiumLinux.h: * rendering/RenderThemeChromiumSkia.cpp: (WebCore): * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): * rendering/RenderThemeChromiumWin.cpp: (WebCore): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore): 2012-07-22 Kent Tamura Rename ENABLE_DETAILS to ENABLE_DETAILS_ELEMENT https://bugs.webkit.org/show_bug.cgi?id=91928 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * html/HTMLDetailsElement.cpp: * html/HTMLDetailsElement.idl: * html/HTMLSummaryElement.cpp: * html/HTMLTagNames.in: * html/shadow/DetailsMarkerControl.cpp: * rendering/RenderDetailsMarker.cpp: * rendering/RenderDetailsMarker.h: * rendering/RenderObject.h: (RenderObject): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): 2012-07-21 Dan Bernstein SVG-as-image (constrained) intrinsic size calculation is wrong in vertical writing modes https://bugs.webkit.org/show_bug.cgi?id=91918 Reviewed by Anders Carlsson. Test: svg/as-image/svg-intrinsic-size-rectangular-vertical.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): When there is a content renderer, it returns a physical intrinsic size and aspect ratio. The code was already accounting for this by taking the reciprocal of the aspect ratio in the vertical case. Made it also transpose the size itself, turning it from physical to logical. Moved this code after setting m_intrinsicSize, since that member variable is always physical. 2012-07-21 Patrick Gansterer Cleanup TextEncoding USE(XXX_UNICODE) macros https://bugs.webkit.org/show_bug.cgi?id=91923 Reviewed by Andreas Kling. Replace PLATFORM(QT) with USE(QT4_UNICODE) and OS(WINCE) with USE(WINCE_UNICODE). This gives us more flexibility in choosing the unicode backend for a port. * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::encode): * platform/text/TextEncodingRegistry.cpp: (WebCore::extendTextCodecMaps): 2012-07-21 Patrick Gansterer Remove unnecessary ICU header includes from SimpleFontDataWin.cpp https://bugs.webkit.org/show_bug.cgi?id=91922 Reviewed by Kentaro Hara. This allows us to use SimpleFontDataWin with an other Unicode implementation too. * platform/graphics/win/SimpleFontDataWin.cpp: 2012-07-21 Kwang Yul Seo A start tag whose tag name is "html" in the "in body" insertion mode is a parse error https://bugs.webkit.org/show_bug.cgi?id=91916 Reviewed by Eric Seidel. According to the HTML5 spec, a start tag whose tag name is "html" in the "in body" insertion mode is a parse error. Added HTMLTreeBuilder::processHtmlStartTagForInBody(AtomicHTMLToken&) to call parseError(token). Removed "FIXME: parse error" from HTMLConstructionSite::insertHTMLHtmlStartTagInBody and HTMLConstructionSite::insertHTMLBodyStartTagInBody because we already marked the call sites of these two methods with parseError(token). No behavior change because parseError(token) is just a marker. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): (WebCore): (WebCore::HTMLTreeBuilder::processStartTagForInHead): * html/parser/HTMLTreeBuilder.h: 2012-07-20 Czene Tamás double data type shoud be changed to float in ColorMatrix https://bugs.webkit.org/show_bug.cgi?id=91499 Reviewed by Nikolas Zimmermann. * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::matrix): (WebCore::saturate): (WebCore::huerotate): (WebCore::luminance): (WebCore::effectType): 2012-07-20 Stephen White [chromium] Take current transformation matrix into account when deciding on resize algorithm for drawPattern. https://bugs.webkit.org/show_bug.cgi?id=90624 Reviewed by Adrienne Walker. Since the pattern shader uses both the current transformation matrix and the pattern matrix when transforming pixels, we need to do the same when computing the resampling mode. Also removed the resampling hint code, added in r60658, since it appears to be dead (caller was removed in r76379). Covered by existing tests, such as fast/borders/border-image-scale-transform.html. * platform/graphics/skia/ImageSkia.cpp: (WebCore::computeResamplingMode): Pass in the matrix to be used for computing the destination width and height (for awesome resampling). Remove the image resampling hint code. (WebCore::paintSkBitmap): Pass in the CTM to computeResamplingMode(). (WebCore::Image::drawPattern): Concatenate the CTM and the pattern matrix, and pass that to computeResamplingMode() and TransformDimensions(). Invert the CTM's scale and apply it to the pattern transform, so their concatenation gives identity scale. * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: Remove the image resampling hint (dead code). 2012-07-20 Kwang Yul Seo Anything else in the "in table" insertion mode is a parse error https://bugs.webkit.org/show_bug.cgi?id=91915 Reviewed by Adam Barth. According to the HTML5 spec, anything else in the "in table" insertion mode is a parse error. No behavior change because parseError(token) is just a marker. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTagForInTable): 2012-07-20 Kent Tamura Rename ENABLE_DATALIST to ENABLE_DATALIST_ELEMENT https://bugs.webkit.org/show_bug.cgi?id=91846 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * css/html.css: * html/HTMLDataListElement.cpp: * html/HTMLDataListElement.h: * html/HTMLDataListElement.idl: * html/HTMLInputElement.cpp: (WebCore): (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::insertedInto): (WebCore::HTMLInputElement::removedFrom): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLInputElement.idl: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): (WebCore::HTMLOptionElement::childrenChanged): (WebCore): * html/HTMLOptionElement.h: (HTMLOptionElement): * html/HTMLTagNames.in: * html/InputType.cpp: (WebCore): * html/InputType.h: (InputType): * html/RangeInputType.cpp: (WebCore): * html/RangeInputType.h: (RangeInputType): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderContainer::layout): * page/DOMWindow.idl: * platform/efl/RenderThemeEfl.cpp: (WebCore): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/qt/RenderThemeQt.cpp: (WebCore): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * rendering/RenderTheme.cpp: (WebCore): * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeChromiumLinux.cpp: (WebCore): (WebCore::RenderThemeChromiumLinux::paintSliderTrack): * rendering/RenderThemeChromiumLinux.h: (RenderThemeChromiumLinux): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::paintSliderTrack): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderTrack): (WebCore): 2012-07-18 Ryosuke Niwa Unify HTMLCollection and DynamicNodeList https://bugs.webkit.org/show_bug.cgi?id=91335 Reviewed by Anders Carlsson. This is the grand unification of HTMLCollection and DynamicNodeList. It merges implementations of item() and length() in ChildNodeList, DynamicNodeList, and HTMLCollection. The unified implementation is based on the one used for HTMLCollection, that has been improved over the last few days; see r122660 and r122672 for examples. There are five key changes: 1. Made itemBeforeOrAfter aware of DynamicNodeList. 2. itemBeforeOrAfter and related functions take and return Node* to support ChildNodeList. 3. Renamed InvalidCollectionType to NodeListCollectionType since DynamicNodeLists need to be identified itemBeforeOrAfter. 4. Renamed itemAfter to virtualItemAfter in subclasses of HTMLCollection, and devirtualized itemAfter used in common cases to avoid performance regressions. To make this intent clear, SupportItemBefore and DoNotSupportItemBefore have been renamed to DoesNotOverrideItemAfter and OverridesItemAfter. This change also help us detect a subclass of HTMLCollection that passes in a wrong value to ItemBeforeSupportType by making forward iterations fail (hit an assertion or doesn't iterate at all) as well as backward iterations. 5. Restricted the use of elementsArrayOffset to subclasses that provide virtualItemAfter. This patch completes my effort to share code between HTMLCollection and DynamicNodeList. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): (WebCore): Removed length() and item(). (WebCore::ChildNodeList::nodeMatches): * dom/ChildNodeList.h: (ChildNodeList): * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): * dom/Document.cpp: (WebCore::Document::registerNodeListCache): (WebCore::Document::unregisterNodeListCache): * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeListCacheBase::invalidateCache): (WebCore::DynamicNodeList::length): (WebCore::DynamicNodeList::item): * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes new boolean argument shouldOnlyIncludeDirectChildren indicating whether the non-child descendents should be included or not. This is necessary to identify ChildNodeList in itemBeforeOrAfter. (WebCore::DynamicNodeListCacheBase::ownerNode): Moved from DynamicNodeListCacheBase and HTMLCollectionCacheBase. (WebCore::DynamicNodeListCacheBase::document): Moved from DynamicNodeListCacheBase. (WebCore::DynamicNodeListCacheBase::rootNode): Ditto. (WebCore::DynamicNodeListCacheBase::overridesItemAfter): Renamed from supportsItemBefore and the return value has been negated. (WebCore::DynamicNodeListCacheBase::shouldOnlyIncludeDirectChildren): Added. (WebCore::DynamicNodeListCacheBase): (WebCore::DynamicNodeList::DynamicNodeList): Takes NodeListType to determine the value of shouldOnlyIncludeDirectChildren. (DynamicNodeList): (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::MicroDataItemList): * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): * html/CollectionType.h: * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::HTMLAllCollection): * html/HTMLCollection.cpp: (WebCore::shouldOnlyIncludeDirectChildren): (WebCore::rootTypeFromCollectionType): (WebCore::invalidationTypeExcludingIdAndNameAttributes): (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::isAcceptableElement): (WebCore::firstNode): Extracted from itemBeforeOrAfter. (WebCore::DynamicNodeListCacheBase::iterateForNextNode): Ditto. (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): Takes and returns Node*. Special case ChildNodeList since there is no need to skip any node. When "this" is a node list, call nodeMatches instead of isAcceptableElement. (WebCore::DynamicNodeListCacheBase::itemBefore): No longer takes offsetInArray since the use of elementsArrayOffset has been restricted to HTMLCollections that provides virtualItemAfter. (WebCore::DynamicNodeListCacheBase::itemAfter): Calls virtualItemAfter if necessary. Otherwise assert offsetInArray is zero since we should never be using this variable when virtualItemAfter is not provided. (WebCore::DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedItem): (WebCore::DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem): (WebCore::DynamicNodeListCacheBase::setItemCache): Updates m_cachedElementsArrayOffset in HTMLCollection if and only if virtualItemAfter is provided. This is safe because node lists never provide virtualItemAfter. (WebCore::DynamicNodeListCacheBase::cachedElementsArrayOffset): Similarly, returns m_cachedElementsArrayOffset if virtualItemAfter is provided. (WebCore::DynamicNodeListCacheBase::lengthCommon): (WebCore::DynamicNodeListCacheBase::itemCommon): Note that supportsItemBefore() is equivalent to !overridesItemAfter() here. (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Uses Node* through out the function. Since itemBefore never uses offsetInArray, always sets 0 for that. Note that we never call itemBefore and virtualItemAfter on the same object. (WebCore::HTMLCollection::virtualItemAfter): Added only to make the class "concrete". (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::tags): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollectionCacheBase): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::base): (HTMLCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::virtualItemAfter): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): (WebCore::HTMLNameCollection::virtualItemAfter): * html/HTMLNameCollection.h: (HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::virtualItemAfter): (WebCore::HTMLPropertiesCollection::updateNameCache): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::virtualItemAfter): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): 2012-07-20 Joshua Bell IndexedDB: Simplify backend interface classes https://bugs.webkit.org/show_bug.cgi?id=91901 Reviewed by Tony Chang. The IDBTransactionBackendInterface included several methods only used by the real implementation objects, not via the interfaces. Expose a static Impl::from(Interface) method for transaction, and migrate all of the backend-internal uses from Interface to Impl. No new tests - no functional changes. * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl): * Modules/indexeddb/IDBCursorBackendImpl.h: (WebCore): (WebCore::IDBCursorBackendImpl::create): (IDBCursorBackendImpl): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal): (WebCore::IDBDatabaseBackendImpl::objectStore): (WebCore::IDBDatabaseBackendImpl::deleteObjectStore): (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::setVersionInternal): (WebCore::IDBDatabaseBackendImpl::transactionStarted): (WebCore::IDBDatabaseBackendImpl::transactionFinished): (WebCore::IDBDatabaseBackendImpl::transaction): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (WebCore): (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::openCursorInternal): (WebCore::IDBIndexBackendImpl::openCursor): (WebCore::IDBIndexBackendImpl::openKeyCursor): (WebCore::IDBIndexBackendImpl::countInternal): Drop unused transaction argument. (WebCore::IDBIndexBackendImpl::count): (WebCore::IDBIndexBackendImpl::get): (WebCore::IDBIndexBackendImpl::getKey): * Modules/indexeddb/IDBIndexBackendImpl.h: (IDBIndexBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::put): (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): (WebCore): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteFunction): (WebCore::IDBObjectStoreBackendImpl::clear): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): (WebCore::IDBObjectStoreBackendImpl::deleteIndex): (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): (WebCore::IDBObjectStoreBackendImpl::openCursor): (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): (WebCore::IDBObjectStoreBackendImpl::count): (WebCore::IDBObjectStoreBackendImpl::countInternal): Drop unused transaction argument. * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore): (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::objectStore): * Modules/indexeddb/IDBTransactionBackendImpl.h: (WebCore::IDBTransactionBackendImpl::from): (IDBTransactionBackendImpl): (WebCore::IDBTransactionBackendImpl::mode): * Modules/indexeddb/IDBTransactionBackendInterface.h: (IDBTransactionBackendInterface): 2012-07-20 Joshua Bell IndexedDB: "ASSERTION FAILED: !m_requestFinished" hit in IDBRequest::dispatchEvent https://bugs.webkit.org/show_bug.cgi?id=86911 Reviewed by Tony Chang. Clean up the IDBRequest/IDBCursor relationship and the IDBRequest lifecycle. The IDBRequest's m_cursor/setCursor() calls are renamed to m_pendingCursor/setPendingCursor() to clarify that the request will move between two states - either there's a cursor request in-flight c/o a continue() or advance() call, or the result has come in (cursor, null-for-done, or error). Since they were only ever used together, resetReadyState() is merged into setResultCursor(). The m_requestFinished flag becomes redundant and is dropped - the ASSERT reported in the bug becomes an ASSERT(m_readyState == PENDING) and m_readyState tracking is already correct. Test: storage/indexeddb/request-continue-abort.html * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): Unreachable code path now dead and gone. (WebCore::IDBCursor::continueFunction): Ditto. * Modules/indexeddb/IDBRequest.cpp: Most functions just add state assertions. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::setCursorDetails): (WebCore::IDBRequest::setPendingCursor): Merge with old resetReadyState(). (WebCore): (WebCore::IDBRequest::getResultCursor): Helper, since digging cursor out of IDBAny is pesky. (WebCore::IDBRequest::setResultCursor): Just moved in the file to be with its friends. (WebCore::IDBRequest::finishCursor): (WebCore::IDBRequest::onError): Just assertions, re-ordering, re-naming. (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::hasPendingActivity): (WebCore::IDBRequest::dispatchEvent): Simplify! (WebCore::IDBRequest::enqueueEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): 2012-07-20 Andrew Scherkus [chromium] Don't display fullscreen button for video elements not containing video https://bugs.webkit.org/show_bug.cgi?id=91811 Reviewed by Eric Carlson. Covered by media/media-document-audio-repaint.html * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::reset): 2012-07-20 Dmitry Titov [Chromium] Out of Memory is observed when a large object is passed to a Web Worker. https://bugs.webkit.org/show_bug.cgi?id=91535. Reviewed by David Levin. No new tests because of no new behavior and lack of mechanism to monitor used memory. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext): (WebCore): (WebCore::SerializedScriptValue::~SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context). 2012-07-20 David Grogan IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types https://bugs.webkit.org/show_bug.cgi?id=91414 Reviewed by Adam Barth. No new tests because no new behavior. * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::metadata): No behavior change, this just needs a dummy parameter to match the modified API. * Modules/indexeddb/IDBMetadata.h: (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata): (IDBDatabaseMetadata): 2012-07-18 Gustavo Noronha Silva [Soup] Unnecessary RefPtr usage and null check https://bugs.webkit.org/show_bug.cgi?id=91636 Reviewed by Martin Robinson. Small clean up of code that is not necessary; no change in functionality. * platform/network/soup/SocketStreamHandleSoup.cpp: (WebCore::SocketStreamHandle::connected): 2012-07-20 Mark Salisbury Typo in FontCacheWin.cpp causes return value from getCachedFontData() in getLastResortFallbackFont() to be ignored https://bugs.webkit.org/show_bug.cgi?id=91506 Reviewed by Joseph Pecoraro. No new test. The "fallback fallback" code ends up creating a font, so you always get a fallback font even with this code bug. A test would be buggy, being highly platform dependent on what the "fallback fallback" font is on the particular windows machine the test runs on. * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getLastResortFallbackFont): 2012-07-20 Stephen White [chromium] Clean up scratch texture usage in Chromium's implementation of GPU-accelerated filters. https://bugs.webkit.org/show_bug.cgi?id=83370 Reviewed by Adrienne Walker. There didn't used to be a safe way to allocate a scratch texture, and hold into it beyond the lifetime of GrAutoScratchTexture. Now there is: detach(). Covered by existing tests in css3/filters. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): Use a GrAutoScratchTexture to allocate the destination texture, and detach() to detach it from the cache before placing it in an SkGrTexturePixelRef. This means we no longer need to do any lock/ unlock trickery with the TextureCacheEntry, since the refcount is enough to keep the texture away from the cache's prying hands. 2012-07-20 Stephen White [chromium] Clean up scratch texture usage in Chromium's implementation of GPU-accelerated filters. https://bugs.webkit.org/show_bug.cgi?id=83370 Reviewed by Adrienne Walker. There didn't used to be a safe way to allocate a scratch texture, and hold into it beyond the lifetime of GrAutoScratchTexture. Now there is: detach(). Covered by existing tests in css3/filters. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): Use a GrAutoScratchTexture to allocate the destination texture, and detach() to detach it from the cache before placing it in an SkGrTexturePixelRef. This means we no longer need to do any lock/ unlock trickery with the TextureCacheEntry, since the refcount is enough to keep the texture away from the cache's prying hands. 2012-07-19 Andrew Scherkus [chromium] CSS tweaks to media controls to prevent styles from being overridden https://bugs.webkit.org/show_bug.cgi?id=91802 Reviewed by Eric Carlson. Having the buttons declared as inline caused them to not be included in the box layout, resulting in styles set outside the media element to affect the position of the buttons. In a similar vein, it was also possible to override the font-style attribute for the time display. Test: media/controls-styling-strict.html * css/mediaControlsChromium.css: (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): 2012-07-20 Han Shen [Chromium] Compilation fails under gcc 4.7 https://bugs.webkit.org/show_bug.cgi?id=90227 Reviewed by Tony Chang. Disable warnings about c++0x compatibility in gcc newer than 4.6. * WebCore.gyp/WebCore.gyp: 2012-07-20 Vincent Scheib Unreviewed compile fix, r123247 included unintended changes to Document.cpp. See http://trac.webkit.org/changeset/123247. * dom/Document.cpp: (WebCore::Document::webkitExitPointerLock): 2012-07-20 Ryosuke Niwa REGRESSION(r122873): 15% regression on Dromaeo/dom-attr https://bugs.webkit.org/show_bug.cgi?id=91827 Reviewed by Anders Carlsson. Move shouldInvalidateNodeListCaches from Document.cpp to Node.cpp since it's only called in Node::invalidateNodeListCachesInAncestors. Test: PerformanceTests/Dromaeo/dom-attr.html. * dom/Document.cpp: (WebCore): * dom/Node.cpp: (WebCore::shouldInvalidateNodeListCachesForAttr): Extracted from shouldInvalidateNodeListCaches to unroll the loop in shouldInvalidateNodeListCaches. Apparently gcc wasn't doing the right thing. (WebCore::Document::shouldInvalidateNodeListCaches): (WebCore::Document::invalidateNodeListCaches): (WebCore::Node::invalidateNodeListCachesInAncestors): 2012-07-20 Nico Weber Fix more -Wunused-private-field violations https://bugs.webkit.org/show_bug.cgi?id=91876 Reviewed by Adam Barth. As of http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120716/061102.html the warning finds more bugs. Fix them. * html/FTPDirectoryDocument.cpp: (FTPDirectoryDocumentParser): (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource): * inspector/InspectorDOMStorageResource.h: (InspectorDOMStorageResource): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::RenderSVGTextPath): * rendering/svg/RenderSVGTextPath.h: 2012-07-20 Adam Klein CodeGeneratorInspector.py is unnecessarily chatty https://bugs.webkit.org/show_bug.cgi?id=91758 Reviewed by Vsevolod Vlasov. The code aded in r123091 included a "print" statement for each written file. This makes for noisy build output, especially noticeable in the Chromium ninja build (where build output takes up a single line of the console). If this print statement is generally useful, it should be hidden behind a --verbose commandline option, as we do for the binding generators. * inspector/CodeGeneratorInspector.py: (SmartOutput.close): Remove print statement. 2012-07-20 Stephen White [chromium] Enable GPU-accelerated skia implementation of feDiffuseLighting, feSpecularLighting. https://bugs.webkit.org/show_bug.cgi?id=91865 Reviewed by Dirk Schulze. Translate the light parameters into the appropriate SkLightingImageFilter calls. This path is only enabled when the filters are created with the Accelerated flag set. This will be covered by tests in svg/filters/* when they are added to the virtual GPU tests. * WebCore.gypi: * platform/graphics/filters/FELighting.h: (FELighting): * platform/graphics/filters/skia/FELightingSkia.cpp: Added. (WebCore): (WebCore::FELighting::platformApplySkia): 2012-07-20 Pavel Feldman Web Inspector: disable fake workers inspection. https://bugs.webkit.org/show_bug.cgi?id=91867 Reviewed by Vsevolod Vlasov. 'Fake workers' is unreliable error-prone way to debug workers. There are a lot of frameworks supporting it. Inspector should not do that since it has a more powerful native worker inspection capabilities. Port owners should enable it in case they want to provide workers debugging. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): * inspector/InjectedScriptHost.h: (InjectedScriptHost): * inspector/InjectedScriptHost.idl: * inspector/Inspector.json: * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::enable): * inspector/InspectorAgent.h: (WebCore): (InspectorAgent): * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/front-end/InjectedFakeWorker.js: Removed. * inspector/front-end/ScriptsPanel.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkersSidebarPane): * inspector/front-end/externs.js: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::contextDestroyed): * workers/AbstractWorker.h: (AbstractWorker): * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): 2012-07-20 Sheriff Bot Unreviewed, rolling out r123182. http://trac.webkit.org/changeset/123182 https://bugs.webkit.org/show_bug.cgi?id=91863 Causing ASSERT crashes in tests accessibility/canvas.html and accessibility/canvas-accessibilitynodeobject.html (Requested by jernoble on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * accessibility/AXObjectCache.cpp: (WebCore): * accessibility/AXObjectCache.h: (AXObjectCache): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid): (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid): (WebCore): (WebCore::AccessibilityARIAGrid::create): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::create): * accessibility/AccessibilityARIAGridRow.cpp: (WebCore::AccessibilityARIAGridRow::create): * accessibility/AccessibilityAllInOne.cpp: * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::create): * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::create): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::create): (WebCore::AccessibilityMediaControlsContainer::create): (WebCore::AccessibilityMediaTimeline::create): (WebCore::AccessibilityMediaTimeDisplay::create): * accessibility/AccessibilityMenuList.cpp: * accessibility/AccessibilityMenuList.h: (WebCore::AccessibilityMenuList::create): * accessibility/AccessibilityNodeObject.cpp: Removed. * accessibility/AccessibilityNodeObject.h: Removed. * accessibility/AccessibilityObject.h: (AccessibilityObject): * accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::create): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::create): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent): (WebCore): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): (WebCore::AccessibilityRenderObject::ariaRoleAttribute): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::canSetFocusAttribute): (WebCore::AccessibilityRenderObject::childrenChanged): (WebCore::AccessibilityRenderObject::canHaveChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::setRenderer): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::create): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore::AccessibilityTable::~AccessibilityTable): (WebCore): (WebCore::AccessibilityTable::create): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::create): * accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::create): 2012-07-20 Christophe Dumez [EFL] Proxy configuration should honor the no_proxy environment variable https://bugs.webkit.org/show_bug.cgi?id=91747 Reviewed by Kenneth Rohde Christiansen. Implement a custom Proxy URI Resolver for libsoup so that we can use it in EFL port. This custom proxy resolver brings support for setting exceptions so that the proxy is not used for the specified hosts. By default, the proxy is not used for localhost and 127.0.0.1. No new tests, no behavior change for layout tests. * PlatformEfl.cmake: * platform/network/soup/ProxyResolverSoup.cpp: Added. (soup_proxy_resolver_wk_init): (soupProxyResolverWkFinalize): (soupProxyResolverWkSetProperty): (soupProxyResolverWkGetProperty): (shouldBypassProxy): (idle_return_proxy_uri): (soupProxyResolverWkGetProxyURIAsync): (soupProxyResolverWkGetProxyURISync): (soup_proxy_resolver_wk_class_init): (soup_proxy_resolver_wk_interface_init): (soupProxyResolverWkNew): * platform/network/soup/ProxyResolverSoup.h: Added. 2012-07-20 Pierre Rossi ColorChooserClient should expose the element's location https://bugs.webkit.org/show_bug.cgi?id=91767 Reviewed by Kent Tamura. The rationale is that the chrome client could have an interest in placing the picker next to the element for usability reasons. No new tests as there is not much logic here: Just exposing a geometry information to WebKit. * html/ColorInputType.cpp: (WebCore::ColorInputType::elementRectRelativeToWindow): (WebCore): * html/ColorInputType.h: (ColorInputType): * platform/ColorChooserClient.h: (ColorChooserClient): 2012-07-20 Thiago Marcos P. Santos [WK2] WebIntents doesn't build if mutation observers is disabled https://bugs.webkit.org/show_bug.cgi?id=91839 Reviewed by Kenneth Rohde Christiansen. WebIntents was depending on a code protected by ENABLE(MUTATION_OBSERVERS). Now the code is also enabled by ENABLE(WEB_INTENTS). * bindings/js/JSDictionary.cpp: (WebCore): * bindings/js/JSDictionary.h: 2012-07-20 Mihnea Ovidenie [CSSRegions]Assert failure when layout positioned objects in regions https://bugs.webkit.org/show_bug.cgi?id=90792 Reviewed by Andreas Kling. Before clamping the containing block (for an out-of-flow positioned element inside a named flow) to the region, we have to test whether the region is not null, which can happen when the named flow does not have attached regions. Tests: fast/regions/positioned-vrl-in-named-flow.html fast/regions/positioned-vrl-in-parent-named-flow.html fast/regions/positioned-with-vrl-parent-in-named-flow.html * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::RenderBox::computePositionedLogicalHeight): 2012-07-20 Stephen Chenney SVG Filter Effect sub-region not applied for some filters https://bugs.webkit.org/show_bug.cgi?id=89767 Reviewed by Dirk Schulze. The filter effect region for SVG feGaussian and feDropShadow filters was incorrectly set, failing to account for the radius of the blur. This patch fixes the problem and removes an unneccessary clip operation when the filter result is blitted into the target. That clip was clipping the shadow from webkit-shadow. Tests: svg/filters/feDropShadow-subregion.svg svg/filters/feGaussianBlur-subregion.svg * platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::determineAbsolutePaintRect): Moved the code that clips the paint rect by the filter effect subregion to come after the paint is modified by the filter radius. * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::determineAbsolutePaintRect): Moved the code that clips the paint rect by the filter effect subregion to come after the paint is modified by the filter radius. * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::postApplyResource): Removed a clip that is unnecessary and that was incorrectly clipping drop shadows. 2012-07-19 Pavel Feldman Web Inspector: Status bar icons are misaligned by 1px to the right https://bugs.webkit.org/show_bug.cgi?id=91757 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.css: (.glyph): (.glyph.shadow): 2012-07-20 Andrei Poenaru Web Inspector: Protocol Extension: add getNamedFlowCollection command https://bugs.webkit.org/show_bug.cgi?id=91607 Reviewed by Pavel Feldman. Extended the protocol with "getNamedFlowCollection" command. This command returns the CSS Named Flows from the document. Test: inspector/styles/protocol-getNamedFlowCollection-command.html * dom/WebKitNamedFlowCollection.cpp: (WebCore::WebKitNamedFlowCollection::namedFlowsNames): (WebCore): * dom/WebKitNamedFlowCollection.h: (WebKitNamedFlowCollection): * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getNamedFlowCollection): (WebCore): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::assertDocument): (WebCore): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync): 2012-07-20 Eugene Klyuchnikov Web Inspector: Timeline: forward compatibility for load. https://bugs.webkit.org/show_bug.cgi?id=91714 Reviewed by Pavel Feldman. Accept records of unrecognized types and render them as "unknown". Test: inspector/timeline/timeline-load-incompatible.html * English.lproj/localizedStrings.js: Added UI string. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.recordStyle): Add missing record styles at runtime. (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails): Add some common information for default case. 2012-07-20 MORITA Hajime Another unreviewed Mac build fix against r123184. * WebCore.exp.in: 2012-07-20 Mihnea Ovidenie [CSSRegions]Crash when flowing a region into itself https://bugs.webkit.org/show_bug.cgi?id=90289 Reviewed by Andreas Kling. If a region is designed to receive itself as content through a named flow, we avoid a circular dependency by not attaching the region to the desired named flow. In such occasions, the region's attached flow thread object is null and we have to check this pointer before using it in RenderRegion::styleDidChange. Test: fast/regions/flow-region-into-itself-crash.html * rendering/RenderRegion.cpp: (WebCore::RenderRegion::styleDidChange): 2012-07-20 MORITA Hajime Unreviewed Mac build fix against r123184. * WebCore.exp.in: 2012-07-17 Kinuko Yasuda If value for responseType defined as type that not supported, it should not throw an exception in XHR 2 https://bugs.webkit.org/show_bug.cgi?id=90976 Reviewed by Alexey Proskuryakov. http://www.w3.org/TR/XMLHttpRequest2/#the-responsetype-attribute The spec does not say it should throw an exception when a non-supported type is set, and other browsers do not throw it either. Test: fast/xmlhttprequest/xmlhttprequest-responsetype-set-type.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): Stop throwing an exception when non-supported type is given. 2012-07-20 Matt Falkenhagen Show or hide depending on the open attribute https://bugs.webkit.org/show_bug.cgi?id=90931 Reviewed by Kent Tamura. Test: fast/dom/HTMLDialogElement/dialog-open.html * css/html.css: Add CSS for dialog. This is copied verbatim from the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/#flow-content-1 (dialog:not([open])): (dialog): * html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::close): Set open to false, to hide the dialog. (WebCore::HTMLDialogElement::show): Set open to true, to show the dialog. (WebCore): (WebCore::HTMLDialogElement::isPresentationAttribute): Make openAttr a presentation attribute, to work around bug 91058 * html/HTMLDialogElement.h: (HTMLDialogElement): * html/HTMLDialogElement.idl: 2012-07-20 Shinya Kawanaka Needs pseudo id to point the inner element of an img elemnet for styling https://bugs.webkit.org/show_bug.cgi?id=91590 Reviewed by Hajime Morita. We introduce pseudo id to point the element in UserAgentShadowDOM. This enables us to style the inner element of an img element shadow. Please see also http://trac.webkit.org/wiki/ShadowDOMForReplacedElements Test: fast/dom/shadow/shadowdom-for-image-with-pseudo-id.html * html/shadow/ImageInnerElement.cpp: (WebCore::ImageInnerElement::shadowPseudoId): (WebCore): * html/shadow/ImageInnerElement.h: (ImageInnerElement): 2012-07-20 Kent Tamura REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms https://bugs.webkit.org/show_bug.cgi?id=91804 Reviewed by Hajime Morita. The complexity of FormKeyGenerator::formKey() was O(N) where N is the number of form elements with an identical action URL, and formKey() is called for every form. So, it's O(N^2). A page in www.reddit.com contains hundreds of form elements with action="#". So FormController:: formElementsState() took a few seconds on a slow machine. In order to avoid O(N^2) operation, storing a map from form signatures to next index numbers, instead of storing existing formKey strings. No new tests. Just a performance improvement. * html/FormController.cpp: (FormKeyGenerator): Remove m_existingKeys. Add a map from a form signature string to the next index number. (WebCore::formSignature): Returns a signature string for a form, without an index number. This is like "actionURL [name1 name2 ]" (WebCore::FormKeyGenerator::formKey): Creates a formKey string by concatenating a formSignature and #n. N is obtained from m_formSignatureToNextIndexMap in O(1). (WebCore::FormKeyGenerator::willDeleteForm): Remove the code for m_existingKeys. 2012-07-20 Keishi Hattori Fix crash in WebCore::HTMLInputElement::dataList https://bugs.webkit.org/show_bug.cgi?id=91818 Reviewed by Kent Tamura. Fix crash that occurs when setting slider appearance on a regular node. Test: fast/forms/range/slider-appearance-crash.html * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintSliderTicks): Check if node is an input element. 2012-07-20 Kent Tamura [Chromium] Fix an assertion failure in TextFieldDecorationElement::hostInput() https://bugs.webkit.org/show_bug.cgi?id=91824 Reviewed by Hajime Morita. No new tests. This code is used only in Chromium browser. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::hostInput): Use shadowHost(), and allow to return 0. (WebCore::TextFieldDecorationElement::defaultEventHandler): Check 0. 2012-07-19 Simon Hausmann [Qt] Compile WebCore without QtWidgets https://bugs.webkit.org/show_bug.cgi?id=91819 Reviewed by Kenneth Rohde Christiansen. * WebCore.pri: QT += opengl is not needed for Qt 5, given that QtGui has OpenGL support built in with the QOpenGL* classes. 2012-07-19 MORITA Hajime [Refactoring] Replace Node's Document pointer with a TreeScope pointer https://bugs.webkit.org/show_bug.cgi?id=59816 Reviewed by Ryosuke Niwa. Before this change, Node::treeScope() fetches the TreeScope object from ElementRareData. This approach has several shortcomings: - rareData() call is slow due to a hashtable lookup. - In shadow tree, each node has its tree scope in ElementRareData, that means the rare-data is no longer rare in that case. This change gets rid of ElementRareData::m_treeScope by replacing Node::m_document with Node::m_treeScope. And retrieves the document of Node through m_treeScope. Note that Node::document() is a hot function and naive replacemennt of m_document with m_treeScope can hurt the speed. This change employs some tricks to address it. - This change introduces Node::InShadowTree flag, if the flag is off, that means m_treeScope is actually a document an can be returned as the result. this eliminates an extract dereference. - Node::m_treeScope can be null. But we don't want to issue any extra conditional statement. So this change represents a null TreeScope as TreeScope::nullInstance(), which saves one conditional statement. With these changes, the Node::document() slowdown is minimized to unnoticeable size. No new tests. Covered by existing tests. * dom/Document.cpp: Took care of connectio betwen TreeScope. (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::suggestedMIMEType): * dom/Document.h: (WebCore::Node::treeScope): Now just return m_treeScope, taking care of nullInstance() case. (WebCore): (WebCore::Node::setTreeScope): Now just sets m_treeScope. (WebCore::Node::documentInternal): Extracted from document() to have ASSERT-free version. (WebCore::Node::document): Re-implemented over treeScope() and the flag. (WebCore::Node::isDocumentNode): Re-implemented using treeScope() (WebCore::Node::Node): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::reportMemoryUsage): * dom/Node.h: (Node): (WebCore::Node::inDocument): (WebCore::Node::isInShadowTree): Rewrote to use InShadowTree flag. * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): Eliminated m_treeScope. (NodeRareData): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore): (WebCore::TreeScope::setParentTreeScope): Added. (WebCore::TreeScope::isDocumentScope): Added. (WebCore::TreeScope::nullInstance): Added. * dom/TreeScope.h: Added m_parentTreeScope. (WebCore): (WebCore::TreeScope::rootDocument): Added. (TreeScope): * dom/TreeScopeAdopter.cpp: No longer calls setDocument() (WebCore::TreeScopeAdopter::moveTreeToNewScope): (WebCore::TreeScopeAdopter::moveNodeToNewDocument): * editing/MoveSelectionCommand.cpp: Includes Document.h to find inlined Node functions * editing/RemoveNodeCommand.cpp: Includes Document.h to find inlined Node functions * editing/RemoveNodePreservingChildrenCommand.cpp: Includes Document.h to find inlined Node functions * inspector/PageConsoleAgent.cpp: Includes Document.h to find inlined Node functions 2012-07-19 David Hyatt SVG not properly respecting max-width. https://bugs.webkit.org/show_bug.cgi?id=91474 My previous checkin for 91474 accidentally inverted width and height in the division case for the computation of height. When I fixed this inversion, I discovered that elements are in fact also broken with max-width handling, and that furthermore, trying to apply the same max-width fix by calling RenderBox::computeReplacedLogicalWidth/Height failed because those methods call intrinsicLogicalWidth()/Height(). Becuase m_intrinsicSize is out-of-date and does not reflect the values we just obtained from the contentRenderer, we use the default 300x150 values for object and fail to render. In order to both fix SVG/ with max-width constraints and to keep rendering correctly even when there are no max-width constraints, I was forced to update the m_intrinsicSize immediately in order to make sure that the RenderBox methods returned the right values when computing the width/height constrained to max/min-width/height values. Reviewed by Dan Bernstein. Added two new tests in svg/as-image. One test covers non-rectangular images to test for the inversion mistake I made. The second test applies a max-width to and shows that we have never gotten this right before. An existing test in svg/as-image/ already covers basic use (and tests that the intrinsic size of 300x150 is not used when an explicit non-percentage size is specified on the SVG itself). * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Add a check to update m_intrinsicSize when we know it should apply, so that the calls to check against min/max-width fetch this correct size. * rendering/RenderReplaced.h: (RenderReplaced): Make m_intrinsicSize mutable because of the mutation that occurs during the method above. It may be that we should re-evaluate whether all of these methods should be const, but this would impact RenderBox methods as well, so I chose to hold off going down that rabbit hole. 2012-07-19 Dominic Mazzoni AX: Need AccessibilityObjects for nodes without renderers in canvas subtree https://bugs.webkit.org/show_bug.cgi?id=87899 Reviewed by Chris Fleizach. Refactors AccessibilityRenderObject so that it inherits from a new class, AccessibilityNodeObject, that can be constructed from a Node without a renderer. Modifies AXObjectCache so that it automatically creates an AccessibilityNodeObject for elements in a canvas subtree but not otherwise. A new layout test verifies that this correctly exposes an accessibility tree with appropriate roles for elements in a canvas subtree. This patch does not try to complete the implementation of AccessibilityNodeObject. Most AX methods are still unimplemented and need to be migrated from AccessibilityRenderObject to AccessibilityNodeObject in a future patch. This patch also doesn't change anything outside of WebCore/accessibility, so the rest of WebCore only calls AXObjectCache when there are changes to a RenderObject, not to a Node. Accessible notifications on nodes without renderers need to be implemented in a future patch. Test: accessibility/canvas-accessibilitynodeobject.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::get): (WebCore): (WebCore::createFromNode): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::remove): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::remove): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid): (WebCore): (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid): (WebCore::AccessibilityARIAGrid::init): (WebCore::AccessibilityARIAGrid::create): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::create): * accessibility/AccessibilityARIAGridRow.cpp: (WebCore::AccessibilityARIAGridRow::create): * accessibility/AccessibilityAllInOne.cpp: * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::create): * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::create): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::create): (WebCore::AccessibilityMediaControlsContainer::create): (WebCore::AccessibilityMediaTimeline::create): (WebCore::AccessibilityMediaTimeDisplay::create): * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::create): (WebCore): * accessibility/AccessibilityMenuList.h: (AccessibilityMenuList): * accessibility/AccessibilityNodeObject.cpp: Added. (WebCore): (WebCore::AccessibilityNodeObject::AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::init): (WebCore::AccessibilityNodeObject::create): (WebCore::AccessibilityNodeObject::detach): (WebCore::AccessibilityNodeObject::childrenChanged): (WebCore::AccessibilityNodeObject::updateAccessibilityRole): (WebCore::AccessibilityNodeObject::firstChild): (WebCore::AccessibilityNodeObject::lastChild): (WebCore::AccessibilityNodeObject::previousSibling): (WebCore::AccessibilityNodeObject::nextSibling): (WebCore::AccessibilityNodeObject::parentObjectIfExists): (WebCore::AccessibilityNodeObject::parentObject): (WebCore::AccessibilityNodeObject::elementRect): (WebCore::AccessibilityNodeObject::setNode): (WebCore::AccessibilityNodeObject::document): (WebCore::AccessibilityNodeObject::determineAccessibilityRole): (WebCore::AccessibilityNodeObject::addChildren): (WebCore::AccessibilityNodeObject::accessibilityIsIgnored): (WebCore::AccessibilityNodeObject::canSetFocusAttribute): (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute): (WebCore::AccessibilityNodeObject::ariaRoleAttribute): (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent): * accessibility/AccessibilityNodeObject.h: Added. (WebCore): (AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject): (WebCore::AccessibilityNodeObject::node): (WebCore::AccessibilityNodeObject::isDetached): (WebCore::toAccessibilityNodeObject): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isAccessibilityNodeObject): * accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::create): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::init): (WebCore): (WebCore::AccessibilityRenderObject::create): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::setRenderer): (WebCore::AccessibilityRenderObject::canHaveChildren): (WebCore::AccessibilityRenderObject::addCanvasChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::create): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore): (WebCore::AccessibilityTable::~AccessibilityTable): (WebCore::AccessibilityTable::init): (WebCore::AccessibilityTable::create): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::create): * accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::create): 2012-07-19 Dan Bernstein The ATSUI-based complex text code is unused https://bugs.webkit.org/show_bug.cgi?id=91816 Reviewed by Sam Weinig. * WebCore.gypi: Removed references to the files deleted in this change. * WebCore.xcodeproj/project.pbxproj: Ditto. * platform/graphics/FontCache.h: (FontCache): Replaced USE(CORE_TEXT) with PLATFORM(MAC) || PLATFORM(CHROMIUM) && OS(DARWIN). * platform/graphics/SimpleFontData.h: (SimpleFontData): Removed USE(ATSUI)-only code, replaced USE(CORE_TEXT) with (PLATFORM(CHROMIUM) && OS(DARWIN)). * platform/graphics/mac/ComplexTextController.cpp: Removed USE(ATSUI)-only code. Moved collectComplexTextRunsForCharacters() and the ComplexTextRun constructor out of this file. * platform/graphics/mac/ComplexTextController.h: Removed USE(ATSUI)-only code and removed #if USE(CORE_TEXT) because anyone including this header is using Core Text. * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Removed. * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moved from ComplexTextController.cpp into this file and merged with createTextRunFromFontDataCoreText(). (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Moved from ComplexTextController.cpp into this file and merged with collectComplexTextRunsForCharactersCoreText(). * platform/graphics/mac/SimpleFontDataATSUI.mm: Removed. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): Remove USE(ATSUI)-only code. (WebCore::SimpleFontData::platformDestroy): Ditto. * platform/text/mac/ShapeArabic.c: Removed. * platform/text/mac/ShapeArabic.h: Removed. 2012-07-19 Kent Tamura Introduce Node::shadowHost() https://bugs.webkit.org/show_bug.cgi?id=91814 Reviewed by Hajime Morita. Introduce Node::shadowHost(), which return the host element, or 0. Node::shadowAncestorNode() is used to obtain a shadow host. However it is confusing because it returns 'this' if this is not in a shadow tree. Replaces one callsite of shadowAncestorNode() with shadowHost(). No behavior change. * dom/Node.cpp: (WebCore::Node::shadowHost): Added. * dom/Node.h: (Node): Declare shadowHost(), and add a comment to shadowAncestorNode(). * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::hostInput): Replace shadowAncestorNode() with shaodwHost(). 2012-07-19 Kent Tamura Form state restore: Need to identify a form by its content https://bugs.webkit.org/show_bug.cgi?id=91209 Reviewed by Hajime Morita. Add names of the first two controls of a form to its formKey string. By this change, we can correctly restore states to reordered forms like webkit.org/b/91209#c0. Tests: Added test cases to fast/forms/state-restore-per-form.html. * html/FormController.cpp: (WebCore::recordFormStructure): Append at most two name attribute values. (WebCore::createKey): Insert a string built by recordFromStructure(). (WebCore::formStateSignature): Bump the version. 2012-07-19 Wei James enable Web Audio for chromium android port https://bugs.webkit.org/show_bug.cgi?id=89428 Reviewed by Kenneth Russell. * WebCore.gyp/WebCore.gyp: * platform/audio/FFTFrameStub.cpp: (WebCore::FFTFrame::doFFT): 2012-07-19 David Hyatt SVG images broken when max-width specified. https://bugs.webkit.org/show_bug.cgi?id=91474 SVG images were computing intrinsic dimensions when width and height were auto that did not respect min-max width/height. Normal images had code that applied these constraints properly. Looking at the code before the check-in that broke things, these constraints used to be applied to all images regardless of type via calcAspectRatioLogicalWidth/Height. This patch leaves the new function structure in place but converts the code to be more like it was prior to the introduction of the regression. Instead of raw intrinsic sizes being used in the SVG case, now all image types get the intrinsic sizes constrained when doing width/height computations. Reviewed by Dan Bernstein. Test: svg/as-image/svg-intrinsic-size.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Rename computeIntrinsicRatioInformationForRenderBox to computeAspectRatioInformationForRenderBox. Also rename the intrinsicSize reference to constrainedSize to reflect the fact that the size is not necessarily the intrinsic size any longer but instead a size where both axes have been constrained based off the max-min values of the opposite axes. Move the constraining code out of RenderReplaced::computeIntrinsicRatioInformation into this function so that the SVG code path appies the constraints as well. The movement of this code is what fixes the bug. (WebCore::RenderReplaced::computeIntrinsicRatioInformation): Changed to remove the code that constrains the returned size, since it is shifting to computeAspectRatioInformationForRenderBox instead. (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/RenderReplaced.h: (RenderReplaced): Patch the name of the reference passed in to computeReplacedLogicalWidth/Height to be constrainedSize instead of intrinsicSize, so that it is more obvious that the returned result is not just the intrinsic size of the image. 2012-07-19 Dmitry Titov Unreviewed, reverting http://trac.webkit.org/changeset/123149. It broke an IDB test on Chromium page cycler. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore): * bindings/v8/SerializedScriptValue.h: * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): 2012-07-19 Julien Chaffraix [CSS2.1] Anonymous tables should be inline/block-level based off their parent https://bugs.webkit.org/show_bug.cgi?id=15365 Reviewed by Abhishek Arya. This change makes us match bullet 3 "Generate missing parents" of section 17.2.1 http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes": "If a table is contained by an inline element, then the anonymous tables should be inline-tables." Patch based on an earlier change by Kang-Hao (Kenny) Lu . Tests: css2.1/20110323/inline-table-002b.html fast/dynamic/insert-before-table-part-in-continuation.html fast/table/inline-table-in-continuation.html fast/table/inline-table-with-caption.html * rendering/RenderTable.cpp: (WebCore::RenderTable::createAnonymousWithParentRenderer): Added a check to determine if we should be inline or block based on our parent to match CSS 2.1. * rendering/RenderInline.cpp: (WebCore::RenderInline::addChildIgnoringContinuation): Changed the child addition logic to not wrap a table part in an inline context. This change works as intended as we will call RenderObject::addChild which will create an anonymous inline table that will be added under |this| instead of the table part. As the table is inline, it doesn't need to be wrapped when we recursively call RenderInline::addChild. 2012-07-19 Chris Fleizach WebKit should pass element value as the default description for web views https://bugs.webkit.org/show_bug.cgi?id=91763 Reviewed by Anders Carlsson. Update the logic for determining the description for the AXWebArea to include the document's title. Test: platform/mac/accessibility/document-title-used-for-description.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::webAreaAccessibilityDescription): Move web area description handling into a separate method. (WebCore::AccessibilityRenderObject::accessibilityDescription): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-07-19 Zeev Lieber <zlieber@chromium.org> [Chromium] Textures drawn during occlusion are incorrectly re-used when unoccluded. https://bugs.webkit.org/show_bug.cgi?id=91537 Reviewed by Adrienne Walker. Detecting if any external occlusion occurs when drawing a texture. If external occlusion happens, the texture is marked as "incomplete" in LayerRendererChromium, and is not being considered for re-use. Minor refactoring of CCQuadCuller - extracted interface (CCQuadSink) and united append() and appendSurface() methods. Added unit tests to verify this fix; also added test to try clipping instead of occlusion. * platform/graphics/chromium/LayerRendererChromium.cpp: (LayerRendererChromium::CachedTexture): (WebCore::LayerRendererChromium::CachedTexture::create): (WebCore::LayerRendererChromium::CachedTexture::~CachedTexture): (WebCore::LayerRendererChromium::CachedTexture::isComplete): (WebCore::LayerRendererChromium::CachedTexture::setIsComplete): (WebCore::LayerRendererChromium::CachedTexture::CachedTexture): (WebCore): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId): (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: (CCIOSurfaceLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendDebugBorderQuad): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): (WebCore::CCLayerImpl::appendQuads): (CCLayerImpl): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::unoccludedContentRect): (WebCore::::unoccludedContributingSurfaceContentRect): (WebCore): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::CCQuadCuller): (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (WebCore): (CCQuadCuller): (WebCore::CCQuadCuller::~CCQuadCuller): (WebCore::CCQuadCuller::hasExternalOcclusion): * platform/graphics/chromium/cc/CCQuadSink.h: (WebKit): (WebCore): (CCQuadSink): (WebCore::CCQuadSink::~CCQuadSink): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::CCRenderPass): (WebCore::CCRenderPass::appendQuadsForLayer): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::hasExternalOcclusion): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::CCRenderSurface): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (WebCore::CCRenderSurface::setHasExternalOcclusion): (WebCore::CCRenderSurface::hasExternalOcclusion): (CCRenderSurface): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-07-19 Simon Fraser <simon.fraser@apple.com> Keep overlap testing on for descendants of an animating element https://bugs.webkit.org/show_bug.cgi?id=91787 Reviewed by Beth Dakin. RenderLayerCompositor::computeCompositingRequirements() would turn off overlap testing for descendants of a layer that has a 3D transform, or has an animating transform. This could cause compositing changes inside an animating element when transitions start and stop, which is undesirable. Instead, we can keep overlap testing on for descendants of that animating element, but we have to turn it off for layers later in z-order. Also enhance the "IndirectCompositingReason" flags so that in the compositing log output, we can distinguish between layers that were composited as a result of overlap testing from those compositing for stacking reasons. Test: compositing/layer-creation/animation-overlap-with-children.html * rendering/RenderLayer.h: New IndirectCompositingReason value to distinguish overlap from stacking. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): Use an IndirectCompositingReason enum rather than a bool to track whether the layer starts as composited. Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer())) check that turned off overlap testing for descendants of this layer. Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers. Turn overlap testing off for layers later in the z-order. (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into account. (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output. 2012-07-19 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable CSS shaders in Qt (software mode) https://bugs.webkit.org/show_bug.cgi?id=85140 Reviewed by Simon Hausmann. Added missing files to the Qt build. No new tests, WebGL is still disabled by default in the bots. * Target.pri: 2012-07-19 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable CSS shaders in Qt (software mode) https://bugs.webkit.org/show_bug.cgi?id=85140 Reviewed by Simon Hausmann. Added missing files to the Qt build. No new tests, WebGL is still disabled by default in the bots. * Target.pri: 2012-07-19 Simon Fraser <simon.fraser@apple.com> Keep overlap testing on for descendants of an animating element https://bugs.webkit.org/show_bug.cgi?id=91787 Reviewed by Beth Dakin. RenderLayerCompositor::computeCompositingRequirements() would turn off overlap testing for descendants of a layer that has a 3D transform, or has an animating transform. This could cause compositing changes inside an animating element when transitions start and stop, which is undesirable. Instead, we can keep overlap testing on for descendants of that animating element, but we have to turn it off for layers later in z-order. Also enhance the "IndirectCompositingReason" flags so that in the compositing log output, we can distinguish between layers that were composited as a result of overlap testing from those compositing for stacking reasons. Test: compositing/layer-creation/animation-overlap-with-children.html * rendering/RenderLayer.h: New IndirectCompositingReason value to distinguish overlap from stacking. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): Use an IndirectCompositingReason enum rather than a bool to track whether the layer starts as composited. Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer())) check that turned off overlap testing for descendants of this layer. Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers. Turn overlap testing off for layers later in the z-order. (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into account. (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output. 2012-07-19 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable CSS shaders in Qt (software mode) https://bugs.webkit.org/show_bug.cgi?id=85140 Reviewed by Simon Hausmann. Added missing files to the Qt build. No new tests, WebGL is still disabled by default in the bots. * Target.pri: 2012-07-17 Dmitry Titov <dimich@chromium.org> [Chromium] Out of Memory is observed when a large object is passed to a Web Worker. https://bugs.webkit.org/show_bug.cgi?id=91535. Reviewed by Dave Levin. No new tests because of no new behavior and lack of mechanism to monitor used memory. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext): (WebCore): (WebCore::SerializedScriptValue::~SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context). 2012-07-19 Dan Bernstein <mitz@apple.com> In flipped blocks writing modes, no flipping occurs when mapping RenderText’s local coordinates to absolute https://bugs.webkit.org/show_bug.cgi?id=91780 Reviewed by Anders Carlsson. Test: fast/writing-mode/flipped-blocks-text-map-local-to-container.html When RenderObject::mapLocalToContainer() was called on a RenderText with ApplyContainerFlip, it would not flip (if the container was not a box) but it would always pass DoNotApplyContainerFlip when recurring to the parent. This meant that no one applied the flip. * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): Made the setting of applyContainerFlip to false unconditional on the container actually being flipped. * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): Rather than always passing DoNotApplyContainerFlip when recurring to the parent, changed this function to pass through the value of applyContainerFlip it was called with, unless it applied the flip itself. 2012-07-19 Erik Arvidsson <arv@chromium.org> Window top should not be replaceable https://bugs.webkit.org/show_bug.cgi?id=91755 Reviewed by Adam Barth. Window top is readonly and unforgable and should not be replaceable. http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-window-object This change brings JSC inline with all other browsers. No new tests. Modified existing tests. * page/DOMWindow.idl: 2012-07-19 Max Feil <mfeil@rim.com> [BlackBerry] Only maintain the hole punch rect while html5 video is being renderered https://bugs.webkit.org/show_bug.cgi?id=91689 Reviewed by Antonio Gomes. The hole punch rectangle needs to be present if and only if html5 video content is being rendered. Otherwise unwanted content may show through from behind the browser tab's window. I am not adding any new tests because the difficulty of testing for this case outweighs the benefit. * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::updateStates): 2012-07-19 Bem Jones-Bey <bjonesbe@adobe.com> [CSS Exclusions] - Code cleanup: make shape parsing use isComma() instead of manual checks https://bugs.webkit.org/show_bug.cgi?id=91760 Reviewed by Eric Seidel. Remove code duplication by making the rectangle, circle, and ellipse methods use isComma() to detect a comma. No new tests needed: no new functionality added. * css/CSSParser.cpp: (WebCore::CSSParser::parseExclusionShapeRectangle): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): 2012-07-19 Raymond Toy <rtoy@google.com> Limit maximum delay of DelayNode. https://bugs.webkit.org/show_bug.cgi?id=91675 Reviewed by Kenneth Russell. Clip the maximum delay of a DelayNode to a reasonable maximum. Test: webaudio/delaynode-maxdelaylimit.html * Modules/webaudio/DelayNode.cpp: (WebCore): Add maximumAllowedDelayTime. (WebCore::DelayNode::DelayNode): Clip max delay. 2012-07-14 Robert Hogan <robert@webkit.org> CSS 2.1 failure: text-indent-intrinsic-003 fails https://bugs.webkit.org/show_bug.cgi?id=80576 Reviewed by Eric Seidel. Negative values of text-indent should be distributed across inline children until used up. This fixes text-indent-intrinsic-003 and text-indent-intrinsic-004. Tests: css2.1/20110323/text-indent-intrinsic-001.htm css2.1/20110323/text-indent-intrinsic-002.htm css2.1/20110323/text-indent-intrinsic-003.htm css2.1/20110323/text-indent-intrinsic-004.htm * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): If text-indent is negative, keep applying it to inline children in the first formatted line until it's reduced to zero. This isn't a consideration when text-indent is a positive value. 2012-07-19 Douglas Stockwell <dstockwell@google.com> Crash in WebCore::StyleResolver::collectMatchingRulesForList https://bugs.webkit.org/show_bug.cgi?id=90803 Reviewed by Andreas Kling. When a ProcessingInstruction was removed from the document the owner was removed, but the style resolver was not guaranteed to be updated. It was then possible for an inconsistent version of the stylesheet to remain visible in the DOM. Fixed by removing an invalid condition and mirroring the logic from StyleElement. Test: fast/css/xml-stylesheet-removed.xhtml * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::removedFrom): Mirror the logic from StyleElement -- always update the style resolver. 2012-07-19 Bem Jones-Bey <bjonesbe@adobe.com> Shape-inside / shape-outside should support percent-based measurements https://bugs.webkit.org/show_bug.cgi?id=90311 Reviewed by Andreas Kling. Update the CSS Parser to accept percentage length values for exclusion shapes. Testing added to LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html * css/CSSParser.cpp: (WebCore::CSSParser::parseExclusionShapeRectangle): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): (WebCore::CSSParser::parseExclusionShapePolygon): 2012-07-19 Tony Chang <tony@chromium.org> Unreviewed, rolling out r123117. http://trac.webkit.org/changeset/123117 https://bugs.webkit.org/show_bug.cgi?id=91667 Breaks chromium-win compile. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-19 James Simonsen <simonjam@chromium.org> Regression(120096): Protect the element used by ImageLoader until the end of notifyFinished(). https://bugs.webkit.org/show_bug.cgi?id=90471 Reviewed by Brady Eidson. Test: http/tests/security/video-poster-cross-origin-crash.html * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): Hang on to the element until we're done. * loader/ImageLoader.cpp: (WebCore::ImageLoader::setImage): No behavior change. (WebCore): (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Split off from old setImage, minus calling updatedHasPendingLoadEvent(). (WebCore::ImageLoader::notifyFinished): Invoke updatedHasPendingLoadEvent when done with cross origin errors. * loader/ImageLoader.h: (ImageLoader): 2012-07-19 Scott Graham <scottmg@chromium.org> Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium https://bugs.webkit.org/show_bug.cgi?id=91667 Reviewed by Kentaro Hara. Using native tools instead of cygwin version improves build time performance by roughly 50% (on top of previous cl-instead-of-gcc change). No new tests. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-19 Andrey Kosyakov <caseq@chromium.org> Web Inspector: CPU bars are not cleared along with the rest of the timeline panel https://bugs.webkit.org/show_bug.cgi?id=91753 Reviewed by Pavel Feldman. - remove early bail-outs in refreshMainThreadBars; let it run to clear bars for the non-existent / invisible events; * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._refreshMainThreadBars): 2012-07-19 Joshua Bell <jsbell@chromium.org> IndexedDB: Throw native TypeErrors per spec https://bugs.webkit.org/show_bug.cgi?id=91679 Reviewed by Kentaro Hara. Per the IDB spec, the advance(), openCursor(), openKeyCursor() and transaction() methods supposed to throw true native JavaScript TypeError objects as exceptions rather than DOMException objects. Implement this by adding a special DOMException code that is tested for in the binding layer. Tests: storage/indexeddb/cursor-advance.html storage/indexeddb/index-basics.html storage/indexeddb/index-basics-workers.html storage/indexeddb/objectstore-cursor.html storage/indexeddb/transaction-basics.html * Modules/indexeddb/IDBCursor.cpp: Use the new DOMException code. (WebCore::IDBCursor::advance): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBDatabase.cpp: Ditto. (WebCore::IDBDatabase::setVersion): * Modules/indexeddb/IDBDatabaseException.cpp: Remove temporary cruft/mark as legacy. (WebCore): * Modules/indexeddb/IDBDatabaseException.h: Ditto. * Modules/indexeddb/IDBDatabaseException.idl: Ditto. * Modules/indexeddb/IDBFactory.cpp: Use the new DOMException code. (WebCore::IDBFactory::open): (WebCore::IDBFactory::deleteDatabase): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): Use the new DOMException code. * Modules/indexeddb/IDBTransaction.cpp: Use the new DOMException code. (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): Intercept new DOMException code, throw native TypeError. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): Ditto. * dom/ExceptionCode.h: Add new DOMException code. 2012-07-19 Joshua Bell <jsbell@chromium.org> Roll out r121610 and r122487 which may have been causing flaky crashes https://bugs.webkit.org/show_bug.cgi?id=91637 Reviewed by Kentaro Hara. Flaky crashes started in random tests following r121610. It's not clear that r121610 is to blame, but we'd like to prove or disprove it. If this doesn't resolve the crashes, this patch should be rolled out. * WebCore.gypi: * bindings/v8/NPObjectWrapper.cpp: Added. (WebCore): (NPProxyObject): (WebCore::NPObjectWrapper::NPObjectWrapper): (WebCore::NPObjectWrapper::create): (WebCore::NPObjectWrapper::clear): (WebCore::NPObjectWrapper::getWrapper): (WebCore::NPObjectWrapper::getUnderlyingNPObject): (WebCore::NPObjectWrapper::getObjectForCall): (WebCore::NPObjectWrapper::NPAllocate): (WebCore::NPObjectWrapper::NPDeallocate): (WebCore::NPObjectWrapper::NPPInvalidate): (WebCore::NPObjectWrapper::NPHasMethod): (WebCore::NPObjectWrapper::NPInvoke): (WebCore::NPObjectWrapper::NPInvokeDefault): (WebCore::NPObjectWrapper::NPHasProperty): (WebCore::NPObjectWrapper::NPGetProperty): (WebCore::NPObjectWrapper::NPSetProperty): (WebCore::NPObjectWrapper::NPRemoveProperty): (WebCore::NPObjectWrapper::NPNEnumerate): (WebCore::NPObjectWrapper::NPNConstruct): (WebCore::NPObjectWrapper::NPInvokePrivate): * bindings/v8/NPObjectWrapper.h: Added. (WebCore): (NPObjectWrapper): * bindings/v8/NPV8Object.cpp: (WebCore::freeV8NPObject): (_NPN_Invoke): (_NPN_InvokeDefault): (_NPN_EvaluateHelper): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bindings/v8/NPV8Object.h: (WebCore): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::clearScriptObjects): (WebCore::ScriptController::windowScriptNPObject): * bindings/v8/ScriptController.h: (ScriptController): 2012-07-19 Andrey Kosyakov <caseq@chromium.org> Web Inspector: minimize number of properties on WebInspector.TimelinePresentationModel.Record https://bugs.webkit.org/show_bug.cgi?id=91744 Reviewed by Pavel Feldman. - replace most properties on TimelinePresentationModel.Record with getters; This reduces the amount of memory we use for timeline presentation model records almost by 2x. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype.get children): (WebInspector.TimelinePresentationModel.Record.prototype.get category): (WebInspector.TimelinePresentationModel.Record.prototype.get title): (WebInspector.TimelinePresentationModel.Record.prototype.get startTime): (WebInspector.TimelinePresentationModel.Record.prototype.get data): (WebInspector.TimelinePresentationModel.Record.prototype.get type): (WebInspector.TimelinePresentationModel.Record.prototype.get frameId): (WebInspector.TimelinePresentationModel.Record.prototype.get endTime): (WebInspector.TimelinePresentationModel.Record.prototype.get totalHeapSize): (WebInspector.TimelinePresentationModel.Record.prototype.get usedHeapSize): (WebInspector.TimelinePresentationModel.Record.prototype.get _selfTime): (WebInspector.TimelinePresentationModel.Record.prototype.get stackTrace): (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): (WebInspector.TimelinePresentationModel.Record.prototype.calculateAggregatedStats): 2012-07-19 Dongwoo Im <dw.im@samsung.com> [EFL] Fix build break when WEB_AUDIO is enabled. https://bugs.webkit.org/show_bug.cgi?id=91735 Unreviewed build fix. New files are added for the Web Audio fearure. These files should be included into the CMakeLists.txt file. * CMakeLists.txt: Add the newly created files into the CMakeLists.txt 2012-07-19 Simon Hausmann <simon.hausmann@nokia.com> [Qt] Remove support for Qt versions before 4.8.0 https://bugs.webkit.org/show_bug.cgi?id=91730 Reviewed by Kenneth Rohde Christiansen. Remove Qt version check #ifdefs for Qt versions before 4.8.0. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::clipBoundingRect): * platform/qt/ThirdPartyCookiesQt.cpp: (WebCore::urlsShareSameDomain): (WebCore::thirdPartyCookiePolicyPermits): 2012-07-19 Peter Rybin <peter.rybin@gmail.com> Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build https://bugs.webkit.org/show_bug.cgi?id=90642 Reviewed by Yury Semikhatsky. A small intermediate writer is added. It handles comparing old and new source before actual writing. * inspector/CodeGeneratorInspector.py: (flatten_list): (SmartOutput): (SmartOutput.__init__): (SmartOutput.write): (SmartOutput.close): 2012-07-19 Mario Sanchez Prada <msanchez@igalia.com> [GTK] MHTML files not being loaded due to reported mime type not supported https://bugs.webkit.org/show_bug.cgi?id=89978 Reviewed by Carlos Garcia Campos. Make 'message/rfc822' a supported MIME type for MHTML files in GTK. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): Add 'message/rfc822' to the list of MIME types to be considered to avoid them bypasing cross-domain security checks, only for GTK. * loader/archive/ArchiveFactory.cpp: (WebCore::archiveMIMETypes): Add 'message/rfc822' to the list of supported MIME types when MHTML support is enabled in GTK. 2012-07-19 Jan Keromnes <janx@linux.com> Web Inspector: Factor ExtensionView into separate file https://bugs.webkit.org/show_bug.cgi?id=91699 Reviewed by Vsevolod Vlasov. The class ExtensionView was defined in ExtensionPanel.js but needed to be in a separate file since it is going to be reused somewhere else. Current test coverage is enough since no behavior was changed. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ExtensionPanel.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-19 Shinya Kawanaka <shinyak@chromium.org> [Refactoring] Use userAgentShadowRoot() to take user agent shadow root. https://bugs.webkit.org/show_bug.cgi?id=91716 Reviewed by Hajime Morita. We have introduced Element::userAgentShadowRoot in r123071 to take user agent shadow root. We have used shadow()->oldestShadowRoot() to take the user agent shadow root, however its code intention was not so clear. Using userAgentShadowRoot() will make it clearer. No new tests, simple refactoring. * html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): (WebCore::ColorInputType::shadowColorSwatch): * html/FileInputType.cpp: (WebCore::FileInputType::createShadowSubtree): (WebCore::FileInputType::multipleAttributeChanged): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::findMainSummary): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::willAddAuthorShadowRoot): (WebCore::HTMLImageElement::imageElement): (WebCore::HTMLImageElement::innerElement): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::shadowSelect): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::innerTextElement): (WebCore::HTMLTextAreaElement::updatePlaceholderText): * html/InputType.cpp: (WebCore::InputType::destroyShadowSubtree): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): (WebCore::RangeInputType::createShadowSubtree): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): (WebCore::TextFieldInputType::updatePlaceholderText): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::deleteBubbleTree): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): (WebCore::trackLimiterElementOf): 2012-07-19 Keishi Hattori <keishi@webkit.org> Redraw slider tick marks when datalist changes. https://bugs.webkit.org/show_bug.cgi?id=89544 Reviewed by Kent Tamura. Updating the datalist should redraw the slider tick marks. This patch monitors the id target element of the list attribute using ListAttributeTargetObserver and notifies changes to the option element inside of a datalist element. Test: fast/forms/datalist/update-range-with-datalist.html * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::optionElementChildrenChanged): Called when a child option element's value might have changed. (WebCore): * html/HTMLDataListElement.h: (HTMLDataListElement): * html/HTMLInputElement.cpp: (ListAttributeTargetObserver): Inherits IdTargetObserver. (WebCore): (WebCore::HTMLInputElement::parseAttribute): Observe the form attribute target. (WebCore::HTMLInputElement::insertedInto): Observe the form attribute id target. (WebCore::HTMLInputElement::removedFrom): Remove the observer. (WebCore::HTMLInputElement::resetListAttributeTargetObserver): (WebCore::HTMLInputElement::listAttributeTargetChanged): (WebCore::ListAttributeTargetObserver::create): (WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver): (WebCore::ListAttributeTargetObserver::idTargetChanged): * html/HTMLInputElement.h: (WebCore): (HTMLInputElement): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): If the value attribute changed, notify the owner datalist element. (WebCore::HTMLOptionElement::childrenChanged): If the children changed, notify the owner datalist element. (WebCore): (WebCore::HTMLOptionElement::ownerDataListElement): The datalist that the option element is inside of. * html/HTMLOptionElement.h: (WebCore): (HTMLOptionElement): * html/InputType.cpp: (WebCore): (WebCore::InputType::listAttributeTargetChanged): * html/InputType.h: (InputType): * html/RangeInputType.cpp: (WebCore): (WebCore::RangeInputType::listAttributeTargetChanged): * html/RangeInputType.h: (RangeInputType): 2012-07-19 Dongwoo Im <dw.im@samsung.com> CodeGeneratorV8.pm : @enabledAtRuntime is not used in GenerateHeader. https://bugs.webkit.org/show_bug.cgi?id=91715 Reviewed by Kentaro Hara. @enabledAtRuntime is not used in GenerateHeader. We can remove it from GenerateHeader. No new tests as this has no functional changes. * bindings/scripts/CodeGeneratorV8.pm: Remove @enabledAtRuntime from GenerateHeader. (GenerateHeader): 2012-07-19 Abhishek Arya <inferno@chromium.org> Crash in FontCache::releaseFontData. https://bugs.webkit.org/show_bug.cgi?id=91710 Reviewed by Tim Horton. Revert back change made to StyleResolver in r122896. The maximum font size clamp is required there since transformed sizes use that code path. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-07-18 Ryosuke Niwa <rniwa@webkit.org> Another build fix after r123065. Don't list deleted file in gypi. * WebCore.gypi: 2012-07-18 Keishi Hattori <keishi@webkit.org> Implement painting slider tick marks https://bugs.webkit.org/show_bug.cgi?id=87844 Reviewed by Kent Tamura. This implements painting slider tick marks for <datalist> support for input type=range. This does not support automatic update when list target changes, and it will be fixed in a follow up patch (Bug 89544). Tests: fast/forms/datalist/input-appearance-range-with-datalist-rtl.html fast/forms/datalist/input-appearance-range-with-datalist-zoomed.html fast/forms/datalist/input-appearance-range-with-datalist.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::sliderThumbElement): (WebCore): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.h: (WebCore::InputType::sliderThumbElement): * html/RangeInputType.cpp: (WebCore::RangeInputType::typeMismatchFor): We need HTMLInputElement::isValidValue("foo") to return false. (WebCore): (WebCore::RangeInputType::sliderThumbElement): * html/RangeInputType.h: (RangeInputType): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderContainer::layout): Slider height needs to be increased for the tick marks. * platform/efl/RenderThemeEfl.cpp: (WebCore): (WebCore::RenderThemeEfl::sliderTickSize): (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::sliderTickSize): (WebCore): (WebCore::RenderThemeQt::sliderTickOffsetFromTrackCenter): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * rendering/RenderTheme.cpp: (WebCore): (WebCore::RenderTheme::paintSliderTicks): * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeChromiumCommon.cpp: (WebCore::RenderThemeChromiumCommon::supportsDataListUI): * rendering/RenderThemeChromiumLinux.cpp: (WebCore): (WebCore::RenderThemeChromiumLinux::sliderTickSize): Tick size for horizontal slider. i.e. Width is length along the track. (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter): Offset from middle of draw rect to draw the ticks. Minus value means above the track. (WebCore::RenderThemeChromiumLinux::paintSliderTrack): * rendering/RenderThemeChromiumLinux.h: (RenderThemeChromiumLinux): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::sliderTickSize): (WebCore::RenderThemeChromiumWin::sliderTickOffsetFromTrackCenter): (WebCore::RenderThemeChromiumWin::paintSliderTrack): (WebCore::RenderThemeChromiumWin::paintSliderThumb): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderTrack): (WebCore): (WebCore::RenderThemeMac::sliderTickSize): (WebCore::RenderThemeMac::sliderTickOffsetFromTrackCenter): 2012-07-18 Shinya Kawanaka <shinyak@chromium.org> Element wants to have userAgentShadowRoot() https://bugs.webkit.org/show_bug.cgi?id=91564 Reviewed by Eric Carlson. We introduce Element::userAgentShadowRoot() to return a UserAgentShadowRoot. It returns the oldest shadow root if any, and checks the type of ShadowRoot in debug build. Previously, we have used elementShadow()->oldestShadowRoot() to get UserAgentShadowRoot. The class implementor will know the oldest shadow root is UserAgentShadowRoot, but it is not clear for the other people. This method will make the code intention clearer. We will introduce userAgentShadowRoot to the other elements (e.g. HTMLInputElement) after this patch. No new tests, simple refactoring. * dom/Element.cpp: (WebCore::Element::userAgentShadowRoot): (WebCore): * dom/Element.h: (Element): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createShadowSubtree): (WebCore::HTMLMediaElement::willAddAuthorShadowRoot): (WebCore::HTMLMediaElement::mediaControls): (WebCore::HTMLMediaElement::hasMediaControls): (WebCore::HTMLMediaElement::createMediaControls): 2012-07-18 Gyuyoung Kim <gyuyoung.kim@samsung.com> [CMAKE] Remove duplicated #ifdef guard in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=91575 Reviewed by Dirk Pranke. CMake files have used ENABLE_XXX macro. However, almost source and idl files are already protected by #ifdef. So, we don't need to guard them in CMake files again. In SVG idl files case, blackberry port doesn't support it yet. So, SVG idl files are handled by WebCore_SVG_IDL_FILES macro. No new tests. This patch isn't for functionality. * CMakeLists.txt: * PlatformBlackBerry.cmake: Change SVG_IDL_FILES with WebCore_SVG_IDL_FILES. 2012-07-18 Hironori Bono <hbono@chromium.org> Move contents right when a vertical scrollbar is shown at the left side of an RTL element. https://bugs.webkit.org/show_bug.cgi?id=85856 Reviewed by Hajime Morita. This change prevents the scrollWidth value from being cropped by the width of a scrollbar when a vertical scrollbar is shown at the left side of an RTL element. This change also increases the clientLeft value by this scrollbar width and move contents right to improve compliance with CSSOM <http://www.w3.org/TR/cssom-view>. Tests: scrollbars/rtl/div-horizontal.html scrollbars/rtl/div-vertical.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): Move contents to the right. * rendering/RenderBox.cpp: (WebCore::RenderBox::topLeftLocationOffset): Move the top-left corner to the right to prevent WebKit from cropping scrollWidth. * rendering/RenderBox.h: (WebCore::RenderBox::clientLeft): Increase clientLeft by the width of a scrollbar. 2012-07-18 Kent Tamura <tkent@chromium.org> Form state restore: Classify form control sates by owners in internal and serialized representations https://bugs.webkit.org/show_bug.cgi?id=91594 Reviewed by Hajime Morita. Before this change, the internal representation of form control states was a map like: {name, type, formKey} -> [FormControlState, FormControlState, ...] Also, the serialized representation was: [name, type, formKey, FormControlState, name, type, formKey, formControlState, ...] This changes these represenations. The internal representation is A map owned by FormController: formKey -> SavedFormState SavedFormState owns a map like: {name, type} -> [FormControlState, FormControlState, ...] The serialized representation is: [formKey, count, name, type, FormControlState, name, type, FormControlState, name, type, FormControlState, .... formKey, count, name, type, FormControlState, name, type, FormControlState, name, type, FormControlState, ....] The serialized representation would be smaller in many cases because each of items doesn't have formKey. Tests: Covered by fast/forms/state-restore-broken-state.html, state-restore-per-form.html, and state-restore-skip-stateless.html. * html/FormController.cpp: (FormElementKey): Remove formKey argument and m_formKey. (WebCore::FormElementKey::FormElementKey): (WebCore::FormElementKey::operator=): (WebCore::FormElementKey::ref): (WebCore::FormElementKey::deref): (WebCore::operator==): (SavedFormState): - The role of SavedFromState was changed. It represented all of control states. Now it represent control states owned by a signle form. - Make this non-copyable and fast-allocated. - Add m_controlStateCount, a counter of FormControlState (WebCore::SavedFormState::SavedFormState): Initialize m_controlStateCount. (WebCore::isNotFormControlTypeCharacter): Moved from another place in this file. (WebCore::SavedFormState::deserialize): Added. Build a SavedFromState with the specified stateVector. (WebCore::SavedFormState::serializeTo): Added. m_controlStateCount is needed here. (WebCore::SavedFormState::appendControlState): - Remove formKey arguement. - Update m_controlStateCount. (WebCore::SavedFormState::takeControlState): ditto. (WebCore::formStateSignature): Bump the version. (WebCore::FormController::createSavedFormStateMap): Added. Build a SavedFormStateMap from the form control list. This is a helper for formElementsState, and classifies controls in the document. (WebCore::FormController::formElementsState): Build a SavedFormStateMap with createSavedFormStateMap(), then serializes it. (WebCore::FormController::setStateForNewFormElements): Deserialize SavedFormState, and build SavedFormStateMap. (WebCore::FormController::takeStateForFormElement): Finds the corresponding SavedFormState with a formKey, and uses it. * html/FormController.h: Declare createSavedFormStateMap(), and moved typedefs for it. 2012-07-18 Antoine Labour <piman@chromium.org> [chromium] Introduce CCResourceProvider, replacing TextureAllocator and hiding textures from clients to allow transport https://bugs.webkit.org/show_bug.cgi?id=91044 Reviewed by Adrienne Walker. This does several things: - Add a CCResourceProvider class, that hides textures and the 3D context from layers (except those that need it). Instead layers manage "resources". In the future, resources are expected to be transportable to a "parent" CCResourceProvider to allow flattening of nested compositors. - Replace texture ids by resource ids in DrawQuads (allowing them to be serializable). - Replace TextureAllocator uses by the CCResourceProvider class. - Upload of data is done through the CCResourceProvider instead of explicit GL calls. - External textures are wrapped into a resource at draw time (see caveat/FIXME in CCTextureLayerImpl). - Rendering with the resources is done through an explicit beginRenderFrom/endRenderFrom that exposes the texture only between that pair. - Merge all the LayerTextureSubImage instances (one per layer), into a single instance on the CCResourceProvider. Added CCResourceProviderTest, the refactoring is covered by existing tests. * WebCore.gypi: * platform/chromium/support/WebCompositorTextureQuad.cpp: (WebKit::WebCompositorTextureQuad::create): (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad): * platform/chromium/support/WebCompositorTileQuad.cpp: (WebKit::WebCompositorTileQuad::create): (WebKit::WebCompositorTileQuad::WebCompositorTileQuad): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapCanvasLayerTextureUpdater::create): (WebCore::BitmapCanvasLayerTextureUpdater::BitmapCanvasLayerTextureUpdater): (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): (Texture): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::create): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: (Texture): (FrameBufferSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::create): (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater): (ImageLayerTextureUpdater): (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::applyFilters): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawYUVVideoQuad): (WebCore::LayerRendererChromium::drawTextureQuad): (WebCore::LayerRendererChromium::drawIOSurfaceQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::useScopedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::finishCurrentFramebuffer): (WebCore): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): (WebCore::LayerRendererChromium::resourceProvider): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::LayerTextureSubImage): (WebCore::LayerTextureSubImage::upload): (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/LayerTextureSubImage.h: (WebKit): (LayerTextureSubImage): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore): (Texture): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::ManagedTexture): (WebCore::ManagedTexture::reserve): (WebCore::ManagedTexture::allocate): (WebCore::ManagedTexture::steal): (WebCore::ManagedTexture::clear): * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::resourceId): (ManagedTexture): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::pushPropertiesTo): (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::copyTexture): (WebCore): (WebCore::AcceleratedTextureCopier::flush): * platform/graphics/chromium/TextureCopier.h: (TextureCopier): (AcceleratedTextureCopier): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::TextureManager): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore): (WebCore::TextureManager::create): (TextureManager): (TextureInfo): (EvictionEntry): * platform/graphics/chromium/TextureUploader.h: (TextureUploader): * platform/graphics/chromium/ThrottledTextureUploader.cpp: (WebCore::ThrottledTextureUploader::uploadTexture): * platform/graphics/chromium/ThrottledTextureUploader.h: (ThrottledTextureUploader): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TrackingTextureAllocator.cpp: Removed. * platform/graphics/chromium/TrackingTextureAllocator.h: Removed. * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::willDraw): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: (CCIOSurfaceLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::willDraw): (WebCore::CCLayerImpl::didDraw): (WebCore::CCLayerImpl::contentsResourceId): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread): (WebCore::CCLayerTreeHost::beginCommitOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (WebCore::CCLayerTreeHostImpl::resourceProvider): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: (WebCore::CCPrioritizedTexture::acquireBackingTexture): (WebCore::CCPrioritizedTexture::resourceId): (WebCore::CCPrioritizedTexture::upload): (WebCore::CCPrioritizedTexture::beginRenderTo): (WebCore::CCPrioritizedTexture::endRenderTo): (WebCore): * platform/graphics/chromium/cc/CCPrioritizedTexture.h: (WebCore): (CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::Backing::resourceId): (WebCore::CCPrioritizedTexture::Backing::Backing): (Backing): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): (WebCore::CCPrioritizedTextureManager::clearAllMemory): (WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted): (WebCore::CCPrioritizedTextureManager::createBacking): (WebCore::CCPrioritizedTextureManager::destroyBacking): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (WebCore::CCPrioritizedTextureManager::create): (CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::maskResourceId): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderer.h: (WebCore): (CCRenderer): * platform/graphics/chromium/cc/CCResourceProvider.cpp: Added. (WebCore): (WebCore::textureToStorageFormat): (WebCore::isTextureFormatSupportedForStorage): (WebCore::CCResourceProvider::create): (WebCore::CCResourceProvider::~CCResourceProvider): (WebCore::CCResourceProvider::graphicsContext3D): (WebCore::CCResourceProvider::inUseByConsumer): (WebCore::CCResourceProvider::createResource): (WebCore::CCResourceProvider::createResourceFromExternalTexture): (WebCore::CCResourceProvider::deleteResource): (WebCore::CCResourceProvider::deleteOwnedResources): (WebCore::CCResourceProvider::upload): (WebCore::CCResourceProvider::beginRenderTo): (WebCore::CCResourceProvider::endRenderTo): (WebCore::CCResourceProvider::beginRenderFrom): (WebCore::CCResourceProvider::endRenderFrom): (WebCore::CCResourceProvider::CCResourceProvider): (WebCore::CCResourceProvider::initialize): * platform/graphics/chromium/cc/CCResourceProvider.h: Added. (WebKit): (WebCore): (CCResourceProvider): (WebCore::CCResourceProvider::maxTextureSize): (WebCore::CCResourceProvider::numResources): (Resource): * platform/graphics/chromium/cc/CCScopedTexture.cpp: (WebCore::CCScopedTexture::CCScopedTexture): (WebCore::CCScopedTexture::allocate): (WebCore::CCScopedTexture::free): * platform/graphics/chromium/cc/CCScopedTexture.h: (WebCore::CCScopedTexture::create): (CCScopedTexture): (WebCore::CCScopedTexture::beginRenderTo): (WebCore::CCScopedTexture::endRenderTo): (WebCore::CCScopedTexture::beginRenderFrom): (WebCore::CCScopedTexture::endRenderFrom): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl): (WebCore): (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (WebCore::CCScrollbarLayerImpl::setBackTrackResourceId): (WebCore::CCScrollbarLayerImpl::setForeTrackResourceId): (WebCore::CCScrollbarLayerImpl::setThumbResourceId): (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::recreateContext): (WebCore::CCSingleThreadProxy::doCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCTexture.h: (WebCore::CCTexture::id): (WebCore::CCTexture::setId): (CCTexture): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::CCTextureLayerImpl): (WebCore::CCTextureLayerImpl::willDraw): (WebCore): (WebCore::CCTextureLayerImpl::appendQuads): (WebCore::CCTextureLayerImpl::didDraw): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::update): * platform/graphics/chromium/cc/CCTextureUpdater.h: (WebCore): (CCTextureUpdater): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::DrawableTile::resourceId): (WebCore::DrawableTile::setResourceId): (WebCore::DrawableTile::DrawableTile): (DrawableTile): (WebCore::CCTiledLayerImpl::contentsResourceId): (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt): (WebCore::CCTiledLayerImpl::appendQuads): (WebCore::CCTiledLayerImpl::pushTileProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::appendQuads): (WebCore::CCVideoLayerImpl::didDraw): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::copyPlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): (FramePlane): (WebCore::CCVideoLayerImpl::FramePlane::FramePlane): 2012-07-18 Hayato Ito <hayato@chromium.org> [Shadow] A 'selectstart' event fired on distributed nodes should not be stopped at shadow boundary of the parent shadow host. https://bugs.webkit.org/show_bug.cgi?id=90508 Reviewed by Dimitri Glazkov. We should not stop some kinds of events at the shadow boundary of a shadow host if the event is fired on distributed nodes. See the spec for such kinds of events. http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::ensureEventAncestors): (WebCore::inTheSameScope): (WebCore): (WebCore::EventDispatcher::determineDispatchBehavior): * dom/EventDispatcher.h: (EventDispatcher): 2012-07-18 Julien Chaffraix <jchaffraix@webkit.org> Crash in RenderTableSection::addCell. http://webkit.org/b/89496 Reviewed by Abhishek Arya. The issue comes from RenderBox::splitAnonymousBoxesAroundChild that would move sections across tables but didn't force the table to do a synchronous section recalc. This opened the way for race conditions where we would query the table column structure while it's dirty (this is not uncommon but as usually the table's column representation is always bigger or more split than a section's, it's usually harmless). The fix is to force a synchronous section recalc. Test: fast/table/split-table-no-section-update-crash.html * rendering/RenderBox.cpp: (WebCore::markBoxForRelayoutAfterSplit): Changed to call forceSectionsRecalc ie force a section recalc. * rendering/RenderTable.cpp: (WebCore::RenderTable::recalcSections): Added missing ASSERT for unneeded calls. * rendering/RenderTable.h: (WebCore::RenderTable::forceSectionsRecalc): Added this helper function. 2012-07-18 Julien Chaffraix <jchaffraix@webkit.org> Avoid calling GraphicsContext drawing primitives for 0px borders https://bugs.webkit.org/show_bug.cgi?id=90039 Reviewed by Eric Seidel. The current code would happily call GraphicsContext to draw empty (0px) borders. There is no good use case for going all the way to GraphicsContext in this case as 0px borders, regardless of the border-style, will not be painted. Thus this is a waste of time on all platforms. On Chromium, this trigger some issues with pdf rendering as Skia interprets 0px lines as very thin lines. This change adds 0-checks in the border painting code as well as ASSERTs for performance and to catch future bad use. Test: fast/borders/0px-borders.html * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::drawRect): Added an ASSERT on all platforms to catch incorrect use. * rendering/RenderBoxModelObject.cpp: (WebCore::BorderEdge::shouldRender): Changed to not render 0px borders, which should avoid unneeded work in the patining code (context saving / restoring or transparency layer push). (WebCore::RenderBoxModelObject::paintOneBorderSide): Added an ASSERT here that the border side is not empty. * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): Added an early return with a comment as to why it's not feasible to ASSERT as would be best. 2012-07-18 Elliott Sprehn <esprehn@gmail.com> REGRESSION (r89900): Assertion failure on null view() when destroying the document https://bugs.webkit.org/show_bug.cgi?id=91547 Reviewed by Abhishek Arya. Check for document destruction during insertion to avoid crash on null RenderView when trying to count the number of RenderQuote and RenderCounter objects. Test: fast/css-generated-content/bug91547.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): 2012-07-18 Nat Duca <nduca@chromium.org> [chromium] Add histogram for tracking compositor-thread frame rate https://bugs.webkit.org/show_bug.cgi?id=91692 Reviewed by Adrienne Walker. This patch tracks the interval between compositor thread frames and pushes it into a platform histogram. This allows us to track compositor-thread frame rate in the wild. * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: (WebCore::CCFrameRateCounter::markBeginningOfFrame): 2012-07-18 Dan Bernstein <mitz@apple.com> Hit testing in the gap between pages returns incorrect results https://bugs.webkit.org/show_bug.cgi?id=91695 Reviewed by Dave Hyatt. Test: fast/multicol/hit-test-gap-between-pages.html * rendering/RenderBlock.h: (RenderBlock): Promoted adjustPointToColumnContents from private to protected. * rendering/RenderView.cpp: (WebCore::RenderView::updateHitTestResult): If we get here, and we make the document element the inner node, adjust the local point for columns. 2012-07-18 Joshua Bell <jsbell@chromium.org> IndexedDB: Direction parameter ignored by some openCursor() overloads https://bugs.webkit.org/show_bug.cgi?id=91687 Reviewed by Tony Chang. A few of the openCursor() and openKeyCursor() overloads were not passing along the direction parameter, resulting in the default direction being used. Trivial fixes. Also, added a whitespace fix to a relevant console warning. Test: storage/indexeddb/cursor-overloads.html * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): 2012-07-18 Erik Arvidsson <arv@chromium.org> [V8] Improve Replaceable extended attribute https://bugs.webkit.org/show_bug.cgi?id=91668 Reviewed by Adam Barth. Replaceable is working by chance in the V8 bindings because V8 does not correctly handle read only properties on the prototype chain. With this change we generate a setter that uses ForceSet to replace the existing property when set. Test: fast/dom/Window/replaceable.html * bindings/scripts/CodeGeneratorV8.pm: (GenerateReplaceableAttrSetter): (GenerateFunctionCallback): (GenerateSingleBatchedAttribute): (GenerateImplementation): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::replaceableAttribute): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_get_replaceable_attribute): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjReplaceableAttribute): (WebCore::setJSTestObjReplaceableAttribute): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj replaceableAttribute]): (-[DOMTestObj setReplaceableAttribute:]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::replaceableAttributeAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::TestObjReplaceableAttrSetter): (WebCore): 2012-07-18 Erik Arvidsson <arv@chromium.org> [V8] Remove temporary flag override for es52_globals https://bugs.webkit.org/show_bug.cgi?id=91681 Reviewed by Adam Barth. V8 has now changed their default value for the es52_globals so we no longer needs this override. No new tests. No change in functionality. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initIsolate): 2012-07-18 Alexandre Elias <aelias@google.com> [chromium] Ubercomp: add id to SharedQuadState https://bugs.webkit.org/show_bug.cgi?id=91670 Reviewed by Adrienne Walker. This assigns an integer ID to SharedQuadState objects and a corresponding ID to quads. This ID is unique only within a RenderPass and currently is just set to the index in the shared quad state list. This is redundant with the pointer and exists to simplify serialization. I found out that pointer rewriting within a pickler is blocked by pointers to memory being const there, so the reassignment will have to be performed in the application layer anyway. In that case, it's simplest to add some ID integers. No new tests (will introduce them when making use of the ID). * platform/chromium/support/WebCompositorQuad.cpp: (WebKit::WebCompositorQuad::WebCompositorQuad): (WebKit::WebCompositorQuad::setSharedQuadState): (WebKit): * platform/chromium/support/WebCompositorSharedQuadState.cpp: (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState): (WebKit::WebCompositorSharedQuadState::create): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-18 Alexandre Elias <aelias@google.com> [chromium] Ubercomp: clean up CCRenderer interface https://bugs.webkit.org/show_bug.cgi?id=91555 Reviewed by Adrienne Walker. I replaced the one-by-one RenderPass calls with a new drawFrame() method that directly takes a CCRenderPassList, and moved a small amount of code from CCLayerTreeHostImpl to implement it. In ubercomp mode, we will produce a frame bundle rather than a command-stream, so the full list is easier to work with. Also, give empty default implementations for the methods that don't need to do anything in a non-GL context, and make private setScissorToRect. No new tests (no-op refactoring). * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawFrame): (WebCore): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCRenderer.h: (WebCore::CCRenderer::viewportChanged): (WebCore::CCRenderer::decideRenderPassAllocationsForFrame): (WebCore::CCRenderer::haveCachedResourcesForRenderPassId): (CCRenderer): (WebCore::CCRenderer::finishDrawingFrame): (WebCore::CCRenderer::doNoOp): (WebCore::CCRenderer::isContextLost): 2012-07-18 Pravin D <pravind.2k4@gmail.com> Content size of child having percent height inside a fixed height container having overflow:auto is wrongly calculated https://bugs.webkit.org/show_bug.cgi?id=11355 Reviewed by Julien Chaffraix. The content height of a child must be container height minus padding, border width and height of horizontal scrollbar(if any). Tests: fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto.html fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Subtracting the height of the scrollbar from the client height when the client has percentage height. 2012-07-18 Pravin D <pravind.2k4@gmail.com> Content size of child having percent height inside a fixed height container having overflow:auto is wrongly calculated https://bugs.webkit.org/show_bug.cgi?id=11355 Reviewed by Julien Chaffraix. The content height of a child must be container height minus padding, border width and height of horizontal scrollbar(if any). Tests: fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto.html fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Subtracting the height of the scrollbar from the client height when the client has percentage height. 2012-07-18 Anantanarayanan G Iyengar <ananta@chromium.org> [chromium] Ensure that the compositor code which is aware of flipped status of video-textures per platform sets the flipped bit to false on Windows. https://bugs.webkit.org/show_bug.cgi?id=91562 Reviewed by Adrienne Walker. No new tests. (HW video decode is still only being tested manually for orientation) * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-07-18 Emil A Eklund <eae@chromium.org> Replace uses of RenderBox::x(), y() in rendering code with with point and size methods https://bugs.webkit.org/show_bug.cgi?id=91549 Reviewed by Eric Seidel. Replaces uses of RenderBox::x() and RenderBox::y() with RenderBox::location(), RenderBox::locationOffset() and RenderBox::frameRect(). No new tests, no change in functionality. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::positionNewFloats): Use child->frameRect() and child->location() instead of constructing a rect and size from the x, y, width and height values. * rendering/RenderBox.cpp: (WebCore::RenderBox::repaintDuringLayoutIfMoved): Compare and copy m_frameRect directly instead of comparing and copying the individual values. (WebCore::RenderBox::localCaretRect): Use location() instead of x() and y(). * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Use pixelSnappedIntSize and RenderBox::size() instead of computing and snapping the width and height separately. * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): USe locationOffset() instead of creating a new LayoutSize object from the x() and y() values. * rendering/RenderInline.cpp: (WebCore::RenderInline::updateHitTestResult): Move by Size instead of x and y value. (WebCore::RenderInline::addFocusRingRects): Move by Size instead of x and y value. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::offsetFromContainer): Shrink offset by size instead of using x and y values. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): (WebCore::RenderTableSection::setLogicalPositionForCell): Use child->frameRect() and child->location() instead of constructing a rect and size from the x, y, width and height values. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeRenderSVGTextBox): Use location() instead of x() and y(). 2012-07-18 Tony Chang <tony@chromium.org> [chromium] Unreviewed, try to fix the chromium-win build after r123014. * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: 2012-07-18 Joshua Bell <jsbell@chromium.org> IndexedDB: Fix some coding style violations https://bugs.webkit.org/show_bug.cgi?id=91565 Reviewed by Tony Chang. In declarations, put the * next to the type not the identifier. Remove k as a prefix for various constants. No new tests - no functional changes. * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::prefetchContinueInternal): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::computeFileIdentifier): * Modules/indexeddb/IDBKey.h: (WebCore::IDBKey::IDBKey): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getDatabaseNames): (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::createIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::deleteDatabase): (WebCore::IDBLevelDBBackingStore::getObjectStores): (WebCore::getNewObjectStoreId): (WebCore::IDBLevelDBBackingStore::createObjectStore): (WebCore::IDBLevelDBBackingStore::deleteObjectStore): (WebCore::getNewVersionNumber): (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber): (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord): (WebCore::IDBLevelDBBackingStore::getIndexes): (WebCore::getNewIndexId): (WebCore::IDBLevelDBBackingStore::createIndex): (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord): (WebCore): * Modules/indexeddb/IDBLevelDBCoding.cpp: (IDBLevelDBCoding): (WebCore::IDBLevelDBCoding::maxIDBKey): (WebCore::IDBLevelDBCoding::minIDBKey): (WebCore::IDBLevelDBCoding::decodeVarInt): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): (WebCore::IDBLevelDBCoding::encodeIDBKeyPath): (WebCore::IDBLevelDBCoding::decodeIDBKeyPath): (WebCore::IDBLevelDBCoding::compare): (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix): (WebCore::IDBLevelDBCoding::KeyPrefix::encode): (WebCore::IDBLevelDBCoding::KeyPrefix::compare): (WebCore::IDBLevelDBCoding::KeyPrefix::type): (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode): (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode): (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode): (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode): (WebCore::IDBLevelDBCoding::DatabaseNameKey::decode): (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode): (WebCore::IDBLevelDBCoding::IndexFreeListKey::decode): (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode): (WebCore::IDBLevelDBCoding::IndexNamesKey::decode): (WebCore::IDBLevelDBCoding::IndexNamesKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode): (WebCore::IDBLevelDBCoding::ExistsEntryKey::decode): (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode): (WebCore::IDBLevelDBCoding::IndexDataKey::decode): * Modules/indexeddb/IDBLevelDBCoding.h: (IDBLevelDBCoding): (ObjectStoreDataKey): (ExistsEntryKey): 2012-07-18 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Call SQLiteFileSystem-related functions directly https://bugs.webkit.org/show_bug.cgi?id=91631 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * Modules/webdatabase/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin): * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/sql/chromium/SQLiteFileSystemChromium.cpp: (WebCore::SQLiteFileSystem::deleteDatabaseFile): (WebCore::SQLiteFileSystem::getDatabaseFileSize): * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: 2012-07-18 Oliver Hunt <oliver@apple.com> WebKit provides APIs that make it possible for JSC to attempt to initialise the heap without initialising threading https://bugs.webkit.org/show_bug.cgi?id=91663 Reviewed by Filip Pizlo. Initialising a JSGlobalData now requires us to have initialised JSC's threading logic, as that also initialises the JSC VM runtime options. WebKit provides a number of routines that make use of commonJSGlobalData() that can be used before webcore has called the appropriate initialisation routine. This patch makes the minimal change of ensuring that commonJSGlobalData initialises threading before attempting to create the common heap. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): 2012-07-18 Michael Saboff <msaboff@apple.com> Make TextCodecUTF8 handle 8 bit data without converting to UChar's https://bugs.webkit.org/show_bug.cgi?id=90320 Reviewed by Oliver Hunt. Change UTF8 Codec to produce 8-bit strings when data fits in 8-bit range. First we try decoding the string as all 8-bit and then fall back to 16 bit when we find the first character that doesn't fit in 8 bits. Then we take the already decoded data and copy / convert it to a 16-bit buffer and then continue process the rest of the stream as 16-bits. No new tests, no change in functionality. * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::handleError): (WebCore::TextCodecUTF8::decode): * platform/text/TextCodecUTF8.h: (TextCodecUTF8): 2012-07-18 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Add TEXTURE_RECTANGLE_ARB support to CCVideoLayerImpl https://bugs.webkit.org/show_bug.cgi?id=91169 Reviewed by Adrienne Walker. This extends CCVideoLayerImpl to support TEXTURE_RECTANGLE_ARB. This texture target is used by the Mac hardware accelerated video decoder. No new tests (HW video decode on Mac is being tested manually.). * platform/chromium/support/WebCompositorIOSurfaceQuad.cpp: (WebKit::WebCompositorIOSurfaceQuad::create): Added an orientation argument. (WebKit::WebCompositorIOSurfaceQuad::WebCompositorIOSurfaceQuad): Added an orientation argument. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawIOSurfaceQuad): Added support for non-flipped IOSurface textures. * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): Changed TextureIOSurfaceProgram to be non-flipped. To draw flipped textures drawIOSurfaceQuad sets a different value for texTransformLocation. * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::appendQuads): Updated call to CCIOSurfaceDrawQuad constructor. * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): Added support for drawing TEXTURE_RECTANGLE_ARB textures. 2012-07-18 Michael Saboff <msaboff@apple.com> Make TextCodecLatin1 handle 8 bit data without converting to UChar's https://bugs.webkit.org/show_bug.cgi?id=90319 Reviewed by Oliver Hunt. Updated codec to create 8 bit strings where possible. We assume that the incoming stream can all be decoded as 8-bit values. If we find a 16-bit value, we take the already decoded data and copy / convert it to a 16-bit buffer and then continue process the rest of the stream as 16-bits. No new tests, functionality covered with existing tests. * platform/text/TextCodecASCIIFastPath.h: (WebCore::copyASCIIMachineWord): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::decode): 2012-07-18 Dimitri Glazkov <dglazkov@chromium.org> Fix up old name in RuleSet::addRulesFromSheet https://bugs.webkit.org/show_bug.cgi?id=91646 Reviewed by Andreas Kling. Simple parameter rename, no change in functionality. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Renamed styleSelector to resolver to reflect recent rename of the parameter type. 2012-07-18 Vincent Scheib <scheib@chromium.org> Unify allowfullscreen logic in Document::webkitFullScreenEnabled and fullScreenIsAllowedForElement. https://bugs.webkit.org/show_bug.cgi?id=91448 Reviewed by Adrienne Walker. Unifies redundant traversal logic and static cast previously used to determine if an element or document can be made fullscreen. This clean up prepares for pointer lock, which will use the same logic. Added a test to detect an edge case of an owning document with fullscreen permision moving an iframe to fullscreen, while that iframe does not have permision for its contents to be made fullscreen. Test: fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent.html * dom/Document.cpp: (WebCore::isAttributeOnAllOwners): (WebCore::Document::fullScreenIsAllowedForElement): (WebCore::Document::webkitFullscreenEnabled): 2012-07-18 Christophe Dumez <christophe.dumez@intel.com> [EFL] Add central error management to EFL port https://bugs.webkit.org/show_bug.cgi?id=91598 Reviewed by Kenneth Rohde Christiansen. Define possible error types in ErrorsEfl so that we can reuse the header in both WebKit1 and WebKit2. This is inspired from the GTK port. No new tests, no behavior change. * PlatformEfl.cmake: * platform/efl/ErrorsEfl.cpp: Added. (WebCore): (WebCore::cancelledError): (WebCore::blockedError): (WebCore::cannotShowURLError): (WebCore::interruptedForPolicyChangeError): (WebCore::cannotShowMIMETypeError): (WebCore::fileDoesNotExistError): (WebCore::pluginWillHandleLoadError): (WebCore::downloadNetworkError): (WebCore::downloadCancelledByUserError): (WebCore::downloadDestinationError): (WebCore::printError): (WebCore::printerNotFoundError): (WebCore::invalidPageRangeToPrint): * platform/efl/ErrorsEfl.h: Added. (WebCore): 2012-07-18 Varun Jain <varunjain@chromium.org> [chromium] Fix crash in DragImageTest caused by r122996 https://bugs.webkit.org/show_bug.cgi?id=91653 Reviewed by Tony Chang. Covered by existing DragImageTest. * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::deleteDragImage): 2012-07-18 Varun Jain <varunjain@chromium.org> [chromium] Drag image for image elements should be scaled with device scale factor. https://bugs.webkit.org/show_bug.cgi?id=89688 Reviewed by Adam Barth. Modified ManualTest: ManualTests/chromium/drag-image-accounts-for-device-scale.html * page/Frame.cpp: (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::dragImageSize): (WebCore::deleteDragImage): (WebCore::scaleDragImage): (WebCore::dissolveDragImageToFraction): (WebCore::createDragImageFromImage): * platform/chromium/DragImageRef.h: (DragImageChromium): (WebCore): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::copyImage): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia): (WebCore::BitmapImageSingleFrameSkia::create): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): * platform/graphics/skia/NativeImageSkia.h: (NativeImageSkia): (WebCore::NativeImageSkia::resolutionScale): 2012-07-18 Yong Li <yoli@rim.com> [BlackBerry] Move about: URL handling out of WebCore https://bugs.webkit.org/show_bug.cgi?id=91541 Reviewed by Rob Buis. Remove about URL handling from our NetworkJob. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::initialize): (WebCore::NetworkJob::cancelJob): (WebCore::NetworkJob::sendResponseIfNeeded): * platform/network/blackberry/NetworkJob.h: (NetworkJob): * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::startJob): 2012-07-18 Tony Chang <tony@chromium.org> Unreviewed, rolling out r122984. http://trac.webkit.org/changeset/122984 https://bugs.webkit.org/show_bug.cgi?id=91171 Broken the shared build, need to export a SkData in skia * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setURLForRect): 2012-07-18 Rob Buis <rbuis@rim.com> Alignment crash in MIMESniffer https://bugs.webkit.org/show_bug.cgi?id=89787 Reviewed by Yong Li. PR 169064 Prevent ASSERT on unaligned data. Special-case handling of unaligned data to maskedCompareSlowCase. No test, too hard to reproduce. * platform/network/MIMESniffing.cpp: (std::maskedCompareSlowCase): (std): (std::maskedCompare): 2012-07-18 Steve VanDeBogart <vandebo@chromium.org> Chrome/Skia: PDF print output does not have clickable links. https://bugs.webkit.org/show_bug.cgi?id=91171 Reviewed by Stephen White. Connect GraphicsContext::setURLForRect to Skia's new API for annotations. Printing is not generally testable. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setURLForRect): 2012-07-18 Philippe Normand <pnormand@igalia.com> [GStreamer] 0.11 build broken https://bugs.webkit.org/show_bug.cgi?id=91629 Reviewed by Alexis Menard. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkitVideoSinkProposeAllocation): Pass null GstStructure to gst_query_add_allocation_meta(). Our propose-allocation method is simple enough to not need to set it. 2012-07-18 Chris Fleizach <cfleizach@apple.com> AX: <input type="submit"> unlabelled. https://bugs.webkit.org/show_bug.cgi?id=91563 Reviewed by Adele Peterson. Make sure the default value is returned if there is no other value specified. Test: platform/mac/accessibility/submit-button-default-value.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): 2012-07-17 Shawn Singh <shawnsingh@chromium.org> [chromium] Remove awkward anchorPoint usage that implicity affects layer position https://bugs.webkit.org/show_bug.cgi?id=91472 Reviewed by Adrienne Walker. Covered by existing layout tests and unit tests, several existing unit tests updated. In GraphicsLayerChromium, anchorPoint() implicity affects position(). Therefore, unit tests needed to remember to set anchorPoint correctly when trying to position layers for testing. However, it's easy to forget that initialization, and probably shouldn't be necessary anyway since conceptually anchorPoint does not affect layer position. This patch removes the "actualPosition + anchorPoint" quirk in GraphicsLayerChromium, so that this problem is avoided. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::updateLayerPosition): No longer computes position + anchorPoint. Instead this is done in calcDrawTransformsInternal. (WebCore::GraphicsLayerChromium::updateLayerSize): No longer affects computation of position. (WebCore::GraphicsLayerChromium::updateAnchorPoint): No longer affects computation of position (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): Position is initialized to zero instead of relative to anchorPoint * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): explicitly use position + anchorPoint in this code, for both layer and replica. Note that replicaLayer now uses its own anchorPoint, which seems to be more consistent with Safari behavior. 2012-07-18 Pavel Feldman <pfeldman@chromium.org> Web Inspector: [Regression] Save as file is missing in Network panel preview/response tabs. https://bugs.webkit.org/show_bug.cgi?id=91625 Reviewed by Vsevolod Vlasov. * inspector/front-end/HandlerRegistry.js: * inspector/front-end/NetworkPanel.js: 2012-07-18 Dirk Schulze <krit@webkit.org> SVG CSS property types with <number> don't support exponents https://bugs.webkit.org/show_bug.cgi?id=52542 Reviewed by Nikolas Zimmermann. Parse numbers in SVG presentation attributes with SVG parser to support scientific notations. The SVG parser is already well tested and has some extra checks for edge like protection from overflow. The patch is based upon a patch of Bear Travis. Test: svg/css/scientific-numbers.html * css/CSSParser.cpp: (WebCore::CSSParser::lex): Use SVG parser to parse numbers of SVG attributes. * svg/SVGParserUtilities.cpp: (WebCore::parseSVGNumber): Added accessor to call from CSSParser with double value. (WebCore): * svg/SVGParserUtilities.h: (WebCore): 2012-07-18 Pavel Feldman <pfeldman@chromium.org> Web Inspector: beautify the paused in debugger message, make it configurable from the front-end. https://bugs.webkit.org/show_bug.cgi?id=91628 Reviewed by Vsevolod Vlasov. Made message smaller, using consistent font; Made message configurable from the front-end. * English.lproj/localizedStrings.js: * inspector/DOMNodeHighlighter.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::setPausedInDebuggerMessage): (WebCore::InspectorOverlay::update): (WebCore::InspectorOverlay::drawPausedInDebugger): * inspector/DOMNodeHighlighter.h: (InspectorOverlay): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setOverlayMessage): (WebCore): (WebCore::InspectorDebuggerAgent::clear): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::setOverlayMessage): * inspector/PageDebuggerAgent.h: (PageDebuggerAgent): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._setDebuggerPausedDetails): 2012-07-18 Douglas Stockwell <dstockwell@chromium.org> WebCore::StylePropertySet::addParsedProperties - crash https://bugs.webkit.org/show_bug.cgi?id=91153 Reviewed by Andreas Kling. WebKitCSSKeyframeRule::style exposed an immutable StylePropertySet. Modified to create a mutable copy on demand. Test: fast/css/css-keyframe-style-mutate-crash.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/WebKitCSSKeyframeRule.cpp: (WebCore::StyleKeyframe::mutableProperties): Added, creates a mutable copy of properties as required. (WebCore::WebKitCSSKeyframeRule::style): * css/WebKitCSSKeyframeRule.h: (WebCore::StyleKeyframe::properties): Made const, use mutableProperties to mutate. 2012-07-18 Huang Dongsung <luxtella@company100.net> [Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect. https://bugs.webkit.org/show_bug.cgi?id=91595 Reviewed by Noam Rosenthal. Internal review by Kwang Yul Seo. Currently, TextureMapperLayer creates an ImageBuffer as big as m_state.needsDisplayRect if m_state.needsDispaly is false. The size of m_state.needsDisplayRect can be bigger than the size of the layerRect, so we may consume more memory than the size of the layerRect. It even can cause crash if m_state.needsDisplayRect is too big. No new tests, covered by existing tests. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::updateBackingStore): 2012-07-18 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] We should update the status in NetworkJob if there is a new one from libcurl. https://bugs.webkit.org/show_bug.cgi?id=91475 Reviewed by Yong Li. Libcurl sometimes sends multiple status messages, we need to keep the last one in NetworkJob. We originally had the m_statusReceived check, then we found out that libcurl sometimes sent additional 401 codes and added the 401 exception to the check, and now we're removing the whole check(so we don't need the exception either). RIM PR# 163172 Reviewed internally by Joe Mason. No new tests. This is caused by libcurl's multiple status messages. So we don't need to write a test case for webkit. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyStatusReceived): 2012-07-18 Kevin Ellis <kevers@chromium.org> TOUCH_ADJUSTMENT is too aggressive when snapping to large elements. https://bugs.webkit.org/show_bug.cgi?id=91262 Reviewed by Antonio Gomes. Constrains the extent to which the touch point can be adjusted when generating synthetic mouse events when TOUCH_ADJUSTEMNT is enabled. Previously, the target position snapped to the center of the target element, which can be far removed from the touch position when tapping on or near a large element. The refined strategy is to leave the adjusted position unchanged if tapping within the element or to snap to the center of the overlap region if the touch point lies outside the bounds of the element, but the touch area and element bounds overlap. For non-rectilineary bounds, a point lying outside the element boundary is pulled towards the center of the element, by an amount limited by the radius of the touch area. Tests: touchadjustment/big-div.html touchadjustment/rotated-node.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::contentsToWindow): (TouchAdjustment): (WebCore::TouchAdjustment::snapTo): (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric): 2012-07-18 Sergey Rogulenko <rogulenko@google.com> Web Inspector: adding pause icon for JavaScript debugging https://bugs.webkit.org/show_bug.cgi?id=90880 Reviewed by Pavel Feldman. Refactored DOMNodeHighlighter into InspectorOverlay class and added a feature to show a "pause" screen when the Javascript debugger is paused. * inspector/DOMNodeHighlighter.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::paint): (WebCore::InspectorOverlay::drawOutline): (WebCore::InspectorOverlay::getHighlight): (WebCore::InspectorOverlay::setPausedInDebugger): (WebCore::InspectorOverlay::hideHighlight): (WebCore): (WebCore::InspectorOverlay::highlightNode): (WebCore::InspectorOverlay::setHighlightData): (WebCore::InspectorOverlay::clearHighlightData): (WebCore::InspectorOverlay::highlightedNode): (WebCore::InspectorOverlay::update): (WebCore::InspectorOverlay::drawHighlight): (WebCore::InspectorOverlay::drawPausedInDebugger): * inspector/DOMNodeHighlighter.h: (WebCore): (InspectorOverlay): (WebCore::InspectorOverlay::create): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::drawHighlight): (WebCore::InspectorController::getHighlight): (WebCore::InspectorController::highlightedNode): * inspector/InspectorController.h: (WebCore): (InspectorController): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::~InspectorDOMAgent): (WebCore::InspectorDOMAgent::handleMousePress): (WebCore::InspectorDOMAgent::mouseDidMoveOverElement): (WebCore::InspectorDOMAgent::setSearchingForNode): (WebCore::InspectorDOMAgent::setHighlightDataFromConfig): (WebCore::InspectorDOMAgent::setInspectModeEnabled): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightNode): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::hideHighlight): * inspector/InspectorDOMAgent.h: (WebCore): (WebCore::InspectorDOMAgent::create): (InspectorDOMAgent): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::create): (WebCore::InspectorPageAgent::InspectorPageAgent): (WebCore::InspectorPageAgent::didPaint): * inspector/InspectorPageAgent.h: (WebCore): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::create): (WebCore::PageDebuggerAgent::PageDebuggerAgent): (WebCore::PageDebuggerAgent::disable): (WebCore): (WebCore::PageDebuggerAgent::didPause): (WebCore::PageDebuggerAgent::didContinue): * inspector/PageDebuggerAgent.h: (WebCore): (PageDebuggerAgent): 2012-07-17 Andrey Kosyakov <caseq@chromium.org> Web Inspector: intern strings when processing timeline records https://bugs.webkit.org/show_bug.cgi?id=91531 Reviewed by Pavel Feldman. - added StringPool that is capable of interning strings; - used it in TimelineModel to process all incoming records; * inspector/front-end/TimelineModel.js: (WebInspector.TimelineModel): (WebInspector.TimelineModel.prototype._addRecord): (WebInspector.TimelineModel.prototype.reset): * inspector/front-end/utilities.js: 2012-07-18 Scott Graham <scottmg@chromium.org> Use cl to preprocess IDL for Chromium Windows generate_supplemental_dependency https://bugs.webkit.org/show_bug.cgi?id=91548 Reviewed by Kentaro Hara. Use cl.exe as preprocessor for IDL files rather than cygwin gcc. Cuts two minute execution time on Windows by a bit better than 50%. No new tests. * WebCore.gyp/WebCore.gyp: * bindings/scripts/preprocessor.pm: (applyPreprocessor): 2012-07-18 Pavel Feldman <pfeldman@chromium.org> Web Inspector: remove search replace from behind experiment, polish the behavior https://bugs.webkit.org/show_bug.cgi?id=91519 Reviewed by Vsevolod Vlasov. - This change makes replace loop with no boundary, removes the loop parameter from jumpToNext/Previous; - Lays out replace as a second row - Fixes replace all with no search matches - Splits Search and Search and Replace - Introduces explicit Next / Previous buttons in the search mode - Introduces editRange on the TextEditor so that it was preserving the undo stack (we'll need to fix editor so that it does not require it). * English.lproj/localizedStrings.js: * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel.prototype.performSearch): (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult): (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult): (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel.prototype.performSearch): (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult): (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult): (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult): (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult): (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult): (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult): (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._editorClosed): (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult): (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult): (WebInspector.ScriptsPanel.prototype.replaceSelectionWith): (WebInspector.ScriptsPanel.prototype.replaceAllWith): * inspector/front-end/SearchController.js: (WebInspector.SearchController): (WebInspector.SearchController.prototype.cancelSearch): (WebInspector.SearchController.prototype.resetSearch): (WebInspector.SearchController.prototype.handleShortcut): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype._updateReplaceVisibility): (WebInspector.SearchController.prototype._onKeyDown): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): (WebInspector.SearchController.prototype._updateReplaceDetailsVisibility): (WebInspector.SearchController.prototype._replace): (WebInspector.SearchController.prototype._replaceAll): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.beforeTextChanged): (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): (WebInspector.SourceFrame.prototype.replaceSearchMatchWith): (WebInspector.SourceFrame.prototype.replaceAllWith): (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.editRange): * inspector/front-end/inspector.css: (.toolbar-search-replace .search-replace): (.toolbar-search): (.toolbar-search-replace): (.toolbar-search-close-button): (.toolbar-search-close-button:hover): (.toolbar-search-close-button:active): (.toolbar-search input[type="checkbox"]): (.toolbar-search-replace .toolbar-replace-control): 2012-07-18 YoungTaeck Song <youngtaeck.song@samsung.com> [WK2][EFL] Divide ENABLE(WEBGL) into ENABLE(WEBGL) and USE(3D_GRAPHICS) in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=91584 Reviewed by Noam Rosenthal. This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation. Modified CMakeLists.txt so that the basic 3D-graphics sources can be compiled even when WebGL is disabled. * CMakeLists.txt: * PlatformEfl.cmake: * platform/graphics/GraphicsContext3D.h: (GraphicsContext3D): * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::platformGraphicsContext3D): 2012-07-18 Zoltan Horvath <zoltan@webkit.org> [Qt] Modify the using of the QImage::Format enum to the appropriate functions from NativeImageQt https://bugs.webkit.org/show_bug.cgi?id=91600 Reviewed by Andreas Kling. Use NativeImageQt::defaultFormatForAlphaEnabledImages() and NativeImageQt::defaultFormatForOpaqueImages() instead of the direct imagetypes at the appropriate places. Covered by existing tests. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/qt/PathQt.cpp: (WebCore::scratchContext): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawRepaintCounter): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): 2012-07-18 Andrey Kosyakov <caseq@chromium.org> Web Inspector: create timeline detail records lazily https://bugs.webkit.org/show_bug.cgi?id=91513 Reviewed by Pavel Feldman. - only create timeline record details when these are used; * inspector/front-end/TimelinePanel.js: (WebInspector.TimelineRecordListRow.prototype.update): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): (WebInspector.TimelinePresentationModel.Record.prototype._refreshDetails): (WebInspector.TimelinePresentationModel.Record.prototype.details): 2012-07-18 Simon Hausmann <simon.hausmann@nokia.com> [ANGLE] On QT, use Bison and Flex during ANGLE build https://bugs.webkit.org/show_bug.cgi?id=91108 Reviewed by Kenneth Rohde Christiansen. Add derived source generators for the two angle bison parsers and flex based lexers. * DerivedSources.pri: * Target.pri: 2012-07-18 Dominik Röttsches <dominik.rottsches@intel.com> [EFL][WK2] Too early assertion failure if default theme is not available https://bugs.webkit.org/show_bug.cgi?id=91608 Reviewed by Kenneth Rohde Christiansen. After bug 90107 we're setting a default theme path, which leads to a themeChanged() call initializing edje in createEdje() - if that theme path is not available we run into a premature assertion failure. We need to give the embedder a chance to override the default theme path before failing - so only the usages of m_edje should be guarded with assertions. No new tests, no change in rendering behavior. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::themePartCacheEntryReset): Adding an assertion to ensure m_edje is present - so that all usages of m_edje are now guarded. (WebCore::RenderThemeEfl::createEdje): Not hitting assertion if theme path doesn't contain the theme object file, allowing the embedder to override with a new path. 2012-07-18 Vsevolod Vlasov <vsevik@chromium.org> IndexedDB: IDBLevelDBBackingStore compilation fails because of unused variable. https://bugs.webkit.org/show_bug.cgi?id=91612 Reviewed by Pavel Feldman. Replaced ASSERT with ASSERT_UNUSED. * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): 2012-07-18 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r117738) [Forms] Default step base should be 0 (=1970-01) for input type month https://bugs.webkit.org/show_bug.cgi?id=91603 Reviewed by Kent Tamura. This patch restores default step base value to 0 (=1970-01) as before r117738. No new tests. Existing test(fast/forms/month/month-stepup-stepdown-from-renderer.html) covers this case, although it is disabled. * html/MonthInputType.cpp: (WebCore::MonthInputType::createStepRange): Changed default value of step base to defaultMonthStepBase instead of DateComponents::minimumMonth(). 2012-07-18 Ryuan Choi <ryuan.choi@samsung.com> [EFL] Cursor is not drawn when opengl_x11 backend is choosen. https://bugs.webkit.org/show_bug.cgi?id=89142 Reviewed by Simon Hausmann. If theme based cursor is not given, WebKit/Efl only uses Ecore_X based cursor as a fallback after checked whether current engine is using EcoreX. This patch adds opengl_x11 which is one of Ecore_X based engine in check lists to draw fallback cursor. * platform/efl/EflScreenUtilities.cpp: (WebCore::isUsingEcoreX): 2012-07-18 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r122345): HTMLCollection::length() sometimes returns a wrong value https://bugs.webkit.org/show_bug.cgi?id=91587 Reviewed by Benjamin Poulain. The bug was caused by my douchey code that set the length cache to be the *offset* of the last item in a HTMLCollection. Clearly, the length of a collection that contains the last item at offset n is n + 1. Fixed that. Also removed the call to setLengthCache in HTMLCollection::length since it must have set by previous calls to itemBeforeOrAfterCachedItem already. This will allow us to catch regressions like this in ports that use JSC bindings as well. Test: fast/dom/htmlcollection-length-after-item.html * html/HTMLCollection.cpp: (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem): 2012-07-18 Yoshifumi Inoue <yosin@chromium.org> Decimal::toString should not round integer value. https://bugs.webkit.org/show_bug.cgi?id=91481 Reviewed by Kent Tamura. This patch makes Decimal::toString not to round an integer value before converting string. Tests: WebKit/chromium/tests/DecimalTest.cpp: DecimalTest.toString * platform/Decimal.cpp: (WebCore::Decimal::toString): When the value is an integer, we don't round coefficient to be DBL_DIG(15) digits because double can represent an integer without rounding error. 2012-07-18 Luke Macpherson <macpherson@chromium.org> Fix null pointer dereference introduced by Changeset 121874. https://bugs.webkit.org/show_bug.cgi?id=91578 Reviewed by Pavel Feldman. In http://trac.webkit.org/changeset/121874/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp I introduced code that dereferences the return value of ownerDocument() without doing a null check. This was a bad idea. No new tests. I don't have a repro case, but it is clear from reading the code for ownerDocument() that it can return null. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::ensureSourceData): 2012-07-17 Yoshifumi Inoue <yosin@chromium.org> Decimal constructor with 99999999999999999 loses last digit https://bugs.webkit.org/show_bug.cgi?id=91579 Reviewed by Kent Tamura. This patch changes maximum coefficient value handling in Decimal::EncodedData constructor not to lose the last digit. It was used ">=" operator for comparison instead of ">" operator. Tests: WebKit/chromium/tests/DecimalTest.cpp * platform/Decimal.cpp: (WebCore::Decimal::EncodedData::EncodedData): Replace ">=" to ">" for not getting rid of the last digit for maximum coefficient value. 2012-07-17 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed Web Inspector: followup fix for r122920. Add collected Loaders size to InspectorMemoryBlock * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): 2012-07-17 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: show loaders memory consumption on the memory chart. https://bugs.webkit.org/show_bug.cgi?id=90686 Reviewed by Pavel Feldman. Size of FrameLoader, DocumentLoader, ResourceLoader and their resources should be shown on the memory pie chart. It is covered by existing WebInspector performance tests infrastructure. * WebCore.exp.in: * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryInstrumentation::addRawBuffer): (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl): (WebCore): (WebCore::MemoryClassInfo::addInstrumentedHashSet): (WebCore::MemoryClassInfo::addRawBuffer): (WebCore::MemoryInstrumentation::addInstrumentedHashSet): (WebCore::MemoryInstrumentation::addVector): * inspector/InspectorMemoryAgent.cpp: (WebCore): (WebCore::domTreeInfo): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::reportMemoryUsage): (WebCore): * loader/DocumentLoader.h: (WebCore): (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::reportMemoryUsage): (WebCore): * loader/FrameLoader.h: (WebCore): (FrameLoader): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::reportMemoryUsage): (WebCore): * loader/ResourceLoader.h: (WebCore): (ResourceLoader): * page/Frame.cpp: (WebCore::Frame::reportMemoryUsage): (WebCore): * page/Frame.h: (WebCore): (Frame): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::reportMemoryUsage): (WebCore): * platform/SharedBuffer.h: (WebCore): (SharedBuffer): 2012-07-17 Kent Tamura <tkent@chromium.org> Fix an assertion failure in CalendarPickerElement::hostInput(). https://bugs.webkit.org/show_bug.cgi?id=91568 Reviewed by Hajime Morita. Test: fast/forms/date/calendar-picker-type-change-onclick.html * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::defaultEventHandler): It's possible that this function is called when the element is detached from the document tree. 2012-07-17 Kent Tamura <tkent@chromium.org> Form state: Make a new class handling HashMap<FormElementKey, Deque<>> https://bugs.webkit.org/show_bug.cgi?id=91480 Reviewed by Hajime Morita. This is a preparation of Bug 91209, "Form state restore: Need to identify a from by its content." Make a new class which is responsible to handle "HashMap<FormElementKey, Deque<FormControlState>, FormElementKeyHash, FormElementKeyHashTraits>." Also, move the FormElementKey class declaration and related structs from FormController.h to FormController.cpp because FormElementKey is used only in FormController.cpp. No new tests. Just a refactoring. * html/FormController.cpp: (WebCore::FormElementKey): Moeved from FormController.h. (WebCore::FormElementKey::FormElementKey): Moved from the bottom of FormController.cpp (WebCore::FormElementKey::~FormElementKey): ditto. (WebCore::FormElementKey::operator=): ditto. (WebCore::FormElementKey::ref): ditto. (WebCore::FormElementKey::deref): ditto. (WebCore::operator==): Moved from FormController.h (FormElementKeyHash): ditto. (WebCore::FormElementKeyHash::equal): ditto. (WebCore::FormElementKeyHash::hash): Moved from the bottom of FormController.cpp (WebCore::FormElementKeyHashTraits::constructDeletedValue): Moved from FormController.h (WebCore::FormElementKeyHashTraits::isDeletedValue): ditto. (WebCore::SavedFormState): Added. (WebCore::SavedFormState::isEmpty): (WebCore::SavedFormState::SavedFormState): Added. The constructor. (WebCore::SavedFormState::create): Added. A factory function. (WebCore::SavedFormState::appendControlState): Moved some code from FormController::setStateForNewFormElements. (WebCore::SavedFormState::takeControlState): Moved some code from FormController::takeStateForFormElement. (WebCore::FormController::setStateForNewFormElements): - Creates SavedFormState if needed. - Uses SavedFormState::appendControlState. (WebCore::FormController::takeStateForFormElement): Uses SavedFormState. * html/FormController.h: (FormController): 2012-07-17 MORITA Hajime <morrita@google.com> [Shadow DOM] Some distribution invalidation can drop necessary reattachment. https://bugs.webkit.org/show_bug.cgi?id=88843 Reviewed by Dimitri Glazkov. Following scenario caused this problem: - Inserting a Text node as a shadow child triggers invalidateDistribution(), which doen't reattach the shadow's host element. - Then inserting a <content> element after that triggers another invalidateDistribution(), which should reattach its host because <content> can affect not only distribution of new nodes, but also existing distribution. - Since the first invalidateDistribution() has marked the distribution as invalidated, the second invalidateDistribution() call returns early without any reattachment, even though it needs one. This change adds InvalidationType parameter to invalidateDistribution(), which asks ElementShadow to reattach the host regardless of its validity state. InsertionPoint::insertedInto() uses this flag to ensure that its insertion always results a reattachment. Test: fast/dom/shadow/content-after-style.html * dom/ElementShadow.cpp: (WebCore::ElementShadow::addShadowRoot): Passes InvalidationType. (WebCore::ElementShadow::removeAllShadowRoots): Passes InvalidationType. (WebCore::ElementShadow::invalidateDistribution): Added a InvalidationType parameter. * dom/ElementShadow.h: * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::insertedInto): Passes InvalidationType. 2012-07-17 Jon Lee <jonlee@apple.com> Teach CodeGenerator to support for static, readonly, attributes https://bugs.webkit.org/show_bug.cgi?id=88920 <rdar://problem/11650330> Reviewed by Oliver Hunt. Update the parser to be able to accept the static keyword for attribute. We will treat static attributes like custom static functions. They call the implementing class directly, and pass in the ExecState as a script context. * bindings/scripts/CodeGeneratorJS.pm: (GetAttributeGetterName): Factor out the construction of the attribute getter function name. (GetAttributeSetterName): Factor out the construction of the attribute setter function name. (GenerateHeader): Determine that a class has read-write properties only if there is a read-write attribute that is not static. (GenerateAttributesHashTable): Skip static attributes in the object hash table. They will be added to the constructor hash table. (GenerateImplementation): Look for static attributes to add to the constructor hash table. Make a call to the static function in the class. * bindings/scripts/IDLParser.pm: (ParseInterface): Update the processing because of the regex change. * bindings/scripts/IDLStructure.pm: Update the attribute regex. * bindings/scripts/test/JS/JSTestObj.cpp: Update test results. * bindings/scripts/test/JS/JSTestObj.h: Update test results. * bindings/scripts/test/TestObj.idl: Add test cases. 2012-07-17 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Rename HarfBuzzFace to HarfBuzzNGFace https://bugs.webkit.org/show_bug.cgi?id=91458 Reviewed by Tony Chang. There are HarfbuzzFace class (for old-harfbuzz) and HarfBuzzFace (for harfbuzz-ng) class. The difference is too subtle. Make them more distinct. No new tests. No changes in behavior. * WebCore.gyp/WebCore.gyp: Rename HarfBuzzFace to HarfBuzzNGFace. * WebCore.gypi: Ditto. * platform/graphics/FontPlatformData.h: Ditto. (FontPlatformData): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto. (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto. (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto. (FontPlatformData): * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp. (WebCore): (WebCore::floatToHarfBuzzPosition): (WebCore::getGlyph): (WebCore::getGlyphHorizontalAdvance): (WebCore::getGlyphHorizontalOrigin): (WebCore::getGlyphExtents): (WebCore::harfbuzzCoreTextGetFontFuncs): (WebCore::releaseTableData): (WebCore::harfbuzzCoreTextGetTable): (WebCore::HarfBuzzNGFace::createFace): (WebCore::HarfBuzzNGFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp. (WebCore): (WebCore::SkiaScalarToHarfbuzzPosition): (WebCore::SkiaGetGlyphWidthAndExtents): (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzSkiaGetFontFuncs): (WebCore::harfbuzzSkiaGetTable): (WebCore::destroyPaint): (WebCore::HarfBuzzNGFace::createFace): (WebCore::HarfBuzzNGFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp. (WebCore): (WebCore::harfbuzzFaceCache): (WebCore::HarfBuzzNGFace::HarfBuzzNGFace): (WebCore::HarfBuzzNGFace::~HarfBuzzNGFace): * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.h. (WebCore): (HarfBuzzNGFace): (WebCore::HarfBuzzNGFace::create): * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): 2012-07-17 Kinuko Yasuda <kinuko@chromium.org> Record metrics to measure the usage of Blob([ArrayBuffer]) to eventually deprecate it https://bugs.webkit.org/show_bug.cgi?id=90534 Reviewed by Jian Li. We are removing ArrayBuffer support in Blob constructor (in favor of ArrayBufferView) but before doing that we should record its use relative to ArrayBufferView. http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob No new tests as this has no functional changes. * fileapi/WebKitBlobBuilder.cpp: (WebCore::WebKitBlobBuilder::append): 2012-07-17 Joshua Bell <jsbell@chromium.org> IndexedDB: Key generator state not maintained across connections https://bugs.webkit.org/show_bug.cgi?id=91456 Reviewed by Tony Chang. Explicitly store key generator state for each object store in the backing store, rather than deriving it from the maximum key in the data (which violates the spec if data is deleted). This change eliminates a (fragile) per-store cache of the value to simplify the code. A cache could be re-introduced, requiring an "onbeforecommit" hook for object stores, but it seems cleaner to save that for a follow-up patch. Test: storage/indexeddb/key-generator.html * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states. (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored). (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state. (WebCore): (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber): (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally checking to see if the new value is greater than the old. (If caller got the value via getKeyGeneratorCurrentNumber it is safe to skip the check.) * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBLevelDBCoding.cpp: * Modules/indexeddb/IDBLevelDBCoding.h: * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache. (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task. (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto. (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below. (WebCore::IDBObjectStoreBackendImpl::generateKey): (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-07-17 Joshua Bell <jsbell@chromium.org> IndexedDB: Key generator state not maintained across connections https://bugs.webkit.org/show_bug.cgi?id=91456 Reviewed by Tony Chang. Explicitly store key generator state for each object store in the backing store, rather than deriving it from the maximum key in the data (which violates the spec if data is deleted). This change eliminates a (fragile) per-store cache of the value to simplify the code. A cache could be re-introduced, requiring an "onbeforecommit" hook for object stores, but it seems cleaner to save that for a follow-up patch. Test: storage/indexeddb/key-generator.html * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states. (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored). (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state. (WebCore): (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber): (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally checking to see if the new value is greater than the old. (If caller got the value via getKeyGeneratorCurrentNumber it is safe to skip the check.) * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBLevelDBCoding.cpp: * Modules/indexeddb/IDBLevelDBCoding.h: * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache. (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task. (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto. (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below. (WebCore::IDBObjectStoreBackendImpl::generateKey): (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-07-17 Alec Flett <alecflett@chromium.org> IndexedDB: createIndex should throw INVALID_ACCESS_ERR instead of NOT_SUPPORTED_ERR https://bugs.webkit.org/show_bug.cgi?id=91553 Reviewed by Tony Chang. Update createIndex to throw an INVALID_ACCESS_ERR as per the IndexedDB spec. No new tests: existing tests have been updated * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): * Modules/indexeddb/IDBDatabaseException.h: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): 2012-07-17 Adam Barth <abarth@webkit.org> DragImageChromiumMac.cpp is never compiled and can be removed https://bugs.webkit.org/show_bug.cgi?id=91545 Reviewed by Tony Chang. This file would only be compiled on chromium-mac, but it's excluded from that build. This is likely left over from the CG configuration. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/DragImageChromiumMac.cpp: Removed. 2012-07-17 Roger Fong <roger_fong@apple.com> Assertion failure/crash on Windows when using a font in an SVG element with an unresaonbly large font size https://bugs.webkit.org/show_bug.cgi?id=91273 Radar: <rdar://problem/8355401> Reviewed by Tim Horton. When using a font in an SVG element with an unreasonably large font size in Windows, WebKit crashes. The problem has to do with font sizes overflowing into negative values in the Windows specific code. The fix is to cap the font sizes to something reasonable when the font style is getting processed. The fix will apply to both CSS and SVG so that behaviour is consistent. Test: svg/text/font-size-too-large-crash.svg * css/StyleBuilder.cpp: (WebCore::ApplyPropertyFontSize::applyValue): This is where the font size capping now occurs. Caps size to 1000000. Both CSS and SVG reach the font size capping code here. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Capping here removed, moved to StyleBuilder.cpp. 2012-07-17 David Barr <davidbarr@chromium.org> Add parsing and style application for css3-images image-orientation https://bugs.webkit.org/show_bug.cgi?id=89624 Reviewed by Tony Chang. The css3-images module is at candidate recommendation. http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation Test: fast/css/image-orientation/image-orientation.html * css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation. (WebCore): Add CSSPropertyImageOrientation to computedProperties. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings. * css/CSSParser.cpp: Add parsing rule for image-orientation. (WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle. * css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum. (WebCore): Add conditional include for ImageOrientation.h. (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles. (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations. * css/CSSProperty.cpp: Add CSSPropertyImageOrientation. (WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited. * css/CSSPropertyNames.in: Add image-orientation. * css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation. (WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum. * css/StyleResolver.cpp: Handle CSSPropertyImageOrientation. (WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder. * rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation. * rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation. (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors. (WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison. * rendering/style/StyleRareInheritedData.h: Add m_imageOrientation. (StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum. 2012-07-17 Adrienne Walker <enne@google.com> REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view() https://bugs.webkit.org/show_bug.cgi?id=91525 Reviewed by Julien Chaffraix. Fix by doing an early out check. This is intended to fix the crash in http://crbug.com/137161. No new test, because unfortunately a layout test is ill-suited to reproing this kind of Document creation/destruction bug. * rendering/RenderObject.cpp: (WebCore::RenderObject::willRenderImage): 2012-07-17 Emil A Eklund <eae@chromium.org> vertical-align: middle causes overflow with subpixel layout https://bugs.webkit.org/show_bug.cgi?id=91464 Reviewed by Eric Seidel. Using vertical-align: middle in combination with an overflow value other than visible can cause the overflow height to be computed incorrectly. Test: fast/sub-pixel/vertical-align-middle-overflow.html * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::verticalPositionForBox): Round verticalPosition after calculation instead of flooring the result of the xHeight calculation. By flooring it the resulting value is in effect rounded up which can cause the height of the box to grow by one. By rounding the resulting value thevertical position is more accurate and the off by one error is avoided. 2012-07-17 Philip Rogers <pdr@google.com> Move zero-length-subpaths from RenderSVGShape to RenderSVGPath https://bugs.webkit.org/show_bug.cgi?id=90716 Reviewed by Nikolas Zimmermann. Previously zero-length-subpath code was present in RenderSVGShape but it is only needed in RenderSVGPath. This patch moves the zero-length-subpath code to RenderSVGPath. In this change, we gain: 1) Ellipses, Circles, and Rects will no longer carry an empty Vector nor checks for zero-length subpaths which (per the spec) they cannot have. 2) RenderSVGShape, the superclass of all shape rendering, has been drastically simplified by removing 70 lines of code that only applies to Path rendering. This generally aids in code understandability. The patch is primarily a straightforward code move but useStrokeStyleToFill needs further explanation: Zero-length-subpaths are drawn using rectangular and circular paths which are filled. Previously in RenderSVGShape::fillAndStrokePath, strokePath was called for the main path with ApplyToStrokeMode and then strokePath was called for each zero-length-subpath with ApplyToFillMode. ApplyToFillMode had the effect of setting the context's stroke style to the fill style so zero-length-subpaths were "filled" with the stroke style. After this patch, the context is only setup once (which is faster!) using ApplyToStrokeMode so we manually set the stroke style to the fill style using useStrokeStyleToFill. No new tests, just a refactoring. * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::updateShapeFromElement): (WebCore): (WebCore::RenderSVGPath::calculateUpdatedStrokeBoundingBox): (WebCore::useStrokeStyleToFill): (WebCore::RenderSVGPath::strokeShape): (WebCore::RenderSVGPath::shapeDependentStrokeContains): (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath): (WebCore::RenderSVGPath::zeroLengthLinecapPath): (WebCore::RenderSVGPath::zeroLengthSubpathRect): (WebCore::RenderSVGPath::updateZeroLengthSubpaths): * rendering/svg/RenderSVGPath.h: (RenderSVGPath): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): (WebCore::RenderSVGShape::strokeShape): (WebCore::RenderSVGShape::strokeContains): (WebCore): (WebCore::RenderSVGShape::fillShape): (WebCore::RenderSVGShape::fillAndStrokeShape): (WebCore::RenderSVGShape::paint): (WebCore::RenderSVGShape::calculateStrokeBoundingBox): * rendering/svg/RenderSVGShape.h: (WebCore::RenderSVGShape::hasPath): (WebCore::RenderSVGShape::hasNonScalingStroke): (RenderSVGShape): (WebCore::RenderSVGShape::strokeBoundingBox): 2012-07-17 Ryosuke Niwa <rniwa@webkit.org> invalidateNodeListCachesInAncestors walks up ancestors even when an attribute that doesn't invalidate node lists changes https://bugs.webkit.org/show_bug.cgi?id=91530 Reviewed by Ojan Vafai. The bug was caused by invalidateNodeListCachesInAncestors not calling Document::shouldInvalidateNodeListCaches with attrName. Done that. This chance revealed a bug in shouldInvalidateTypeOnAttributeChange that we weren't checking form attribute changes for RadioNodeList and HTMLCollection, so fixed the bug. Also renamed Document::clearNodeListCaches to invalidateNodeListCaches to match the name convention used elsewhere, and added a new version of DynamicNodeListCacheBase::invalidateCache that takes attrName to reduce the code duplication. Test: fast/forms/elements-invalidate-on-form-attribute-invalidation.html * dom/Document.cpp: (WebCore::Document::invalidateNodeListCaches): * dom/Document.h: (Document): * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::invalidateCache): (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): * dom/Node.cpp: (WebCore::Node::invalidateNodeListCachesInAncestors): (WebCore::NodeListsNodeData::invalidateCaches): 2012-07-17 Max Vujovic <mvujovic@adobe.com> Update ANGLE in WebKit https://bugs.webkit.org/show_bug.cgi?id=89039 Reviewed by Dean Jackson and Mark Rowe. Update ANGLE to r1170, with the following modifications: (1) Use Bison 2.3 instead of Bison 2.4.2 to generate ExpressionParser.cpp and glslang_tab.cpp. I had to modify ExpressionParser.y to make it compatible with Bison 2.3. The changes have been contributed back to ANGLE in r1224. (2) Continue to recognize QNX as POSIX in ANGLE. This has been contributed back to ANGLE in r1223. (3) Rename ANGLE/src/compiler/preprocessor/new/Diagnostic.cpp to DiagnosticBase.cpp. Rename ANGLE/src/compiler/preprocessor/new/DirectiveHandler.cpp to DirectiveHandlerBase.cpp. With the introduction of ANGLE's new preprocessor, there were two files named Diagnostic.cpp in ANGLE under different folders. This caused problems on the QT build when their object files, both named Diagnostic.o, tried to go in the same folder. Renaming one of them to DiagnosticBase.cpp avoids this conflict. The same situation occurred with DirectiveHandler.cpp. I will work on contributing this change back to ANGLE for future updates. (4) Add the following lines to glslang.y and ExpressionParser.y: #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 Bison 2.3 doesn't first check that these macros are defined before reading their value, which causes the QT build to fail. We work around this issue in the same way in CSSGrammar.y. I will work on contributing this change back to ANGLE. No new tests. No change in behavior. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: 2012-07-17 Stephen Chenney <schenney@chromium.org> Crash in SVGStopElement::stopColorIncludingOpacity https://bugs.webkit.org/show_bug.cgi?id=90814 Reviewed by Dirk Schulze. No new tests as there should be no change in functionality. * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::stopColorIncludingOpacity): Added a check for null renderer and style. It is hard to see how this is happening because the code is only invoked if the parent gradient has a renderer, and it seems the stop element should always have a renderer when the parent has a renderer. Still, it obviously can happen and does so frequently enough to generate multiple Chromium crash reports per day. The fix is marked with a FIXME, as we expect to remove this code entirely soon. 2012-07-17 Emil A Eklund <eae@chromium.org> Incorrect offset used for scrollWidth/Height calculation https://bugs.webkit.org/show_bug.cgi?id=91461 Reviewed by Eric Seidel. Due to a different offset being used to calculate the scrollWidth/Height and pixelSnappedClientWidth/Height the scroll value can be off by one in same cases. This can causes scrollbars to appear even when there is no overflow. Test: fast/sub-pixel/block-with-margin-overflow.html * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollWidth): Change location offset passed to snapSizeToPixel to include x() to match offset used by pixelSnappedClientWidth. (WebCore::RenderBox::scrollHeight): Change location offset passed to snapSizeToPixel to include y() to match offset used by pixelSnappedClientHeight. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::clampScrollOffset): Change calculation to use pixelSnappedClientWidth/Height as it is subtracted from the pixel snapped scrollWidth/Height values. (WebCore::RenderLayer::scrollWidth): (WebCore::RenderLayer::scrollHeight): Change RenderLayer versions of scrollWidth/Height to include x()/y() as per the RenderBox versions. 2012-07-17 Hans Muller <hmuller@adobe.com> Rename CSS Exclusions CSSWrapShape class properties to match Exclusion shape function parameters https://bugs.webkit.org/show_bug.cgi?id=89669 Reviewed by Dirk Schulze. Renamed left,top properties in the exclusion shape types to better match the specification http://dev.w3.org/csswg/css3-exclusions/#shapes-from-svg-syntax: WrapShapeRectangle, CSSWrapShapeRectangle - left,top should be x, y WrapShapeCircle, CSSWrapShapeCircle - left,top should be centerX, centerY WrapShapeEllipse, CSSWrapShapeEllipse - left,top should be centerX, centerY No new tests or tests revisions were needed, the existing tests cover these APIs. * css/CSSParser.cpp: (WebCore::CSSParser::parseExclusionShapeRectangle): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): * css/CSSWrapShapes.cpp: (WebCore::CSSWrapShapeRectangle::cssText): (WebCore::CSSWrapShapeCircle::cssText): (WebCore::CSSWrapShapeEllipse::cssText): * css/CSSWrapShapes.h: (WebCore::CSSWrapShapeRectangle::x): (WebCore::CSSWrapShapeRectangle::y): (WebCore::CSSWrapShapeRectangle::setX): (WebCore::CSSWrapShapeRectangle::setY): (CSSWrapShapeRectangle): (WebCore::CSSWrapShapeCircle::centerX): (WebCore::CSSWrapShapeCircle::centerY): (WebCore::CSSWrapShapeCircle::setCenterX): (WebCore::CSSWrapShapeCircle::setCenterY): (CSSWrapShapeCircle): (WebCore::CSSWrapShapeEllipse::centerX): (WebCore::CSSWrapShapeEllipse::centerY): (WebCore::CSSWrapShapeEllipse::setCenterX): (WebCore::CSSWrapShapeEllipse::setCenterY): (CSSWrapShapeEllipse): * css/WrapShapeFunctions.cpp: (WebCore::valueForWrapShape): (WebCore::wrapShapeForValue): * rendering/style/WrapShapes.h: (WebCore::WrapShapeRectangle::x): (WebCore::WrapShapeRectangle::y): (WebCore::WrapShapeRectangle::setX): (WebCore::WrapShapeRectangle::setY): (WrapShapeRectangle): (WebCore::WrapShapeCircle::centerX): (WebCore::WrapShapeCircle::centerY): (WebCore::WrapShapeCircle::setCenterX): (WebCore::WrapShapeCircle::setCenterY): (WrapShapeCircle): (WebCore::WrapShapeEllipse::centerX): (WebCore::WrapShapeEllipse::centerY): (WebCore::WrapShapeEllipse::setCenterX): (WebCore::WrapShapeEllipse::setCenterY): (WrapShapeEllipse): 2012-07-16 Pavel Feldman <pfeldman@chromium.org> Web Inspector: implement search / replace in source files (behind experiment flag) https://bugs.webkit.org/show_bug.cgi?id=91394 Reviewed by Vsevolod Vlasov. This change adds "loop" parameter to the go to next / previous search + adds a UI component for search / replace of text in the sources panel. New UI component is behind the experiment. * English.lproj/localizedStrings.js: * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel.prototype.performSearch): (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult): (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult): (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel.prototype.performSearch): (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult): (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._sortItems): (WebInspector.NetworkLogView.prototype._updateFilter): (WebInspector.NetworkLogView.prototype.performSearch): (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult): (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult): (WebInspector.NetworkPanel.prototype.performSearch): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): (WebInspector.Panel.prototype.canSearchAndReplace): (WebInspector.Panel.prototype.replaceSelectionWith): (WebInspector.Panel.prototype.replaceAllWith): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult): (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult): (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult): (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult): (WebInspector.ScriptsPanel.prototype.canSearchAndReplace): (WebInspector.ScriptsPanel.prototype.replaceSelectionWith): (WebInspector.ScriptsPanel.prototype.replaceAllWith): * inspector/front-end/SearchController.js: (WebInspector.SearchController): (WebInspector.SearchController.prototype.cancelSearch): (WebInspector.SearchController.prototype.disableSearchUntilExplicitAction): (WebInspector.SearchController.prototype.handleShortcut): (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch): (WebInspector.SearchController.prototype.activePanelChanged): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype.showSearchField): (WebInspector.SearchController.prototype._onKeyDown): (WebInspector.SearchController.prototype._onInput): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): (WebInspector.SearchController.prototype._toggleReplaceVisibility): (WebInspector.SearchController.prototype._replace): (WebInspector.SearchController.prototype._replaceAll): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.createSearchRegex): (WebInspector.SourceFrame.prototype.beforeTextChanged): (WebInspector.SourceFrame.prototype.replaceSearchMatchWith): (WebInspector.SourceFrame.prototype.replaceAllWith): (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged): (WebInspector.TextEditorDelegateForSourceFrame.prototype.commitEditing): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSourceFrame.prototype.afterTextChanged): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype._commitEditing): * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): * inspector/front-end/inspector.css: (.search-replace): (.search-replace:focus): (.toolbar-search-navigation-controls): (.toolbar-search-navigation.enabled): (.toolbar-search): (.toolbar-search input[type="checkbox"]): (.toolbar-search button): (.toolbar-search button:active): (.toolbar-search-control): (.toolbar-replace-control): (.toolbar-search-navigation.enabled:active): (.toolbar-search-navigation.toolbar-search-navigation-prev): (.toolbar-search-navigation.toolbar-search-navigation-prev.enabled:active): (.toolbar-search-navigation.toolbar-search-navigation-next): (.toolbar-search-navigation.toolbar-search-navigation-next.enabled:active): (.drawer-header-close-button): (.inspector-footer): 2012-07-17 Gabor Ballabas <gaborb@inf.u-szeged.hu> [Qt][V8] Remove the V8 related codepaths and configuration https://bugs.webkit.org/show_bug.cgi?id=90863 Reviewed by Simon Hausmann. No new tests because no new functionality. * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.pri: * bindings/v8/ScriptCachedFrameData.cpp: * bindings/v8/ScriptCachedFrameData.h: * bindings/v8/ScriptController.cpp: * bindings/v8/ScriptController.h: (ScriptController): * bindings/v8/ScriptControllerQt.cpp: Removed. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::histogramEnumeration): (WebCore::V8InspectorFrontendHost::recordActionTakenCallback): (WebCore::V8InspectorFrontendHost::recordPanelShownCallback): (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback): * config.h: 2012-07-17 Zoltan Horvath <zoltan@webkit.org> [QT] REGRESSION (r122720): svg/filters/feSpecularLight-premultiplied.svg https://bugs.webkit.org/show_bug.cgi?id=91390 Reviewed by Zoltan Herczeg. Fix the regression by using the proper imagetype conversion in ImageBuffer::platformTransformColorSpace. The test is unskipped. * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::platformTransformColorSpace): 2012-07-17 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel. https://bugs.webkit.org/show_bug.cgi?id=91196 Reviewed by Pavel Feldman. Refactoring InspectorClients. InspectorClient::openInspectorFrontend now returning the InspectorFrontendChannel. Also refactored InspectorController::connectFrontend() to receive InspectorFrontendChannel. No new test as code refactoring done. * inspector/InspectorClient.h: (WebCore): (InspectorClient): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::show): (WebCore::InspectorController::reconnectFrontend): * inspector/InspectorController.h: (WebCore): (InspectorController): * loader/EmptyClients.h: (WebCore::EmptyInspectorClient::openInspectorFrontend): (WebCore::EmptyInspectorClient::hideHighlight): 2012-07-17 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122834. http://trac.webkit.org/changeset/122834 https://bugs.webkit.org/show_bug.cgi?id=91492 it broke the chromium (Requested by kkristof on #webkit). * DerivedSources.pri: * Target.pri: * WebCore.pri: * bindings/v8/ScriptCachedFrameData.cpp: (WebCore): (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): (WebCore::ScriptCachedFrameData::domWindow): (WebCore::ScriptCachedFrameData::restore): (WebCore::ScriptCachedFrameData::clear): * bindings/v8/ScriptCachedFrameData.h: (WebCore): (ScriptCachedFrameData): (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData): * bindings/v8/ScriptController.cpp: * bindings/v8/ScriptController.h: (ScriptController): * bindings/v8/ScriptControllerQt.cpp: Copied from Source/WebCore/bindings/v8/ScriptCachedFrameData.cpp. (WebCore): (WebCore::ScriptController::qtScriptEngine): * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore): (WebCore::V8InspectorFrontendHost::recordActionTakenCallback): (WebCore::V8InspectorFrontendHost::recordPanelShownCallback): (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback): * config.h: 2012-07-17 Gabor Ballabas <gaborb@inf.u-szeged.hu> [Qt][V8] Remove the V8 related codepaths and configuration https://bugs.webkit.org/show_bug.cgi?id=90863 Reviewed by Simon Hausmann. No new tests, because there is no new functionality. * DerivedSources.pri: * Target.pri: * WebCore.pri: * bindings/v8/ScriptCachedFrameData.cpp: * bindings/v8/ScriptCachedFrameData.h: * bindings/v8/ScriptController.cpp: * bindings/v8/ScriptController.h: (ScriptController): * bindings/v8/ScriptControllerQt.cpp: Removed. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::histogramEnumeration): (WebCore::V8InspectorFrontendHost::recordActionTakenCallback): (WebCore::V8InspectorFrontendHost::recordPanelShownCallback): (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback): * config.h: 2012-07-17 Kwang Yul Seo <skyul@company100.net> "in body" insertion mode, "any other end tag" step 2.1 is updated https://bugs.webkit.org/show_bug.cgi?id=91473 Reviewed by Eric Seidel. The HTML5 spec is updated to change the 'end tag' processing to not imply its own end tag, since that makes no sense. Step 2.1 now says "Generate implied end tags, except for elements with the same tag name as the token." Modified to follow the updated spec. Also removed the first FIXME because now ElementRecord can't be deleted by the preceeding call. This patch does not actually change the behavior because of the previous check (aborts if generateImpliedEndTags has already popped the node for the token), so no new tests. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): 2012-07-17 Shinya Kawanaka <shinyak@chromium.org> [Regression] Infinite loop in document.elementFromPoint https://bugs.webkit.org/show_bug.cgi?id=90820 Reviewed by Nikolas Zimmermann. Node::shadowAncestorNode returns the caller node itself for SVGElement. However, since we have already implemented event retargeting algorithm in Shadow DOM, we don't have to take a special care of SVGElement for Node.shadowAncestorNode() now. This patch will removes the special care code and fixes infinite loop in document.elementFromPoint(). Test: svg/hittest/svg-use-element-from-point.html * dom/Node.cpp: (WebCore::Node::shadowAncestorNode): 2012-07-17 Shinya Kawanaka <shinyak@chromium.org> Shadow DOM for img element https://bugs.webkit.org/show_bug.cgi?id=90532 Reviewed by Hajime Morita. This patch adds Shadow DOM support for img element. According to the Shadow DOM spec, img element should behave like having a user agent Shadow DOM. However, if we add Shadow DOM to img by default, it will cause performance regression and memory bloat. So, we would like to postpone adding a Shadow DOM to img until when we really need it. In other words, we add our User Agent Shadow DOM to img just before a user adds Author Shadow DOM. The User Agent Shadow DOM for img has only one element, which displays an image. If img has a Shadow DOM, img will behave like <span style="display: inline-block"> by default. The display style can be chagned using CSS though. This patch also adds ImageLoaderClient. The element we render an image and the element we take an argument from were the same, however not they might be different. We would like to encapsulate the fact into ImageLoaderClient. Tests: fast/dom/shadow/shadowdom-for-image-alt-update.html fast/dom/shadow/shadowdom-for-image-alt.html fast/dom/shadow/shadowdom-for-image-content.html fast/dom/shadow/shadowdom-for-image-dynamic.html fast/dom/shadow/shadowdom-for-image-event-click.html fast/dom/shadow/shadowdom-for-image-in-shadowdom.html fast/dom/shadow/shadowdom-for-image-map.html fast/dom/shadow/shadowdom-for-image-style.html fast/dom/shadow/shadowdom-for-image-with-multiple-shadow.html fast/dom/shadow/shadowdom-for-image-with-width-and-height.html fast/dom/shadow/shadowdom-for-image.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/html.css: (img): * html/HTMLImageElement.cpp: (WebCore::ImageElement::setImageIfNecessary): (WebCore): (WebCore::ImageElement::createRendererForImage): (WebCore::HTMLImageElement::willAddAuthorShadowRoot): When we don't have a user agent Shadow DOM yet we add it. (WebCore::HTMLImageElement::createShadowSubtree): (WebCore::HTMLImageElement::imageElement): (WebCore::HTMLImageElement::parseAttribute): (WebCore::HTMLImageElement::createRenderer): If a user agent Shadow DOM is attached, we create Renderer from style, instead of creating RenderImage. (WebCore::HTMLImageElement::attach): (WebCore::HTMLImageElement::innerElement): * html/HTMLImageElement.h: (WebCore): (ImageElement): (HTMLImageElement): (WebCore::HTMLImageElement::sourceElement): (WebCore::HTMLImageElement::refSourceElement): (WebCore::HTMLImageElement::derefSourceElement): (WebCore::HTMLImageElement::imageRenderer): (WebCore::HTMLImageElement::imageLoader): (WebCore::isHTMLImageElement): (WebCore::toHTMLImageElement): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::HTMLImageLoader): (WebCore::HTMLImageLoader::dispatchLoadEvent): (WebCore::HTMLImageLoader::sourceURI): (WebCore::HTMLImageLoader::notifyFinished): * html/HTMLImageLoader.h: (HTMLImageLoader): * html/HTMLInputElement.h: * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: * html/HTMLTagNames.in: * html/HTMLVideoElement.h: * html/shadow/ImageInnerElement.cpp: Added. (WebCore): (WebCore::ImageInnerElement::ImageInnerElement): (WebCore::ImageInnerElement::hostImage): (WebCore::ImageInnerElement::imageLoader): (WebCore::ImageInnerElement::attach): (WebCore::ImageInnerElement::createRenderer): * html/shadow/ImageInnerElement.h: Added. (WebCore): (ImageInnerElement): (WebCore::ImageInnerElement::imageRenderer): (WebCore::ImageInnerElement::create): (WebCore::isImageInnerElement): (WebCore::toImageInnerElement): * loader/ImageLoader.cpp: (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::~ImageLoader): (WebCore): (WebCore::ImageLoader::document): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::renderImageResource): (WebCore::ImageLoader::updatedHasPendingLoadEvent): (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): (WebCore::ImageLoader::dispatchPendingLoadEvent): (WebCore::ImageLoader::dispatchPendingErrorEvent): * loader/ImageLoader.h: (WebCore): (ImageLoader): (WebCore::ImageLoader::client): * loader/ImageLoaderClient.h: Added. (WebCore): (ImageLoaderClient): Provides the necessary interfaces to ImageLoader. (WebCore::ImageLoaderClient::~ImageLoaderClient): (ImageLoaderClientBase): (WebCore::ImageLoaderClientBase::sourceElement): (WebCore::ImageLoaderClientBase::imageElement): (WebCore::ImageLoaderClientBase::refSourceElement): (WebCore::ImageLoaderClientBase::derefSourceElement): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintIntoRect): (WebCore::RenderImage::imageMap): (WebCore::RenderImage::updateAltText): (WebCore::RenderImage::hostImageElement): (WebCore): * rendering/RenderImage.h: (WebCore): (RenderImage): * rendering/RenderObject.cpp: (WebCore::RenderObject::shouldRespectImageOrientation): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::SVGImageLoader): (WebCore::SVGImageLoader::dispatchLoadEvent): (WebCore::SVGImageLoader::sourceURI): * svg/SVGImageLoader.h: (SVGImageLoader): 2012-07-17 Kent Tamura <tkent@chromium.org> Internals: Remove injectPagePopupController() https://bugs.webkit.org/show_bug.cgi?id=91471 Reviewed by Hajime Morita. r122558 introduced injectPagePopupController(), however we'd like to avoid adding such JavaScript binding code. We can avoid it by exposing a PagePopupController for a mock and injecting the following code to the popup document: <script>window.pagePopupController = window.internals.pagePopupController</script> No new tests. This is a kind of refactoring. * testing/InternalSettings.cpp: (WebCore::InternalSettings::pagePopupController): Added. Accessor for PagePopupControler owned by the MockPagePopupDriver. * testing/InternalSettings.h: (InternalSettings): Declare pagePopupController() for Internals::pagePopupController(). * testing/Internals.cpp: (WebCore::Internals::pagePopupController): Added. This uses InternalSettings::pagePopupController(). * testing/Internals.h: (Internals): Declare pagePopupController() for Internals.idl. * testing/Internals.idl: Declare pagePopupController. * testing/MockPagePopupDriver.cpp: Moved m_pagePopupController from MockPagePopup to MockPagePopupDriver. (WebCore::MockPagePopup::MockPagePopup): Added a script element to prepare window.pagePopupController. Removed a callsite of injectPagePopupController(). (WebCore::MockPagePopupDriver::openPagePopup): (WebCore::MockPagePopupDriver::closePagePopup): * testing/MockPagePopupDriver.h: (WebCore::MockPagePopupDriver::pagePopupController): Accessor for a PagePopupController object. (MockPagePopupDriver): Add RefPtr<PagePopupController> data member. * testing/v8/WebCoreTestSupport.cpp: Remove injectPagePopupController(). * testing/v8/WebCoreTestSupport.h: ditto. 2012-07-17 Ryuan Choi <ryuan.choi@samsung.com> [EFL] Move codes related to theme setting from Widget to RenderTheme https://bugs.webkit.org/show_bug.cgi?id=89842 Reviewed by Kenneth Rohde Christiansen. WebKit/Efl uses custom theme for Scrollbar, RenderTheme and Cursor. However, theme information itself is in WidgetEfl so it is accessed by calling recursive function. Because theme is managed by each page, this patch moves codes related to theme from WidgetEfl to RenderThemeEfl which is contained by page. * platform/Widget.h: Removed functions related to theme. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::setThemePath): Added to set theme path. (WebCore::RenderThemeEfl::createEdje): Updated method to use RenderThemeEfl's theme. (WebCore::RenderThemeEfl::RenderThemeEfl): * platform/efl/RenderThemeEfl.h: (WebCore::RenderThemeEfl::themePath): Added to get theme path * platform/efl/ScrollbarEfl.cpp: Updated method to use RenderThemeEfl's theme. (ScrollbarEfl::setParent): * platform/efl/WidgetEfl.cpp: Removed codes related theme. (WidgetPrivate): 2012-07-17 Shinya Kawanaka <shinyak@chromium.org> HTMLMediaElement should not use Element::ensureShadowRoot() https://bugs.webkit.org/show_bug.cgi?id=77936 Reviewed by Hajime Morita. a video element and an audio element add UserAgentShadowRoot dynamically, and they assume that it's the oldest ShadowRoot. However an AuthorShadowRoot could be added by a user before a video element and an audio element add UserAgentShadowRoot. It breaks the assumption that the UserAgentShadowRoot is the oldest. If the UserAgentShadowRoot is not the oldest, the AuthorShadowRoot a page author added might be ignored. Since the timing to add UserAgentShadowRoot is not known by a user, the fact that UserAgentShadorRoot is not the oldest will cause inconsistent behavior. Adding AuthorShadowRoot to a video element and an audio element is allowed by this patch. Test: fast/dom/shadow/shadowdom-for-media.html * dom/ShadowRoot.cpp: (WebCore::allowsAuthorShadowRoot): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createShadowSubtree): (WebCore): (WebCore::HTMLMediaElement::willAddAuthorShadowRoot): (WebCore::HTMLMediaElement::createMediaControls): * html/HTMLMediaElement.h: (HTMLMediaElement): 2012-07-16 Daniel Bates <dbates@webkit.org> Attempt to fix the Chromium Mac build after <http://trac.webkit.org/changeset/122802> (https://bugs.webkit.org/show_bug.cgi?id=91451) Remove unused private instance variable AbsoluteQuadsGeneratorContext::m_wasFixed. This instance variable has remained unused since it was added in <http://trac.webkit.org/changeset/116718> (https://bugs.webkit.org/show_bug.cgi?id=85725). I'm unclear as to why the Chromium Mac build began to complain about this unused instance variable following <http://trac.webkit.org/changeset/122802>, since this code has been in the tree for a while and we previously instantiated AbsoluteQuadsGeneratorContext with wasFixed (even though it wasn't used). Regardless, we should remove the unused instance variable AbsoluteQuadsGeneratorContext::m_wasFixed. * rendering/RenderInline.cpp: (WebCore): Remove AbsoluteQuadsGeneratorContext::m_wasFixed. (WebCore::RenderInline::absoluteQuads): 2012-07-16 Gyuyoung Kim <gyuyoung.kim@samsung.com> Add RegisterProtocolHandlerClient to the Modules/protocolhandler https://bugs.webkit.org/show_bug.cgi?id=90940 Reviewed by Hajime Morita. As a step to let protocol handler be moved to the modules, RegisterProtocolHandlerClient needs to be added to the Modules/protocolhandler. Because ChromeClient has some virtual functions for protocol handlers, virtual functions should be moved to RegisterProtocolHandlerClient. In addition, NavigatorRegisterProtocolHandler should be supplementable. No new tests. Covered by existing tests. * GNUmakefile.list.am: * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: (WebCore::NavigatorRegisterProtocolHandler::from): (WebCore::NavigatorRegisterProtocolHandler::create): (WebCore): (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler): (WebCore::customHandlersStateString): (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): (WebCore::NavigatorRegisterProtocolHandler::supplementName): (WebCore::provideRegisterProtocolHandlerTo): * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: (WebCore): (NavigatorRegisterProtocolHandler): (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler): (WebCore::NavigatorRegisterProtocolHandler::client): * Modules/protocolhandler/RegisterProtocolHandlerClient.h: Added. (WebCore): (RegisterProtocolHandlerClient): * WebCore.gypi: * loader/EmptyClients.h: * page/ChromeClient.h: (ChromeClient): * platform/network/soup/CookieJarSoup.cpp: (WebCore::setCookies): (WebCore::getRawCookies): 2012-07-16 Pete Williamson <petewil@google.com> Changed the behavior of iconURLs to always recalculate the list. https://bugs.webkit.org/show_bug.cgi?id=88665 Reviewed by Kent Tamura. As it turns out, it can contain stale URLs in the case that some script manipulates the DOM, which breaks scripts trying to reset the favicon URL. Also added a method in Internals to allow tests to get the list of icon Tests: fast/dom/icon-url-change.html fast/dom/icon-url-list.html * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class * dom/Document.cpp: (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace * dom/Document.h: (Document): removed the addIconURL method which is no longer used * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor (WebCore): (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor * html/HTMLLinkElement.h: (HTMLLinkElement): declared the icon type and size accessors * testing/Internals.cpp: (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list (WebCore): * testing/Internals.h: (Internals): declared the method for unit testing the icon URL list * testing/Internals.idl: exported the Document::iconURLs function 2012-07-16 Hajime Morrita <morrita@chromium.org> WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing. https://bugs.webkit.org/show_bug.cgi?id=90764 Reviewed by Adam Barth. Defined WEBCORE_TESTING based on USE(EXPORT_MACROS_FOR_TESTING) and applied it to FrameDestructionObserver. * bindings/js/JSDOMGlobalObject.h: Removed conflicting symbols * page/FrameDestructionObserver.h: Added WEBKIT_TESTING (FrameDestructionObserver): * platform/PlatformExportMacros.h: 2012-07-16 Kiran Muppala <cmuppala@apple.com> REGRESSION: RenderInline::absoluteQuads produces incorrect results for fixed position. https://bugs.webkit.org/show_bug.cgi?id=91451 Reviewed by Simon Fraser. RenderInline::absoluteQuads relies on copies of RenderGeometryMap, created indirectly by passing AbsoluteQuadsGeneratorContext object by value. These copies are unsafe because the individual transform steps within the geometry map include a owned poitner to their respective transform. Modify the callee methods to take context by reference and disable copy constructor for RenderGeometryMap. Test: fast/inline/inline-fixed-position-boundingbox.html * rendering/RenderGeometryMap.h: (WebCore::RenderGeometryMapStep::RenderGeometryMapStep): Add missing m_offset to copy constructor initialization list. (RenderGeometryMap): Disable copy constructor. * rendering/RenderInline.cpp: Pass context object by reference. (WebCore::RenderInline::generateLineBoxRects): (WebCore::RenderInline::generateCulledLineBoxRects): (WebCore::RenderInline::absoluteRects): (WebCore::RenderInline::absoluteQuads): (WebCore::RenderInline::linesBoundingBox): (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox): (WebCore::RenderInline::addFocusRingRects): * rendering/RenderInline.h: (RenderInline::generateLineBoxRects): Update method declarations to show pass by reference context parameter. (RenderInline::generateCulledLineBoxRects): Ditto. 2012-07-16 Hayato Ito <hayato@chromium.org> Some events should be always stopped at shadow boundary. https://bugs.webkit.org/show_bug.cgi?id=90436 Reviewed by Ryosuke Niwa. The spec is here: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::determineDispatchBehavior): 2012-07-16 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r119948): [Form] HTMLInputElement.valueAsNumber for input type "month" should return number of month since January 1970 https://bugs.webkit.org/show_bug.cgi?id=91211 Reviewed by Kent Tamura. This patch changes BaseDateAndTimeInputType::valueAsDouble() to call virtual function parseToNumber() which "month" input type overrides instead of non-virtual function parseToDouble() which returns number of milliseconds. No new tests. Existing test (fast/form/month/input-valueasnumber-month.html) coverts this, although it is disabled. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::valueAsDouble): Changed to call parseToNumber(). (WebCore::BaseDateAndTimeInputType::parseToNumber): Changed to what parseToDouble() did. * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): Remove parseToDouble(). 2012-07-16 Adrienne Walker <enne@google.com> [chromium] Turn off ScrollbarLayerChromium for Windows due to bad alpha values https://bugs.webkit.org/show_bug.cgi?id=91438 Reviewed by Kenneth Russell. r120509 turned on blending for scrollbar thumbs. Unfortunately for Windows XP scrollbar thumbs, their alpha channel is bogus and so the thumb ends up being completely transparent. This should ultimately be fixed in Chromium theme code, but in the meantime this patch turns off the use of ScrollbarLayerChromium. This change makes Windows scrollbars fall back to using normal ContentLayerChromiums and being painted all in one layer on the main thread rather than being painted separately and composited on the compositor thread. * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::createScrollbarLayer): 2012-07-16 Koji Ishii <kojiishi@gmail.com> Vertical alternate glyph (GSUB) support for OpenTypeVerticalData https://bugs.webkit.org/show_bug.cgi?id=81389 Reviewed by Tony Chang. This patch adds support for reading 'GSUB' OpenType table to get vertical alternate glyphs. http://www.microsoft.com/typography/otspec/gsub.htm Like bug 81326, this code isn't on any code path yet. Tests: WebKit/chromium/tests/OpenTypeVerticalDataTest.cpp * platform/graphics/opentype/OpenTypeTypes.h: (WebCore::OpenType::validateTable): Moved from OpenTypeVerticalData.cpp for unit tests. (OpenType): (TableBase): Ditto. (WebCore::OpenType::TableBase::isValidEnd): (WebCore::OpenType::TableBase::validatePtr): (WebCore::OpenType::TableBase::validateOffset): * platform/graphics/opentype/OpenTypeVerticalData.cpp: (OpenType): Added several OpenType tables used by 'GSUB' table. (CoverageTable): (Coverage1Table): (Coverage2Table): (RangeRecord): (SubstitutionSubTable): (WebCore::OpenType::SubstitutionSubTable::coverage): (SingleSubstitution2SubTable): (LookupTable): (WebCore::OpenType::LookupTable::getSubstitutions): (LookupList): (WebCore::OpenType::LookupList::lookup): (FeatureTable): (WebCore::OpenType::FeatureTable::getGlyphSubstitutions): (FeatureList): (FeatureRecord): (WebCore::OpenType::FeatureList::feature): (LangSysTable): (WebCore::OpenType::LangSysTable::feature): (ScriptTable): (LangSysRecord): (WebCore::OpenType::ScriptTable::defaultLangSys): (ScriptList): (ScriptRecord): (WebCore::OpenType::ScriptList::script): (WebCore::OpenType::ScriptList::defaultScript): (WebCore::OpenType::ScriptList::defaultLangSys): (GSUBTable): (WebCore::OpenType::GSUBTable::scriptList): (WebCore::OpenType::GSUBTable::featureList): (WebCore::OpenType::GSUBTable::lookupList): (WebCore::OpenType::GSUBTable::defaultLangSys): (WebCore::OpenType::GSUBTable::feature): (WebCore::OpenType::GSUBTable::getVerticalGlyphSubstitutions): (WebCore::OpenTypeVerticalData::OpenTypeVerticalData): (WebCore::OpenTypeVerticalData::loadMetrics): Split code to load metrics from ctor. (WebCore::OpenTypeVerticalData::loadVerticalGlyphSubstitutions): Load the vertical alternate Glyph substitution table. (WebCore): (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs): Substitute Glyph IDs with vertical alternate Glyph IDs. * platform/graphics/opentype/OpenTypeVerticalData.h: (OpenTypeVerticalData): Added m_verticalGlyphMap. 2012-07-16 Vincent Scheib <scheib@chromium.org> Fix spelling of EnforceIFrameAllowFullScreenRequirement and ExemptIFrameAllowFullScreenRequirement. https://bugs.webkit.org/show_bug.cgi?id=91437 Reviewed by Adrienne Walker. Document contained spelling errors of 'FulScreen' instead of 'FullScreen' for the FullScreenCheckType enumeration. No test changes needed. * dom/Document.cpp: (WebCore::Document::requestFullScreenForElement): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::webkitRequestFullscreen): (WebCore::Element::webkitRequestFullScreen): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): 2012-07-16 MORITA Hajime <morrita@google.com> Comment on WebCore::HTMLMediaElement::childShouldCreateRenderer() should explain why https://bugs.webkit.org/show_bug.cgi?id=91174 Reviewed by Kent Tamura. Clarified the explanation. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::childShouldCreateRenderer): 2012-07-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120033. http://trac.webkit.org/changeset/120033 https://bugs.webkit.org/show_bug.cgi?id=91454 Broke background gradients (Requested by smfr on #webkit). * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::draw): 2012-07-16 Joshua Bell <jsbell@chromium.org> IndexedDB: Implement spec updates to IDBTransaction.error https://bugs.webkit.org/show_bug.cgi?id=91409 Reviewed by Tony Chang. The Indexed DB spec was updated to resolve some edge cases around the IDBTransaction.error attribute. It was agreed that accessing error should never throw, error should be null if the transaction is not finished or abort() was explicitly called, an appropriate error should be returned if a commit failed, and a generic AbortError should be used if a request callback throws. These cases are now handled per spec, except that a reason is not provided for the commit failure (it's always UnknownError). Test: storage/indexeddb/transaction-error.html storage/indexeddb/transaction-abort.html * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't re-abort the transaction if dispatching in response to an abort. (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction only if not already aborting, and set it's error to AbortError. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end. * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::db): Move impl to header file. (WebCore::IDBTransaction::error): Move impl to header file, simplify. (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws. 2012-07-16 Joshua Bell <jsbell@chromium.org> IndexedDB: Implement spec updates to IDBTransaction.error https://bugs.webkit.org/show_bug.cgi?id=91409 Reviewed by Tony Chang. The Indexed DB spec was updated to resolve some edge cases around the IDBTransaction.error attribute. It was agreed that accessing error should never throw, error should be null if the transaction is not finished or abort() was explicitly called, an appropriate error should be returned if a commit failed, and a generic AbortError should be used if a request callback throws. These cases are now handled per spec, except that a reason is not provided for the commit failure (it's always UnknownError). Test: storage/indexeddb/transaction-error.html storage/indexeddb/transaction-abort.html * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't re-abort the transaction if dispatching in response to an abort. (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction only if not already aborting, and set it's error to AbortError. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end. * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::db): Move impl to header file. (WebCore::IDBTransaction::error): Move impl to header file, simplify. (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws. 2012-07-16 Alec Flett <alecflett@chromium.org> IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer https://bugs.webkit.org/show_bug.cgi?id=90923 Reviewed by Darin Fisher. Refactor IndexWriter to depend only on IDBIndexMetadata and on (databaseId, objectStoreId, indexId) so that it can talk directly to the backing store, and also eventually be moved into the renderer. This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys as a replacement for IDBObjectStoreBackendInterface::put, already stubbed out in the chromium port. It will fully replace put() after both chromium and webkit sides have reached alignment. No new tests as this is just a refactor and existing tests cover correctness. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBIndexBackendImpl.cpp: * Modules/indexeddb/IDBIndexBackendImpl.h: * Modules/indexeddb/IDBObjectStore.h: (IDBObjectStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): (WebCore): (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::populateIndex): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): 2012-07-16 Adrienne Walker <enne@google.com> [chromium] Unify compositor quad transforms into content space https://bugs.webkit.org/show_bug.cgi?id=91350 Reviewed by Kenneth Russell. For the purpose of simplification and as a first step towards removing any transform that takes a centered rect, remove the ability of layers to override the quad transform. All quads and quad transforms operate on content space with the origin in the top left. The gutter quads used to use the root layer (that doesn't draw content) as the layer to create the shared quad state from. This is now created manually as a layer without bounds should never in general need a shared quad state created for it. No change in functionality; tested by existing layout and unit tests. * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-07-16 Adrienne Walker <enne@google.com> [chromium] Unify compositor quad transforms into content space https://bugs.webkit.org/show_bug.cgi?id=91350 Reviewed by Kenneth Russell. For the purpose of simplification and as a first step towards removing any transform that takes a centered rect, remove the ability of layers to override the quad transform. All quads and quad transforms operate on content space with the origin in the top left. The gutter quads used to use the root layer (that doesn't draw content) as the layer to create the shared quad state from. This is now created manually as a layer without bounds should never in general need a shared quad state created for it. No change in functionality; tested by existing layout and unit tests. * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-07-16 Joshua Bell <jsbell@chromium.org> IndexedDB: Resolve test and IDL FIXMEs for a handful of landed patches https://bugs.webkit.org/show_bug.cgi?id=91423 Reviewed by Tony Chang. IDBObjectStore.createIndex() had a hack to handle a null keyPath argument for the DOMString[] overload and treat it as the string "null". Now that IDL arrays are not nullable by default following r121817 this hack can be removed and the binding layer will automagically coerce to DOMString. Test: storage/indexeddb/keypath-basics.html * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): Remove special case for null in DOMString[] overload. * Modules/indexeddb/IDBObjectStore.idl: Remove Nullable suffix from DOMString[] overload so that the DOMString overload will match null. 2012-07-16 Bear Travis <betravis@adobe.com> Resolve CSS Exclusions shapeInside, shapeOutside properties to Length based WrapShape classes https://bugs.webkit.org/show_bug.cgi?id=89670 Reviewed by Dirk Schulze. Layout of CSS Exclusions requires length based WrapShape classes, rather than the existing CSSValue based CSSWrapShape classes. This patch adds length based WrapShape analogs to the CSSWrapShapes, and modifies RenderStyle to use a WrapShape instead of a CSSWrapShape. The translation between WrapShape and CSSWrapShape classes is handled by helper functions in the new WrapShapeFunctions files. StyleBuilder resolves CSSWrapShapes to WrapShapes for layout use. CSSComputedStyleDeclaration translates WrapShapes to CSSWrapShapes for style use. There are existing tests that cover the style serialization / resolution in fast/exclusions/parsing-wrap-shape-inside.html and fast/exclusions/parsing/wrap-shape-outside.html Test: fast/exclusions/parsing-wrap-shape-lengths.html * CMakeLists.txt: Build system changes for adding new files * GNUmakefile.list.am: Ditto * Target.pri: Ditto * WebCore.gypi: Ditto * WebCore.vcproj/WebCore.vcproj: Ditto * WebCore.xcodeproj/project.pbxproj: Ditto * css/CSSComputedStyleDeclaration.cpp: Translate WrapShapes back to CSSWrapShapes (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSWrapShapes.h: Mostly changing functions to be const (WebCore::CSSWrapShapeRectangle::type): (WebCore::CSSWrapShapeCircle::type): (WebCore::CSSWrapShapeEllipse::type): (WebCore::CSSWrapShapePolygon::getXAt): (WebCore::CSSWrapShapePolygon::getYAt): (WebCore::CSSWrapShapePolygon::values): (WebCore::CSSWrapShapePolygon::type): * css/StyleBuilder.cpp: Resolve CSSWrapShapes to WrapShapes (WebCore): (WebCore::ApplyPropertyWrapShape::setValue): (WebCore::ApplyPropertyWrapShape::applyValue): (WebCore::ApplyPropertyWrapShape::createHandler): * css/WrapShapeFunctions.cpp: Added. (WebCore): (WebCore::valueForWrapShape): (WebCore::convertToLength): (WebCore::wrapShapeForValue): * css/WrapShapeFunctions.h: Added. (WebCore): * rendering/style/RenderStyle.h: * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): * rendering/style/WrapShapes.h: Added. (WebCore): (WrapShape): (WebCore::WrapShape::~WrapShape): (WebCore::WrapShape::WrapShape): (WrapShapeRectangle): (WebCore::WrapShapeRectangle::create): (WebCore::WrapShapeRectangle::left): (WebCore::WrapShapeRectangle::top): (WebCore::WrapShapeRectangle::width): (WebCore::WrapShapeRectangle::height): (WebCore::WrapShapeRectangle::cornerRadiusX): (WebCore::WrapShapeRectangle::cornerRadiusY): (WebCore::WrapShapeRectangle::setLeft): (WebCore::WrapShapeRectangle::setTop): (WebCore::WrapShapeRectangle::setWidth): (WebCore::WrapShapeRectangle::setHeight): (WebCore::WrapShapeRectangle::setCornerRadiusX): (WebCore::WrapShapeRectangle::setCornerRadiusY): (WebCore::WrapShapeRectangle::type): (WebCore::WrapShapeRectangle::WrapShapeRectangle): (WrapShapeCircle): (WebCore::WrapShapeCircle::create): (WebCore::WrapShapeCircle::left): (WebCore::WrapShapeCircle::top): (WebCore::WrapShapeCircle::radius): (WebCore::WrapShapeCircle::setLeft): (WebCore::WrapShapeCircle::setTop): (WebCore::WrapShapeCircle::setRadius): (WebCore::WrapShapeCircle::type): (WebCore::WrapShapeCircle::WrapShapeCircle): (WrapShapeEllipse): (WebCore::WrapShapeEllipse::create): (WebCore::WrapShapeEllipse::top): (WebCore::WrapShapeEllipse::left): (WebCore::WrapShapeEllipse::radiusX): (WebCore::WrapShapeEllipse::radiusY): (WebCore::WrapShapeEllipse::setTop): (WebCore::WrapShapeEllipse::setLeft): (WebCore::WrapShapeEllipse::setRadiusX): (WebCore::WrapShapeEllipse::setRadiusY): (WebCore::WrapShapeEllipse::type): (WebCore::WrapShapeEllipse::WrapShapeEllipse): (WrapShapePolygon): (WebCore::WrapShapePolygon::create): (WebCore::WrapShapePolygon::windRule): (WebCore::WrapShapePolygon::values): (WebCore::WrapShapePolygon::getXAt): (WebCore::WrapShapePolygon::getYAt): (WebCore::WrapShapePolygon::setWindRule): (WebCore::WrapShapePolygon::appendPoint): (WebCore::WrapShapePolygon::type): (WebCore::WrapShapePolygon::WrapShapePolygon): 2012-07-16 Simon Fraser <simon.fraser@apple.com> Fix compositing layers in columns when in paginated mode https://bugs.webkit.org/show_bug.cgi?id=91425 Reviewed by Dave Hyatt. Enhance a hack that was added to allow composited layers to display in columns to work for paginated mode, where the RenderView is renderer with columns. Test: compositing/columns/composited-in-paginated.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): 2012-07-16 Emil A Eklund <eae@chromium.org> Inconsistent rounding in table layout causes background color to bleed through https://bugs.webkit.org/show_bug.cgi?id=91410 Reviewed by Eric Seidel. At certain zoom levels a rounding error in the table layout code cases the table background color to bleed through between cells. Tables layout happens on pixel bounds however the paint offset wasn't correctly rounded. Test: fast/sub-pixel/table-rows-no-gaps.html * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): Round paintOffset before passing it to the paint method of the children. 2012-07-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122739. http://trac.webkit.org/changeset/122739 https://bugs.webkit.org/show_bug.cgi?id=91424 Broke mac builds (Requested by rniwa on #webkit). * inspector/CodeGeneratorInspector.py: (flatten_list): 2012-07-16 Dana Jansens <danakj@chromium.org> [chromium] Remove non-ephemeral data from RenderSurface as it duplicates data from the owning layer https://bugs.webkit.org/show_bug.cgi?id=91418 Reviewed by Adrienne Walker. This removes the filters and masks from render surfaces, and makes them used directly from the owning layer. Also removes skipsDraw from surfaces as it was just not used at all. Covered by existing tests. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::filters): (WebCore::LayerChromium::backgroundFilters): (WebCore::LayerChromium::hasMask): (WebCore::LayerChromium::hasReplica): (WebCore::LayerChromium::replicaHasMask): (LayerChromium): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::RenderSurfaceChromium): * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::hasMask): (WebCore::CCLayerImpl::hasReplica): (WebCore::CCLayerImpl::replicaHasMask): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::finishedRenderTarget): (WebCore::reduceOcclusionBelowSurface): (WebCore::::leaveToRenderTarget): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawableContentRect): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-16 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=91299 Paginated views should restrict available height to column height -and corresponding- <rdar://problem/11152108> Reviewed by Dan Bernstein. Now that RenderViews can have columns, availableLogicalHeight needs to consider that column height, much like how availableLogicalWidth already considers column width. availableLogicalHeight is newly virtual, like the already-virtual availableLogicalWidth. * rendering/RenderBox.h: (RenderBox): Check with the columnHeight. * rendering/RenderView.cpp: (WebCore): (WebCore::RenderView::availableLogicalHeight): * rendering/RenderView.h: setPagination now takes pageLength as an optional parameter. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setPagination): * testing/InternalSettings.h: (WebCore::InternalSettings::setPagination): (InternalSettings): * testing/InternalSettings.idl: * testing/Internals.cpp: (WebCore::Internals::setPagination): * testing/Internals.h: (WebCore::Internals::setPagination): (Internals): * testing/Internals.idl: 2012-07-16 Dana Jansens <danakj@chromium.org> [chromium] Remove targetRenderSurface concept, give layers a renderTarget which is the layer whose coordinate space they draw into https://bugs.webkit.org/show_bug.cgi?id=91288 Reviewed by Adrienne Walker. Always use pointers to layers when discussing render targets instead of pointing directly to a RenderSurface. Covered by existing tests. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::createRenderSurface): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::renderTarget): (WebCore::LayerChromium::setRenderTarget): (LayerChromium): * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::setTexturePriorities): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::createRenderSurface): (WebCore::CCLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::renderTarget): (WebCore::CCLayerImpl::setRenderTarget): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateLayerScissorRect): (WebCore::calculateSurfaceScissorRect): (WebCore::calculateVisibleContentRect): (WebCore::computeScrollCompensationForThisLayer): (WebCore::calculateDrawTransformsInternal): (WebCore::pointIsClippedBySurfaceOrClipRect): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::enterLayer): (WebCore::::leaveLayer): (WebCore::::enterRenderTarget): (WebCore::::finishedRenderTarget): (WebCore): (WebCore::reduceOcclusionBelowSurface): (WebCore::::leaveToRenderTarget): (WebCore::::markOccludedBehindLayer): (WebCore::::occluded): (WebCore::::unoccludedContentRect): (WebCore::::unoccludedContributingSurfaceContentRect): (WebCore::::layerScissorRectInTargetSurface): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): (WebCore::CCOcclusionTrackerBase::StackObject::StackObject): (StackObject): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::appendSurface): * platform/graphics/chromium/cc/CCRenderSurface.cpp: * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-16 Florin Malita <fmalita@chromium.org> SVGAnimationElement::currentValuesForValuesAnimation crash https://bugs.webkit.org/show_bug.cgi?id=91326 Reviewed by Simon Fraser. SVGSMILElement::progress() assumes that seekToIntervalCorrespondingToTime() always lands inside a defined interval, but one can force arbitrary time offsets using setCurrentTime(). This patch adds logic for handling non-interval time offsets gracefully. Test: svg/animations/smil-setcurrenttime-crash.svg * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::progress): 2012-07-16 Joshua Netterfield <jnetterfield@rim.com> [BlackBerry] Upstream WebGL Code https://bugs.webkit.org/show_bug.cgi?id=91143 Reviewed by Rob Buis. This patch includes BlackBerry-specific fixes for anti-aliasing, logging, and shader compilation. No new tests, because there is no new functionality. * platform/graphics/GraphicsContext3D.h: Add a value for TI Imagination chipsets on BlackBerry platforms * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: Multiple downstream changes (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore): (WebCore::GraphicsContext3D::logFrameBufferStatus): (WebCore::GraphicsContext3D::readPixelsIMG): BlackBerry-specific fix for Imagination hardware. (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): (WebCore::GraphicsContext3D::platformTexture): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/opengl/Extensions3DOpenGL.h: Remove unnecessary whitespace. (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Hack to fix ANGLE-generated code on BlackBerry platforms. * platform/graphics/opengl/Extensions3DOpenGLCommon.h: (Extensions3DOpenGLCommon): * platform/graphics/opengl/Extensions3DOpenGLES.cpp: I am not in a position to change system headers from correct to incorrect. (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample): (WebCore::Extensions3DOpenGLES::supportsExtension): * platform/graphics/opengl/Extensions3DOpenGLES.h: I am not in a position to change system headers from correct to incorrect. (Extensions3DOpenGLES): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Add a BlackBerry-specific anti-aliasing fix. (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::prepareTexture): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore): 2012-07-16 Tony Chang <tony@chromium.org> Position grid items by row/column index https://bugs.webkit.org/show_bug.cgi?id=91293 Reviewed by Ojan Vafai. Do some initial grid positioning. Only handle the simple case where tracks are fixed values and don't properly size the grid items. This gives us something to work with and starts implementing the "Grid Track Sizing Algorithm": http://dev.w3.org/csswg/css3-grid-layout/#grid-track-sizing-algorithm0 Test: fast/css-grid-layout/place-cell-by-index.html * rendering/RenderGrid.cpp: (RenderGrid::GridTrack): Data structure for holding the track size. UsedBreadth matches the terminology used in the spec. (WebCore::RenderGrid::layoutBlock): Pull in some boiler plate code and put the grid specific code in layoutGridItems. (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Implement part of the grid track sizing algorithm. (WebCore::RenderGrid::layoutGridItems): Compute the size of grid tracks, layout and position children. (WebCore::RenderGrid::findChildLogicalPosition): Map track sizes to the actual position of the child. * rendering/RenderGrid.h: * rendering/style/RenderStyle.h: Just return a copy of Length rather than a reference to Length. This seems more consistent with other getters that return a Length. 2012-07-16 Sami Kyostila <skyostil@chromium.org> [chromium] Only apply page scale delta to root scroll layer https://bugs.webkit.org/show_bug.cgi?id=91374 Reviewed by Adrienne Walker. When the user pinch-zooms the web page though the Chromium compositor, the per-layer page scale delta is used to keep track of the difference between the page scale on the compositor thread versus the main thread. On the next commit to the main thread these values are reset to 1. When calculating layer positions, the compositor applies a layer's page scale delta both to the layer itself as well as all of its children. Since we are currently updating the page scale delta on all scrollable layers, this results in scrollable child layers getting scaled multiple times. This patch changes the compositor to only apply the page scale delta on the root scroll layer. New unit test: CCLayerTreeHostImplTest.pageScaleDeltaAppliedToRootScrollLayerOnly * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits): (WebCore::CCLayerTreeHostImpl::setPageScaleDelta): 2012-07-16 Kihong Kwon <kihong.kwon@samsung.com> Remove setController from BatteryClient https://bugs.webkit.org/show_bug.cgi?id=90944 Reviewed by Adam Barth. BatteryClient doesn't need to keep m_controller, because BatteryController can be accessed using BatteryController::from(). Remove BatteryClient::setController function. No new tests. Covered by existing tests. * Modules/battery/BatteryClient.h: * Modules/battery/BatteryController.cpp: (WebCore::BatteryController::BatteryController): 2012-07-16 Mike West <mkwst@chromium.org> Invalid `script-nonce` directives should block script execution. https://bugs.webkit.org/show_bug.cgi?id=91353 Reviewed by Adam Barth. If the `script-nonce` Content Security Policy directive contains an invalid value, we should fail loudly, throwing a warning to the console and denying execution of script on the page. The is in line with the current state of the experimental CSP 1.1 Editors Draft[1]. [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-nonce--experimental Test: http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html * page/ContentSecurityPolicy.cpp: (WebCore::CSPDirectiveList::checkNonceAndReportViolation): Check against null rather than empty for early exit, otherwise only compare nonces if the stored nonce isn't empty. (WebCore::CSPDirectiveList::parseScriptNonce): Assign the empty string if nonce is invalid. 2012-07-16 Min Qin <qinmin@chromium.org> [Android] remove RenderThemeChromiumAndroid::paintMediaFullscreenButton() https://bugs.webkit.org/show_bug.cgi?id=91291 Reviewed by Adam Barth. The recent media control refactoring added paintMediaFullscreenButton() in RenderThemeChromiumSkia. Since RenderThemeChromiumAndroid inherits from that class, we don't need to redefine this function. No test needed as this change just removes an unnecessary override. * rendering/RenderThemeChromiumAndroid.cpp: * rendering/RenderThemeChromiumAndroid.h: 2012-07-16 Peter Rybin <peter.rybin@gmail.com> Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build https://bugs.webkit.org/show_bug.cgi?id=90642 Reviewed by Yury Semikhatsky. A small intermediate writer is added. It handles comparing old and new source before actual writing. * inspector/CodeGeneratorInspector.py: (flatten_list): (SmartOutput): (SmartOutput.__init__): (SmartOutput.write): (SmartOutput.close): 2012-07-16 Dana Jansens <danakj@chromium.org> [chromium] Incorrect assertion: Replicas will cause a RenderPass to be removed twice https://bugs.webkit.org/show_bug.cgi?id=91328 Reviewed by Adrienne Walker. We asserted that we would never attempt to remove a render pass that had already been removed. This was incorrect as a surface with a replica has two quads and both may cause us to attempt its removal. We must handle this case gracefully. Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass): 2012-07-16 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: native memory: fix instrumentation for string members https://bugs.webkit.org/show_bug.cgi?id=91384 Reviewed by Pavel Feldman. It was possible to report a string member via addMember instead of addString. This patch is fixing the problem and adding a link time guard. Covered by existing inspector performance tests infrastructure. * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/MemoryInstrumentation.h: (WebCore): (WebCore::MemoryClassInfo::addString): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): 2012-07-16 Zoltan Horvath <zoltan@webkit.org> Unreviewed. Remove unnecessary executable bits after r122720. * platform/graphics/ImageSource.h: * platform/graphics/qt/ImageBufferQt.cpp: * platform/graphics/qt/ImageDecoderQt.cpp: * platform/graphics/qt/ImageQt.cpp: * platform/graphics/qt/StillImageQt.h: * platform/graphics/qt/TransparencyLayer.h: 2012-07-16 Zoltan Horvath <zoltan@webkit.org> [Qt] Change NativeImagePtr from QPixmap* to QImage* https://bugs.webkit.org/show_bug.cgi?id=88785 Reviewed by Simon Hausmann. Since we use raster engine there is no difference between QPixmap and QImage, so we are going to use QImage everywhere where it is possible. This refactoring contains the change of the NativeImagePtr typedef from QPixmap* to QImage* and covers the related modifications. Part of the change is similar to Viatcheslav Ostapenko's internal work. Covered by existing tests. * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapAssignToElementMethod::invoke): (JSC::Bindings::QtPixmapInstance::variantFromObject): * platform/DragImage.h: (WebCore): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/Image.h: (Image): * platform/graphics/ImageSource.h: (WebCore): * platform/graphics/gstreamer/ImageGStreamer.h: * platform/graphics/gstreamer/ImageGStreamerQt.cpp: (ImageGStreamer::ImageGStreamer): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::pushTransparencyLayerInternal): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): * platform/graphics/qt/ImageBufferDataQt.h: (ImageBufferData): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::clip): (WebCore::ImageBuffer::platformTransformColorSpace): (WebCore::getImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::encodeImage): (WebCore::ImageBuffer::toDataURL): * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageFrame::asNewNativeImage): * platform/graphics/qt/ImageQt.cpp: (graphics): (loadResourceImage): (WebCore::Image::loadPlatformResource): (WebCore::Image::setPlatformResource): (WebCore::Image::drawPattern): (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): (WebCore::BitmapImage::checkForSolidColor): (WebCore::BitmapImage::create): * platform/graphics/qt/NativeImageQt.h: Added. (WebCore): (NativeImageQt): (WebCore::NativeImageQt::defaultFormatForAlphaEnabledImages): (WebCore::NativeImageQt::defaultFormatForOpaqueImages): * platform/graphics/qt/PatternQt.cpp: (WebCore::Pattern::createPlatformPattern): * platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::StillImage): (WebCore::StillImage::~StillImage): (WebCore::StillImage::currentFrameHasAlpha): (WebCore::StillImage::size): (WebCore::StillImage::nativeImageForCurrentFrame): (WebCore::StillImage::draw): * platform/graphics/qt/StillImageQt.h: (WebCore::StillImage::create): (WebCore::StillImage::createForRendering): (StillImage): * platform/graphics/qt/TransparencyLayer.h: (WebCore::TransparencyLayer::TransparencyLayer): (TransparencyLayer): * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp: (WebCore::GraphicsSurface::createReadOnlyImage): * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::createDragImage): (WebCore::ClipboardQt::declareAndWriteDragImage): * platform/qt/CursorQt.cpp: (WebCore::createCustomCursor): * platform/qt/DragImageQt.cpp: (WebCore::createDragImageFromImage): * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeImage): 2012-07-16 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: moving forward to the better memory instrumentation API https://bugs.webkit.org/show_bug.cgi?id=91259 Reviewed by Pavel Feldman. I'm trying to remove unnecessary complexity of the API reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember The same will happen with reportPointer, reportObject pair. Also info.report* will be replaced with info.add* * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectBindingMemoryInfo): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8DOMMap.h: * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.h: (WebCore::Element::reportMemoryUsage): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/MemoryInstrumentation.h: (WebCore::MemoryInstrumentation::addInstrumentedMember): (MemoryInstrumentation): (WebCore::MemoryInstrumentation::addMember): (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember): (WebCore::MemoryInstrumentation::OwningTraits::addMember): (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl): (WebCore::MemoryInstrumentation::addMemberImpl): (WebCore::MemoryClassInfo::addInstrumentedMember): (WebCore::MemoryClassInfo::addMember): (WebCore::MemoryClassInfo::addHashMap): (WebCore::MemoryClassInfo::addHashSet): (WebCore::MemoryClassInfo::addListHashSet): (WebCore::MemoryClassInfo::addVector): (WebCore::MemoryClassInfo::addString): (WebCore::MemoryInstrumentation::addHashMap): (WebCore::MemoryInstrumentation::addHashSet): (WebCore::MemoryInstrumentation::addListHashSet): (WebCore::MemoryInstrumentation::addVector): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * inspector/InspectorMemoryAgent.cpp: (WebCore): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): 2012-07-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122714. http://trac.webkit.org/changeset/122714 https://bugs.webkit.org/show_bug.cgi?id=91380 It broke mac compilation (Requested by loislo on #webkit). * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectBindingMemoryInfo): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8DOMMap.h: * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.h: (WebCore::Element::reportMemoryUsage): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/MemoryInstrumentation.h: (WebCore::MemoryInstrumentation::reportObject): (MemoryInstrumentation): (WebCore::MemoryInstrumentation::reportPointer): (WebCore::MemoryClassInfo::reportInstrumentedPointer): (WebCore::MemoryClassInfo::reportInstrumentedObject): (WebCore::MemoryClassInfo::reportPointer): (WebCore::MemoryClassInfo::reportObject): (WebCore::MemoryClassInfo::reportHashMap): (WebCore::MemoryClassInfo::reportHashSet): (WebCore::MemoryClassInfo::reportListHashSet): (WebCore::MemoryClassInfo::reportVector): (MemoryClassInfo): (WebCore::MemoryClassInfo::reportString): (WebCore): (WebCore::MemoryInstrumentation::reportInstrumentedPointer): (WebCore::MemoryInstrumentation::reportInstrumentedObject): (WebCore::MemoryInstrumentation::reportHashMap): (WebCore::MemoryInstrumentation::reportHashSet): (WebCore::MemoryInstrumentation::reportListHashSet): (WebCore::MemoryInstrumentation::reportVector): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * inspector/InspectorMemoryAgent.cpp: (WebCore): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): 2012-07-16 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: moving forward to the better memory instrumentation API https://bugs.webkit.org/show_bug.cgi?id=91259 Reviewed by Pavel Feldman. I'm trying to remove unnecessary complexity of the API reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember The same will happen with reportPointer, reportObject pair. Also info.report* will be replaced with info.add* * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectBindingMemoryInfo): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8DOMMap.h: * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.h: (WebCore::Element::reportMemoryUsage): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/MemoryInstrumentation.h: (WebCore::MemoryInstrumentation::addInstrumentedMember): (MemoryInstrumentation): (WebCore::MemoryInstrumentation::addMember): (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember): (WebCore::MemoryInstrumentation::OwningTraits::addMember): (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl): (WebCore::MemoryInstrumentation::addMemberImpl): (WebCore::MemoryClassInfo::addInstrumentedMember): (WebCore::MemoryClassInfo::addMember): (WebCore::MemoryClassInfo::addHashMap): (WebCore::MemoryClassInfo::addHashSet): (WebCore::MemoryClassInfo::addListHashSet): (WebCore::MemoryClassInfo::addVector): (WebCore::MemoryClassInfo::addString): (WebCore::MemoryInstrumentation::addHashMap): (WebCore::MemoryInstrumentation::addHashSet): (WebCore::MemoryInstrumentation::addListHashSet): (WebCore::MemoryInstrumentation::addVector): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * inspector/InspectorMemoryAgent.cpp: (WebCore): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): 2012-07-16 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo https://bugs.webkit.org/show_bug.cgi?id=91227 Reviewed by Pavel Feldman. void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const { MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM); info.visitBaseClass<ScriptWrappable>(this); info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference info.addInstrumentedMember(m_next); info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash); // NonClass value_type (report only size of internal template structures) info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof) info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet); // instrumented value_type (call visit) } The change is covered by existing tests for native memory snapshot. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8DOMMap.h: * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.h: (WebCore::Element::reportMemoryUsage): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryObjectInfo::objectType): (WebCore::MemoryObjectInfo::objectSize): (WebCore::MemoryObjectInfo::memoryInstrumentation): (MemoryObjectInfo): (WebCore::MemoryObjectInfo::reportObjectInfo): (WebCore): (MemoryClassInfo): (WebCore::MemoryClassInfo::MemoryClassInfo): (WebCore::MemoryClassInfo::visitBaseClass): (WebCore::MemoryClassInfo::reportInstrumentedPointer): (WebCore::MemoryClassInfo::reportInstrumentedObject): (WebCore::MemoryClassInfo::reportPointer): (WebCore::MemoryClassInfo::reportObject): (WebCore::MemoryClassInfo::reportHashMap): (WebCore::MemoryClassInfo::reportHashSet): (WebCore::MemoryClassInfo::reportListHashSet): (WebCore::MemoryClassInfo::reportVector): (WebCore::MemoryClassInfo::reportString): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): 2012-07-15 Carlos Garcia Campos <cgarcia@igalia.com> Unreviewed. Fix make distcheck. * GNUmakefile.am: Add missing idl directory. * GNUmakefile.list.am: Add missing files to compilation. 2012-07-16 Eugene Klyuchnikov <eustas.big@gmail.com> Web Inspector: Implement message loop instrumentation for timeline https://bugs.webkit.org/show_bug.cgi?id=88325 Reviewed by Pavel Feldman. Message loop instrumentation will show when the render thread is busy. * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): Added new experiment. * inspector/front-end/TimelineGrid.js: (WebInspector.TimelineGrid.prototype.get dividersLabelBarElement): Exposed label bar element. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._resetPanel): Cleanups recorded tasks. (WebInspector.TimelinePanel.prototype._refresh): Updates CPU bar. (WebInspector.TimelinePanel.prototype._refreshRecords): Ditto. (WebInspector.TimelinePanel.prototype._refreshCpuBars.compareEndTime): Ditto. (WebInspector.TimelinePanel.prototype._refreshCpuBars): Ditto. (WebInspector.TimelinePanel.prototype._enableMainThreadMonitoringExperiment): Adds CPU bar to UI. (WebInspector.TimelinePanel.prototype._showPopover): Fix NPE. (WebInspector.TimelineCalculator.prototype.computeTime): Utility for position to time conversion. (WebInspector.TimelineCalculator.prototype.setDisplayWindow): Remenbers clientWidth. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): Define CPU bar colors. * inspector/front-end/timelinePanel.css: (.timeline-cpu-bars): CPU bar styles. (.timeline-cpu-bars-label): Ditto. 2012-07-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122681. http://trac.webkit.org/changeset/122681 https://bugs.webkit.org/show_bug.cgi?id=91363 Patch introduces crashes in debug builds for GTK and EFL ports (Requested by zdobersek on #webkit). * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollPositionChanged): 2012-07-16 Luke Macpherson <macpherson@chromium.org> Compilation failure in StyleResolver.cpp (clang) https://bugs.webkit.org/show_bug.cgi?id=89892 Reviewed by Ryosuke Niwa. Patch adds assertions that unreachable code is in fact not reached. Covered by fast/css/variables tests. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-07-15 Mike Lawther <mikelawther@chromium.org> Fix calculation of rgba's alpha in CSS custom text https://bugs.webkit.org/show_bug.cgi?id=91355 Reviewed by Ryosuke Niwa. Alpha values are stored as an 8 bit value. To convert this to a float in the range [0,1], we need to divide by 255, not 256. Test: fast/css/rgba-custom-text.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::customCssText): 2012-07-15 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived. https://bugs.webkit.org/show_bug.cgi?id=90962 Reviewed by Rob Buis. We start a new NetworkJob with credentials after receiving 401/407 status. We should not release resources in webcore when the old job is closed because they are needed by the new one. We should do as 3XX. No new tests. No change in behaviour. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::notifyAuthReceived): (WebCore::NetworkJob::shouldReleaseClientResource): (WebCore::NetworkJob::handleRedirect): * platform/network/blackberry/NetworkJob.h: (NetworkJob): 2012-07-15 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r122660): Cannot iterate over HTMLCollection that contains non-child descendent nodes in some conditions https://bugs.webkit.org/show_bug.cgi?id=91334 Reviewed by Ojan Vafai. The bug was caused by using lastChild() as the starting node for traversePreviousNode. Since it's the inverse of Node::traverseNextNode(), which visits nodes in pre order, we must start our search from the last descendent node, which is visited traverseNextNode immediately before reaching the root node. Test: fast/dom/htmlcollection-backwards-subtree-iteration.html * html/HTMLCollection.cpp: (WebCore::lastDescendent): (WebCore): (WebCore::itemBeforeOrAfter): 2012-07-15 Joseph Pecoraro <pecoraro@apple.com> Windowless WebView not firing JavaScript load event if there is a media element https://bugs.webkit.org/show_bug.cgi?id=91331 Reviewed by Eric Carlson. In prepareForLoad we start deferring the load event. If we fall into this clause where the page can not start loading media we bail, potentially indefinitely waiting until we can start loading media. Since we can not be certain this will ever happen, we should stop deferring the page's load event. Test: WebKit1.WindowlessWebViewWithMedia TestWebKitAPI test. The only way this path was reachable right now is on the mac port. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): 2012-07-15 Dan Bernstein <mitz@apple.com> <rdar://problem/11875795> REGRESSION (tiled drawing): Page’s scroll bars flash with each character you type in a textarea (affects Wikipedia and YouTube) https://bugs.webkit.org/show_bug.cgi?id=91348 Reviewed by Anders Carlsson. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollPositionChanged): Added an early return if the scroll position did not, in fact, change. This avoids the call to ScrollAnimator::notifyContentAreaScrolled, which is what causes the scroll bars to flash. 2012-07-14 Eric Carlson <eric.carlson@apple.com> Enable AVCF hardware video decoding https://bugs.webkit.org/show_bug.cgi?id=90015 <rdar://problem/10770317> Reviewed by Anders Carlsson. * html/HTMLMediaElement.cpp: (WebCore): (WebCore::HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter): New, return the client's graphics device adapter. * html/HTMLMediaElement.h: * page/ChromeClient.h: (WebCore::ChromeClient::graphicsDeviceAdapter): New. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::graphicsDeviceAdapter): New, ask the media element for the graphics device adapter. * platform/graphics/MediaPlayer.h: * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Soft-link AVCFPlayerSetDirect3DDevice and AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Pass the current d3d9 device interface to the AVFWrapper. (WebCore::AVFWrapper::createAssetForURL): If the d3d9 device implements IDirect3DDevice9Ex, tell the AVAsset to enable hardware video decoding. (WebCore::AVFWrapper::createPlayer): Pass the d3d9 device to the player if it implements IDirect3DDevice9Ex. * platform/graphics/ca/win/CACFLayerTreeHost.h: (WebCore::CACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation. * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: (WebCore::LegacyCACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation. * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: (WebCore::WKCACFViewLayerTreeHost::graphicsDeviceAdapter): New. * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: * platform/win/SoftLinking.h: Define SOFT_LINK_DLL_IMPORT_OPTIONAL, SOFT_LINK_LOADED_LIBRARY, and SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL. 2012-07-14 Ryosuke Niwa <rniwa@webkit.org> Fix Chromium Mac build failure after r122670. * platform/graphics/mac/ComplexTextController.cpp: 2012-07-14 Mark Rowe <mrowe@apple.com> Fix the Snow Leopard build. * platform/LocalizedStrings.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Fix a typo in the condition so that Snow Leopard continues to take the expected path. 2012-07-14 Ryosuke Niwa <rniwa@webkit.org> Accessing the last item in children should be a constant time operation https://bugs.webkit.org/show_bug.cgi?id=91320 Reviewed by Ojan Vafai. Traverse nodes from the last item when the target offset we're looking for is closer to the last item than to the cached item. e.g. if the cached item was at offset 0 in the collection and length was 100, we should not be looking for the item at offset 95 from the cached item. Note that this trick can be only used in HTML collection that supports itemBefore and when the length cache is available. Also broke shouldSearchFromFirstItem into smaller logical pieces to clarify the intents. Test: perf/htmlcollection-last-item.html * html/HTMLCollection.cpp: (WebCore): (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem): (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem): (WebCore::HTMLCollection::item): * html/HTMLCollection.h: (HTMLCollection): 2012-07-14 Mark Rowe <mrowe@apple.com> Fix the Windows build. * platform/network/cf/DNSCFNet.cpp: Fix the condition to take Windows in to account. 2012-07-14 Mark Rowe <mrowe@apple.com> Make it explicit which code paths iOS should use when doing checks based on OS X versions. Rubber-stamped by David Kilzer. * WebCore.exp.in: * accessibility/AccessibilityList.h: * accessibility/AccessibilityTable.h: * accessibility/mac/AXObjectCacheMac.mm: * editing/mac/EditorMac.mm: * loader/MainResourceLoader.cpp: * loader/MainResourceLoader.h: * page/AlternativeTextClient.h: * page/mac/SettingsMac.mm: * platform/LocalizedStrings.cpp: * platform/MemoryPressureHandler.cpp: * platform/audio/mac/AudioBusMac.mm: * platform/graphics/Gradient.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/ca/GraphicsLayerCA.cpp: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: * platform/graphics/ca/mac/TileCache.mm: * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/ImageBufferCG.cpp: * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/cg/ImageCG.cpp: * platform/graphics/cg/ImageSourceCG.cpp: * platform/graphics/cocoa/FontPlatformDataCocoa.mm: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/ComplexTextControllerCoreText.mm: * platform/graphics/mac/FontCacheMac.mm: * platform/graphics/mac/FontCustomPlatformData.cpp: * platform/graphics/mac/FontMac.mm: * platform/graphics/mac/GraphicsContextMac.mm: * platform/graphics/mac/SimpleFontDataMac.mm: * platform/graphics/mac/WebLayer.h: * platform/graphics/mac/WebLayer.mm: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/mac/DisplaySleepDisabler.cpp: * platform/mac/DisplaySleepDisabler.h: * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/MemoryPressureHandlerMac.mm: * platform/mac/SharedTimerMac.mm: * platform/mac/SuddenTermination.mm: * platform/mac/WebFontCache.mm: * platform/network/Credential.h: * platform/network/ResourceHandle.h: * platform/network/cf/DNSCFNet.cpp: * platform/network/cf/ProxyServerCFNet.cpp: * platform/network/cf/ResourceRequest.h: * platform/network/cf/SocketStreamHandleCFNet.cpp: * platform/network/mac/AuthenticationMac.mm: * platform/network/mac/CookieStorageMac.mm: * platform/network/mac/ResourceHandleMac.mm: * platform/network/mac/ResourceRequestMac.mm: * platform/network/mac/WebCoreURLResponse.mm: * platform/text/TextChecking.h: * platform/text/cf/HyphenationCF.cpp: * platform/text/mac/HyphenationMac.mm: * rendering/RenderLayerBacking.cpp: * rendering/RenderLayerCompositor.cpp: 2012-07-14 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122614. http://trac.webkit.org/changeset/122614 https://bugs.webkit.org/show_bug.cgi?id=91317 Broke performance tests (Requested by rniwa on #webkit). * bindings/v8/V8Binding.cpp: (WebCore::StringCache::v8ExternalStringSlow): 2012-07-05 Robert Hogan <robert@webkit.org> CSS 2.1 failure: vertical-align-boxes-001 fails https://bugs.webkit.org/show_bug.cgi?id=90626 Reviewed by Eric Seidel. Tests: css2.1/20110323/vertical-align-boxes-001.htm A percentage value vertical-align is always a percentage of the actual line-height rather than the margin box per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align: 'Percentages: refer to the 'line-height' of the element itself'. Confusingly, RenderBox::lineheight() is a shorthand into the dimensions of the margin box for replaced elements in the other vertical-align cases, i.e. where it's the margin box that's relevant rather than the 'line-height'. So rather than patch RenderBox's lineHeight() to somehow consider the percentage cases, just give percentage vertical-align the full computedLineHeight() rather than lineHeight()'s margin box. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::verticalPositionForBox): 2012-07-13 Ryosuke Niwa <rniwa@webkit.org> Iterating backwards over HTMLCollection is O(n^2) https://bugs.webkit.org/show_bug.cgi?id=91306 Reviewed by Anders Carlsson. Fixed the bug by introducing itemBefore that iterates nodes backwards to complement itemAfter. Unfortunately, some HTML collections such as HTMLFormCollection and HTMLTableRowsCollection have its own itemAfter function and writing an equivalent itemBefore is somewhat tricky. For now, added a new boolean flag indicating whether a given HTML collection supports itemBefore or not, and left those HTML collections that override itemAfter alone. This also paves our way to share more code between DynamicNodeList and HTMLCollection. Test: perf/htmlcollection-backwards-iteration.html * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes ItemBeforeSupportType. (WebCore::DynamicNodeListCacheBase::supportsItemBefore): Added. (DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::setItemCache): Replaced a FIXME by an assertion now that we can. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::HTMLAllCollection): Supports itemBefore since it doesn't override itemAfter. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): (WebCore::isAcceptableElement): Made it a static local function instead of a static member. (WebCore::nextNode): Templatized. (WebCore::itemBeforeOrAfter): Extracted from itemAfter and templatized. (WebCore::HTMLCollection::itemBefore): Added. (WebCore::HTMLCollection::itemAfter): (WebCore::HTMLCollection::shouldSearchFromFirstItem): Added. Determines whether we should reset the item cache to the first item. We obviously do if the cache is invalid. If the target offset is after the cached offset, then we shouldn't go back regardless of availability of itemBefore. Otherwise, we go back to the first item iff itemBefore is not available or the distance from the cached offset to the target offset is greater than the target offset itself. (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): Use the term "offset" to match the terminology elsewhere. (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem): Ditto. Also added the logic to iterate nodes backwards using itemBefore. Once we're in this branch, we should always find a matching item since the target offset was less than the cached offset, and offsets are non-negative. If we had ever reached the end of the loop without finding an item, it indicates that the cache has been invalid and we have some serious bug elsewhere. * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Supports itemBefore since it doesn't override itemAfter. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): Doesn't support itemBefore as it overrides itemAfter. * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto. * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): 2012-07-13 Eric Penner <epenner@google.com> [chromium] Add 'self-managed' option to CCPrioritizedTexture to enable render-surface and canvas use cases. https://bugs.webkit.org/show_bug.cgi?id=91177 Reviewed by Adrienne Walker. This makes the render-surface memory use case generic as 'self-managed' textures, as this use case is popping up in other places (eg. canvases). It's exactly the same idea except we can have as many place-holders as we want at arbitrary priorities. This already tested by the render surface unit tests which now also use the generic placeholder. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::setPrioritiesForSurfaces): (WebCore): (WebCore::CCLayerTreeHost::setPrioritiesForLayers): (WebCore::CCLayerTreeHost::prioritizeTextures): (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: (WebCore::CCPrioritizedTexture::CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder): * platform/graphics/chromium/cc/CCPrioritizedTexture.h: (CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::setIsSelfManaged): (WebCore::CCPrioritizedTexture::isSelfManaged): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::prioritizeTextures): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::destroyBacking): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::memoryForSelfManagedTextures): 2012-07-13 Kent Tamura <tkent@chromium.org> Internals: Clean up the mock PagePopupDriver correctly. https://bugs.webkit.org/show_bug.cgi?id=91250 Unreviewed, a trivial testing code fix. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::reset): Resetting PaePopupDriver here instead of Backup::restoreTo. Also, close the mock popup before resetting PagePopupDriver by clearing m_pagePopupDriver. * testing/MockPagePopupDriver.cpp: (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Close the popup. 2012-07-13 Tony Payne <tpayne@chromium.org> Remove Widget from screenColorProfile https://bugs.webkit.org/show_bug.cgi?id=91300 Reviewed by Adam Barth. Chromium, the only platform implementing screenColorProfile, does not need the Widget, so removing for simplicity. Covered by existing tests. * platform/PlatformScreen.h: (WebCore): Updated comment to remove reference to type param that no longer exists and removed Widget param. * platform/blackberry/PlatformScreenBlackBerry.cpp: (WebCore::screenColorProfile): Removed widget param. * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenColorProfile): Removed widget param. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenColorProfile): Removed widget param. * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenColorProfile): Removed widget param. * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to match screenColorProfile()'s new spec. * platform/mac/PlatformScreenMac.mm: (WebCore::screenColorProfile): Removed widget param. * platform/qt/PlatformScreenQt.cpp: (WebCore::screenColorProfile): Removed widget param. * platform/win/PlatformScreenWin.cpp: (WebCore::screenColorProfile): Removed widget param. 2012-07-13 Brian Anderson <brianderson@chromium.org> [chromium] Add flushes to CCTextureUpdater::update https://bugs.webkit.org/show_bug.cgi?id=89035 Reviewed by Adrienne Walker. Automatic flushes are being removed from the command buffer, so this moves the flushes into the CCTextureUpdater itself. CCTextureUpdaterTest added to verify texture upload/flushing patterns. * platform/graphics/chromium/cc/CCGraphicsContext.h: (WebCore::CCGraphicsContext::flush): (CCGraphicsContext): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore): (WebCore::CCTextureUpdater::update): Manual flushes added here. 2012-07-13 Kiran Muppala <cmuppala@apple.com> REGRESSION: RenderInline boundingBox ignores relative position offset https://bugs.webkit.org/show_bug.cgi?id=91168 Reviewed by Simon Fraser. RenderGeometryMap, used for caching the transform to the view, expects the first mapping pushed, to be that of the view itself. RenderInline was instead pushing it's own offset first. Besides the offset of the view itself was not being pushed. Relaxed the RenderGeometryMap restriction that the first pushed step should be of the view. It is sufficient that the view's mapping is pushed in the first call to pushMappingsToAncestor. Modified RenderInline to push the offset of the view also to the geometry map. Test: fast/inline/inline-relative-offset-boundingbox.html * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to check if mapping to view was pushed in first invocation. (WebCore::RenderGeometryMap::pushView): Correct assertion that checks if the view's mapping is the first one to be applied. (WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if a mapping step belongs to a view instead of using mapping size. (WebCore::RenderGeometryMap::stepRemoved): Ditto. * rendering/RenderInline.cpp: (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext): Push mappings all the way up to and including the view. 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org> Move WebCore/platform/text/Base64 to WTF/wtf/text https://bugs.webkit.org/show_bug.cgi?id=91162 Reviewed by Adam Barth. No new tests. Files moving only. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/websockets/WebSocketHandshake.cpp: (WebCore::generateSecWebSocketKey): (WebCore::WebSocketHandshake::getExpectedWebSocketAccept): * Target.pri: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * inspector/InspectorFileSystemAgent.cpp: (WebCore): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): (WebCore::InspectorPageAgent::sharedBufferContent): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::generateMHTMLData): * loader/archive/mhtml/MHTMLParser.cpp: (WebCore::MHTMLParser::parseNextPart): * page/DOMWindow.cpp: (WebCore::DOMWindow::btoa): (WebCore::DOMWindow::atob): * page/Page.cpp: (WebCore::Page::userStyleSheetLocationChanged): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL): * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::toDataURL): (WebCore::ImageDataToDataURL): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): * platform/graphics/wince/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): * platform/graphics/wince/ImageBufferWinCE.cpp: * platform/graphics/wx/ImageBufferWx.cpp: * platform/network/DataURL.cpp: (WebCore::handleDataURL): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::applyBasicAuthorizationHeader): * platform/network/mac/ResourceHandleMac.mm: (WebCore::applyBasicAuthorizationHeader): * platform/network/soup/ResourceHandleSoup.cpp: * platform/win/SSLKeyGeneratorWin.cpp: (WebCore::WebCore::signedPublicKeyAndChallengeString): 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org> [Chromium] Sometimes bottom of text is truncated when page has a fractional scale https://bugs.webkit.org/show_bug.cgi?id=88684 Reviewed by Tony Chang. When the page has a fractional scale, the ascent and descent part of the fonts might be fractional. If the descent part is rounded down, the bottom of the text might be truncated when displayed when subpixel text positioning is enabled. To avoid that, borrow one unit from the ascent when possible. Test: fast/text/descent-clip-in-scaled-page.html * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference. (WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint) * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): (WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles. * platform/graphics/skia/SimpleFontDataSkia.cpp: (WebCore::SimpleFontData::platformInit): 2012-07-13 Ryosuke Niwa <rniwa@webkit.org> Remove an assertion after r122637. * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): 2012-07-13 Pierre Rossi <pierre.rossi@gmail.com> [Qt] Improve the mobile theme slightly https://bugs.webkit.org/show_bug.cgi?id=90806 Reviewed by Kenneth Rohde Christiansen. Improve drawing of the mobile theme's controls' background. Ensure the focus ring never appears with the mobile theme, since it looks bad in combination with the highlights. No new tests. The painting code from the mobile theme is still not covered specifically (it will when we revive pixel tests). * platform/qt/RenderThemeQtMobile.cpp: (WebCore): (WebCore::addPointToOctants): Added. This is simply a helper to avoid doing too much duplicate work in drawControlBackground. (WebCore::drawControlBackground): Rely on the octant logic added above and take the opportunity to increase the granularity. (WebCore::borderPen): (WebCore::StylePainterMobile::findLineEdit): (WebCore::RenderThemeQtMobile::adjustTextFieldStyle): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): (WebCore::RenderThemeQtMobile::supportsFocusRing): 2012-07-13 Julien Chaffraix <jchaffraix@webkit.org> Remove an always-failing table-wrapping check in RenderObject::addChild https://bugs.webkit.org/show_bug.cgi?id=91286 Reviewed by Eric Seidel. Due to the structure of the code, this test is always failing (newChild->isTableCell() is true to get in the branch). The changeset adding the code didn't add testing so I poundered adding the mentioned test, which is passing. However the test would need to be blindly changed to be included in our test harness. I would also expect this code to be exercised by other table tests anyway. * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): Removed never-reached branch. While at it, removed a 'what' comment in the same file. 2012-07-13 Emil A Eklund <eae@chromium.org> Use LayoutBoxExtent for image outsets https://bugs.webkit.org/show_bug.cgi?id=91166 Reviewed by Tony Chang. Change RenderStyle and calling code to use LayoutBoxExtent for image outsets and remove text direction and writing mode versions of the outline getters from RenderStyle as LayoutBoxExtent provides the same functionality. No new tests, no change in functionality. * platform/graphics/FractionalLayoutBoxExtent.h: * platform/graphics/FractionalLayoutBoxExtent.cpp: (WebCore::FractionalLayoutBoxExtent::logicalTop): (WebCore::FractionalLayoutBoxExtent::logicalBottom): Add logicalTop and logicalBottom methods to go with the existing logicalLeft and logicalRight ones. * platform/graphics/FractionalLayoutRect.h: (WebCore::FractionalLayoutRect::expand): Add FractionalLayoutBoxExtent version of expand method. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): Change implementation to use the new FractionalLayoutBoxExtent version of borderImageOutsets and the logicalTop/Bottom/Left/Right methods. (WebCore::clipRectForNinePieceImageStrip): Change implementation to use the new FractionalLayoutBoxExtent version of borderImageOutsets. * rendering/RenderBox.cpp: (WebCore::RenderBox::maskClipRect): Change implementation to use the new FractionalLayoutBoxExtent version of borderImageOutsets and the new FractionalLayoutRect::expand method. (WebCore::RenderBox::addVisualEffectOverflow): Change implementation to use the new FractionalLayoutBoxExtent version of borderImageOutsets. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): Change implementation to use the new FractionalLayoutBoxExtent version of borderImageOutsets and the new FractionalLayoutRect::expand method. * rendering/style/RenderStyle.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::imageOutsets): Change getImageOutsets to return a FractionalLayoutBoxExtent object and rename to imageOutsets to match the webkit naming convention for getters. Remove getBorderImageHorizontalOutsets, getBorderImageVerticalOutsets, getBorderImageInlineDirectionOutsets, getImageHorizontalOutsets, getImageVerticalOutsets and getBorderImageBlockDirectionOutsets methods as the same functionality is provided by FractionalLayoutBoxExtent. 2012-07-13 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=91278 Improve block margin estimation function to account for not having a layout and for quirks mode Reviewed by Simon Fraser. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::marginBeforeEstimateForChild): Revise marginBeforeEstimateForChild so that it computes block margins for the grandchild before recurring. This includes the quirks margin information as well. This ensures that the margins are up-to-date when checked, even before the object has had its first layout. * rendering/RenderBlock.h: (WebCore::RenderBlock::setMarginStartForChild): (WebCore::RenderBlock::setMarginEndForChild): (WebCore::RenderBlock::setMarginBeforeForChild): (WebCore::RenderBlock::setMarginAfterForChild): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeBlockDirectionMargins): * rendering/RenderBox.h: (RenderBox): Add consts in order to compile. 2012-07-13 Ryosuke Niwa <rniwa@webkit.org> NodeLists should not invalidate on irreleavnt attribute changes https://bugs.webkit.org/show_bug.cgi?id=91277 Reviewed by Ojan Vafai. Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change. Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged as invalidateNodeListCachesInAncestors since they're almost identical after r122498. In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h. * dom/Attr.cpp: (WebCore::Attr::setValue): (WebCore::Attr::childrenChanged): * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): * dom/Document.cpp: (WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing the value of NodeListRootType in order to prepare for the bug 80269. (WebCore::Document::unregisterNodeListCache): Ditto. (WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h (WebCore::Document::shouldInvalidateNodeListCaches): * dom/DynamicNodeList.h: (DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp. * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/ElementRareData.h: (WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange. * dom/Node.cpp: (WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches. (WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of node lists via shouldInvalidateTypeOnAttributeChange. (WebCore): * dom/Node.h: (Node): * dom/NodeRareData.h: (WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists. (WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp. (NodeRareData): * html/HTMLCollection.h: (HTMLCollectionCacheBase): 2012-07-13 Arpita Bahuguna <arpitabahuguna@gmail.com> Refactor RenderTable to use the section's iteration functions. https://bugs.webkit.org/show_bug.cgi?id=89751 Reviewed by Julien Chaffraix. Removing anti-pattern wherever possible from RenderTable code. Also, modifying RenderTable sections' iterations to use helper functions. No new tests required for this change since no change in behavior is expected. * rendering/RenderTable.cpp: (WebCore::RenderTable::addOverflowFromChildren): (WebCore::RenderTable::setCellLogicalWidths): (WebCore::RenderTable::outerBorderStart): (WebCore::RenderTable::outerBorderEnd): Removed anti-patterns involving iterations over RenderObjects. (WebCore::RenderTable::outerBorderAfter): Modified RenderTable sections' iteration to use helper functions. 2012-07-13 Enrica Casucci <enrica@apple.com> Threadsafety issues in WebScriptObject https://bugs.webkit.org/show_bug.cgi?id=90849 Reviewed by Geoff Garen. Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject. * bindings/objc/WebScriptObject.mm: (-[WebScriptObject JSObject]): 2012-07-13 Raymond Toy <rtoy@google.com> DelayNode doesn't work if delayTime.value == delayTime.maxValue https://bugs.webkit.org/show_bug.cgi?id=90357 Reviewed by Kenneth Russell. Increase delay buffer size slightly so that the read and write pointers don't become equal when the delay and the max delay are the same. Tests: webaudio/delaynode-max-default-delay.html webaudio/delaynode-max-nondefault-delay.html * Modules/webaudio/DelayDSPKernel.cpp: (WebCore): Moved SmoothingTimeConstant to WebCore namespace. (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length. (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length. * Modules/webaudio/DelayDSPKernel.h: (DelayDSPKernel): Declare bufferLengthForDelay. 2012-07-13 Benjamin Poulain <bpoulain@apple.com> Always aggressively preload on iOS https://bugs.webkit.org/show_bug.cgi?id=91276 Reviewed by Simon Fraser. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::preload): 2012-07-13 Vineet Chaudhary <rgf748@motorola.com> Restructure V8Utilities::extractTransferables() with help of toV8Sequence() https://bugs.webkit.org/show_bug.cgi?id=91208 Reviewed by Kentaro Hara. We can remove the specialised check for MessagePort from V8Utilities::extractTransferables() using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec. No new test as just refactoring. Existing tests under fast/dom/Window/window-* fast/dom/events/* covers tests. * bindings/v8/V8Utilities.cpp: (WebCore::extractTransferables): 2012-07-13 Vincent Scheib <scheib@chromium.org> Pointer Lock handles disconnected DOM elements https://bugs.webkit.org/show_bug.cgi?id=77029 Reviewed by Adrienne Walker. Pointer Lock Controller now checks when elements or documents are removed, and unlocks if the target element is being removed. Tests: pointer-lock/locked-element-iframe-removed-from-dom.html pointer-lock/locked-element-removed-from-dom.html * dom/Document.cpp: (WebCore::Document::detach): * dom/Element.cpp: (WebCore::Element::removedFrom): (WebCore::Element::webkitRequestPointerLock): * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::elementRemoved): (WebCore): (WebCore::PointerLockController::documentDetached): (WebCore::PointerLockController::didLosePointerLock): (WebCore::PointerLockController::enqueueEvent): * page/PointerLockController.h: (WebCore): (PointerLockController): 2012-07-13 Ryosuke Niwa <rniwa@webkit.org> HTMLCollection should use DynamicNodeList's invalidation model https://bugs.webkit.org/show_bug.cgi?id=90326 Reviewed by Anders Carlsson. Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is normally used for node lists owned by a non-Document node that contains nodes outside of its subtree. ItemProperties and FormControls are more "traditional" users of the mechanism. Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache. * dom/Document.cpp: (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or NodeListRootType since they can be obtained from the cache base. Increment the node list counter for InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be invalidated on id or name content attribute changes due to named getters. (WebCore::Document::unregisterNodeListCache): Ditto. (WebCore::shouldInvalidateNodeListForType): (WebCore::Document::shouldInvalidateNodeListCaches): (WebCore::Document::clearNodeListCaches): * dom/Document.h: (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange. (Document): * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList and HTMLCollection. We can't afford to use virtual function calls here because this function is called on all node lists and HTML collections owned by ancestors of an element under which a node is added, removed, or its attributes are changed. (WebCore): * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic. (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9 invalidation types. (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::clearHTMLCollectionCaches): Added. (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope. * dom/Node.cpp: (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as node list caches. (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto. * dom/NodeRareData.h: (WebCore::NodeListsNodeData::adoptTreeScope): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as NodeRareData's. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection as if rooted at document for convenience. (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires invalidation on id and name content attribute changes, which is taken care by the special logic in Document::registerNodeListCache, exclude those two attributes from consideration. (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache. (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache. (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used. (HTMLCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLOptionsCollection.h: (HTMLOptionsCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::updateNameCache): * html/HTMLPropertiesCollection.h: (WebCore::HTMLPropertiesCollection::invalidateCache): 2012-07-13 Shawn Singh <shawnsingh@chromium.org> [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp https://bugs.webkit.org/show_bug.cgi?id=91260 Reviewed by Adrienne Walker. ASSERT(!clipped) was being triggered after skinny almost-degenerate quads went through anti-aliasing inflation, and then were being transformed back from device space to local space. It turns out this assertion is too aggressive, and we don't yet have an obvious need to change the behavior on the clipped==true case. No new tests needed, this patch fixes only comments and debug code. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): fixed a comment. (WebCore::LayerRendererChromium::drawTileQuad): fixed a similar comment, removed unnecessary assertion. 2012-07-13 Philip Rogers <pdr@google.com> Remove assert in localCoordinateSpaceTransform() https://bugs.webkit.org/show_bug.cgi?id=91189 Reviewed by Nikolas Zimmermann. The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting to override the method but it is better to simply return the identity matrix. This scenario can occur when we break the SVG content model, such as asking for the CTM of a <g> element inside a <tspan>. This is undefined in the spec because tspan is not a subclass of SVGLocatable but both Firefox and Opera implement this by returning the identity matrix. Test: svg/custom/invalid-ctm.svg * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::localCoordinateSpaceTransform): 2012-07-13 Kentaro Hara <haraken@chromium.org> [V8] String wrappers should be marked Independent https://bugs.webkit.org/show_bug.cgi?id=91251 Reviewed by Adam Barth. Currently V8 String wrappers are not marked Independent. By marking them Independent, they can be reclaimed by the scavenger GC. I tried to find some cases where this change reduces memory usage, but couldn't due to sensitive behavior of GC. No tests. No change in behavior. * bindings/v8/V8Binding.cpp: (WebCore::StringCache::v8ExternalStringSlow): 2012-07-13 Peter Beverloo <peter@chromium.org> [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing https://bugs.webkit.org/show_bug.cgi?id=91240 Reviewed by Adam Barth. Disable the v8 internationalization API for Chromium Android, as it's disabled and not always available in checkouts. Furthermore, disable strict aliasing for the webkit_remaining target, similar to what x11-based builds are doing (see the webcore_prerequisites target). * WebCore.gyp/WebCore.gyp: 2012-07-13 Kentaro Hara <haraken@chromium.org> [CallWith=XXX] arguments should be placed at the head of method arguments https://bugs.webkit.org/show_bug.cgi?id=91217 Reviewed by Adam Barth. The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error, because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*) but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185). Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.) Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry() so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order. Test: bindings/scripts/test/TestObj.idl * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments. (DataTransferItemFileSystem): * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto. (WebCore::HTMLInputElementFileSystem::webkitEntries): * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto. (HTMLInputElementFileSystem): * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto. (WebCore::DataTransferItemFileSystem::webkitGetAsEntry): * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order. (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallString): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results. (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): 2012-07-13 Mary Wu <mary.wu@torchmobile.com.cn> [BlackBerry] Some small changes in network code https://bugs.webkit.org/show_bug.cgi?id=90974 Reviewed by Rob Buis. 1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that its wrapped stream can also query the stream result. 2. pass download attribute to NetworkRequest. RIM PR# 171555 Reviewed internally by Lyon Chen and Joe Mason. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyClose): * platform/network/blackberry/NetworkJob.h: (WebCore::NetworkJob::status): * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::platformTargetTypeForRequest): * platform/network/blackberry/SocketStreamHandle.h: (WebCore::SocketStreamHandle::status): (SocketStreamHandle): * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp: (WebCore::SocketStreamHandle::notifyStatusReceived): (WebCore::SocketStreamHandle::notifyClose): 2012-07-13 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Remove uiSourceCode from Resource. https://bugs.webkit.org/show_bug.cgi?id=91201 Reviewed by Pavel Feldman. Removed Resource._uiSourceCode field as it is not used anymore. * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.isHidden): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): 2012-07-13 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122450 and r122580. http://trac.webkit.org/changeset/122450 http://trac.webkit.org/changeset/122580 https://bugs.webkit.org/show_bug.cgi?id=91263 Caused multiple regressions on ClusterFuzz (Requested by inferno-sec on #webkit). * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8DOMMap.h: * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet): * css/StylePropertySet.cpp: * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.cpp: (WebCore::Element::detachAttribute): (WebCore::Element::removeAttribute): (WebCore::Element::attributes): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributes): (WebCore::Element::hasEquivalentAttributes): (WebCore::Element::createAttributeData): (WebCore): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::normalizeAttributes): (WebCore::Element::cloneAttributesFromElement): * dom/Element.h: (WebCore::Element::attributeData): (Element): (WebCore::Element::reportMemoryUsage): (WebCore::Element::ensureAttributeData): (WebCore::Element::updatedAttributeData): (WebCore::Element::ensureUpdatedAttributeData): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::attrIfExists): (WebCore::ElementAttributeData::ensureAttr): (WebCore::ElementAttributeData::setAttr): (WebCore::ElementAttributeData::removeAttr): (WebCore::ElementAttributeData::setClass): (WebCore): (WebCore::ElementAttributeData::ensureInlineStyle): (WebCore::ElementAttributeData::ensureMutableInlineStyle): (WebCore::ElementAttributeData::destroyInlineStyle): (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::isEquivalent): (WebCore::ElementAttributeData::detachAttrObjectsFromElement): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::cloneDataFrom): (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::create): (ElementAttributeData): (WebCore::ElementAttributeData::setIdForStyleResolution): (WebCore::ElementAttributeData::setAttributeStyle): (WebCore::ElementAttributeData::length): (WebCore::ElementAttributeData::isEmpty): (WebCore::ElementAttributeData::attributeItem): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::reportMemoryUsage): (WebCore::ElementAttributeData::ElementAttributeData): (WebCore::ElementAttributeData::attributeVector): (WebCore::ElementAttributeData::clonedAttributeVector): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::getAttributeItemIndex): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (MemoryObjectInfo): (WebCore::MemoryObjectInfo::reportInstrumentedPointer): (WebCore::MemoryObjectInfo::reportPointer): (WebCore::MemoryObjectInfo::reportInstrumentedObject): (WebCore::MemoryObjectInfo::reportObject): (WebCore::MemoryObjectInfo::reportObjectInfo): (WebCore::MemoryObjectInfo::reportHashMap): (WebCore::MemoryObjectInfo::reportHashSet): (WebCore::MemoryObjectInfo::reportListHashSet): (WebCore::MemoryObjectInfo::reportVector): (WebCore::MemoryObjectInfo::reportString): (WebCore::MemoryObjectInfo::objectType): (WebCore::MemoryObjectInfo::objectSize): (WebCore::MemoryObjectInfo::memoryInstrumentation): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * dom/StyledElement.cpp: (WebCore::StyledElement::style): (WebCore::StyledElement::classAttributeChanged): (WebCore::StyledElement::setInlineStyleProperty): (WebCore::StyledElement::removeInlineStyleProperty): (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (WebCore::StyledElement::ensureInlineStyle): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2012-07-13 Huang Dongsung <luxtella@company100.net> Remove down-casting to BitmapImage in GraphicsContext::drawImage. https://bugs.webkit.org/show_bug.cgi?id=90755 Reviewed by Simon Fraser. Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as the last argument for CG. Then we can remove the conditional down-casting in GraphicsContext::drawImage. This change is needed for parallel image decoders. Because parallel image decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the down-casting above causes the loss of RespectImageOrientationEnum which must be passed to BitmapImage. No new tests, no behavior change. * platform/graphics/BitmapImage.cpp: * platform/graphics/BitmapImage.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): * platform/graphics/Image.cpp: (WebCore::Image::draw): (WebCore): * platform/graphics/Image.h: (Image): 2012-07-13 Lauro Neto <lauro.neto@openbossa.org> Fix QtWebKit build with OpenGLES after GC3D/E3D refactor https://bugs.webkit.org/show_bug.cgi?id=91156 Reviewed by Noam Rosenthal. Adds several build fixes. * platform/graphics/GraphicsContext3D.h: Use E3DOpenGLES instead of previously removed E3DQt. * platform/graphics/OpenGLESShims.h: Enable defines for Qt. * platform/graphics/opengl/Extensions3DOpenGLES.cpp: (WebCore::Extensions3DOpenGLES::blitFramebuffer): (WebCore): (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample): (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM): Added pure virtual stubs. (WebCore::Extensions3DOpenGLES::supportsExtension): Remove PROC suffix. See bug #91130. * platform/graphics/opengl/Extensions3DOpenGLES.h: (Extensions3DOpenGLES): Added pure virtual stubs. * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): Readded missing function after removed in r122250. (WebCore): Use PLATFORM(BLACKBERRY) guard around port-specific include. * platform/graphics/qt/GraphicsContext3DQt.cpp: Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions. 2012-07-13 Keishi Hattori <keishi@webkit.org> Form of FormAssociatedElement is not updated when id target changes. https://bugs.webkit.org/show_bug.cgi?id=91042 Reviewed by Kent Tamura. Test: fast/forms/update-form-attribute-element.html This patch introduces the IdTargetObserver and IdTargetObserverRegistry class. They can be used to be notified when the element that an id is pointing to (the id target) changes. * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp} * GNUmakefile.list.am: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * dom/DOMAllInOne.cpp: * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this. (WebCore): (WebCore::IdTargetObserver::IdTargetObserver): (WebCore::IdTargetObserver::~IdTargetObserver): * dom/IdTargetObserver.h: Added. (WebCore): (IdTargetObserver): * dom/IdTargetObserverRegistry.cpp: Added. (WebCore): (WebCore::IdTargetObserverRegistry::create): (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target. (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing. (WebCore::IdTargetObserverRegistry::notifyObserversInternal): * dom/IdTargetObserverRegistry.h: Added. (WebCore): (IdTargetObserverRegistry): (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry): (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance. * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed. (WebCore::TreeScope::removeElementById): Ditto. * dom/TreeScope.h: (WebCore): (WebCore::TreeScope::idTargetObserverRegistry): (TreeScope): * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute. (WebCore::FormAssociatedElement::didMoveToNewDocument): (WebCore::FormAssociatedElement::insertedInto): (WebCore::FormAssociatedElement::removedFrom): (WebCore::FormAssociatedElement::formAttributeChanged): (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver. (WebCore): (WebCore::FormAssociatedElement::formAttributeTargetChanged): (WebCore::FormAttributeTargetObserver::create): (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver): (WebCore::FormAttributeTargetObserver::idTargetChanged): * html/FormAssociatedElement.h: (FormAssociatedElement): * html/FormController.cpp: * html/FormController.h: (FormController): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::removedFrom): (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It scans the range and returns the index to insert the element in m_associatedElement. (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in m_associatedElement that precede and follow the form element. * html/HTMLFormElement.h: (HTMLFormElement): 2012-07-13 Gabor Rapcsanyi <rgabor@webkit.org> Optimizing blend filter to ARM-NEON with intrinsics https://bugs.webkit.org/show_bug.cgi?id=90949 Reviewed by Zoltan Herczeg. The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since we are able to calculate with 2 pixels (8 channels) at the same time. The code is written with NEON intrinsics and it doesn't affect the general - it has the same behaviour as the original algorithm. With this NEON optimization the calculation is ~4.5 times faster for each mode. Existing tests cover this issue. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::platformApplyGeneric): (WebCore): (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEBlend.h: (FEBlend): * platform/graphics/filters/arm/FEBlendNEON.h: Added. (WebCore): (FEBlendUtilitiesNEON): (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255 (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels (WebCore::FEBlend::platformApplyNEON): 2012-07-13 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo https://bugs.webkit.org/show_bug.cgi?id=91227 Reviewed by Pavel Feldman. void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const { MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM); info.visitBaseClass<ScriptWrappable>(this); info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference info.addInstrumentedMember(m_next); info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash); // NonClass value_type (report only size of internal template structures) info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof) info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet); // instrumented value_type (call visit) } The change is covered by existing tests for native memory snapshot. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8DOMMap.h: * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.h: (WebCore::Element::reportMemoryUsage): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryObjectInfo::objectType): (WebCore::MemoryObjectInfo::objectSize): (WebCore::MemoryObjectInfo::memoryInstrumentation): (MemoryObjectInfo): (WebCore::MemoryObjectInfo::reportObjectInfo): (WebCore): (MemoryClassInfo): (WebCore::MemoryClassInfo::MemoryClassInfo): (WebCore::MemoryClassInfo::visitBaseClass): (WebCore::MemoryClassInfo::reportInstrumentedPointer): (WebCore::MemoryClassInfo::reportInstrumentedObject): (WebCore::MemoryClassInfo::reportPointer): (WebCore::MemoryClassInfo::reportObject): (WebCore::MemoryClassInfo::reportHashMap): (WebCore::MemoryClassInfo::reportHashSet): (WebCore::MemoryClassInfo::reportListHashSet): (WebCore::MemoryClassInfo::reportVector): (WebCore::MemoryClassInfo::reportString): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): 2012-07-13 Pavel Feldman <pfeldman@chromium.org> Web Inspector: align scope filters https://bugs.webkit.org/show_bug.cgi?id=91213 Reviewed by Vsevolod Vlasov. * inspector/front-end/elementsPanel.css: (.crumbs): * inspector/front-end/inspector.css: (.status-bar > div): (.scope-bar): (.scope-bar li): (.scope-bar li.all): * inspector/front-end/networkLogView.css: 2012-07-13 Peter Rybin <peter.rybin@gmail.com> Web Inspector: too many hardcoded strings in InspectorBackendDispatcher. https://bugs.webkit.org/show_bug.cgi?id=89198 Reviewed by Yury Semikhatsky. Instead of generating error message string on every call (mostly for nothing), error message is generated deeper inside the handler and only command name is passed every time. * inspector/CodeGeneratorInspector.py: (Generator.process_command): 2012-07-13 Joshua Netterfield <jnetterfield@rim.com> [BlackBerry] Update about:* pages https://bugs.webkit.org/show_bug.cgi?id=91121 Reviewed by Yong Li. Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages. No new tests, because there is no new funtionality. * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages 2012-07-13 Olivier Blin <olivier.blin@softathome.com> Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings https://bugs.webkit.org/show_bug.cgi?id=91225 Reviewed by Steve Block. This issue comes from r105036 * bindings/js/JSDeviceOrientationEventCustom.cpp: (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent): 2012-07-13 Andrei Bucur <abucur@adobe.com> [CSS Regions] Fix build for bug 89000 https://bugs.webkit.org/show_bug.cgi?id=91215 Reviewed by Kentaro Hara. Remove the unused variable m_state that was a leftover from a previous version of the patch. Tests: No new tests, build fix. * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::WebKitNamedFlow): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): 2012-07-13 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Fix bugs in HarfBuzzShaper https://bugs.webkit.org/show_bug.cgi?id=90951 Reviewed by Tony Chang. The current implementation has following problems: - Cannot render RTL text if the TextRun is divided into more than two HarfBuzzRun. - Script handling in TextRun partitioning is incorrect. - Inaccurate calculation of selection rect. - Wrong rendering position when the first glyph of the TextRun have non-zero offsets in terms of HarfBuzz. To fix these problems I rewrote HarfBuzzShaper class. Here is the summary: - Divide the whole range of TextRun first, then shape them in visual order. - Divide TextRun in the same way of old-harfbuzz's hb_utf16_script_run_next(). - Prefer float than int when calculating selection. - Adjust the drawing point after shaping. Added tests covers the fix except for the last problem. The last problem will be covered by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches to use HarfBuzzShaper. Tests: fast/text/shaping/shaping-script-order.html fast/text/shaping/shaping-selection-rect.html * platform/graphics/harfbuzz/FontHarfBuzz.cpp: (WebCore::Font::drawComplexText): Adjusts point after shaping. * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun): (WebCore): (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added. (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed. (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance. (WebCore::normalizeCharacters): Added. (WebCore::HarfBuzzShaper::HarfBuzzShaper): (WebCore::HarfBuzzShaper::~HarfBuzzShaper): (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them. (WebCore::HarfBuzzShaper::adjustStartPoint): Added. (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added. (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added. (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes. (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection. * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables. (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto. (HarfBuzzRun): (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added. (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto. (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto. (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto. 2012-07-13 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r122545. http://trac.webkit.org/changeset/122545 https://bugs.webkit.org/show_bug.cgi?id=91185 We found that this was a wrong fix * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2012-07-13 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r122553. http://trac.webkit.org/changeset/122553 https://bugs.webkit.org/show_bug.cgi?id=91198 We found that this was a wrong fix * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2012-07-13 Kent Tamura <tkent@chromium.org> Change the timing of form state restore https://bugs.webkit.org/show_bug.cgi?id=89962 Reviewed by Hajime Morita. For a preparation to fix a form identification problem (Bug 91209), restore controls states when the parsing of their owner forms is completed. For controls without owners, their states are restored when their parsing is completed as ever. No new tests. This doesn't change observable behavior. * html/FormController.cpp: (WebCore::ownerFormForState): Added. This code was used in formKey(), and restoreControlState*() use it. (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change. (WebCore::FormController::restoreControlStateFor): Moved some code from HTMLFormControlElementWithState::finishParsingChildren(). The difference is we don't resotre state if this control is owned by a form. (WebCore::FormController::restoreControlStateIn): Restore states of associated controls. This is called from finishParsingChildren() for <form>. * html/FormController.h: (FormController): - Declare restoreControlStateFor() and restoreControlStateIn(). - Make takeStateForFormElement() private. * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::isFormControlElementWithState): Added. The default implementation returns false. * html/FormAssociatedElement.h: (FormAssociatedElement): Added isFormControlElementWithState() for FormController::restoreControlStateIn(). * html/HTMLFormControlElementWithState.cpp: (WebCore::HTMLFormControlElementWithState::finishParsingChildren): Some code was moved to FormController:restoreControlStateFor(). (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState): Added. Returns true. * html/HTMLFormControlElementWithState.h: (HTMLFormControlElementWithState): Declare isFormControlElementWithState(). * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::finishParsingChildren): Added. Calls FormController::restoreControlStateIn(). * html/HTMLFormElement.h: (HTMLFormElement): Declare finishParsingChildren(). 2012-07-13 Kent Tamura <tkent@chromium.org> Make calendar pickers testable https://bugs.webkit.org/show_bug.cgi?id=84827 Reviewed by Hajime Morita. WebCore: - Add PagePopupDriver, an interface to open/close a PagePopup. - Add setPagePopupDriver() to ChromeClient in order to inject a PagePopupDriver for testing. Internals: Add MockPagePopupDriver, which creates a MockPagePopup, which creates a normal <iframe> in the top-level document, and load the popup content on it. MockPagePopupDriver is enabled by internals.settings.setEnableMockPagePopup(true). Test: fast/forms/date/calendar-picker-appearance.html * WebCore.gypi: Add new files. * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable. * page/ChromeClient.h: (ChromeClient): Add function for PagePopupDriver. * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions. * page/PagePopupDriver.h: Added. (PagePopupDriver): (WebCore::PagePopupDriver::~PagePopupDriver): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver. (WebCore::InternalSettings::setEnableMockPagePopup): Register MockPagePopupDriver to ChromeClient. * testing/InternalSettings.h: (InternalSettings): Declare setEnableMockPagePopup(). * testing/InternalSettings.idl: ditto. * testing/MockPagePopupDriver.cpp: Added. (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>. (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added. (WebCore::MockPagePopupDriver::create): Added. (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added. (WebCore::MockPagePopupDriver::openPagePopup): Added. An override of PagePopupDriver function. This creates a MockPagePopup. (WebCore::MockPagePopupDriver::closePagePopup): Added. An override of PagePopupDriver function. This deletes the MockPagePopup. * testing/MockPagePopupDriver.h: (MockPagePopupDriver): Added. * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectPagePopupController): Added. Production code uses per-Page context feature framework. However MockPagePopup uses the same page as the host page. So we can't use the framework and need to inject window.pagePopupController manually. * testing/v8/WebCoreTestSupport.h: (WebCoreTestSupport): Add injectPagePopupController(). 2012-07-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: mute the native looks of the selects in the console. https://bugs.webkit.org/show_bug.cgi?id=91120 Reviewed by Vsevolod Vlasov. This is necessary for Mac now that we don't use border images for select. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.get statusBarItems): (WebInspector.ConsoleView.prototype.addContext): (WebInspector.ConsoleView.prototype.removeContext): (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector): (WebInspector.ConsoleView.prototype._appendIsolatedContextOption): (WebInspector.ConsoleView.prototype._currentEvaluationContext): (WebInspector.ConsoleView.prototype._currentIsolatedContextId): * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarComboBox): (WebInspector.StatusBarComboBox.prototype.addOption): (WebInspector.StatusBarComboBox.prototype.removeOption): (WebInspector.StatusBarComboBox.prototype.removeOptions): (WebInspector.StatusBarComboBox.prototype.selectedOption): * inspector/front-end/inspector.css: (.status-bar-select-container): (select.status-bar-item): (.console-context): 2012-07-13 Andrei Bucur <abucur@adobe.com> [CSS Regions] Fix the lifecycle for the flow objects and their renderers https://bugs.webkit.org/show_bug.cgi?id=89000 Reviewed by Eric Seidel. This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and the NULL flows are only cached, they should be destructible. Two named flows are considered to be equal if they have the same name. I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object. A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important so when they go back to the CREATED state, the listeners would still be there. Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/ Tests: The old tests have been modified to take into account the new behavior * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::~Document): (WebCore): (WebCore::Document::webkitGetFlowByName): (WebCore::Document::namedFlows): * dom/Document.h: (WebCore): (Document): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::WebKitNamedFlow): (WebCore::WebKitNamedFlow::~WebKitNamedFlow): (WebCore::WebKitNamedFlow::create): (WebCore): (WebCore::WebKitNamedFlow::name): (WebCore::WebKitNamedFlow::overset): (WebCore::nodeInFlowThread): (WebCore::WebKitNamedFlow::getRegionsByContentNode): (WebCore::WebKitNamedFlow::getContent): (WebCore::WebKitNamedFlow::setRenderer): * dom/WebKitNamedFlow.h: (WebCore): (WebKitNamedFlow): (WebCore::WebKitNamedFlow::getFlowState): (WebCore::WebKitNamedFlow::switchFlowState): * dom/WebKitNamedFlowCollection.cpp: Added. (WebCore): (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection): (WebCore::WebKitNamedFlowCollection::length): An O(1) operation (WebCore::WebKitNamedFlowCollection::item): An O(N) operation (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation (WebCore::WebKitNamedFlowCollection::documentDestroyed): (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash): (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal): (WebKitNamedFlowCollection::NamedFlowHashFunctions): (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash): (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal): * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h. (WebCore): (WebKitNamedFlowCollection): (WebCore::WebKitNamedFlowCollection::create): (WebCore::WebKitNamedFlowCollection::document): * rendering/FlowThreadController.cpp: (WebCore::FlowThreadController::ensureRenderFlowThreadWithName): (WebCore::FlowThreadController::removeFlowThread): (WebCore): * rendering/FlowThreadController.h: (FlowThreadController): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::RenderNamedFlowThread): (WebCore): (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread): (WebCore::RenderNamedFlowThread::removeRegionFromThread): (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode): (WebCore::RenderNamedFlowThread::flowThreadName): (WebCore::RenderNamedFlowThread::willBeDestroyed): * rendering/RenderNamedFlowThread.h: (RenderNamedFlowThread): (WebCore::RenderNamedFlowThread::contentNodes): (WebCore::RenderNamedFlowThread::canBeDestroyed): 2012-07-13 Vineet Chaudhary <rgf748@motorola.com> [V8Bindings] Implement generalised method to validates that the passed object is a sequence type. https://bugs.webkit.org/show_bug.cgi?id=91056 Reviewed by Kentaro Hara. Currently the V8 implementation validates that the passed object is a sequence type only for MessagePort in V8Utilities::extractTransferables(). There should be generalised method for other types too. Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence No new test, Just refactoring. There should be no behavioral changes. * bindings/v8/V8Binding.h: (WebCore::toV8Sequence): Added implementation of toV8Sequence(). 2012-07-13 Zeno Albisser <zeno@webkit.org> [Qt][WK2] Implement GraphicsSurface for Linux/GLX. https://bugs.webkit.org/show_bug.cgi?id=90881 Add a GLX based GraphicsSurface implementation for Linux. Native X windows are being used for exchanging textures with the UIProcess. Reviewed by Noam Rosenthal. * Target.pri: * WebCore.pri: * platform/graphics/surfaces/GraphicsSurface.cpp: (WebCore::GraphicsSurface::create): Move creating GraphicsSurface instance into platformCreate/platformImport functions to allow platform specific creation based on the provided flags. (WebCore::GraphicsSurface::GraphicsSurface): (WebCore::GraphicsSurface::~GraphicsSurface): Call platformDestroy when destroying a GraphicsSurface. (WebCore): * platform/graphics/surfaces/GraphicsSurface.h: Make platformCreate/platformImport functions static to be able to call these from the static create function. Add Destructor prototype and add GraphicsSurfacePrivate member. (WebCore): (GraphicsSurface): * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore): (WebCore::GraphicsSurface::platformCreate): (WebCore::GraphicsSurface::platformImport): Insert creation of GraphicsSurface instance. This allows having a platform specific creation mechanism for GLX. * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added. (WebCore): (OffScreenRootWindow): (WebCore::OffScreenRootWindow::OffScreenRootWindow): (WebCore::OffScreenRootWindow::get): (WebCore::OffScreenRootWindow::~OffScreenRootWindow): Add an OffScreenRootWindow singelton that is being used as a parent for all native offscreen windows. (GraphicsSurfacePrivate): This class is used to manage all the X related resources such as opening a display or creating XPixmaps etc. (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): Open a connection to the X server and create a QOpenGLContext that can be used to resolve GL functions. (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate): Properly cleanup and release all the X resources again. (WebCore::GraphicsSurfacePrivate::createSurface): Create a surface that is placed off screen and can be used as a rendering target by the WebProcess. (WebCore::GraphicsSurfacePrivate::createPixmap): Create a GLXPixmap from the XWindow that was previously redirected by the WebProcess. This GLXPixmap can then be bound to a texture and being painted on screen by the UIProcess. (WebCore::GraphicsSurfacePrivate::makeCurrent): (WebCore::GraphicsSurfacePrivate::swapBuffers): (WebCore::GraphicsSurfacePrivate::display): (WebCore::GraphicsSurfacePrivate::glxPixmap): (WebCore::GraphicsSurfacePrivate::size): (WebCore::GraphicsSurfacePrivate::glContext): (WebCore::resolveGLMethods): Initialize all the function pointers for the GL functions used. (WebCore::GraphicsSurface::platformExport): (WebCore::GraphicsSurface::platformGetTextureID): Bind the GLXPixmap to a texture. (WebCore::GraphicsSurface::platformCopyToGLTexture): Not beeing implemented for GLX. (WebCore::GraphicsSurface::platformCopyFromFramebuffer): Blit origin fbo onto the GraphicsSurface's backing. (WebCore::GraphicsSurface::platformCreate): (WebCore::GraphicsSurface::platformImport): (WebCore::GraphicsSurface::platformLock): (WebCore::GraphicsSurface::platformUnlock): (WebCore::GraphicsSurface::platformDestroy): 2012-07-13 Dongwoo Im <dw.im@samsung.com> CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift' https://bugs.webkit.org/show_bug.cgi?id=91198 Reviewed by Kentaro Hara. 'SetterExpression' should use 'push' to make arguments, rather than 'unshift'. No new tests. Covered by existing tests. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2012-07-13 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched https://bugs.webkit.org/show_bug.cgi?id=91197 Reviewed by Kent Tamura. This patch fixes implementation of Decimal::ceiling() and floor(). They return wrong value for small fractional numbers. The bug is occurred when: - Step-able input type, e.g. number, date, datetime, and so on. - Current value is step mismatched - Current value is smaller than step - Step up/down by spin button because spin button up/down actions are implemented in InputType::setpUpFromRenderer which calls Decimal::ceiling() and floor() for step mismatched case. Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases WebKit/chromium/tests/DecimalTest.cpp: Added test cases * platform/Decimal.cpp: (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number. (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number. 2012-07-13 Dominic Mazzoni <dmazzoni@google.com> Should be possible to focus elements within canvas fallback content https://bugs.webkit.org/show_bug.cgi?id=87898 Reviewed by Chris Fleizach. Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp to make elements focusable if they're a descendent of a canvas element if they would otherwise have been focusable but just didn't have a renderer. Adds a bit to ElementRareData to efficiently keep track of elements in a canvas subtree. Test: fast/canvas/fallback-content.html * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): (WebCore::Element::setIsInCanvasSubtree): (WebCore): (WebCore::Element::isInCanvasSubtree): * dom/Element.h: (Element): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::ElementRareData): * dom/Node.cpp: (WebCore::Node::isFocusable): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::attach): (WebCore): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::isFocusable): 2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com> [GTK] Add API to get HTTPS status to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=91100 Reviewed by Martin Robinson. * platform/network/soup/ResourceResponse.h: (WebCore::ResourceResponse::soupMessageCertificate): Return the certificate. (WebCore::ResourceResponse::setSoupMessageCertificate): Set a certificate. (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS errors. (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS errors. * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::toSoupMessage): Set the certificate and TLS errors to the newly created SoupMessage. (WebCore::ResourceResponse::updateFromSoupMessage): Get the certificate and TLS errors from the SoupMessage. 2012-07-13 Ryosuke Niwa <rniwa@webkit.org> RadioNodeList is not updated upon input type change https://bugs.webkit.org/show_bug.cgi?id=91178 Reviewed by Alexey Proskuryakov. Invalidate the radio node lists when type content attribute changes since it excludes image type input elements. Test: fast/forms/radionodelist-image-type.html * dom/Document.cpp: (WebCore::shouldInvalidateNodeListForType): * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange since listing all attribute name isn't useful at this point. * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): 2012-07-12 Dongwoo Im <dw.im@samsung.com> CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option. https://bugs.webkit.org/show_bug.cgi?id=91185 Reviewed by Kentaro Hara. When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter. No new tests. Covered by existing tests. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2012-07-12 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false. https://bugs.webkit.org/show_bug.cgi?id=91062 Reviewed by Kent Tamura. This patch changes value of StepRange::acceptableError to zero for integer restricted step value. No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file. * html/StepRange.cpp: (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer. 2012-07-12 Dan Bernstein <mitz@apple.com> Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not terminate the search at the last word boundary before the given index. Reviewed by Adele Peterson. No test, because the current version of Core Foundation ignores the options parameter. * platform/text/cf/HyphenationCF.cpp: (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1. 2012-07-12 Eric Seidel <eric@webkit.org> Incorrect behaviour calling Range setStart or setEnd with boundary in different document https://bugs.webkit.org/show_bug.cgi?id=42517 Reviewed by Ojan Vafai. Added a new static inline "checkForDifferentRootContainer" to share some code and made setStart/setEnd do the right thing in the x-document case. I removed the bogus checks in set*After/set*Before functions, and since they just call through to setStart/setEnd, they also now do the right thing. Test: fast/dom/Range/set-wrong-document-err.html * dom/Range.cpp: (WebCore::checkForDifferentRootContainer): (WebCore): (WebCore::Range::setStart): (WebCore::Range::setEnd): (WebCore::Range::setStartAfter): (WebCore::Range::setEndBefore): (WebCore::Range::setEndAfter): (WebCore::Range::setStartBefore): 2012-07-12 Erik Arvidsson <arv@chromium.org> [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow https://bugs.webkit.org/show_bug.cgi?id=91165 Reviewed by Nate Chapin. The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow. No new tests. No change in functionality. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrSetter): 2012-07-12 Ryosuke Niwa <rniwa@webkit.org> Build fix. Initialize unused const member variables to make compilers happy. * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): 2012-07-12 Konrad Piascik <kpiascik@rim.com> Web Inspector: Geolocation override https://bugs.webkit.org/show_bug.cgi?id=89365 Reviewed by Pavel Feldman. Reverted original patch. Change has not been reviewed by the right people. It declares public protocol methods and is wrong in several ways. * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::GeolocationController): (WebCore::GeolocationController::positionChanged): * Modules/geolocation/GeolocationController.h: (GeolocationController): * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.UserAgentSettingsTab): (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement): * inspector/front-end/UserAgentSupport.js: 2012-07-12 Ryosuke Niwa <rniwa@webkit.org> Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing https://bugs.webkit.org/show_bug.cgi?id=91164 Reviewed by Anders Carlsson. Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid. Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since all HTMLCollection include children in the collection and the function was meant to tell us whether the collection should include descendents that are not direct children of base(). In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity. * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): (DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::type): (WebCore::DynamicNodeListCacheBase::hasNameCache): (WebCore::DynamicNodeListCacheBase::setHasNameCache): (WebCore::DynamicNodeListCacheBase::clearCache): * html/HTMLCollection.cpp: (WebCore::shouldOnlyIncludeDirectChildren): (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::isAcceptableElement): (WebCore::nextNode): (WebCore::HTMLCollection::itemAfter): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollectionCacheBase): (WebCore::HTMLCollectionCacheBase::clearCache): 2012-07-12 Shinya Kawanaka <shinyak@chromium.org> Needs callback before AuthorShadowRoot is added. https://bugs.webkit.org/show_bug.cgi?id=91167 Reviewed by Hajime Morita. This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements. They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add AuthorShadowRoot before adding UserAgentShadowRoot. This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot for those elements. See also Bug 77936, Bug 77937, Bug 90532. * dom/Element.h: (WebCore::Element::willAddAuthorShadowRoot): * dom/ElementShadow.cpp: (WebCore::ElementShadow::addShadowRoot): * dom/ElementShadow.h: (ElementShadow): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::create): 2012-07-12 Dana Jansens <danakj@chromium.org> [chromium] Remove the RenderPass pointer from RenderPassDrawQuad https://bugs.webkit.org/show_bug.cgi?id=91023 Reviewed by Adrienne Walker. Removes the RenderPass pointer and keeps only an integer id in the quad to refer back to the RenderPass the quad reads from. Covered by existing tests. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::findRenderPassById): (WebCore): (WebCore::removeRenderPassesRecursive): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass): (WebCore::CCLayerTreeHostImpl::removeRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (FrameData): (CullRenderPassesWithCachedTextures): (CullRenderPassesWithNoQuads): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-12 Elliott Sprehn <esprehn@gmail.com> Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic https://bugs.webkit.org/show_bug.cgi?id=89900 Reviewed by Eric Seidel and Abhishek Arya. Previously we would walk the all children a renderer whenever adding or removing a child renderer from its RenderObjectChildList to look for RenderQuote and RenderCounter instances to update. This patch introduces a counter in RenderView for the number of RenderQuote and RenderCounter instances in that document so we can avoid these traversals. No tests needed since this is just a short circuiting of logic and the existing tests should cover it. * rendering/RenderCounter.cpp: (WebCore::RenderCounter::RenderCounter): Increment instance counter. (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter. (WebCore): (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero. (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero. * rendering/RenderCounter.h: (RenderCounter): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed. * rendering/RenderQuote.cpp: (WebCore::RenderQuote::RenderQuote): (WebCore::RenderQuote::willBeDestroyed): (WebCore): (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter. (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter. * rendering/RenderQuote.h: (RenderQuote): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts. (RenderView): (WebCore::RenderView::addRenderQuote): (WebCore::RenderView::removeRenderQuote): (WebCore::RenderView::hasRenderQuotes): (WebCore::RenderView::addRenderCounter): (WebCore::RenderView::removeRenderCounter): (WebCore::RenderView::hasRenderCounters): 2012-07-12 Ryosuke Niwa <rniwa@webkit.org> Merge HTMLCollectionWithArrayStorage into HTMLCollection https://bugs.webkit.org/show_bug.cgi?id=91144 Reviewed by Anders Carlsson. Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length and merged itemInArrayAfter and itemAfter. In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache. Instead of always computing the length from the beginning, we start the search from the cached item so that if we're near end of the collection, we avoid significant portion of the node traversal. Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item set the length cache when it reaches the end of the collection to avoid redundant length calculations. * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so assert that offsetInArray is always 0. (WebCore): Removed calcLength. (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows: When there is no item cache, we look for the first item by calling item(0). If item(0) returns null, then it must have set the length cache so bail out. If the previous step didn't bail out, then the item cache is valid and not null (see above), so count the number of remaining items in collection starting at the cached item's offset + 1. (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null, set the length cache instead. (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item. (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override this function. (WebCore::HTMLCollection::updateNameCache): Ditto. * html/HTMLCollection.h: (HTMLCollection): (WebCore): * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not regressing any performance here. (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::itemAfter): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLNameCollection.h: (HTMLNameCollection): * html/HTMLPropertiesCollection.cpp: Removed calcLength(). (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::itemAfter): (WebCore): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::itemAfter): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): 2012-07-12 Pravin D <pravind.2k4@gmail.com> Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell https://bugs.webkit.org/show_bug.cgi?id=16811 Reviewed by Julien Chaffraix. The height of a row is calculated by taking the max height of the cells contained in it. When a row contains a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows", the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration while calculating the height of this row. Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col). However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height. Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row. Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows. 2012-07-12 Joshua Bell <jsbell@chromium.org> IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers https://bugs.webkit.org/show_bug.cgi?id=90310 Reviewed by Tony Chang. Simplify Document vs. Worker logic for IDBFactory::open() and hook up the other two IDBFactory methods for use by workers as well. Test: storage/indexeddb/factory-basics-workers.html * Modules/indexeddb/IDBFactory.cpp: (isContextValid): Helper function consolidating checks that context is usable. (getIndexedDBDatabasePath): Helper function for accessing group settings. (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end. (WebCore::IDBFactory::open): Ditto. (WebCore::IDBFactory::deleteDatabase): Ditto. (WebCore::IDBFactory::cmp): Whitespace. * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed. (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated. (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated. (WebCore::IDBFactoryBackendImpl::open): Signature updated. * Modules/indexeddb/IDBFactoryBackendImpl.h: (IDBFactoryBackendImpl): * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be accessed from context) but on the real back end the context is null (as Frame was previously). (IDBFactoryBackendInterface): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame): (WebCore::InspectorIndexedDBAgent::requestDatabase): (WebCore::InspectorIndexedDBAgent::requestData): 2012-07-12 Dana Jansens <danakj@chromium.org> [chromium] The root layer should not try create a second RenderSurface for itself https://bugs.webkit.org/show_bug.cgi?id=91124 Reviewed by Adrienne Walker. Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): 2012-07-12 Adam Barth <abarth@webkit.org> Regression (r122359) Layout Test html5lib/runner.html is failing https://bugs.webkit.org/show_bug.cgi?id=91047 Reviewed by Tony Chang. This ASSERT is bogus because doctypes can be removed from the DOM and then re-added. Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html * dom/Document.cpp: (WebCore::Document::setDocType): 2012-07-12 Ojan Vafai <ojan@chromium.org> Implied minimum size of flex items is min-content https://bugs.webkit.org/show_bug.cgi?id=87546 Reviewed by Tony Chang. http://dev.w3.org/csswg/css3-flexbox/#min-size-auto In the main axis direction, min-size of auto means min-content. Test: css3/flexbox/flex-item-min-size.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegionUsing): (WebCore::RenderBox::computeContentLogicalHeightUsing): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::RenderBox::computePositionedLogicalHeightUsing): It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): 2012-07-12 Eric Penner <epenner@google.com> [chromium] Use CCTexture/TextureAllocator and remove TextureManager https://bugs.webkit.org/show_bug.cgi?id=91001 Reviewed by Adrienne Walker. Use CCTexture to clean up CCPrioritizedTexture::Backing. Add TextureAllocator.h and remove remainder of TextureManager.h/cpp. Minor move/refactoring of link/unlink in CCPrioritizedTexture. Remove double initialization of the default memory limit. Covered by existing tests (refactoring). * WebCore.gypi: * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (WebCore): * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/ManagedTexture.cpp: Removed. * platform/graphics/chromium/ManagedTexture.h: Removed. * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore): * platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h. (WebCore): (TextureAllocator): (WebCore::TextureAllocator::~TextureAllocator): * platform/graphics/chromium/TextureManager.cpp: Removed. * platform/graphics/chromium/TextureManager.h: Removed. * platform/graphics/chromium/TiledLayerChromium.cpp: * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::prioritizeTextures): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: (WebCore::CCPrioritizedTexture::CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::setDimensions): (WebCore::CCPrioritizedTexture::textureId): (WebCore::CCPrioritizedTexture::bindTexture): (WebCore::CCPrioritizedTexture::framebufferTexture2D): (WebCore::CCPrioritizedTexture::link): (WebCore): (WebCore::CCPrioritizedTexture::unlink): * platform/graphics/chromium/cc/CCPrioritizedTexture.h: (WebCore): (WebCore::CCPrioritizedTexture::bytes): (CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::haveBackingTexture): (WebCore::CCPrioritizedTexture::Backing::Backing): (WebCore::CCPrioritizedTexture::Backing::~Backing): (WebCore::CCPrioritizedTexture::Backing::owner): (Backing): (WebCore::CCPrioritizedTexture::backing): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::prioritizeTextures): (WebCore::CCPrioritizedTextureManager::requestLate): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): (WebCore::CCPrioritizedTextureManager::clearAllMemory): (WebCore::CCPrioritizedTextureManager::registerTexture): (WebCore::CCPrioritizedTextureManager::returnBackingTexture): (WebCore::CCPrioritizedTextureManager::createBacking): (WebCore::CCPrioritizedTextureManager::destroyBacking): (WebCore::CCPrioritizedTextureManager::assertInvariants): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit): (WebCore::CCPrioritizedTextureManager::compareBackings): * platform/graphics/chromium/cc/CCPriorityCalculator.h: * platform/graphics/chromium/cc/CCScopedTexture.cpp: * platform/graphics/chromium/cc/CCScopedTexture.h: * platform/graphics/chromium/cc/CCTexture.h: (WebCore::CCTexture::CCTexture): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: 2012-07-12 Ryosuke Niwa <rniwa@webkit.org> Let XCode have its own way. * WebCore.xcodeproj/project.pbxproj: 2012-07-12 Julien Chaffraix <jchaffraix@webkit.org> ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER) triggered on flex-box content https://bugs.webkit.org/show_bug.cgi?id=91003 Reviewed by Abhishek Arya. Tests: fast/flexbox/assert-generated-deprecated-flexbox.html fast/flexbox/assert-generated-new-flexbox.html The issue was that findBeforeAfterParent didn't return the right parent for the flex-box case. This would make us update the wrong children (and not propagate the style updates properly). * rendering/RenderObjectChildList.cpp: (WebCore::findBeforeAfterParent): Added a check for flex boxes (both deprecated and new). 2012-07-12 Pravin D <pravind.2k4@gmail.com> Percentage width replaced element in zero percent/fixed width container block incorrectly rendered. https://bugs.webkit.org/show_bug.cgi?id=9493 Reviewed by Andy Estes. When the width of the container is zero percent/fixed value then the width of the replaced element must also be zero. Test: fast/css/percent-width-img-inside-zero-percent-and-fixed-container.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): When the containing block's available width is zero there can be two cases. The containing block is floated/positioned in which case the width of the replaced child element must be its instrinsic width. On the other hand if the width of the container is specified to be either zero percent or fixed value then the width of the replaced elment must be zero. 2012-07-11 Ryosuke Niwa <rniwa@webkit.org> invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation https://bugs.webkit.org/show_bug.cgi?id=91046 Reviewed by Anders Carlsson. Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList, which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given attribute change should result in node list invalidations. Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes. * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes. * dom/Document.cpp: (WebCore::Document::Document): Initialize m_nodeListCounts. (WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and m_collections are all empty. (WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed to just ones rooted at the document in order to increment the counter for each invalidation type. (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto. (WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType. (WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change), then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of "if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead to share logic and detect future addition of values to NodeListInvalidationType. * dom/Document.h: (Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type now contains 6 values instead of 2. * dom/DynamicNodeList.cpp: (WebCore): * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange): (WebCore::DynamicNodeListCacheBase::rootType): Added. (WebCore::DynamicNodeListCacheBase::invalidationType): Added. (DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6. (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList. (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList. * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes. * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes. * dom/Node.cpp: (WebCore::Node::clearRareData): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call to shouldInvalidateDynamicSubtreeNodeList. (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList. (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::Node::radioNodeList): (WebCore::NodeRareData::createNodeLists): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists need to be accounted in m_nodeListCounts. (WebCore::NodeRareData::ensureNodeLists): (NodeRareData): * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes. * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed. * dom/TreeScope.h: (TreeScope): Removed m_numNodeListCaches. * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since it's never used in HTMLCollections. * html/LabelableElement.cpp: (WebCore::LabelableElement::labels): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes. (WebCore::LabelsNodeList::~LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes. (WebCore::RadioNodeList::~RadioNodeList): 2012-07-12 Gavin Barraclough <barraclough@apple.com> Threadsafety issues in WebScriptObject https://bugs.webkit.org/show_bug.cgi?id=90849 Reviewed by Filip Pizlo & Oliver Hunt. Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release may not be safe; better to just guard the JSWrapperCache with its own spinlock. * bindings/objc/WebScriptObject.mm: (WebCore::getJSWrapper): - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe to wait for the caller to do so, due to a race condition vs release removing the wrapper from the map. (WebCore::addJSWrapper): - Take the spinlock guarding the cache. (WebCore::removeJSWrapper): - Take the spinlock guarding the cache. (WebCore::removeJSWrapperIfRetainCountOne): - Take the spinlock guarding the cache, remove the wrapper if retainCount is one. (WebCore::createJSWrapper): - Remove the API lock; this method no longer needs to retain/autorelease (this is done by getJSWrapper). (-[WebScriptObject _setImp:originRootObject:rootObject:]): - Remove the API lock. (-[WebScriptObject release]): - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne. 2012-07-11 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=91000 REGRESSION (r122244): Overflow elements don't shrink as much as they should. Reviewed by Simon Fraser. This is a fix for a a regression from https://bugs.webkit.org/show_bug.cgi?id=90646. I incorrectly analyzed the issue with Robert Hogan's negative margin patch and fooled myself into putting back in an incorrect minimum width check from long ago. What should have happened in the test case I patched is that the overflow element should shrink to 0. The issue with improving the logical top estimate in the previous patch is it made the clear delta become 0. This in turn exposed a bug in our clearing algorithm with Robert's changes where you could need a relayout even if you didn't actually move. This issue only occurs because the floats list is getting changed mid-layout because of negative margins. The patch changes getClearDelta to call setChildNeedsLayout(true) on children whose widths change even when their positions do not. In effect this dynamic addition of new floats after you have done a layout on the child already means that you can need to lay out again despite not actually having to move. To handle this, the code that does the relayout is now called if the child needs a relayout. This is done even if the logical top estimate matches the final position. No new tests required, since the test in fast/block/float is now correctly covering the issue. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::getClearDelta): * rendering/RenderBox.cpp: (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats): 2012-07-12 James Weatherall <wez@chromium.org> storage tests are flaky (crashing) on windows https://bugs.webkit.org/show_bug.cgi?id=90469 Reviewed by Kentaro Hara. Add a missing check that the underlying V8 object reference in a V8 NPObject is valid, and zero the NPObject's rootObject member when disposing it, to ensure that it won't be mistakenly touched after that point. This patch is intended to resolve flakiness in the storage tests including: storage/indexeddb/mozilla/indexes.html storage/indexeddb/mozilla/key-requirements-inline-and-passed.html storage/websql/multiple-databases-garbage-collection.html * bindings/v8/NPV8Object.cpp: (WebCore::disposeUnderlyingV8Object): Zero the NPObject's underlying rootObject. (_NPN_EvaluateHelper): Add check that the underlying V8 object reference is valid. 2012-07-12 No'am Rosenthal <noam.rosenthal@nokia.com> Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics https://bugs.webkit.org/show_bug.cgi?id=91111 Reviewed by Kenneth Rohde Christiansen. TextureMapperAnimation and LayerTransform are not specific to TextureMapper, and we want to use them for other purposes as well. Moving them to platform/graphics would make that more explicit. No new tests, moving files around. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/graphics/GraphicsLayerAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp. * platform/graphics/GraphicsLayerAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h. * platform/graphics/GraphicsLayerTransform.cpp: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.cpp. * platform/graphics/GraphicsLayerTransform.h: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.h. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapperLayer.h: (TextureMapperLayer): (WebCore::TextureMapperLayer::setAnimatedTransform): (WebCore::TextureMapperLayer::setAnimatedOpacity): 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Simplify UISourceCode code after moving revisions support inside it. https://bugs.webkit.org/show_bug.cgi?id=91118 Reviewed by Pavel Feldman. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._setContent): (WebInspector.UISourceCode.prototype.revertToOriginal): (WebInspector.UISourceCode.prototype.revertAndClearHistory): (WebInspector.UISourceCode.prototype.contentChanged): (WebInspector.UISourceCode.prototype.commitWorkingCopy): (WebInspector.Revision.prototype.revertToThis): 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com> Unreviewed. Build fix for r122462. * platform/qt/MemoryUsageSupportQt.cpp: 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Remove resources panel edited resources search support. https://bugs.webkit.org/show_bug.cgi?id=91101 Reviewed by Pavel Feldman. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.performSearch.callback): (WebInspector.ResourcesPanel.prototype.performSearch): 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org> Unreviewed r122460 inspector closure compilation fix follow up. * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView): 2012-07-12 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: fix native memory instrumentation code for the bindings instrumentation. https://bugs.webkit.org/show_bug.cgi?id=91096 The instrumented class has to have instrumentation method which reports class size and type and the member objects and pointers. Sample: void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const { memoryObjectInfo->reportObjectInfo(this, MemoryInstrumentation::DOM); // report object size and type. TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation. ScriptWrappable::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation. memoryObjectInfo->reportPointer(m_document, MemoryInstrumentation::DOM); // report uninstrumented pointer. memoryObjectInfo->reportInstrumentedPointer(m_next); // report instrumented pointer. memoryObjectInfo->reportInstrumentedObject(m_anObject); // report instrumented object. } Reviewed by Pavel Feldman. Existing tests for native memory instrumentation. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/DOMDataStore.h: (WebCore): (DOMDataStore): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectBindingMemoryInfo): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8Binding.h: (WebCore): (StringCache): (V8BindingPerIsolateData): * bindings/v8/V8DOMMap.h: (WebCore): (AbstractWeakReferenceMap): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: beautify find bar looks, simplify search update routines. https://bugs.webkit.org/show_bug.cgi?id=91087 Reviewed by Vsevolod Vlasov. This change updates the looks to the one on the screenshots and simplifies match count update routines. * inspector/front-end/SearchController.js: (WebInspector.SearchController.onMatchesMouseDown): (WebInspector.SearchController): (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch): (WebInspector.SearchController.prototype.activePanelChanged): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex): (WebInspector.SearchController.prototype._onKeyDown): (WebInspector.SearchController.prototype._onInput): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/inspector.css: (#search): (#search:focus): (.toolbar-search-navigation-controls): (.toolbar-search-navigation): (.toolbar-search-navigation.enabled:hover): (.toolbar-search-navigation.enabled, .toolbar-search-navigation.enabled:active): (.toolbar-search): (.toolbar-search-control): (.search-results-matches): (.inspector-footer): 2012-07-12 Joshua Bell <jsbell@chromium.org> IndexedDB: ASSERT hit calling open from callback in Worker https://bugs.webkit.org/show_bug.cgi?id=90832 Reviewed by Kentaro Hara. GroupSettings are used to provide the backing store path in some ports. Accessing those settings from a Worker was added, but the access referenced thread startup data that is cleared before the run loop, so an IDBFactory.open() call executed asynchronously would dereference a null pointer. Plumb the settings startup data into the context itself, like all of the other properties. Test: storage/indexeddb/open-twice-workers.html * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): * workers/DedicatedWorkerContext.cpp: (WebCore::DedicatedWorkerContext::DedicatedWorkerContext): * workers/DedicatedWorkerContext.h: (WebCore::DedicatedWorkerContext::create): (DedicatedWorkerContext): * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::createWorkerContext): * workers/DedicatedWorkerThread.h: (DedicatedWorkerThread): * workers/SharedWorkerContext.cpp: (WebCore::SharedWorkerContext::SharedWorkerContext): * workers/SharedWorkerContext.h: (WebCore::SharedWorkerContext::create): (SharedWorkerContext): * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::createWorkerContext): * workers/SharedWorkerThread.h: (SharedWorkerThread): * workers/WorkerContext.cpp: (WebCore::WorkerContext::WorkerContext): * workers/WorkerContext.h: (WebCore::WorkerContext::groupSettings): (WorkerContext): * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): * workers/WorkerThread.h: (WorkerThread): 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com> [Qt] Implement MemoryUsageSupport https://bugs.webkit.org/show_bug.cgi?id=91094 Reviewed by Adam Barth. Implements Qt versions of the memory-usage functions using the information we have available from the various memory systems used in WebKit. Also gets rid of a redundant indirection in V8GCController. * Target.pri: * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcEpilogue): (WebCore::V8GCController::checkMemoryUsage): * platform/qt/MemoryUsageSupportQt.cpp: Added. (WebCore::mallocMemoryUsage): (WebCore::memoryUsageKB): (WebCore::actualMemoryUsageKB): (WebCore::MemoryUsageSupport::memoryUsageMB): (WebCore::MemoryUsageSupport::actualMemoryUsageMB): (WebCore::MemoryUsageSupport::lowMemoryUsageMB): (WebCore::MemoryUsageSupport::highMemoryUsageMB): (WebCore::MemoryUsageSupport::highUsageDeltaMB): (WebCore::MemoryUsageSupport::processMemorySizesInBytes): * platform/qt/PlatformSupport.h: (PlatformSupport): 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Revision history view should be updated when uiSourceCodes are removed or replaced. https://bugs.webkit.org/show_bug.cgi?id=91095 Reviewed by Pavel Feldman. RevisionHistoryView is now reset in WorkspaceReset event handler. UISourceCodes are now removed from RevisionHistoryView when uiSourceCode is removed or replace. * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.prototype._clearHistory): (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved): (WebInspector.RevisionHistoryView.prototype._uiSourceCodeReplaced): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): 2012-07-12 Dongwoo Im <dw.im@samsung.com> InspectorFileSystemAgent.cpp have to include File.h explicitly https://bugs.webkit.org/show_bug.cgi?id=91078 Reviewed by Vsevolod Vlasov. Make sure the InspectorFileSystemAgent.cpp include the File.h by including explicitly. No new tests. Covered by existing tests. * inspector/InspectorFileSystemAgent.cpp: Include File.h 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [Regression] Stale revisions should be removed on navigation. https://bugs.webkit.org/show_bug.cgi?id=91080 Reviewed by Pavel Feldman. Moved all the code responsible for script mapping resetting to Workspace. Stale revisions are removed in Workspace._reset now. * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel): * inspector/front-end/StylesPanel.js: (WebInspector.StylesUISourceCodeProvider): (WebInspector.StylesUISourceCodeProvider.prototype._populate): (WebInspector.StylesUISourceCodeProvider.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._restoreRevisionHistory): * inspector/front-end/Workspace.js: (WebInspector.Workspace): (WebInspector.Workspace.prototype._reset): 2012-07-12 Andreas Kling <kling@webkit.org> Make ElementAttributeData a variable-sized object to reduce memory use. <http://webkit.org/b/88240> Reviewed by Antti "Obi-Wan" Koivisto. Take advantage of the fact that we know at ElementAttributeData construction time how many attributes it needs to accomodate and allocate exactly as much space as needed instead of using a Vector. For elements that never have their attribute list mutated (the vast majority), this saves a lot of memory and removes the indirection to Vector<Attribute>'s heap-allocated storage. Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure that nothing tries to mutate an element with a raw attribute array. When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using a Vector as backing instead. This is triggered when calling Element::mutableAttributeData(). This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>. That is a ~35% reduction in DOM attribute memory use. Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic adding of "class" attributes. For more static pages, savings are even greater. Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where needed. Not a big deal but avoids double lookup of attributes when removing them. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet): Call ensureInlineStyle() on the element so we know we have a StylePropertySet to work with. May cause the creation (and replacement) of a new underlying StylePropertySet on the Element's attribute data. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::adoptCSSOMWrapperFrom): Added. Allows switching the underlying StylePropertySet object while retaining CSSOM wrapper identity (web facing behavior.) * dom/Element.cpp: (WebCore::Element::detachAttribute): (WebCore::Element::removeAttribute): (WebCore::Element::attributes): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributes): (WebCore::Element::hasEquivalentAttributes): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::normalizeAttributes): (WebCore::Element::cloneAttributesFromElement): (WebCore::Element::createMutableAttributeData): * dom/Element.h: (WebCore::Element::attributeData): (Element): (WebCore::Element::updatedAttributeData): (WebCore::Element::ensureAttributeData): (WebCore::Element::ensureUpdatedAttributeData): (WebCore::Element::mutableAttributeData): (WebCore): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::createImmutable): (WebCore): (WebCore::ElementAttributeData::ElementAttributeData): (WebCore::ElementAttributeData::~ElementAttributeData): (WebCore::ElementAttributeData::attrIfExists): (WebCore::ElementAttributeData::ensureAttr): (WebCore::ElementAttributeData::setAttr): (WebCore::ElementAttributeData::removeAttr): (WebCore::ElementAttributeData::ensureInlineStyle): (WebCore::ElementAttributeData::ensureMutableInlineStyle): (WebCore::ElementAttributeData::destroyInlineStyle): (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::isEquivalent): (WebCore::ElementAttributeData::detachAttrObjectsFromElement): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::cloneDataFrom): (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::create): (ElementAttributeData): (WebCore::ElementAttributeData::setClass): (WebCore::ElementAttributeData::setIdForStyleResolution): (WebCore::ElementAttributeData::inlineStyle): (WebCore::ElementAttributeData::setAttributeStyle): (WebCore::ElementAttributeData::reportMemoryUsage): (WebCore::ElementAttributeData::isMutable): (WebCore::ElementAttributeData::makeMutable): (WebCore::ElementAttributeData::length): (WebCore): (WebCore::ElementAttributeData::isEmpty): (WebCore::ElementAttributeData::array): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): (WebCore::ElementAttributeData::attributeItem): * dom/StyledElement.cpp: (WebCore::StyledElement::style): (WebCore::StyledElement::classAttributeChanged): (WebCore::StyledElement::setInlineStyleProperty): (WebCore::StyledElement::removeInlineStyleProperty): (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (WebCore::StyledElement::ensureInlineStyle): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2012-07-12 Florin Malita <fmalita@chromium.org> Incorrect handling of chained pending resources in SVGUseElement https://bugs.webkit.org/show_bug.cgi?id=89686 Reviewed by Nikolas Zimmermann. Currently SVGUseElement builds the shadow tree when the target first becomes available. This is normally OK, but if the target itself (or one of its children) is a <use> element with pending resources, then the shadow expansion only captures the current state of the tree and never gets updated when the pending resource becomes available. In order to support arbitrary <use>-on-<use> constructs, this patch tracks nested <use> dependencies and rebuilds the dependent trees whenever the target gets updated. Tests: svg/custom/use-nested-expected.svg svg/custom/use-nested.svg * svg/SVGElement.cpp: (WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the element being removed as a valid target in SVGUseElement::buildInstanceTree because its InDocument flag is not cleared yet. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::~SVGUseElement): (WebCore::SVGUseElement::clearResourceReferences): (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::buildShadowAndInstanceTree): (WebCore::SVGUseElement::buildInstanceTree): * svg/SVGUseElement.h: (SVGUseElement): Track <use> -> <use> dependencies using SVGDocumentExtensions' m_elementDependencies framework and ensure dependent trees are rebuilt when the target itself gets rebuilt. 2012-07-12 MORITA Hajime <morrita@google.com> Typo: ParentTranversalDetails should be ParentTraversalDetails https://bugs.webkit.org/show_bug.cgi?id=91059 Reviewed by Andreas Kling. Did a bare rename from ParentTranversalDetails to ParentTraversalDetails No new tests, just a rename. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint): (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot): (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode): (WebCore::ComposedShadowTreeWalker::findParent): (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): (WebCore::ComposedShadowTreeWalker::traverseParent): (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree): (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): * dom/ComposedShadowTreeWalker.h: (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails): (ComposedShadowTreeWalker): * dom/NodeRenderingContext.h: (NodeRenderingContext): 2012-07-11 Antti Koivisto <antti@apple.com> Failure to dispatch didFinishLoadForFrame if font load fails synchronously https://bugs.webkit.org/show_bug.cgi?id=91018 Reviewed by Enrica Casucci. New font loads may be triggered by layout after the document load is complete but before we have dispatched didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading. Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::beginLoadTimerFired): 2012-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com> Register protocol handler files should be in Modules/protocolhandler https://bugs.webkit.org/show_bug.cgi?id=90766 Reviewed by Hajime Morita. The register protocol handler files are now self-contained. This patch is moved to the Modules. No new tests. Covered by existing tests. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp. (WebCore): (WebCore::initProtocolHandlerWhitelist): (WebCore::verifyCustomHandlerURL): (WebCore::isProtocolWhitelisted): (WebCore::verifyProtocolHandlerScheme): (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler): (WebCore::NavigatorRegisterProtocolHandler::~NavigatorRegisterProtocolHandler): (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler): (WebCore::customHandlersStateString): (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.h. (WebCore): (NavigatorRegisterProtocolHandler): * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.idl. * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * WebCore.xcodeproj/project.pbxproj: 2012-07-12 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time https://bugs.webkit.org/show_bug.cgi?id=91054 Reviewed by George Staikos. Added an interface function syncProxyCredential() in class PageClientBlackBerry, which is responsible to notify WebPageClient to synchronize proxy credential to the chrome process. Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn> No new tests since there's no functional change. * platform/blackberry/PageClientBlackBerry.h: * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy credential and notify webpage client to synchronize it. 2012-07-12 Xingnan Wang <xingnan.wang@intel.com> [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound() https://bugs.webkit.org/show_bug.cgi?id=90867 Reviewed by Tony Chang. In the latest W3C spec upperOpen/lowerOpen are set to true in lowerBound()/upperBound(), which we should keep aligned with. No new tests - updated storage/indexeddb/keyrange.html to match new behavior. * Modules/indexeddb/IDBKeyRange.cpp: (WebCore::IDBKeyRange::lowerBound): (WebCore::IDBKeyRange::upperBound): 2012-07-12 MORITA Hajime <morrita@google.com> [Shadow DOM] <video> with <shadow> crashes https://bugs.webkit.org/show_bug.cgi?id=91055 Reviewed by Kent Tamura. This is similar to Bug 90480, where an undesired renderer is created by locating an insertion point on the shadow boundary. This change adds a guard for such case by cheking whether the source node of each to-be-created renderer comes from the UA shadow tree, which is allowed to have a renderer. Test: fast/dom/shadow/insertion-point-video-crash.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check. (WebCore::HTMLMediaElement::mediaControls): Added const. (WebCore::HTMLMediaElement::hasMediaControls): Added const. * html/HTMLMediaElement.h: (HTMLMediaElement): 2012-07-12 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object. https://bugs.webkit.org/show_bug.cgi?id=91057 Reviewed by Kent Tamura. This patch changes NSLocale object of LocaleMac::m_locale variable to current NSLocale object rather than newly created NSLocale object from locale identifier. No new tests. We don't have way to change system preferences from test scripts and restoring them. To test this patch, we need to do so. * platform/text/mac/LocaleMac.h: (LocaleMac): Added a constructor which takes NSLocale object. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object. (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier. 2012-07-11 Carlos Garcia Campos <cgarcia@igalia.com> [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=83016 Reviewed by Martin Robinson. * platform/network/soup/CookieStorageSoup.cpp: (WebCore::soupCookiesChanged): Do not notify about changes in other cookie jars than the current one. 2012-07-12 Philip Rogers <pdr@google.com> Refactor RenderSVGShape bounding box code https://bugs.webkit.org/show_bug.cgi?id=90655 Reviewed by Nikolas Zimmermann. RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by not caching the object bounding box and instead computing it on each call. For consistency and performance objectBoundingBox has been refactored to return a cached value. createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement now updates the internal state of the shape (bounding boxes, etc) from the associated element. RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement. After this change all bounding box computation is now handled in updateShapeFromElement. Because subclasses override updateShapeFromElement it will be easy for them to have custom bounding box code there (as will happen for RenderSVGPath in a followup patch). strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call. Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and m_strokeBoundingBox of RenderSVGShape instead of having their own. This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code. No new tests, just a refactoring. * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::updateShapeFromElement): (WebCore): (WebCore::RenderSVGEllipse::fillShape): (WebCore::RenderSVGEllipse::strokeShape): (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): * rendering/svg/RenderSVGEllipse.h: (RenderSVGEllipse): (WebCore::RenderSVGEllipse::isEmpty): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): (WebCore): (WebCore::RenderSVGRect::fillShape): (WebCore::RenderSVGRect::strokeShape): (WebCore::RenderSVGRect::shapeDependentStrokeContains): (WebCore::RenderSVGRect::shapeDependentFillContains): * rendering/svg/RenderSVGRect.h: (RenderSVGRect): (WebCore::RenderSVGRect::isEmpty): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): (WebCore): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::calculateObjectBoundingBox): (WebCore::RenderSVGShape::calculateStrokeBoundingBox): (WebCore::RenderSVGShape::updateRepaintBoundingBox): * rendering/svg/RenderSVGShape.h: (RenderSVGShape): (WebCore::RenderSVGShape::objectBoundingBox): (WebCore::RenderSVGShape::strokeBoundingBox): 2012-07-12 Kent Tamura <tkent@chromium.org> Do not save the form state signature if nothing is saved https://bugs.webkit.org/show_bug.cgi?id=91050 Reviewed by Hajime Morita. This change will reduce the size of HistoyItem. Test: fast/forms/state-restore-empty-state.html * html/FormController.cpp: (WebCore::FormController::formElementsState): If stateVector has only the signature string, clear it. 2012-07-11 Mark Rowe <mrowe@apple.com> <http://webkit.org/b/91051> Fix the Qt Mac build after r122400. Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path, which revealed that the code made assumptions about which headers had already been included. * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in a declaration of UpdateSystemActivity when targeting Leopard. 2012-07-11 Matt Falkenhagen <falken@chromium.org> Add dialog element feature toggle to InternalSettings https://bugs.webkit.org/show_bug.cgi?id=90934 Reviewed by Hajime Morita. This enables layout tests to be written for dialog although the feature is disabled by default. Tests: fast/dom/HTMLDialogElement/dialog-disabled.html fast/dom/HTMLDialogElement/dialog-enabled.html * WebCore.exp.in: Added newly exported symbol. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag. (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag. (WebCore::InternalSettings::setDialogElementEnabled): Added. (WebCore): * testing/InternalSettings.h: Added support for dialog. (Backup): (InternalSettings): * testing/InternalSettings.idl: Added support for dialog. 2012-07-11 Kent Tamura <tkent@chromium.org> Accessing width or height of a detached image input element causes crash https://bugs.webkit.org/show_bug.cgi?id=90885 Reviewed by Kentaro Hara. Test: fast/forms/image/width-and-height-of-detached-input.html * html/ImageInputType.cpp: (WebCore::ImageInputType::height): Add null check for m_imageLoader. (WebCore::ImageInputType::width): ditto. 2012-07-11 Kent Tamura <tkent@chromium.org> Do not save state of stateless form controls https://bugs.webkit.org/show_bug.cgi?id=90964 Reviewed by Hajime Morita. By Bug 89409, we started to store unmodified form control state. However we don't need to make such state for the following types. - password - submit - reset - button - keygen Test: fast/forms/state-restore-skip-stateless.html * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState): Added. Disable saving state for submit, reset, and button types. * html/BaseButtonInputType.h: (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState. * html/HTMLFormControlElementWithState.h: (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState): Added. Checks InputType::shouldSaveAndRestoreFormControlState first. * html/HTMLInputElement.h: (HTMLInputElement): Override shouldSaveAndRestoreFormControlState. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState) Added. Disable saving state for <keygen>.: * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState. * html/InputType.cpp: (WebCore::InputType::shouldSaveAndRestoreFormControlState): Added. Enable saving state for all types by default. * html/InputType.h: (InputType): Add shouldSaveAndRestoreFormControlState. * html/PasswordInputType.cpp: (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState): Added. Disabled saving state. (WebCore::PasswordInputType::saveFormControlState): Because shouldSaveAndRestoreFormControlState() returns false, saveFormControlState should be never called. * html/PasswordInputType.h: (PasswordInputType): Override shouldSaveAndRestoreFormControlState. 2012-07-11 No'am Rosenthal <noam.rosenthal@nokia.com> Compilation error with GLES2 when using gl2ext.h from ANGLE. https://bugs.webkit.org/show_bug.cgi?id=91030 Reviewed by Kenneth Russell. gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header, but we should work around it until fixed headers are integrated. * platform/graphics/opengl/Extensions3DOpenGLES.h: (Extensions3DOpenGLES): Removed the "PROC" suffix to work around the header bug. 2012-07-11 Mark Rowe <mrowe@apple.com> Attempt to fix the Chromium Mac build after r122400. * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if building for a new enough version of OS X. 2012-07-11 Kent Tamura <tkent@chromium.org> [Mac] Sort project.pbxproj * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file 2012-07-11 Dan Bernstein <mitz@apple.com> When a table row height grows because of pagination, not all cells’ heights are adjusted https://bugs.webkit.org/show_bug.cgi?id=91043 Reviewed by Sam Weinig. The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad side effects: earlier cells on the row would not grow by the same amount, and later cells on the row would factor the existing growth into their intrinsic padding. Test: fast/multicol/table-row-height-increase.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height, the additional height needed is recorded, and the cell is shrunk back to row height. Then after finishing the row, all cells occurring on the row (including cells spanning it but not starting on it) are grown by the same amount. 2012-07-11 Mark Rowe <mrowe@apple.com> <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions. Reviewed by Dan Bernstein. The deployment target is already set to the version that we're targeting, and it's that setting which determines which functionality from the SDK is available to us. * Configurations/Base.xcconfig: 2012-07-11 Mark Rowe <mrowe@apple.com> Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build. Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros Reviewed by Filip Pizlo. * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available. * platform/mac/EmptyProtocolDefinitions.h: The SDK we're building against determines whether the protocols are declared. * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are available. * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared. 2012-07-11 Mark Rowe <mrowe@apple.com> <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros This removal was handled by a script that translates the relevant macros in to the equivalent checks using the system availability macros. Reviewed by Filip Pizlo. * WebCore.exp.in: * accessibility/AccessibilityList.h: * accessibility/AccessibilityTable.h: * accessibility/mac/AXObjectCacheMac.mm: * editing/mac/EditorMac.mm: * loader/MainResourceLoader.cpp: * loader/MainResourceLoader.h: * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: * page/mac/SettingsMac.mm: * platform/LocalizedStrings.cpp: * platform/MemoryPressureHandler.cpp: * platform/audio/mac/AudioBusMac.mm: * platform/graphics/Gradient.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/ca/GraphicsLayerCA.cpp: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: * platform/graphics/ca/mac/TileCache.mm: * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/ImageBufferCG.cpp: * platform/graphics/cg/ImageBufferDataCG.cpp: * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/cg/ImageCG.cpp: * platform/graphics/cg/ImageSourceCG.cpp: * platform/graphics/cg/PathCG.cpp: * platform/graphics/cocoa/FontPlatformDataCocoa.mm: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/ComplexTextControllerCoreText.mm: * platform/graphics/mac/FontCacheMac.mm: * platform/graphics/mac/FontCustomPlatformData.cpp: * platform/graphics/mac/FontMac.mm: * platform/graphics/mac/GraphicsContextMac.mm: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/graphics/mac/SimpleFontDataMac.mm: * platform/graphics/mac/WebLayer.h: * platform/graphics/mac/WebLayer.mm: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/mac/CursorMac.mm: * platform/mac/DisplaySleepDisabler.cpp: * platform/mac/DisplaySleepDisabler.h: * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/MemoryPressureHandlerMac.mm: * platform/mac/NSScrollerImpDetails.h: * platform/mac/PlatformEventFactoryMac.mm: * platform/mac/PopupMenuMac.mm: * platform/mac/ScrollAnimatorMac.mm: * platform/mac/ScrollElasticityController.mm: * platform/mac/SharedTimerMac.mm: * platform/mac/SuddenTermination.mm: * platform/mac/WebCoreFullScreenWindow.mm: * platform/mac/WebCoreNSCellExtras.h: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/mac/WebFontCache.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: * platform/network/Credential.h: * platform/network/ResourceHandle.h: * platform/network/cf/DNSCFNet.cpp: * platform/network/cf/ProxyServerCFNet.cpp: * platform/network/cf/ResourceRequest.h: * platform/network/cf/ResourceRequestCFNet.cpp: * platform/network/cf/SocketStreamHandleCFNet.cpp: * platform/network/mac/AuthenticationMac.mm: * platform/network/mac/CookieStorageMac.mm: * platform/network/mac/ResourceHandleMac.mm: * platform/network/mac/ResourceRequestMac.mm: * platform/network/mac/WebCoreURLResponse.mm: * platform/text/TextChecking.h: * platform/text/cf/HyphenationCF.cpp: * platform/text/mac/HyphenationMac.mm: * rendering/RenderLayerBacking.cpp: * rendering/RenderLayerCompositor.cpp: * rendering/RenderThemeMac.mm: 2012-07-11 Robert Kroeger <rjkroege@chromium.org> Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true https://bugs.webkit.org/show_bug.cgi?id=89580 WebKit GTK and Chromium Linux force vertical wheel events to scroll horizontally when over horizontal scroll bars. This is undesirable for touchpad scrolling with hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas. Reviewed by Adam Barth. Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html * page/EventHandler.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: (EventHandler): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 2012-07-11 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Build fix for r122373. * platform/chromium/support/WebCompositorSharedQuadState.cpp: (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState): 2012-07-11 Shinya Kawanaka <shinyak@chromium.org> SVGUseElement should not use Element::ensureShadowRoot(). https://bugs.webkit.org/show_bug.cgi?id=90938 Reviewed by Hajime Morita. We would like to remove Element::ensureShadowRoot() because we would like to stabilize the lifecycle of Shadow DOM. This patch rewrites SVGUseElement::create() not to use Element::ensureShadowRoot(). Since our convention to create a shadow subtree is to create a method createShadowSubtree(), I obeyed it. No new tests. Simple refactoring. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::create): (WebCore::SVGUseElement::createShadowSubtree): (WebCore): * svg/SVGUseElement.h: (SVGUseElement): 2012-07-11 Alexandre Elias <aelias@google.com> [chromium] Move compositor quads to Platform/chromium/public https://bugs.webkit.org/show_bug.cgi?id=90582 Reviewed by Adrienne Walker. This moves CCSharedQuadState, CCDrawQuad, and all but two CC*DrawQuad classes to the WebKit namespace, as a first step to pushing them across the process boundary for the ubercompositor. - The intent is to serialize the class hierarchy using the same mechanism as WebInputEvent. In order to do this, there are three requirements: pure POD data, a method returning size, and a packing pragma. - Private data members are fine with this kind of serializer, and a default constructor is not needed. Because of that, we can maintain the same encapsulation and convenient APIs (behind WEBKIT_IMPLEMENTATION) as the original classes. To ease the transition, the original WebCore headers still exist and typedef to the new classes. - However, SharedQuadState will be serialized using the normal IPC_STRUCT_TRAITS macro, so I made its members public. A custom serializer (on quad lists) will maintain the pointers from quads to SharedQuadStates. - I converted the Material casting mechanism to materialCast() methods living in the derived classes. That way, the WebCompositorQuad header doesn't need to know about all its derived classes. - Quad classes not yet transitioned can still be used in non-ubercompositor mode. CCRenderPassDrawQuad and CCYUVVideoDrawQuad are currently non-POD and I left them in their original files. This approach is the best I've found so far, since it preserves all WebCore-facing APIs and avoids unnecessary code duplication (new quad types or members can be added by modifying only one place). There also should not be an unreasonable amount of custom serializer code required. No new tests. (No-op refactoring.) * WebCore.gypi: * platform/chromium/support/WebCompositorQuad.cpp: Added. (WebKit): (WebKit::WebCompositorQuad::WebCompositorQuad): (WebKit::WebCompositorQuad::opaqueRect): (WebKit::WebCompositorQuad::setQuadVisibleRect): (WebKit::WebCompositorQuad::size): * platform/chromium/support/WebCompositorSharedQuadState.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp. (WebKit): (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState): (WebKit::WebCompositorSharedQuadState::create): (WebKit::WebCompositorSharedQuadState::isLayerAxisAlignedIntRect): * platform/chromium/support/WebCompositorSolidColorQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp. (WebKit): (WebKit::WebCompositorSolidColorQuad::create): (WebKit::WebCompositorSolidColorQuad::WebCompositorSolidColorQuad): (WebKit::WebCompositorSolidColorQuad::materialCast): * platform/chromium/support/WebCompositorTextureQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp. (WebKit): (WebKit::WebCompositorTextureQuad::create): (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad): (WebKit::WebCompositorTextureQuad::setNeedsBlending): (WebKit::WebCompositorTextureQuad::materialCast): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawQuad): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: (WebCore::CCCheckerboardDrawQuad::create): (WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad): (WebCore::CCCheckerboardDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h: (CCCheckerboardDrawQuad): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: (WebCore::CCDebugBorderDrawQuad::create): (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad): (WebCore::CCDebugBorderDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: (CCDebugBorderDrawQuad): * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed. * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: (WebCore::CCIOSurfaceDrawQuad::create): (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad): (WebCore::CCIOSurfaceDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: (CCIOSurfaceDrawQuad): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): * platform/graphics/chromium/cc/CCSharedQuadState.h: (WebCore): * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: (WebCore): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: (WebCore::CCStreamVideoDrawQuad::create): (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad): (WebCore::CCStreamVideoDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: (CCStreamVideoDrawQuad): * platform/graphics/chromium/cc/CCTextureDrawQuad.h: (WebCore): * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: (WebCore::CCTileDrawQuad::create): (WebCore::CCTileDrawQuad::CCTileDrawQuad): (WebCore::CCTileDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCTileDrawQuad.h: (CCTileDrawQuad): * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: (WebCore::CCYUVVideoDrawQuad::create): (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad): (WebCore::CCYUVVideoDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: (CCYUVVideoDrawQuad): 2012-07-11 Robert Kroeger <rjkroege@chromium.org> [chromium] [regression] Don't use ScrollByPrecisePixels on Chromium Mac. https://bugs.webkit.org/show_bug.cgi?id=91020 Reviewed by Adam Barth. A change in https://bugs.webkit.org/show_bug.cgi?id=87535 to improve the operation of smooth scrolling incorrectly caused Chromium Mac to use the wrong scroll granularity on hasPreciseScrollingDeltas() == true wheelevent scrolls. Exclude the change on the Chromium Mac platform. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): Adjusted #ifdef to exclude Chromium Mac from ScrollByPrecisePixels change. 2012-07-11 Jia Pu <jpu@apple.com> On Mac, autocorrection sometimes fails to take place in Safari. https://bugs.webkit.org/show_bug.cgi?id=89982 Reviewed by Ryosuke Niwa. We should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should early return in markAndReplaceFor(). Also, since we don't want autocorrection to happen when we only change selection, not the content, so we shouldn't set TextCheckingTypeCorrection flag in markMisspellingsAndBadGrammar() as this function is triggered only by selection change. * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): (WebCore::Editor::markMisspellingsAndBadGrammar): 2012-07-11 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122361. http://trac.webkit.org/changeset/122361 https://bugs.webkit.org/show_bug.cgi?id=91027 Broke Windows build and fast/forms/state-restore-broken- state.html (Requested by rniwa on #webkit). * testing/Internals.idl: 2012-07-10 Simon Fraser <simon.fraser@apple.com> Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode https://bugs.webkit.org/show_bug.cgi?id=90919 Reviewed by Antti Koivisto. r121124 added a fast path for geometry mapping that goes via layers when possible. However, this broke paginated pages, which put the root (RenderView) layer into column mode, because it failed to check for columns on the ancestor layer. Rather than make a risky change to convertToLayerCoords(), add a local function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(), but doesn't check for compositing (compositing itself is not a reason to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer to check whether the ancestor has columns, which fixes the bug. Test: compositing/columns/geometry-map-paginated-assert.html * rendering/RenderGeometryMap.cpp: (WebCore::canMapViaLayer): (WebCore::RenderGeometryMap::pushMappingsToAncestor): 2012-07-11 Dana Jansens <danakj@chromium.org> [chromium] Rename layerRect to contentRect for rects that live in content space https://bugs.webkit.org/show_bug.cgi?id=90843 Reviewed by Adrienne Walker. Dropped the layerTransform() from CCSharedQuadState, as nothing should be using it to draw with. RenderPasses need a weird drawTransform right now which was stored in layerTransform, so moved this to the RenderPass quad. No new tests. No change in behaviour. * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::update): (WebCore::ContentLayerChromium::needMoreUpdates): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::update): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::visibleContentOpaqueRegion): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::visibleContentRect): (WebCore::LayerChromium::setVisibleContentRect): (LayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawYUVVideoQuad): (WebCore::LayerRendererChromium::drawStreamVideoQuad): (WebCore::LayerRendererChromium::drawIOSurfaceQuad): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateBounds): (WebCore::TiledLayerChromium::setNeedsDisplayRect): (WebCore::TiledLayerChromium::invalidateContentRect): (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::setTexturePriorities): (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): (WebCore::TiledLayerChromium::visibleContentOpaqueRegion): (WebCore::TiledLayerChromium::updateContentRect): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore::CCDrawQuad::visibleContentRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): (WebCore::CCLayerImpl::appendDebugBorderQuad): (WebCore::CCLayerImpl::visibleContentOpaqueRegion): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::visibleContentRect): (WebCore::CCLayerImpl::setVisibleContentRect): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::contentRectToTileIndices): (WebCore::CCLayerTilingData::opaqueRegionInContentRect): (WebCore::CCLayerTilingData::setBounds): * platform/graphics/chromium/cc/CCLayerTilingData.h: (CCLayerTilingData): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleContentRect): (WebCore::layerShouldBeSkipped): (WebCore): (WebCore::calculateVisibleAndScissorRectsInternal): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::addOcclusionBehindLayer): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::drawTransform): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::create): (WebCore::CCSharedQuadState::CCSharedQuadState): (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect): * platform/graphics/chromium/cc/CCSharedQuadState.h: (CCSharedQuadState): (WebCore::CCSharedQuadState::visibleContentRect): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion): 2012-07-11 Chris Fleizach <cfleizach@apple.com> ARIA spinbutton role incorrectly mapped to ProgressIndicatorRole https://bugs.webkit.org/show_bug.cgi?id=77298 Reviewed by Anders Carlsson. * accessibility/AccessibilityObject.cpp: (WebCore::createARIARoleMap): 2012-07-11 Huang Dongsung <luxtella@company100.net> BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized. https://bugs.webkit.org/show_bug.cgi?id=90757 Reviewed by Simon Fraser. The current code fortunately has worked so far because only BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized. startAnimation returns at the first line becase shouldAnimate() always return false in this case. if (m_frameTimer || !shouldAnimate() || frameCount() <= 1) return; This change is needed because parallel image decoders call BitmapImage::frameIsCompleteAtIndex in other places too. No new tests, manually tested whether the caller exists or not that calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is initialized. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::frameIsCompleteAtIndex): 2012-07-11 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Update code to use the new constant name. * platform/wx/PasteboardWx.cpp: (WebCore::Pasteboard::documentFragment): 2012-07-11 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Ignore array and sequence types for attributes as well as functions since the CPP bindings do not yet support them. * bindings/scripts/CodeGeneratorCPP.pm: (SkipAttribute): 2012-07-11 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Use DOMStringList instead of DOMString[] for in / out type. * testing/Internals.idl: 2012-07-11 Dana Jansens <danakj@chromium.org> [chromium] Minimum size used for occlusion tracking should be a setting on CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=90993 Reviewed by Adrienne Walker. Move the default minimum size used for occlusion tracking from the CCOcclusionTracker class into CCLayerTreeSettings. This value is then used on both threads as the lower limit for any occlusion to be remembered. This allows us to use (0, 0) as the minimum size for tests, allowing all occlusion to be tracked. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.h: 2012-07-11 Anders Carlsson <andersca@apple.com> Add -Wtautological-compare and -Wsign-compare warning flags https://bugs.webkit.org/show_bug.cgi?id=90994 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: 2012-07-11 Dean Jackson <dino@apple.com> TileCache layers have wrong border debug color https://bugs.webkit.org/show_bug.cgi?id=90922 Reviewed by Simon Fraser. Commit r122152 updated the layer hierarchy when a tile cache is being used by the view. As part of that, GraphicsLayerClient::shouldUseTileCache() was changed to return false in some situations (the idea was that it should only be called from the createGraphicsLayer method). However there were two other call points: one that sets the debug colors on borders, the other was a call that keeps the document background in sync. Add a new method usingTileCache() that returns the current state. Also fix a FIXME where the debug code always called into the client rather than caching the value on the GraphicsLayer. Test: compositing/document-background-color.html * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): (WebCore::GraphicsLayer::updateDebugIndicators): check the local variable when setting the debug colors. * platform/graphics/GraphicsLayer.h: (GraphicsLayer): new bool member variable m_usingTileCache. * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::usingTileCache): new virtual method to query if this client is actually using the tile cache. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): set the member variable m_usingTileCache if the GraphicsLayerClient says we are. * rendering/RenderLayerBacking.h: (WebCore::RenderLayerBacking::usingTileCache): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): call usingTileCache() rather than shouldUseTileCache(), because the latter's value might not always reflect the existence of a cache. 2012-07-11 Ryosuke Niwa <rniwa@webkit.org> Clang build fix after r122345. Also let XCode do its own thing. * WebCore.xcodeproj/project.pbxproj: * html/HTMLCollection.cpp: (WebCore::HTMLCollectionWithArrayStorage::item): * html/HTMLCollection.h: (HTMLCollectionWithArrayStorage): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::itemInArrayAfter): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::itemInArrayAfter): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): 2012-07-11 Arnaud Renevier <a.renevier@sisa.samsung.com> [Gtk] allow building with css-filters https://bugs.webkit.org/show_bug.cgi?id=90908 Reviewed by Eric Seidel. Add support for css-filters in Source/WebCore/GNUmakefile.am configure.ac No functional change, so no new tests. * GNUmakefile.am: 2012-07-10 Ryosuke Niwa <rniwa@webkit.org> HTMLFormCollection::item and HTMLPropertiesCollection::item should share code https://bugs.webkit.org/show_bug.cgi?id=90932 Reviewed by Anders Carlsson. Merged HTMLFormCollection::item and HTMLPropertiesCollection::item as HTMLCollectionWithArrayStorage::item, which can be merged into HTMLCollection::item in a follow up patch. Also moved the call to invalidateCacheIfNeeded into HTMLCollection::updateNameCache() as done in HTMLPropertiesCollection. In addition, moved the early bail out for when the base element doesn't have itemscope attribute from individual functions to updateRefElements so that HTMLCollectionWithArrayStorage::item doesn't need to have this check. * html/HTMLCollection.cpp: (WebCore::HTMLCollectionWithArrayStorage::item): Added. It's based on HTMLPropertiesCollection::item but it only has the single loop (as supposed to nested loops) as HTMLFormCollection doesn't have multiple items per element in the array unlike HTMLPropertiesCollection. In addition, offsetInArray (was i in HTMLPropertiesCollection::item) is incremented in each itemAfter due to this semantic difference in each itemAfter. (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): * html/HTMLCollection.h: (HTMLCollectionWithArrayStorage): (WebCore::HTMLCollectionWithArrayStorage::HTMLCollectionWithArrayStorage): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::calcLength): Merged numberOfFormControlElements since it was only called here. (WebCore::HTMLFormCollection::itemAfter): Added. HTMLFormCollection has exactly one item per element in the array so we increment the offset in each iteration. Note that when we're continuing a search, we need to increment the offset in order to avoid returning the same item. (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::updateRefElements): Set m_hasItemRefElements true upfront since we never fail to update ref elements. Bail out as soon as we cleared the m_itemRefElements when the base element doesn't have itemscope content attribute. (WebCore::HTMLPropertiesCollection::itemAfter): Added. We reset previousItem to null because the existing itemAfter requires previousItem be null when we're moving to a new entry in m_itemRefElements. (WebCore::HTMLPropertiesCollection::calcLength): (WebCore::HTMLPropertiesCollection::cacheFirstItem): (WebCore::HTMLPropertiesCollection::updateNameCache): Merged findProperties since this was the only caller. (WebCore::HTMLPropertiesCollection::names): (WebCore::HTMLPropertiesCollection::namedItem): (WebCore::HTMLPropertiesCollection::hasNamedItem): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): Made updateRefElements public as it's called in HTMLCollectionWithArrayStorage::item. 2012-07-11 Sami Kyostila <skyostil@chromium.org> RenderView layer is marked as fixed position container in the scrolling tree if page scale != 1 https://bugs.webkit.org/show_bug.cgi?id=89216 Reviewed by Simon Fraser. Render layers with CSS transforms should become containers for any fixed positioned descendants. However, because this check is done with RenderLayer::hasTransform(), we also end up marking the RenderLayer for the RenderView as fixed position container if a non-identity page scale factor is used. This is because page scale is applied as a transform for that layer. This breaks fixed position layers, because they become fixed relative to the RenderView layer instead of outer scroll clip layer. The fix is to avoid marking any root layers as fixed position containers. No new test because the scrolling tree isn't currently testable. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2012-07-11 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION (r116203): overflow sections don't have scrollbars https://bugs.webkit.org/show_bug.cgi?id=90052 Reviewed by Simon Fraser. This issue stems from RenderLayers with overlay scrollbars not being considered self-painting. After r120395 (follow-up of r116203), we ignore subtrees that have no self-painting layer for painting. Normal scrollbars are painted by their renderer so they were properly painted. However overlay scrollbars need to be painted by their RenderLayer as a separate phase (see bug 57057) so they were not painted anymore. The fix is simple: make RenderLayer with overlay scrollbars self-painting as they should have been in the first place. Unfortunately no tests as I don't think we have a good way of testing overlay scrollbars. Tested manually though on the super simple test case from the bug. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::shouldBeSelfPaintingLayer): Overlay scrollbars make the layer self-painting. (WebCore::RenderLayer::updateScrollbarsAfterLayout): Added a call to updateSelfPaintingLayer. (WebCore::RenderLayer::styleChanged): Moved the call to updateSelfPaintingLayer after recomputing the scrollbars to ensure proper behavior. Added a comment underlining the reason. (WebCore::RenderLayer::updateSelfPaintingLayer): Renamed as it is now called during layout too. * rendering/RenderLayer.h: (RenderLayer): Updated after updateSelfPaintingLayer rename. 2012-07-11 Allan Sandfeld Jensen <allan.jensen@nokia.com> NodesFromRect doesn't work on SVG root elements. https://bugs.webkit.org/show_bug.cgi?id=89990 Reviewed by Antonio Gomes. Adds support for rect-based hit-testing on the SVG root element. This means that while rect-based hit-testing is still not supported within SVG elements, that at least it works on SVG root elements as it would on any other replaced element. Test: fast/dom/nodesFromRect-svg.html * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): 2012-07-11 Joshua Netterfield <jnetterfield@rim.com> [Qt] REGRESSION(r122250): It broke USE(3D_GRAPHICS)=1 and ENABLE(WEBGL)=0 builds https://bugs.webkit.org/show_bug.cgi?id=90943 Reviewed by Csaba Osztrogonác. Uses proper guarding in Extensions3DOpenGLCommon and Extensions3DOpenGLES as per https://bugs.webkit.org/show_bug.cgi?id=90506. No new tests, becasue there is no new functionality. * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Use proper guarding. * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Use proper guarding. 2012-07-10 Pavel Feldman <pfeldman@chromium.org> Web Inspector: migrate from background images to CSS for statusbar rendering. https://bugs.webkit.org/show_bug.cgi?id=90902 Reviewed by Vsevolod Vlasov. This change removes statusbar* images and uses gradients and borders to re-create original inspector look. * WebCore.gypi: * inspector/front-end/Images/statusbarBackground.png: Removed. * inspector/front-end/Images/statusbarBottomBackground.png: Removed. * inspector/front-end/Images/statusbarButtons.png: Removed. * inspector/front-end/Images/statusbarMenuButton.png: Removed. * inspector/front-end/Images/statusbarMenuButtonSelected.png: Removed. * inspector/front-end/StatusBarButton.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (body.drawer-visible #main-status-bar): (body.drawer-visible #main-status-bar::after): (.status-bar-background): (.status-bar > div): (.glyph): (button.status-bar-item): (.status-bar button.status-bar-item:active): (select.status-bar-item): (select.status-bar-item, select.status-bar-item:hover): (body.detached .alternate-status-bar-buttons-bar): (.alternate-status-bar-buttons-bar): (.alternate-status-bar-buttons-bar .status-bar-item): (.alternate-status-bar-buttons-bar .status-bar-item.emulate-active): (#drawer): (body.drawer-visible #drawer-contents): (#drawer-status-bar): * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: (button.status-bar-item.scripts-navigator-show-hide-button): (button.status-bar-item.scripts-navigator-show-hide-button:active): (button.status-bar-item.scripts-debugger-show-hide-button): (button.status-bar-item.scripts-debugger-show-hide-button:active): 2012-07-11 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] crash in CookieDatabaseBackingStore. https://bugs.webkit.org/show_bug.cgi?id=90270 Reviewed by George Staikos. There is one case for this crash. 1. A browser crashes and locks cookies' database for a while. 2. Open a new browser when the old one doesn't finish crashing. 3. The new one writes the cookies' database and receives a SQLITE_BUSY error in CookieDatabaseBackingStore's invokeOpen. So this database isn't opened. 4. invokeGetCookiesWithLimit returns 0. 5. Crash happens when using a null pointer. Add function setBusyTimeout(1000) and a guard for cookies' pointer. setBusyTimeout will call sqlite3_busy_timeout. When the SQLite database is accessed for reading it is locked for writing until the reading access is finished. Another process cannot access the database while it is locked. The timeout time sets a limit while this process tries to access the locked database. If the database is unlocked within the timeout time it can be accessed, otherwise an access fails. No new tests. This crash is hard to reproduce, and it happens only on our platform. * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp: (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase): 2012-07-11 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Move revisions support to UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=90888 Reviewed by Pavel Feldman. Moved revisions support to UISourceCode. Revision management code is moved unchanged where possible and should be refactored later. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): revision is now added to uiSourceCode, not resource. * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._notifyUISourceCodeContentCommitted): Extension server is now listening for Workspace.UISourceCodeContentCommitted event instead of ResourceTreeModel.ResourceContentCommitted. * inspector/front-end/Resource.js: * inspector/front-end/ResourceTreeModel.js: ResourceTreeModel.ResourceContentCommitted renamed to Workspace.UISourceCodeContentCommitted. * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame): ResourceSourceFrame is not update when revisions are added anymore as resource conenten is considered immutable now * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.populateRevisions): (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.showHistory): (WebInspector.RevisionHistoryView.prototype._createUISourceCodeItem): (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryView.prototype._revealUISourceCode.get if): (WebInspector.RevisionHistoryView.prototype._revealUISourceCode): (WebInspector.RevisionHistoryView.prototype._reset): * inspector/front-end/ScriptSnippetModel.js: Snippets are not loaded before ResourceTreeModel.mainFrame is available anymore. (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.requestOriginalContent): (WebInspector.UISourceCode.prototype._setContent): (WebInspector.UISourceCode.prototype.addRevision): (WebInspector.UISourceCode.prototype._restoreRevisionHistory): (WebInspector.UISourceCode.prototype._clearRevisionHistory): (WebInspector.UISourceCode.prototype.revertToOriginal): (WebInspector.UISourceCode.prototype.revertAndClearHistory): (WebInspector.UISourceCode.prototype.revertAndClearHistory.clearHistory): (WebInspector.UISourceCode.prototype.commitWorkingCopy): (WebInspector.UISourceCode.prototype.canonicalMimeType): (WebInspector.Revision): (WebInspector.Revision._revisionHistoryRegistry): (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist): (WebInspector.Revision._ensureStaleRevisionsFileteredOut): (WebInspector.Revision.prototype.get uiSourceCode): (WebInspector.Revision.prototype.get timestamp): (WebInspector.Revision.prototype.get content): (WebInspector.Revision.prototype.revertToThis): (WebInspector.Revision.prototype.contentURL): (WebInspector.Revision.prototype.contentType): (WebInspector.Revision.prototype.requestContent): (WebInspector.Revision.prototype.searchInContent): (WebInspector.Revision.prototype._persist): * inspector/front-end/UserAgentSupport.js: Drive-by closure compilation fix. * inspector/front-end/Workspace.js: * inspector/front-end/inspector.js: ScriptSnippetModel is now created after ResourceTreeModel. 2012-07-11 MORITA Hajime <morrita@google.com> WebCoreSupport needs objects each of which follows major WebCore objects https://bugs.webkit.org/show_bug.cgi?id=88499 Reviewed by Alexey Proskuryakov. This change - Makes Internals rough lifetime to follow Document. Note that Internals can survive longer than Document in same case. Internals::m_document is cleared when the document destruction is notified. - Makes InternalSettings rough lifetime to follow the Page. This is done by making InternalSettings a supplement of the page. Now InternalSettings object is created per Page instead of per Frame. Per-test setting clearance is done by newly introduced InternalSettings::Backup, which recovers the modified settings and refreshes it for each time a test starts. * WebCore.exp.in: * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::from): (WebCore::InternalSettings::~InternalSettings): (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::reset): (WebCore::InternalSettings::settings): (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame): (WebCore::InternalSettings::setFixedPositionCreatesStackingContext): (WebCore::InternalSettings::allowRoundingHacks): (WebCore::InternalSettings::userPreferredLanguages): (WebCore::InternalSettings::setUserPreferredLanguages): (WebCore::InternalSettings::setShouldDisplayTrackKind): (WebCore::InternalSettings::shouldDisplayTrackKind): (WebCore::InternalSettings::setPagination): * testing/InternalSettings.h: (Backup): (InternalSettings): (WebCore::InternalSettings::page): * testing/InternalSettings.idl: * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore): (WebCore::Internals::contextDocument): (WebCore::Internals::frame): (WebCore::Internals::settings): (WebCore::Internals::setPagination): Replaced as an alias. (WebCore::Internals::userPreferredLanguages): Replaced as an alias. (WebCore::Internals::setUserPreferredLanguages): Replaced as an alias. (WebCore::Internals::setShouldDisplayTrackKind): Replaced as an alias. (WebCore::Internals::shouldDisplayTrackKind): Replaced as an alias. (WebCore::Internals::emitInspectorDidBeginFrame): (WebCore::Internals::emitInspectorDidCancelFrame): (WebCore::Internals::allowRoundingHacks): Replaced as an alias. * testing/Internals.h: (WebCore): (Internals): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): 2012-07-11 Yoshifumi Inoue <yosin@chromium.org> [Mac] Expose time format related functions https://bugs.webkit.org/show_bug.cgi?id=90956 Reviewed by Kent Tamura. This patch introduces localizedTimeFormatText, localizedShortTimeFormatText and timeAMPMLabels for Mac within feature flag ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. See also: ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965 Win version: https://bugs.webkit.org/show_bug.cgi?id=90236 No new tests. This patch doesn't change behavior. * platform/text/mac/LocalizedDateMac.cpp: (WebCore::localizedTimeFormatText): Added. (WebCore::localizedShortTimeFormatText): Added. (WebCore::timeAMPMLabels): Added. 2012-07-11 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Adding HarfBuzz-ng for Linux https://bugs.webkit.org/show_bug.cgi?id=90362 Reviewed by Tony Chang. This patch adds harfbuzz-ng support for Chromium Linux port as a part of transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng callbacks by using Skia APIs. For now, the feature is enabled only when WTF_USE_HARFBUZZ_NG is defined. No new tests. No change in behavior now. * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files. * WebCore.gypi: Added HarfBuzzFaceSkia.cpp * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG). (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): (WebCore::Font::selectionRectForComplexText): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto. (WebCore): (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto. (FontPlatformData): * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added. (WebCore): (WebCore::SkiaScalarToHarfbuzzPosition): (WebCore::SkiaGetGlyphWidthAndExtents): (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzSkiaGetFontFuncs): (WebCore::harfbuzzSkiaGetTable): (WebCore::destroyPaint): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG). (WebCore::substituteWithVerticalGlyphs): 2012-07-11 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Clean up FileSystem related code https://bugs.webkit.org/show_bug.cgi?id=90592 Reviewed by Vsevolod Vlasov. Clean up FileSystem related code in Inspector as follows: - Clean up layout tests and add test case for error case, - Fix error handling on request, - s/GetFileSystemRootTask/FileSystemRootRequest/g - s/ReadDirectoryTask/DirectoryContentRequest/g - s/ReadFileTask/FileContentRequest/g Tests: http/tests/inspector/filesystem/request-directory-content.html http/tests/inspector/filesystem/request-file-content.html http/tests/inspector/filesystem/request-filesystem-root.html http/tests/inspector/filesystem/request-metadata.html * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileSystemRoot): Add early error handling. (WebCore::InspectorFileSystemAgent::requestDirectoryContent): Add early error handling. (WebCore::InspectorFileSystemAgent::requestMetadata): Add early error handling. (WebCore::InspectorFileSystemAgent::requestFileContent): Add early error handling. * inspector/InspectorFileSystemAgent.h: Remove unused forward declaration and unused header. (WebCore): (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot): Add early error handling. (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent): Add early error handling. (WebInspector.FileSystemRequestManager.prototype.requestMetadata.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestMetadata): Add early error handling. (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileContent): Add early error handling. 2012-07-09 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Forward message loop instrumentation data to frontend. https://bugs.webkit.org/show_bug.cgi?id=89584 Reviewed by Yury Semikhatsky. Transmit collected message loop tasks to inspector frontend. Now "Program" should be a top-level event on browsers that support message loop instrumentation. Frontend was changed so that user will not see any changes. * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): Added new event type - "Program" (WebCore::InspectorTimelineAgent::willProcessTask): Begin "Program" event. (WebCore::InspectorTimelineAgent::didProcessTask): Finish "Program" event. (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): Do not add counters to "Program" events. (WebCore): (WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic): Renamed from "setHeapSizeStatistic" * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): Unwraps "Program" events. (WebInspector.MemoryStatistics.prototype._innerRecordAdded): Renamed from "_onRecordAdded" * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): Unwraps "Program" events. (WebInspector.TimelineFrameController.prototype._innerAddRecord): Renamed from "_addRecord" * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): Filter out "Program" category. (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): Filter out "Program" category. (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): Unwraps "Program" events. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): Added "Program" category. (WebInspector.TimelinePresentationModel.recordStyle): Ditto. (WebInspector.TimelinePresentationModel.prototype.addRecord): Unwraps "Program" events. (WebInspector.TimelinePresentationModel.prototype._addRecord): Renamed from "addRecord" 2012-07-11 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Adding HarfBuzz-ng for Linux https://bugs.webkit.org/show_bug.cgi?id=90362 Reviewed by Tony Chang. This patch adds harfbuzz-ng support for Chromium Linux port as a part of transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng callbacks by using Skia APIs. For now, the feature is enabled only when WTF_USE_HARFBUZZ_NG is defined. No new tests. No change in behavior now. * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files. * WebCore.gypi: Added HarfBuzzFaceSkia.cpp * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG). (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): (WebCore::Font::selectionRectForComplexText): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto. (WebCore): (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto. (FontPlatformData): * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added. (WebCore): (WebCore::SkiaScalarToHarfbuzzPosition): (WebCore::SkiaGetGlyphWidthAndExtents): (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzSkiaGetFontFuncs): (WebCore::harfbuzzSkiaGetTable): (WebCore::destroyPaint): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG). (WebCore::substituteWithVerticalGlyphs): 2012-07-11 Kenneth Russell <kbr@google.com> compositing/webgl/webgl-nonpremultiplied-blend.html is flaky on Lion https://bugs.webkit.org/show_bug.cgi?id=82412 Reviewed by Adrienne Walker. When compositing premultipliedAlpha=false WebGL canvases, use a separate blend function for the alpha channel to avoid writing alpha < 1. This makes the behavior more consistent with all other compositing results and avoids situations where the alpha channel is preserved on some platforms and discarded on others. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawTextureQuad): Use separate alpha blend function when compositing premultipliedAlpha=false WebGL canvases. 2012-07-10 Yoshifumi Inoue <yosin@chromium.org> [Chromium-Windows] Implement functions for localized time format information https://bugs.webkit.org/show_bug.cgi?id=90236 Reviewed by Kent Tamura. This patch introduces following localized time format related functions: - localizedTimeFormatText - localizeShortTimeFormatText() - timeAMPMLabels for Windows in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. See also: ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965 Mac version: https://bugs.webkit.org/show_bug.cgi?id=90237 Tests: WebKit/chromium/tests/LocalWinTest.cpp * platform/text/LocaleWin.cpp: (WebCore::mapCharacterToDateTimeFieldType): Added. (WebCore::convertWindowsTimeFormatToLDML): Added. (WebCore::LocaleWin::timeFormatText): Added. (WebCore::LocaleWin::shortTimeFormatText): Added. (WebCore::LocaleWin::timeAMPMLabels): Added. * platform/text/LocaleWin.h: (LocaleWin): Added time format related functions and variables. * platform/text/LocalizedDateWin.cpp: (WebCore::localizedTimeFormatText): Added. (WebCore::localizedShortTimeFormatText): Added. (WebCore::timeAMPMLabels): Added. 2012-07-10 Douglas Stockwell <dstockwell@chromium.org> Style not updated for element with display:none becoming first/last-child https://bugs.webkit.org/show_bug.cgi?id=90356 Reviewed by Kent Tamura. Always trigger style recalc when an element without a renderer becomes the first/last-child. Tests: fast/css/first-child-display-change.html fast/css/last-child-display-change.html * dom/Element.cpp: (WebCore::checkForSiblingStyleChanges): 2012-07-10 Shinya Kawanaka <shinyak@chromium.org> ShadowRoot should know its type in debug build. https://bugs.webkit.org/show_bug.cgi?id=90933 Reviewed by Hajime Morita. For assertion, ShadowRoot should know its type is UserAgentShadowRoot or AuthorShadowRoot. This patch also renames ShadowRootCreationPurpose to ShadowRootType, since it is suitable name for ShadowRoot to have. No new tests, since it is used only for assertion. * dom/Element.cpp: (WebCore::Element::ensureShadowRoot): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::create): * dom/ShadowRoot.h: (ShadowRoot): (WebCore::ShadowRoot::type): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): * html/InputType.cpp: (WebCore::InputType::destroyShadowSubtree): Asserts that ShadowRoot type is UserAgentShadowRoot. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::getDecorationRootAndDecoratedRoot): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::createShadowSubtree): 2012-07-10 George Staikos <staikos@webkit.org> Add missing binding type String for IndexedDB. https://bugs.webkit.org/show_bug.cgi?id=90351 Reviewed by Nikolas Zimmermann. No new tests because it's already covered by IDB tests. * bindings/js/JSIDBAnyCustom.cpp: (WebCore::toJS): 2012-07-10 Brian Anderson <brianderson@chromium.org> [chromium] Make full texture updates explicit https://bugs.webkit.org/show_bug.cgi?id=90507 Reviewed by Adrienne Walker. Covered by existing tests. * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::updatePart): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::appendFullUpdate): (WebCore::CCTextureUpdater::hasMoreUpdates): (WebCore::CCTextureUpdater::update): (WebCore::CCTextureUpdater::clear): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): 2012-07-10 Shinya Kawanaka <shinyak@chromium.org> Crash in nextLinePosition() due to accessing a removed root line box. https://bugs.webkit.org/show_bug.cgi?id=90484 Reviewed by Abhishek Arya. When <object> element is reattached, the 'content' style is compared to the old style. If it is not the same, a flag to recalc style is enabled. Because of this, the recalc style flag is not cleared in updateLayoutIgnorePendingStyleSheets() in nextLinePosition(), and it causes the second layout in isEditablePosition(p). Then 'RootInlineBox root' is invalidated, but it's used after that. When the content of the same <object> elements are compared, they should be the same. However, operator== for ContentData is not implemented correctly (it compares a pointer instead of content). So operator== does not hold for the content of the same <object> elements. Test: editing/execCommand/crash-extend-selection-forward.html * rendering/style/ContentData.cpp: (WebCore::operator==): Compares the instance of data instead of pointer. 2012-07-10 Joshua Bell <jsbell@chromium.org> IndexedDB: Ensure transaction abort events are deterministic in multiprocess ports https://bugs.webkit.org/show_bug.cgi?id=90412 Reviewed by Tony Chang. In multi-process ports (e.g. Chromium), transaction aborts triggered on the front-end could be initiated while a "success" event was in-flight from the back end. This would lead to apparently flaky behavior when requests would sometimes report success and sometimes report an error. Address this by having front-end triggered aborts do the abort steps immediately, then send the async abort request to the back end. No new tests - behavior in single process ports (and DRT) covered by existing tests. Will enable currently disabled Chromium tests to be enabled (crbug.com/83226). * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): Initialize a new m_requestAborted flag, used to prevent dispatching if an in-flight request comes in after the abort. (WebCore::IDBRequest::abort): Set flag to prevent double dispatching. (WebCore::IDBRequest::onError): Handle aborted-then-received-event case. (WebCore::IDBRequest::onSuccess): Ditto. (WebCore::IDBRequest::onSuccessWithContinuation): Ditto. (WebCore::IDBRequest::dispatchEvent): On uncaught error, trigger abort on transaction front-end. * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::abort): Do abort steps locally first, then notify back-end. (WebCore::IDBTransaction::onAbort): If abort wasn't triggered locally, clean up is still necessary. 2012-07-10 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION(r112113): absolutely positioned INPUT boxes with a table cell containing block have a 0px height https://bugs.webkit.org/show_bug.cgi?id=89209 Reviewed by Ojan Vafai. Test: fast/forms/input-in-table-cell-no-value.html The issue comes from the layout code not properly resetting the overriden heigth between layouts. The test case relies on a table cell as it requires a 2 pass layout. Between the 2 passes, different code paths would be taken, leading to previous values being used to over-constrain the inner content. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): Ensure consistent layout by resetting any overriden conditional height. 2012-07-10 Kevin Ellis <kevers@chromium.org> Input elements with type=range do not have default touch handlers. https://bugs.webkit.org/show_bug.cgi?id=88807 Reviewed by Antonio Gomes. This patch adds support for touch event handling on input elements and dragging a slider with touch start and move events. Previously, manipulating a slider on a touch screen required generation of synthetic mouse events. Tests: fast/events/touch/touch-slider-no-js-touch-listener.html fast/events/touch/touch-slider.html * dom/Event.cpp: (WebCore::Event::isTouchEvent): (WebCore): * dom/Event.h: (Event): * dom/Touch.cpp: (WebCore::Touch::Touch): * dom/Touch.h: (WebCore::Touch::absoluteLocation): (Touch): * dom/TouchEvent.cpp: (WebCore::TouchEvent::isTouchEvent): (WebCore): * dom/TouchEvent.h: (TouchEvent): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::~HTMLInputElement): (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::defaultEventHandler): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore): (WebCore::InputType::handleTouchEvent): (WebCore::InputType::hasTouchEventHandler): * html/InputType.h: (WebCore): (ClickHandlingState): (InputType): * html/RangeInputType.cpp: (WebCore): (WebCore::RangeInputType::handleTouchEvent): (WebCore::RangeInputType::hasTouchEventHandler): * html/RangeInputType.h: (RangeInputType): * html/shadow/SliderThumbElement.h: (SliderThumbElement): 2012-07-10 Pravin D <pravind.2k4@gmail.com> Re-factoring recalcColumn in AutoTableLayout.cpp for readability https://bugs.webkit.org/show_bug.cgi?id=89636 Reviewed by Julien Chaffraix. No test case required. Code re-factoring. * rendering/AutoTableLayout.cpp: Added a const integer place holder for 32760. (WebCore::AutoTableLayout::recalcColumn): Changes : 1) Moved the continue statement above the bool cellHasContent for an early return. 2) Replaced the constant 32760 by a placeholder. 3) Initialization of columnLayout max and min logical widths is made common for both cells having col span == 1 and span > 1. 4) Removed redundant check for cell logical width type. 2012-07-10 Adam Barth <abarth@webkit.org> WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed https://bugs.webkit.org/show_bug.cgi?id=90910 Reviewed by Eric Seidel. We've already removed the code that implements Hixie76 WebSockets. This patch just removes the WebCore::Setting that used to control which WebSocket protocol version we'd use. I've left the WebKit-layer APIs in place, but they now don't do anything. I'll remove all the Chromium callers shortly. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): 2012-07-10 Philip Rogers <pdr@google.com> Crash due to SVG animation element not removed from target (before reset) https://bugs.webkit.org/show_bug.cgi?id=90750 Reviewed by Abhishek Arya. Previously we were not removing an animation element from SVGDocumentExtensions::m_animatedElements which led to a crash. This change properly removes animation elements in resetTargetElement which both fixes this bug and will prevent others from hitting it in the future. Test: svg/animations/dynamic-modify-attributename-crash2.svg * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget): removeAllAnimationElementsFromTarget now adds all the animation elements to a vector and iterates over it because the changes to resetTargetElement would have caused us to modify the underlying hashset as we iterated. Note that before we deleted animationElementsForTarget in removeAllAnimationElementsFromTarget but that logic is now handled in removeAnimationElementFromTarget which is called during resetTargetElement. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::removedFrom): Because of the changes in resetTargetElement, removedFrom was able to be refactored. This patch changes removedFrom to call resetTargetElement rather than have duplicated logic. There is a very small change in logic here: animationAttributeChanged() is now called in removedFrom(). (WebCore::SVGSMILElement::resetTargetElement): resetTargetElement now fully resets the target, including removing it from m_animatedElements. This will prevent future instances of this bug. 2012-07-10 Helder Correia <helder.correia@nokia.com> [Qt] Repaint counter for accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=90116 Reviewed by Noam Rosenthal. No new tests, just introducing a debug feature. For this feature to be enabled, the environment variable QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled, both repaint counters and tile borders will be painted. Important notes: - Only WebKit2 is targetted for now. - There is no integration with Preferences. That aproach was taken initially but revealed complex and overkill for such a debugging-only functionality. Thus, to disable it simply restart with the environment variable unset or set to some other value. A Qt-specific drawRepaintCounter() function was added to TextureMapperGL. A QImage is used as scratch buffer to paint borders and counters. It is then uploaded to a BitmapTexture acquired from the pool and finally draw by TextureMapper. The actual compositing happens inside LayerBackingStore::paintToTextureMapper(). Each LayerBackingStoreTile now has a repaint counter which gets incremented in LayerBackingStore::updateTile(). * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore): (WebCore::TextureMapperGL::drawRepaintCounter): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperImageBuffer.h: 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Replace use of ManagedTexture with CCScopedTexture for impl thread and remove implTextureManager from LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=90841 Reviewed by Adrienne Walker. Remove the TextureManager from LayerRendererChromium, which was the last instance of the class in the compositor. Instead of using ManagedTexture objects for RenderPass textures, use instances of CCScopedTexture, which manage the lifetime of the allocated texture ids. TextureManager will be removed entirely once all callers of memoryUseBytes() have been removed. No new tests. No change in behaviour. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderPassTextures): (WebCore): (WebCore::LayerRendererChromium::renderPassTextureSize): (WebCore::LayerRendererChromium::renderPassTextureFormat): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId): (WebCore::LayerRendererChromium::drawQuad): (WebCore::applyFilters): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::isCurrentRenderPass): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::useScopedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: (WebCore::TrackingTextureAllocator::create): (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCRenderer.h: (WebCore): (CCRenderer): 2012-07-10 Dean Jackson <dino@apple.com> REGRESSION (r109610): Order of values in shorthand animation makes a difference https://bugs.webkit.org/show_bug.cgi?id=84533 <rdar://problem/11831924> <rdar://problem/11815787> Reviewed by Simon Fraser. A previous revision (r109610) updated the parsing of the animation shorthand to make sure that animation-name wouldn't clobber other styles. The side effect of this was that we'd no longer find animation-name if it wasn't first in the list. This commit reverts the change and fixes it in a different way, by always parsing animation-name as the last property in the shorthand. This means that keywords for timing functions, fill modes and iteration will match before animation name. In other words, if you want an animation called "forwards" you should use the longhand property, because the shorthand will first match that against animation-fill-mode. Test: animations/animation-shorthand-name-order.html * css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationShorthand): make a new array of longhand properties to check for, with name as the last entry rather than the first. Use this array to test the properties in the shorthand. 2012-07-10 Huang Dongsung <luxtella@company100.net> Fix a potential bug of BitmapImage::frameCount(). https://bugs.webkit.org/show_bug.cgi?id=90756 Reviewed by Simon Fraser. If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This does not mean that the frame count is actually 0. So we must set m_haveFrameCount to true only when m_frameCount is not 0. The current code is okay because BitmapImage::frameCount() is never called before the decoder is initialized. However, this no longer holds true once we introduce parallel image decoders. No new tests, no behavior change. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::frameCount): 2012-07-10 Ojan Vafai <ojan@chromium.org> Build fix. Removing unused variable from http://trac.webkit.org/changeset/122264. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeContentLogicalHeightUsing): 2012-07-10 Ryosuke Niwa <rniwa@webkit.org> HTMLPropertiesCollection should share more code with HTMLCollection https://bugs.webkit.org/show_bug.cgi?id=90842 Reviewed by Anders Carlsson. Got rid of HTMLPropertiesCollection::m_cache, and added m_itemRefElements, m_propertyNames, m_propertyCache, m_hasPropertyNameCache, and m_hasItemRefElements to HTMLPropertiesCollection itself. These are caches specific to HTMLPropertiesCollection. Note that hasNameCache has been renamed to m_hasPropertyNameCache and itemRefElementPosition has been replaced by cachedElementsArrayOffset() in HTMLCollectionCacheBase (also used in HTMLFormCollection). Also deleted all methods on m_cache except updatePropertyCache since caches can be accessed directly from HTMLPropertiesCollection. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::invalidateCache): * html/HTMLCollection.h: (HTMLCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore): (WebCore::HTMLPropertiesCollection::updateRefElements): (WebCore::HTMLPropertiesCollection::itemAfter): (WebCore::HTMLPropertiesCollection::calcLength): (WebCore::HTMLPropertiesCollection::cacheFirstItem): (WebCore::HTMLPropertiesCollection::item): (WebCore::HTMLPropertiesCollection::findProperties): (WebCore::HTMLPropertiesCollection::updateNameCache): (WebCore::HTMLPropertiesCollection::names): (WebCore::HTMLPropertiesCollection::namedItem): (WebCore::HTMLPropertiesCollection::hasNamedItem): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::clearCache): (WebCore::HTMLPropertiesCollection::updatePropertyCache): 2012-07-10 Ojan Vafai <ojan@chromium.org> Add support for min-height:auto and min-width:auto https://bugs.webkit.org/show_bug.cgi?id=88437 Reviewed by Tony Chang. Right now auto does the same thing as min-height/min-width:0. For flex-items it should be the same as min-content (followup patch). http://dev.w3.org/csswg/css3-flexbox/#min-size-auto Tests: fast/css/auto-min-size.html fast/css/deprecated-flexbox-auto-min-size.html * WebCore.order: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Return 0px for the computed value of auto. * css/CSSParser.cpp: (WebCore::CSSParser::validWidth): (WebCore): (WebCore::CSSParser::validHeight): (WebCore::CSSParser::parseValue): * css/CSSParser.h: (CSSParser): Restructure width/height parsing to reduce code duplication and make it easier to add auto as a valid min value. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSizeConstraints): This code was unnecessarily checking intrinsicOrAuto since auto was previously not an allowed value for minWidth/minHeight. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): (WebCore::RenderBox::sizesLogicalWidthToFitContent): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computeContentLogicalHeightUsing): (WebCore::RenderBox::computeReplacedLogicalWidth): (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::RenderBox::computePositionedLogicalHeight): (WebCore::RenderBox::computePositionedLogicalHeightUsing): Need to pass a SizeType to all these methods so that we know if the Length we're working with is a min length since auto has a different meaning now for min lengths. * rendering/RenderBox.h: (RenderBox): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): (WebCore::RenderFlexibleBox::lineBreakLength): (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/RenderScrollbarPart.cpp: (WebCore::calcScrollbarThicknessUsing): (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): * rendering/style/RenderStyle.h: Default minHeight/minWidth to auto instead of 0px. 2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle() https://bugs.webkit.org/show_bug.cgi?id=90826 Reviewed by Adam Barth. No new tests. The change to this file is refactoring only. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike(). 2012-07-10 Raymond Toy <rtoy@google.com> AudioFIFO not correctly wrapping the write index on push https://bugs.webkit.org/show_bug.cgi?id=90901 Reviewed by Chris Rogers. No new tests * platform/audio/AudioFIFO.cpp: (WebCore::AudioFIFO::push): Wrap the write index, not read index! 2012-07-10 Dana Jansens <danakj@chromium.org> [chromium] Avoid allocating render pass textures that have no content https://bugs.webkit.org/show_bug.cgi?id=90702 Reviewed by Adrienne Walker. When OOM conditions are hit, textures are not allocated for some layers which can prevent any quads from being present for a render surface. This is used as a signal to prevent the RenderPass from allocating a texture. Replace the CCLayerTreeHostImpl::removePassesWithCachedTextures() method with a general removeRenderPasses() which takes a culling control object and will remove passes based on the inputs from the control object. This new method is used for the old purpose of removing passes with cached textures, as well as to remove passes that do not have any quad inputs. Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass): (WebCore::CCLayerTreeHostImpl::removeRenderPasses): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (CullRenderPassesWithCachedTextures): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListBegin): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListEnd): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListNext): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::CullRenderPassesWithCachedTextures): (CCLayerTreeHostImpl): (CullRenderPassesWithNoQuads): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListBegin): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListEnd): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListNext): 2012-07-10 Joshua Netterfield <jnetterfield@rim.com> Make GC3D and E3D more maintainable for GLES platforms https://bugs.webkit.org/show_bug.cgi?id=90567 Reviewed by Rob Buis. This patch cleans up code for WebGL on OpenGLES platforms which use GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL, GraphicsContext3DOpenGLCommon, and GraphicsContext3DOpenGLES, this patch is an attempt to refactor this code in a way that will help BlackBerry and other teams support WebGL on mobile platforms with as little use of "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the separation of Extensions3DOpenGL into Extensions3DOpenGLCommon, Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction of OpenGLESShims. This patch is created in large part by Jonathan Feldstein. No new tests: no new behaviour. * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build * Target.pri: Add new Extensions3DOpenGL* to WebGL builds * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function. (WebCore): * platform/graphics/OpenGLESShims.h: Added. * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports (WebCore): (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon (WebCore): (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::supports): (WebCore::Extensions3DOpenGLCommon::ensureEnabled): (WebCore::Extensions3DOpenGLCommon::isEnabled): (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB): (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does. (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLCommon): * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG): (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG): (WebCore::Extensions3DOpenGLES::createVertexArrayOES): (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES): (WebCore::Extensions3DOpenGLES::isVertexArrayOES): (WebCore::Extensions3DOpenGLES::bindVertexArrayOES): (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports (WebCore::Extensions3DOpenGLES::getExtensions): * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLES): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateDepthStencil): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::isTexture): (WebCore): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::deleteBuffer): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore): (WebCore::GraphicsContext3D::releaseShaderCompiler): 2012-07-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=90646 <rdar://problem/11648478> 3-pass pagination slows down pagination Improve the logical top estimate function for margin collapsing to be more accurate. In particular make the basic case of <body><p> or <body><h1> no longer be wrong. This estimate being incorrect is not a big deal most of the time, but when paginating it is a very big deal, since you have to relayout everything whenever your vertical placement is wrong. Improving the estimation exposed a bug in an existing layout test. I had to clean up the buggy code written for negative margin-related float detection and fix an invalid layout test to actually be correct. Reviewed by Simon Fraser. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::marginBeforeEstimateForChild): (WebCore): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::marginValuesForChild): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): 2012-07-10 Alexei Filippov <alexeif@chromium.org> Web Inspector: Count inspector memory used to traverse DOM in native memory snapshots. https://bugs.webkit.org/show_bug.cgi?id=90456 Inspector may take significant amount of memory when traversing DOM structure. Take it into account and report under inspector memory. Reviewed by Pavel Feldman. * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryInstrumentation::calculateContainerSize): (WebCore::MemoryInstrumentation::reportHashMap): (WebCore::MemoryInstrumentation::reportHashSet): (WebCore::MemoryInstrumentation::reportVector): * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::domTreeInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): 2012-07-10 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [GTK] Fix memory leaks by adopting allocation of GdkPixbuf https://bugs.webkit.org/show_bug.cgi?id=90790 Reviewed by Carlos Garcia Campos. Fixed a memory leak in paintGdkPixbuf by adopting an allocation of GdkPixbuf. No new tests. No change in behavior. * platform/gtk/RenderThemeGtk.cpp: (WebCore::paintGdkPixbuf): 2012-07-10 Konrad Piascik <kpiascik@rim.com> Web Inspector: Geolocation override https://bugs.webkit.org/show_bug.cgi?id=89365 Reviewed by Yong Li. Added a way to override the geoloation of a client using Web Inspector. New tests added. * LayoutTests/inspector/geolocation-success.html: * LayoutTests/inspector/getlocation-error.html: * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::GeolocationController): Now store and save the Page in m_page. (WebCore::GeolocationController::positionChanged): Check if position is overriden in Web Inspector. * Modules/geolocation/GeolocationController.h: (GeolocationController): Add member variable m_page for Page*. * inspector/Inspector.json: Add new methods for setting and clearing the GeoloationPosition and GeolocationError objects in InspectorPageAgent. * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::checkGeolocationPositionOrErrorImpl): Add methods to check whether GeolocationPosition or GeolocationError are set in InspectorPageAgent. * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::checkGeolocationPositionOrError): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): Initialize new member variables of GeolocationPosition and GeolocationError. (WebCore::InspectorPageAgent::setGeolocationData): Set Position and Error data and call appropriate GeolocaitonController methods. (WebCore): (WebCore::InspectorPageAgent::clearGeolocationData): (WebCore::InspectorPageAgent::sendGeolocationError): * inspector/InspectorPageAgent.h: (WebCore::InspectorPageAgent::geolocationPosition): Getter for GeolocationPosition. (InspectorPageAgent): * inspector/front-end/Settings.js: Added new settings for GeolocationPosition and GeolocationError * inspector/front-end/SettingsScreen.js: Added new control for Geolocaiton. (WebInspector.UserAgentSettingsTab): (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement): (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked): (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput): (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if): (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition): (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput): (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement): * inspector/front-end/UserAgentSupport.js: New GeolocationPosition Object added along with setting helper methods. Added new setting changed handlers for Position and Error. (WebInspector.UserAgentSupport.GeolocationPosition): (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting): (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting): (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput): (WebInspector.UserAgentSupport.prototype.get _onGeolocationErrorChanged): 2012-07-10 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Refactor resource revisions before moving to UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=90855 Reviewed by Pavel Feldman. Revisions are now persisted based on mainFrame.loaderId, not resource.loaderId which makes filtering out stale persisted revisions easier. Restoring revisions from local storage is separated from filtering out stale persisted revisions. Resource._clearRevisionHistory and Resource._restoreRevisions are not static anymore. Renamed localStorage field for persisting revisions: "resource-history" -> "revision-history" * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.addRevision): (WebInspector.Resource.prototype._restoreRevisionHistory): (WebInspector.Resource.prototype._clearRevisionHistory): (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory): (WebInspector.Resource.prototype.revertAndClearHistory): (WebInspector.Revision): (WebInspector.Revision._revisionHistoryRegistry): (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist): (WebInspector.Revision._ensureStaleRevisionsFileteredOut): (WebInspector.Revision.prototype._persist): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._processCachedResources): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): * inspector/front-end/RevisionHistoryView.js: * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._revisionAdded): 2012-07-10 Alice Cheng <alice_cheng@apple.com> Editing: Reproducible crasher when pasting a 0x0 image into Mail https://bugs.webkit.org/show_bug.cgi?id=90640 <rdar://problem/11141920> Reviewed by Brady Eidson. 0x0 images don't get a resource representation in the WebArchive, so we need a null check Test: TestWebKitAPI/Tests/mac/0.png TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm * platform/mac/PasteboardMac.mm: (WebCore::documentFragmentWithImageResource): 2012-07-10 Nikita Vasilyev <me@elv1s.ru> Web Inspector: Make the Tab character 4 spaces width https://bugs.webkit.org/show_bug.cgi?id=90172 Reviewed by Pavel Feldman. Do it to match most code editors' behavior. * inspector/front-end/inspectorCommon.css: (body): 2012-07-10 Eric Seidel <eric@webkit.org> REGRESSION (r122168): Layout Test http/tests/misc/script-defer.html is failing https://bugs.webkit.org/show_bug.cgi?id=90845 Reviewed by Alexey Proskuryakov. I was a bit overzealous in removing bool returns. This one still makes sense. This just reverts the wrong part of my previous change. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd): * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): * html/parser/HTMLScriptRunner.h: (HTMLScriptRunner): 2012-07-10 Kevin Ellis <kevers@chromium.org> Input type=range issue with events not being raised when value set in js https://bugs.webkit.org/show_bug.cgi?id=84674 Fix dispatching of change and click events for the input slider. Prior to the fix, change events were not fired if the new value matched the value at last change notification based on expected behavior for text fields. Clicks were not fired if the thumb element was repositioned under the cursor on mouse down. Reviewed by Kent Tamura. Tests: fast/events/click-range-slider.html fast/events/onchange-range-slider.html * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): 2012-07-10 Huang Dongsung <luxtella@company100.net> Don't destroy the decoded data of an image if WebKit is about to render the image. https://bugs.webkit.org/show_bug.cgi?id=90721 Reviewed by Antti Koivisto. When the cache capacity of the MemoryCache is exceeded, the decoded data of all the CachedImages are destroyed. Even the images inside the viewport are destroyed. However, if the images need to be rendered again due to scoll events or animation, they must be decoded again. As an extreme case, if there is an animation with an image when MemoryCache is almost full, the image must be decoded every frame. This slows down animation and needlessly consumes CPU cycles. Therefore, it is better to not destory the decoded data of an image if the image is inside the viewport because there is high chance that the image needs to be rendered again soon. This patch reduces the unnecessary repetition of image decoding on low memory, and also relieves the memory fragmentation because it avoids reallocation of image frames. In addition, there is another positive side effect. Currently, CachedImageClient::willRenderImage() is used only to determine if GIF animation needs to be paused or not in CachedImage::shouldPauseAnimation(). This patch makes GIF animation outside the viewort be paused. This is also a prerequisite for parallel image decoders. Because parallel image decoders decode an image asynchronously, clients cannot render the image at the time when the request is made. Clients can draw the image later after receiving image decoding complete notification. However, there is a problem because MemoryCache can destroy the decoded data before clients actually render the image. So parallel image decoders must prevent the decoded data from being destroyed if the image will be rendered soon. This patch may consume a little more memory, but furtunately the peak memory usage is almost the same. No new tests - no new testable functionality. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::likelyToBeUsedSoon): (WebCore): (WebCore::CachedImage::shouldPauseAnimation): * loader/cache/CachedImage.h: (CachedImage): * loader/cache/CachedResource.h: (CachedResource): (WebCore::CachedResource::likelyToBeUsedSoon): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): * rendering/RenderObject.cpp: (WebCore::RenderObject::willRenderImage): 2012-07-10 Kent Tamura <tkent@chromium.org> RTL calendar picker for <input type=date> is too narrow and clipped https://bugs.webkit.org/show_bug.cgi?id=90864 Reviewed by Kentaro Hara. Tests: ManualTests/forms/calendar-picker.html * Resources/calendarPicker.js: (fixWindowSize): Checks the left edge of elemenets in RTL. (layout): Add dir=ltr for the manual test, which re-uses the document. 2012-07-10 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122178. http://trac.webkit.org/changeset/122178 https://bugs.webkit.org/show_bug.cgi?id=90857 browser tests, PrerenderBrowserTest.PrerenderFavicon and other tests, started to fail (Requested by hayato on #webkit). * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::iconURLs): (WebCore::Document::addIconURL): (WebCore::Document::setUseSecureKeyboardEntryWhenActive): * dom/Document.h: (Document): * html/HTMLLinkElement.cpp: * html/HTMLLinkElement.h: (HTMLLinkElement): * testing/Internals.cpp: * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-07-10 Adam Barth <abarth@webkit.org> LayoutTestController.dumpConfigurationForViewport should move to Internals https://bugs.webkit.org/show_bug.cgi?id=45652 Reviewed by Eric Seidel. This patch replaces LayoutTestController.dumpConfigurationForViewport with Internals.configurationForViewport. The old dumpConfigurationForViewport function just ended up calling WebCore functions anyway, so there's no benefit in implementing the API in the LayoutTestController. As a result, these tests can now run on every port. * testing/Internals.cpp: (WebCore::Internals::configurationForViewport): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-07-10 Carlos Garcia Campos <cgarcia@igalia.com> Unreviewed. Fix GTK+ build after r122175. * platform/graphics/texmap/TextureMapperLayer.cpp: Include CString.h when using cairo. 2012-07-10 Yoshifumi Inoue <yosin@chromium.org> [Chromium-Mac] Form related layout tests cause timeout https://bugs.webkit.org/show_bug.cgi?id=90851 Reviewed by Kent Tamura. This patch changed to pass a valid argument to LocaleMac constructor. No new tests. No more timeout in tests listed in the bug. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::currentLocale): Changed to pass local identifier string instead of NSLocale object. 2012-07-10 Yuta Kitamura <yutak@chromium.org> WebSocket: Remove hixie76 protocol implementation https://bugs.webkit.org/show_bug.cgi?id=88620 Reviewed by Adam Barth. This change removes code that implements the old hixie-76 WebSocket protocol which isn't used anymore. No new tests are added, because the code using the current protocol should not be affected. Tests for hixie-76 protocol are skipped (these tests will be removed eventually). * Modules/websockets/ThreadableWebSocketChannel.h: * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: (ThreadableWebSocketChannelClientWrapper): * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::WebSocket): (WebCore::WebSocket::connect): (WebCore::WebSocket::send): (WebCore::WebSocket::protocol): (WebCore::WebSocket::extensions): (WebCore::WebSocket::binaryType): (WebCore::WebSocket::setBinaryType): (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didClose): (WebCore::WebSocket::getFramingOverhead): * Modules/websockets/WebSocket.h: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::send): (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::processBuffer): (WebCore::WebSocketChannel::startClosingHandshake): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::abortOutgoingFrameQueue): * Modules/websockets/WebSocketChannel.h: (WebSocketChannel): * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::WebSocketHandshake): (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): (WebCore::WebSocketHandshake::readServerHandshake): (WebCore::WebSocketHandshake::checkResponseHeaders): * Modules/websockets/WebSocketHandshake.h: * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create): (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask): (WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WorkerThreadableWebSocketChannel): (Peer): (Bridge): 2012-07-09 Gavin Barraclough <barraclough@apple.com> Threadsafety issues in WebScriptObject https://bugs.webkit.org/show_bug.cgi?id=90849 Reviewed by Filip Pizlo. WebScriptObject maintains a NSMap of wrapper objects. A race condition exists between a wrapper being retrieved from the map, and being released - if the final release on an object is called between a call to getJSWrapper and the subsequent retain, we may end up with a stale object reference. We can make this safe by hoisting the removal from the map from delloc up into release (if the retainCount is 1), and locking release against retrieval from the map. Since release may be called from another thread, and NSMap is not threadsafe, we'd better lock around all access to the map (this fix already necessitates get & remove to be locked, so this just adds 'add', too). * bindings/objc/WebScriptObject.mm: (WebCore::createJSWrapper): - lock around getJSWrapper, retain. (-[WebScriptObject _setImp:originRootObject:rootObject:]): - lock around addJSWrapper. (-[WebScriptObject release]): - Added; removeJSWrapper for last release, lock & synchronized vs. getJSWrapper. (-[WebScriptObject dealloc]): - removeJSWrapper call hoisted into release. 2012-07-09 Christophe Dumez <christophe.dumez@intel.com> [EFL] Battery status code needs refactoring to be reused in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=90760 Reviewed by Hajime Morita. Rename BatteryClientEfl to BatteryProviderEfl and remove dependency on BatteryController by introducing the BatteryProviderEflClient interface. This will allow reusing the BatteryProviderEfl class in WebKit2. No new tests. Already tested by batterystatus/*. * PlatformEfl.cmake: * platform/efl/BatteryProviderEfl.cpp: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.cpp. (WebCore): (WebCore::BatteryProviderEfl::BatteryProviderEfl): (WebCore::BatteryProviderEfl::batteryStatus): (WebCore::BatteryProviderEfl::startUpdating): (WebCore::BatteryProviderEfl::stopUpdating): (WebCore::BatteryProviderEfl::setBatteryStatus): (WebCore::BatteryProviderEfl::timerFired): (WebCore::BatteryProviderEfl::getBatteryStatus): (WebCore::BatteryProviderEfl::setBatteryClient): * platform/efl/BatteryProviderEfl.h: Copied from Source/WebCore/platform/efl/BatteryClientEfl.h. (WebCore): (BatteryProviderEfl): (WebCore::BatteryProviderEfl::~BatteryProviderEfl): * platform/efl/BatteryProviderEflClient.h: Added. (WebCore): (BatteryProviderEflClient): 2012-07-09 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Fix a wrong fix of r122194. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): 2012-07-09 Matt Falkenhagen <falken@chromium.org> Add ENABLE_DIALOG_ELEMENT and skeleton files https://bugs.webkit.org/show_bug.cgi?id=90521 Reviewed by Kent Tamura. This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added. The feature is diabled by default. No new tests, as there is no behavior change. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog. (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled): (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): * dom/ContextFeatures.cpp: (WebCore::ContextFeatures::dialogElementEnabled): (WebCore): * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off. * html/HTMLDialogElement.cpp: Added. (WebCore): (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::create): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::show): * html/HTMLDialogElement.h: Added. (WebCore): (HTMLDialogElement): * html/HTMLDialogElement.idl: Added. * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-07-09 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Remove an assertion starting to fail on interactive_ui_tests on Chromium OS. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): 2012-07-09 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Build fix after r122175 * WebCore.gypi: Remove Source/WebCore/platform/graphics/qt/Extensions3DQt.{cpp,h} 2012-07-09 Kiran Muppala <cmuppala@apple.com> Improve performance of RenderInline::absoluteQuads for deeply nested inlines. https://bugs.webkit.org/show_bug.cgi?id=90715 Reviewed by Maciej Stachowiak. No new tests: functionality unchanged. * rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a RenderGeometryMap and use it for subsequent mappings. (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext): (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()): 2012-07-09 Yoshifumi Inoue <yosin@chromium.org> [Chromium-Mac] Implement functions for localized time format information https://bugs.webkit.org/show_bug.cgi?id=90237 Reviewed by Kent Tamura. This patch introduces following localized time format related functions: - localizeTimeFormatText() - localizeShortTimeFormatText() - timeAMPMLabels for Mac OSX in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. These function will be used by input type "time" with multiple input fields UI. Note: ICU version of localized time format functions are implemented in https://bugs.webkit.org/show_bug.cgi?id=89965 Tests: WebKit/chromium/tests/LocaleMacTest.cpp * platform/text/mac/LocaleMac.h: (LocaleMac): Added time format related functions and variables. * platform/text/mac/LocaleMac.mm: (WebCore::createDateTimeFormatter): Added. A helper function for creating date time formatter. (WebCore::LocaleMac::createShortDateFormatter): Changed to use createDateTimeFormatter. (WebCore::LocaleMac::createTimeFormatter): Added. (WebCore::LocaleMac::createShortTimeFormatter): Added. (WebCore::LocaleMac::timeFormatText): Added. (WebCore::LocaleMac::shortTimeFormatText): Added. (WebCore::LocaleMac::timeAMPMLabels): Added. 2012-07-09 Alexandru Chiculita <achicu@adobe.com> [CSS Shaders] The FECustomFilter is not making the GL context active https://bugs.webkit.org/show_bug.cgi?id=90840 Reviewed by Dean Jackson. I've added a couple of makeContextCurrent() in the FECustomFilter related classes. Also, removed the assumption that GraphicsContext3D::create() never returns 0. No new tests, this was crashing on existing tests. * platform/graphics/filters/CustomFilterCompiledProgram.cpp: (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram): (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram): * platform/graphics/filters/CustomFilterGlobalContext.cpp: (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): * platform/graphics/filters/CustomFilterMesh.cpp: (WebCore::CustomFilterMesh::CustomFilterMesh): (WebCore::CustomFilterMesh::~CustomFilterMesh): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::deleteRenderBuffers): (WebCore::FECustomFilter::platformApplySoftware): (WebCore::FECustomFilter::initializeContext): * platform/graphics/filters/FECustomFilter.h: (FECustomFilter): 2012-07-09 Kent Tamura <tkent@chromium.org> REGRESSION(r114862-r114886): Fix a crash by switching the input type to hidden. https://bugs.webkit.org/show_bug.cgi?id=90774 Reviewed by Andreas Kling. Test: fast/forms/hidden/change-type-to-hidden-after-updating-value.html * dom/Element.cpp: (WebCore::Element::setAttributeInternal): Pass a copy of the existing Attribute object. 2012-07-07 Philippe Normand <pnormand@igalia.com> [GStreamer] cache video dimensions https://bugs.webkit.org/show_bug.cgi?id=90733 Reviewed by Martin Robinson. Invalidate the cached video dimensions whenever the video-sink sink pad caps change and let ::naturalSize() lazily recalculate them. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::naturalSize): (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): 2012-07-09 Eric Penner <epenner@google.com> [chromium] Merge updates and idle updates into one pass https://bugs.webkit.org/show_bug.cgi?id=90324 Reviewed by Adrienne Walker. We no longer need to do painting is passes in order to allocate memory in the right order. So this merges updates and idle updates into one pass. Covered by existing unit tests (some of which are updated with this patch). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::needMoreUpdates): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::needMoreUpdates): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::updateLayerRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::paintMasksForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-07-09 Yoshifumi Inoue <yosin@chromium.org> [Platform] Introduce LocaleMac class https://bugs.webkit.org/show_bug.cgi?id=90248 Reviewed by Kent Tamura. This patch moves implementation of localized date format related functions into LocaleMac class as of LocaleWin class for ease of maintain and using specific locale in testing rather than system default locale. Tests: WebKit/chromium/tests/LocaleMacTest.cpp * WebCore.gyp/WebCore.gyp: Include LocaleMac.mm * WebCore.gypi: * platform/text/mac/LocaleMac.h: Replace LocaleWin to LocaleMac. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::LocaleMac): (WebCore::LocaleMac::~LocaleMac): (WebCore::LocaleMac::create): (WebCore::LocaleMac::currentLocale): (WebCore::LocaleMac::createShortDateFormatter): (WebCore::LocaleMac::parseDate): (WebCore::LocaleMac::formatDate): (WebCore::LocaleMac::dateFormatText): (WebCore::LocaleMac::monthLabels): (WebCore::LocaleMac::weekDayShortLabels): (WebCore::LocaleMac::firstDayOfWeek): * platform/text/mac/LocalizedDateMac.cpp: (WebCore::parseLocalizedDate): (WebCore::formatLocalizedDate): (WebCore::localizedDateFormatText): (WebCore::monthLabels): (WebCore::weekDayShortLabels): (WebCore::firstDayOfWeek): * platform/text/mac/LocalizedDateMac.mm: Removed. 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Create CCScopedTexture class for creating/freeing textures https://bugs.webkit.org/show_bug.cgi?id=89485 Reviewed by Adrienne Walker. This class provides a standard way to create texture ids in a way that ensures they will be freed later. Also includes a CCTexture base class that holds textureId, size, and format together in a struct that can be used in place of storing an unsigned textureId in other classes. Unit tests: CCScopedTexureTest.NewScopedTexture CCScopedTexureTest.CreateScopedTexture CCScopedTexureTest.ScopedTextureIsDeleted CCScopedTexureTest.LoseScopedTexture * WebCore.gypi: * platform/graphics/chromium/cc/CCScopedTexture.cpp: Added. (WebCore): (WebCore::CCScopedTexture::CCScopedTexture): (WebCore::CCScopedTexture::~CCScopedTexture): (WebCore::CCScopedTexture::allocate): (WebCore::CCScopedTexture::free): (WebCore::CCScopedTexture::leak): * platform/graphics/chromium/cc/CCScopedTexture.h: Added. (WebCore): (CCScopedTexture): (WebCore::CCScopedTexture::create): * platform/graphics/chromium/cc/CCTexture.cpp: Added. (WebCore): (WebCore::CCTexture::setDimensions): (WebCore::CCTexture::bytes): (WebCore::CCTexture::memorySizeBytes): * platform/graphics/chromium/cc/CCTexture.h: Added. (WebCore): (CCTexture): (WebCore::CCTexture::CCTexture): (WebCore::CCTexture::id): (WebCore::CCTexture::size): (WebCore::CCTexture::format): (WebCore::CCTexture::setId): 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: deleteDatabase fails if transaction running in other database https://bugs.webkit.org/show_bug.cgi?id=90822 Reviewed by Tony Chang. The IDBLevelDBBackingStore was preventing a deleteDatabase() from running if any other database was running a transaction. Fix by just creating a scratch LevelDBTransaction for the delete steps. Test: storage/indexeddb/deletedatabase-transaction.html * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use a LevelDBTransaction directly. 2012-07-09 Pete Williamson <petewil@google.com> Changed the behavior of iconURLs to always recalculate the list. https://bugs.webkit.org/show_bug.cgi?id=88665 Reviewed by Kent Tamura.. As it turns out, it can contain stale URLs in the case that some script manipulates the DOM, which breaks scripts trying to reset the favicon URL. Also added a method in Internals to allow tests to get the list of icon Tests: fast/dom/icon-url-change.html fast/dom/icon-url-list.html * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class * dom/Document.cpp: (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace * dom/Document.h: (Document): removed the addIconURL method which is no longer used * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor (WebCore): (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor * html/HTMLLinkElement.h: (HTMLLinkElement): declared the icon type and size accessors * testing/Internals.cpp: (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list (WebCore): * testing/Internals.h: (Internals): declared the method for unit testing the icon URL list * testing/Internals.idl: exported the Document::iconURLs function 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Gcc build fix after r122174. * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::decrementAccessCount): 2012-07-09 Alice Cheng <alice_cheng@apple.com> Editing: Autocorrection in blockquotes causes text to break out of quote https://bugs.webkit.org/show_bug.cgi?id=90487 <rdar://problem/11769020> Reviewed by Enrica Casucci. Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html SpellingCorrectionCommand uses ReplaceSelectionCommand to replace the misspelled word with the auto-corrected word. Specifically, ReplaceSelectionCommand does a smart copy, where it breaks out of blockquotes. Thus, the fix is to substitute ReplaceSelectionCommand with InserTextCommand. * editing/SpellingCorrectionCommand.cpp: (WebCore::SpellingCorrectionCommand::doApply): 2012-07-09 No'am Rosenthal <noam.rosenthal@nokia.com> Shared code that is guarded with ENABLE(WEBGL) should be guarded with USE() https://bugs.webkit.org/show_bug.cgi?id=90506 Reviewed by Martin Robinson. GraphicsContext3D, ANGLEWebKitBridge and Extensions3D are now guarded with USE(3D_GRAPHICS) instead of ENABLE(WEBGL). No new tests, build changes only. * Target.pri: Removed references to unused files. * WebCore.pri: Updated the Qt build so that the basic 3D-graphics sources can be compiled even when WebGL is disabled. * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/GraphicsContext3D.cpp: * platform/graphics/opengl/Extensions3DOpenGL.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/qt/QWebPageClient.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: * platform/graphics/cairo/DrawingBufferCairo.cpp: * platform/graphics/cairo/GLContext.h: (GLContext): * platform/graphics/cairo/GraphicsContext3DCairo.cpp: * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: * platform/graphics/cg/GraphicsContext3DCG.cpp: * platform/graphics/clutter/DrawingBufferClutter.cpp: * platform/graphics/clutter/GraphicsContext3DClutter.cpp: * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: * platform/graphics/efl/GraphicsContext3DEfl.cpp: * platform/graphics/efl/GraphicsContext3DPrivate.cpp: * platform/graphics/filters/CustomFilterCompiledProgram.cpp: * platform/graphics/filters/CustomFilterCompiledProgram.h: * platform/graphics/filters/CustomFilterGlobalContext.cpp: * platform/graphics/filters/CustomFilterGlobalContext.h: * platform/graphics/filters/CustomFilterMesh.cpp: * platform/graphics/filters/CustomFilterMesh.h: * platform/graphics/filters/CustomFilterProgram.cpp: (WebCore): * platform/graphics/filters/CustomFilterProgram.h: * platform/graphics/filters/FECustomFilter.cpp: * platform/graphics/filters/FECustomFilter.h: * platform/graphics/glx/GLContextGLX.cpp: (WebCore): * platform/graphics/glx/GLContextGLX.h: (GLContextGLX): * platform/graphics/gpu/DrawingBuffer.cpp: * platform/graphics/gpu/mac/DrawingBufferMac.mm: * platform/graphics/gpu/qt/DrawingBufferQt.cpp: * platform/graphics/mac/GraphicsContext3DMac.mm: * platform/graphics/qt/Extensions3DQt.cpp: Removed. * platform/graphics/qt/Extensions3DQt.h: Removed. * platform/graphics/skia/GraphicsContext3DSkia.cpp: * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Chaned ENABLE(WEBGL) to USE(3D_GRAPHICS) 2012-07-09 Yongjun Zhang <yongjun_zhang@apple.com> Consider closing unused localStorage database after a timeout. https://bugs.webkit.org/show_bug.cgi?id=90713 For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds), we can close the underlying sqlite database. Reviewed by Brady Eidson. Test: storage/domstorage/storage-close-database-on-idle.html * storage/Storage.cpp: (WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it. (WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it. * storage/StorageArea.h: (StorageArea): * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::StorageAreaImpl): (WebCore::StorageAreaImpl::incrementAccessCount): (WebCore): (WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document referencing to this storageArea. (WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database. * storage/StorageAreaImpl.h: (StorageAreaImpl): * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out. * storage/StorageTracker.cpp: (WebCore): (WebCore::StorageTracker::StorageTracker): * storage/StorageTracker.h: (WebCore::StorageTracker::storageDatabaseIdleInterval): (WebCore::StorageTracker::setStorageDatabaseIdleInterval): set the timeout value that we will wait before closing the database. This is currently used by DumpRenderTree only. (StorageTracker): 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string https://bugs.webkit.org/show_bug.cgi?id=90474 Reviewed by Tony Chang. Test: storage/indexeddb/transaction-basics.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBDatabase.idl: 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: Remove obsolete accessor plumbing https://bugs.webkit.org/show_bug.cgi?id=90812 Reviewed by Tony Chang. No new tests - just deleting code. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::IDBTransaction): Since backend mode() is disconnected, can no longer assert that front-end/back-end modes match; not worth it to keeping the plumbing. 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Remove HashMap workaround for layers with id=0 in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=90825 Reviewed by Adrienne Walker. Layer ids are no longer allowed to be 0, and the behaviour is guarded with asserts, so this workaround is not needed any longer. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): 2012-07-09 Vincent Scheib <scheib@chromium.org> Pointer Lock requestPointerLock rejects locking an element not in a document. https://bugs.webkit.org/show_bug.cgi?id=90821 Reviewed by Adrienne Walker. Test: pointer-lock/lock-element-not-in-dom.html * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): 2012-07-09 Eric Seidel <eric@webkit.org> document.write of scripts that also document.write sometimes writes async https://bugs.webkit.org/show_bug.cgi?id=89102 Reviewed by Adam Barth. When a script tag is first encountered, the TreeBuilder holds the element and returns out to the outer HTMLDocumentParser parse loop. The HTMLDocumentParser then takes the script element and passes it to the HTMLScriptRunner for execution. However, if the script is an "external script" the HTMLScriptRunner may have to wait for that parser blocking script to load, and may store the script in its own m_parserBlockingScript member. While the HTMLScriptRunner has this not-yet-loaded-script the parser is also blocked. Because the "paused" state of the parser was held as a separate bool on the TreeBuilder we'd have to be careful to update it to reflect the current state of this pending script on the HTMLScriptRunner. This patch removes this separate "paused" bool and makes the HTMLDocumentParser responsible for the "paused" state of the parser through the isWaitingForScripts() function which knows how to check both the TreeBuilder and the ScriptRunner for possible parser-blocking scripts. I suspect this change may actually fix a bunch of edge cases where we were not checking for the HTMLScriptRunner's parser blocking script and thus incorrectly ending the parser, or not starting the pre-load scanner, etc. As part of this change I also renamed m_haveParsingBlockingScript in HTMLScriptRunner to match the naming style used elsewhere in the parser, as well as removed all the "bool" return values for these parse/execute functions as they are no longer useful (or correct). The correct way is always to check HTMLDocumentParser::isWaitingForScripts(). Test: fast/parser/cached-script-document-write.html * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible): (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): (WebCore::HTMLDocumentParser::canTakeNextToken): (WebCore::HTMLDocumentParser::isWaitingForScripts): (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): (WebCore::HTMLDocumentParser::notifyFinished): (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets): * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::~HTMLScriptRunner): (WebCore::HTMLScriptRunner::executeParsingBlockingScript): (WebCore::HTMLScriptRunner::execute): (WebCore::HTMLScriptRunner::hasParserBlockingScript): (WebCore::HTMLScriptRunner::executeParsingBlockingScripts): (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad): (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): (WebCore::HTMLScriptRunner::requestParsingBlockingScript): (WebCore::HTMLScriptRunner::runScript): * html/parser/HTMLScriptRunner.h: (HTMLScriptRunner): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::takeScriptToProcess): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processTokenInForeignContent): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::hasParserBlockingScript): 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Microdata tests are flaky https://bugs.webkit.org/show_bug.cgi?id=90830 Reviewed by Antti Koivisto. The bug was caused by SpaceSplitString's not copying on write properly. Even if there was exactly one owner of the SpaceSplitString, we should still not modify m_data since m_data is associated with a particular m_keyString in sharedDataMap(). The only situation in which we can safely modify m_data is when m_data's m_keyString is null meaning that it had been unique'ed. Furthermore, this optimization had not been used for class lists because class list's refCount is always zero as its ref and deref are forwarded to the associated Element's ref and deref. This fix re-enables the optimization for class lists. This behavior change is tested by existing microdata API tests. Without this patch, some tests such as properties-collection-add-remove-property.html fail on the first run when several tests were ran in the same WebKit instance. * dom/SpaceSplitString.h: (WebCore::SpaceSplitStringData::isUnique): (WebCore::SpaceSplitString::ensureUnique): 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Decouple RenderPass drawing from CCRenderSurface https://bugs.webkit.org/show_bug.cgi?id=90573 Reviewed by Adrienne Walker. Removes the managed textures from CCRenderSurface and stores them in a HashMap in LayerRendererChromium. At the start of a frame, all textures for the frame are reserved, and unneeded textures are deleted. After each quad is drawn, evicted textures (ie temporary textures used for background filters) are deleted to keep within memory limits. At the end of the frame, all surface contents textures are kept reserved and thus not deleted. We add a numeric identifier to CCRenderPass which can be used to identify the pass across serialization in the future, and is used in the interface to LayerRendererChromium. Also we add to the CCRenderPass a contentsChangedSinceLastFrame() flag so that the value does not need to be retrieved from the CCRenderSurface. The pointer from CCRenderPass to CCRenderSurface remains for some code in the CCLayerTreeHostImpl, and will be addressed in the future, but the pointer is no longer used at all while drawing a frame inside LayerRendererChromium. Covered by existing tests, no intended change in behaviour. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderPassTextures): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore): (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::create): (WebCore::CCRenderPass::CCRenderPass): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): (WebCore::CCRenderPass::id): (WebCore::CCRenderPass::setFramebufferOutputRect): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::renderPassId): (WebCore::CCRenderPassDrawQuad::contentsChangedSinceLastFrame): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::pushTileProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-07-09 Adam Klein <adamk@chromium.org> Rename WebCore::WebKitMutationObserver to WebCore::MutationObserver https://bugs.webkit.org/show_bug.cgi?id=90810 Reviewed by Ojan Vafai. This is in preparation for removing the vendor prefix from the MutationObserver constructor on Window (currently it's called WebKitMutationObserver). Doing the WebCore-internal rename first makes that change a much smaller one, which is especially useful because there's ongoing discussion of when the prefix should be removed from the web-facing API. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSMainThreadExecState.cpp: (WebCore::JSMainThreadExecState::didLeaveScriptContext): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): * bindings/js/JSMutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp. (WebCore): (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): * bindings/v8/custom/V8MutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp. (WebCore): (WebCore::V8MutationObserver::constructorCallback): * dom/CharacterData.cpp: * dom/ChildListMutationScope.h: (WebCore::ChildListMutationScope::ChildListMutationScope): * dom/DOMAllInOne.cpp: * dom/Document.h: (WebCore::Document::hasMutationObserversOfType): * dom/Element.cpp: * dom/MutationCallback.h: (WebCore): (MutationCallback): * dom/MutationCallback.idl: * dom/MutationObserver.cpp: Renamed from Source/WebCore/dom/WebKitMutationObserver.cpp. (WebCore): (WebCore::MutationObserver::ObserverLessThan::operator()): (WebCore::MutationObserver::create): (WebCore::MutationObserver::MutationObserver): (WebCore::MutationObserver::~MutationObserver): (WebCore::MutationObserver::validateOptions): (WebCore::MutationObserver::observe): (WebCore::MutationObserver::takeRecords): (WebCore::MutationObserver::disconnect): (WebCore::MutationObserver::observationStarted): (WebCore::MutationObserver::observationEnded): (WebCore::activeMutationObservers): (WebCore::MutationObserver::enqueueMutationRecord): (WebCore::MutationObserver::setHasTransientRegistration): (WebCore::MutationObserver::deliver): (WebCore::MutationObserver::deliverAllMutations): * dom/MutationObserver.h: Renamed from Source/WebCore/dom/WebKitMutationObserver.h. (WebCore): (MutationObserver): * dom/MutationObserver.idl: Renamed from Source/WebCore/dom/WebKitMutationObserver.idl. * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): (WebCore::MutationObserverInterestGroup::isOldValueRequested): (WebCore::MutationObserverInterestGroup::enqueueMutationRecord): * dom/MutationObserverInterestGroup.h: (WebCore::MutationObserverInterestGroup::createForChildListMutation): (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): (WebCore::MutationObserverInterestGroup::createForAttributesMutation): (MutationObserverInterestGroup): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::create): (WebCore::MutationObserverRegistration::MutationObserverRegistration): (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): * dom/MutationObserverRegistration.h: (MutationObserverRegistration): (WebCore::MutationObserverRegistration::isSubtree): (WebCore::MutationObserverRegistration::observer): (WebCore::MutationObserverRegistration::deliveryOptions): (WebCore::MutationObserverRegistration::mutationTypes): * dom/Node.cpp: (WebCore::Node::collectMatchingObserversForMutation): (WebCore::Node::getRegisteredMutationObserversOfType): (WebCore::Node::registerMutationObserver): * dom/Node.h: (Node): * dom/NodeRareData.h: * page/DOMWindow.idl: 2012-07-09 Filip Pizlo <fpizlo@apple.com> Unreviewed, rolling out http://trac.webkit.org/changeset/122116 and http://trac.webkit.org/changeset/122119 * GNUmakefile.list.am: * PlatformBlackBerry.cmake: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext3D.h: (WebCore): * platform/graphics/OpenGLESShims.h: * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore): * platform/graphics/clutter/GraphicsContext3DClutter.cpp: (WebCore): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): (WebCore::Extensions3DOpenGL::supports): (WebCore): (WebCore::Extensions3DOpenGL::ensureEnabled): (WebCore::Extensions3DOpenGL::isEnabled): (WebCore::Extensions3DOpenGL::getGraphicsResetStatusARB): (WebCore::Extensions3DOpenGL::getTranslatedShaderSourceANGLE): (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM): * platform/graphics/opengl/Extensions3DOpenGL.h: (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: * platform/graphics/opengl/Extensions3DOpenGLCommon.h: * platform/graphics/opengl/Extensions3DOpenGLES.cpp: * platform/graphics/opengl/Extensions3DOpenGLES.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::systemAllowsMultisamplingOnATICards): (WebCore): (WebCore::GraphicsContext3D::validateAttributes): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore): 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Build fix after r122115 and some cleanups. * html/HTMLCollection.h: (HTMLCollection): * html/HTMLElement.cpp: (WebCore::HTMLElement::properties): * html/HTMLElement.h: (HTMLElement): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): 2012-07-09 Dean Jackson <dino@apple.com> Tiled drawing means some elements can disappear behind the page https://bugs.webkit.org/show_bug.cgi?id=88906 Reviewed by Simon Fraser. The compositing layers in the tile cache could become siblings of the compositing layers for page elements. This meant that in some 3d transforms, the elements could disappear behind the page background (which is rendered into the tile cache) or intersect with the tile cache tiles. Fix this by inserting a flattening layer between the tile cache and the page, ensuring that the cache will always be rendered first. I was able to reuse the clipping layer for this, because the tile cache is attached to the RenderView, so there should never be a case where we have both a clipping layer and tiles. The unfortunate part of this code is the temporary state variable that wraps the call to GraphicsLayer::create. Because that method calls back into the object, we need to make sure we don't create another tile cache. Also added some obvious names to the tile cache layers to help with debugging. Test: compositing/tile-cache-must-flatten.html * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): give the tile host layer a name. (WebCore::TileCache::createTileLayer): * platform/graphics/ca/mac/WebTileCacheLayer.mm: (WebCore): give each tile layer a name. * rendering/RenderLayerBacking.cpp: (WebCore): (WebCore::RenderLayerBacking::shouldUseTileCache): check if we're in the middle of creating the primary graphics layer before answering. (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): wrap our call to createGraphicsLayer with a message to indicate we are making the layer that should get a tile cache. (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): needs to make sure the flattening layer is in the tree. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::updateInternalHierarchy): (WebCore::RenderLayerBacking::updateClippingLayers): (WebCore::RenderLayerBacking::backingStoreMemoryEstimate): * rendering/RenderLayerBacking.h: rename m_clippingLayer to m_containmentLayer because it can now either be the clip or the tile cache flattener. Also a new state property used when creating the main graphics layer. (WebCore::RenderLayerBacking::hasClippingLayer): (WebCore::RenderLayerBacking::clippingLayer): (WebCore::RenderLayerBacking::parentForSublayers): (WebCore::RenderLayerBacking::hasTileCacheFlatteningLayer): (WebCore::RenderLayerBacking::tileCacheFlatteningLayer): (RenderLayerBacking): 2012-07-09 Christophe Dumez <christophe.dumez@intel.com> [EFL] Log significant Gamepad API-related events https://bugs.webkit.org/show_bug.cgi?id=90595 Reviewed by Antonio Gomes. Log significant Gamepad API-related events in GamepadsEfl. No new tests, no behavior change. * platform/efl/GamepadsEfl.cpp: (WebCore::GamepadDeviceEfl::deviceFile): (GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::readCallback): (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadsEfl::unregisterDevice): 2012-07-09 Simon Fraser <simon.fraser@apple.com> Reduce the amount of flashing when falling into tiled layers https://bugs.webkit.org/show_bug.cgi?id=90808 Reviewed by Dean Jackson. Implement +prefetchedTiles so that CATiledLayer renders more tiles at a time, reducing the appearance of flashing. * platform/graphics/mac/WebTiledLayer.mm: (+[WebTiledLayer prefetchedTiles]): 2012-07-09 Leandro Gracia Gil <leandrogracia@chromium.org> SurroundingText should not advance character iterators if they are at end. https://bugs.webkit.org/show_bug.cgi?id=90560 Reviewed by Ryosuke Niwa. CharacterIterator and BackwardsCharacterIterator try to advance their internal TextIterator without checking if they already are at end. This can cause crashes in TextIterator::advance. Test: platform/chromium/editing/surrounding-text/surrounding-text.html * editing/SurroundingText.cpp: (WebCore::SurroundingText::SurroundingText): (WebCore::SurroundingText::rangeFromContentOffsets): 2012-07-09 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [EFL] [WK2] Ecore errors from ecore_evas_screen_geometry_get() https://bugs.webkit.org/show_bug.cgi?id=90609 Reviewed by Daniel Bates. Do not call ecore_evas_screen_geometry_get() if ecoreEvas is null. No new tests. This patch doesn't change behavior. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): Early return if Evas is null. 2012-07-09 Alexandru Chiculita <achicu@adobe.com> [CSS Filters] Blur filter is not repainted correctly when applied on a parent of a fixed element https://bugs.webkit.org/show_bug.cgi?id=90087 Reviewed by Simon Fraser. Added a new method, RenderLayer::hasAncestorWithFilterOutsets, to check that there's no filter with outsets (ie. blur) applied on top level fixed positioned elements, nor any of its parent layers. In the event of a blur filter we need to disable the fast scrolling optimization, otherwise the outsets of the filter will be carried around the page and repainting will not work correctly. Tests: css3/filters/blur-filter-page-scroll-parents.html css3/filters/blur-filter-page-scroll-self.html * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): * rendering/RenderLayer.cpp: (WebCore): (WebCore::RenderLayer::hasAncestorWithFilterOutsets): * rendering/RenderLayer.h: (RenderLayer): 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: Empty arrays shouldn't be valid key paths https://bugs.webkit.org/show_bug.cgi?id=90798 Reviewed by Tony Chang. Other IDB implementations already enforce this although it is not yet in the spec (see https://www.w3.org/Bugs/Public/show_bug.cgi?id=17657). If an empty array is passed as the key path arg to IDBDatabase.createObjectStore() or IDBObjectStore.createIndex(), a SYNTAX_ERR DOMException is now thrown. Test: storage/indexeddb/keypath-arrays.html storage/indexeddb/keypath-basics.html * Modules/indexeddb/IDBKeyPath.cpp: (WebCore::IDBKeyPath::isValid): Test for empty array. 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Create render surfaces on main thread only for the current frame https://bugs.webkit.org/show_bug.cgi?id=89793 Reviewed by Adrienne Walker. Previously we would create render surfaces for animating layers in the main thread since these layers might have a surface on impl, in order to assist culling. This makes it very difficult to estimate how much texture memory is needed for RenderSurfaces on the main thread, in order to keep contents+surface memory below our limit. Here we stop doing this, and create RenderSurfaces on both threads under the same conditions, so main thread has surfaces only if the layers in its current frame demand them. While this may reduce paint culling within an animating subtree, this seems like an edge case and knowing the amount of surface memory needed for the frame is important. Animation tests in CCLayerTreeHostCommonTest used to verify that these layers got surfaces, so now no longer do. Creation of surfaces under other conditions is covered by other CCLayerTreeHostCommonTests. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r122116. * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> EFL build fix after r122115. * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::create): 2012-07-09 Joshua Netterfield <jnetterfield@rim.com> Make GC3D and E3D more maintainable for GLES platforms https://bugs.webkit.org/show_bug.cgi?id=90567 Reviewed by Rob Buis. This patch cleans up code for WebGL on OpenGLES platforms which use GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL, GraphicsContext3DOpenGLCommon, and GraphicsContext3DOpenGLES, this patch is an attempt to refactor this code in a way that will help BlackBerry and other teams support WebGL on mobile platforms with as little use of "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the separation of Extensions3DOpenGL into Extensions3DOpenGLCommon, Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction of OpenGLESShims. This patch is created in large part by Jonathan Feldstein. No new tests: no new behaviour. * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build * Target.pri: Add new Extensions3DOpenGL* to WebGL builds * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function. (WebCore): * platform/graphics/OpenGLESShims.h: Added. * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports (WebCore): (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon (WebCore): (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::supports): (WebCore::Extensions3DOpenGLCommon::ensureEnabled): (WebCore::Extensions3DOpenGLCommon::isEnabled): (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB): (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does. (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLCommon): * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG): (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG): (WebCore::Extensions3DOpenGLES::createVertexArrayOES): (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES): (WebCore::Extensions3DOpenGLES::isVertexArrayOES): (WebCore::Extensions3DOpenGLES::bindVertexArrayOES): (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports (WebCore::Extensions3DOpenGLES::getExtensions): * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLES): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateDepthStencil): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::isTexture): (WebCore): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::deleteBuffer): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore): (WebCore::GraphicsContext3D::releaseShaderCompiler): 2012-07-02 Ryosuke Niwa <rniwa@webkit.org> Make HTMLCollection RefCounted https://bugs.webkit.org/show_bug.cgi?id=90414 Reviewed by Sam Weinig. Make HTMLCollection ref counted and stop forwarding ref and deref to its owner (m_base) so as to align its life time management to that of DynamicNodeList. After this patch, each HTMLCollection is owned by JSC/V8 and m_cachedCollections in ElementRareData and m_collection in Document merely hold raw pointers for the caching purpose. These raw pointers are cleared when each HTMLCollection is destructed via corresponding removeCachedHTMLCollection's. In the destructor of HTMLCollection, we use the CollectionType to decide whether base() is an element or an document, and call the appropriate removeCachedHTMLCollection except for WindowNamedItems and DocumentNamedItems. For those two types, we need to know the atomic string name associated with the collection just like many DynamicNodeList to remove the cache, so we let HTMLNameCollection directly call removeWindowNamedItemCache and removeDocumentNamedItemCache. We'll cleanup this mess in a follow up patch using a nice class hierarchy and virtual destructors. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::getDocumentLinks): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedPropertyGetter): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::openSearchDescriptionURL): (WebCore): (WebCore::Document::cachedCollection): (WebCore::Document::removeCachedHTMLCollection): (WebCore::Document::images): (WebCore::Document::applets): (WebCore::Document::embeds): (WebCore::Document::plugins): (WebCore::Document::objects): (WebCore::Document::scripts): (WebCore::Document::links): (WebCore::Document::forms): (WebCore::Document::anchors): (WebCore::Document::all): (WebCore::Document::windowNamedItems): (WebCore::Document::documentNamedItems): (WebCore::Document::removeWindowNamedItemCache): (WebCore::Document::removeDocumentNamedItemCache): * dom/Document.h: (Document): * dom/Element.cpp: (WebCore::Element::ensureCachedHTMLCollection): (WebCore::ElementRareData::ensureCachedHTMLCollection): (WebCore::Element::removeCachedHTMLCollection): (WebCore): * dom/Element.h: (Element): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::cachedHTMLCollection): (WebCore::ElementRareData::removeCachedHTMLCollection): * html/CollectionType.h: (WebCore): Since WindowNamedItems is not a part of UnnamedDocumentCachedType, we shouldn't addd 1. (WebCore::isUnnamedDocumentCachedType): (WebCore::isNodeCollectionType): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::create): * html/HTMLAllCollection.h: (HTMLAllCollection): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::itemAfter): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollection): (WebCore::HTMLCollection::base): * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::options): * html/HTMLDataListElement.h: (HTMLDataListElement): * html/HTMLElement.cpp: (WebCore::HTMLElement::children): (WebCore::HTMLElement::properties): * html/HTMLElement.h: (HTMLElement): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::elements): * html/HTMLFieldSetElement.h: (HTMLFieldSetElement): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::create): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): * html/HTMLFormElement.h: (HTMLFormElement): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): (WebCore::HTMLMapElement::areas): * html/HTMLMapElement.h: (HTMLMapElement): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): (WebCore::HTMLNameCollection::~HTMLNameCollection): (WebCore): * html/HTMLNameCollection.h: (WebCore::HTMLNameCollection::create): (HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::create): * html/HTMLOptionsCollection.h: (HTMLOptionsCollection): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectedOptions): (WebCore::HTMLSelectElement::options): * html/HTMLSelectElement.h: (HTMLSelectElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): (WebCore::HTMLTableElement::tBodies): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::insertCell): (WebCore::HTMLTableRowElement::deleteCell): (WebCore::HTMLTableRowElement::cells): * html/HTMLTableRowElement.h: (HTMLTableRowElement): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::create): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::insertRow): (WebCore::HTMLTableSectionElement::deleteRow): (WebCore::HTMLTableSectionElement::rows): * html/HTMLTableSectionElement.h: (HTMLTableSectionElement): 2012-07-09 Pavel Feldman <pfeldman@chromium.org> Web Inspector: unindent line ending block upon { hit. https://bugs.webkit.org/show_bug.cgi?id=90795 Reviewed by Vsevolod Vlasov. Added block-start / block-end markup into the highlighter. * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken): * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/TextEditor.js: (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): (WebInspector.TextEditorMainPanel.prototype._unindentAfterBlock): 2012-07-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122107. http://trac.webkit.org/changeset/122107 https://bugs.webkit.org/show_bug.cgi?id=90794 Build failure on Mac debug bots (Requested by falken_ on #webkit). * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): * dom/ContextFeatures.cpp: * dom/ContextFeatures.h: * html/HTMLDialogElement.cpp: Removed. * html/HTMLDialogElement.h: Removed. * html/HTMLDialogElement.idl: Removed. * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-07-09 Andrei Onea <onea@adobe.com> [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent https://bugs.webkit.org/show_bug.cgi?id=90759 Reviewed by Andreas Kling. Renamed NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent as per CSS Regions spec: http://www.w3.org/TR/css3-regions/#dom-named-flow Tests: fast/regions/get-regions-by-content-horiz-bt.html fast/regions/get-regions-by-content-horiz-tb.html fast/regions/get-regions-by-content-vert-lr.html fast/regions/get-regions-by-content-vert-rl.html fast/regions/get-regions-by-content.html fast/regions/get-regions-by-content2.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::getRegionsByContent): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: 2012-07-09 Matt Falkenhagen <falken@chromium.org> Add ENABLE_DIALOG_ELEMENT and skeleton files https://bugs.webkit.org/show_bug.cgi?id=90521 Reviewed by Kent Tamura. This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added. The feature is diabled by default. No new tests, as there is no behavior change. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog. (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled): (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): * dom/ContextFeatures.cpp: (WebCore::ContextFeatures::dialogElementEnabled): (WebCore): * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off. * html/HTMLDialogElement.cpp: Added. (WebCore): (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::create): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::show): * html/HTMLDialogElement.h: Added. (WebCore): (HTMLDialogElement): * html/HTMLDialogElement.idl: Added. * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-07-09 Pavel Feldman <pfeldman@chromium.org> Web Inspector: inspector does not reflect newly created text nodes from contenteditable https://bugs.webkit.org/show_bug.cgi?id=90779 Reviewed by Vsevolod Vlasov. We need to report first text node as inserted, otherwise we fail to report character data modified on it. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::characterDataModified): 2012-07-09 Andrey Kosyakov <caseq@chromium.org> REGRESSION(r121980) Layout Test inspector/timeline/timeline-frames.html started to crash. https://bugs.webkit.org/show_bug.cgi?id=90747 Reviewed by Pavel Feldman. - consider didCancelFrame() call normal if there is no pending frame, remove assertion; - always set empty data object for frame records; * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCancelFrame): (WebCore::InspectorTimelineAgent::commitFrameRecord): 2012-07-09 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add FileContentView for FileSystemView https://bugs.webkit.org/show_bug.cgi?id=90529 Adding FileContentView to Inspector. This class provides preview of text files in FileSystem. Reviewed by Vsevolod Vlasov. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileContentView.js: Added. * inspector/front-end/FileSystemView.js: (WebInspector.FileSystemView.prototype.get visibleView): (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect): (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived): (WebInspector.FileSystemView.EntryTreeElement.prototype.refresh): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-09 Carlos Garcia Campos <cgarcia@igalia.com> [SOUP] Use soup_cookie_jar_is_persistent() to set whether cookie is a session one or not https://bugs.webkit.org/show_bug.cgi?id=90769 Reviewed by Gustavo Noronha Silva. It's currently set to false, because there were no API to know whether cookies were persistent or not. Now that we bumped libsoup requirements, we can use soup_cookie_jar_is_persistent(). * platform/network/soup/CookieJarSoup.cpp: (WebCore::getRawCookies): 2012-07-09 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add text file support for FileSystemAgent::requestFileContent https://bugs.webkit.org/show_bug.cgi?id=90439 Reviewed by Vsevolod Vlasov. * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileContent): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype.requestFileContent): (WebInspector.FileSystemModel.File.prototype.requestFileContent): (WebInspector.FileSystemRequestManager.prototype._fileContentReceived): (WebInspector.FileSystemDispatcher.prototype.fileContentReceived): 2012-07-09 MORITA Hajime <morrita@google.com> [Chromium] ContextFeaturesClient::isEnabled is slow https://bugs.webkit.org/show_bug.cgi?id=90367 Reviewed by Kent Tamura. * dom/ContextFeatures.h: (WebCore::ContextFeaturesClient::urlDidChange): Added. (WebCore::ContextFeatures::urlDidChange): Added. (WebCore): * dom/Document.cpp: (WebCore::Document::setURL): Added an urlDidChange() call. 2012-07-09 Andrei Onea <onea@adobe.com> [CSSRegions] Implement NamedFlow::firstEmptyRegionIndex attribute https://bugs.webkit.org/show_bug.cgi?id=90608 Reviewed by Andreas Kling. Implemented NamedFlow::firstEmptyRegionIndex as per spec: http://www.w3.org/TR/css3-regions/#dom-named-flow Test: fast/regions/webkit-named-flow-first-empty-region-index.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): (WebCore): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: 2012-07-08 Yoshifumi Inoue <yosin@chromium.org> [Platform-Mac] Derive LocaleMac.{cpp,h} and LocalizedDateMac.cpp from LocaleWin https://bugs.webkit.org/show_bug.cgi?id=90752 Reviewed by Kent Tamura. This patch is preparation of introducing LocaleMac class for localize date form. This patch copies LocaleWin and LocalizedDateWin.cpp as below: - LocaleMac.h from LocaleWin.h - LocaleMac.mm from LocaliedDateMac.mm - LocaliedDateMac.cpp from LocalizedDateWin.cpp Due by git, diffs are appeared as new thing. I'll do svn copy at landing time. No new tests. This patch doesn't change behavior. * platform/text/mac/LocaleMac.h: Copied from platform/text/LocaleWin.h * platform/text/mac/LocaleMac.mm: Copied from platform/text/mac/LocalizedDateMac.mm * platform/text/mac/LocalizedDateMac.cpp: Copied from platform/text/LocalizedDateWin.cpp 2012-07-08 Laszlo Gombos <laszlo.1.gombos@nokia.com> Introduce a build flag for low quality JPEG images https://bugs.webkit.org/show_bug.cgi?id=90748 Reviewed by Adam Barth. Introduce build options for no JPEG dithering (USE(LOW_QUALITY_IMAGE_NO_JPEG_DITHERING)) and no JPEG fancy upsampling (USE(LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING)). No new tests as there is no change in functionality. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (ditherMode): (doFancyUpsampling): 2012-07-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121968. http://trac.webkit.org/changeset/121968 https://bugs.webkit.org/show_bug.cgi?id=90749 Caused a link error on chromium Win dbg. (Requested by hayato on #webkit). * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): * platform/MemoryUsageSupport.cpp: * platform/MemoryUsageSupport.h: (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: 2012-07-08 Mary Wu <mary.wu@torchmobile.com.cn> [BlackBerry] Make setForceDownload a setter method. https://bugs.webkit.org/show_bug.cgi?id=90591 Reviewed by Rob Buis. * platform/network/blackberry/ResourceRequest.h: (WebCore::ResourceRequest::setForceDownload): 2012-07-05 MORITA Hajime <morrita@google.com> Heap-use-after-free in WebCore::RenderObject::destroyAndCleanupAnonymousWrappers https://bugs.webkit.org/show_bug.cgi?id=90480 Reviewed by Kent Tamura. If <select> has any insertion point, the attachment phase unpextedly creates a renderer for distributed node and added to the renderer of the <select>, which breaks an assumption and results the crash. This change tighten the childShouldCreateRenderer() to forbid child renderers even from distributed nodes. There is an exception as always: ValidationMessage can create a ShadowRoot to <select>, which generates usually-forbidden child renderers. This change introduces HTMLFormControlElement::validationMessageContains() to let these renderers in. Test: fast/dom/shadow/insertion-point-list-menu-crash.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::validationMessageContains): (WebCore): * html/HTMLFormControlElement.h: (HTMLFormControlElement): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childShouldCreateRenderer): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::contains): (WebCore): * html/ValidationMessage.h: (WebCore): (ValidationMessage): 2012-07-07 Kwang Yul Seo <skyul@company100.net> Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition https://bugs.webkit.org/show_bug.cgi?id=90726 Reviewed by Adam Barth. HTMLTreeBuilder::m_lastScriptElementStartPosition is of no use. Currently, m_lastScriptElementStartPosition is used to store the text position in "script" start tag, and then the stored position is passed to m_scriptToProcessStartPosition later in "script" end tag. Because HTMLTreeBuilder handles one script tag at a time, we can store the text position directly to m_scriptToProcessStartPosition in "script" start tag. No behavior change, so no new tests. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processScriptStartTag): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): 2012-07-08 Philip Rogers <pdr@google.com> Refactor RenderSVGShape to not contain fallback code https://bugs.webkit.org/show_bug.cgi?id=90514 Reviewed by Nikolas Zimmermann. The interaction between RenderSVGShape and {RenderSVGEllipse, RenderSVGRect} was too coupled and it was not clear when a path existed or who controlled falling back to path codepaths in RenderSVGShape. This patch cleans up RenderSVGShape so that it does not track fallback state and does not have special handling for creating a shape in strokeContains. Because some functions of RenderSVGShape can be called without a path existing, each of these functions has switched to using the path() function which asserts that a path exists. There is only one remaining use of hasPath() in RenderSVGShape which I plan to remove in a followup patch. This patch also cleans up RenderSVGRect and RenderSVGEllipse. These classes now handle fallback tracking themselves and choose when to use their optimized strokeContains codepaths. No new tests as this is just a refactoring. * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::RenderSVGEllipse): (WebCore::RenderSVGEllipse::createShape): (WebCore::RenderSVGEllipse::objectBoundingBox): (WebCore::RenderSVGEllipse::strokeBoundingBox): (WebCore::RenderSVGEllipse::fillShape): (WebCore::RenderSVGEllipse::strokeShape): (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): (WebCore::RenderSVGEllipse::shapeDependentFillContains): * rendering/svg/RenderSVGEllipse.h: (WebCore::RenderSVGEllipse::isEmpty): (RenderSVGEllipse): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::RenderSVGRect): (WebCore::RenderSVGRect::createShape): (WebCore::RenderSVGRect::objectBoundingBox): (WebCore::RenderSVGRect::strokeBoundingBox): (WebCore::RenderSVGRect::fillShape): (WebCore::RenderSVGRect::strokeShape): (WebCore::RenderSVGRect::shapeDependentStrokeContains): (WebCore::RenderSVGRect::shapeDependentFillContains): * rendering/svg/RenderSVGRect.h: (WebCore::RenderSVGRect::isEmpty): (RenderSVGRect): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::RenderSVGShape): (WebCore::RenderSVGShape::createShape): (WebCore::RenderSVGShape::isEmpty): (WebCore::RenderSVGShape::objectBoundingBox): (WebCore::RenderSVGShape::shapeDependentStrokeContains): (WebCore::RenderSVGShape::shapeDependentFillContains): (WebCore::RenderSVGShape::strokeContains): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::hasSmoothStroke): (WebCore): * rendering/svg/RenderSVGShape.h: (RenderSVGShape): 2012-07-08 Kinuko Yasuda <kinuko@chromium.org> XHR.send should support ArrayBufferView https://bugs.webkit.org/show_bug.cgi?id=90536 XHR.send should support ArrayBufferView according to the latest draft and also eventually deprecate ArrayBuffer. Spec: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-send Reviewed by Kenneth Russell. Test: http/tests/xmlhttprequest/send-array-buffer.html http/tests/xmlhttprequest/send-data-view.html * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::send): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::sendCallback): * xml/XMLHttpRequest.cpp: (WebCore): (WebCore::XMLHttpRequest::send): * xml/XMLHttpRequest.h: (XMLHttpRequest): * xml/XMLHttpRequest.idl: 2012-07-08 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: CodeGeneratorInspector.py should not generate statements with no effect https://bugs.webkit.org/show_bug.cgi?id=90697 Reviewed by Vsevolod Vlasov. Fix to remove the statements with no effect. The check for errors is added only when some valid statements exist. No new tests as generator related patch. * inspector/CodeGeneratorInspector.py: (Generator.process_command): 2012-07-06 Lauro Neto <lauro.neto@openbossa.org> [Qt] Avoid deep copy of QImage in GraphicsContext3D::getImageData() https://bugs.webkit.org/show_bug.cgi?id=90705 Reviewed by Noam Rosenthal. Use QImage.constBits() as argument to packPixels instead of bits() to avoid deep copying it. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-07-06 Andy Estes <aestes@apple.com> Fix errors reported by generate-bindings.pl after r121882. * DerivedSources.make: Specify the correct path for notifications idl files now that notifications/ lives in WebCore/Modules/. 2012-07-06 Justin Novosad <junov@chromium.org> Drawing to accelerated 2D canvas causes compositor to recompute layer tree https://bugs.webkit.org/show_bug.cgi?id=90630 Reviewed by Simon Fraser. No new tests: covered by existing canvas/compositing layout tests Before this change, there was no distinction between canvas changes that require recomputing the compositor tree and canvas changes that only require re-display. The new CanvasPixelsChanged member of enum ContentChangeType requests re-display without re-layout. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::didDraw): * rendering/RenderBoxModelObject.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::contentChanged): 2012-07-06 Pavel Feldman <pfeldman@chromium.org> Web Inspector: get rid of this._lastMarkedRange in TextEditor. https://bugs.webkit.org/show_bug.cgi?id=90691 Reviewed by Vsevolod Vlasov. We don't need it, should use setSelection instead. * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.markAndRevealRange): (WebInspector.TextEditor.prototype._handleSelectionChange): (WebInspector.TextEditor.prototype.setSelection): (WebInspector.TextEditor.prototype._handleFocused): 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Snippet renaming behavior is not correct. https://bugs.webkit.org/show_bug.cgi?id=90689 Reviewed by Pavel Feldman. Navigator overlay is now not closed when editing is canceled. Esc handler in NavigatorOverlayController is not installed as a shortcut anymore since it should not be called until all underlying DOM elements handled the key down event. * inspector/front-end/NavigatorOverlayController.js: (WebInspector.NavigatorOverlayController.prototype.set showNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype._keyDown): (WebInspector.NavigatorOverlayController.prototype._innerHideNavigatorOverlay): * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype.rename.commitHandler): (WebInspector.NavigatorView.prototype.rename.cancelHandler): (WebInspector.NavigatorView.prototype.rename.afterEditing): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype._itemRenamingRequested): (WebInspector.SnippetsNavigatorView.prototype._handleRenameSnippet): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._itemRenamingRequested.callback): (WebInspector.ScriptsPanel.prototype._itemRenamingRequested): 2012-07-06 Andreas Kling <kling@webkit.org> Separate mutating CSSStyleDeclaration operations. <http://webkit.org/b/89945> Reviewed by Antti Koivisto. Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration. PropertySetCSSStyleDeclaration now has: - propertySet() const - ensureMutablePropertySet() This is prep work for supporting immutable ElementAttributeData objects, the idea being that calling ensureMutablePropertySet() may cause the element to convert its internal attribute storage (which also holds the inline StylePropertySet.) * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet): * css/PropertySetCSSStyleDeclaration.h: (PropertySetCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::propertySet): (WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet): 2012-07-06 Pavel Feldman <pfeldman@chromium.org> Web Inspector: text editor scrolls 2px horizontally as one navigates the source code. https://bugs.webkit.org/show_bug.cgi?id=90682 Reviewed by Vsevolod Vlasov. Removing the hack that is glueing the scroller to the left. * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype._updatePanelOffsets): (WebInspector.TextEditorChunkedPanel.prototype._scroll): * inspector/front-end/textEditor.css: 2012-07-06 Andrey Kosyakov <caseq@chromium.org> Web Inspector: get rid of cancellable records in Timeline, manage frame records explicitly https://bugs.webkit.org/show_bug.cgi?id=90684 Reviewed by Pavel Feldman. - drop handling of "cancelable" records; - keep frame record until other records come (or frame is canceled) * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didBeginFrame): (WebCore::InspectorTimelineAgent::didCancelFrame): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::pushCurrentRecord): (WebCore::InspectorTimelineAgent::commitFrameRecord): (WebCore::InspectorTimelineAgent::clearRecordStack): * inspector/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry): (TimelineRecordEntry): (InspectorTimelineAgent): 2012-07-06 Alexei Filippov <alexeif@chromium.org> Web Inspector: Add native memory used by GlyphCache to the snapshot https://bugs.webkit.org/show_bug.cgi?id=90615 Reviewed by Yury Semikhatsky. * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::addPlatformComponentsInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::memoryUsageByComponents): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): (ComponentInfo): (WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::glyphCacheVisitor): (WebCore): (WebCore::MemoryUsageSupport::memoryUsageByComponents): 2012-07-06 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> [Qt] Switch to new-style Qt 5 configure tests Use explicit project file action instead of syncqt magic. https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. * WebCore.pri: 2012-07-06 Pavel Feldman <pfeldman@chromium.org> Web Inspector: start searching from the cursor position in the Sources panel. https://bugs.webkit.org/show_bug.cgi?id=90677 Reviewed by Vsevolod Vlasov. Web Inspector: start searching from the cursor position in the Sources panel. Drive-by: select whole match upon search cancel. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.lastSelection): (WebInspector.TextEditor.prototype._handleFocused): * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.prototype.serializeToObject): (WebInspector.TextRange.prototype.compareTo): 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Snippets should be correctly (re)loaded when inspector is open and on navigation. https://bugs.webkit.org/show_bug.cgi?id=90672 Reviewed by Pavel Feldman. Snippets are now reloaded from the storage on ScriptSnippetMapping reset. Fixed snippets storage. * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype._loadSnippets): (WebInspector.ScriptSnippetModel.prototype._reset): * inspector/front-end/SnippetStorage.js: (WebInspector.Snippet.fromObject): 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Implement snippets removing. https://bugs.webkit.org/show_bug.cgi?id=90674 Reviewed by Pavel Feldman. * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype.rename.afterEditing): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.removeUISourceCode): (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addUISourceCode): (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): (WebInspector.ScriptsPanel.prototype._revealExecutionLine): * inspector/front-end/TabbedEditorContainer.js: 2012-07-06 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: fix inspector front-end compilation. * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/SearchController.js: 2012-07-06 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add memory reporting routine to Document https://bugs.webkit.org/show_bug.cgi?id=90668 Reviewed by Pavel Feldman. Added methods for reporting HashSet, ListHashSet and Vector memory footprint. Made Document report its size along with its internal collections sizes. * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): (WebCore): * dom/Document.h: (Document): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (MemoryObjectInfo): (WebCore::MemoryObjectInfo::reportHashMap): (WebCore::MemoryObjectInfo::reportHashSet): (WebCore::MemoryObjectInfo::reportListHashSet): (WebCore::MemoryObjectInfo::reportVector): (WebCore::MemoryObjectInfo::memoryInstrumentation): (WebCore::MemoryInstrumentation::reportHashMap): (WebCore): (WebCore::MemoryInstrumentation::reportHashSet): (WebCore::MemoryInstrumentation::reportListHashSet): (WebCore::MemoryInstrumentation::reportVector): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-06 Gabor Rapcsanyi <rgabor@webkit.org> Fixing defines for NEON intrinsics. https://bugs.webkit.org/show_bug.cgi?id=90666 Reviewed by Zoltan Herczeg. Existing tests cover this issue. * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplyGeneric): * platform/graphics/filters/arm/FEGaussianBlurNEON.h: * platform/graphics/filters/arm/NEONHelpers.h: 2012-07-05 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Workspace should dispatch WorkspaceReset event on navigation. https://bugs.webkit.org/show_bug.cgi?id=90616 Reviewed by Pavel Feldman. Workspace UISourceCodeProviders are now reset on navigation. UISourceCodeRemoved event is not dispatched from UISourceCodeProviders on reset (page navigation) anymore. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.reset): * inspector/front-end/DebuggerScriptMapping.js: (WebInspector.DebuggerScriptMapping): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._reset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._loadUISourceCodes): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): (WebInspector.ScriptsPanel.prototype._toggleFormatSource): (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog): * inspector/front-end/StylesPanel.js: (WebInspector.StylesUISourceCodeProvider): (WebInspector.StylesUISourceCodeProvider.prototype.reset): * inspector/front-end/Workspace.js: (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodeProviders): (WebInspector.Workspace): (WebInspector.Workspace.prototype.registerUISourceCodeProvider): (WebInspector.Workspace.prototype._reset): 2012-07-05 Arnaud Renevier <arno@renevier.net> [GTK] Showing the context menu in the Web Inspector can crash the browser https://bugs.webkit.org/show_bug.cgi?id=88800 Reviewed by Carlos Garcia Campos. Remove ContextMenuItem from its parent before appending it again to a new parent No new tests, behavior is unchanged. * platform/gtk/ContextMenuGtk.cpp: (WebCore::ContextMenu::appendItem): 2012-07-05 Dongwoo Im <dw.im@samsung.com> [EFL] Unreviewed, Fix build break when WEB_AUDIO is enabled. https://bugs.webkit.org/show_bug.cgi?id=90653 Unreviewed build fix. A new file, AudioFIFO.cpp, is added for the Web Audio fearure. This file should be included into the CMakeLists.txt file. * CMakeLists.txt: Add the newly created file into the CMakeLists.txt 2012-07-05 Mike West <mkwst@chromium.org> Multiple Content Security Policy headers are correctly processed as separate headers. https://bugs.webkit.org/show_bug.cgi?id=90629 Headers of the same name are normalized into a single, comma-separated string as per RFC2616, section 4.2. We didn't correctly account for this in ContentSecurityPolicy::didReceiveHeader. Now we do by walking through the header string, looking for commas and processing each block in turn. This oversight bit Firefox as well, and was patched in February: https://bugzilla.mozilla.org/show_bug.cgi?id=717511 Reviewed by Adam Barth. Test: http/tests/security/contentSecurityPolicy/directive-parsing-multiple-headers.html * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): 2012-07-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121921. http://trac.webkit.org/changeset/121921 https://bugs.webkit.org/show_bug.cgi?id=90648 caused hundreds of crashes on Mac (Requested by pizlo on #webkit). * editing/SurroundingText.cpp: (WebCore::SurroundingText::SurroundingText): * editing/TextIterator.cpp: (WebCore::CharacterIterator::advance): (WebCore::BackwardsCharacterIterator::advance): 2012-07-05 Anders Carlsson <andersca@apple.com> Type-ahead doesn't work in options inside optgroups https://bugs.webkit.org/show_bug.cgi?id=90647 <rdar://problem/5604894> Reviewed by Dan Bernstein. Set the title of the menu item to a string that doesn't contain any leading or trailing whitespace. * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenuMac::populate): 2012-07-05 Hayato Ito <hayato@chromium.org> [Crash] Click an element which will be 'display: none' on focus. https://bugs.webkit.org/show_bug.cgi?id=90516 Reviewed by Hajime Morita. EventHandler::handleMousePressEventSingleClick checks whether innerNode has a renderer in the beginning of the function. But the renderer may disappear in the middle of the function since its style has just become 'display:none'. As a result, it touches null renderer in EventHandler.cpp:517: VisiblePosition visiblePos(innerNode->renderer()->positionForPoint(event.localPoint())); In the case of 'display:none', we don't have to continue. So call updateLayoutIgnorePendingStylesheets() in the beginning so that we can early exit and do not touch null renderer. Test: fast/events/display-none-on-focus-crash.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): 2012-07-05 Benjamin Poulain <bpoulain@apple.com> Double release of resources if the load is canceled in a callback of ResourceLoader::didFinishLoading https://bugs.webkit.org/show_bug.cgi?id=90431 Reviewed by Anders Carlsson. In ResourceLoader::didFinishLoadingOnePart(), we invoke didFinishLoad() on the WebKit client. If WebKit causes the current frame to cancel the load synchronously, the resources are already freed when ResourceLoader::didFinishLoadingOnePart() ends. When ResourceLoader::didFinishLoading() subsequently invokes releaseResources(), we are releasing the resources a second time. This patch add a second check for cancellation after invoking ResourceLoader::didFinishLoadingOnePart() to avoid such issues. The previous check at the beginning of ResourceLoader::didFinishLoading() has been removed because it is redundant with ResourceLoader::didFinishLoadingOnePart(). * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFinishLoadingOnePart): 2012-07-05 Simon Fraser <simon.fraser@apple.com> Add a utility method for hasOverflowClip() or hasClip() https://bugs.webkit.org/show_bug.cgi?id=90635 Reviewed by Dean Jackson. Add RenderObject::hasClipOrOverflowClip() as a convenience method since we end up calling hasOverfFlowClip() || hasClip() a lot in the layer code. No new tests; refactoring only. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer): (WebCore::RenderLayerCompositor::clipsCompositingDescendants): * rendering/RenderObject.h: (WebCore::RenderObject::hasClipOrOverflowClip): 2012-07-05 Yongjun Zhang <yongjun_zhang@apple.com> Code refactoring: move mimeTypeFromUTITree to a separate file. https://bugs.webkit.org/show_bug.cgi?id=90619 We should move UTI handling related code to a separate file. Reviewed by David Kilzer. * WebCore.xcodeproj/project.pbxproj: Add UTIUtilities.h/UTIUtilities.mm to xcode project, and drive-by fix that happened when editing the Xcode project file. * platform/network/mac/UTIUtilities.h: Added. (WebCore): * platform/network/mac/UTIUtilities.mm: Added. move mimeTypeFromUTITree to UTIUtilities.mm. (WebCore): (WebCore::mimeTypeFromUTITree): * platform/network/mac/WebCoreURLResponse.mm: include UTIUtilities.h to use mimeTypeFromUTITree. (WebCore): 2012-07-05 Leandro Gracia Gil <leandrogracia@chromium.org> Character iterators should not advance if they are at end https://bugs.webkit.org/show_bug.cgi?id=90560 Reviewed by Ryosuke Niwa. CharacterIterator and BackwardsCharacterIterator try to advance their internal TextIterator without checking if they already are at end. This can cause crashes in TextIterator::advance. Test: platform/chromium/editing/surrounding-text/surrounding-text.html * editing/SurroundingText.cpp: (WebCore::SurroundingText::SurroundingText): * editing/TextIterator.cpp: (WebCore::CharacterIterator::advance): (WebCore::BackwardsCharacterIterator::advance): 2012-07-05 John Mellor <johnme@chromium.org> Text Autosizing: Add basic framework https://bugs.webkit.org/show_bug.cgi?id=88655 Follow-up patch tweaking method signatures. Reviewed by Simon Fraser. No functional change, so no new tests. * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::processSubtree): (WebCore::TextAutosizer::processBlock): (WebCore::TextAutosizer::processText): (WebCore): * rendering/TextAutosizer.h: (TextAutosizer): 2012-07-05 Pavel Feldman <pfeldman@chromium.org> Web Inspector: move cursor to the current search match. https://bugs.webkit.org/show_bug.cgi?id=90621 Reviewed by Vsevolod Vlasov. After closing the search dialog, the cursor should be at the latest search match location. * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.markAndRevealRange): (WebInspector.TextEditor.prototype._handleFocused): 2012-07-05 Behdad Esfahbod <behdad@behdad.org> Subpixel layout broken with spans with CSS position other than static https://bugs.webkit.org/show_bug.cgi?id=90097 Reviewed by Eric Seidel. In InlineBox, don't truncate size to integers when returning. In RenderBlock, don't round-up width to next integer. Round-up to next LayoutUnit instead. Test: Added fast/sub-pixel/size-of-span-with-different-positions.html Adjust expected outputs affected by the rounding changes. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::fromFloatCeil): (FractionalLayoutUnit): * rendering/InlineBox.h: (WebCore::InlineBox::size): * rendering/RenderBlock.cpp: (WebCore::updatePreferredWidth): 2012-07-05 Nate Chapin <japhet@chromium.org> REGRESSION (r115654): Sometimes does not replace content for multipart/x-mixed-replace https://bugs.webkit.org/show_bug.cgi?id=88436 Reviewed by Brady Eidson. Test: http/tests/multipart/multipart-replace-non-html-content.php * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): We should only send receivedFirstData() once per main resource load, rather than multiple times in a multipart load. (WebCore::DocumentLoader::setupForReplaceByMIMEType): m_gotFirstByte isn't set to true until data is actually committed, and multipart data is often not committed until the part is finished. Check whether the SharedBuffer is non-null instead. * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): The JSInternals object my have already been cleared if the window shell was cleared as part of creation of a new Document. Check it before using it. 2012-07-05 Pavel Feldman <pfeldman@chromium.org> Web Inspector: move search field to the bottom of the page. https://bugs.webkit.org/show_bug.cgi?id=90610 Reviewed by Vsevolod Vlasov. This is the first step in the Search/replace implementation. This change moves search field from the inspector toolbar to the inspector view footer that is visible upon Cmd/Ctrl+F. * English.lproj/localizedStrings.js: * inspector/front-end/InspectorView.js: (WebInspector.InspectorView): (WebInspector.InspectorView.prototype._pushToHistory): (WebInspector.InspectorView.prototype.panelsElement): (WebInspector.InspectorView.prototype.setFooterElement): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._reset): * inspector/front-end/SearchController.js: (WebInspector.SearchController): (WebInspector.SearchController.prototype.updateSearchLabel): (WebInspector.SearchController.prototype.cancelSearch): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype.focusSearchField): (WebInspector.SearchController.prototype._onKeyDown): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/inspector.css: (#search): (.toolbar-search-container): (.toolbar-search-navigation): (.toolbar-search-navigation:hover): (.toolbar-search-navigation.toolbar-search-navigation-prev): (.toolbar-search-navigation.toolbar-search-navigation-next): (.toolbar-search-navigation-hidden): (.status-bar): (.search-drawer-header input[type="search"].search-config-search): (.inspector-footer): (.inspector-footer > div): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.get _setCompactMode): (WebInspector.postDocumentKeyDown): 2012-07-05 Sergey Rogulenko <rogulenko@google.com> Web Inspector: added low-level instrumentation support for TimelineAgent https://bugs.webkit.org/show_bug.cgi?id=90264 Reviewed by Pavel Feldman. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::timelineAgentForOrphanEvents): (WebCore::InspectorInstrumentation::setTimelineAgentForOrphanEvents): (WebCore::InspectorInstrumentation::threadSpecificTimelineAgentForOrphanEvents): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::pushCurrentRecord): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): 2012-07-05 John Mellor <johnme@chromium.org> Text Autosizing: Add test framework and simple test. https://bugs.webkit.org/show_bug.cgi?id=90561 Exposes methods allowing Layout Tests to enable Text Autosizing and get the same results as if they were running on a mobile device. Reviewed by Adam Barth. Test: fast/text-autosizing/simple-paragraph.html * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore): (WebCore::Settings::setTextAutosizingWindowSizeOverride): * page/Settings.h: (Settings): (WebCore::Settings::textAutosizingWindowSizeOverride): * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::boostSubtree): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setTextAutosizingEnabled): (WebCore): (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-07-04 Andrey Kosyakov <caseq@chromium.org> Web Inspector: timeline events in the vicinity of event dividers some times are tricky to expand https://bugs.webkit.org/show_bug.cgi?id=90572 Reviewed by Pavel Feldman. - do not use resources-event-divider-padding; - make dividers larger and use border-color to visualize them; - move resources-<color>-divider to timelinePanel.css, as they're not used outside of timeline; * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.createEventDivider): * inspector/front-end/inspectorCommon.css: * inspector/front-end/timelinePanel.css: (.timeline .resources-event-divider): (.resources-red-divider): (.resources-blue-divider): (.resources-orange-divider): (.resources-divider.last): (.timeline .resources-event-divider.timeline-frame-divider): 2012-07-04 Andrey Kosyakov <caseq@chromium.org> Web Inspector: incorrect height of main timeline pane after switching to memory mode https://bugs.webkit.org/show_bug.cgi?id=90387 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._splitterDragging): (WebInspector.TimelinePanel.prototype.set _setSplitterPosition): (WebInspector.TimelinePanel.prototype._overviewModeChanged): 2012-07-05 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: Add support for keyboard increment / decrement on numbers in attributes in Elements Panel https://bugs.webkit.org/show_bug.cgi?id=89586 Reviewed by Pavel Feldman Refactoring the key events while editing style property values. Migrated the code to UIUtils.js and referred from StylesSidebarPane.js, ElementsTreeOutline.js and MetricsSidebarPane.js. No new tests as code refactoring and UI feature added to ElementsTreeOutline.js * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingAttribute.handleKeyDownEvents): (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._handleKeyDown.finishHandler): (WebInspector.MetricsSidebarPane.prototype._handleKeyDown.customNumberHandler): (WebInspector.MetricsSidebarPane.prototype._handleKeyDown): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._handleNameOrValueUpDown.finishHandler): (WebInspector.StylesSidebarPane.prototype._handleNameOrValueUpDown): * inspector/front-end/UIUtils.js: (WebInspector._modifiedHexValue): (WebInspector._modifiedFloatNumber): (WebInspector.handleElementValueModifications): 2012-07-05 Gabor Rapcsanyi <rgabor@webkit.org> NEON intrinsics should be used with gaussian blur filter https://bugs.webkit.org/show_bug.cgi?id=90166 Reviewed by Zoltan Herczeg. Rewrite inline assembly to NEON intrinsics for better portabilty and readibility. Remove unnecessary FEGaussianBlurNEON.cpp and add NEONHelpers.h to the project which will contains the shared NEON code of the filters. Existing tests cover this issue. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplyGeneric): (WebCore::FEGaussianBlur::platformApplyWorker): * platform/graphics/filters/FEGaussianBlur.h: (FEGaussianBlur): * platform/graphics/filters/arm/FEGaussianBlurNEON.cpp: Removed. * platform/graphics/filters/arm/FEGaussianBlurNEON.h: (WebCore::boxBlurNEON): * platform/graphics/filters/arm/NEONHelpers.h: Added. (WebCore): (WebCore::loadRGBA8AsFloat): (WebCore::storeFloatAsRGBA8): 2012-07-05 Sam D <dsam2912@gmail.com> Web Inspector: Having a "Scroll into view" for nodes through web inspector. https://bugs.webkit.org/show_bug.cgi?id=89554 Added options for scrolling-into-view the element node through web inspector. Reviewed by Pavel Feldman. No new tests. UI change. * English.lproj/localizedStrings.js: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): (.): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.callFunction): 2012-07-05 Zan Dobersek <zandobersek@gmail.com> Add Gamepad logging channel https://bugs.webkit.org/show_bug.cgi?id=90570 Reviewed by Carlos Garcia Campos. Add a new logging channel for logging significant events that are related to Gamepad API implementation. No new tests - no new testable functionality. * platform/Logging.cpp: (WebCore): (WebCore::getChannelFromName): * platform/Logging.h: (WebCore): * platform/gtk/GamepadsGtk.cpp: Log when a device is registered or unregistered. (WebCore::GamepadsGtk::registerDevice): (WebCore::GamepadsGtk::unregisterDevice): 2012-07-05 Peter Wang <peter.wang@torchmobile.com.cn> Web Inspector: [JSC] support JS execution in the context of an isolated world https://bugs.webkit.org/show_bug.cgi?id=85709 Reviewed by Gavin Barraclough. No new test case for this bug. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::collectIsolatedContexts): (WebCore): 2012-07-04 Huang Dongsung <luxtella@company100.net> Add virtual keyword to ~BitmapImage and ~StillImage because ~Image is virtual. https://bugs.webkit.org/show_bug.cgi?id=90447 Reviewed by Alexey Proskuryakov. No new tests. This patch doesn't change behavior. * platform/graphics/BitmapImage.h: (BitmapImage): * platform/graphics/qt/StillImageQt.h: (StillImage): 2012-07-04 Mike West <mkwst@chromium.org> Implement the script-nonce Content Security Policy directive. https://bugs.webkit.org/show_bug.cgi?id=89577 Reviewed by Adam Barth. This patch implements the (experimental) script-nonce Content Security Policy directive from the 1.1 spec, which allows for selective execution of script by specifying a "nonce" attribute for the script tag. Script is only loaded and executed if it both matches the nonce and matches the script-src whitelist (if present). The implementation is gated on the ENABLE_CSP_NEXT flag, which is currently disabled for all ports other than Chromium. Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-nonce--experimental Tests: http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-badnonce.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-emptynonce.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::executeScript): Passing the nonce attribute through to check against CSP. * html/HTMLAttributeNames.in: * html/HTMLScriptElement.idl: Adding the `nonce` attribute to the script tag. * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::logInvalidNonce): (WebCore): (WebCore::CSPDirectiveList::checkNonceAndReportViolation): (WebCore::CSPDirectiveList::allowJavaScriptURLs): (WebCore::CSPDirectiveList::allowInlineEventHandlers): If a nonce is set, deny JavaScript URLs and inline event handlers. (WebCore::CSPDirectiveList::allowScriptNonce): (WebCore::CSPDirectiveList::parseScriptNonce): (WebCore::CSPDirectiveList::addDirective): (WebCore::isAllowedByAllWithNonce): (WebCore::ContentSecurityPolicy::allowScriptNonce): * page/ContentSecurityPolicy.h: (WebCore): 2012-07-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> Notifications should be in Modules/notifications https://bugs.webkit.org/show_bug.cgi?id=82121 Reviewed by Adam Barth. The notifications directory is now self-contained. This patch moves it to the Modules directory. No new tests, covered by existing tests. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * Modules/notifications/DOMWindowNotifications.cpp: Renamed from Source/WebCore/notifications/DOMWindowNotifications.cpp. (WebCore): (WebCore::DOMWindowNotifications::DOMWindowNotifications): (WebCore::DOMWindowNotifications::~DOMWindowNotifications): (WebCore::DOMWindowNotifications::from): (WebCore::DOMWindowNotifications::webkitNotifications): (WebCore::DOMWindowNotifications::disconnectFrameForPageCache): (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache): (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInCachedFrame): (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInFrame): (WebCore::DOMWindowNotifications::willDetachGlobalObjectFromFrame): * Modules/notifications/DOMWindowNotifications.h: Renamed from Source/WebCore/notifications/DOMWindowNotifications.h. (WebCore): (DOMWindowNotifications): * Modules/notifications/DOMWindowNotifications.idl: Renamed from Source/WebCore/notifications/DOMWindowNotifications.idl. * Modules/notifications/Notification.cpp: Renamed from Source/WebCore/notifications/Notification.cpp. (WebCore): (WebCore::Notification::Notification): (WebCore::Notification::~Notification): (WebCore::Notification::create): (WebCore::getAndAddEventListener): (WebCore::Notification::interfaceName): (WebCore::Notification::show): (WebCore::Notification::close): (WebCore::Notification::eventTargetData): (WebCore::Notification::ensureEventTargetData): (WebCore::Notification::contextDestroyed): (WebCore::Notification::finalize): (WebCore::Notification::dispatchShowEvent): (WebCore::Notification::dispatchClickEvent): (WebCore::Notification::dispatchCloseEvent): (WebCore::Notification::dispatchErrorEvent): (WebCore::Notification::taskTimerFired): (WebCore::Notification::permissionLevel): (WebCore::Notification::permissionString): (WebCore::Notification::requestPermission): * Modules/notifications/Notification.h: Renamed from Source/WebCore/notifications/Notification.h. (WebCore): (Notification): (WebCore::Notification::cancel): (WebCore::Notification::isHTML): (WebCore::Notification::setHTML): (WebCore::Notification::url): (WebCore::Notification::setURL): (WebCore::Notification::iconURL): (WebCore::Notification::title): (WebCore::Notification::body): (WebCore::Notification::dir): (WebCore::Notification::setDir): (WebCore::Notification::replaceId): (WebCore::Notification::setReplaceId): (WebCore::Notification::tag): (WebCore::Notification::setTag): (WebCore::Notification::direction): (WebCore::Notification::scriptExecutionContext): (WebCore::Notification::detachPresenter): (WebCore::Notification::setBody): (WebCore::Notification::refEventTarget): (WebCore::Notification::derefEventTarget): * Modules/notifications/Notification.idl: Renamed from Source/WebCore/notifications/Notification.idl. * Modules/notifications/NotificationCenter.cpp: Renamed from Source/WebCore/notifications/NotificationCenter.cpp. (WebCore): (WebCore::NotificationCenter::create): (WebCore::NotificationCenter::NotificationCenter): (WebCore::NotificationCenter::checkPermission): (WebCore::NotificationCenter::requestPermission): (WebCore::NotificationCenter::stop): (WebCore::NotificationCenter::requestTimedOut): (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): * Modules/notifications/NotificationCenter.h: Renamed from Source/WebCore/notifications/NotificationCenter.h. (WebCore): (NotificationCenter): (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification): (WebCore::NotificationCenter::client): (NotificationRequestCallback): * Modules/notifications/NotificationCenter.idl: Renamed from Source/WebCore/notifications/NotificationCenter.idl. * Modules/notifications/NotificationClient.h: Renamed from Source/WebCore/notifications/NotificationClient.h. (WebCore): (NotificationClient): (WebCore::NotificationClient::clearNotifications): (WebCore::NotificationClient::~NotificationClient): * Modules/notifications/NotificationController.cpp: Renamed from Source/WebCore/notifications/NotificationController.cpp. (WebCore): (WebCore::NotificationController::NotificationController): (WebCore::NotificationController::~NotificationController): (WebCore::NotificationController::create): (WebCore::NotificationController::clientFrom): (WebCore::NotificationController::supplementName): (WebCore::provideNotification): * Modules/notifications/NotificationController.h: Renamed from Source/WebCore/notifications/NotificationController.h. (WebCore): (NotificationController): (WebCore::NotificationController::from): (WebCore::NotificationController::client): * Modules/notifications/NotificationPermissionCallback.h: Renamed from Source/WebCore/notifications/NotificationPermissionCallback.h. (WebCore): (NotificationPermissionCallback): (WebCore::NotificationPermissionCallback::~NotificationPermissionCallback): * Modules/notifications/NotificationPermissionCallback.idl: Renamed from Source/WebCore/notifications/NotificationPermissionCallback.idl. * Modules/notifications/WorkerContextNotifications.cpp: Renamed from Source/WebCore/notifications/WorkerContextNotifications.cpp. (WebCore): (WebCore::WorkerContextNotifications::WorkerContextNotifications): (WebCore::WorkerContextNotifications::~WorkerContextNotifications): (WebCore::WorkerContextNotifications::from): (WebCore::WorkerContextNotifications::webkitNotifications): * Modules/notifications/WorkerContextNotifications.h: Renamed from Source/WebCore/notifications/WorkerContextNotifications.h. (WebCore): (WorkerContextNotifications): * Modules/notifications/WorkerContextNotifications.idl: Renamed from Source/WebCore/notifications/WorkerContextNotifications.idl. * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * WebCore.xcodeproj/project.pbxproj: 2012-07-04 Hayato Ito <hayato@chromium.org> Remove inline keywords from functions which can not be inlined in ComposedShadowTreeWalker https://bugs.webkit.org/show_bug.cgi?id=90432 Reviewed by Hajime Morita. No new tests - no functional changes. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseParent): (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): 2012-07-04 Luke Macpherson <macpherson@chromium.org> Inspector crashes when trying to inspect a page with CSS variables https://bugs.webkit.org/show_bug.cgi?id=89818 Reviewed by Antti Koivisto. Patch works by fixing treating handling of CSSPropertyID == CSSPropertyVariable as a special case, and looking up the author-defined property name from the CSSValue. Added test inspector/styles/variables/css-variables.html that inspects an element using CSS variables. Test is skipped when variables are compiled out. * css/CSSProperty.cpp: (WebCore::CSSProperty::cssName): (WebCore): (WebCore::CSSProperty::cssText): * css/CSSProperty.h: (CSSProperty): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::item): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::populateAllProperties): 2012-07-04 Anthony Scian <ascian@rim.com> Web Inspector [JSC]: Implement ScriptCallStack::stackTrace https://bugs.webkit.org/show_bug.cgi?id=40118 Reviewed by Yong Li. Implemented stub for createScriptCallStack to call into Interpreter and extract the current stack frames, iterate through the frames and create the return result required. No new tests, manually tested thrown exception and inspector tracebacks. * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): 2012-07-04 Dana Jansens <danakj@chromium.org> [chromium] Respect memory needed for RenderSurfaces when reserving contents textures https://bugs.webkit.org/show_bug.cgi?id=89901 Reviewed by Adrienne Walker. Treat the memory allocation given to a tab as an allocation for its contents and surfaces. Then only use up contents memory such that the surface textures will still fit within the limit. Report histograms for the amount of contents and surface texture memory used by each frame generated by the main thread. In the context of ubercomp, each nested compositor will use less memory for contents ensuring that the root compositor has space for surfaces caused by that nested compositor. Since surface memory can no longer be taken by contents, we remove the preferred memory limit from the texture manager. Tests: TiledLayerChromiumTest.dontAllocateContentsWhenTargetSurfaceCantBeAllocated CCPrioritizedTextureTest.renderSurfacesReduceMemoryAvailableOutsideRootSurface CCPrioritizedTextureTest.renderSurfacesReduceMemoryAvailableForRequestLate CCPrioritizedTextureTest.whenRenderSurfaceNotAvailableTexturesAlsoNotAvailable * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawBackgroundFilters): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::setTexturePriorities): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::prioritizeTextures): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::didUseContentsTextureMemoryBytes): (WebCore): (WebCore::CCOverdrawMetrics::didUseRenderSurfaceTextureMemoryBytes): (WebCore::CCOverdrawMetrics::recordMetricsInternal): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (CCOverdrawMetrics): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::prioritizeTextures): (WebCore::CCPrioritizedTextureManager::requestLate): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (WebCore::CCPrioritizedTextureManager::create): (WebCore::CCPrioritizedTextureManager::memoryForRenderSurfacesBytes): (CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: (WebCore::CCPriorityCalculator::uiPriority): (WebCore::CCPriorityCalculator::visiblePriority): (WebCore): (WebCore::CCPriorityCalculator::renderSurfacePriority): (WebCore::CCPriorityCalculator::priorityFromDistance): (WebCore::CCPriorityCalculator::priorityFromVisibility): * platform/graphics/chromium/cc/CCPriorityCalculator.h: (CCPriorityCalculator): 2012-07-04 John Mellor <johnme@chromium.org> Text Autosizing: Add basic framework https://bugs.webkit.org/show_bug.cgi?id=88655 This adds a highly simplified foundation that subsequent Text Autosizing patches can build upon. I've refactored this code (since the earlier combined diff uploaded to http://webkit.org/b/84186) to touch as few files as possible. Reviewed by Adam Barth. No new tests. I plan to add a test framework as my next Text Autosizing patch. * WebCore.gypi: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore): (Document): (WebCore::Document::textAutosizer): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/TextAutosizer.cpp: Added. (WebCore): (WebCore::TextAutosizer::TextAutosizer): (WebCore::TextAutosizer::~TextAutosizer): (WebCore::TextAutosizer::create): (WebCore::TextAutosizer::boostSubtree): (WebCore::TextAutosizer::boostBlock): (WebCore::TextAutosizer::boostText): (WebCore::TextAutosizer::treatAsInline): (WebCore::TextAutosizer::traverseNext): (WebCore::TextAutosizer::cloneRenderStyleWithState): * rendering/TextAutosizer.h: Added. (WebCore): (TextAutosizer): 2012-07-04 Andrey Kosyakov <caseq@chromium.org> Unreviewed, rolling out r121767. http://trac.webkit.org/changeset/121767 https://bugs.webkit.org/show_bug.cgi?id=89584 Crashes inspected page while recording timeline due to conflict with BeginFrame in record stack * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::willProcessTask): (WebCore::InspectorTimelineAgent::didProcessTask): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.recordStyle): (WebInspector.TimelinePresentationModel.categoryForRecord): (WebInspector.TimelinePresentationModel.forAllRecords): (WebInspector.TimelinePresentationModel.prototype.addRecord): 2012-07-04 Dana Jansens <danakj@chromium.org> [chromium] Clear RenderSurfaces still when no idle paint will be done https://bugs.webkit.org/show_bug.cgi?id=90553 Reviewed by Adrienne Walker. Currently if idle painting is disabled, updateLayers() will early-out. But this prevents it from doing cleanup and clearing all RenderSurface pointers, leaving the layer tree in an unexpected state. Tests: CCLayerTreeHostTestCompositeAndReadbackCleanup * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): 2012-07-04 John Mellor <johnme@chromium.org> Text Autosizing: Add compile flag and runtime setting https://bugs.webkit.org/show_bug.cgi?id=87394 This patch renames Font Boosting to Text Autosizing and adds compile guards around the runtime setting. Reviewed by Adam Barth. No functionality yet, so no new tests. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * Target.pri: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setTextAutosizingEnabled): * page/Settings.h: (Settings): (WebCore::Settings::textAutosizingEnabled): 2012-07-03 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Emulate pseudo styles (hover etc.) of non-selected elements https://bugs.webkit.org/show_bug.cgi?id=86630 Reviewed by Pavel Feldman. - A map of pseudo-states for all bound DOM nodes is maintained in the backend and queried whenever StyleResolver calculates the effective element style. - In the frontend, markers are introduced to distinguish elements that have forced pseudo styles set for them. Additionally, dimmed markers are added for collapsed nodes, whose descendants have forced pseudo styles. More ElementDecorator subtypes will be added for other types of markers. Test: inspector/styles/force-pseudo-state.html * English.lproj/localizedStrings.js: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::reset): (WebCore::InspectorCSSAgent::forcePseudoState): (WebCore::InspectorCSSAgent::recalcStyleForPseudoStateIfNeeded): (WebCore::InspectorCSSAgent::elementForId): (WebCore::InspectorCSSAgent::didRemoveDocument): (WebCore::InspectorCSSAgent::didRemoveDOMNode): (WebCore::InspectorCSSAgent::resetPseudoStates): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::unbind): (WebCore::InspectorDOMAgent::didRemoveDOMNode): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._setPseudoClassForNodeId): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._createNodeDecorators): (WebInspector.ElementsTreeOutline.prototype.updateOpenCloseTags): (WebInspector.ElementsTreeOutline.ElementDecorator): (WebInspector.ElementsTreeOutline.ElementDecorator.prototype.decorate): (WebInspector.ElementsTreeOutline.ElementDecorator.prototype.decorateAncestor): (WebInspector.ElementsTreeOutline.PseudoStateDecorator): (WebInspector.ElementsTreeOutline.PseudoStateDecorator.prototype.decorate): (WebInspector.ElementsTreeOutline.PseudoStateDecorator.prototype.decorateAncestor): (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): (WebInspector.ElementsTreeElement.prototype._populateForcedPseudoStateItems): (WebInspector.ElementsTreeElement.prototype.updateTitle): (WebInspector.ElementsTreeElement.prototype._createDecoratorElement): (WebInspector.ElementsTreeElement.prototype._updateDecorations): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.get forcedPseudoClasses): (WebInspector.StylesSidebarPane.prototype._updateForcedPseudoStateInputs): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._refreshUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener): * inspector/front-end/elementsPanel.css: (#elements-content .elements-gutter-decoration): (#elements-content .elements-gutter-decoration.elements-has-decorated-children): 2012-07-04 Pavel Feldman <pfeldman@chromium.org> Web Inspector: fix search on the network panel. https://bugs.webkit.org/show_bug.cgi?id=90557 Reviewed by Vsevolod Vlasov. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._highlightNthMatchedRequest): 2012-07-04 Kwang Yul Seo <skyul@company100.net> Stop tracking line number in tokenizer https://bugs.webkit.org/show_bug.cgi?id=90544 Reviewed by Adam Barth. Because SegmentedString knows how to track the current line and column, a tokenizer does not need to keep track of the current line by itself. No behavior change, so no new tests. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::lineNumber): (WebCore::HTMLDocumentParser::textPosition): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::flushBufferedEndTag): (WebCore): (WebCore::HTMLTokenizer::nextToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processScriptStartTag): * html/track/WebVTTTokenizer.cpp: (WebCore::WebVTTTokenizer::reset): (WebCore::WebVTTTokenizer::nextToken): * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): * platform/text/SegmentedString.h: (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber): (WebCore::SegmentedString::advanceAndUpdateLineNumber): (SegmentedString): * xml/parser/MarkupTokenizerBase.h: (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance): (WebCore::MarkupTokenizerBase::emitAndResumeIn): (WebCore::MarkupTokenizerBase::emitEndOfFile): (WebCore::MarkupTokenizerBase::reset): (MarkupTokenizerBase): * xml/parser/MarkupTokenizerInlineMethods.h: (WebCore): * xml/parser/XMLTokenizer.cpp: (WebCore::XMLTokenizer::nextToken): 2012-07-04 Ryuan Choi <ryuan.choi@samsung.com> [CMAKE] Add GENERATE_BINDINGS macro to share the codes which use generate-bindings.pl. https://bugs.webkit.org/show_bug.cgi?id=90258 Reviewed by Rob Buis. Use GENERATE_BINDINGS instead of using generate-bindings.pl directly. * UseJSC.cmake: * UseV8.cmake: * PlatformBlackBerry.cmake: 2012-07-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: UISourceCode should take care of adding revision after committing working copy. https://bugs.webkit.org/show_bug.cgi?id=90549 Reviewed by Pavel Feldman. Revision is now added in UISourceCode.commitWorkingCopy synchronously even if saving to JS VM or CSS model failed. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._handleOpenURL): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype._callOrSetTimeout): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.commitWorkingCopy): * inspector/front-end/Workspace.js: (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodeForURL): 2012-07-04 Pavel Feldman <pfeldman@chromium.org> Web Inspector: move settings button back to the right. https://bugs.webkit.org/show_bug.cgi?id=90552 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.css: (button.status-bar-item:active, button.status-bar-item.emulate-active): (button.settings-status-bar-item): 2012-07-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Get rid of ResourceDomainModelBinding and DebuggerResourceBinding, make Resource.setContent private. https://bugs.webkit.org/show_bug.cgi?id=90531 Reviewed by Pavel Feldman. Resource.setContent made private. It is delegating now to UISourceCodes which take care of domain specific actions. DebuggerResourceBinding was be removed and DebuggerResourceBinding.setScriptSource was moved to JavaScriptSource. ResourceDomainModelBinding was removed as well. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding): * inspector/front-end/DebuggerResourceBinding.js: Removed. * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): (WebInspector.JavaScriptSource.prototype._setScriptSource.didEditScriptSource): (WebInspector.JavaScriptSource.prototype._setScriptSource): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._setContent): (WebInspector.Resource.prototype.revertToOriginal): (WebInspector.Resource.prototype.revertAndClearHistory): (WebInspector.ResourceRevision.prototype.revertToThis): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.isEditable): * inspector/front-end/UISourceCode.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: (WebInspector.Workspace): * inspector/front-end/inspector.html: 2012-07-04 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: follow up to r121843, reduce inspector dock timeout to 200ms. * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarButton.prototype.makeLongClickEnabled.mouseDown): 2012-07-04 Ian Vollick <vollick@chromium.org> [chromium] Correctly reject accelerated animations with certain rotations. https://bugs.webkit.org/show_bug.cgi?id=89768 Reviewed by James Robinson. UnitTests: GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation GraphicsLayerChromiumTest.createTransformAnimationWithRotationInvolvingNegativeAngles GraphicsLayerChromiumTest.createTransformAnimationWithSmallRotationInvolvingLargeAngles * platform/graphics/chromium/AnimationTranslationUtil.cpp: (WebCore::appendKeyframe): (WebCore::isRotationType): (WebCore): (WebCore::causesRotationOfAtLeast180Degrees): (WebCore::CCKeyframedTransformAnimationCurve): (WebCore::createActiveAnimation): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::addAnimation): 2012-07-04 Pavel Feldman <pfeldman@chromium.org> Web Inspector: "Dock to right" shouldn't be in the settings dialog https://bugs.webkit.org/show_bug.cgi?id=76917 Reviewed by Vsevolod Vlasov. Introduced 'long click-enabled' options for status bar buttons. Made dock/undock one of them. * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarButton.prototype._clicked): (WebInspector.StatusBarButton.prototype.set visible): (WebInspector.StatusBarButton.prototype.makeLongClickEnabled.mouseDown): (WebInspector.StatusBarButton.prototype.makeLongClickEnabled.mouseUp): (WebInspector.StatusBarButton.prototype.makeLongClickEnabled): (WebInspector.StatusBarButton.prototype._showOptions.mouseOver): (WebInspector.StatusBarButton.prototype._showOptions.mouseOut): (WebInspector.StatusBarButton.prototype._showOptions.mouseUp): (WebInspector.StatusBarButton.prototype._showOptions): * inspector/front-end/UIUtils.js: (WebInspector.elementDragStart): (WebInspector.elementDragEnd): (WebInspector.GlassPane): (WebInspector.GlassPane.prototype.dispose): * inspector/front-end/inspector.css: (.long-click-glyph): (.long-click-glyph.shadow): (button.status-bar-item:active:not(.emulate-inactive), button.status-bar-item.emulate-active): (.alternate-status-bar-buttons-bar): (.alternate-status-bar-buttons-bar .status-bar-item): * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._createDockOptions.onClick.set else): (WebInspector._createDockOptions.onClick): 2012-07-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121813. http://trac.webkit.org/changeset/121813 https://bugs.webkit.org/show_bug.cgi?id=90522 Causes browser_tests failure: ErrorPageTest.DNSError_GoBack2{Forward2,AndForward} on Chromium {Linux,Mac,Win} (Requested by yosin on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): (WebCore::DocumentLoader::setupForReplaceByMIMEType): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): 2012-07-04 Kihong Kwon <kihong.kwon@samsung.com> [EFL] Change format of return value of navigator.language https://bugs.webkit.org/show_bug.cgi?id=89639 Reviewed by Kenneth Rohde Christiansen. Remove encoding type from return value of navigator.language. For example, from en-US.UTF-8 to en-US. Use exist test case (fast/js/navigator-language.html). * platform/efl/LanguageEfl.cpp: (WebCore::platformLanguage): 2012-07-03 Carlos Garcia Campos <cgarcia@igalia.com> [GTK] Don't show accel labels in context menu items https://bugs.webkit.org/show_bug.cgi?id=90437 Reviewed by Martin Robinson. When a context menu item is created with a GtkMenuItem that has been created from a GtkAction, if the action has an accelerator, it's shown in the menu item label, like menu items in a menu bar. In that case we should reset the accel closure of the menu item label, like GtkUIManager does for popup menus, to make sure the accelerator is not shown. This isn't needed for all other ContextMenuIem constructors, because the GtkAction is created without accelerator by webkit in those cases. * platform/gtk/ContextMenuItemGtk.cpp: (WebCore::ContextMenuItem::ContextMenuItem): 2012-07-03 Christophe Dumez <christophe.dumez@intel.com> [EFL] Move BatteryClientEfl from WebKit to WebCore https://bugs.webkit.org/show_bug.cgi?id=90063 Reviewed by Kenneth Rohde Christiansen. Move BatteryClientEfl class from WebKit to WebCore so that it can be reused in WebKit2. No new tests, no behavior change. * PlatformEfl.cmake: * platform/efl/BatteryClientEfl.cpp: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp. (WebCore): (WebCore::BatteryClientEfl::BatteryClientEfl): (WebCore::BatteryClientEfl::setController): (WebCore::BatteryClientEfl::startUpdating): (WebCore::BatteryClientEfl::stopUpdating): (WebCore::BatteryClientEfl::batteryControllerDestroyed): (WebCore::BatteryClientEfl::setBatteryStatus): (WebCore::BatteryClientEfl::timerFired): (WebCore::BatteryClientEfl::getBatteryStatus): (WebCore::BatteryClientEfl::setBatteryClient): * platform/efl/BatteryClientEfl.h: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h. (WebCore): (BatteryClientEfl): (WebCore::BatteryClientEfl::~BatteryClientEfl): (WebCore::BatteryClientEfl::batteryStatus): 2012-07-03 Huang Dongsung <luxtella@company100.net> Add a comment in order to clarify why BitmapImage::frameHasAlphaAtIndex returns true as default. https://bugs.webkit.org/show_bug.cgi?id=90445 Reviewed by Eric Seidel. No new tests. This patch doesn't change behavior. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::frameHasAlphaAtIndex): (WebCore): 2012-07-03 Alex Sakhartchouk <alexst@chromium.org> [chromium] Avoid calling getUniformLocation??() in the compositor startup https://bugs.webkit.org/show_bug.cgi?id=90217 Reviewed by Adrienne Walker. This change allows chrome compositor to bind uniform locations instead of querying them from the graphics context by using GL_CHROMIUM_bind_uniform_location. The extention itself is tested in chromium and the change in webkit simply adds plumbing to allow its usage. Existing pixel tests would be able to verify proper behaviour. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tileCheckerboardProgram): (WebCore::LayerRendererChromium::solidColorProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderPassProgram): (WebCore::LayerRendererChromium::renderPassProgramAA): (WebCore::LayerRendererChromium::renderPassMaskProgram): (WebCore::LayerRendererChromium::renderPassMaskProgramAA): (WebCore::LayerRendererChromium::tileProgram): (WebCore::LayerRendererChromium::tileProgramOpaque): (WebCore::LayerRendererChromium::tileProgramAA): (WebCore::LayerRendererChromium::tileProgramSwizzle): (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque): (WebCore::LayerRendererChromium::tileProgramSwizzleAA): (WebCore::LayerRendererChromium::textureProgram): (WebCore::LayerRendererChromium::textureProgramFlip): (WebCore::LayerRendererChromium::textureIOSurfaceProgram): (WebCore::LayerRendererChromium::videoYUVProgram): (WebCore::LayerRendererChromium::videoStreamTextureProgram): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::ProgramBindingBase::ProgramBindingBase): (WebCore::ProgramBindingBase::~ProgramBindingBase): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::link): (WebCore): (WebCore::ProgramBindingBase::cleanup): (WebCore::ProgramBindingBase::createShaderProgram): (WebCore::ProgramBindingBase::cleanupShaders): * platform/graphics/chromium/ProgramBinding.h: (ProgramBindingBase): (WebCore::ProgramBinding::initialize): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTex::init): (WebCore::VertexShaderPosTexYUVStretch::init): (WebCore::VertexShaderPos::init): (WebCore::VertexShaderPosTexTransform::init): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderTile::init): (WebCore::VertexShaderVideoTransform::init): (WebCore::FragmentTexAlphaBinding::init): (WebCore::FragmentTexOpaqueBinding::init): (WebCore::FragmentShaderOESImageExternal::init): (WebCore::FragmentShaderRGBATexAlphaAA::init): (WebCore::FragmentTexClampAlphaAABinding::init): (WebCore::FragmentShaderRGBATexAlphaMask::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderYUVVideo::init): (WebCore::FragmentShaderColor::init): (WebCore::FragmentShaderCheckerboard::init): * platform/graphics/chromium/ShaderChromium.h: (VertexShaderPosTex): (VertexShaderPosTexYUVStretch): (VertexShaderPos): (WebCore::VertexShaderPosTexIdentity::init): (VertexShaderPosTexTransform): (VertexShaderQuad): (VertexShaderTile): (VertexShaderVideoTransform): (FragmentTexAlphaBinding): (FragmentTexOpaqueBinding): (FragmentShaderOESImageExternal): (FragmentShaderRGBATexAlphaAA): (FragmentTexClampAlphaAABinding): (FragmentShaderRGBATexAlphaMask): (FragmentShaderRGBATexAlphaMaskAA): (FragmentShaderYUVVideo): (FragmentShaderColor): (FragmentShaderCheckerboard): * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::copyTexture): * platform/graphics/chromium/TextureCopier.h: (WebCore::AcceleratedTextureCopier::create): (AcceleratedTextureCopier): 2012-07-03 Erik Arvidsson <arv@chromium.org> [V8] Remove enableFasterDOMStoreAccess which is never used https://bugs.webkit.org/show_bug.cgi?id=90489 Reviewed by Adam Barth. No new tests. Dead code removal. * bindings/v8/V8DOMMap.cpp: * bindings/v8/V8DOMMap.h: (WebCore): 2012-07-03 Joshua Bell <jsbell@chromium.org> Binding: IDL type DOMString[] shouldn't match null https://bugs.webkit.org/show_bug.cgi?id=84217 Reviewed by Kentaro Hara. Similar to r121714, IDL overloads with T[] (which is only minimally supported) were being treated as Nullable by default during overloaded method dispatching, which deviates from the WebIDL specification. Extend the previous change to look for Nullable (specified by "?" type suffix in the IDL) for array types. Also, after inspection of the spec, use a strict "is this an Array?" test in the JS generator rather than an "inherits from Array.prototype?" test, to match the WebIDL spec. IDL files with affected overloads are modified to include the "?" suffix so that no behavior changes are introduced by this patch - the JS and V8 generator results before/after the change show no diffs apart from the stricter isJSArray() test. Test: bindings/scripts/test/TestObj.idl (a non-Nullable T[] overload) * Modules/indexeddb/IDBDatabase.idl: Tag T[] overloads with ? suffix. * Modules/indexeddb/IDBObjectStore.idl: Ditto. * Modules/vibration/NavigatorVibration.idl: Ditto. * bindings/scripts/CodeGeneratorJS.pm: Check isNullable for T[]. (GenerateParametersCheckExpression): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateParametersCheckExpression): * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined. (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): (WebCore): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/TestObj.idl: Tag existing T[] with ?, add non-? T[]. * bindings/scripts/test/V8/V8TestObj.cpp: Rebaselined. (WebCore::TestObjV8Internal::overloadedMethod9Callback): (TestObjV8Internal): (WebCore::TestObjV8Internal::overloadedMethodCallback): 2012-07-03 Nate Chapin <japhet@chromium.org> REGRESSION (r115654): Sometimes does not replace content for multipart/x-mixed-replace https://bugs.webkit.org/show_bug.cgi?id=88436 Reviewed by Brady Eidson. Test: http/tests/multipart/multipart-replace-non-html-content.php * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): We should only send receivedFirstData() once per main resource load, rather than multiple times in a multipart load. (WebCore::DocumentLoader::setupForReplaceByMIMEType): m_gotFirstByte isn't set to true until data is actually committed, and multipart data is often not committed until the part is finished. Check whether the SharedBuffer is non-null instead. * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): The JSInternals object my have already been cleared if the window shell was cleared as part of creation of a new Document. Check it before using it. 2012-07-03 Raymond Toy <rtoy@google.com> Add AudioFIFO class and simplify AudioPullFIFO https://bugs.webkit.org/show_bug.cgi?id=90398 Reviewed by Chris Rogers. No new tests. This code will be used in audio back-end implementation. Add AudioFIFO class to implement main parts of FIFO. Simplify implementation of AudioPushFIFO by using AudioFIFO. * WebCore.gypi: Add new files. New AudioFIFO class * platform/audio/AudioFIFO.cpp: Copied from Source/WebCore/platform/audio/AudioPullFIFO.cpp. (WebCore): (WebCore::AudioFIFO::AudioFIFO): (WebCore::AudioFIFO::consume): (WebCore::AudioFIFO::push): (WebCore::AudioFIFO::findWrapLengths): * platform/audio/AudioFIFO.h: Copied from Source/WebCore/platform/audio/AudioPullFIFO.h. (WebCore): (AudioFIFO): (WebCore::AudioFIFO::framesInFifo): (WebCore::AudioFIFO::updateIndex): Use AudioFIFO * platform/audio/AudioPullFIFO.cpp: (WebCore::AudioPullFIFO::AudioPullFIFO): (WebCore::AudioPullFIFO::consume): (WebCore::AudioPullFIFO::fillBuffer): * platform/audio/AudioPullFIFO.h: (AudioPullFIFO): 2012-07-03 Nate Chapin <japhet@chromium.org> Protect this DocumentThreadableLoader in cancel() to handle reentrancy properly. https://bugs.webkit.org/show_bug.cgi?id=90483 Reviewed by Abhishek Arya. No new tests, covered by http/tests/xmlhttprequest/reentrant-cancel.html * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::cancel): 2012-07-03 Tony Chang <tony@chromium.org> [chromium] Unreviewed, update .gitignore to handle VS2010 files. * WebCore.gyp/.gitignore: 2012-07-03 Zan Dobersek <zandobersek@gmail.com> [Gtk][Gamepads] 'warning: comparison is always true due to limited range of data type [-Wtype-limits]' in GamepadsGtk.cpp https://bugs.webkit.org/show_bug.cgi?id=90477 Reviewed by Martin Robinson. Vector::find() returns value of type size_t, springing errors when assigning the value to a variable of type unsigned. Use size_t type for that variable instead. No new tests - no changed functionality. * platform/gtk/GamepadsGtk.cpp: (WebCore::GamepadsGtk::unregisterDevice): 2012-07-03 Dominik Röttsches <dominik.rottsches@intel.com> Fix LayoutUnit usage in RenderImage::imageDimensionsChanged https://bugs.webkit.org/show_bug.cgi?id=90173 Reviewed by Eric Seidel. The appropriate type should be used for storing width() and height() into local temporary variables. No new tests, no change in behavior. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageDimensionsChanged): 2012-07-03 Sergio Villar Senin <svillar@igalia.com> [TextureMapper] Typo in edge-distance anti-aliasing code https://bugs.webkit.org/show_bug.cgi?id=90475 Reviewed by Martin Robinson. No new tests. This just fixes a typo. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): 2012-06-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [Extensions API] Resource manipulations should be based on UISourceCode thus extending Sources Panel. https://bugs.webkit.org/show_bug.cgi?id=89868 Reviewed by Pavel Feldman. Extensions API is now based on both ScriptsPanel acting as a UISourceCodeProvider and ResourceTreeModel. Extensions API resource could be for any content provider now. Extensions API resource.setContent implementation is now based on UISourceCode editing methods. Drive-by StyleSource insremental editing timeout fix. * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._handleOpenURL): (WebInspector.ExtensionServer.prototype._makeResource): (WebInspector.ExtensionServer.prototype._onGetPageResources): (WebInspector.ExtensionServer.prototype._getResourceContent): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): (WebInspector.ExtensionServer.prototype._notifyResourceAdded): (WebInspector.ExtensionServer.prototype._notifyResourceContentCommitted): * inspector/front-end/JavaScriptSource.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.uiSourceCodes): (WebInspector.ScriptsPanel.prototype.uiSourceCodeForURL): (WebInspector.ScriptsPanel.prototype._addUISourceCode): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.workingCopyCommitted): (WebInspector.StyleSource.prototype.workingCopyChanged): (WebInspector.StyleSource.prototype._callOrSetTimeout): (WebInspector.StyleSource.prototype._commitIncrementalEdit): (WebInspector.StyleSource.prototype._clearIncrementalUpdateTimer): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.requestContent): (WebInspector.UISourceCode.prototype.workingCopy): (WebInspector.UISourceCode.prototype.setWorkingCopy): (WebInspector.UISourceCode.prototype.isDirty): 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Anonymous scripts (evals) should not be added to Workspace. https://bugs.webkit.org/show_bug.cgi?id=90467 Reviewed by Pavel Feldman. * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded): 2012-07-03 Robert Hogan <robert@webkit.org> CSS 2.1 failure: floats-wrap-top-below-inline-* fail https://bugs.webkit.org/show_bug.cgi?id=88171 Reviewed by Eric Seidel. When shifting a line or element left or right to avoid a float use the height of the line or element to determine whether the float is inside the element or if it overlaps the bottom of the element. Do this by passing the height of the element to the interval tree used to detect the overlap with it's containing block's floats. The height is zero by default so callers to logical[Left|Right]OffsetForLine will need to pass the height if they want to use it to detect floats to avoid. Tests: css2.1/20110323/floats-wrap-top-below-bfc-001l.htm css2.1/20110323/floats-wrap-top-below-bfc-001r.htm css2.1/20110323/floats-wrap-top-below-bfc-002l.htm css2.1/20110323/floats-wrap-top-below-bfc-002r.htm css2.1/20110323/floats-wrap-top-below-bfc-003l.htm css2.1/20110323/floats-wrap-top-below-bfc-003r.htm css2.1/20110323/floats-wrap-top-below-inline-001l.htm css2.1/20110323/floats-wrap-top-below-inline-001r.htm css2.1/20110323/floats-wrap-top-below-inline-002l.htm css2.1/20110323/floats-wrap-top-below-inline-002r.htm css2.1/20110323/floats-wrap-top-below-inline-003l.htm css2.1/20110323/floats-wrap-top-below-inline-003r.htm css2.1/20110323/floats-zero-height-wrap-001.htm css2.1/20110323/floats-zero-height-wrap-002.htm fast/block/float/floats-wrap-inside-inline-001.htm fast/block/float/floats-wrap-inside-inline-002.htm fast/block/float/floats-wrap-inside-inline-003.htm fast/block/float/floats-wrap-inside-inline-004.htm fast/block/float/floats-wrap-inside-inline-005.htm * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): (WebCore::::collectIfNeeded): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::getClearDelta): * rendering/RenderBlock.h: (WebCore::RenderBlock::availableLogicalWidthForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::startOffsetForLine): (WebCore::RenderBlock::endOffsetForLine): (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): (RenderBlock): (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter): (WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue): (WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue): (FloatIntervalSearchAdapter): * rendering/RenderBlockLineLayout.cpp: (WebCore::logicalBottomForLine): (WebCore): (WebCore::LineWidth::updateAvailableWidth): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion): 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Introduce Workspace make it UISourceCode provider for ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=90466 Reviewed by Pavel Feldman. Introduced WebInspector.Workspace as a model (UISourceCode provider) behind ScriptsPanel. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ScriptsPanel.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: Added. (WebInspector.CompositeUISourceCodeProvider): (WebInspector.CompositeUISourceCodeProvider.prototype._registerUISourceCodeProvider): (WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeAdded): (WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeReplaced): (WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeRemoved): (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodes): (WebInspector.Workspace): (WebInspector.Workspace.prototype.registerUISourceCodeProvider): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2012-07-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Make use of .qmake.cache for caching features Instead of loading() features from the files that need them (and re-running a bunch of checks), we now run feature detection as part of configure.pro, and have build-webkit write the computed feature-defines and CONFIG to .qmake.cache, which is then loaded by qmake _before_ even defaults_pre when building WebKit.pro. At some point we'll be able to selectivly prevent running of config tests in configure.pro, which means we don't need a separate code-path for the build-webkit --help case. We should also move the code in build-webkit that now uses .webkit.config to detect clean builds, to use .qmake.cache, since we now store the same thing there. Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. * DerivedSources.pri: * WebCore.pri: 2012-07-03 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121766. http://trac.webkit.org/changeset/121766 https://bugs.webkit.org/show_bug.cgi?id=90465 It caused flakey build errors on the bots (Requested by Ossy on #webkit). * DerivedSources.pri: * WebCore.pri: 2012-07-03 George Staikos <staikos@webkit.org> [BlackBerry] Enable Custom Scheme Handlers for BlackBerry. https://bugs.webkit.org/show_bug.cgi?id=90422 Reviewed by Rob Buis. * page/NavigatorRegisterProtocolHandler.cpp: (WebCore::initProtocolHandlerWhitelist): Disable the overrides as they're undesired by BlackBerry 2012-07-03 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Forward message loop instrumentation data to frontend. https://bugs.webkit.org/show_bug.cgi?id=89584 Reviewed by Yury Semikhatsky. Transmit collected message loop tasks to inspector frontend. Now "Program" should be a top-level event on browsers that support message loop instrumentation. Frontend was changed so that user will not see any changes. * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): Added new event type - "Program" (WebCore::InspectorTimelineAgent::willProcessTask): Begin "Program" event. (WebCore::InspectorTimelineAgent::didProcessTask): Finish "Program" event. (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): Do not add counters to "Program" events. (WebCore): (WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic): Renamed from "setHeapSizeStatistic" * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): Unwraps "Program" events. (WebInspector.MemoryStatistics.prototype._innerRecordAdded): Renamed from "_onRecordAdded" * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): Unwraps "Program" events. (WebInspector.TimelineFrameController.prototype._innerAddRecord): Renamed from "_addRecord" * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): Filter out "Program" category. (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): Filter out "Program" category. (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): Unwraps "Program" events. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): Added "Program" category. (WebInspector.TimelinePresentationModel.recordStyle): Ditto. (WebInspector.TimelinePresentationModel.prototype.addRecord): Unwraps "Program" events. (WebInspector.TimelinePresentationModel.prototype._addRecord): Renamed from "addRecord" 2012-07-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Make use of .qmake.cache for caching features Instead of loading() features from the files that need them (and re-running a bunch of checks), we now run feature detection as part of configure.pro, and have build-webkit write the computed feature-defines and CONFIG to .qmake.cache, which is then loaded by qmake _before_ even defaults_pre when building WebKit.pro. At some point we'll be able to selectivly prevent running of config tests in configure.pro, which means we don't need a separate code-path for the build-webkit --help case. We should also move the code in build-webkit that now uses .webkit.config to detect clean builds, to use .qmake.cache, since we now store the same thing there. Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. * DerivedSources.pri: * WebCore.pri: 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> inspector/debugger/script-snippet-model.html fails https://bugs.webkit.org/show_bug.cgi?id=90385 Reviewed by Pavel Feldman. * inspector/front-end/ScriptSnippetModel.js: 2012-07-03 Alexander Pavlov <apavlov@chromium.org> [REGRESSION] Crash when copying a StyleRuleMedia with a NULL m_mediaQueries https://bugs.webkit.org/show_bug.cgi?id=90459 Reviewed by Andreas Kling. Create StyleRuleMedia with a non-NULL MediaQuerySet. The respective NULL checks for it were all over the code, except the copy constructor. Added the check, just in case. * css/CSSParser.cpp: (WebCore::CSSParser::createMediaRule): * css/StyleRule.cpp: (WebCore::StyleRuleMedia::StyleRuleMedia): 2012-07-03 Andrey Kosyakov <caseq@chromium.org> Web Inspector: display time intervals measured with console.time() and console.timeEnd() in Timeline https://bugs.webkit.org/show_bug.cgi?id=90442 Reviewed by Pavel Feldman. - added Time and TimeEnd record types produced by console.time() and console.timeEnd() - connect Time to TimeEnd in "glue" mode to better visualize the interval; - always make Time a top-level record; * English.lproj/localizedStrings.js: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::startConsoleTimingImpl): (WebCore::InspectorInstrumentation::stopConsoleTimingImpl): * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): (WebCore::InspectorTimelineAgent::didStartTiming): (WebCore): (WebCore::InspectorTimelineAgent::didStopTiming): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.recordStyle): (WebInspector.TimelinePresentationModel.categoryForRecord): (WebInspector.TimelinePresentationModel.prototype.reset): (WebInspector.TimelinePresentationModel.prototype.addRecord): (WebInspector.TimelinePresentationModel.prototype._findParentRecord): (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): 2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk> [Qt][Win] Fix broken QtWebKit5.lib linking https://bugs.webkit.org/show_bug.cgi?id=88321 Reviewed by Kenneth Rohde Christiansen. * platform/PlatformExportMacros.h: 2012-07-03 Philip Rogers <pdr@google.com> Fix text positioning with non-bmp characters. https://bugs.webkit.org/show_bug.cgi?id=87681 Reviewed by Nikolas Zimmermann. Previously when constructing metrics for tspans with non-bmp characters, each non-bmp character treated as a skipped character in the same way that spaces are ignored. This made sense because the initial SVGCharacterDataMap for <text> is indexed by character index (not string length) so the high portion of a non-bmp character was treated as a skipped space. Unfortunately, this led to a bug because skipped spaces lead to an offset in the positioning values list but non-bmp characters do not. This change switches the code to use a new offset for non-bmp characters, surrogatePairCharacters, which does not affect the positioning values list. Tests: svg/text/non-bmp-tspans-expected.svg svg/text/non-bmp-tspans.svg * rendering/svg/SVGTextMetricsBuilder.cpp: (WebCore::SVGTextMetricsBuilder::measureTextRenderer): 2012-07-03 Gyuyoung Kim <gyuyoung.kim@samsung.com> Improve test cases for network information APIs https://bugs.webkit.org/show_bug.cgi?id=90162 Reviewed by Adam Barth. Existing implementation doesn't test port implementation in network info APIs. This patch lets test cases use bandwidth and metered functions implemented by port layer. In addition, expected results need to check return type instead of property name. No new tests. Covered by existing tests. * Modules/networkinfo/NetworkInfoConnection.cpp: (WebCore::NetworkInfoConnection::bandwidth): (WebCore::NetworkInfoConnection::metered): 2012-07-03 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [EFL] [WK2] Don't call eina_iterator_free() if iterator is NULL https://bugs.webkit.org/show_bug.cgi?id=90076 Reviewed by Kenneth Rohde Christiansen. Add a null check to prevent calling eina_iterator_free() when iterator is NULL. No new tests. This patch doesn't change behavior. * platform/efl/FileSystemEfl.cpp: (WebCore::listDirectory): Early return when iterator is NULL. 2012-07-03 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text https://bugs.webkit.org/show_bug.cgi?id=90440 Reviewed by Vsevolod Vlasov. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingTextNode): 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Save scroll selection and cursor position of SourceFrames in sources panel. https://bugs.webkit.org/show_bug.cgi?id=90294 Reviewed by Yury Semikhatsky. Scroll and selection change handling is now delegated from TextViewer to SourceFrame. SourceFrame now dispatches ScrollChanged and SelectionChanged events. TabbedEditorContainer now saves scroll and selection information together with the url history and restores scroll and selection on resource opening. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype.highlightLine): (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded): (WebInspector.SourceFrame.prototype._clearLineHighlight): (WebInspector.SourceFrame.prototype.revealLine): (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded): (WebInspector.SourceFrame.prototype._clearLineToReveal): (WebInspector.SourceFrame.prototype.scrollToLine): (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded): (WebInspector.SourceFrame.prototype._clearLineToScrollTo): (WebInspector.SourceFrame.prototype.setSelection): (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded): (WebInspector.SourceFrame.prototype._wasShownOrLoaded): (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype.selectionChanged): (WebInspector.SourceFrame.prototype.scrollChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.selectionChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.scrollChanged): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners): (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners): (WebInspector.TabbedEditorContainer.prototype._scrollChanged): (WebInspector.TabbedEditorContainer.prototype._selectionChanged): (WebInspector.TabbedEditorContainer.prototype._appendFileTab): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.HistoryItem): (WebInspector.TabbedEditorContainer.HistoryItem.fromObject): (WebInspector.TabbedEditorContainer.HistoryItem.prototype.serializeToObject): (WebInspector.TabbedEditorContainer.History): (WebInspector.TabbedEditorContainer.History.fromObject): (WebInspector.TabbedEditorContainer.History.prototype.index): (WebInspector.TabbedEditorContainer.History.prototype.selectionRange): (WebInspector.TabbedEditorContainer.History.prototype.updateSelectionRange): (WebInspector.TabbedEditorContainer.History.prototype.scrollLineNumber): (WebInspector.TabbedEditorContainer.History.prototype.updateScrollLineNumber): (WebInspector.TabbedEditorContainer.History.prototype.update): (WebInspector.TabbedEditorContainer.History.prototype.remove): (WebInspector.TabbedEditorContainer.History.prototype.save): (WebInspector.TabbedEditorContainer.History.prototype.set _serializeToObject): * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.fromObject): (WebInspector.TextRange.prototype.clone): (WebInspector.TextRange.prototype.serializeToObject): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleScrollChanged): (WebInspector.TextViewer.prototype.scrollToLine): (WebInspector.TextViewer.prototype._handleSelectionChange): (WebInspector.TextViewer.prototype.setSelection): (WebInspector.TextViewer.prototype.wasShown): (WebInspector.TextViewer.prototype._handleFocused): (WebInspector.TextViewer.prototype.willHide): (WebInspector.TextViewerDelegate.prototype.selectionChanged): (WebInspector.TextViewerDelegate.prototype.scrollChanged): (WebInspector.TextEditorChunkedPanel.prototype.scrollToLine): 2012-07-03 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Make DirectoryContentView sortable https://bugs.webkit.org/show_bug.cgi?id=90361 Reviewed by Vsevolod Vlasov. * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): * inspector/front-end/DirectoryContentView.js: (WebInspector.DirectoryContentView): (WebInspector.DirectoryContentView.prototype.showEntries): (WebInspector.DirectoryContentView.prototype._sort): (WebInspector.DirectoryContentView.Node.comparator.isDirectoryCompare): (WebInspector.DirectoryContentView.Node.comparator.nameCompare): (WebInspector.DirectoryContentView.Node.comparator.typeCompare): (WebInspector.DirectoryContentView.Node.comparator.sizeCompare): (WebInspector.DirectoryContentView.Node.comparator): (WebInspector.DirectoryContentView.Node.prototype._metadataReceived): 2012-07-03 Jan Keromnes <janx@linux.com> Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor https://bugs.webkit.org/show_bug.cgi?id=89939 Reviewed by Vsevolod Vlasov. Fixed LayoutTests and PerformanceTests accordingly. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover): (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing): (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition): (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine): (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded): (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype.defaultFocusedElement): (WebInspector.SourceFrame.prototype.get textEditor): (WebInspector.SourceFrame.prototype.clearMessages): (WebInspector.SourceFrame.prototype.highlightLine): (WebInspector.SourceFrame.prototype._clearLineHighlight): (WebInspector.SourceFrame.prototype.revealLine): (WebInspector.SourceFrame.prototype.setSelection): (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype.onTextEditorContentLoaded): (WebInspector.SourceFrame.prototype._setTextEditorDecorations): (WebInspector.SourceFrame.prototype.searchCanceled): (WebInspector.SourceFrame.prototype.jumpToSearchResult): (WebInspector.SourceFrame.prototype.addMessageToSource): (WebInspector.SourceFrame.prototype.removeMessageFromSource): (WebInspector.SourceFrame.prototype.inheritScrollPositions): (WebInspector.TextEditorDelegateForSourceFrame): * inspector/front-end/TextViewer.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/textViewer.css: Removed. 2012-07-03 Charles Wei <charles.wei@torchmobile.com.cn> IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath https://bugs.webkit.org/show_bug.cgi?id=88338 Reviewed by David Levin. If the indexedDB runs in main thread it can access the GroupSettings via the document; otherwise, we need to pass the page GroupSettings to the worker thread so that accessible to the indexedDB running in WorkerContext. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::create): (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): * workers/DedicatedWorkerThread.h: (DedicatedWorkerThread): * workers/DefaultSharedWorkerRepository.cpp: (SharedWorkerProxy): (WebCore::SharedWorkerProxy::groupSettings): (WebCore): (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded): * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::create): (WebCore::SharedWorkerThread::SharedWorkerThread): * workers/SharedWorkerThread.h: (SharedWorkerThread): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): (WorkerThreadStartupData): (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::groupSettings): (WebCore): * workers/WorkerThread.h: (WorkerThread): 2012-07-03 Balazs Kelemen <kbalazs@webkit.org> [Qt][WK2] fast/viewport/viewport-91.html still fails after r121555 and r121661 https://bugs.webkit.org/show_bug.cgi?id=90376 Reviewed by Csaba Osztrogonác. No new tests, this is only a build alignment. Export ViewportArguments::deprecatedTargetDPI since it is used in WebKit2. * WebCore.exp.in: 2012-07-02 Martin Robinson <mrobinson@igalia.com> [TextureMapper] The TextureMapper should support edge-distance anti-antialiasing https://bugs.webkit.org/show_bug.cgi?id=90308 Reviewed by Noam Rosenthal. Add an edge-distance anti-aliasing implementation for the TextureMapper. Currently this implementation is not active for tiled layers. This implementation is based on the one in the Chromium compositor originally written by David Raveman. When a layer is transformed in a way that leaves its edge dimensions across pixel boundaries, edge distance anti-aliasing will do a cheaper form of anti-aliasing than full-scene anti-aliasing to make the transition from the layer pixel to the background pixel smoother. No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated compositing and 3D transforms, when those test harnesses are capable of producing pixel output (in progress). * platform/graphics/texmap/TextureMapper.h: Add an enum which is used to tell the texture mapper what edges of a texture are exposed. This will be used for properly dealing with tiled layers in the future. * platform/graphics/texmap/TextureMapperBackingStore.cpp: Properly pass information about exposed layer edges to the TextureMapper while painting. * platform/graphics/texmap/TextureMapperBackingStore.h: (TextureMapperTile): Modified arguments include exposed edges. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): Renamed from drawRect, this method can now draw quads that have non unit-rect texture coordinates. This is necessary because the edge distance approach draws such quad. (WebCore::TextureMapperGL::drawBorder): Call drawQuad now instead of drawRect. (WebCore::TextureMapperGL::drawTexture): Pass the exposedEdges argument down. (WebCore::TextureMapperGL::drawTextureRectangleARB): Call drawQuad now instead of drawRect. (WebCore::viewportMatrix): Added this helper which can calculate the viewport transform based on the current OpenGL viewport settings. (WebCore::scaleLineEquationCoeffecientsToOptimizeDistanceCalculation): Added this helper which optimizes the fragment shader by precalculating some constant parts of the distance calculation. (WebCore::getStandardEquationCoeffecientsForLine): Given two end points of line segment get the coeffecients of the line in the standard form of the line equation. (WebCore::quadToEdgeArray): Converts a FloatQuad to an array of four sets of pre-scaled line coefficients so that they can be passed to OpenGL. (WebCore::scaledVectorDifference): Helper which helps expand a quad of arbitrary orientation. (WebCore::inflateQuad): Inflate a quad of arbitrary orientation. The transform may flip it so we have to look at neighboring points to expand the quad. (WebCore::TextureMapperGL::drawTextureWithAntialiasing): Activate the anti-aliasing program and set up all uniforms. (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): Abstract out common operations from drawTexture to be used with drawTextureWithAntialiasing. * platform/graphics/texmap/TextureMapperGL.h: (WebCore::TextureMapperGL::DrawQuad::DrawQuad): Add this small type which stores information necessary to draw a quad -- it's original destination rect and the final size mapped to texture coordinates. (TextureMapperGL): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Add the new exposedEdges argument. * platform/graphics/texmap/TextureMapperImageBuffer.h: Ditto. * platform/graphics/texmap/TextureMapperShaderManager.cpp: Add the new fragment shader for doing edge-distance AA and a program which uses that shader. * platform/graphics/texmap/TextureMapperShaderManager.h: Ditto. 2012-07-02 Dan Bernstein <mitz@apple.com> Column height and count calculation ignores most overflow https://bugs.webkit.org/show_bug.cgi?id=90392 Reviewed by Dean Jackson. Test: fast/multicol/overflow-content.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::relayoutForPagination): Changed to compute the overflow from children and use the layout overflow height rather the content height. 2012-07-02 Chris Guan <chris.guan@torchmobile.com.cn> [BlackBerry] Refactor : move the implementation of getMIMETypeForExtension and getPreferredExtensionForMIMEType into BlackBerry platform https://bugs.webkit.org/show_bug.cgi?id=90360 Reviewed by Antonio Gomes. We should have one implementation for getMIMETypeForExtension and getPreferredExtensionForMIMEType for both webkit and platform, so I move this implementation to BlackBerry platform. No new test cases , because no behavior changed. * platform/blackberry/MIMETypeRegistryBlackBerry.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): 2012-07-02 Emil A Eklund <eae@chromium.org> Position replaced elements on pixel bounds https://bugs.webkit.org/show_bug.cgi?id=90354 Reviewed by Eric Seidel. To avoid sizing and repaint issues we should layout replaced elements on pixel bounds. We already ensure that replaced elements are sized in full pixels and that they are painted on pixel bounds. By also ensuring that they are placed on pixel bounds we avoid pixel having the size be expanded by pixel snapping and repainting/invalidation rect issues when scrolling. Test: fast/repaint/repaint-during-scroll-with-zoom.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePositionedLogicalWidthReplaced): (WebCore::RenderBox::computePositionedLogicalHeightReplaced): 2012-07-02 Nico Weber <thakis@chromium.org> Fix new -Wunused-private-field violations https://bugs.webkit.org/show_bug.cgi?id=90417 Reviewed by Ryosuke Niwa. No intended behavior change. * inspector/InspectorFileSystemAgent.cpp: (WebCore): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (CCPrioritizedTextureManager): 2012-07-02 Yoshifumi Inoue <yosin@chromium.org> Build fix for Chromimum r121710 removed WebCore/platform/qt/GraphicsLayerQt.{cpp,h}. However, that patch didn't remove them from WebCore.gypi. * WebCore.gypi: Removed GraphicsLayerQt.{cpp,h} 2012-07-02 Joshua Bell <jsbell@chromium.org> IDL overloads should not treat wrapper types as nullable by default https://bugs.webkit.org/show_bug.cgi?id=90218 Reviewed by Kentaro Hara. Wrapper types were being treated as Nullable by default during overloaded method dispatching, which deviates from the WebIDL specification. This change introduces the "?" type suffix into the parser, and treats wrapper types only nullable if specified. (The behavior of array types and other non-wrapper types are not changed, and only overloaded methods are checked.) IDL files with affected overloads are modified to include the "?" suffix so that no behavior changes are introduced by this patch - the JS and V8 generator results before/after the change show no diffs. Test: bindings/scripts/test/TestObj.idl (a non-nullable overload) * Modules/indexeddb/IDBDatabase.idl: Added "?" where necessary. * Modules/indexeddb/IDBIndex.idl: Added "?" where necessary. * Modules/indexeddb/IDBObjectStore.idl: Added "?" where necessary. * Modules/webaudio/AudioContext.idl: Added "?" where necessary. * Modules/webaudio/AudioNode.idl: Added "?" where necessary. * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheckExpression): Add isNullable check. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheckExpression): Add isNullable check. * bindings/scripts/IDLParser.pm: Parse/set isNullable. (parseParameters): * bindings/scripts/IDLStructure.pm: Add basic type suffix parsing. * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): (WebCore): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/TestObj.idl: Mark previous overload params with ?, add new one without. * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::overloadedMethod8Callback): (TestObjV8Internal): (WebCore::TestObjV8Internal::overloadedMethodCallback): * dom/DataTransferItemList.idl: Added "?" where necessary. * fileapi/WebKitBlobBuilder.idl: Added "?" where necessary. * html/DOMURL.idl: Added "?" where necessary. * html/canvas/CanvasRenderingContext2D.idl: Added "?" where necessary. * html/canvas/WebGLRenderingContext.idl: Added "?" where necessary. 2012-07-02 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Get rid of GraphicsLayerQt https://bugs.webkit.org/show_bug.cgi?id=78598 Reviewed by Luiz Agostini. Remove GraphicsLayerQt.h/cpp, as well as references to the non-TextureMapper code paths in GraphicsContext3DQt and MediaPlayerPrivateQt. No new tests, removing unused code paths. * Target.pri: * platform/graphics/PlatformLayer.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (GraphicsContext3DPrivate): (WebCore): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore): * platform/graphics/qt/GraphicsLayerQt.cpp: Removed. * platform/graphics/qt/GraphicsLayerQt.h: Removed. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::invalidateRect): (WebCore::PluginView::platformStart): 2012-07-02 Behdad Esfahbod <behdad@behdad.org> LayoutUnit::epsilon() is wrong https://bugs.webkit.org/show_bug.cgi?id=90083 Reviewed by Eric Seidel. Do division in floats, not integers. No new tests. No code using the affected function. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::epsilon): 2012-07-02 Tim Horton <timothy_horton@apple.com> Compositing layer sync should cause deferred repaints to be fired immediately https://bugs.webkit.org/show_bug.cgi?id=90401 <rdar://problem/11792028> Reviewed by Simon Fraser and Antti Koivisto. If we sync compositing layers and allow the repaint to be deferred, there is time for a visible flash to occur. Instead, stop the deferred repaint timer and repaint immediately. No new tests, configuration and timing dependent. * page/FrameView.cpp: (WebCore::FrameView::syncCompositingStateForThisFrame): (WebCore::FrameView::checkStopDelayingDeferredRepaints): (WebCore::FrameView::stopDelayingDeferredRepaints): Split off from checkStopDelayingDeferredRepaints. * page/FrameView.h: (FrameView): Add stopDelayingDeferredRepaints. 2012-07-02 Benjamin Poulain <bpoulain@apple.com> Do not do any logging initialization when logging is disabled https://bugs.webkit.org/show_bug.cgi?id=90228 Reviewed by Simon Fraser. Initializating of the logging channels was taking time on startup. When logging is disabled (and the LOG macro does nothing), we should aslo disable logging channels and initialization. This patch #ifdef the Logging initialization with the macro LOG_DISABLED. * WebCore.exp.in: * make-export-file-generator: Explicitely adds Assertions.h so that LOG_DISABLED is defined. * platform/Logging.cpp: * platform/Logging.h: * platform/blackberry/LoggingBlackBerry.cpp: * platform/efl/LoggingEfl.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/gtk/LoggingGtk.cpp: * platform/mac/LoggingMac.mm: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ensureSessionIsInitialized): * platform/qt/LoggingQt.cpp: * platform/win/LoggingWin.cpp: * platform/wx/LoggingWx.cpp: 2012-07-02 Dan Bernstein <mitz@apple.com> <rdar://problem/11787030> In vertical writing modes, child following float-clearing block has incorrect logical top https://bugs.webkit.org/show_bug.cgi?id=90359 Reviewed by Anders Carlsson. Test: fast/writing-mode/logical-height-after-clear.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloatsIfNeeded): Changed to use logicalTop() and logicalHeight() instead of y() and height(). 2012-07-02 Arko Saha <arko@motorola.com> Microdata: Fix build failure after r121580. https://bugs.webkit.org/show_bug.cgi?id=90378 Reviewed by Ryosuke Niwa. * html/HTMLElement.cpp: (WebCore::HTMLElement::properties): * html/HTMLElement.h: 2012-07-02 Tommy Widenflycht <tommyw@google.com> MediaStream API: Update MediaStreamTrackList to match the specification https://bugs.webkit.org/show_bug.cgi?id=90171 Reviewed by Adam Barth. The latest update to the specification added add and remove methods with corresponding callbacks. The callbacks can be triggered both from JS and from the platform layer. Test: fast/mediastream/MediaStreamTrackList.html * CMakeLists.txt: * GNUmakefile.list.am: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::streamEnded): (WebCore::MediaStream::addTrack): (WebCore): (WebCore::MediaStream::removeTrack): * Modules/mediastream/MediaStream.h: (MediaStream): * Modules/mediastream/MediaStreamTrackEvent.cpp: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.cpp. (WebCore): (WebCore::MediaStreamTrackEvent::create): (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): (WebCore::MediaStreamTrackEvent::~MediaStreamTrackEvent): (WebCore::MediaStreamTrackEvent::track): (WebCore::MediaStreamTrackEvent::interfaceName): * Modules/mediastream/MediaStreamTrackEvent.h: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.h. (WebCore): (MediaStreamTrackEvent): * Modules/mediastream/MediaStreamTrackEvent.idl: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.idl. * Modules/mediastream/MediaStreamTrackList.cpp: (WebCore::MediaStreamTrackList::create): (WebCore::MediaStreamTrackList::MediaStreamTrackList): (WebCore::MediaStreamTrackList::detachOwner): (WebCore): (WebCore::MediaStreamTrackList::add): (WebCore::MediaStreamTrackList::remove): (WebCore::MediaStreamTrackList::stop): (WebCore::MediaStreamTrackList::interfaceName): (WebCore::MediaStreamTrackList::scriptExecutionContext): (WebCore::MediaStreamTrackList::eventTargetData): (WebCore::MediaStreamTrackList::ensureEventTargetData): * Modules/mediastream/MediaStreamTrackList.h: (MediaStreamTrackList): * Modules/mediastream/MediaStreamTrackList.idl: * WebCore.gypi: * dom/EventNames.h: (WebCore): * dom/EventNames.in: * dom/EventTargetFactory.in: * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::addMediaStreamTrack): (WebCore): (WebCore::MediaStreamCenter::removeMediaStreamTrack): * platform/mediastream/MediaStreamCenter.h: (MediaStreamCenter): * platform/mediastream/MediaStreamDescriptor.h: (MediaStreamDescriptorOwner): * platform/mediastream/chromium/MediaStreamCenterChromium.cpp: (WebCore::MediaStreamCenterChromium::didAddMediaStreamTrack): (WebCore): (WebCore::MediaStreamCenterChromium::didRemoveMediaStreamTrack): (WebCore::MediaStreamCenterChromium::addMediaStreamTrack): (WebCore::MediaStreamCenterChromium::removeMediaStreamTrack): * platform/mediastream/chromium/MediaStreamCenterChromium.h: (WebKit): (MediaStreamCenterChromium): * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: (WebCore::MediaStreamCenterGStreamer::didAddMediaStreamTrack): (WebCore): (WebCore::MediaStreamCenterGStreamer::didRemoveMediaStreamTrack): * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h: (MediaStreamCenterGStreamer): 2012-07-02 Andrey Kosyakov <caseq@chromium.org> Web Inspector: incorrect height of main timeline pane after switching to memory mode https://bugs.webkit.org/show_bug.cgi?id=90387 Reviewed by Pavel Feldman. - update cached container height when setting vertical splitter position. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.set _setSplitterPosition): 2012-07-02 Christophe Dumez <christophe.dumez@intel.com> [MICRODATA] Build failure in html/HTMLPropertiesCollection.h https://bugs.webkit.org/show_bug.cgi?id=90379 Reviewed by Ryosuke Niwa. Switch HTMLCollection::append() visibility from private to protected so that HTMLPropertiesCollection subclass can call it. This fixes build when MICRODATA flag is turned on. No new tests, build fix. * html/HTMLCollection.h: (HTMLCollectionCacheBase): 2012-07-02 Kwang Yul Seo <skyul@company100.net> A start "body" tag in the "in body" insertion mode is a parse error https://bugs.webkit.org/show_bug.cgi?id=90373 Reviewed by Eric Seidel. According to HTML5 specification (http://www.w3.org/TR/html5/tree-construction.html#parsing-main-inbody), a start "body" tag in the "in body" insertion mode is a parse error. So parseError(token) is required here. No behavior change because parseError(token) is just a marker. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): 2012-07-02 Raphael Kubo da Costa <rakuco@webkit.org> [EFL] Unreviewed build fix with ENABLE_NETSCAPE_PLUGIN_API after r121467. * plugins/efl/PluginPackageEfl.cpp: (WebCore::PluginPackage::load): Move the declaration of `err' before the first `goto' statement. 2012-07-02 Alexei Filippov <alexeif@chromium.org> Web Inspector: replace recursion with a stack in DOM nodes snapshot traversal. https://bugs.webkit.org/show_bug.cgi?id=89889 Number of DOM nodes native snapshots can handle was limited by the process stack size because of recursion used to traverse the nodes. The patch changes the recursion to a stack based algorithm. Reviewed by Yury Semikhatsky. * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (InstrumentedPointerBase): (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase): (InstrumentedPointer): (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer): (WebCore::MemoryInstrumentation::reportInstrumentedPointer): (WebCore): (WebCore::::process): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-02 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add requestFileContent command and fileContentReceived event https://bugs.webkit.org/show_bug.cgi?id=89642 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/read-file.html * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileContent): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype.requestMetadata): (WebInspector.FileSystemModel.prototype.requestFileContent): (WebInspector.FileSystemModel.File.prototype.get resourceType): (WebInspector.FileSystemModel.File.prototype.requestFileContent): (WebInspector.FileSystemRequestManager): (WebInspector.FileSystemRequestManager.prototype._metadataReceived): (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileContent): (WebInspector.FileSystemRequestManager.prototype._fileContentReceived): (WebInspector.FileSystemDispatcher.prototype.metadataReceived): (WebInspector.FileSystemDispatcher.prototype.fileContentReceived): 2012-07-02 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add refresh button to FileSystemView status bar https://bugs.webkit.org/show_bug.cgi?id=90244 Reviewed by Vsevolod Vlasov. * inspector/front-end/FileSystemView.js: (WebInspector.FileSystemView): (WebInspector.FileSystemView.prototype.get statusBarItems): (WebInspector.FileSystemView.prototype.showView): (WebInspector.FileSystemView.prototype._refresh): (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived): 2012-06-22 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Implement snippets evaluation. https://bugs.webkit.org/show_bug.cgi?id=88707 Reviewed by Pavel Feldman. Implemented snippet evaluation and adjusted breakpoints behavior when editing snippet. Snippets are evaluated using separate compile and run. Breakpoints are updated after compilation (once scriptId is available they can be set in debugger). If separate compile and run is not supported by port or debugger is paused we fall back to evaluation in console. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.runScript.runCallback): (WebInspector.ConsoleView.prototype.runScript): (WebInspector.ConsoleView.prototype._printResult): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype._didEditContent): (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointsBeforeEditing): (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing): (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype.deleteScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent): (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.compileCallback): (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._rawLocationToUILocation): (WebInspector.ScriptSnippetModel.prototype._removeBreakpoints): (WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints): (WebInspector.ScriptSnippetModel.prototype._evaluationSourceURL): (WebInspector.SnippetJavaScriptSource.prototype.isDivergedFromVM): (WebInspector.SnippetJavaScriptSource.prototype.workingCopyCommitted): (WebInspector.SnippetJavaScriptSource.prototype.workingCopyChanged): (WebInspector.SnippetJavaScriptSource.prototype.evaluate): (WebInspector.SnippetJavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing): (WebInspector.SnippetJavaScriptSource.prototype.breakpointStorageId): * inspector/front-end/ScriptsNavigator.js: (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet): 2012-06-26 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: StyleSource should set content using CSSStyleModelResourceBinding directly. https://bugs.webkit.org/show_bug.cgi?id=89891 Reviewed by Pavel Feldman. StyleSource now calls CSS resource binding directly. CSS resource binding now adds resource revision only after setStyleSheetText call returns from backend. Resource.revertAndClearHistory is now clearing history asynchronously since Resource.setContent adds revision that should be removed as well. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule): (WebInspector.CSSStyleModel.prototype.resourceBinding): (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent.innerCallback): (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.revertAndClearHistory): (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory): * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.prototype._createResourceItem): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.workingCopyCommitted): (WebInspector.StyleSource.prototype.workingCopyChanged): 2012-07-02 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add DirectoryContentView for FileSystemView https://bugs.webkit.org/show_bug.cgi?id=89961 Reviewed by Vsevolod Vlasov. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/DirectoryContentView.js: Added. * inspector/front-end/FileSystemView.js: (WebInspector.FileSystemView): (WebInspector.FileSystemView.EntryTreeElement.prototype.onattach): (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect): (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-02 Christophe Dumez <christophe.dumez@intel.com> [EFL] Fix compilation error in GamepadsEfl.cpp in debug mode https://bugs.webkit.org/show_bug.cgi?id=90369 Unreviewed, EFL build fix. * platform/efl/GamepadsEfl.cpp: (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadsEfl::unregisterDevice): 2012-07-02 Nikita Vasilyev <me@elv1s.ru> Web Inspector: Design WebSockets panel https://bugs.webkit.org/show_bug.cgi?id=89461 Use DataGrid to display the data. Put "Data" column first. Make it wider. Remove "Mask" column since it appears to be always true for outgoing frames, and false for incoming. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): Don't show Preview, Response, Cookies and Timing tabs for succefuly established WebSocket connection. * inspector/front-end/ResourceWebSocketFrameView.js: (WebInspector.ResourceWebSocketFrameView): * inspector/front-end/networkPanel.css: (.resource-websocket): (.resource-websocket, .resource-websocket .data-grid): (.resource-websocket .data-grid .data): (.resource-websocket td): (.resource-websocket .data-column div): (.resource-websocket-row-outcoming): (.resource-websocket-row-outcoming:not(.selected) td): (.resource-websocket-row-outcoming:not(.selected) td, .resource-websocket-row-outcoming:not(.selected) + tr td): (.resource-websocket-row-opcode): (.resource-websocket-row-opcode td): (.resource-websocket-row-opcode td, .resource-websocket-row-opcode + tr td): (.resource-websocket-row-error): 2012-07-02 Vineet Chaudhary <rgf748@motorola.com> [V8Binding] Merging v8NumberArray()/v8NumberArrayToVector() to v8Array()/toNativeArray() respectively. https://bugs.webkit.org/show_bug.cgi?id=90338 Reviewed by Kentaro Hara. We can remove v8NumberArray() and v8NumberArrayToVector() implementaion merging them to current v8Array() and toNativeArray() traits. Tests: TestObj.idl Shouldn't cause any behavioural changes. * bindings/scripts/CodeGeneratorV8.pm: Removed float[]/double[] specific binding code. (IsRefPtrType): (GetNativeType): (JSValueToNative): (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test. (WebCore::TestObjV8Internal::floatArrayAttrGetter): (WebCore::TestObjV8Internal::floatArrayAttrSetter): (WebCore::TestObjV8Internal::doubleArrayAttrGetter): (WebCore::TestObjV8Internal::doubleArrayAttrSetter): * bindings/v8/V8Binding.h: Added templates for float and double. (WebCore::v8Array): (WebCore::toNativeArray): 2012-07-02 Konrad Piascik <kpiascik@rim.com> [EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555 https://bugs.webkit.org/show_bug.cgi?id=90286 Reviewed by Daniel Bates. Since the deprecatedTargetDPI was an int and the deviceDPI was also an int the result was truncated. Changed deprecatedTargetDPI to a float value. Viewport test 91 now passes. * dom/ViewportArguments.h: (ViewportArguments): 2012-06-28 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add v8 bindings memory info to the native memory graph https://bugs.webkit.org/show_bug.cgi?id=90149 Reviewed by Pavel Feldman. Size of V8 binding maps is now reported on the memory chart. * bindings/js/ScriptProfiler.h: (WebCore::ScriptProfiler::collectBindingMemoryInfo): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): (WebCore): * bindings/v8/DOMDataStore.h: (WebCore): (DOMDataStore): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): (ChunkedTable): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectBindingMemoryInfo): (WebCore): * bindings/v8/ScriptProfiler.h: (WebCore): (ScriptProfiler): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8Binding.h: (WebCore): (StringCache): (V8BindingPerIsolateData): * bindings/v8/V8DOMMap.h: (WebCore): (AbstractWeakReferenceMap): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore): (WebCore::MemoryInstrumentation::reportHashMap): added a method for reporting size of a HashMap. * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::domTreeInfo): 2012-07-01 Christophe Dumez <christophe.dumez@intel.com> [EFL] Add Gamepad support https://bugs.webkit.org/show_bug.cgi?id=90170 Reviewed by Kenneth Rohde Christiansen. Add support for the Gamepad feature on the EFL port. The implementation of this class relies on the Linux kernel joystick API. Gamepad devices are recognized through the GamepadsEfl class, of which implementation is based on Eeze library. This way devices are properly registered on connection as objects of the GamepadDeviceEfl class which inherits GamepadDeviceLinux. GamepadDeviceEfl reads the joystick data through an Ecore_Fd_Handler and updates the device state accordingly. The GamepadsEfl object is then polled for gamepads data through the sampleGamepads method. No new tests - already tested by gamepad/* * CMakeLists.txt: * PlatformEfl.cmake: * platform/efl/GamepadsEfl.cpp: Added. (WebCore): (GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::create): (WebCore::GamepadDeviceEfl::GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::~GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::readCallback): (GamepadsEfl): (WebCore::GamepadsEfl::onGamePadChange): (WebCore::GamepadsEfl::GamepadsEfl): (WebCore::GamepadsEfl::~GamepadsEfl): (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadsEfl::unregisterDevice): (WebCore::GamepadsEfl::updateGamepadList): (WebCore::sampleGamepads): 2012-07-01 James Robinson <jamesr@chromium.org> Unreviewed, rolling out r121635. http://trac.webkit.org/changeset/121635 https://bugs.webkit.org/show_bug.cgi?id=90286 Breaks compile on clang error: in-class initializer for static data member of type 'const float' is a GNU extension [-Werror,-Wgnu] * dom/ViewportArguments.h: (ViewportArguments): 2012-07-01 Timothy Hatcher <timothy@apple.com> Make the "Inspect Element" context menu item appear in nightly builds again. rdar://problem/11702613 https://webkit.org/b/89323 Reviewed by Dan Bernstein. * platform/ContextMenuItem.h: Fix the order of the ContextMenuAction enum to be binary compatible with older versions of WebKit. 2012-07-01 Dan Bernstein <mitz@apple.com> <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs https://bugs.webkit.org/show_bug.cgi?id=90349 Reviewed by Dean Jackson. Test: platform/mac/fast/text/vertical-surrogate-pair.html * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill): When calling wkGetVerticalGlyphsForCharacters or CTFontGetGlyphsForCharacters with a buffer consisting of surrogate pair, account for those functions’ behavior of placing glyphs at indices corresponding to the first character of each pair. 2012-07-01 Kenichi Ishibashi <bashi@chromium.org> Arabic shaping is incorrect if ZWNJ exist https://bugs.webkit.org/show_bug.cgi?id=89843 Reviewed by Dan Bernstein. mac port treats ZWJ (zero-width-joiner) and ZWNJ (zero-width-non-joiner) as a part of combining character sequence. This could cause a problem when the font doesn't have glyph mapping of ZWJ and ZWNJ. Suppose the text to be rendered is "U+0645(MEEM) U+06CC(FARSI YEH) U+200C(ZWNJ)". In this case, U+0645 and U+06CC are rendered in isolated form if the font doesn't have a glyph for ZWNJ. They should be joined. This patch changes handling of ZWJ and ZWNJ. Treats ZWJ and ZWNJ as base characters so that a complex text run isn't separate at the point of ZWJ and ZWNJ even the font doesn't contain glyphs for them. If ComplexTextController finds ZWJ, it doesn't split the current complex text run. Test: platform/mac/fast/text/arabic-zwj-and-zwnj.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::advanceByCombiningCharacterSequence): Don't treat ZWJ and ZWNJ as a part of combining character sequence. (WebCore::ComplexTextController::collectComplexTextRuns): Set fontData to nextFontData if the baseCharacter is ZWJ. 2012-07-01 Konrad Piascik <kpiascik@rim.com> [EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555 https://bugs.webkit.org/show_bug.cgi?id=90286 Reviewed by Daniel Bates. Since the deprecatedTargetDPI was an int and the deviceDPI was also an int the result was truncated. Changed deprecatedTargetDPI to a float value. Viewport test 91 now passes. * dom/ViewportArguments.h: (ViewportArguments): 2012-06-30 Ian Vollick <vollick@chromium.org> [chromium] CanvasLayerTextureUpdater needs to convert opaque rects back to content space. https://bugs.webkit.org/show_bug.cgi?id=90092 The CanvasLayerTextureUpdater currently receives its opaque rects in layer space, but is expected to return them in content space and does not convert them. This patch adds this conversion. To avoid numerical errors, this patch also switches to using float rects to store opaque rects where appropriate. Reviewed by Adrienne Walker. Unit test: ContentLayerTest.ContentLayerPainterWithDeviceScale * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore): (ContentLayerDelegate): (ContentLayerPainter): * platform/graphics/chromium/LayerPainterChromium.h: (WebCore): (LayerPainterChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::paintContents): * platform/graphics/chromium/LinkHighlight.h: (LinkHighlight): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h: (OpaqueRectTrackingContentLayerDelegate): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: 2012-06-30 Kwang Yul Seo <skyul@company100.net> Unreviewed. Remove unused declaration. HTMLDocumentParser::begin() has no method definition. * html/parser/HTMLDocumentParser.h: 2012-06-29 No'am Rosenthal <noam.rosenthal@nokia.com> Unreviewed, rolling out r121569. http://trac.webkit.org/changeset/121569 https://bugs.webkit.org/show_bug.cgi?id=90082 It broke a couple of tests in Qt Linux Release * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2012-06-29 Simon Fraser <simon.fraser@apple.com> updateDescendantDependentFlags() is inside #if USE(ACCELERATED_COMPOSITING) https://bugs.webkit.org/show_bug.cgi?id=90245 Reviewed by Dan Bernstein. updateDescendantDependentFlags() and updateTransform() should be outside the USE(ACCELERATED_COMPOSITING) #ifdef. They do work that is needed even if accelerated compositing is disabled. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): 2012-06-29 Erik Arvidsson <arv@chromium.org> [V8] HTMLCollection wrappers are not retained https://bugs.webkit.org/show_bug.cgi?id=90208 Reviewed by Adam Barth. Generate visitDOMWrapper for HTMLCollection and HTMLAllCollection so that we add an implicit reference from the owner to the collection. Tests: fast/dom/htmlallcollection-reachable.html fast/dom/htmlcollection-reachable.html * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Instead of hard coding to use base() for HTMLAllCollection and HTMLCollection we now annotate the IDL file to use GenerateIsReachable=ImplBaseRoot. * bindings/scripts/CodeGeneratorV8.pm: (GenerateVisitDOMWrapper): Generate visitDOMWrapper if GenerateIsReachable is ImplBaseRoot. * bindings/scripts/IDLAttributes.txt: Added ImplBaseRoot. * html/HTMLAllCollection.idl: Added annotations. * html/HTMLCollection.idl: Ditto. 2012-06-29 Tony Chang <tony@chromium.org> All child elements of a flex container should be turned into a flex item https://bugs.webkit.org/show_bug.cgi?id=90323 Reviewed by Ojan Vafai. We used to only convert some elements to blocks, but now we convert everything except text nodes. This was recently changed here: http://wiki.csswg.org/topics/css3-flexbox-flexbox-replaced-children Tests: css3/flexbox/anonymous-block.html : Add new test case. css3/flexbox/flexitem.html: Update results. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-29 Joshua Bell <jsbell@chromium.org> IndexedDB: Keep direction on IDBCursor to avoid calls to back end https://bugs.webkit.org/show_bug.cgi?id=90114 Reviewed by Tony Chang. Let IDBCursor handle direction() accessor locally, without a call to the IDBCursorBackendImpl which (in some ports) may reside in a different process. Not a heavily called function, but further reduces the surface area exposed by the XXXInterface classes. No new tests - no functional changes. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::create): Accept direction, known at creation time. (WebCore::IDBCursor::IDBCursor): Stash in member. (WebCore::IDBCursor::direction): Use local copy (WebCore::IDBCursor::stringToDirection): Return enum value, not int. * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursorBackendImpl.cpp: Remove accessor. * Modules/indexeddb/IDBCursorBackendImpl.h: (IDBCursorBackendImpl): * Modules/indexeddb/IDBCursorBackendInterface.h: Remove accessor. * Modules/indexeddb/IDBCursorWithValue.cpp: (WebCore::IDBCursorWithValue::create): (WebCore::IDBCursorWithValue::IDBCursorWithValue): * Modules/indexeddb/IDBCursorWithValue.h: (IDBCursorWithValue): * Modules/indexeddb/IDBIndex.cpp: Prep IDBRequest with cursor direction too. (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBObjectStore.cpp: Ditto. (WebCore::IDBObjectStore::openCursor): * Modules/indexeddb/IDBRequest.cpp: Stash direction for pending cursor too. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::setCursorDetails): (WebCore::IDBRequest::onSuccess): Apply stashed direction to new cursor. * Modules/indexeddb/IDBRequest.h: (IDBRequest): 2012-06-29 Tony Chang <tony@chromium.org> Allow align-self: stretch to cause the item size to shrink below its intrinsic size https://bugs.webkit.org/show_bug.cgi?id=90304 Reviewed by Ojan Vafai. The spec used to say that stretch could only make items grow, but now it allows items to shrink. http://dev.w3.org/csswg/css3-flexbox/#align-items-stretch Tests: css3/flexbox/flex-align-stretch.html Updated expectations. css3/flexbox/child-overflow.html Updated expectations. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): 2012-06-29 James Weatherall <wez@chromium.org> NPObjectWrapper may not address all window script object lifetime issues https://bugs.webkit.org/show_bug.cgi?id=85679 The ScriptController implementations force-deallocate the window script object to ensure that DOM objects are not leaked if an NPAPI plugin fails to release a reference to it before being destroyed. The NPObjectWrapper was added to ensure that NPAPI scripting could not touch the real window script object after it had been deallocated, by providing the plugin with a small wrapper which will leak if the plugin fails to dereference it. This patch removes NPObjectWrapper and instead drops the window script NPObject's reference to the underlying V8Object in ScriptController::clearScriptObjects(). If a plugin fails to dereference the object then the NPV8Object wrapper will be leaked but the DOM objects it references will not. Reviewed by Nate Chapin. Test: plugins/npruntime/leak-window-scriptable-object.html * WebCore.gypi: * bindings/v8/NPObjectWrapper.cpp: Removed. * bindings/v8/NPObjectWrapper.h: Removed. * bindings/v8/NPV8Object.cpp: (WebCore::disposeUnderlyingV8Object): (WebCore): (WebCore::freeV8NPObject): (_NPN_Invoke): (_NPN_InvokeDefault): (_NPN_EvaluateHelper): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bindings/v8/NPV8Object.h: (WebCore): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::clearScriptObjects): (WebCore::ScriptController::windowScriptNPObject): * bindings/v8/ScriptController.h: (ScriptController): 2012-06-29 Adam Barth <abarth@webkit.org> Update complex fonts on Android to use fonts from a newer SDK https://bugs.webkit.org/show_bug.cgi?id=90296 Reviewed by Nate Chapin. These fonts are available in the Jelly Bean SDK. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::ComplexTextController::ComplexTextController): (WebCore::ComplexTextController::getComplexFontPlatformData): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> HTMLCollection's caches should be owned by either ElementRareData or Document https://bugs.webkit.org/show_bug.cgi?id=90322 Reviewed by Anders Carlsson. Removed all instances of OwnPtr<HTMLCollection> except ones on ElementRareData and Document. ElementRareData::ensureCachedHTMLCollection then polymorphically creates HTMLCollection or its subclass as deemed necessary. This refactoring allows us to move HTMLCollection to use the same invalidation model as DynamicNodeList (invalidated during DOM mutations) in a follow up. * dom/Document.cpp: (WebCore::Document::all): * dom/Document.h: (Document): * dom/Element.cpp: (WebCore::ElementRareData::ensureCachedHTMLCollection): (WebCore): (WebCore::Element::cachedHTMLCollection): * dom/Element.h: (Element): * dom/ElementRareData.h: (WebCore): (ElementRareData): (WebCore::ElementRareData::cachedHTMLCollection): * dom/Node.cpp: (WebCore): * dom/Node.h: (Node): * dom/NodeRareData.h: (WebCore::NodeRareData::setItemType): (NodeRareData): * html/CollectionType.h: * html/HTMLCollection.cpp: (WebCore::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): * html/HTMLElement.cpp: (WebCore): (WebCore::HTMLElement::properties): * html/HTMLElement.h: (HTMLElement): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::elements): * html/HTMLFieldSetElement.h: (HTMLFieldSetElement): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::create): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): * html/HTMLFormElement.h: * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): (WebCore::HTMLOptionsCollection::create): * html/HTMLOptionsCollection.h: (HTMLOptionsCollection): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectedOptions): (WebCore::HTMLSelectElement::options): (WebCore::HTMLSelectElement::invalidateSelectedItems): (WebCore::HTMLSelectElement::setRecalcListItems): * html/HTMLSelectElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): * html/HTMLTableElement.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::create): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): 2012-06-29 Ojan Vafai <ojan@chromium.org> Add FIXMEs for vertical writing mode and override sizes. * rendering/RenderBox.cpp: (WebCore::RenderBox::overrideLogicalContentWidth): (WebCore::RenderBox::overrideLogicalContentHeight): 2012-06-29 James Robinson <jamesr@chromium.org> [chromium] Use CCThread::Task in compositor's RateLimiter instead of Timer https://bugs.webkit.org/show_bug.cgi?id=90300 Reviewed by Adrienne Walker. * platform/graphics/chromium/RateLimiter.cpp: (RateLimiter::Task): (WebCore::RateLimiter::Task::create): (WebCore::RateLimiter::Task::~Task): (WebCore::RateLimiter::Task::Task): (WebCore): (WebCore::RateLimiter::RateLimiter): (WebCore::RateLimiter::start): (WebCore::RateLimiter::stop): (WebCore::RateLimiter::rateLimitContext): * platform/graphics/chromium/RateLimiter.h: (WebCore): (RateLimiter): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): 2012-06-29 Tony Payne <tpayne@chromium.org> Remove type from screenColorProfile API https://bugs.webkit.org/show_bug.cgi?id=90299 Reviewed by Adam Barth. Covered by existing tests. * platform/PlatformScreen.h: (WebCore): Removed type from screenColorProfile(). * platform/blackberry/PlatformScreenBlackBerry.cpp: (WebCore::screenColorProfile): * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenColorProfile): * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenColorProfile): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenColorProfile): * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Updated call to screenColorProfile() to not pass type param. * platform/mac/PlatformScreenMac.mm: (WebCore::screenColorProfile): * platform/qt/PlatformScreenQt.cpp: (WebCore::screenColorProfile): * platform/win/PlatformScreenWin.cpp: (WebCore::screenColorProfile): 2012-06-29 Emil A Eklund <eae@chromium.org> Allow non-borders to be adjusted to less than 1 when zoomed out https://bugs.webkit.org/show_bug.cgi?id=90104 Reviewed by Eric Seidel. Change CSSPrimitiveValue::computeLengthDouble to allow values to be adjusted to less than 1.0 when zoomed out. This avoids an off by one error for floats with margins when zoomed out that can cause floats to wrap and break pages. The logic that prevents the value from being adjusted to less than 1 was added to ensure that borders are still painted even when zoomed out. By moving the logic to ApplyPropertyComputeLength::applyValue, which is used for borders and outlines, that functionality is preserved. Test: fast/sub-pixel/float-with-margin-in-container.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthDouble): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyComputeLength::applyValue): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Let Xcode have its own way after r121513. * WebCore.xcodeproj/project.pbxproj: 2012-06-29 Mihai Balan <mibalan@adobe.com> [CSS Regions] Adding feature defines for CSS Regions for Windows https://bugs.webkit.org/show_bug.cgi?id=88645 Reviewed by Tony Chang. Re-trying to enable CSS regions on Windows. This time only enabling regions (not exclusions) because of some strange compilation/linking issues. * css/CSSPropertyNames.in: Touched file to make sure property names get properly rebuilt. 2012-06-29 Hanna Ma <Hanma@rim.com> Web Inspector: Add data length to resource events on timeline to keep track of the amount of data loaded and the total data length https://bugs.webkit.org/show_bug.cgi?id=89244 Reviewed by Pavel Feldman. Added data length to inspector timeline popup content for resources to keep track of the amount of data loaded. Tests: inspector/timeline/timeline-network-received-data.html * English.lproj/localizedStrings.js: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willReceiveResourceData): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willReceiveResourceData): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createReceiveResourceData): * inspector/TimelineRecordFactory.h: (TimelineRecordFactory): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._showPopover): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.prototype.reset): (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveData): * inspector/timeline/timeline-network-received-data.html: Added. * inspector/timeline/timeline-network-received-data-expected.txt: Added. * inspector/timeline/timeline-test.js: 2012-06-29 Shawn Singh <shawnsingh@chromium.org> Unreviewed build fix after 121580. WebKit Linux debug bots was complaining about signed vs unsigned integer comparison. * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Remove mapRect and mapQuad from WebTransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=90230 Reviewed by Adrienne Walker. Replaces calls to WebTransformationMatrix::mapRect/mapQuad with clipping-aware calls to CCMathUtils. In most cases, we do not expect clipping to happen. For others (such as area calculations in CCOverdrawMetrics) we can handle a clipped quad easily. * platform/chromium/support/WebTransformationMatrix.cpp: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::drawableContentRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::getDrawRect): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::addOcclusionBehindLayer): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore): (WebCore::polygonArea): (WebCore::areaOfMappedQuad): (WebCore::CCOverdrawMetrics::didUpload): (WebCore::CCOverdrawMetrics::didCullForDrawing): (WebCore::CCOverdrawMetrics::didDraw): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawableContentRect): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r121575. It rolls out r121547 but didn't roll out the follow up build fix r121553. * platform/graphics/mac/FontCustomPlatformData.h: (FontCustomPlatformData): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Share the same cache in HTMLCollection and DynamicNodeLists https://bugs.webkit.org/show_bug.cgi?id=90118 Reviewed by Anders Carlsson. This patch introduces two new base classes DynamicNodeListCacheBase and HTMLCollectionCacheBase to share the cache object between DynamicNodeList and HTMLCollection. HTMLCollectionCacheBase inherits from DynamicNodeListCacheBase and contains extra caches and bit flags for HTMLCollection. DynamicNodeList::Cache and HTMLCollection::Cache had been removed and flattened into these two classes for the easy inheritance. In DynamicNodeList, we have a very straight forward one-to-one mapping from old Caches member variables: m_caches.lastItem -> cachedItem() m_caches.lastItemOffset -> cachedItemOffset() m_caches.cachedLength -> cachedLength() m_caches.isItemCacheValid -> isItemCacheValid() m_caches.isLengthCacheValid -> isLengthCacheValid() m_caches.type -> removed because it was never used. m_caches.rootedAtDocument -> isRootedAtDocument() m_caches.shouldInvalidateOnAttributeChange -> shouldInvalidateOnAttributeChange() In HTMLCollection, there is one semantic change in the way item cache is managed. Previously, we only had m_cache.current which was used as both cachedItem() and isItemCacheValid() (not valid when current is null). There are some asymmetric code changes due to one-to-many relationship. Also, all method names have been updated to use that of DynamicNodeList terminology. Thus we have the following correspondence: m_cache.current -> cachedItem() / isItemCacheValid() m_cache.position -> cachedItemOffset() m_cache.length -> cachedLength() m_cache.elementsArrayPosition -> cachedElementsArrayOffset() m_cache.hasLength -> isLengthCacheValid() m_cache.hasNameCache -> hasNameCache() / setHasNameCache() m_cache.idCache -> idCache() / addIdCache() m_cache.nameCache -> idCache() / addNameCache() In addition, we had to rename HTMLCollection::clearCache to invalidateCache to avoid the name collision with HTMLCollectionCacheBase::clearCache. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::length): (WebCore::ChildNodeList::item): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::length): (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::item): * dom/DynamicNodeList.h: (DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::isRootedAtDocument): (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange): (WebCore::DynamicNodeListCacheBase::isItemCacheValid): (WebCore::DynamicNodeListCacheBase::cachedItem): (WebCore::DynamicNodeListCacheBase::cachedItemOffset): (WebCore::DynamicNodeListCacheBase::isLengthCacheValid): (WebCore::DynamicNodeListCacheBase::cachedLength): (WebCore::DynamicNodeListCacheBase::setLengthCache): (WebCore::DynamicNodeListCacheBase::setItemCache): (WebCore::DynamicNodeListCacheBase::clearCache): (WebCore): (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::invalidateCache): (WebCore::DynamicNodeList::rootNode): (DynamicNodeList): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::invalidateCache): (WebCore::HTMLCollection::isAcceptableElement): (WebCore::HTMLCollection::itemAfter): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollectionCacheBase::append): * html/HTMLCollection.h: (HTMLCollectionCacheBase): (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (WebCore::HTMLCollectionCacheBase::type): (WebCore::HTMLCollectionCacheBase::clearCache): (WebCore::HTMLCollectionCacheBase::setItemCache): (WebCore::HTMLCollectionCacheBase::cachedElementsArrayOffset): (WebCore::HTMLCollectionCacheBase::includeChildren): (WebCore::HTMLCollectionCacheBase::cacheTreeVersion): (WebCore::HTMLCollectionCacheBase::idCache): (WebCore::HTMLCollectionCacheBase::nameCache): (WebCore::HTMLCollectionCacheBase::appendIdCache): (WebCore::HTMLCollectionCacheBase::appendNameCache): (WebCore::HTMLCollectionCacheBase::hasNameCache): (WebCore::HTMLCollectionCacheBase::setHasNameCache): (WebCore): (WebCore::HTMLCollection::isEmpty): (WebCore::HTMLCollection::hasExactlyOneItem): (WebCore::HTMLCollection::base): (HTMLCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLNameCollection.h: (HTMLNameCollection): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::invalidateSelectedItems): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::itemAfter): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): 2012-06-29 Tony Chang <tony@chromium.org> Unreviewed, rolling out r121572. http://trac.webkit.org/changeset/121572 https://bugs.webkit.org/show_bug.cgi?id=90249 Breaks Mac build since it depends on r121547, which was rolled out * WebCore.exp.in: * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible): * platform/mac/WebCoreSystemInterface.h: * platform/network/Credential.h: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore): (WebCore::initializeMaximumHTTPConnectionCountPerHost): * platform/text/TextChecking.h: (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::containsPaintedContent): 2012-06-29 Tony Chang <tony@chromium.org> Unreviewed, rolling out r121547. http://trac.webkit.org/changeset/121547 https://bugs.webkit.org/show_bug.cgi?id=90256 Breaks Chromium Mac build * platform/LocalizedStrings.cpp: (WebCore::imageTitle): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setAllowsFontSmoothing): * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::clear): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore): (WebCore::canSetCascadeListForCustomFont): (WebCore::FontPlatformData::ctFont): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/FontCacheMac.mm: (WebCore): (WebCore::fontCacheATSNotificationCallback): (WebCore::FontCache::platformInit): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/mac/WebLayer.h: * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/DisplaySleepDisabler.cpp: (WebCore::DisplaySleepDisabler::DisplaySleepDisabler): (WebCore): (WebCore::DisplaySleepDisabler::systemActivityTimerFired): * platform/mac/DisplaySleepDisabler.h: (DisplaySleepDisabler): * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenuMac::populate): * platform/mac/ScrollElasticityController.mm: 2012-06-29 Eric Penner <epenner@google.com> [chromium] Adding PrioritizedTexture and replacing ContentsTextureManager https://bugs.webkit.org/show_bug.cgi?id=84308 Reviewed by Adrienne Walker. PrioritizedTextures have a priority such that all texture requests can be prioritized. There are three steps involved: - Call setRequestPriority() - Check if the request succeeded with canAcquireBackingTexture() - Call acquireBackingTexture() when uploading a new texture. Internally both the texture requests and the backing textures get sorted. Requests are sorted so they can be prioritized. Backing textures are sorted so that they can be recycled/evicted in the right order (lowest priority first). Prioritizing textures doesn't assign backing textures to texture requests but rather just marks which textures can have a backing texture "when needed". This allows us to keep the old textures in use as long as possible. The unit tests support all the use cases from the original texture manager but also adds assumptions about priority order throughout all the tests. The function assertInvariants() is added to test the validity of the manager and all textures/allocations within it. The TiledLayerChromium tests are updated to request textures first with prioritizeTextures(), and update them with the updater (such that allocate gets called) before pushPropertiesTo is called (when they need to be valid). * WebCore.gypi: * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::Texture::Texture): (WebCore::BitmapCanvasLayerTextureUpdater::createTexture): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): (Texture): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::setTexturePriorities): (WebCore): (WebCore::ContentLayerChromium::update): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::createTexture): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: (Texture): (FrameBufferSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::Texture::Texture): (WebCore::ImageLayerTextureUpdater::createTexture): (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerChromium::setTexturePriorities): (WebCore): * platform/graphics/chromium/ImageLayerChromium.h: (ImageLayerChromium): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::setTexturePriorities): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::Texture::texture): (WebCore::LayerTextureUpdater::Texture::swapTextureWith): (WebCore::LayerTextureUpdater::Texture::Texture): (Texture): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::pushPropertiesTo): (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded): (WebCore::ScrollbarLayerChromium::updatePart): (WebCore): (WebCore::ScrollbarLayerChromium::setTexturePriorities): * platform/graphics/chromium/ScrollbarLayerChromium.h: (ScrollbarLayerChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::managedTexture): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::textureManager): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate): (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::setTexturePriorities): (WebCore): (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): (WebCore::TiledLayerChromium::resetUpdateState): (WebCore::TiledLayerChromium::updateLayerRect): (WebCore::TiledLayerChromium::idleUpdateLayerRect): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread): (WebCore::CCLayerTreeHost::beginCommitOnImplThread): (WebCore::CCLayerTreeHost::commitComplete): (WebCore::CCLayerTreeHost::evictAllContentTextures): (WebCore::CCLayerTreeHost::contentsTextureManager): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::prioritizeTextures): (WebCore::CCLayerTreeHost::deleteTextureAfterCommit): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Added. (WebCore): (WebCore::CCPrioritizedTexture::CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::~CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::setTextureManager): (WebCore::CCPrioritizedTexture::setDimensions): (WebCore::CCPrioritizedTexture::requestLate): (WebCore::CCPrioritizedTexture::acquireBackingTexture): (WebCore::CCPrioritizedTexture::textureId): (WebCore::CCPrioritizedTexture::bindTexture): (WebCore::CCPrioritizedTexture::framebufferTexture2D): (WebCore::CCPrioritizedTexture::setCurrentBacking): * platform/graphics/chromium/cc/CCPrioritizedTexture.h: Added. (WebCore): (CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::create): (WebCore::CCPrioritizedTexture::textureManager): (WebCore::CCPrioritizedTexture::format): (WebCore::CCPrioritizedTexture::size): (WebCore::CCPrioritizedTexture::memorySizeBytes): (WebCore::CCPrioritizedTexture::setRequestPriority): (WebCore::CCPrioritizedTexture::requestPriority): (WebCore::CCPrioritizedTexture::canAcquireBackingTexture): (WebCore::CCPrioritizedTexture::haveBackingTexture): (Backing): (WebCore::CCPrioritizedTexture::Backing::size): (WebCore::CCPrioritizedTexture::Backing::format): (WebCore::CCPrioritizedTexture::Backing::memorySizeBytes): (WebCore::CCPrioritizedTexture::Backing::textureId): (WebCore::CCPrioritizedTexture::Backing::currentTexture): (WebCore::CCPrioritizedTexture::Backing::setCurrentTexture): (WebCore::CCPrioritizedTexture::Backing::Backing): (WebCore::CCPrioritizedTexture::Backing::~Backing): (WebCore::CCPrioritizedTexture::isAbovePriorityCutoff): (WebCore::CCPrioritizedTexture::setAbovePriorityCutoff): (WebCore::CCPrioritizedTexture::setManagerInternal): (WebCore::CCPrioritizedTexture::currentBacking): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Added. (WebCore): (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::setMemoryAllocationLimitBytes): (WebCore::CCPrioritizedTextureManager::prioritizeTextures): (WebCore::CCPrioritizedTextureManager::clearPriorities): (WebCore::CCPrioritizedTextureManager::requestLate): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): (WebCore::CCPrioritizedTextureManager::clearAllMemory): (WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted): (WebCore::CCPrioritizedTextureManager::unlink): (WebCore::CCPrioritizedTextureManager::link): (WebCore::CCPrioritizedTextureManager::registerTexture): (WebCore::CCPrioritizedTextureManager::unregisterTexture): (WebCore::CCPrioritizedTextureManager::returnBackingTexture): (WebCore::CCPrioritizedTextureManager::createBacking): (WebCore::CCPrioritizedTextureManager::destroyBacking): (WebCore::CCPrioritizedTextureManager::assertInvariants): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Added. (WebCore): (CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::create): (WebCore::CCPrioritizedTextureManager::createTexture): (WebCore::CCPrioritizedTextureManager::memoryUseBytes): (WebCore::CCPrioritizedTextureManager::memoryAboveCutoffBytes): (WebCore::CCPrioritizedTextureManager::setMaxMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::maxMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::setPreferredMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::preferredMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::setMaxMemoryPriorityCutoff): (WebCore::CCPrioritizedTextureManager::maxMemoryPriorityCutoff): (WebCore::CCPrioritizedTextureManager::compareTextures): (WebCore::CCPrioritizedTextureManager::compareBackings): * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Added. (WebCore): (WebCore::CCPriorityCalculator::uiPriority): (WebCore::CCPriorityCalculator::visiblePriority): (WebCore::CCPriorityCalculator::lingeringPriority): (WebCore::CCPriorityCalculator::priorityFromDistance): (WebCore::CCPriorityCalculator::priorityFromVisibility): * platform/graphics/chromium/cc/CCPriorityCalculator.h: Added. (WebCore): (CCPriorityCalculator): (WebCore::CCPriorityCalculator::highestPriority): (WebCore::CCPriorityCalculator::lowestPriority): (WebCore::CCPriorityCalculator::priorityIsLower): (WebCore::CCPriorityCalculator::priorityIsHigher): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: 2012-06-29 Eric Seidel <eric@webkit.org> Remove BUILDING_ON_LEOPARD now that no ports build on Leopard https://bugs.webkit.org/show_bug.cgi?id=90249 Reviewed by Ryosuke Niwa. I don't think I quite got it all yet, but this is another step towards removing Leopard support in WebCore. * WebCore.exp.in: * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible): * platform/mac/WebCoreSystemInterface.h: * platform/network/Credential.h: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore): (WebCore::initializeMaximumHTTPConnectionCountPerHost): * platform/text/TextChecking.h: (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::containsPaintedContent): 2012-06-29 Andreas Kling <kling@webkit.org> Unreviewed, rolling out r121562. http://trac.webkit.org/changeset/121562 https://bugs.webkit.org/show_bug.cgi?id=89945 Broke a couple of editing/pasteboard tests. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::InlineCSSStyleDeclaration::parentStyleSheet): * css/PropertySetCSSStyleDeclaration.h: (WebCore::PropertySetCSSStyleDeclaration::clearParentElement): (PropertySetCSSStyleDeclaration): (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration): (WebCore::StylePropertySet::clearParentElement): (WebCore): * css/StylePropertySet.h: (StylePropertySet): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::destroyInlineStyle): (WebCore): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/StyledElement.cpp: (WebCore::StyledElement::~StyledElement): (WebCore): (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (StyledElement): (WebCore::StyledElement::destroyInlineStyle): 2012-06-29 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> [Qt] Add missing support for tiled shadow blur on fillRect https://bugs.webkit.org/show_bug.cgi?id=90082 Reviewed by Noam Rosenthal. This overloaded fillRect implementation also supports this optimization in certain situations. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2012-06-29 Brady Eidson <beidson@apple.com> Build fix - These should not be executable! Rubberstamped by Jessie Berlin. * loader/cache/CachedSVGDocument.cpp: Removed property svn:executable. * loader/cache/CachedSVGDocument.h: Removed property svn:executable. 2012-06-29 Kwang Yul Seo <skyul@company100.net> Update FIXME comment in XMLDocumentParser::wellFormed https://bugs.webkit.org/show_bug.cgi?id=90223 Reviewed by Adam Barth. XMLDocumentParser::wellFormed is still used by the XMLHttpRequest to check if the responseXML was well formed. So it can't be removed. * xml/parser/XMLDocumentParser.h: (XMLDocumentParser): 2012-06-29 Andreas Kling <kling@webkit.org> Separate mutating CSSStyleDeclaration operations. <http://webkit.org/b/89945> Reviewed by Antti Koivisto. Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration. PropertySetCSSStyleDeclaration now has: - propertySet() const - ensureMutablePropertySet() This is prep work for supporting immutable ElementAttributeData objects, the idea being that calling ensureMutablePropertySet() may cause the element to convert its internal attribute storage (which also holds the inline StylePropertySet.) To that end, also removed the weird logic that allowed you to kill the inline style object by removing the 'style' attribute. We now simply clear out all the properties in that case which saves us a bunch of hassle (no need for a ~StyledElement anymore.) Note that InlineCSSStyleDeclaration now refs the element rather than the inline style. There should be no web-facing behavior change from any of this. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration): (WebCore::InlineCSSStyleDeclaration::ref): (WebCore::InlineCSSStyleDeclaration::deref): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::InlineCSSStyleDeclaration::parentStyleSheet): (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet): * css/PropertySetCSSStyleDeclaration.h: (PropertySetCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::propertySet): (WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet): (InlineCSSStyleDeclaration): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration): * css/StylePropertySet.h: (StylePropertySet): * dom/ElementAttributeData.cpp: * dom/ElementAttributeData.h: (ElementAttributeData): * dom/StyledElement.cpp: (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (WebCore::StyledElement::~StyledElement): (StyledElement): 2012-06-29 Kwang Yul Seo <skyul@company100.net> Don't call SegmentedString::toString() twice in XMLDocumentParser::append(const SegmentedString&) https://bugs.webkit.org/show_bug.cgi?id=90254 Reviewed by Adam Barth. We can reuse the local variable parseString instead of calling s.toString() again. No behavior change, so no new tests. * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::append): 2012-06-29 Mihnea Ovidenie <mihnea@adobe.com> Crash when flowing a fixed positioned element into a region. https://bugs.webkit.org/show_bug.cgi?id=88133 Reviewed by Julien Chaffraix and Abhishek Arya. When a fixed positioned element is collected into a named flow, we have to make sure that such element has the RenderFlowThread as containing block instead of RenderView, so that the fixed positioned element is laid out properly. Making the RenderFlowThread the top most containing block for named flow elements required the modification of RenderLayer::convertToLayerCoords so that the fixed positioned elements inside the named flow take the same code path as the absolute positioned elements inside the named flow. I also added a method, checkBlockPositionedObjectsNeedLayout, in order to verify that a block that is ending its layout, setNeedsLayout(false), has all the positioned children laid out. This way, we will hit an assertion if an out-of-flow positioned child inside a RenderFlowThread is not laid out after the RenderFlowThread is laid out. Tests: fast/regions/absolute-pos-elem-in-named-flow.html fast/regions/absolute-pos-elem-in-region.html fast/regions/fixed-pos-elem-in-named-flow.html fast/regions/fixed-pos-elem-in-named-flow2.html fast/regions/fixed-pos-elem-in-region.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::checkPositionedObjectsNeedLayout): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::convertToLayerCoords): * rendering/RenderObject.cpp: (WebCore): (WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout): (WebCore::RenderObject::containingBlock): (WebCore::RenderObject::container): * rendering/RenderObject.h: (RenderObject): (WebCore::RenderObject::setNeedsLayout): 2012-06-29 Konrad Piascik <kpiascik@rim.com> Don't hardcode target dpi of 160 (it should be 96 on desktop) https://bugs.webkit.org/show_bug.cgi?id=88114 Reviewed by Adam Barth. No behavioural change, current tests in fast/viewport cover all functionality. * WebCore.exp.in: Updated symbol for computeViewportAttributes. * dom/ViewportArguments.cpp: Use new parameter for devicePixelRatio and don't calculate it anymore. (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: Change the deviceDPI parameter to devicePixelRatio and put the onus on the embedder to supply the correct value. Add temporary constant. (WebCore): 2012-06-29 Vineet Chaudhary <rgf748@motorola.com> JS binding code generator doesn't handle "attribute unsigned long[]" well. https://bugs.webkit.org/show_bug.cgi?id=84540 Reviewed by Kentaro Hara. In JS/V8 Bindings using traits instead of specialised functions. Also added support for "unsigned long" in JSDOMBinding and V8Binding. No new tests, as no behavioural changes. * bindings/js/JSDOMBinding.h: (WebCore::Traits::arrayJSValue): (WebCore::jsArray): * bindings/v8/V8Binding.h: (WebCore::Traits::arrayV8Value): (WebCore::v8Array): 2012-06-29 Andreas Kling <kling@webkit.org> Unreviewed mac build fix after r121547. Remove the now-unused FontCustomPlatformData::m_atsContainer. * platform/graphics/mac/FontCustomPlatformData.h: (FontCustomPlatformData): 2012-06-29 Kent Tamura <tkent@chromium.org> <textarea> unnecessarily saves the value in some cases https://bugs.webkit.org/show_bug.cgi?id=90259 Reviewed by Hajime Morita. Test: fast/forms/textarea/textarea-state-restore.html * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::saveFormControlState): We apply EOL normalization to value(), but don't apply it to defaultValue(). Also value() can return a null string, which never equals to any strings. To check m_isDirty is what we need.. 2012-06-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Provide source data for all known rule types in CSSParser, except "keyframe" and "region" https://bugs.webkit.org/show_bug.cgi?id=88420 Reviewed by Antti Koivisto. This change transitions the CSS source code model from a flat list of style rules to a tree of all types of CSS rules (some of them lack actual source code data), which is crucial to model-based CSS stylesheet source editing (add/remove CSS rule) and navigation. As a side effect, the CSS parsing performance on PerformanceTests/Parser/css-parser-yui.html is improved roughly by 2%: - originally: median= 282.051282051 runs/s, stdev= 1.51236798322 runs/s, min= 278.481012658 runs/s, max= 283.870967742 runs/s - with patch applied: median= 287.206266319 runs/s, stdev= 1.31518320219 runs/s, min= 282.051282051 runs/s, max= 288.713910761 runs/s No new tests, as there is no client-visible behavior change. Existing Inspector tests will be modified to test the new data provided, along with the necessary Inspector plumbing. * css/CSSGrammar.y: * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::reattach): Check for mediaQueries() validity before reattaching. * css/CSSParser.cpp: Unless explicitly specified below, the method changes are related to the extension of the source-based CSS model provided by the parser. (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::setupParser): (WebCore::CSSParser::parseDeclaration): Accept a CSSRuleSourceData for filling, since it now contains the related style source range. (WebCore::CSSParser::createImportRule): (WebCore::CSSParser::createMediaRule): Create CSSMediaRule even if media and rules are empty, which is consistent with Mozilla. (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded): (WebCore): (WebCore::CSSParser::addNewRuleToSourceTree): (WebCore::CSSParser::createKeyframesRule): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createRegionRule): (WebCore::CSSParser::fixUnparsedPropertyRanges): (WebCore::CSSParser::markRuleHeaderStart): (WebCore::CSSParser::markRuleHeaderEnd): (WebCore::CSSParser::markRuleBodyStart): (WebCore::CSSParser::markRuleBodyEnd): (WebCore::CSSParser::markPropertyStart): (WebCore::CSSParser::markPropertyEnd): * css/CSSParser.h: (CSSParser): * css/CSSPropertySourceData.h: Extend the model to handle more types of rules and their containments. (WebCore): (WebCore::CSSRuleSourceData::create): (WebCore::CSSRuleSourceData::createUnknown): (CSSRuleSourceData): (WebCore::CSSRuleSourceData::CSSRuleSourceData): * inspector/InspectorStyleSheet.cpp: Follow the CSSParser API changes but retain the flat stored CSS rules structure. (ParsedStyleSheet): (flattenSourceData): Flatten the rule tree to retain the existing rule-handling code intact. (ParsedStyleSheet::setSourceData): (ParsedStyleSheet::ruleSourceDataAt): (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::styleText): (WebCore::InspectorStyleSheet::setRuleSelector): (WebCore::InspectorStyleSheet::deleteRule): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheet::styleSheetTextWithChangedStyle): (WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): * inspector/InspectorStyleSheet.h: 2012-06-29 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Annotate TextViewer.js https://bugs.webkit.org/show_bug.cgi?id=90266 Reviewed by Yury Semikhatsky. Annotated TextViewer.js and fixed found errors. Drive-by: Fixed NativeMemorySnapshotView.js compilation. Drive-by: Fixed protocol-externs.js compilation. Drive-by: Removed unused platform parameter from TextViewer constructor. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::runScript): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryBarChart.prototype._updateView): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange): 2012-06-29 Eric Seidel <eric@webkit.org> Remove still more BUILDING_ON_LEOPARD branches now that no port supports leopard https://bugs.webkit.org/show_bug.cgi?id=90256 Reviewed by Ryosuke Niwa. * platform/LocalizedStrings.cpp: (WebCore::imageTitle): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setAllowsFontSmoothing): * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::clear): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/FontCacheMac.mm: (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): (WebCore::FontCache::platformInit): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/mac/WebLayer.h: * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/DisplaySleepDisabler.cpp: (WebCore::DisplaySleepDisabler::DisplaySleepDisabler): (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler): * platform/mac/DisplaySleepDisabler.h: (DisplaySleepDisabler): * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenuMac::populate): * platform/mac/ScrollElasticityController.mm: 2012-06-29 Zan Dobersek <zandobersek@gmail.com> Unreviewed attempt at a build fix for 64-bit debug build, touch InsertionPoint.cpp to try to get it rebuilt. * html/shadow/InsertionPoint.cpp: (WebCore): 2012-06-29 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> [Qt] Don't add Qt module dependencies in features.prf The required dependencies are already added in WebCore.pri. Reviewed by Tor Arne Vestbø. * WebCore.pri: 2012-06-29 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add FileSystemView https://bugs.webkit.org/show_bug.cgi?id=73301 This patch introduce a split view as FileSystemView. Including directory tree as sidebar tree. Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/directory-tree.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.Entry.compare): * inspector/front-end/FileSystemView.js: Added. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showFileSystem): (WebInspector.FileSystemTreeElement.prototype.get itemURL): (WebInspector.FileSystemTreeElement.prototype.onattach): (WebInspector.FileSystemTreeElement.prototype._handleContextMenuEvent): (WebInspector.FileSystemTreeElement.prototype._refreshFileSystem): (WebInspector.FileSystemTreeElement.prototype.onselect): (WebInspector.FileSystemTreeElement.prototype.clear): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-06-29 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Integer::New() with v8Integer() in custom bindings https://bugs.webkit.org/show_bug.cgi?id=90242 Reviewed by Yury Semikhatsky. v8Integer() is a fast wrapper of v8::Integer::New(). This patch replaces v8::Integer::New() with v8Integer() in custom bindings, and pass isolates. No tests. No change in behavior. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyQuery): (WebCore::V8DOMStringMap::namedPropertyEnumerator): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::WindowSetTimeoutImpl): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionStartAccessorGetter): (WebCore::V8HTMLInputElement::selectionEndAccessorGetter): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::lengthAccessorGetter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::functionDetailsCallback): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::portsAccessorGetter): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::namedPropertyGetter): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyEnumerator): (WebCore::V8Storage::indexedPropertyGetter): (WebCore::V8Storage::namedPropertyQuery): (WebCore::V8Storage::indexedPropertySetter): (WebCore::V8Storage::indexedPropertyDeleter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::SetTimeoutOrInterval): 2012-06-29 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r121520. http://trac.webkit.org/changeset/121520 https://bugs.webkit.org/show_bug.cgi?id=90246 the performance optimization needs more investigation * dom/DatasetDOMStringMap.cpp: (WebCore::convertPropertyNameToAttributeName): * dom/Element.cpp: (WebCore::Element::getAttributeNS): (WebCore::Element::removeAttribute): (WebCore::Element::removeAttributeNS): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (ElementAttributeData): 2012-06-29 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Integer::New() with v8Integer() in bindings/v8/*.{h,cpp} https://bugs.webkit.org/show_bug.cgi?id=90238 Reviewed by Yury Semikhatsky. v8Integer() is a fast wrapper of v8::Integer::New(). We can replace v8::Integer::New() with v8Integer() in bindings/v8/*.{h,cpp}. In addition, we pass isolate to v8Integer() where possible. No tests. No change in behavior. * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): * bindings/v8/NPV8Object.cpp: (_NPN_Enumerate): Changed v8::None to 0, for consistency with other code. * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::compileScript): * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8Binding.cpp: (WebCore::v8Array): (WebCore::v8ValueToWebCoreDOMStringList): * bindings/v8/V8Binding.h: (WebCore::v8Array): (WebCore::v8NumberArrayToVector): * bindings/v8/V8Collection.h: (WebCore::nodeCollectionIndexedPropertyEnumerator): (WebCore::collectionIndexedPropertyEnumerator): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8NPObject.cpp: (WebCore::npObjectQueryProperty): (WebCore::npObjectPropertyEnumerator): * bindings/v8/V8NPUtils.cpp: (WebCore::convertNPVariantToV8Object): * bindings/v8/V8Proxy.cpp: (WebCore::batchConfigureConstants): (WebCore::V8Proxy::compileScript): * bindings/v8/V8Utilities.cpp: (WebCore::createHiddenDependency): (WebCore::removeHiddenDependency): * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): * bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::addListener): 2012-06-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Resource content is not loaded if Resource.requestContent method is called before network request is finished. https://bugs.webkit.org/show_bug.cgi?id=90153 Reviewed by Yury Semikhatsky. Test: http/tests/inspector/resource-tree/resource-request-content-while-loading.html * inspector/front-end/NetworkRequest.js: * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.requestContent): (WebInspector.Resource.prototype._requestFinished): 2012-06-29 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121529. http://trac.webkit.org/changeset/121529 https://bugs.webkit.org/show_bug.cgi?id=90260 Failed to compile on Chromium WebKitMacBuilder (Requested by keishi on #webkit). * platform/LocalizedStrings.cpp: (WebCore): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::setFont): * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): * platform/graphics/mac/FontMac.mm: (WebCore::showGlyphsWithAdvances): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore): * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore): * platform/mac/PlatformEventFactoryMac.mm: (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): * platform/text/cf/HyphenationCF.cpp: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused): 2012-06-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Add toggle breakpoint shortcut. https://bugs.webkit.org/show_bug.cgi?id=90188 Reviewed by Yury Semikhatsky. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): (WebInspector.JavaScriptSourceFrame.prototype._toggleBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleBreakpoint): (WebInspector.ScriptsPanel.prototype._showOutlineDialog): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.selection): 2012-06-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Cursor should follow execution line when debugging. https://bugs.webkit.org/show_bug.cgi?id=90184 Reviewed by Yury Semikhatsky. Added TextViewer.setSelection public method to set cursor selection in the editor. Added TextRange.createFromLocation method to create TextRanges with the same start and end points. Drive-by: removed unused _setCaretLocation() method in TextViewer.js * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._revealExecutionLine): (WebInspector.ScriptsPanel.prototype._editorSelected): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.setSelection): (WebInspector.SourceFrame.prototype.setContent): * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.createFromLocation): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.setSelection): (WebInspector.TextEditorMainPanel.prototype.highlightLine): 2012-06-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: IDBObjectStore.autoIncrement flag not exposed https://bugs.webkit.org/show_bug.cgi?id=89701 Reviewed by Yury Semikhatsky. Plumbed objectStore.autoIncrement to inspector front-end and added it to tooltip. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/front-end/IndexedDBModel.js: (WebInspector.IndexedDBModel.prototype._loadDatabase.callback): (WebInspector.IndexedDBModel.prototype._loadDatabase): (WebInspector.IndexedDBModel.ObjectStore): * inspector/front-end/ResourcesPanel.js: (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip): 2012-06-28 Alexander Pavlov <apavlov@chromium.org> Use floating keyframe rule list when parsing @-webkit-keyframes and allow abrupt rule termination https://bugs.webkit.org/show_bug.cgi?id=90073 Reviewed by Antti Koivisto. - The grammar is changed to allow abruptly terminated stylesheet in the @-webkit-keyframes (use closing_brace, not '}'). - A floating StyleKeyframe vector is introduced to separate the creation and filling of StyleRuleKeyframes, as other rules do. Test: fast/css/css-keyframe-unexpected-end.html * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::createFloatingKeyframeVector): (WebCore): (WebCore::CSSParser::sinkFloatingKeyframeVector): (WebCore::CSSParser::createKeyframesRule): * css/CSSParser.h: 2012-06-26 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add character data to the DOM section of native memory view https://bugs.webkit.org/show_bug.cgi?id=89968 Reviewed by Vsevolod Vlasov. Count strings referenced from CharacterData node and its descendants as part of the DOM tree structures in the native memory view. * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): (WebCore): * dom/CharacterData.h: (CharacterData): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryObjectInfo::reportString): (MemoryObjectInfo): * inspector/InspectorMemoryAgent.cpp: (WebCore): (WebCore::domTreeInfo): (WebCore::jsExternalResourcesInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): 2012-06-29 Eric Seidel <eric@webkit.org> Remove more BUILDING_ON_LEOPARD branches now that no port builds on Leopard https://bugs.webkit.org/show_bug.cgi?id=90252 Reviewed by Ryosuke Niwa. * platform/LocalizedStrings.cpp: (WebCore): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::setFont): * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): * platform/graphics/mac/FontMac.mm: (WebCore::showGlyphsWithAdvances): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore): * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore): * platform/mac/PlatformEventFactoryMac.mm: (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): * platform/text/cf/HyphenationCF.cpp: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused): 2012-06-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: showConsole() should close previous view in drawer. https://bugs.webkit.org/show_bug.cgi?id=90070 Reviewed by Yury Semikhatsky. * inspector/front-end/inspector.js: (WebInspector.showConsole): (WebInspector.showPanel): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Remove a #include erroneously added in r120896. * editing/VisibleSelection.h: 2012-06-29 Yoshifumi Inoue <yosin@chromium.org> [Platform] Implement Date Time format parser https://bugs.webkit.org/show_bug.cgi?id=89963 Reviewed by Kent Tamura. This patch introduces Unicode TR35 LDML date time format parser for input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true. Test: WebKit/chromium/tests/DateTimeFormatTest.cpp * CMakeLists.txt: Added DateTimeFormat.cpp * GNUmakefile.list.am: Added DateTimeFormat.{cpp,h} * Target.pri: ditto * WebCore.gypi: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/product.pbxproj: ditto * platform/text/DateTimeFormat.cpp: Added. (WebCore::mapCharacterToFieldTypeInternal): (WebCore::DateTimeFormat::DateTimeFormat): (WebCore::DateTimeFormat::mapCharacterToFieldType): (WebCore::DateTimeFormat::parse): * platform/text/DateTimeFormat.h: Added. (DateTimeFormat): (TokenHandler): (WebCore::DateTimeFormat::TokenHandler::~TokenHandler): 2012-06-29 Eric Seidel <eric@webkit.org> Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code https://bugs.webkit.org/show_bug.cgi?id=85846 Reviewed by Adam Barth. PLATFORM(MAC) has not supported Leopard for several months now. This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD uses in the PLATFORM(MAC) codepaths. PLATFORM(CHROMIUM) still supports BUILDING_ON_LEOPARD for now. * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::updateRangesAfterChildrenChanged): (WebCore::Document::nodeChildrenWillBeRemoved): (WebCore::Document::nodeWillBeRemoved): (WebCore::Document::textInserted): (WebCore::Document::textRemoved): (WebCore::Document::textNodesMerged): (WebCore::Document::textNodeSplit): * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): (WebCore::TypingCommand::typingAddedToOpenCommand): * editing/mac/EditorMac.mm: (WebCore::Editor::pasteWithPasteboard): * loader/EmptyClients.h: (EmptyEditorClient): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): (WebCore): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded): * page/EditorClient.h: (EditorClient): * platform/LocalizedStrings.cpp: (WebCore::contextMenuItemTagSearchWeb): * platform/MemoryPressureHandler.cpp: (WebCore): * platform/SuddenTermination.h: (WebCore): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateContentsImage): (WebCore::GraphicsLayerCA::constrainedSize): * platform/graphics/ca/PlatformCALayer.h: (PlatformCALayer): * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (fromCAValueFunctionType): (PlatformCAAnimation::valueFunction): (PlatformCAAnimation::setValueFunction): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (toCAFilterType): (PlatformCALayer::anchorPoint): (PlatformCALayer::setAnchorPoint): (PlatformCALayer::contentsTransform): (PlatformCALayer::setContentsTransform): (PlatformCALayer::isGeometryFlipped): (PlatformCALayer::setGeometryFlipped): (PlatformCALayer::acceleratesDrawing): (PlatformCALayer::setAcceleratesDrawing): (PlatformCALayer::setMinificationFilter): (PlatformCALayer::setMagnificationFilter): (PlatformCALayer::contentsScale): (PlatformCALayer::setContentsScale): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setScale): (WebCore::TileCache::setAcceleratesDrawing): (WebCore::TileCache::createTileLayer): 2012-06-29 Kwang Yul Seo <skyul@company100.net> Use StringBuilder in SegmentedString::toString() https://bugs.webkit.org/show_bug.cgi?id=90247 Reviewed by Adam Barth. Use a StringBuilder instead of String concatenation because StringBuilder is generally faster. No new tests. Covered by existing tests. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::toString): * platform/text/SegmentedString.h: (WebCore::SegmentedSubstring::appendTo): 2012-06-28 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r121518. * WebCore.exp.in: 2012-06-28 Ryosuke Niwa <rniwa@webkit.org> DOMHTMLCollection::item may return a wrong element after namedItem is called https://bugs.webkit.org/show_bug.cgi?id=90240 Reviewed by Antti Koivisto. The bug was caused by namedItem updating m_cache.current without updating m_cache.position. Fixed the bug by updating both. This is similar to the bug I fixed in r121478. WebKit API Test: WebKit1.HTMLCollectionNamedItemTest * html/HTMLCollection.cpp: (WebCore::HTMLCollection::namedItem): 2012-06-28 Kentaro Hara <haraken@chromium.org> Change argument types of Element::getAttribute*() from String to AtomicString https://bugs.webkit.org/show_bug.cgi?id=90246 Reviewed by Ryosuke Niwa. This is a follow-up patch for r121439. r121439 changed an argument type of Element::getAttribute() from String to AtomicString, which optimized performance of Dromaeo/dom-attr.html. This patch changes other argument types of Element::getAttribute*() from String to AtomicString. See the ChangeLog in http://trac.webkit.org/changeset/121439 for more details about why this change optimizes performance. No tests. No change in behavior. * dom/DatasetDOMStringMap.cpp: (WebCore::convertPropertyNameToAttributeName): * dom/Element.cpp: (WebCore::Element::getAttributeNS): (WebCore::Element::removeAttribute): (WebCore::Element::removeAttributeNS): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (ElementAttributeData): 2012-06-28 Kent Tamura <tkent@chromium.org> REGRESSION(r106388): Form hidden element values being restored incorrectly for dynamically generated content https://bugs.webkit.org/show_bug.cgi?id=88685 Reviewed by Hajime Morita. We should not save value attribute updated during parsing. Test: fast/forms/state-restore-to-non-edited-controls.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): Initialize m_valueAttributeWasUpdatedAfterParsing. (WebCore::HTMLInputElement::parseAttribute): Set true to m_valueAttributeWasUpdatedAfterParsing if value attribute is updated and it's not in parsing. * html/HTMLInputElement.h: (WebCore::HTMLInputElement::valueAttributeWasUpdatedAfterParsing): Added for HiddenInputType. * html/HiddenInputType.cpp: (WebCore::HiddenInputType::saveFormControlState): Save the value only if valueAttributeWasUpdatedAfterParsing() is true. 2012-06-28 MORITA Hajime <morrita@google.com> [Refactoring] NodeRenderingContext ctor could be built on top of the ComposedShadowTreeWalker https://bugs.webkit.org/show_bug.cgi?id=89732 Reviewed by Dimitri Glazkov. The constructor of NodeRenderingContext implements almost same logic as ComposedShadowTreeWalker::parent(). This change eliminates the duplication by employing ComposedShadowTreeWalker in the constructor. ComposedShadowTreeWalker has same difference from NodeRenderingContext though. So this change also extends ComposedShadowTreeWalker to support these missing pieces, which are encapsulated in newly introduced ParentTranversalDetails class where: - not only the parent, but also the insertion point of the child is returned, - resetStyleInheritance from the child-parent traversal is computed and - if the starting point is out of the composition, it returns null as a parent. This change also inlines some ComposedShadowTreeWalker methods for speed. No new tests. Covered by existing tests. * WebCore.exp.in: * dom/ComposedShadowTreeWalker.cpp: (WebCore::shadowOfParent): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseInsertionPoint): (WebCore): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseShadowRoot): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didFindNode): (WebCore::ComposedShadowTreeWalker::findParent): (WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement): (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): (WebCore::ComposedShadowTreeWalker::traverseParent): (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree): (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): * dom/ComposedShadowTreeWalker.h: (ParentTranversalDetails): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::ParentTranversalDetails): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::node): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::insertionPoint): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::resetStyleInheritance): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::outOfComposition): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::childWasOutOfComposition): (ComposedShadowTreeWalker): (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker): (WebCore): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): (WebCore::NodeRenderingContext::parentRenderer): (WebCore::NodeRenderingContext::shouldCreateRenderer): (WebCore::NodeRenderingContext::isOnEncapsulationBoundary): * dom/NodeRenderingContext.h: (NodeRenderingContext): (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle): (WebCore::NodeRenderingContext::resetStyleInheritance): (WebCore::NodeRenderingContext::insertionPoint): 2012-06-28 Stephen White <senorblanco@chromium.org> Implement filter url() function. https://bugs.webkit.org/show_bug.cgi?id=72443 url() references can be internal, in which case the DOM nodes are retrieved directly from the current document, or external, in which case a CachedSVGDocument request is made, and the filter node build is deferred until the document is loaded. WebKitSVGDocumentValue holds the CachedSVGDocument (if any) and the URL as a CSSValue, and is stored in the CSSValue chain as the argument to the reference filter. One notable difference between internal and external references is that internal references will automatically update on an SVG filter node attribute change, while external references will not, since they live in a separate document. This is consistent with the Mozilla implementation. In order to make this work, the RenderLayer is made a client of the RenderSVGResourceContainer, and calls filterNeedsRepaint() when the SVG nodes are invalidated. Some plumbing: The CSS StyleResolver was refactored to load all all external resources (images, shaders and (now) SVG filters) in a single function, loadPendingResources(). The PlatformLayer typedef was moved out into its own file, in order to break a cyclic dependency. SVGFilterBuilder was modified to accept the SourceGraphic and SourceAlpha FilterEffects in its constructor and factory function, rather than extracting them from the parent Filter. (This is necessary so that the url() filter can correctly hook up its inputs from previous CSS filters.) Reviewed by Dean Jackson. Tests: css3/filters/effect-reference-external.html css3/filters/effect-reference-hw.html css3/filters/effect-reference-ordering.html css3/filters/effect-reference.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Add WebKitCSSSVGDocumentValue to the various build files. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::valueForFilter): Use the reference filter's url when getting the computed style for a reference filter. * css/CSSParser.cpp: (WebCore::CSSParser::parseFilter): Create the referenceFilterValue's argument as a WebKitCSSSVGDocumentValue instead of a CSS string. * css/CSSValue.cpp: (WebCore::CSSValue::cssText): Add support for WebKitCSSSVGDocumentValue. (WebCore::CSSValue::destroy): Add support for WebKitCSSSVGDocumentValue. * css/CSSValue.h: (WebCore::CSSValue::isWebKitCSSSVGDocumentValue): Add support for WebKitCSSSVGDocumentValue. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Keep track of pending SVG document references, and load them when necessary. * css/StyleResolver.h: * css/WebKitCSSSVGDocumentValue.cpp: Added. New CSSValue subclass for holding SVG document references. (WebCore::WebKitCSSSVGDocumentValue::WebKitCSSSVGDocumentValue): (WebCore::WebKitCSSSVGDocumentValue::~WebKitCSSSVGDocumentValue): (WebCore::WebKitCSSSVGDocumentValue::load): (WebCore::WebKitCSSSVGDocumentValue::customCssText): * css/WebKitCSSSVGDocumentValue.h: Added. (WebCore::WebKitCSSSVGDocumentValue::create): (WebCore::WebKitCSSSVGDocumentValue::cachedSVGDocument): (WebCore::WebKitCSSSVGDocumentValue::url): (WebCore::WebKitCSSSVGDocumentValue::loadRequested): * platform/graphics/GraphicsLayer.h: Refactor PlatformLayer out into its own file, to avoid circular includes. * platform/graphics/ImageBuffer.h: Include PlatformLayer.h instead of GraphicsLayer.h. * platform/graphics/PlatformLayer.h: Added. Refactor PlatformLayer out into its own file, to avoid circular includes. * platform/graphics/filters/FilterOperation.h: (WebCore::ReferenceFilterOperation::create): (WebCore::ReferenceFilterOperation::clone): (WebCore::ReferenceFilterOperation::url): (WebCore::ReferenceFilterOperation::fragment): (ReferenceFilterOperation): (WebCore::ReferenceFilterOperation::data): (WebCore::ReferenceFilterOperation::setData): (WebCore::ReferenceFilterOperation::operator==): (WebCore::ReferenceFilterOperation::ReferenceFilterOperation): Augment ReferenceFilterOperation to maintain a data pointer, in order to preserve context while loading external SVG documents. Replace "reference" with "url" and "fragment" members, in order to ease retrieval of the appropriate DOM objects. * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::hasReferenceFilter): Convenience function for finding reference filters. * platform/graphics/filters/FilterOperations.h: (FilterOperations): * platform/mac/ScrollbarThemeMac.mm: Include GraphicsLayer.h explicitly, since ImageBuffer.h no longer includes it (and only includes PlatformLayer.h). * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::buildReferenceFilter): Utility function to build a FilterEffect node graph for a ReferenceFilterOperation. (WebCore::FilterEffectRenderer::build): Call the above builder function for ReferenceFilterOperations. * rendering/FilterEffectRenderer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): If we have reference filters, update them along with other filters. (WebCore::RenderLayer::filterNeedsRepaint): * rendering/RenderLayerFilterInfo.cpp: (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo): (WebCore::RenderLayerFilterInfo::notifyFinished): Implement callback function when external SVGDocuments are loaded. (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients): Add the FilterInfo as a client to be called when SVGDocuments are loaded. (WebCore::RenderLayerFilterInfo::removeReferenceFilterClients): Remove this from the list of notified clients. * rendering/RenderLayerFilterInfo.h: Add new member vars for tracking internal and external SVG references, so we can remove ourselves as a client when done. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): When marking client DOM nodes for repaint, also mark any RenderLayers referring to this DOM tree via filters as needing repaint. (WebCore::RenderSVGResourceContainer::addClientRenderLayer): (WebCore::RenderSVGResourceContainer::removeClientRenderLayer): * rendering/svg/RenderSVGResourceContainer.h: Maintain a list of RenderLayer clients on each SVG resource container, and turn SVG DOM repaint notifications into filter repaint (CSS) notifications. * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives): Construct a SourceGraphic and SourceAlpha node explicitly for the SVG builder case. * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): * svg/graphics/filters/SVGFilterBuilder.h: (WebCore::SVGFilterBuilder::create): Add the SourceGraphic and SourceAlpha as parameters to the constructor and create() methods, so they can be supplied by the caller. 2012-06-28 Kenichi Ishibashi <bashi@chromium.org> [Chromium] CTFontCopyTable of MacOSX10.5 SDK doesn't work for layout tables https://bugs.webkit.org/show_bug.cgi?id=90235 Reviewed by Kent Tamura. Use CGFontCopyTableForTag instead. No new tests. css3/font-feature-settings-rendering.html should pass. I'll rebase expectations once bots get the result. * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: (WebCore::harfbuzzCoreTextGetTable): 2012-06-28 Philip Rogers <pdr@google.com> Add preventative assert in SVGTRefElement https://bugs.webkit.org/show_bug.cgi?id=90203 Reviewed by Abhishek Arya. SVGTRefElement::detachTarget() adds a pending resource via addPendingResource. Due to some recent bugs in this area, an assert is being added to prevent users from calling detachTarget when not in a document. Doing so would create a bug such as in WK90042. This assert will not fire currently because detachTarget is only called after a DOMNodeRemovedFromDocumentEvent event fires, which only comes from dispatchChildRemovalEvents when the node is in a document. * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::detachTarget): 2012-06-28 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> [Qt] Remove unnecessary AffineTransform calls https://bugs.webkit.org/show_bug.cgi?id=90178 Reviewed by Noam Rosenthal. Qt currently ignores the const AffineTransform& parameter on Pattern::createPlatformPattern, so removing it from all its Qt calls and changing the function signature if platform is Qt. * platform/graphics/Pattern.h: (Pattern): * platform/graphics/qt/FontQt.cpp: (WebCore::fillPenForContext): (WebCore::strokePenForContext): * platform/graphics/qt/FontQt4.cpp: (WebCore::fillPenForContext): (WebCore::strokePenForContext): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::drawRepeatPattern): * platform/graphics/qt/PatternQt.cpp: (WebCore::Pattern::createPlatformPattern): 2012-06-28 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] When uploading an opaque image to a texture for TextureMapper, unnecessary alpha operations take place https://bugs.webkit.org/show_bug.cgi?id=90229 Reviewed by Luiz Agostini. For opaque web content in WebKit2, we use the RGB32 image format. When we special-case it in GraphicsContext3DQt, we can avoid any alpha operations and perform a regular copy. Covered existing API tests, as this code path is always used when rendering. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Compile chromium compositor implementation files into separate .lib https://bugs.webkit.org/show_bug.cgi?id=90233 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2012-06-28 Erik Arvidsson <arv@chromium.org> [V8] NodeList wrappers are not kept alive as needed https://bugs.webkit.org/show_bug.cgi?id=90194 Reviewed by Ojan Vafai. We need to add custom reachability code for DynamicNodeLists. If the owner of a DynamicNodeList is reachable then the DynamicNodeList must also be reachable. Test: fast/dom/NodeList/nodelist-reachable.html * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::visitDOMWrapper): AddImplicitReferences from the owner wrapper. (WebCore): * dom/NodeList.idl: 2012-06-28 Elliott Sprehn <esprehn@gmail.com> frameborder="no" on frameset is ignored if border attribute set https://bugs.webkit.org/show_bug.cgi?id=17767 Reviewed by Tony Chang. Fixes <frameset> frameborder and border handling. Previously we'd override the frameborder=no setting if border was set. We also treated frameborder="anything" the same as frameborder=0 since we we just converted it to a number so frameborder=yes was incorrectly treated the same as frameborder=no. Tests: fast/frames/frameset-frameborder-boolean-values.html fast/frames/frameset-frameborder-inheritance.html fast/frames/frameset-frameborder-overrides-border.html * html/HTMLFrameSetElement.cpp: Proper parsing of yes,no,1,0 values. (WebCore::HTMLFrameSetElement::parseAttribute): * html/HTMLFrameSetElement.h: (WebCore::HTMLFrameSetElement::border): Border should be 0 if frameborder=no. 2012-06-28 Joshua Bell <jsbell@chromium.org> IndexedDB: Implement IDBTransaction internal active flag https://bugs.webkit.org/show_bug.cgi?id=89379 Reviewed by Tony Chang. IDB transactions should only be "active" during IDB success/error callbacks; attempts to make new requests otherwise (e.g. in a setTimeout callback) should fail even if the transaction has not yet finished. Implement this logic, and the closely related requirement that transactions are deactivated when the context they were created in returns to the event loop, and finally that when so deactivated they should commit rather than abort (as previously implemented) if no requests have been filed. Tests: storage/indexeddb/transaction-active-flag.html storage/indexeddb/transaction-complete-with-js-recursion-cross-frame.html storage/indexeddb/transaction-complete-with-js-recursion.html storage/indexeddb/transaction-complete-workers.html * Modules/indexeddb/IDBPendingTransactionMonitor.cpp: Simplify API. (WebCore::transactions): (WebCore::IDBPendingTransactionMonitor::addNewTransaction): (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions): * Modules/indexeddb/IDBPendingTransactionMonitor.h: (WebCore): (IDBPendingTransactionMonitor): * Modules/indexeddb/IDBRequest.cpp: Unregisters from transaction when done, not on destruction. No longer responsible for working with the pending monitor. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::~IDBRequest): (WebCore::IDBRequest::markEarlyDeath): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::dispatchEvent): Set active flag on transaction during callback. * Modules/indexeddb/IDBTransaction.cpp: Use state enum to better track lifecycle, and take ownership of relationship with pending monitor. (WebCore::IDBTransaction::IDBTransaction): Special cases for version change transactions. (WebCore::IDBTransaction::~IDBTransaction): (WebCore::IDBTransaction::error): (WebCore::IDBTransaction::setError): (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::objectStoreCreated): (WebCore::IDBTransaction::objectStoreDeleted): (WebCore::IDBTransaction::setActive): Let IDBRequest and IDBPendingTransactionMonitor toggle the active state. Needs some smarts because (1) state may move to Finishing during the request's dispatch phase due to an implicit/explicit abort, and (2) a monitor call will only trigger a commit if the transaction hasn't had any requests filed. (WebCore): (WebCore::IDBTransaction::abort): (WebCore::IDBTransaction::registerRequest): (WebCore::IDBTransaction::unregisterRequest): (WebCore::IDBTransaction::onAbort): (WebCore::IDBTransaction::onComplete): (WebCore::IDBTransaction::hasPendingActivity): (WebCore::IDBTransaction::dispatchEvent): (WebCore::IDBTransaction::canSuspend): (WebCore::IDBTransaction::enqueueEvent): * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::isFinished): (IDBTransaction): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::commit): Allow explicit commit() calls from the front end if no requests have been filed. * Modules/indexeddb/IDBTransactionBackendInterface.h: (IDBTransactionBackendInterface): Expose commit() method. * bindings/js/JSMainThreadExecState.cpp: (WebCore::JSMainThreadExecState::didLeaveScriptContext): Change target function name. * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): Change target function name. 2012-06-28 Philip Rogers <pdr@google.com> Prevent crash in animate resource handling https://bugs.webkit.org/show_bug.cgi?id=90042 Reviewed by Abhishek Arya. This patch adds a check that we are in a document before registering animation resources and creating a target element in SVGSMILElement. This prevents a crash where we would register resources and create the target when we were not in a document but fail to deregister / reset the target when we were removed from a document. In failing to reset the target, we can crash when trying to deregister resources that were not created after being inserted into a document and then removed. The existence of m_targetResources and registered animation resources is now tied to being in a document. Test: svg/custom/animate-reference-crash.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::targetElement): 2012-06-28 Joshua Bell <jsbell@chromium.org> IndexedDB: IDBDatabase should have a close pending field. https://bugs.webkit.org/show_bug.cgi?id=71129 Reviewed by Tony Chang. Handle the IDB spec case that "versionchange" events should not be fired against connections that have the internal "closePending" flag set but are not yet closed due to running transactions. Test: storage/indexeddb/database-closepending-flag.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::onVersionChange): 2012-06-28 Adrienne Walker <enne@google.com> [chromium] Split WebScrollbar into WebPluginScrollbar and WebScrollbar https://bugs.webkit.org/show_bug.cgi?id=90117 Reviewed by James Robinson. Make WebCore also depend on Platform. * WebCore.gyp/WebCore.gyp: 2012-06-28 Hayato Ito <hayato@chromium.org> CompositeShadowTreeWalker should use InsertionPoint::hasDistribution() instead of InsertionPoint::isActive(). https://bugs.webkit.org/show_bug.cgi?id=89177 Reviewed by Dimitri Glazkov. Prevents ComposedShadowTreeWalker from escaping out of an insertion point (which has distributed nodes) from a non-used fallback element in the insertion point. Such a fallback element should be treated as in an orphaned subtree. ComposedShadowTreeParentWalker will be also fixed in a follow-up patch. Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): 2012-06-27 Ryosuke Niwa <rniwa@webkit.org> Cleanup HTMLFormCollection https://bugs.webkit.org/show_bug.cgi?id=90111 Reviewed by Andreas Kling. Got rid of getNamedItem and renamed getNamedFormItem to firstNamedItem and got rid of duplicateNumber argument since it's always 0. Also made it a static local function. In addition, removed nextItem() since it's not used anywhere. WebKit API Test: WebKit1.HTMLFormCollectionNamedItemTest * html/HTMLFormCollection.cpp: (WebCore::firstNamedItem): (WebCore): (WebCore::HTMLFormCollection::namedItem): * html/HTMLFormCollection.h: (HTMLFormCollection): 2012-06-28 Alec Flett <alecflett@chromium.org> IndexedDB: Hook up render-side key ASSERTing for get() https://bugs.webkit.org/show_bug.cgi?id=90001 Reviewed by Tony Chang. Hook up the new onSuccess and add it to the interface. For now, simply assert that the right value is set. Add the same assertion logic in the value-construction logic when the cursor advances. No new tests, existing tests verify this refactor is correct. * Modules/indexeddb/IDBCallbacks.h: (IDBCallbacks): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getInternal): * Modules/indexeddb/IDBRequest.cpp: (WebCore): (WebCore::IDBRequest::onSuccess): * Modules/indexeddb/IDBRequest.h: * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromSerializedValueAndKeyPath): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-06-28 Gregg Tavares <gman@google.com> Add support for DEPTH_STENCIL to WEBGL_depth_texture https://bugs.webkit.org/show_bug.cgi?id=90109 Reviewed by Kenneth Russell. * html/canvas/WebGLDepthTexture.idl: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Move chromium compositor implementation files into separate section in WebCore.gypi https://bugs.webkit.org/show_bug.cgi?id=90201 Reviewed by Adam Barth. This moves the chromium compositor implementation files to a separate gyp variable to make future changes easier. The files still all link into webcore_platform.lib, as before. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-06-28 Christophe Dumez <christophe.dumez@intel.com> [EFL] Use Eina_Module API instead of dlopen in PluginPackageEfl https://bugs.webkit.org/show_bug.cgi?id=89972 Reviewed by Antonio Gomes. Use convenience helpers in Eina_Module to load plugins instead of POSIX dlopen(). No new tests, behavior has not changed. * platform/FileSystem.h: (WebCore): * platform/efl/FileSystemEfl.cpp: (WebCore::unloadModule): * plugins/efl/PluginPackageEfl.cpp: (WebCore::PluginPackage::load): 2012-06-28 Jocelyn Turcotte <turcotte.j@gmail.com> [Qt] Fix TextureMapper rendering of GraphicsSurface on Mac https://bugs.webkit.org/show_bug.cgi?id=90154 Reviewed by Noam Rosenthal. Fix a regression introduced in r120608. texture2DRect