2013-08-06 Zan Dobersek webkit-gtk fails to build with bison-3.0 https://bugs.webkit.org/show_bug.cgi?id=119373 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Remove rules for generating ANGLE's glslang source files with Bison. Stop relying on generated glslang_tab.(cpp|h) and glslang.cpp sources as Bison 3.0 produces non-compilable source code. Instead, compile these pregenerated files as they're included in the tree. Originally, the ANGLE source tree provides these files as generated by Bison 2.7, but they're at the moment regenerated with Bison 2.3 when the third-party ANGLE source is being updated. 2013-05-03 Xabier Rodriguez Calvar [GStreamer] GStreamer log crashes in MediaPlayerPrivateGStreamerBase because of uninitialized category https://bugs.webkit.org/show_bug.cgi?id=115575 Reviewed by Philippe Normand. No new tests needed. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Using extern debug category. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Declaring debug category as not static. 2013-04-10 Xabier Rodriguez Calvar Clicking on the volume slider of HTML5 elements is pausing sometimes https://bugs.webkit.org/show_bug.cgi?id=112548 Reviewed by Eric Carlson. Test: media/click-volume-bar-not-pausing.html * html/shadow/MediaControlElementTypes.cpp: (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Calling the setDefaultHandled() method on the event prevents it from being incorrectly propagated from the volume button up to the MediaDocument. 2013-07-10 Dominique Leuenberger Fix build against GTK+ 2.0 https://bugs.webkit.org/show_bug.cgi?id=117895 Reviewed by Martin Robinson. GTK2 build fails for undefined GDK_IS_X11_DISPLAY GTK 2.0 does define GDK_WINDOWING_X11,but GDK_IS_X11_DISPLAY is not present in GTK+ 2.0. A dummy defines is sufficient, as GTK 2.0 is not that multiple backend aware anyway... * platform/gtk/GtkVersioning.h: Define GDK_IS_X11_DISPLAY for GTK+ 2.0 and compatibility for gtk_widget_get_preferred_size() * plugins/gtk/gtk2xtbin.c: Include config.h 2013-07-15 Brian Holt [ATK] Leak: Leak in WebKitAccessibleTextGetText https://bugs.webkit.org/show_bug.cgi?id=118596 Reviewed by Carlos Garcia Campos. Fixed memory leak. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (getGailTextUtilForAtk): 2013-07-04 Brian Holt [GTK] Leak: Free PangoFontDescription* in RenderThemeGtk3 https://bugs.webkit.org/show_bug.cgi?id=118386 Reviewed by Carlos Garcia Campos. Free PangoFontDescription* allocated by gtk_style_context_get (transfer full). * platform/gtk/RenderThemeGtk3.cpp: (WebCore::spinButtonArrowSize): 2013-03-04 Mario Sanchez Prada [GTK] WebCore::returnString is unsafe and should be removed! https://bugs.webkit.org/show_bug.cgi?id=110423 Reviewed by Martin Robinson. Remove returnString() and replace it in callers with a new function that will cache and return the values of string properties for ATK interfaces in the private section of the wrapper AtkObject WebKitAccessible. * accessibility/atk/WebKitAccessibleUtil.cpp: Remove returnString(). * accessibility/atk/WebKitAccessibleUtil.h: Ditto. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (_WebKitAccessiblePrivate): New private structure to store cached values of string property for the different ATK interfaces. (cacheAndReturnAtkProperty): New helper function to make sure the returned const gchar* value is previously cached in the private section of the wrapper AtkObject. (webkitAccessibleGetName): Use the new helper function. (webkitAccessibleGetDescription): Ditto. (webkitAccessibleInit): Initialize pointer to private structure. (webkitAccessibleFinalize): Remove unneeded code. (webkitAccessibleClassInit): Add private struct to class type/ * accessibility/atk/WebKitAccessibleWrapperAtk.h: (_WebKitAccessible): New member pointing to the private structure, made the new helper function cacheAndReturnAtkProperty() available to external callers (implementation files for ATK interfaces). (AtkCachedProperty): New enum to allow reusing code when calling cacheAndReturnAtkProperty() to cache and return different properties. * accessibility/atk/WebKitAccessibleInterfaceAction.cpp: (webkitAccessibleActionGetKeybinding): Replace calls to returnString() with calls to the new helper function cacheAndReturnAtkProperty(). (webkitAccessibleActionGetName): Ditto. * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp: (documentAttributeValue): Ditto. (webkitAccessibleDocumentGetLocale): Ditto. * accessibility/atk/WebKitAccessibleInterfaceImage.cpp: (webkitAccessibleImageGetImageDescription): Ditto. Remove returnString() from WebKitAccessibleHyperlink (which is not an AtkObject, but a GObject) as well, replacing it in callers with simple code that will cache and return the required values in the private section of these kind of objects. * accessibility/atk/WebKitAccessibleHyperlink.cpp: (_WebKitAccessibleHyperlinkPrivate): Added two new fields to cache string values for the key binding and name properties from the AtkAction interface, which is implemented by AtkHyperlink. (webkitAccessibleHyperlinkActionGetKeybinding): Cache the string value for the key binding before returning a const gchar* pointer. (webkitAccessibleHyperlinkActionGetName): Ditto. (webkitAccessibleHyperlinkGetURI): Do not cache the URI here, as this function returns a gchar* that will be owned by the caller. 2013-07-01 Brian Holt [ATK] Leak: leaks in WebKitAccessibleInterfaceText https://bugs.webkit.org/show_bug.cgi?id=118248 Fixed memory leaks. Reviewed by Christophe Dumez. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (getPangoLayoutForAtk): (webkitAccessibleTextGetText): 2013-04-15 Patrick Gansterer [GTK] Remove platform specific implementation of KURL::fileSystemPath() https://bugs.webkit.org/show_bug.cgi?id=114133 Reviewed by Martin Robinson. r147883 added a generic implementation of this function, which can be used by all ports to share the code. * GNUmakefile.list.am: * platform/KURL.cpp: (WebCore): * platform/gtk/KURLGtk.cpp: Removed. 2013-04-07 Patrick Gansterer Add default implementation for KURL::fileSystemPath() https://bugs.webkit.org/show_bug.cgi?id=108326 Reviewed by Benjamin Poulain. The code for KURL::fileSystemPath() has been duplicated in different ports. Add an implementation of this function to KURL.cpp for this ports and get rid of the very similar port specific implementation files. * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * platform/KURL.cpp: (WebCore): (WebCore::KURL::fileSystemPath): * platform/blackberry/KURLBlackBerry.cpp: Removed. * platform/efl/KURLEfl.cpp: Removed. * platform/wince/KURLWinCE.cpp: Removed. * platform/wx/KURLWx.cpp: Removed. 2013-06-03 Paweł Forysiuk [harfbuzz] WebKit fails to build with MinGW compiler because of invalid cast in HarfBuzzShaper.cpp https://bugs.webkit.org/show_bug.cgi?id=108373 Reviewed by Darin Adler. Fix building on platforms where UChar is defined as wchar_t. * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): 2013-05-18 Alberto Garcia [GTK] Parallel build fails if gtk-doc is enabled https://bugs.webkit.org/show_bug.cgi?id=116227 Reviewed by Martin Robinson. * GNUmakefile.am: Don't overwrite noinst_DATA, modify its existing value instead. 2013-06-07 Zalan Bujtas Frame flattening: crash when child iframe is removed during beforeload. https://bugs.webkit.org/show_bug.cgi?id=116220 Reviewed by Antti Koivisto. FrameView can get destroyed in updateWidget(). Normally, it is protected by layout() but with frame flattening on, it can also be called asynchronously through the post layout timer. Test: fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): 2013-05-19 Martin Robinson GtkSelectionData length is off by one https://bugs.webkit.org/show_bug.cgi?id=113962 Reviewed by Anders Carlsson. No new tests. Since drag data is interpreted as a null-terminated string this is difficult to test with a C program and we have no infrastructure built for using GIR tests. * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::fillSelectionData): Instead of including the null character in the paste data length, just include the string. This matches the behavior of Firefox. 2013-05-08 Gustavo Noronha Silva [GStreamer] Does memory buffering even with preload set to none https://bugs.webkit.org/show_bug.cgi?id=115754 Reviewed by Philippe Normand. Covered by existing tests. Revision 148840 fixed on-disk buffering being done when preload is set to none, but memory buffering is still being done. That is because setting the state to paused causes GStreamer to start loading the media, to gather information. Only doing that when committing the load avoids that while maintaining the tested behaviour unchanged. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad. (WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above. 2013-04-12 Balazs Kelemen [GStreamer] Media attribute preload="none" is not honored https://bugs.webkit.org/show_bug.cgi?id=114357 Reviewed by Philippe Normand. Fix the logic that prevents live streams from being buffered to not make preload="none" ignored. Test: http/tests/media/video-preload.html We need a http test because the bug does not triggered with local files. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): Remove m_originalPreloadWasAutoAndWasOverridden because it is not necessary and it is causing this bug. Currently if the tag has preload="none" attribute we set m_preload to Auto in the constructor. After that MedaPlayer calls setPreload(None), so we set m_originalPreloadWasAutoAndWasOverridden to true and later reset m_preload to Auto. The error prone factor here is that the m_preload member is repeated in the private class and setPreload is also used there. This seems to be necessary because we need to be able to ignore preloading if this is a live stream. Fortunately the original parsed value is available in the constructor, so we can use that. This will give the correct value that we should override only in the case of a live stream and that's it, we don't need to reset it later to Auto. Furthermore, we should ignore setting preload to auto from js if it is a live stream. This patch also handles this with an early return in setPreload. 2013-04-02 Martin Robinson [GTK] Make libsecret optional https://bugs.webkit.org/show_bug.cgi?id=113821 Reviewed by Gustavo Noronha Silva. Don't try to use libsecret if credential storage is disabled. * platform/gtk/GRefPtrGtk.cpp: Protect libsecret sections. * platform/gtk/GRefPtrGtk.h: Ditto. * platform/network/gtk/CredentialBackingStore.cpp: Ditto. 2013-04-11 Carlos Garcia Campos FrameLoaderClient::assignIdentifierToInitialRequest() not called for the main resource when loaded from the memory cache https://bugs.webkit.org/show_bug.cgi?id=112418 Reviewed by Darin Adler. When the main resource is loaded from the memory cache the response is not added to the ResponseVector of the document loader, so that when committing the provisional load the remaining delegate messages are not called because the ResponseVector of the document loader is empty. When the main resource is loaded from the memory cache, there's no resource loader, and the client is notified about the response received using ResourceLoadNotifier::dispatchDidReceiveResponse() directly instead of ResourceLoadNotifier::didReceiveResponse() which is the one adding the response to the ResponseVector of the document loader. So, the problem can be fixed by adding the response to the ResponseVector before calling dispatchDidReceiveResponse() when loading the main resource without a resource loade Test: loader/go-back-cached-main-resource.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::responseReceived): 2013-04-08 Carlos Garcia Campos [GTK] DOM objects created wrapping a base class have incorrect GObject type https://bugs.webkit.org/show_bug.cgi?id=113132 Reviewed by Gustavo Noronha Silva. Some of the DOM methods can create a concrete instance of another object, but return a base class. GObject bindings provide custom kit implementations for Node, Element, Event and EvenTarget, so any concrete HTMLElement wrapped as an HTMLElement ends up wrapping the right WebCore object but in the wrong GObject type. This affects not only HTMLElements, but any polymorphic object wrapped using a base class. This patch changes the way objects are created, so that all classes have their own kit implementation, but for polymorphic objects the kit implementation of the base class is always used. The kit method of polymorphic base classes use a generic wrap method instead of the wrapFoo method like all other classes. In the static code we provide the implementation of the generic wrap method for every polimorphic base class, falling back to their wrapFoo method if the concrete object can't be used to wrap the object. Both WebKitDOMBinding and WebKitHTMLElementWrapperFactory now provide implementations of wrap and have been renamed to WebKitDOMPrivate and WebKitDOMHTMLPrivate. * bindings/gobject/GNUmakefile.am: * bindings/gobject/WebKitDOMBinding.cpp: Removed. * bindings/gobject/WebKitDOMEventTarget.cpp: (WebKit::kit): Moved kit implementation from WebKitDOMBinding for consistency with all other objects that have their own kit. (WebKit::core): Updated to match the core implementation fo all other objects. * bindings/gobject/WebKitDOMEventTargetPrivate.h: (WebCore): (WebKit): * bindings/gobject/WebKitDOMHTMLPrivate.cpp: Added. (WebKit): Use preprocessor macros to define and set the wrap functions of all HTML elements, removing a lot of boilerplate code and making it easier to add new wrap functions in the future. (WebKit::wrap): * bindings/gobject/WebKitDOMHTMLPrivate.h: Renamed from Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h. (WebCore): (WebKit): * bindings/gobject/WebKitDOMObject.cpp: * bindings/gobject/WebKitDOMPrivate.cpp: Added. (WebKit): (WebKit::wrap): * bindings/gobject/WebKitDOMPrivate.h: Renamed from Source/WebCore/bindings/gobject/WebKitDOMBinding.h. (WebCore): (WebKit): * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Removed. * bindings/scripts/CodeGeneratorGObject.pm: (IsBaseType): Helper function to check if a type is a base class. (GetBaseClass): Helper function to get the base class for a given parent type. (GenerateFunction): Remove special case for EventTarget since the kit prototype of EventTarget is in its private header like all other objects. (GenerateCFile): Add a kit implementation for all objects. (IsPolymorphic): Helper function to check if the given type is the base class of a polymorphic object. (Generate): Include the private header of the base class for polymorphic objects. (WriteData): Remove the special case for WebKitDOMNode since now all objects has a kit method. * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructorsPrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: (WebKit): * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: (WebKit): 2013-03-14 Xabier Rodriguez Calvar [GStreamer] simulateAudioInterruption needs to be guarded by ENABLE(VIDEO)" https://bugs.webkit.org/show_bug.cgi?id=112358 Guarded with ENABLE(VIDEO) to prevent problems when it is not enabled. Reviewed by Philippe Normand. 2013-03-14 Xabier Rodriguez Calvar [GStreamer] Stopping playback of html5 media when receiving a higher priority audio event needs implementation https://bugs.webkit.org/show_bug.cgi?id=91611 React to REQUEST_STATE GStreamer message to stop the pipeline when a higher priority stream is played. When this happens, states are updated accordingly. A method was added in the MediaPlayer class and internals to allow the the test runner to simulate an audio interruption. Reviewed by Philippe Normand. Test: media/media-higher-prio-audio-stream.html * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayer.cpp: (WebCore): (MediaPlayer): (WebCore::MediaPlayer::simulateAudioInterruption): New method delegating an audio interruption to the private backend to simulate the use-case where an external application needs exclusive access to the audio device. * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): (WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption): Added default empty method in the common private header. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore): (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): (WebCore::setAudioStreamPropertiesCallback): Hooked to child-added signal on the audio sink, delegates on setAudioStreamProperties. (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Sets the audio stream properties. (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initializes the new attribute. (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnects autoaudiosink signal. (WebCore::MediaPlayerPrivateGStreamer::changePipelineState): Changed logging. (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Reacting to the REQUEST_STATE message. (WebCore::MediaPlayerPrivateGStreamer::simulateAudioInterruption): Added. Injects the REQUEST_STATE message to the pipeline. (WebCore::MediaPlayerPrivateGStreamer::updateStates): Updating the playback state if REQUEST_STATE. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): Added new method and attribute. * testing/Internals.h: * testing/Internals.idl: * testing/Internals.cpp: (WebCore): (WebCore::Internals::simulateAudioInterruption): Added to call the method to stop the element because of a higher prio stream at the tests. 2013-03-17 Gustavo Noronha Silva [GTK] Fix and improve dist hooks for translations https://bugs.webkit.org/show_bug.cgi?id=112519 Reviewed by Carlos Garcia Campos. * GNUmakefile.am: move translation-related rules and lists to the po directory's GNUmakefile.am. 2013-03-17 Carlos Garcia Campos [ENCHANT] Invalid charset encoding used for spelling guess context menu items https://bugs.webkit.org/show_bug.cgi?id=112516 Reviewed by Gustavo Noronha Silva. Convert spelling guesses returned by enchant to UTF-16 before passing them to WebCore. * platform/text/enchant/TextCheckerEnchant.cpp: (WebCore::TextCheckerEnchant::getGuessesForWord): Use String::fromUTF8(). 2013-03-14 Xan Lopez [GTK] Wrong ASSERT in AudioDestinationGstreamer::stop https://bugs.webkit.org/show_bug.cgi?id=112344 Reviewed by Philippe Normand. Correct erroneous ASSERT, we want both member variables to exist. * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestinationGStreamer::stop): 2013-03-13 Carlos Garcia Campos [GTK] Add webkit_uri_request_get_http_headers to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=112160 Reviewed by Martin Robinson. * platform/network/soup/GOwnPtrSoup.cpp: (WTF::SoupMessageHeaders): Add freeOwnedGPtr implementation for SoupMessageHeaders. (WTF): * platform/network/soup/GOwnPtrSoup.h: (WTF): * platform/network/soup/ResourceRequest.h: (ResourceRequest): * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::updateSoupMessageHeaders): New function to update the given SoupMessageHeaders with the ResourceRequest headers. (WebCore::ResourceRequest::updateFromSoupMessageHeaders): New function to update the ResourceRequest headers with the given SoupMessageHeaders. (WebCore::ResourceRequest::updateSoupMessage): Use updateSoupMessageHeaders() to update the headers. (WebCore::ResourceRequest::toSoupMessage): Ditto. (WebCore::ResourceRequest::updateFromSoupMessage): Use updateFromSoupMessageHeaders to update the headers. 2013-03-12 Zan Dobersek [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles https://bugs.webkit.org/show_bug.cgi?id=112163 Reviewed by Martin Robinson. No new tests - no new functionality, merely a cleanup. * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for references to HILDON_CPPFLAGS and HILDON_CFLAGS. 2013-03-13 Carlos Garcia Campos [GTK] Split GtkAuthenticationDialog in two widgets https://bugs.webkit.org/show_bug.cgi?id=103644 Reviewed by Xan Lopez. The current GtkAuthenticationDialog implements both the common logic and widgets to implement a real GtkDialog and a widget to be embedded in any container. WebKit1 uses a GtkDialog while WebKit2 embeds the dialog in the WebView. This patch splits the code to leave in Platform only the code that is actually common, leaving the widget implementation to the WebKit layer, using a dialog in WebKit1 and embedding auth widget in the WebView in WebKit2. * GNUmakefile.list.am: Add new files to compilation. * platform/gtk/GtkAuthenticationDialog.cpp: Removed. * platform/gtk/GtkAuthenticationDialog.h: Removed. * platform/gtk/WebKitAuthenticationWidget.cpp: Added. (_WebKitAuthenticationWidgetPrivate): (packTwoColumnLayoutInBox): (createLabel): (createEntry): (webkitAuthenticationWidgetInitialize): (webkitAuthenticationWidgetFinalize): (webkit_authentication_widget_init): (webkit_authentication_widget_class_init): (webkitAuthenticationWidgetNew): (webkitAuthenticationWidgetCreateCredential): (webkitAuthenticationWidgetGetChallenge): * platform/gtk/WebKitAuthenticationWidget.h: Added. (_WebKitAuthenticationWidget): (_WebKitAuthenticationWidgetClass): 2013-03-12 Tomas Popela [Gtk] NBSP are not replaced when using X clipboard https://bugs.webkit.org/show_bug.cgi?id=112118 Reviewed by Martin Robinson. We're not replacing nbsp with spaces when using X clipboard (Shift+Insert or middle mouse button). * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::text): 2013-03-11 Carlos Garcia Campos [SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message https://bugs.webkit.org/show_bug.cgi?id=112040 Reviewed by Gustavo Noronha Silva. * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::updateSoupMessage): Update the soup message URI with the ResourceRequest URL. 2013-03-09 Sebastian Dröge Fix offset handling in GStreamer WebKitWebSource. https://bugs.webkit.org/show_bug.cgi?id=111888 Reviewed by Philippe Normand. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcSeekDataCb): (StreamingClient::didReceiveData): The offset handling in WebKitWebSource was completely wrong before and caused wrong offsets to be set on the GStreamer buffers after a seek. Apart from that there was also a race condition that happens when a downstream element causes seeks in very short succession and is switching between two different parts of the stream. 2013-03-07 Zan Dobersek [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0 https://bugs.webkit.org/show_bug.cgi?id=109932 Reviewed by Martin Robinson. * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags. They are now available by default due to the limited set of supported compilers. * bindings/gobject/GNUmakefile.am: Ditto. 2013-02-21 Martin Robinson [GTK] Move feature overriding to the configure phase https://bugs.webkit.org/show_bug.cgi?id=110293 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: No longer include GNUmakefile.features.am. We don't have to process the result of this file or do any modification of feature_defines_override, because this variable is gone. 2013-03-06 Christophe Dumez [soup] session cookies are not correctly reported in getRawCookies() https://bugs.webkit.org/show_bug.cgi?id=111584 Reviewed by Martin Robinson. As per libsoup documentation, SoupCookie->expires is NULL for session cookies. However, the soup implementation for getRawCookies() does not check for NULL case before passing the value to soup_date_to_time_t(), which leads to run time warnings. We should also pass true for WebCore::Cookie's session argument if SoupCookie->expires is NULL. The current implementation reports the cookie as a session one if soup_cookie_jar_is_persistent(jar) returns true, which is inaccurate. No new tests, no behavior change for layout tests as Web Inspector currently ignores the "session" member and uses expires/max-age instead to deduce it. * platform/network/soup/CookieJarSoup.cpp: (WebCore::getRawCookies): 2013-03-06 Gustavo Noronha Silva [GTK] Enable translations for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=111398 Reviewed by Martin Robinson. Build change only, thus no tests. * GNUmakefile.am: distribute po files. * platform/gtk/po/POTFILES.in: adjust paths for translatable files. 2013-03-04 Christian Biesinger REGRESSION (r143643): Buttons containing floats render differently https://bugs.webkit.org/show_bug.cgi?id=110933 Reviewed by Ojan Vafai. Test: fast/forms/button-with-float.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::expandsToEncloseOverhangingFloats): Also include new flexbox as a renderer that needs to enclose overhanging floats. Flex boxes establish a block formatting context, so they need to contain floats: http://dev.w3.org/csswg/css3-flexbox/#flex-items 2013-02-25 Gustavo Noronha Silva Build fix for gtk2-based library. Reviewed by Martin Robinson. * platform/gtk/WidgetRenderingContext.cpp: move gtk2 check to after the config.h include, which is the one that includes autotoolsconfig.h, where the gtk2 define lives. 2013-02-24 Gustavo Noronha Silva [GTK] GTK+ 2 build broken since GTK_API_VERSION_2 moved to autoconfig.h https://bugs.webkit.org/show_bug.cgi?id=110702 Reviewed by Martin Robinson. No tests. Build fix, no behaviour change. * platform/gtk/GtkVersioning.h: include the autotoolsconfig.h header, which contains the GTK_API_VERSION_2 define now. 2013-02-25 Sergio Villar Senin [soup] "Too many redirects" error loading chat in plus.google.com https://bugs.webkit.org/show_bug.cgi?id=64575 Reviewed by Martin Robinson. Set the firstPartyForCookies for the new request on redirects to the URL used for redirection. Test: http/tests/cookies/set-cookie-on-redirect.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::doRedirect): 2013-02-21 Claudio Saavedra [GTK] Control+Shift+Up/Down selection works backwards https://bugs.webkit.org/show_bug.cgi?id=110459 Reviewed by Martin Robinson. * platform/gtk/KeyBindingTranslator.cpp: (WebCore): The translation table for paragraph selection commands is backwards, fix it. 2013-02-22 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.am: Add CodeGeneratorInspectorStrings.py to EXTRA_DIST. 2013-02-21 Martin Robinson A couple more 'make dist' fixes for WebKitGTK+. * GNUmakefile.list.am: Add a missing file to the source list. 2013-02-21 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing files to compilation. 2013-02-21 Alberto Garcia [BlackBerry] Fix access to ResourceHandle::context https://bugs.webkit.org/show_bug.cgi?id=110443 Reviewed by Carlos Garcia Campos. This changed in r141981. * platform/network/blackberry/ResourceHandleBlackBerry.cpp: (WebCore::ResourceHandle::start): 2013-02-21 Alberto Garcia [BlackBerry] GraphicsLayerBlackBerry: rename showDebugBorder to isShowingDebugBorder https://bugs.webkit.org/show_bug.cgi?id=110453 Reviewed by Carlos Garcia Campos. This changed in r133517. * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp: (WebCore::GraphicsLayerBlackBerry::setupContentsLayer): 2013-02-21 Peter Rybin Web Inspector: take large strings out of CodeGeneratorInspector.py https://bugs.webkit.org/show_bug.cgi?id=110159 Reviewed by Yury Semikhatsky. Python script is refactored. * inspector/CodeGeneratorInspector.py: * inspector/CodeGeneratorInspectorStrings.py: Added. (InspectorFrontend_h): (InspectorFrontendChannel): (InspectorArray): (InspectorObject): (String): (InspectorFrontend): (InspectorBackendDispatcher_h): (InspectorAgent): (InspectorBackendDispatcherImpl): (InspectorBackendDispatcher): (CallbackBase): (void): (HashMap): (OptOutput): (ExactlyInt): (RuntimeCastHelper): (provides): (typename): (Array): (Builder): 2013-02-21 Sheriff Bot Unreviewed, rolling out r143581. http://trac.webkit.org/changeset/143581 https://bugs.webkit.org/show_bug.cgi?id=110457 Breaks Windows builds (compile + link) (Requested by apavlov on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * dom/WebCoreMemoryInstrumentation.cpp: (WebCore): * dom/WebCoreMemoryInstrumentation.h: (WebCoreMemoryTypes): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): (WebCore::InspectorDOMStorageAgent::clearFrontend): (WebCore::InspectorDOMStorageAgent::restore): (WebCore::InspectorDOMStorageAgent::enable): (WebCore::InspectorDOMStorageAgent::disable): (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): (WebCore::InspectorDOMStorageAgent::storageId): (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId): (WebCore::InspectorDOMStorageAgent::didUseDOMStorage): (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent): (WebCore::InspectorDOMStorageAgent::clearResources): (WebCore::InspectorDOMStorageAgent::reportMemoryUsage): * inspector/InspectorDOMStorageAgent.h: (WebCore): (WebCore::InspectorDOMStorageAgent::create): (InspectorDOMStorageAgent): * inspector/InspectorDOMStorageResource.cpp: Added. (WebCore): (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource): (WebCore::InspectorDOMStorageResource::isSameOriginAndType): (WebCore::InspectorDOMStorageResource::bind): (WebCore::InspectorDOMStorageResource::unbind): (WebCore::InspectorDOMStorageResource::reportMemoryUsage): * inspector/InspectorDOMStorageResource.h: Added. (WebCore): (InspectorDOMStorageResource): (WebCore::InspectorDOMStorageResource::create): (WebCore::InspectorDOMStorageResource::id): (WebCore::InspectorDOMStorageResource::storageArea): (WebCore::InspectorDOMStorageResource::frame): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::didCommitLoadImpl): (WebCore::InspectorInstrumentation::didUseDOMStorageImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::didUseDOMStorage): (WebCore): * inspector/InspectorPageAgent.cpp: * inspector/InspectorPageAgent.h: (InspectorPageAgent): * inspector/front-end/DOMStorage.js: (WebInspector.DOMStorage): (WebInspector.DOMStorage.prototype.get id): (WebInspector.DOMStorage.prototype.get domain): (WebInspector.DOMStorage.prototype.getEntries): (WebInspector.DOMStorage.prototype.setItem): (WebInspector.DOMStorage.prototype.removeItem): (WebInspector.DOMStorageModel): (WebInspector.DOMStorageModel.prototype._addDOMStorage): (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared): (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved): (WebInspector.DOMStorageModel.prototype._domStorageItemAdded): (WebInspector.DOMStorageModel.prototype.storageForId): (WebInspector.DOMStorageModel.prototype.storages): (WebInspector.DOMStorageDispatcher.prototype.addDOMStorage): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._update): (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries): (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): (WebInspector.ResourcesPanel.prototype._initialize): (WebInspector.ResourcesPanel.prototype._domStorageAdded): (WebInspector.ResourcesPanel.prototype._addDOMStorage): (WebInspector.DOMStorageTreeElement): (WebInspector.DOMStorageTreeElement.prototype.get itemURL): * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): 2013-02-21 Vsevolod Vlasov Web Inspector: Get rid of parsedURL in uiSourceCode, use name and path for displayName instead. https://bugs.webkit.org/show_bug.cgi?id=110335 Reviewed by Alexander Pavlov. Replaced UISourceCode.parsedURL with UISourceCode.displayName(). * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype._updateScriptTitle): (WebInspector.NavigatorView.prototype.getOrCreateFolderTreeElement): (WebInspector.NavigatorFolderTreeElement): * inspector/front-end/ResourceUtils.js: (WebInspector.displayNameForURL): * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.prototype._createUISourceCodeItem): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.displayName): (WebInspector.UISourceCode.prototype.urlChanged): 2013-02-21 Alexander Pavlov Web Inspector: Local/session storage tree items in the Resources panel after page refresh are not shown https://bugs.webkit.org/show_bug.cgi?id=109572 Reviewed by Vsevolod Vlasov. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * dom/WebCoreMemoryInstrumentation.cpp: (WebCore): * dom/WebCoreMemoryInstrumentation.h: (WebCoreMemoryTypes): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): (WebCore::InspectorDOMStorageAgent::clearFrontend): (WebCore::InspectorDOMStorageAgent::isEnabled): (WebCore::InspectorDOMStorageAgent::enable): (WebCore::InspectorDOMStorageAgent::disable): (WebCore::InspectorDOMStorageAgent::getDOMStorageItems): (WebCore::toErrorString): (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): (WebCore::InspectorDOMStorageAgent::storageId): (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent): (WebCore::InspectorDOMStorageAgent::findStorageArea): (WebCore::InspectorDOMStorageAgent::reportMemoryUsage): * inspector/InspectorDOMStorageAgent.h: (WebCore): (WebCore::InspectorDOMStorageAgent::create): (InspectorDOMStorageAgent): * inspector/InspectorDOMStorageResource.cpp: Removed. * inspector/InspectorDOMStorageResource.h: Removed. * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin): (WebCore): * inspector/InspectorPageAgent.h: (InspectorPageAgent): * inspector/front-end/DOMStorage.js: (WebInspector.DOMStorage): (WebInspector.DOMStorage.storageId): (WebInspector.DOMStorage.prototype.get id): (WebInspector.DOMStorage.prototype.get securityOrigin): (WebInspector.DOMStorage.prototype.getItems): (WebInspector.DOMStorage.prototype.setItem): (WebInspector.DOMStorage.prototype.removeItem): (WebInspector.DOMStorageModel): (WebInspector.DOMStorageModel.prototype._securityOriginAdded): (WebInspector.DOMStorageModel.prototype._securityOriginRemoved): (WebInspector.DOMStorageModel.prototype._storageKey): (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared): (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved): (WebInspector.DOMStorageModel.prototype._domStorageItemAdded): (WebInspector.DOMStorageModel.prototype.storageForId): (WebInspector.DOMStorageModel.prototype.storages): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._update): (WebInspector.DOMStorageItemsView.prototype._showDOMStorageItems): (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageItems): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): (WebInspector.ResourcesPanel.prototype._initialize): (WebInspector.ResourcesPanel.prototype._domStorageAdded): (WebInspector.ResourcesPanel.prototype._domStorageRemoved): (WebInspector.ResourcesPanel.prototype._populateDOMStorageTree): (WebInspector.DOMStorageTreeElement): (WebInspector.DOMStorageTreeElement.prototype.get itemURL): * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): 2013-02-19 Eugene Klyuchnikov Web Inspector: [Console] Add console API message types for profile/profileEnd. https://bugs.webkit.org/show_bug.cgi?id=109790 Reviewed by Pavel Feldman. With profile/profileEnd message types we will gain more control over output messages. * English.lproj/localizedStrings.js: Added corresponging strings. * inspector/ConsoleAPITypes.h: Added enum members. * inspector/Inspector.json: Ditto. * inspector/front-end/ConsoleModel.js: Ditto. * inspector/ConsoleMessage.cpp: (WebCore::messageTypeValue): Added cases. * inspector/InspectorProfilerAgent.cpp: Adopted changes. * inspector/front-end/inspector.js: Ditto. * inspector/front-end/ConsoleMessage.js: Added message generators for introduced message types. * inspector/front-end/ProfilesPanel.js: Turned showProfileForURL(url) to showProfile(typeId, uid). * inspector/front-end/ProfilesPanelDescriptor.js: (WebInspector.ProfilesPanelDescriptor.resolveProfileTitle): Added. * inspector/front-end/ResourceUtils.js: Removed linkifier plugins. 2013-02-21 Tamas Czene OpenCL implementation of FEMerge filter. https://bugs.webkit.org/show_bug.cgi?id=110193 Reviewed by Zoltan Herczeg. In case of odd number of parameters the first parameter is copied to the destination image and the rest of the parameters are merged in pairs. * Target.pri: * platform/graphics/filters/FEMerge.h: (FEMerge): * platform/graphics/gpu/opencl/FilterContextOpenCL.h: (WebCore::FilterContextOpenCL::FilterContextOpenCL): (FilterContextOpenCL): * platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Added. (WebCore): (WebCore::FilterContextOpenCL::compileFEMerge): (WebCore::FilterContextOpenCL::copy): This is a simple copy method. (WebCore::FilterContextOpenCL::applyFEMerge): (WebCore::FEMerge::platformApplyOpenCL): 2013-02-21 Keishi Hattori Add event dispatch class for the new calendar picker https://bugs.webkit.org/show_bug.cgi?id=110131 Reviewed by Kent Tamura. Adding event dispatcher class as part of the new calendar picker patch at Bug 109439. No new tests. Code is not yet used. * Resources/pagepopups/calendarPicker.js: (EventEmitter): (EventEmitter.prototype.on): Adds a callback for an event. (EventEmitter.prototype.hasListener): Returns true if more than one listeners exist for an event type. (EventEmitter.prototype.removeListener): Removes an event listener. (EventEmitter.prototype.dispatchEvent): Dispatches an event to all callbacks. Takes variable number of arguments. 2013-02-21 Ken Kania Web Inspector: Add command for selecting files for file input element https://bugs.webkit.org/show_bug.cgi?id=109308 Reviewed by Pavel Feldman. Test: inspector-protocol/dom/setFileInputFiles.html * inspector/Inspector.json: * inspector/InspectorClient.h: (WebCore::InspectorClient::canSetFileInputFiles): (InspectorClient): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::setFileInputFiles): (WebCore): * inspector/InspectorDOMAgent.h: (WebCore): (WebCore::InspectorDOMAgent::create): (InspectorDOMAgent): 2013-02-21 Pan Deng [Web Inspector]Add WebSocket networking events in Timeline panel. https://bugs.webkit.org/show_bug.cgi?id=105527. Reviewed by Pavel Feldman. This patch add four WebSocket networking events in Timeline panel. The Events are CreateWebSocket, SendWebSocketHandshakeRequest, ReceiveWebSocketHandShakeResponse and DestoryWebSocket. Thanks to Kitamura san's previous work. Test: http/tests/inspector/websocket/timeline-websocket-event.html * English.lproj/localizedStrings.js: * Modules/websockets/WebSocketChannel.cpp: Add protocol information (WebCore::WebSocketChannel::connect): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::didCreateWebSocketImpl): Add Timeline agent instrumentation for websocket (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl): Ditto (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl): Ditto (WebCore::InspectorInstrumentation::didCloseWebSocketImpl): Ditto * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::didCreateWebSocket): (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest): (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorInstrumentation::didCloseWebSocket): * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): (WebCore): (WebCore::InspectorTimelineAgent::didCreateWebSocket): Add Timeline record for websocket create (WebCore::InspectorTimelineAgent::addWebSocketRecord): Add general websocket record (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest): Add Timeline record for websocket handshake request send (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse): Add Timeline record for websocket handshake response receive (WebCore::InspectorTimelineAgent::didDestroyWebSocket): Add Timeline record for websocket destroy * inspector/InspectorTimelineAgent.h: (WebCore): (InspectorTimelineAgent): * inspector/TimelineRecordFactory.h: (TimelineRecordFactory): (WebCore::TimelineRecordFactory::createWebSocketCreateData): (WebCore::TimelineRecordFactory::createGenericWebSocketData): * inspector/front-end/TimelineModel.js: Add Timeline record type for websocket * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel._initRecordStyles): (WebInspector.TimelinePresentationModel.prototype.reset): Add slot to store WebSocket Create record (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview): Add PopupContent for websocket record, including url and protocol 2013-02-21 Oswald Buddenhagen [Qt] Fix pkg-config dependencies of QtWebKit itself Reviewed by Simon Hausmann. Don't override QMAKE_PKGCONFIG_REQUIRES needlessly. * WebCore.pri: 2013-02-21 Nils Barth File upload control doesn't apply CSS vertical padding or border to file name https://bugs.webkit.org/show_bug.cgi?id=109011 Reviewed by Hajime Morrita. Test: fast/forms/file/file-vertical-padding-border.html * rendering/RenderFileUploadControl.cpp: Add borderTop() and paddingTop() when computing position. (WebCore::RenderFileUploadControl::paintObject): 2013-02-20 Alexey Proskuryakov Stop hardcoding knowledge about blob protocol in ResourceHandle https://bugs.webkit.org/show_bug.cgi?id=110382 Reviewed by Anders Carlsson. * platform/network/BlobRegistry.h: * platform/network/chromium/BlobRegistryProxy.h: Removed loadResourceSynchronously(). Chromium did not even implement it, and cross-platform code doesn't need it any more either. * platform/network/BlobRegistryImpl.cpp: (WebCore::loadResourceSynchronously): A function to load a blob synchronously, suitable for being in a ResourceHandle map. (WebCore::registerBlobResourceHandleConstructor): Register loadResourceSynchronously too. (WebCore::BlobRegistryImpl::createResourceHandle): Don't make policy decisions here, it's just a registry. Moved code for checking request method down to BlobResourceHandle. * platform/network/BlobRegistryImpl.h: Removed BlobRegistryImpl::loadResourceSynchronously(). A registry shouldn't load resources, and it already has enough accessors to implement this externally. * platform/network/BlobResourceHandle.h: * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::createAsync): Renamed from create(), to make it clear that it's not OK to call from synchronous loader. Moved method check here. (WebCore::BlobResourceHandle::loadResourceSynchronously): Moved method check here. We used to fall through to NSURLConnection based loader when method was not GET, which of course resulted in an error eventually, but was just wrong. * platform/network/ResourceHandle.cpp: (WebCore::builtinResourceHandleSynchronousLoaderMap): Added a map for synchronous case. (WebCore::ResourceHandle::registerBuiltinSynchronousLoader): Ditto. (WebCore::ResourceHandle::loadResourceSynchronously): We no longer need to hardcode knowledge about blobRegistry and blobs here. * platform/network/ResourceHandle.h: Added registerBuiltinSynchronousLoader(). * platform/network/chromium/ResourceHandle.h: Removed loadResourceSynchronously(), which was not implemented for Chromium. 2013-02-20 Vsevolod Vlasov Web Inspector: TabbedEditorContainer and OpenResourceDialog should show uiSourceCode path and name instead of parsedURL https://bugs.webkit.org/show_bug.cgi?id=110334 Reviewed by Alexander Pavlov. Introduced uiSourceCode.name() that returns a name based on uiSourceCode path. OpenResourceDialog now shows uiSourceCode workspace path as a subtitle. TabbedEditorContainer now shows uiSourceCode name in the tab header. * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.OpenResourceDialog.filterOutEmptyURLs): (WebInspector.OpenResourceDialog): (WebInspector.OpenResourceDialog.prototype.itemTitleAt): (WebInspector.OpenResourceDialog.prototype.itemSubtitleAt): (WebInspector.OpenResourceDialog.prototype.itemKeyAt): * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype._updateScriptTitle): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype._titleForFile): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.name): 2013-02-20 Pavel Feldman Web Inspector: debugger buttons are scrolled along with the sidebar content. https://bugs.webkit.org/show_bug.cgi?id=110434 Reviewed by Vsevolod Vlasov. * inspector/front-end/scriptsPanel.css: (div.sidebar-pane-stack#scripts-debug-sidebar-contents, #scripts-sidebar-stack-pane): 2013-02-20 Wei James ChannelMergerNode may need check for deferred updating of output channels https://bugs.webkit.org/show_bug.cgi?id=108863 There can in rare cases be a slight delay before the output bus is updated to the new number of channels because of tryLocks() in the context's updating system. So need to check the channel number before processing. Reviewed by Chris Rogers. * Modules/webaudio/ChannelMergerNode.cpp: (WebCore::ChannelMergerNode::ChannelMergerNode): (WebCore::ChannelMergerNode::process): (WebCore::ChannelMergerNode::checkNumberOfChannelsForInput): * Modules/webaudio/ChannelMergerNode.h: (ChannelMergerNode): 2013-02-20 Pan Deng [Web Inspector] Fix Sort by Initiator functionality of Network Panel. https://bugs.webkit.org/show_bug.cgi?id=109135. Reviewed by Pavel Feldman. A refactor for request initiator types, and the sort by Initiator functionality was changed to sort by url and line number that displayed in initiator cell. No new tests. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): save initiator displayedURL and displayedLineNumber (WebInspector.NetworkDataGridNode.InitiatorComparator): * inspector/front-end/NetworkRequest.js: 2013-02-20 Eric Seidel WebVTTParser copies character buffer more often than necessary https://bugs.webkit.org/show_bug.cgi?id=103319 Reviewed by Eric Carlson. Previously this codepath was creating a String just to parse the timestamp and then if the timestamp was valid, was creating a second string. I've fixed it to only create one string and use it in both places. I also fixed this codepath to use 8bit strings when possible, per the FIXME. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): 2013-02-20 Mike West Mouseup event does not fire on Scroll Bar https://bugs.webkit.org/show_bug.cgi?id=25811 Reviewed by Tony Chang. Currently, clicking on a scrollbar fires a mousedown event, but not a mouseup event. This causes problems for code like jQuery UI's draggable[1], as the drag starts, but is never cancelled. Other use cases are noted in the slightly old Chromium bug[2]. If a mouseup event is received after a mousedown event on a scrollbar, this patch dispatches a mouseup event on the same node the mousedown event dispatched on. This matches Gecko's behavior. [1]: http://bugs.jqueryui.com/ticket/6925 [2]: http://crbug.com/14204 Tests: fast/scrolling/scrollbar-mousedown-mouseup.html fast/scrolling/scrollbar-mousedown-move-mouseup.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): If a mouseup event follow a mousedown event on a scrollbar, dispatch an event on the same node from which the mousedown event was triggered. 2013-02-20 Takashi Sakamoto [Refactoring] Make m_state an on-stack object https://bugs.webkit.org/show_bug.cgi?id=109909 Reviewed by Antti Koivisto. Mode m_state, an instance of StyleResolver::State, an on-stack object. The state is only required in styleForElement, styleForKeyframe and so on. No need to keep the state outside of those methods. No new tests, because just refactoring. * css/BasicShapeFunctions.cpp: (WebCore::convertToLength): (WebCore::basicShapeForValue): * css/BasicShapeFunctions.h: (WebCore): Replaced StyleResolver* with StyleResolver::State&. * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::gradientWithStylesResolved): * css/CSSGradientValue.h: (CSSGradientValue): Replaced StyleResolver* with StyleResolver::State&. * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::style): (WebCore::CSSToStyleMap::rootElementStyle): (WebCore::CSSToStyleMap::useSVGZoomRules): (WebCore::CSSToStyleMap::styleImage): * css/CSSToStyleMap.h: (WebCore): (WebCore::CSSToStyleMap::CSSToStyleMap): (CSSToStyleMap): Replaced StyleResolver* with StyleResolver::State&. * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): Replaced m_state with state which is given as an argument of applySVGProperty. * css/StyleBuilder.cpp: (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyDefaultBase::applyInheritValue): (WebCore::ApplyPropertyDefaultBase::applyInitialValue): (WebCore::ApplyPropertyDefaultBase::applyValue): (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyColor::applyColorValue): (WebCore::ApplyPropertyDirection::applyValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFillLayer::applyInheritValue): (WebCore::ApplyPropertyFillLayer::applyInitialValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFont::applyInheritValue): (WebCore::ApplyPropertyFont::applyInitialValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyCounter::emptyFunction): (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCursor::applyInheritValue): (WebCore::ApplyPropertyCursor::applyInitialValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::applyInheritValue): (WebCore::ApplyPropertyPageSize::applyInitialValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): (WebCore::ApplyPropertyOutlineStyle::applyValue): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyAspectRatio::applyInheritValue): (WebCore::ApplyPropertyAspectRatio::applyInitialValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyZoom::resetEffectiveZoom): (WebCore::ApplyPropertyZoom::applyInheritValue): (WebCore::ApplyPropertyZoom::applyInitialValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyClipPath::applyValue): (WebCore::ApplyPropertyExclusionShape::applyValue): (WebCore::ApplyPropertyImageResolution::applyInheritValue): (WebCore::ApplyPropertyImageResolution::applyInitialValue): (WebCore::ApplyPropertyImageResolution::applyValue): * css/StyleBuilder.h: (WebCore): (PropertyHandler): (WebCore::PropertyHandler::applyInheritValue): (WebCore::PropertyHandler::applyInitialValue): (WebCore::PropertyHandler::applyValue): Replaced StyleResolver* with StyleResolver::State&. * css/StyleResolver.cpp: (WebCore): (WebCore::StyleResolver::StyleResolver): Removed m_styleMap. Now m_styleMap is an on-stack object. (WebCore::StyleResolver::collectMatchingRules): (WebCore::StyleResolver::collectMatchingRulesForRegion): (WebCore::StyleResolver::sortAndTransferMatchedRules): (WebCore::StyleResolver::matchScopedAuthorRules): (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules): (WebCore::StyleResolver::matchHostRules): (WebCore::StyleResolver::matchAuthorRules): (WebCore::StyleResolver::matchUserRules): (WebCore::StyleResolver::matchUARules): (WebCore::StyleResolver::collectMatchingRulesForList): (WebCore::StyleResolver::sortMatchedRules): (WebCore::StyleResolver::matchAllRules): (WebCore::StyleResolver::initElement): (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet): (WebCore::StyleResolver::canShareStyleWithControl): (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes): (WebCore::StyleResolver::canShareStyleWithElement): (WebCore::StyleResolver::findSiblingForStyleSharing): (WebCore::StyleResolver::locateSharedStyle): (WebCore::StyleResolver::styleForElement): (WebCore::StyleResolver::styleForKeyframe): (WebCore::StyleResolver::keyframeStylesForAnimation): (WebCore::StyleResolver::pseudoStyleForElement): (WebCore::StyleResolver::styleForPage): (WebCore::StyleResolver::defaultStyleForElement): (WebCore::StyleResolver::adjustRenderStyle): (WebCore::StyleResolver::updateFont): (WebCore::StyleResolver::pseudoStyleRulesForElement): (WebCore::StyleResolver::ruleMatches): (WebCore::StyleResolver::checkRegionSelector): (WebCore::StyleResolver::applyProperties): (WebCore::StyleResolver::applyMatchedProperties): (WebCore::StyleResolver::isLeftPage): (WebCore::StyleResolver::applyPropertyWithNullCheck): (WebCore::StyleResolver::applyFontPropertyToStyle): (WebCore::StyleResolver::resolveVariables): (WebCore::StyleResolver::applyProperty): (WebCore::StyleResolver::styleImage): (WebCore::StyleResolver::cachedOrPendingFromValue): (WebCore::StyleResolver::generatedOrPendingFromValue): (WebCore::StyleResolver::setOrPendingFromValue): (WebCore::StyleResolver::cursorOrPendingFromValue): (WebCore::StyleResolver::checkForTextSizeAdjust): (WebCore::StyleResolver::checkForZoomChange): (WebCore::StyleResolver::checkForGenericFamilyChange): (WebCore::StyleResolver::initializeFontStyle): (WebCore::StyleResolver::setFontSize): (WebCore::StyleResolver::colorFromPrimitiveValue): (WebCore::StyleResolver::loadPendingSVGDocuments): (WebCore::StyleResolver::styleShader): (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue): (WebCore::StyleResolver::loadPendingShaders): (WebCore::StyleResolver::parseCustomFilterTransformParameter): (WebCore::StyleResolver::parseCustomFilterParameter): (WebCore::StyleResolver::parseCustomFilterParameterList): (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax): (WebCore::StyleResolver::createCustomFilterOperation): (WebCore::StyleResolver::createFilterOperations): (WebCore::StyleResolver::loadPendingImage): (WebCore::StyleResolver::loadPendingImages): (WebCore::StyleResolver::loadPendingResources): Just replaced m_state with state and added one more parameter to provide the state. (WebCore::StyleResolver::reportMemoryUsage): Since m_state was removed, removed a code for reporting m_state's memory usage. * css/StyleResolver.h: (StyleResolver): (WebCore::StyleResolver::isRightPage): (WebCore::StyleResolver::State::State): (WebCore::StyleResolver::State::document): Since State::m_element is not always available (sometimes, 0), added m_document to State and modified to return the m_document. (WebCore::StyleResolver::State::useSVGZoomRules): Moved StyleResolver to State. (State): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setFont): Moved the code, updating a style by using a given StylePropertySet, to StyleResolver. 2013-02-20 Ojan Vafai AutoTableLayout applies min-width redundantly with RenderTable https://bugs.webkit.org/show_bug.cgi?id=110426 Reviewed by Emil A Eklund. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::computePreferredLogicalWidths): This code used to do something, but has since been superceded by code in RenderTable::computePreferredLogicalWidths. 2013-02-20 Dirk Schulze Enable CANVAS_PATH flag https://bugs.webkit.org/show_bug.cgi?id=108508 Uneviewed attempt to fix Qt minimal build. * html/canvas/DOMPath.h: (WebCore::DOMPath::DOMPath): \2013-02-20 Mark Lam Rename DatabaseBackendAsync to DatabaseBackend. https://bugs.webkit.org/show_bug.cgi?id=110422. Reviewed by Geoffrey Garen. This is a purely cosmetic change to make the naming consistent with the front-end Database. No new tests. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/webdatabase/ChangeVersionWrapper.cpp: (WebCore::ChangeVersionWrapper::performPreflight): (WebCore::ChangeVersionWrapper::performPostflight): * Modules/webdatabase/Database.cpp: (WebCore::Database::Database): (WebCore::Database::from): (WebCore::Database::backend): * Modules/webdatabase/Database.h: * Modules/webdatabase/DatabaseBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackendAsync.cpp. (WebCore::DatabaseBackend::DatabaseBackend): (WebCore::DatabaseBackend::openAndVerifyVersion): (WebCore::DatabaseBackend::performOpenAndVerify): (WebCore::DatabaseBackend::close): (WebCore::DatabaseBackend::runTransaction): (WebCore::DatabaseBackend::inProgressTransactionCompleted): (WebCore::DatabaseBackend::scheduleTransaction): (WebCore::DatabaseBackend::scheduleTransactionStep): (WebCore::DatabaseBackend::transactionClient): (WebCore::DatabaseBackend::transactionCoordinator): * Modules/webdatabase/DatabaseBackend.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackendAsync.h. * Modules/webdatabase/DatabaseBackendAsync.cpp: Removed. * Modules/webdatabase/DatabaseBackendAsync.h: Removed. * Modules/webdatabase/DatabaseBackendBase.cpp: (WebCore::DatabaseBackendBase::~DatabaseBackendBase): * Modules/webdatabase/DatabaseManager.cpp: * Modules/webdatabase/DatabaseServer.cpp: * Modules/webdatabase/DatabaseTask.cpp: (WebCore::DatabaseTask::DatabaseTask): (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask): (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask): (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName): (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask): (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask): (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName): (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask): (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask): (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask): (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName): (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask): (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask): (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName): * Modules/webdatabase/DatabaseTask.h: (WebCore::DatabaseTask::database): (DatabaseTask): (WebCore::DatabaseBackend::DatabaseOpenTask::create): (DatabaseBackend::DatabaseOpenTask): (WebCore::DatabaseBackend::DatabaseCloseTask::create): (DatabaseBackend::DatabaseCloseTask): (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): (DatabaseBackend::DatabaseTableNamesTask): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::recordDatabaseOpen): (WebCore::DatabaseThread::recordDatabaseClosed): (WebCore::SameDatabasePredicate::SameDatabasePredicate): (SameDatabasePredicate): (WebCore::DatabaseThread::unscheduleDatabaseTasks): * Modules/webdatabase/DatabaseThread.h: * Modules/webdatabase/SQLStatementBackend.cpp: (WebCore::SQLStatementBackend::execute): (WebCore::SQLStatementBackend::setDatabaseDeletedError): (WebCore::SQLStatementBackend::setVersionMismatchedError): (WebCore::SQLStatementBackend::setFailureDueToQuota): * Modules/webdatabase/SQLStatementBackend.h: * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::create): (WebCore::SQLTransactionBackend::SQLTransactionBackend): * Modules/webdatabase/SQLTransactionBackend.h: (WebCore::SQLTransactionBackend::database): * Modules/webdatabase/SQLTransactionCoordinator.cpp: (WebCore::getDatabaseIdentifier): * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: 2013-02-20 David Kilzer Upstream SharedTimerIOS.mm Reviewed by Benjamin Poulain. * Configurations/WebCore.xcconfig: (EXCLUDED_SOURCE_FILE_NAMES_iphoneos): Add SharedTimerMac.mm. * WebCore.xcodeproj/project.pbxproj: Add SharedTimerIOS.mm. * platform/ios/SharedTimerIOS.mm: Add. (WebCore): (-[WebCoreResumeNotifierIOS init]): (-[WebCoreResumeNotifierIOS dealloc]): (-[WebCoreResumeNotifierIOS didWake]): (WebCore::setSharedTimerFiredFunction): (WebCore::timerFired): (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): 2013-02-20 Ojan Vafai Speculative fix for EFL and Windows compilers not realizing that all possible cases have a return value from this switch. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): 2013-02-20 David Hyatt [New Multicolumn] Fix overflow computation for column blocks. https://bugs.webkit.org/show_bug.cgi?id=110392. Reviewed by Simon Fraser. * rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild): Exclude in-flow RenderFlowThreads from overflow propagation. * rendering/RenderMultiColumnSet.h: * rendering/RenderRegion.h: (WebCore::RenderRegion::shouldHaveAutoLogicalHeight): * rendering/RenderRegionSet.h: (RenderRegionSet): Override shouldHaveAutoLogicalHeight to always be false for region sets and for columns. Eventually we're going to try to leverage this code to do column balancing, and that's why RenderMultiColumnSet has a unique override. 2013-02-20 Brandon Jones Printing WebGL canvases in Chrome uses stale data after first print https://bugs.webkit.org/show_bug.cgi?id=110003 Reviewed by Kenneth Russell. Unable to validate printed content automatically. No regression in existing WebGL tests. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): 2013-02-20 Christian Biesinger Incorrect rendering for flex boxes with percentage height in a table cell https://bugs.webkit.org/show_bug.cgi?id=110389 Reviewed by Tony Chang. Tests: css3/flexbox/flex-percentage-height-in-table-standards-mode.html css3/flexbox/flex-percentage-height-in-table.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Always update the logical height of the flex box, not just when it is auto. If necessary, the later updateLogicalHeight() call will adjust it. 2013-02-20 Philip Rogers Account for transform in SVG background images https://bugs.webkit.org/show_bug.cgi?id=110295 Reviewed by Dirk Schulze. Tiled SVG background images are rendererd by drawing the SVG content into a temporary image buffer, then stamping out a tiled pattern using this buffer. Previously the image buffer did not account for CSS transforms which could result in pixelated backgrounds. This patch takes advantage of the context's transform when sizing the temporary tiling image buffer. Because the context's transform also includes scale, this patch simplifies the SVG image code to no longer track scale. Test: svg/as-background-image/svg-transformed-background.html * loader/cache/CachedImage.cpp: (WebCore): (WebCore::CachedImage::imageForRenderer): CachedImage::lookupOrCreateImageForRenderer no longer creates images so it has been refactored into just "imageForRenderer". Previously there were two versions of lookupOrCreateImageForRenderer; these have been folded into imageForRenderer. * loader/cache/CachedImage.h: * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawPatternForContainer): To create the temporary tiling image buffer, the final size in screen coordinates is needed. This is now computed using the current context's CTM. Because the CTM already includes the page scale, all page scale tracking can be removed. The adjustments to srcRect and the pattern transform are the same as before, just refactored to use imageBufferScale which has x and y components. * svg/graphics/SVGImage.h: * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::setContainerSizeForRenderer): Because the page scale needed to be cached between calls to setContainerSizeForRenderer, this function was written to modify an existing cache entry. Because the page scale no longer needs to be tracked, this code has been simplified to re-write any existing cache entry. (WebCore::SVGImageCache::imageSizeForRenderer): This function has been simplified by calling SVGImageForContainer::size() instead of computing this value manually. The value returned remains the same, containing the container size multiplied by zoom. (WebCore::SVGImageCache::imageForRenderer): Previously we set the page scale on every call to imageForRenderer. Because page scale no longer needs to be tracked, this function has been simplified to simply return the cached SVGImageForContainer. * svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::drawPattern): * svg/graphics/SVGImageForContainer.h: (WebCore::SVGImageForContainer::create): (WebCore::SVGImageForContainer::SVGImageForContainer): (SVGImageForContainer): 2013-02-20 Jer Noble Crash in com.apple.WebKit2.WebProcessService at com.apple.avfoundation: __73-[AVAssetResourceLoader _attemptDelegateHandlingOfRequestWithDictionary:]_block_invoke + 51 https://bugs.webkit.org/show_bug.cgi?id=110385 Reviewed by Eric Carlson. Ensure AVFoundation does not attempt to message a dead object by explicitly disassociating the AVAssetResourceLoaderDelegate on MediaPlayerPrivateAVFoundationObjC destruction. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): 2013-02-20 Ojan Vafai Positioned, replaced elements with intrinsic width keywords compute the wrong width https://bugs.webkit.org/show_bug.cgi?id=110393 Reviewed by Emil A Eklund. Test: fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): Add the intrinsic size keywords to the switch. Confusingly, we have to subtract the border and padding since the callers expect the content width. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): Don't do the intrinsic ratio calculation if the width is an intrinsic width keyword, as per, http://dev.w3.org/csswg/css3-sizing/#replaced-intrinsic. (WebCore::RenderReplaced::computeIntrinsicLogicalWidths): (WebCore::RenderReplaced::computePreferredLogicalWidths): The old code was trying to apply the intrinsic ratio calculation to the intrinsic width, which is wrong per spec. 2013-02-20 Alec Flett LevelDB: Remove excess vector copy https://bugs.webkit.org/show_bug.cgi?id=110399 Reviewed by Tony Chang. Remove an extra copy introduced by the makeVector function. No new tests, this is covered by existing tests. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::safeGet): 2013-02-20 Simon Fraser Zoomed, slow-scrolling pages keep recreating tiles when scrolled https://bugs.webkit.org/show_bug.cgi?id=110379 Reviewed by Tim Horton. On slow-scrolling pages the TileCache makes the tiles the size of the visible rect to minimize per-tile painting overhead. If the size of that rect changes, the TileCache re-creates all the tiles. This was a problem whem zoomed, because mapping the visible rect through the scale transform and then rounding it would cause the size to keep changing, causing lots of tile re-creation. Fix by carrying the visibleRect around as a FloatRect, and doing the same for the exposedRect. We then only expand to integers when computing the tile size. This also fixes an issue where we could sometimes make extra tiles because of fractional bits of tiles at the edges, as shown by the test result change. * platform/graphics/TiledBacking.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateVisibleRect): * platform/graphics/ca/mac/TileCache.h: * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setVisibleRect): (WebCore::TileCache::setExposedRect): (WebCore::TileCache::prepopulateRect): (WebCore::TileCache::computeTileCoverageRect): (WebCore::TileCache::tileSizeForCoverageRect): (WebCore::TileCache::blankPixelCountForTiles): (WebCore::TileCache::revalidateTiles): (WebCore::TileCache::ensureTilesForRect): * platform/graphics/ca/mac/WebTileLayer.mm: (-[WebTileLayer logFilledFreshTile]): 2013-02-20 Julien Chaffraix [CSS Grid Layout] Implement the auto-placement algorithm without grid growth https://bugs.webkit.org/show_bug.cgi?id=110277 Reviewed by Tony Chang. Tests: fast/css-grid-layout/grid-item-addition-auto-placement-update.html fast/css-grid-layout/grid-item-removal-auto-placement-update.html fast/css-grid-layout/grid-auto-flow-resolution.html (extended to cover more cases) This change implements most of the auto-placement algorithm per http://dev.w3.org/csswg/css3-grid-layout/#auto-placement-algo To limit the size of the code change, it doesn't implement growing the grid if there are no empty grid areas. If we don't find any empty grid areas, we just insert in the first one, like what grid-auto-flow: none would do (which explains the test failures). * rendering/RenderGrid.cpp: (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Added this function to return the GridCoordinate of the next empty grid area along the iterator's direction. (WebCore::RenderGrid::placeItemsOnGrid): Split this function into the different steps below. For efficiency, collect the auto vs specified major axis grid items in different Vectors. (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Added this function that implements part of step 1 of the algorithm (the grid items without auto row / column are already handled in placeItemsOnGrid). (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Added this function that iterates over the auto grid items and call placeAutoMajorAxisItemOnGrid. (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Added this method to handle the step 4 of the algorithm. Based on the minor axis's position, it either walks along the major axis once or several times until it finds an empty grid area for the grid item. (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild): (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild): (WebCore::RenderGrid::autoPlacementMajorAxisDirection): (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Added these helper functions that return minor / major axis positions & direction. * rendering/RenderGrid.h: Added the previous new RenderGrid functions. 2013-02-20 Vincent Scheib Accept 'allowfullscreen' in addition to 'webkitallowfullscreen'. https://bugs.webkit.org/show_bug.cgi?id=110374 Reviewed by Adam Barth. The fullscreen API also includes a new HTML attribute for iframes which permits its use. That attribute, 'allowfullcreen' is now included in the HTML specification [1] and is stable enough to remove the webkit prefix. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-allowfullscreen Tests: fullscreen/full-screen-enabled-prefixed.html fullscreen/full-screen-iframe-allowed-prefixed.html fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html * dom/Document.cpp: (WebCore::isAttributeOnAllOwners): (WebCore::Document::fullScreenIsAllowedForElement): (WebCore::Document::webkitFullscreenEnabled): * html/HTMLAttributeNames.in: 2013-02-20 Roger Fong Unreviewed. Remove references to SAFARI_THEME from Windows Solution. * config.h: * page/Settings.cpp: * page/Settings.h: * platform/win/ScrollbarThemeWin.cpp: * rendering/RenderThemeWin.cpp: 2013-02-20 Roger Fong Get VS2010 Solution B&I ready. Rubberstamped by Timothy Horton. Add Production configuration. Add a WebCore submit solution with a DebugSuffix configuration. Modify WebCore.make as necessary. * DerivedSources.make: * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props: * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props: Added. * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props: * WebCore.vcxproj/WebCore.make: Added. * WebCore.vcxproj/WebCore.sln: Removed. * WebCore.vcxproj/WebCore.submit.sln: Copied from Source/WebCore/WebCore.vcxproj/WebCore.sln. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCoreGenerated.vcxproj: * WebCore.vcxproj/WebCoreGeneratedProduction.props: Added. * WebCore.vcxproj/WebCoreGeneratedRelease.props: * WebCore.vcxproj/WebCoreProduction.props: Added. * WebCore.vcxproj/WebCoreRelease.props: * WebCore.vcxproj/WebCoreTestSupport.vcxproj: 2013-02-20 Adam Klein [v8] Fix an erroneous WrapperGrouper call in preparation for refactoring https://bugs.webkit.org/show_bug.cgi?id=110396 Reviewed by Kentaro Hara. This is in preparation for a refactor to expose a simplified WrapperGrouper interface to V8 wrapper classes enabling them to specify multiple roots per wrapper object. * bindings/v8/V8GCController.cpp: Since MutationObservers are not Nodes, the correct call here is addObjectToGroup, as it is for all other non-Node wrappers. 2013-02-20 Levi Weintraub Line layout (but not pref widths) double-counts word spacing when between inlines https://bugs.webkit.org/show_bug.cgi?id=110381 Reviewed by Emil A Eklund. When a word break with a space occurs between inlines and word-spacing is non-zero, line layout incorrectly committed the word-spacing value to the line twice, causing wrapping in inline-blocks. To fix this, clear the word-spacing value when between words and ignoring spaces, as we will already have added the word-spacing to the line. Test: fast/text/word-space-between-inlines.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): 2013-02-20 Nate Chapin Crash in WebCore::FrameLoader::checkCompleted() https://bugs.webkit.org/show_bug.cgi?id=110237 Reviewed by Abhishek Arya. Test: http/tests/misc/delete-frame-during-readystatechange.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkCompleted): Protect before setReadyState() is called. 2013-02-20 David Grogan IndexedDB: Limit LevelDB's max open files https://bugs.webkit.org/show_bug.cgi?id=109993 Reviewed by Tony Chang. LevelDB keeps up to 1000 (by default) data files open at a time to avoid having to open() them. This has caused chromium to hit the process-wide open file limit. This patch changes max_open_files to 20, as that's the minimum permitted by LevelDB and we have no reason to think that performance will suffer because of the extra open calls. No new tests - a chromium browser test that tracks the open LevelDB files is plausible but is blocked on http://crbug.com/177249/. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::openDB): 2013-02-20 David Hyatt [New Multicolumn] Resize RenderMultiColumnSets around their columns. https://bugs.webkit.org/show_bug.cgi?id=110378. Reviewed by Dirk Schulze. Test: fast/multicol/newmulticol/positioned-with-constrained-height.html. * rendering/RenderBlock.h: (RenderBlock): Make computeOverflow public so that RenderMultiColumnFlowThread can access it. * rendering/RenderMultiColumnFlowThread.cpp: (WebCore::RenderMultiColumnFlowThread::layout): Subclass layout to recompute the overflow for RenderMultiColumnBlock after the flow thread has finished layout. This way it can account for changes in RenderMultiColumnSets without having to do a second layout pass. * rendering/RenderMultiColumnFlowThread.h: (RenderMultiColumnFlowThread): Override layout(). * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::columnCount): Clean up a comment that referred to portions as region rects still. (WebCore::RenderMultiColumnSet::setFlowThreadPortionRect): * rendering/RenderMultiColumnSet.h: * rendering/RenderRegion.h: (WebCore::RenderRegion::setFlowThreadPortionRect): Make setFlowThreadPortionRect virtual and actually mutate the size and position of RenderMultiColumnSets so that they enclose their column rects. 2013-02-20 Dirk Schulze Enable CANVAS_PATH flag https://bugs.webkit.org/show_bug.cgi?id=108508 Reviewed by Simon Fraser. Enable CANVAS_PATH flag on trunk. Existing tests cover the feature. * Configurations/FeatureDefines.xcconfig: 2013-02-20 Sheriff Bot Unreviewed, rolling out r143441. http://trac.webkit.org/changeset/143441 https://bugs.webkit.org/show_bug.cgi?id=110376 May be causing chromium content_browsertests failures. (Requested by vollick on #webkit). * bindings/v8/ScriptValue.cpp: (WebCore::ScriptValue::serialize): (WebCore::ScriptValue::getString): (WebCore::ScriptValue::toString): (WebCore::ScriptValue::toInspectorValue): * bindings/v8/ScriptValue.h: (WebCore::ScriptValue::ScriptValue): (WebCore::ScriptValue::operator=): (WebCore::ScriptValue::operator==): (WebCore::ScriptValue::isEqual): (WebCore::ScriptValue::isFunction): (WebCore::ScriptValue::isNull): (WebCore::ScriptValue::isUndefined): (WebCore::ScriptValue::isObject): (WebCore::ScriptValue::hasNoValue): (WebCore::ScriptValue::clear): (WebCore::ScriptValue::v8Value): (ScriptValue): * bindings/v8/SharedPersistent.h: (WebCore): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::scriptValueAsNode): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAttrGetterCustom): 2013-02-15 Dirk Schulze [Chromium] Add runtime flag for CanvasPath https://bugs.webkit.org/show_bug.cgi?id=109997 Reviewed by Adam Barth. Add runtime flag for Chromium. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled): (WebCore::RuntimeEnabledFeatures::canvasPathEnabled): * html/canvas/DOMPath.idl: * page/DOMWindow.idl: 2013-02-20 Laszlo Gombos Remove unnecessary includes for Platform.h from headers https://bugs.webkit.org/show_bug.cgi?id=110300 Reviewed by Alexey Proskuryakov. wtf/Platform.h only need to be included in a few places directly as it is included in config.h. Remove the unnecessay duplicate as it can be confusing. No new tests, no change in functionality. * platform/SecureTextInput.h: * platform/audio/Biquad.h: * platform/audio/FFTFrame.h: * platform/graphics/cpu/arm/filters/FEBlendNEON.h: * platform/graphics/cpu/arm/filters/NEONHelpers.h: * platform/graphics/filters/FELighting.h: 2013-02-20 Florin Malita [SVG] Update of element referenced by multiple 'use' nodes is absurdly slow https://bugs.webkit.org/show_bug.cgi?id=97905 Reviewed by Dirk Schulze. Rebuilding the shadow and instance trees of dependent use nodes recursively can be extremely inefficient with non-trivial dependency graphs (the trees are not constructed in topological order). To avoid redundant buildShadowAndInstanceTree() invokations, separate the invalidation phase from the actual tree (re)building phase, and only descend into the dependency DAG during the invalidation phase (recursion also stops at nodes that have been previously invalidated). No new tests: functional coverage provided by existing tests, perfomance tracked by PerformanceTests/SVG/SvgNestedUse.html. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::buildShadowAndInstanceTree): (WebCore::SVGUseElement::invalidateShadowTree): (WebCore): (WebCore::SVGUseElement::invalidateDependentShadowTrees): * svg/SVGUseElement.h: (SVGUseElement): 2013-02-20 Tim Horton RenderLayerBacking should initialize TiledBacking's isInWindow state with Page's isInWindow, not isOnscreen https://bugs.webkit.org/show_bug.cgi?id=110370 Reviewed by Simon Fraser. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): 2013-02-20 Mark Lam Cleanup the SQLTransaction and SQLTransactionBackend state dispatch to only honor a state transition request if the associated database hasn't been interrupted. https://bugs.webkit.org/show_bug.cgi?id=110247. Reviewed by Antti Koivisto. No new tests. * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::performPendingCallback): (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded): * Modules/webdatabase/SQLTransaction.h: * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded): (WebCore::SQLTransactionBackend::performNextStep): * Modules/webdatabase/SQLTransactionBackend.h: 2013-02-20 Alexey Proskuryakov ResourceHandle::loadResourceSynchronously should have blob support in cross-platform code https://bugs.webkit.org/show_bug.cgi?id=110364 Reviewed by Anders Carlsson. * platform/network/ResourceHandle.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): Added a cross-platform version to keep blob-related logic in one place. * platform/network/blackberry/ResourceHandleBlackBerry.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/qt/ResourceHandleQt.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/win/ResourceHandleWin.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): Renamed loadResourceSynchronously to platformLoadResourceSynchronously, removed blob handling from platforms that had it. 2013-02-20 David Hyatt [New Multicolumn] RenderMultiColumnFlowThreads should establish a BFC. https://bugs.webkit.org/show_bug.cgi?id=110366. Reviewed by Antti Koivisto. RenderFlowThreads should establish a block formatting context always. CSS Regions have named flow thread that they absolutely position, and so they got this for free by being absolutely positioned. RenderMultiColumnFlowThreads, however, are relative positioned, so we need to just add an isRenderFlowThread case specifically so we're not dependent on the positioning scheme used for the flow thread to establish the BFC. Test: fast/multicol/newmulticol/float-*.html. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): 2013-02-20 David Hyatt [New Multicolumn] Column gap is computed incorrectly. https://bugs.webkit.org/show_bug.cgi?id=110360. Reviewed by Simon Fraser. Test: fast/multicol/newmulticol/layers-split-across-columns.html. * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::columnGap): Make sure we ask the RenderMultiColumnBlock for the gap rather than our own style, since we don't actually have the gap value in our style. (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect): * rendering/RenderMultiColumnSet.h: Fix another spot where the columnGap was an int. It should be a LayoutUnit. 2013-02-20 Robert Hogan No caret on empty contenteditable element with negative text-indent https://bugs.webkit.org/show_bug.cgi?id=108633 Reviewed by Ryosuke Niwa. Test: fast/repaint/paint-caret-in-div-with-negative-indent.html When an editable element has a negative text indent we won't paint the caret when the element is empty because it falls outside the element's border box. To ensure the caret is painted, account for any negative indent with our overflow. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeOverflow): 2013-02-20 Ojan Vafai Remove stretchesToMinIntrinsicLogicalWidth https://bugs.webkit.org/show_bug.cgi?id=110266 Reviewed by Emil Eklund. This was only used by fieldsets and now we have a way to express this concept in CSS. * WebCore.order: * css/html.css: Make fieldsets min-width: -webkit-min-content. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computePositionedLogicalWidth): * rendering/RenderBox.h: Remove all calls to stretchesToMinIntrinsicLogicalWidth. 2013-02-20 Ojan Vafai Make intrinsic width values work for positioned elements https://bugs.webkit.org/show_bug.cgi?id=110264 Reviewed by Tony Chang. Tests: fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html fast/css-intrinsic-dimensions/width-shrinks-avoid-floats.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): Move the computation of intrinsic widths out into a helper function so that computePositionedLogicalWidthUsing can use it. As per the current spec, fill-available measures shrink to avoid floats. http://dev.w3.org/csswg/css3-sizing/ (WebCore::RenderBox::computePositionedLogicalWidth): Compute intrinsic min-widths in addition to non-zero ones. Intrinsic widths return true for isZero. width and max-width don't need modifying since they already call computePositionedLogicalWidthUsing for intrinsic widths. (WebCore::RenderBox::computePositionedLogicalWidthUsing): Compute intrinsic widths and use a Fixed length for the rest of the positioned width computation. Doesn't include bordersPlusPadding because the caller, expected the content width and adds in the bordersPlusPadding later. * rendering/RenderBox.h: 2013-02-20 Robert Hogan input element with placeholder text and width set to 100% on focus causes overflow even after losing focus https://bugs.webkit.org/show_bug.cgi?id=109020 Reviewed by David Hyatt. Tests: fast/forms/input-placeholder-layout-view.html fast/forms/textarea-placeholder-layout-view.html Placeholder elements don't affect layout so shouldn't contribute overflow either. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): 2013-02-20 Mark Lam Rename DatabaseBackend to DatabaseBackendBase. https://bugs.webkit.org/show_bug.cgi?id=110303. Rubber stamped by Alexey Proskuryakov. This is a purely cosmetic change to make the naming consistent with the front-end DatabaseBase. No new tests. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/webdatabase/AbstractDatabaseServer.h: * Modules/webdatabase/Database.cpp: (WebCore::Database::create): (WebCore::Database::version): * Modules/webdatabase/Database.h: (Database): * Modules/webdatabase/DatabaseBackend.cpp: Removed. * Modules/webdatabase/DatabaseBackend.h: Removed. * Modules/webdatabase/DatabaseBackendAsync.cpp: (WebCore::DatabaseBackendAsync::DatabaseBackendAsync): (WebCore::DatabaseBackendAsync::performOpenAndVerify): * Modules/webdatabase/DatabaseBackendAsync.h: * Modules/webdatabase/DatabaseBackendBase.cpp: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackend.cpp. (WebCore::DatabaseBackendBase::databaseInfoTableName): (WebCore::DatabaseBackendBase::DatabaseBackendBase): (WebCore::DatabaseBackendBase::~DatabaseBackendBase): (WebCore::DatabaseBackendBase::closeDatabase): (WebCore::DatabaseBackendBase::version): (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller): (DoneCreatingDatabaseOnExitCaller): (WebCore::DatabaseBackendBase::performOpenAndVerify): (WebCore::DatabaseBackendBase::securityOrigin): (WebCore::DatabaseBackendBase::stringIdentifier): (WebCore::DatabaseBackendBase::displayName): (WebCore::DatabaseBackendBase::estimatedSize): (WebCore::DatabaseBackendBase::fileName): (WebCore::DatabaseBackendBase::details): (WebCore::DatabaseBackendBase::getVersionFromDatabase): (WebCore::DatabaseBackendBase::setVersionInDatabase): (WebCore::DatabaseBackendBase::setExpectedVersion): (WebCore::DatabaseBackendBase::getCachedVersion): (WebCore::DatabaseBackendBase::setCachedVersion): (WebCore::DatabaseBackendBase::getActualVersionForTransaction): (WebCore::DatabaseBackendBase::disableAuthorizer): (WebCore::DatabaseBackendBase::enableAuthorizer): (WebCore::DatabaseBackendBase::setAuthorizerReadOnly): (WebCore::DatabaseBackendBase::setAuthorizerPermissions): (WebCore::DatabaseBackendBase::lastActionChangedDatabase): (WebCore::DatabaseBackendBase::lastActionWasInsert): (WebCore::DatabaseBackendBase::resetDeletes): (WebCore::DatabaseBackendBase::hadDeletes): (WebCore::DatabaseBackendBase::resetAuthorizer): (WebCore::DatabaseBackendBase::maximumSize): (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded): (WebCore::DatabaseBackendBase::interrupt): (WebCore::DatabaseBackendBase::isInterrupted): (WebCore::DatabaseBackendBase::reportOpenDatabaseResult): (WebCore::DatabaseBackendBase::reportChangeVersionResult): (WebCore::DatabaseBackendBase::reportStartTransactionResult): (WebCore::DatabaseBackendBase::reportCommitTransactionResult): (WebCore::DatabaseBackendBase::reportExecuteStatementResult): (WebCore::DatabaseBackendBase::reportVacuumDatabaseResult): * Modules/webdatabase/DatabaseBackendBase.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackend.h. (DatabaseBackendBase): * Modules/webdatabase/DatabaseBackendSync.cpp: (WebCore::DatabaseBackendSync::DatabaseBackendSync): * Modules/webdatabase/DatabaseBackendSync.h: * Modules/webdatabase/DatabaseBase.h: * Modules/webdatabase/DatabaseManager.cpp: (WebCore::DatabaseManager::openDatabaseBackend): (WebCore::DatabaseManager::openDatabase): (WebCore::DatabaseManager::openDatabaseSync): (WebCore::DatabaseManager::getMaxSizeForDatabase): * Modules/webdatabase/DatabaseManager.h: (DatabaseManager): * Modules/webdatabase/DatabaseServer.cpp: (WebCore::DatabaseServer::openDatabase): (WebCore::DatabaseServer::createDatabase): (WebCore::DatabaseServer::getMaxSizeForDatabase): * Modules/webdatabase/DatabaseServer.h: * Modules/webdatabase/DatabaseSync.cpp: (WebCore::DatabaseSync::create): * Modules/webdatabase/DatabaseSync.h: (DatabaseSync): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::getMaxSizeForDatabase): (WebCore::DatabaseTracker::databaseChanged): (WebCore::DatabaseTracker::interruptAllDatabasesForContext): (WebCore::DatabaseTracker::doneCreatingDatabase): (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::removeOpenDatabase): (WebCore::DatabaseTracker::getOpenDatabases): (WebCore::DatabaseTracker::deleteDatabaseFile): * Modules/webdatabase/DatabaseTracker.h: (DatabaseTracker): * Modules/webdatabase/OriginQuotaManager.cpp: (WebCore::OriginQuotaManager::markDatabase): * Modules/webdatabase/OriginQuotaManager.h: (OriginQuotaManager): * Modules/webdatabase/SQLTransactionClient.cpp: (WebCore::SQLTransactionClient::didCommitWriteTransaction): (WebCore::SQLTransactionClient::didExecuteStatement): (WebCore::SQLTransactionClient::didExceedQuota): * Modules/webdatabase/SQLTransactionClient.h: (SQLTransactionClient): * Modules/webdatabase/chromium/DatabaseObserver.h: (DatabaseObserver): * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::NotifyDatabaseObserverOnCloseTask::create): (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask): (NotifyDatabaseObserverOnCloseTask): (WebCore::DatabaseTracker::removeOpenDatabase): (WebCore::DatabaseTracker::prepareToOpenDatabase): (WebCore::DatabaseTracker::failedToOpenDatabase): (WebCore::DatabaseTracker::getMaxSizeForDatabase): (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::create): (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::CloseOneDatabaseImmediatelyTask): (DatabaseTracker::CloseOneDatabaseImmediatelyTask): (WebCore::DatabaseTracker::closeOneDatabaseImmediately): * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp: (WebCore::NotifyDatabaseChangedTask::create): (WebCore::NotifyDatabaseChangedTask::NotifyDatabaseChangedTask): (NotifyDatabaseChangedTask): (WebCore::SQLTransactionClient::didCommitWriteTransaction): (WebCore::SQLTransactionClient::didExecuteStatement): (WebCore::SQLTransactionClient::didExceedQuota): * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: 2013-02-20 Eric Carlson iOS does not use CaptionUserPreferencesMac https://bugs.webkit.org/show_bug.cgi?id=110259 Reviewed by Dean Jackson. * page/CaptionUserPreferencesMac.h: Add PLATFORM(IOS) guard * page/CaptionUserPreferencesMac.mm: Ditto. * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferences): Ditto. 2013-02-19 David Hyatt [New Multicolumn] Make layers paint properly in columns. https://bugs.webkit.org/show_bug.cgi?id=110296. Reviewed by Sam Weinig. Construct the style for the RenderMultiColumnFlowThread such that it establishes a stacking context (by being position:relative with a z-index of 0). This causes the layer collection code to correctly ignore the RenderFlowThread layers during normal painting. Fix more clipping bugs to eliminate subpixel layout differences between old and new multicolumn. Test: fast/multicol/newmulticol/layers-in-multicol.html * rendering/RenderMultiColumnBlock.cpp: (WebCore::createMultiColumnFlowThreadStyle): (WebCore): (WebCore::RenderMultiColumnBlock::addChild): Use a custom style (similar to what normal RenderFlowThreads do) for the RenderMultiColumnFlowThread that makes it a stacking context. * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect): Fix the overflow calculations out the leftmost and rightmost columns to actually look at the physical placement of the columns. The old code was backwards for RTL. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Fix the clipping done by overflowRectForFlowThreadPortion to min and max with the passed-in portion rect so that subclasses that inflate the rect prior to passing it into the method don't have that inflation discarded. 2013-02-20 Alexander Pavlov Web Inspector: CSSProperty.status defaults to "style" not "active" https://bugs.webkit.org/show_bug.cgi?id=110348 Reviewed by Timothy Hatcher. * inspector/Inspector.json: Fix the default property status to be "style" in the description. 2013-02-20 Dan Carney [v8] potentially disposed handle returned for npapi object https://bugs.webkit.org/show_bug.cgi?id=110331 Reviewed by Kentaro Hara. No new tests. No change in functionality. * bindings/v8/V8NPUtils.cpp: (WebCore::convertNPVariantToV8Object): 2013-02-20 Xabier Rodriguez Calvar and Martin Robinson [Gtk] HTML5 Media controls require a design refresh https://bugs.webkit.org/show_bug.cgi?id=83869 Created new controls that depend less on Gtk and more in CSS. Reviewed by Philippe Normand. * GNUmakefile.list.am: Added compilation for MediaControlsGtk.cpp and MediaControlsGtk.h * css/mediaControlsGtk.css: Taken from Chromium and adapted for WebKitGtk+. * html/shadow/MediaControlsGtk.cpp: Added. (WebCore): Added MediaControlsGtk class. (WebCore::MediaControlsGtk::MediaControlsGtk): Class constructor (WebCore::MediaControls::create): Creates the Gtk+ controls components. (WebCore::MediaControlsGtk::createControls): Creates the Gtk+ controls components. (WebCore::MediaControlsGtk::initializeControls): Initializes all media controls. (WebCore::MediaControlsGtk::setMediaController): Sets the media controller. (WebCore::MediaControlsGtk::reset): Resets the controllers. (WebCore::MediaControlsGtk::playbackStarted): Invoked when the playback starts (WebCore::MediaControlsGtk::updateCurrentTimeDisplay): Updates the controls when the current time shall be updated. (WebCore::MediaControlsGtk::changedMute): Updates the controls then the mute changes. (WebCore::MediaControlsGtk::showVolumeSlider): Invoked when the volume slider is meant to be shown. (WebCore::MediaControlsGtk::createTextTrackDisplay): Creates the track display. Though it is not used by us, it needs to be created to prevent immediate crashes when loading a video. * html/shadow/MediaControlsGtk.h: Added. (WebCore): Added the MediaControlsGtk class. (MediaControlsGtk): Added the MediaControlsGtk class. * platform/gtk/RenderThemeGtk.cpp: (WebCore): Added getStockSymbolicIconForWidgetType function signature to load symbolic icons. (WebCore::supportsFocus): Added media control widgets to support focus so that the focus ring is not painted by WebCore. (WebCore::RenderThemeGtk::paintMediaButton): Added the symbolic icon support. It supports now normal and symbolic icons at the same time. (WebCore::RenderThemeGtk::paintMediaFullscreenButton): Added the symbolic icon support. (WebCore::RenderThemeGtk::paintMediaMuteButton): Added the symbolic icon support. (WebCore::RenderThemeGtk::paintMediaPlayButton): Added the symbolic icon support. (WebCore::RenderThemeGtk::paintMediaSeekBackButton): Added the symbolic icon support. (WebCore::RenderThemeGtk::paintMediaSeekForwardButton): Added the symbolic icon support. (WebCore::borderRadiiFromStyle): Created the radii info from the style. (WebCore::RenderThemeGtk::paintMediaSliderTrack): Removed the background and the Gtk widget support as it is painted with CSS. Also paint the time ranges with the CSS style. (WebCore::RenderThemeGtk::paintMediaSliderThumb): Paint slider thumb according to the CSS parameters. (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Delegates in the CSS. (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Fills the track up to the volume level and delegates the border in the CSS. (WebCore::RenderThemeGtk::paintMediaVolumeSliderThumb): Delegates in the paintMediaSliderThumb method so the thumb is painted the same with the CSS parameters. (WebCore::RenderThemeGtk::paintMediaCurrentTime): Removed the Gtk background to use only CSS. * platform/gtk/RenderThemeGtk.h: (RenderThemeGtk): Changed paintMediaButton to support the symbolic and normal icons at the same time. * platform/gtk/RenderThemeGtk2.cpp: (WebCore::RenderThemeGtk::adjustSliderThumbSize): Not adjusting the thumb size and letting the CSS decide that for media slider. (WebCore::getStockSymbolicIconForWidgetType): Implemented as a fallback to the normal stock icons. * platform/gtk/RenderThemeGtk3.cpp: (WebCore): (WebCore::RenderThemeGtk::adjustSliderThumbSize): Not adjusting the thumb size and letting the CSS decide that for the media sliders. (WebCore::getStockSymbolicIconForWidgetType): Added this function to load symbolic icons. It falls back to normal icons if the symbolic is not found. 2013-02-20 Andras Becsi [Qt] Rename AncestorChainWalker.h to EventPathWalker.h in the project file. Unreviewed gardening. AncestorChainWalker has been renamed to EventPathWalker in r143422. Rename the header in the project file as well so that it shows up in QtCreator. No new tests needed. * Target.pri: 2013-02-20 Ilya Tikhonovsky Web Inspector: fix for frontend closure compile errors. https://bugs.webkit.org/show_bug.cgi?id=110329 Reviewed by Vsevolod Vlasov. It has no tests because it has no code changes. * inspector/front-end/HeapSnapshot.js: (HeapSnapshotMetainfo): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot): (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked): 2013-02-20 Florin Malita Clear SVGPathSeg role on removal. https://bugs.webkit.org/show_bug.cgi?id=110058 Reviewed by Dirk Schulze. SVGPathSegListPropertyTearOff::initialize() and SVGPathSegListPropertyTearOff::replaceItem() need to clear the context and role for segments being expunged from the list, similarly to removeItem(). Otherwise, processIncomingListItemValue() can get confused and attempt to remove stale segments. Test: svg/dom/SVGPathSegList-crash.html * svg/properties/SVGPathSegListPropertyTearOff.cpp: (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles): (WebCore::SVGPathSegListPropertyTearOff::clear): (WebCore::SVGPathSegListPropertyTearOff::replaceItem): (WebCore): * svg/properties/SVGPathSegListPropertyTearOff.h: (WebCore::SVGPathSegListPropertyTearOff::initialize): (SVGPathSegListPropertyTearOff): 2013-02-20 Sheriff Bot Unreviewed, rolling out r143434. http://trac.webkit.org/changeset/143434 https://bugs.webkit.org/show_bug.cgi?id=110326 added reftest fails on chromium mac 10.6 (Requested by toyoshim on #webkit). * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): 2013-02-19 Vsevolod Vlasov Web Inspector: Make UISourceCode.path() an array of path segments. https://bugs.webkit.org/show_bug.cgi?id=110229 Reviewed by Pavel Feldman. * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath): (WebInspector.FileSystemProjectDelegate.prototype.innerCallback): (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent): (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath): (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded): (WebInspector.FileSystemProjectDelegate.prototype.populate): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleProjectDelegate.prototype.requestFileContent): (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent): (WebInspector.SimpleProjectDelegate.prototype.addFile): (WebInspector.SimpleProjectDelegate.prototype._ensureUniquePath): (WebInspector.SimpleProjectDelegate.prototype.removeFile): (WebInspector.SimpleWorkspaceProvider.pathForSplittedURL): (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName): (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.uri): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype._fileRemoved): (WebInspector.Project.prototype.uiSourceCode): (WebInspector.Workspace.prototype.uiSourceCodeForURL): (WebInspector.Workspace.prototype.urlForPath): 2013-02-20 Yury Semikhatsky Web Inspector: fix message for non-existent domain warning https://bugs.webkit.org/show_bug.cgi?id=110315 Reviewed by Alexander Pavlov. Only send (Heap)Profiler.resetProfiles event if the client has requested profile headers before. * inspector/InspectorHeapProfilerAgent.cpp: (HeapProfilerAgentState): (WebCore): (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent): (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles): (WebCore::InspectorHeapProfilerAgent::clearFrontend): (WebCore::InspectorHeapProfilerAgent::restore): (WebCore::InspectorHeapProfilerAgent::getProfileHeaders): * inspector/InspectorHeapProfilerAgent.h: (InspectorHeapProfilerAgent): * inspector/InspectorProfilerAgent.cpp: (ProfilerAgentState): (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::addProfile): (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore): (WebCore::InspectorProfilerAgent::resetFrontendProfiles): (WebCore::InspectorProfilerAgent::restore): * inspector/InspectorProfilerAgent.h: (InspectorProfilerAgent): 2013-02-19 Vsevolod Vlasov Web Inspector: Move workspace specific code from FileMapping to workspace. https://bugs.webkit.org/show_bug.cgi?id=110219 Reviewed by Pavel Feldman. Extracted workspace specific code from FileMapping to Workspace. This allows to reduce usage of uri and eventually make UISourceCode.path an array of path segments. Test: inspector/workspace-mapping.html * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation): * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation): (WebInspector.CompilerScriptMapping.prototype.get addScript.get this): (WebInspector.CompilerScriptMapping.prototype.get addScript): * inspector/front-end/FileMapping.js: (WebInspector.FileMapping): (WebInspector.FileMapping.prototype.mappingEntryForURL): (WebInspector.FileMapping.prototype.mappingEntryForPath): * inspector/front-end/FileSystemMapping.js: (WebInspector.FileSystemMapping.prototype.fileSystemPathForPrefix): (WebInspector.FileSystemMappingImpl.prototype.addFileSystemMapping): (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping): (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix): * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate): (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded): (WebInspector.FileSystemProjectDelegate.prototype.populate): (WebInspector.FileSystemWorkspaceProvider): (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded): * inspector/front-end/IsolatedFileSystemManager.js: (WebInspector.IsolatedFileSystemManager): * inspector/front-end/NetworkUISourceCodeProvider.js: (WebInspector.NetworkUISourceCodeProvider): (WebInspector.NetworkUISourceCodeProvider.prototype._addFile): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._workspaceUISourceCodeForScript): * inspector/front-end/ResourceUtils.js: (WebInspector.displayNameForURL): * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping.prototype._reloadCSS): (WebInspector.SASSSourceMapping.prototype._bindUISourceCode): (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleWorkspaceProvider.pathForSplittedURL): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL): * inspector/front-end/StylesSourceMapping.js: (WebInspector.StylesSourceMapping.prototype.rawLocationToUILocation): (WebInspector.StylesSourceMapping.prototype._resourceAdded): (WebInspector.StylesSourceMapping.prototype._mainFrameCreatedOrNavigated): (WebInspector.StyleContentBinding): (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged): * inspector/front-end/Workspace.js: (WebInspector.Workspace): (WebInspector.Workspace.prototype.hasMappingForURL): (WebInspector.Workspace.prototype._fileSystemPathForEntry): (WebInspector.Workspace.prototype.uiSourceCodeForURL): (WebInspector.Workspace.prototype.urlForPath): * inspector/front-end/inspector.js: 2013-02-20 Alexander Pavlov Web Inspector: Introduce SecurityOriginAdded and SecurityOriginRemoved events into ResourceTreeModel https://bugs.webkit.org/show_bug.cgi?id=110232 Reviewed by Vsevolod Vlasov. * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): (WebInspector.ResourceTreeModel.prototype._addFrame): (WebInspector.ResourceTreeModel.prototype._addSecurityOrigin): Added. (WebInspector.ResourceTreeModel.prototype._removeSecurityOrigin): Added. (WebInspector.ResourceTreeModel.prototype._handleMainFrameDetached): Added. (WebInspector.ResourceTreeModel.prototype._frameNavigated): (WebInspector.ResourceTreeModel.prototype._frameDetached): 2013-02-20 Dan Carney [v8] ScriptValue has dangerous copy semantics https://bugs.webkit.org/show_bug.cgi?id=110206 Reviewed by Kentaro Hara. Update ScriptValue to used a SharedPersistent, making it impossible to return dead references. No new tests. No change in functionality. * bindings/v8/ScriptValue.cpp: (WebCore::ScriptValue::serialize): (WebCore::ScriptValue::getString): (WebCore::ScriptValue::toString): (WebCore::ScriptValue::toInspectorValue): * bindings/v8/ScriptValue.h: (WebCore::ScriptValue::ScriptValue): (WebCore::ScriptValue::operator=): (WebCore::ScriptValue::operator==): (WebCore::ScriptValue::isEqual): (WebCore::ScriptValue::isFunction): (WebCore::ScriptValue::isNull): (WebCore::ScriptValue::isUndefined): (WebCore::ScriptValue::isObject): (WebCore::ScriptValue::hasNoValue): (WebCore::ScriptValue::clear): (ScriptValue): (WebCore::ScriptValue::v8Value): (WebCore::ScriptValue::v8ValueRaw): * bindings/v8/SharedPersistent.h: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::scriptValueAsNode): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAttrGetterCustom): 2013-02-20 Andrey Lushnikov Web Inspector: highlight undefined word in JavaScript https://bugs.webkit.org/show_bug.cgi?id=109585 Reviewed by Vsevolod Vlasov. Test enhancement: inspector/syntax-highlight-javascript.html Add global object value properties to tokenizer and add a css style class to highlight "undefined" with gray color. * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken): * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/inspectorSyntaxHighlight.css: (.webkit-javascript-undef): 2013-02-20 Mike West Use EventPathWalker rather than parentNode() to normalize event targets in EventHandler. https://bugs.webkit.org/show_bug.cgi?id=110037 Reviewed by Ryosuke Niwa. We need to teach EventHandler about Shadow DOM in a few places in order to ensure that we properly target events dispatched upon text nodes. Rather than naively grabbing the text node's direct parent via parentNode(), we need to account for the case in which the text node is distributed[1] to an insertion point inside a shadow host. EventPathWalker::parent understands these relationships, and should be used when dealing with mouse, drag, and touch events. [1]: http://www.w3.org/TR/shadow-dom/#dfn-distribution * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseDraggedEvent): (WebCore::EventHandler::handleTouchEvent): (WebCore::EventHandler::passGestureEventToWidgetIfPossible): (WebCore::EventHandler::updateDragAndDrop): Refactor parentNode callsites to use EventPathWalker::parent(). 2013-02-20 Vsevolod Vlasov Web Inspector: [Regression] Search in ProfilesPanel is broken https://bugs.webkit.org/show_bug.cgi?id=110312 Reviewed by Pavel Feldman. * inspector/front-end/CPUProfileView.js: (WebInspector.CPUProfileView.prototype.matchesQuery): (WebInspector.CPUProfileView.prototype.performSearch): 2013-02-20 Eugene Klyuchnikov Web Inspector: View.markAsRoot should never be invoked on attached view. https://bugs.webkit.org/show_bug.cgi?id=110224 Reviewed by Pavel Feldman. This will cause CSS loading problems after "show". * inspector/front-end/Drawer.js: Ensure child view is detached before marked as root. * inspector/front-end/View.js: (WebInspector.View.prototype.markAsRoot): Added assertion. 2013-02-20 Nils Barth File upload control doesn't apply CSS vertical padding or border to file name https://bugs.webkit.org/show_bug.cgi?id=109011 Reviewed by Hajime Morrita. Test: fast/forms/file/file-vertical-padding-border.html * rendering/RenderFileUploadControl.cpp: Add borderTop() and paddingTop() when computing position. (WebCore::RenderFileUploadControl::paintObject): 2013-02-19 Andrey Adaikin Few methods in WebGLRenderingContext.idl have incorrect signatures https://bugs.webkit.org/show_bug.cgi?id=110305 Reviewed by Kentaro Hara. * html/canvas/WebGLRenderingContext.idl: 2013-02-19 Tim Horton Clarify isInWindow vs. isVisible path through to RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=110261 Reviewed by Simon Fraser. Remove RenderLayerCompositor::willMoveOffscreen/didMoveOnscreen. Add RenderLayerCompositor::setIsInWindow, and pipe in-window changes through from Page::setIsInWindow. Adjust a few Document functions that previously called RenderView::didMoveOnscreen/willMoveOffscreen to use setIsInWindow instead, since in-window state changes are occurring when attaching and detaching documents. * WebCore.exp.in: Export Page::setIsInWindow. * dom/Document.cpp: (WebCore::Document::attach): Use setIsInWindow instead of didMoveOnscreen. (WebCore::Document::documentWillBecomeInactive): Use setIsInWindow instead of willMoveOffscreen. (WebCore::Document::documentDidResumeFromPageCache): Use setIsInWindow instead of didMoveOnscreen. * page/FrameView.cpp: (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): RenderView doesn't care about moving on/offscreen, just in-window state. (WebCore::FrameView::setIsInWindow): Added. Forward isInWindow changes to our RenderView. * page/FrameView.h: (FrameView): Add setIsInWindow. * page/Page.cpp: (WebCore::Page::setIsInWindow): Added. Forward isInWindow changes to the Page's FrameViews. * page/Page.h: (Page): Add setIsInWindow. (WebCore::Page::isInWindow): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::setIsInWindow): Added. Replace willMoveOffscreen/didMoveOnscreen with setIsInWindow, since that's the only change we actually care about. * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): Add setIsInWindow. * rendering/RenderView.cpp: (WebCore::RenderView::setIsInWindow): Added. Replace willMoveOffscreen/didMoveOnscreen with setIsInWindow, since that's the only change RenderLayerCompositor actually cares about. * rendering/RenderView.h: (RenderView): Add setIsInWindow. 2013-02-19 Eugene Klyuchnikov Web Inspector: Cleanup and add JSDocs to SuggestBox https://bugs.webkit.org/show_bug.cgi?id=110202 Reviewed by Pavel Feldman. SuggestBox contains some obsolete/unused code and not fully covered with JSDocs. * inspector/front-end/SuggestBox.js: (WebInspector.SuggestBox.prototype.visible): Replaced getter with function. (WebInspector.SuggestBox.prototype._onScrollOrResize): Use camel-case for function names. (WebInspector.SuggestBox.prototype._onBoxMouseDown): Ditto. (WebInspector.SuggestBox.prototype.updateSuggestions): Removed unused code. (WebInspector.SuggestBox.prototype.hide): Adopt changes. (WebInspector.SuggestBox.prototype._applySuggestion): Ditto. * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.isSuggestBoxVisible): Ditto. 2013-02-19 Hayato Ito Calculate EventPath in EventDispatcher's constructor. https://bugs.webkit.org/show_bug.cgi?id=109905 Reviewed by Dimitri Glazkov. This patch calculates an EventPath in EventDispatcher's constructor and removes EventDispatcher::ensureEventPath(). We don't have any reason to initialize an EventPath lazily. No tests. No change in behavior. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::EventDispatcher): (WebCore::EventDispatcher::dispatch): * dom/EventDispatcher.h: (WebCore::EventDispatcher::eventPath): (EventDispatcher): * dom/FocusEvent.cpp: (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::dispatchEvent): (WebCore::FocusInEventDispatchMediator::dispatchEvent): (WebCore::FocusOutEventDispatchMediator::dispatchEvent): * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): 2013-02-19 Simon Fraser Fix TileCache tile size when zoomed on slow-scrolling site https://bugs.webkit.org/show_bug.cgi?id=110289 Reviewed by Tim Horton. In slow scrolling mode, we use the tile coverage rect as the tile size (so a single tile covers the viewport). When zoomed, the tile coverage rect shrinks relative to the TileCache, so scale the tile size back up. Test: platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed.html * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::tileSizeForCoverageRect): 2013-02-19 Hayato Ito Rename AncestorChainWalker. https://bugs.webkit.org/show_bug.cgi?id=110146 Reviewed by Dimitri Glazkov. Rename AncestorChainWalker to EventPathWalker. The term of EventPath is used in DOM Core spec. EventPath was already introduced into a EventContext.h in r112055. We should spread this term into the Walker class since they share the same purpose. No new tests, no behavior change. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/EventDispatcher.cpp: * dom/EventPathWalker.cpp: Renamed from Source/WebCore/dom/AncestorChainWalker.cpp. (WebCore): (WebCore::EventPathWalker::EventPathWalker): (WebCore::EventPathWalker::parent): parent() is now a static function to cover simple use cases. (WebCore::EventPathWalker::moveToParent): Renamed from parent(). * dom/EventPathWalker.h: Renamed from Source/WebCore/dom/AncestorChainWalker.h. (WebCore): (EventPathWalker): (WebCore::EventPathWalker::node): (WebCore::EventPathWalker::isVisitingInsertionPointInReprojection): Renamed from isCrossingInsertionPoint(). * dom/EventRetargeter.cpp: (WebCore::EventRetargeter::calculateEventPath): (WebCore::EventRetargeter::buildRelatedNodeMap): * dom/TreeScope.cpp: (WebCore::TreeScope::focusedNode): * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::attach): * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::handleWheelEvent): 2013-02-19 Dean Jackson Snapshotted plugin label should not be selectable https://bugs.webkit.org/show_bug.cgi?id=110286 Reviewed by Simon Fraser. Update the CSS to make it clear that you should click on a snapshot (use the finger pointer) and disable text selection. * css/plugIns.css: (embed::-webkit-snapshotted-plugin-content .snapshot-container .snapshot-label): 2013-02-19 Hans Muller [CSS Exclusions] Enable shape-inside support for ellipses https://bugs.webkit.org/show_bug.cgi?id=109868 Reviewed by Dirk Schulze. This change is very similar to the one recently made for circles: removed the test that disabled ellipse values for shape-inside. The remaining support for ellipses, which is based on rounded rectangles whose width/height is equal to their radiusX/radiusY, has not changed. Test: fast/exclusions/shape-inside/shape-inside-ellipse.html * rendering/ExclusionShapeInsideInfo.h: (WebCore::ExclusionShapeInsideInfo::isEnabledFor): No longer disallows any BasicShape type. 2013-02-19 Uday Kiran 'round' not implemented in border-image https://bugs.webkit.org/show_bug.cgi?id=14185 Reviewed by David Hyatt. Add rendering support for 'round' keyword of border-image-repeat CSS property http://dev.w3.org/csswg/css3-background/#border-image-repeat Rebased original patch by Benjamin Otte and made few fixes. Test: fast/borders/border-image-02.html * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: (Image): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): For 'round' keyword, the image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does. 2013-02-19 Conrad Shultz Allow UI clients to handle vertical wheel events. https://bugs.webkit.org/show_bug.cgi?id=110006 Reviewed by Tim Horton. Add API to allow matching changes in WebKit2 to control rubber-banding behavior at vertical page extrema. If rubber-banding is disabled during a scroll event that would otherwise trigger rubber-banding, dispatch didNotHandleWheelEvent() to the page UI client. * WebCore.exp.in: Export new rubber-banding API. * page/Page.cpp: (WebCore): (WebCore::Page::rubberBandsAtBottom): Proxy for the corresponding function in ScrollingCoordinator. (WebCore::Page::setRubberBandsAtBottom): Ditto. (WebCore::Page::rubberBandsAtTop): Ditto. (WebCore::Page::setRubberBandsAtTop): Ditto. * page/Page.h: (Page): Declare new rubber-banding API (above). * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::rubberBandsAtBottom): Stub API implementation. (WebCore::ScrollingCoordinator::setRubberBandsAtBottom): Ditto. (WebCore::ScrollingCoordinator::rubberBandsAtTop): Ditto. (WebCore::ScrollingCoordinator::setRubberBandsAtTop): Ditto. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): Initialize new member variables. (WebCore::ScrollingTree::setMainFramePinState): Set top/bottom pinned states. (WebCore::ScrollingTree::rubberBandsAtBottom): New accessor function. (WebCore::ScrollingTree::setRubberBandsAtBottom): New mutator function. (WebCore::ScrollingTree::rubberBandsAtTop): New accessor function. (WebCore::ScrollingTree::setRubberBandsAtTop): New mutator function. (WebCore::ScrollingTree::willWheelEventStartSwipeGesture): Start a vertical swipe event if the frame is pinned at the top or bottom and associated rubber-banding is disabled. * page/scrolling/ScrollingTree.h: (ScrollingTree): Declare new rubber-banding API and associated member variables. * page/scrolling/mac/ScrollingCoordinatorMac.h: (ScrollingCoordinatorMac): Declare API overrides. * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::rubberBandsAtBottom): Method override; proxy to corresponding function in ScrollingTree. (WebCore::ScrollingCoordinatorMac::setRubberBandsAtBottom): Ditto. (WebCore::ScrollingCoordinatorMac::rubberBandsAtTop): Ditto. (WebCore::ScrollingCoordinatorMac::setRubberBandsAtTop): Ditto. * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection): Remove trailing whitespace. (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState): Calculate and pass vertical pinning state to ScrollingTree::setMainFramePinState(). 2013-02-19 Simon Fraser Rubber-banding should not affect the visibleRect of the TileCache https://bugs.webkit.org/show_bug.cgi?id=110278 Reviewed by Beth Dakin. When rubber-banding a slow-scrolling page, or image document, we would constantly re-create the bottom tile because of the logic that adapts the tile size to the visible rect when slow scrolling. Avoid that by ensuring that the visibleRect is not affected by rubber-banding. This is done via a GraphicsLayerClient function that allows RenderLayerCompositor to provide a custom position for the scroll layer. We constrain that scroll position to remove the overhang that results from rubber-banding. I wasn't able to make a test for this, even with internals.setScrollViewPosition(). * platform/graphics/GraphicsLayerClient.h: (GraphicsLayerClient): (WebCore::GraphicsLayerClient::customPositionForVisibleRectComputation): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::computeVisibleRect): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation): * rendering/RenderLayerCompositor.h: 2013-02-19 Tony Gentilcore Fix crash in preloading scanning base tags with no href attribute for background parser https://bugs.webkit.org/show_bug.cgi?id=110276 Reviewed by Eric Seidel. Previously a tag without an href attribute (like the one in fast/dom/HTMLAnchorElement/set-href-attribute-rebase.html) would crash the background parser's preload scanner. To fix that, we only call stripLeadingAndTrailingHTMLSpaces() if the href attribute is non-null. This matches the main thread parser. Along with this, I decided to templatize updatePredictedBaseURL() so that the main and background parser can share the same impl. This required making CompactHTMLToken and HTMLToken a little more similar: 1. Give HTMLToken a getAttributeItem() method. 2. Move CompactAttribute to CompactHTMLToken::Attribute and make it a struct. No new tests because covered by existing tests. * html/parser/AtomicHTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/CompactHTMLToken.cpp: (SameSizeAsCompactHTMLToken): (WebCore::CompactHTMLToken::CompactHTMLToken): (WebCore::CompactHTMLToken::getAttributeItem): (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread): * html/parser/CompactHTMLToken.h: (WebCore::CompactHTMLToken::Attribute::Attribute): (Attribute): (WebCore::CompactHTMLToken::attributes): (CompactHTMLToken): (WebCore::CompactHTMLToken::publicIdentifier): (WebCore::CompactHTMLToken::systemIdentifier): * html/parser/HTMLParserIdioms.h: (WebCore): (WebCore::stripLeadingAndTrailingHTMLSpaces): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): (WebCore): (WebCore::TokenPreloadScanner::updatePredictedBaseURL): * html/parser/HTMLPreloadScanner.h: * html/parser/HTMLToken.h: (WebCore::HTMLToken::getAttributeItem): (HTMLToken): 2013-02-19 Mark Lam Introducing AbstractSQLTransaction and AbstractSQLTransactionBackend. https://bugs.webkit.org/show_bug.cgi?id=110273. Reviewed by Anders Carlsson. This is part of the webdatabase refactoring for webkit2. - Also changed the frontend and backend to only refer to the abstract interface of each other. No new tests. * Modules/webdatabase/AbstractSQLTransaction.h: Added. (AbstractSQLTransaction): (WebCore::AbstractSQLTransaction::~AbstractSQLTransaction): * Modules/webdatabase/AbstractSQLTransactionBackend.h: Added. (AbstractSQLTransactionBackend): (WebCore::AbstractSQLTransactionBackend::~AbstractSQLTransactionBackend): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::hasCallback): (WebCore::SQLTransaction::hasSuccessCallback): (WebCore::SQLTransaction::hasErrorCallback): (WebCore::SQLTransaction::setBackend): * Modules/webdatabase/SQLTransaction.h: (SQLTransaction): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::create): (WebCore::SQLTransactionBackend::SQLTransactionBackend): * Modules/webdatabase/SQLTransactionBackend.h: (SQLTransactionBackend): * Modules/webdatabase/SQLTransactionStateMachine.h: 2013-02-19 Emil A Eklund Change computeStickyPositionConstraints to use LayoutBoxExtent for margins https://bugs.webkit.org/show_bug.cgi?id=108872 Reviewed by Levi Weintraub. Change RenderBoxModelObject::computeStickyPositionConstraints to use a LayoutBoxExtent to represent margins. No new tests, no change in functionality. * platform/graphics/LayoutRect.h: (WebCore::LayoutRect::contract): Add version contract methods that takes a LayoutBoxExtent object. * platform/graphics/LayoutSize.h: (WebCore::LayoutSize::shrink): Add shrink method. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Change to use a LayoutBoxExtent object to represent margins. 2013-02-19 Tony Gentilcore Disable ASSERT(!hasInsertionPoint()) for background parser https://bugs.webkit.org/show_bug.cgi?id=110251 Reviewed by Adam Barth. The background parser crashes about 10 layout tests by hitting ASSERT(!hasInsertionPoint()). Now, finish() is the thing that closes the HTMLInputStream which removes the insertion point. In these tests, a document.open() calls insert() which clears the HTMLInputStream which causes there to be an insertion point again. With the main thread parser, insert() is called before finish() so the ASSERT passes. However, with the threaded parser, finish() is called before insert(), so we fail the ASSERT. This patch disables the ASSERT for the background parser because m_input isn't really relevant. This causes us to pass the tests. However, there is a risk that now hasInsertionPoint() may be incorrect and Document has a non-debug branch that tests hasInsertionPoint(). No new tests because covered by existing tests. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::prepareToStopParsing): (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd): 2013-02-19 Hans Muller [CSS Exclusions] Enable shape-inside support for ellipses https://bugs.webkit.org/show_bug.cgi?id=109868 Reviewed by Dirk Schulze. This change is very similar to the one recently made for circles: removed the test that disabled ellipse values for shape-inside. The remaining support for ellipses, which is based on rounded rectangles whose width/height is equal to their radiusX/radiusY, has not changed. Test: fast/exclusions/shape-inside/shape-inside-ellipse.html * rendering/ExclusionShapeInsideInfo.h: (WebCore::ExclusionShapeInsideInfo::isEnabledFor): No longer disallows any BasicShape type. 2013-02-19 Simon Fraser Separate constraining for overhang from fixed-position zooming behavior in scrollOffsetForFixedPosition() https://bugs.webkit.org/show_bug.cgi?id=110267 Reviewed by Beth Dakin. The static scrollOffsetForFixedPosition() function in ScrollingCoordinator did two things; it constrained the scroll position when rubber-banding, and applied the special scaling for fixed position when zoomed. Separate these out so that we can use the rubber-banding constrained elsewhere. * page/FrameView.cpp: (WebCore::FrameView::scrollOffsetForFixedPosition): The static function is here now. * page/FrameView.h: * page/scrolling/ScrollingCoordinator.cpp: Code moved to FrameView. * page/scrolling/ScrollingCoordinator.h: * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition): scrollOffsetForFixedPosition() is now on FrameView. * platform/ScrollableArea.cpp: (WebCore::constrainedScrollPosition): Helper to constrain one axis for overhang. (WebCore::ScrollableArea::constrainScrollPositionForOverhang): Static function that can be called by FrameView::scrollOffsetForFixedPosition(). * platform/ScrollableArea.h: Static function constrainScrollPositionForOverhang() so we can call it from another thread. Also a member fuction of the same name, which takes the scrollPosition as input (so we can feed it a layer position in a later patch). 2013-02-19 Tony Gentilcore Fix checkThatTokensAreSafeToSendToAnotherThread() now that the preload scanner is enabled https://bugs.webkit.org/show_bug.cgi?id=110258 Reviewed by Adam Barth. We were hitting this ASSERT on numerous tests with the background parser enabled. This copy fixes the assertion. No new tests becuase covered by existing tests. * html/parser/HTMLResourcePreloader.h: (WebCore::PreloadRequest::setCharset): 2013-02-19 Tony Gentilcore Fix typo: inititatorFor->initiatorFor https://bugs.webkit.org/show_bug.cgi?id=110260 Reviewed by Adam Barth. No new tests because no changed functionality. * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::initiatorFor): (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): * html/parser/HTMLPreloadScanner.h: 2013-02-19 Tony Chang Convert 3 settings to use Settings.in https://bugs.webkit.org/show_bug.cgi?id=109875 Reviewed by Ryosuke Niwa. Convert mediaEnabled, applicationChromeMode and DOMPasteAllowed to use Settings.in. They previously had inconsistently named setters. No new tests, this is a refactoring. * Source/WebCore/WebCore.exp.in: Remove symbols that are now inlined from exports. * Source/WebCore/WebCore.order: Remove symbols that no longer exist. * dom/make_names.pl: (printConstructorInterior): Rename isMediaEnabled to mediaEnabled. (printWrapperFunctions): Rename isMediaEnabled to mediaEnabled. * editing/EditorCommand.cpp: (WebCore::supportedPaste): Rename isDOMPasteAllowed to DOMPasteAllowed. * page/Settings.cpp: (WebCore::Settings::Settings): Remove custom code. * page/Settings.h: (Settings): Remove custom code. * page/Settings.in: Add entries for mediaEnabled, applicationChromeMode and DOMPasteAllowed. * page/make_settings.pl: (setterFunctionName): Expand uppercase rules to include DOM. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isDefault): Rename inApplicationChromeMode to applicationChromeMode. * rendering/RenderThemeWin.cpp: (WebCore::documentIsInApplicationChromeMode): Rename inApplicationChromeMode to applicationChromeMode. 2013-02-19 Julien Chaffraix [CSS Grid Layout] Refactor the code in preparation of auto placement support https://bugs.webkit.org/show_bug.cgi?id=110244 Reviewed by Ojan Vafai. Test: fast/css-grid-layout/grid-auto-flow-resolution.html In order to support auto placement, we need to iterate over the grid items with auto row / column several times. This changes makes us do that in a very simple, not-yet-conformant way. While touching this code, the distinction between grid-auto-flow none and row / column was better drawn (and enforced). * rendering/RenderGrid.cpp: (WebCore::RenderGrid::resolveGridPositionFromStyle): Made it illegal to call resolveGridPositionFromStyle if the grid track is auto and grid-auto-flow is not none. This would catch bad use of the function. (WebCore::RenderGrid::maximumIndexInDirection): Updated to bail out if the grid track is auto. Also improved the comment. (WebCore::RenderGrid::placeItemsOnGrid): Updated the function to do several iterations. Also handled the grid-auto-flow: none case differently as it shouldn't need the extra iteration(s). 2013-02-19 David Hyatt [New Multicolumn] REGRESSION: RenderMultiColumnSets broken by the RenderRegion -> RenderBlock subclassing. https://bugs.webkit.org/show_bug.cgi?id=110239. Reviewed by Simon Fraser. Test: fast/multicol/newmulticol/column-rules-fixed-height.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::columnRectAt): Make sure the columnGap() in the old multicolumn code is always expressed as a LayoutUnit. This was the one place where it was still an int. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion): Rework the painting of flow thread portions to account for the fact that regions paint at an integral translation. This means you have to construct clipping around that integral destination. Subpixel layout regions did not clip correctly as a result of this issue. * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::columnRectAt): Fix the same bug with columnGap() that the old column code has, i.e., one spot where it was an int. (WebCore::RenderMultiColumnSet::paintObject): RenderMultiColumnSet should be using paintObject and not paint and it needs to check for visibility and phases now that it is a RenderBlock subclass. (WebCore::RenderMultiColumnSet::paintColumnRules): Fix the bug that Opera guys fixed in the old multi-column code. They didn't patch the new code, so this takes care of that. * rendering/RenderMultiColumnSet.h: (RenderMultiColumnSet): Change to use paintObject instead of paint. 2013-02-19 Branimir Lambov Fix 'slice' aspect ratio calculation https://bugs.webkit.org/show_bug.cgi?id=99984 Reviewed by Dirk Schulze. Previously the calculation for the 'slice' aspect ratio would incorrectly calculate the source rect location based on the destination rect offset. This caused our source rect to be incorrect, and sometimes render outside the visible area completely. After this patch our implementation matches the implementation of both Gecko and Presto. The relevant spec section: http://www.w3.org/TR/SVG/single-page.html#coords-PreserveAspectRatioAttribute Tests: svg/as-image/image-preserveAspectRatio-all.svg svg/filters/feImage-preserveAspectRatio-all.svg * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::transformRect): 2013-02-19 Kentaro Hara [V8] ScriptRunner::runCompiledScript() should return Handle() when OOM occurs https://bugs.webkit.org/show_bug.cgi?id=110254 Reviewed by Adam Barth. Chromium bug: https://code.google.com/p/chromium/issues/detail?id=176951 Currently ScriptRunner::runCompiledScript() calls ASSERT(script.IsEmpty()) when OOM occurs. The Chromium bug is hitting the ASSERT(). The ASSERT() does not make sense at all. Instead, we should return an empty handle when OOM occurs. No tests. The bug happens only when OOM occurs. * bindings/v8/ScriptRunner.cpp: (WebCore::ScriptRunner::runCompiledScript): 2013-02-19 Elliott Sprehn Support both MutationObserver and WebKitMutationObserver https://bugs.webkit.org/show_bug.cgi?id=109776 Reviewed by Ojan Vafai. We should allow new MutationObserver now that we support parser generated mutations. This leaves the old prefixed constructor in until we decide people don't depend on it. Test: fast/dom/MutationObserver/mutation-observer-prefix.html * page/DOMWindow.idl: 2013-02-19 Elliott Sprehn Remove RenderText::updateText https://bugs.webkit.org/show_bug.cgi?id=109991 Reviewed by Eric Seidel. There's no reason for the generic RenderText::updateText virtual hook anymore now that r143060 made RenderQuote stop setting dirty bits during layout since the hook is only used by RenderCounter. Instead add updateCounterIfNeeded and make it clear this is a hack for counters. * rendering/RenderBlockLineLayout.cpp: (WebCore::updateCounterIfNeeded): Added, not handles the counter specific hack. (WebCore::dirtyLineBoxesForRenderer): (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): * rendering/RenderCounter.cpp: (WebCore::RenderCounter::updateCounter): * rendering/RenderCounter.h: (RenderCounter): * rendering/RenderQuote.cpp: (WebCore::RenderQuote::styleDidChange): (WebCore::RenderQuote::updateDepth): * rendering/RenderQuote.h: (RenderQuote): * rendering/RenderText.h: (RenderText): 2013-02-19 Tony Chang Border changes on tables with collapsed borders doesn't relayout table cells https://bugs.webkit.org/show_bug.cgi?id=109774 Reviewed by David Hyatt. Test: fast/table/border-collapsing/dynamic-border-width-change.html Changes to border top and border bottom on table rows also changes the size of the table cell causing a relayout to be needed. * rendering/RenderTableRow.cpp: (WebCore::borderWidthChanged): Also include border top and bottom. (WebCore::RenderTableRow::styleDidChange): Remove logical from the helper function name. 2013-02-19 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString): 2013-02-19 ChangSeok Oh [GTK][AC] Implement matrix transform animation with clutter ac backend https://bugs.webkit.org/show_bug.cgi?id=109848 Reviewed by Gustavo Noronha Silva. Clutter 1.12 doesn't support additive transform animations yet, so the combination of two or more transformations(such as rotation after translation) runs unexpectedly. So we use a matrix transformation instead for the case. Covered by existing animation tests. * platform/graphics/clutter/GraphicsLayerClutter.cpp: (WebCore::getValueFunctionNameForTransformOperation): (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes): * platform/graphics/clutter/PlatformClutterAnimation.cpp: (WebCore::toClutterActorPropertyString): Add actor property "transform" (WebCore::clutterMatrixProgress): Handle interpolation between two matrices instead of default clutter_matrix_progress. (WebCore): (WebCore::PlatformClutterAnimation::supportsAdditiveValueFunction): (WebCore::PlatformClutterAnimation::setFromValue): for TransformationMatrix. (WebCore::PlatformClutterAnimation::setToValue): ditto. (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty): (WebCore::PlatformClutterAnimation::addTransformTransition): * platform/graphics/clutter/PlatformClutterAnimation.h: (PlatformClutterAnimation): * platform/graphics/clutter/TransformationMatrixClutter.cpp: Add copy constructor for CoglMatrix. (WebCore::TransformationMatrix::TransformationMatrix): (WebCore): * platform/graphics/transforms/TransformationMatrix.h: (TransformationMatrix): 2013-02-19 Kassy Coan Update FeatureObserver on top level navigation in addition to page destruction. https://bugs.webkit.org/show_bug.cgi?id=109874 Reviewed by Adam Barth. No new tests. Only effect is to histogram more frequently. * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchDidCommitLoad): * page/FeatureObserver.cpp: (WebCore::FeatureObserver::~FeatureObserver): (WebCore): (WebCore::FeatureObserver::updateMeasurements): (WebCore::FeatureObserver::didCommitLoad): * page/FeatureObserver.h: (FeatureObserver): 2013-02-19 Morten Stenshorne Remove unnecessary (and problematic) copy-constructor from LayoutUnit https://bugs.webkit.org/show_bug.cgi?id=110121 This copy constructor does what a default copy constructor would do, so it's not necessary. Furthermore, this copy constructor is the only reason why LayoutUnit becomes non-POD, and that triggers a gdb bug, making it impossible to do things like "print location()" when inside some RenderBlock, for instance. Gdb bug http://sourceware.org/bugzilla/show_bug.cgi?id=15154 reported. Reviewed by Benjamin Poulain. No tests. Apart from dealing with buggy debuggers, this is just code cleanup. * platform/LayoutUnit.h: 2013-02-19 Emil A Eklund LayoutUnit::epsilon shouldn't be necessary to place floats https://bugs.webkit.org/show_bug.cgi?id=94000 Reviewed by Levi Weintraub. Currently, to get float placement correct, we need to have an epsilon tolerance in RenderBlock::computeLogicalLocationForFloat for the width of the line to fit them on. This really shouldn't be necessary, and probably indicates we're losing precision elsewhere. Remove epsilon as it no longer appears to be needed. All layout tests pass without it. No new tests, covered by existing tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeLogicalLocationForFloat): 2013-02-19 Tim Volodine Text Autosizing: prevent oscillation of font sizes during autosizing https://bugs.webkit.org/show_bug.cgi?id=108205 Reviewed by Kenneth Rohde Christiansen. On some websites autosized font-sizes oscillate due to layouts caused by hovering or incremental page loading (and on other sites font sizes do eventually stabilize, but it takes many layouts before they reach a steady size). To prevent all these cases, we no longer allow the autosizing multiplier to change after it has been set (to a value other than 1). This won't always give exactly the same results, but testing on 2000 top sites shows that this makes little difference in practice, and it prevents these very jarring cases. As a happy side-effect, this speeds up layouts as font sizes change less. Test: fast/text-autosizing/oscillation-javascript-fontsize-change.html * page/FrameView.cpp: (WebCore::FrameView::setFrameRect): * page/Settings.cpp: (WebCore::Settings::setTextAutosizingFontScaleFactor): * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::recalculateMultipliers): (WebCore): (WebCore::TextAutosizer::processContainer): * rendering/TextAutosizer.h: (TextAutosizer): 2013-02-19 Youenn Fablet [EFL][DRT] http/tests/loading/307-after-303-after-post.html times out https://bugs.webkit.org/show_bug.cgi?id=93214 Ensured that GET verb is consistently used for any request coming after a redirection that triggers switching to GET. Reviewed by Martin Robinson. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::doRedirect): 2013-02-19 Andras Becsi [Qt] Fix compilation if Qt was configured with -no-rtti https://bugs.webkit.org/show_bug.cgi?id=110234 Reviewed by Noam Rosenthal. Availability of dynamic_cast should be checked. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded): 2013-02-18 Alexey Proskuryakov Unregistered blob URLs have incorrect MIME type https://bugs.webkit.org/show_bug.cgi?id=110166 Reviewed by Sam Weinig. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::shouldUseInnerURL): Added a FIXME. * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnError): Pass an accurate MIME type (for a delegate to see). 2013-02-19 Joshua Bell IndexedDB: additional checks on LevelDB decoding https://bugs.webkit.org/show_bug.cgi?id=109711 Reviewed by Tony Chang. Watch out for decoding errors caused by corrupted data, and exit various decode/compare operations earlier. Covered by existing LayoutTests and Chromium's webkit_unit_tests * Modules/indexeddb/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::decodeStringWithLength): Bail if length is negative. (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): Distinguish error case. (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Bail if length is negative. (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Distinguish error case. (WebCore::IDBLevelDBCoding::compare): Plumb through "ok". (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare): Ditto. (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare): Ditto. (WebCore::IDBLevelDBCoding::IndexDataKey::compare): Ditto. * Modules/indexeddb/IDBLevelDBCoding.h: Updated method signatures. 2013-02-19 ChangSeok Oh [GTK][AC] Implement keyframe animations with clutter ac backend https://bugs.webkit.org/show_bug.cgi?id=110057 Reviewed by Gustavo Noronha Silva. This patch brings accelerated keyframe animation with clutter to WebKitGtk+. Changes of GraphicsLayerClutter are based on GraphicsLayerCA. But major changes of PlatformClutterAnimation are implemented with clutter keyframe transition apis. See http://developer.gnome.org/clutter/stable/ClutterKeyframeTransition.html Covered by existing animation tests. * platform/graphics/clutter/GraphicsLayerClutter.cpp: (WebCore::GraphicsLayerClutter::createKeyframeAnimation): (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes): (WebCore::GraphicsLayerClutter::setAnimationKeyframes): * platform/graphics/clutter/PlatformClutterAnimation.cpp: (WebCore::toClutterActorPropertyString): (WebCore::PlatformClutterAnimation::PlatformClutterAnimation): (WebCore::PlatformClutterAnimation::setTimingFunction): (WebCore::PlatformClutterAnimation::setValues): (WebCore::PlatformClutterAnimation::setKeyTimes): (WebCore::PlatformClutterAnimation::setTimingFunctions): (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty): (WebCore): (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty): (WebCore::PlatformClutterAnimation::addOpacityTransition): (WebCore::PlatformClutterAnimation::addTransformTransition): (WebCore::PlatformClutterAnimation::addAnimationForKey): (WebCore::PlatformClutterAnimation::removeAnimationForKey): * platform/graphics/clutter/PlatformClutterAnimation.h: (PlatformClutterAnimation): 2013-02-19 Claudio Saavedra [harfbuzz] Crash in harfbuzz related code https://bugs.webkit.org/show_bug.cgi?id=110145 Reviewed by Martin Robinson. Patch by Behdad Esfahbod * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Ask harfbuzz to guess the segment properties. 2013-02-19 Pavel Podivilov Web Inspector: release backtrace object group on each step. https://bugs.webkit.org/show_bug.cgi?id=110223 Reviewed by Pavel Feldman. * inspector/InspectorDebuggerAgent.cpp: (WebCore): (WebCore::InspectorDebuggerAgent::stepOver): (WebCore::InspectorDebuggerAgent::stepInto): (WebCore::InspectorDebuggerAgent::stepOut): 2013-02-19 Sheriff Bot Unreviewed, rolling out r142975. http://trac.webkit.org/changeset/142975 https://bugs.webkit.org/show_bug.cgi?id=110225 Introduces hard-to-reproduce crashes upon inspected page navigation on Mac (Requested by apavlov on #webkit). * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::enable): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::collectStyleSheets): (WebCore::InspectorCSSAgent::bindStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): (WebCore::InspectorCSSAgent::buildObjectForRule): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule): (WebInspector.CSSStyleModelResourceBinding.prototype.): (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource): (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId): (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetIdForResource): (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders): (WebInspector.CSSStyleModelResourceBinding.prototype.headersLoaded): (WebInspector.CSSStyleModelResourceBinding.prototype._requestViaInspectorResource): (WebInspector.CSSStyleModelResourceBinding.prototype._getOrCreateInspectorResource): (WebInspector.CSSStyleModelResourceBinding.prototype._reset): * inspector/front-end/SASSSourceMapping.js: (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback): (WebInspector.SASSSourceMapping.prototype._styleSheetChanged): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback): (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): * inspector/front-end/StylesSourceMapping.js: (WebInspector.StyleContentBinding.prototype.callback): (WebInspector.StyleContentBinding.prototype.setStyleContent): (WebInspector.StyleContentBinding.prototype.): (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged): 2013-02-19 Julien Chaffraix RenderGrid::computedUsedBreadthOfGridTracks can read past m_grid's size https://bugs.webkit.org/show_bug.cgi?id=110126 Reviewed by Ojan Vafai. The issue comes from how we store the column information inside m_grid. Because m_grid is a Vector of rows, we could lose the column information if we had no row, no grid item but some columns defined in CSS. As the logic would assume that our row / column size would be greater than what the style defines explicitely, we would access past our Vector's boundary. The fix is to ensure that we have at least a row so that we can store the column information in every case. This fix is overly broad as it also forces the grid to have one column, which shouldn't be an issue. Test: fast/css-grid-layout/grid-element-empty-row-column.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::maximumIndexInDirection): Forced this function to return at least one as the maximum index so that m_grid has at least one row / column. (WebCore::RenderGrid::placeItemsOnGrid): Added a ASSERT that m_grid is bigger than the explicit grid-rows / grid-columns. Also changed an existing ASSERT to use gridWasPopulated for consistency and changed the code not to call gridRowCount as it would ASSERT (we are in the middle of populating the grid). * rendering/RenderGrid.h: (WebCore::RenderGrid::gridWasPopulated): Added this helper function. (WebCore::RenderGrid::gridColumnCount): Replaced a now unneeded branch with an ASSERT. As placeItemsOnGrid should be called prior to read m_grid, this change should be fine. (WebCore::RenderGrid::gridRowCount): Added an ASSERT. 2013-02-19 Sergio Villar Senin [Soup] Use synchronous calls to close completely processed streams https://bugs.webkit.org/show_bug.cgi?id=107432 Reviewed by Martin Robinson. There is no need to close already processed streams in asynchronous calls since they won't block. Using the synchronous call will save us some code and unnecessary asynchronous burden. This is kind of a code refactor so no new tests needed. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore): (WebCore::redirectSkipCallback): (WebCore::readCallback): 2013-02-19 Andrey Adaikin Web Inspector: [Canvas] use timeline's didBeginFrame for marking frame end calls https://bugs.webkit.org/show_bug.cgi?id=110130 Reviewed by Pavel Feldman. In Web Inspector canvas profiler use timeline's didBeginFrame for marking frame end calls instead of an ad-hoc timeout-based solution. * inspector/InjectedScriptCanvasModule.cpp: (WebCore::InjectedScriptCanvasModule::markFrameEnd): (WebCore): * inspector/InjectedScriptCanvasModule.h: (InjectedScriptCanvasModule): * inspector/InjectedScriptCanvasModuleSource.js: (.): * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases): (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped): (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases): (WebCore::InspectorCanvasAgent::frameNavigated): (WebCore::InspectorCanvasAgent::didBeginFrame): (WebCore): * inspector/InspectorCanvasAgent.h: (InspectorCanvasAgent): * inspector/InspectorController.cpp: (WebCore::InspectorController::didBeginFrame): 2013-02-19 Vsevolod Vlasov Web Inspector: Decouple various file system project implementation parts for better testability and cover with tests. https://bugs.webkit.org/show_bug.cgi?id=110204 Reviewed by Pavel Feldman. Extracted FileSystemWorkspaceProvider from IsolatedFileSystemManager to take care of managing workspace projects and projectDelegates. Replaced FileMapping.urlForURI with urlForPath method that does not need any information about workspace structure anymore. Test: inspector/file-system-project.html * inspector/front-end/FileMapping.js: (WebInspector.FileMapping.prototype.urlForPath): * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate): (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded): (WebInspector.FileSystemProjectDelegate.prototype.populate): (WebInspector.FileSystemWorkspaceProvider): (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded): (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved): * inspector/front-end/IsolatedFileSystem.js: (WebInspector.IsolatedFileSystem): (WebInspector.IsolatedFileSystem.prototype.name): (WebInspector.IsolatedFileSystem.prototype.rootURL): * inspector/front-end/IsolatedFileSystemManager.js: (WebInspector.IsolatedFileSystemManager): (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem): (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved): (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem): (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem): * inspector/front-end/inspector.js: 2013-02-19 Andrey Adaikin Web Inspector: [Canvas] do not replace replay image with spinner icon https://bugs.webkit.org/show_bug.cgi?id=110213 Reviewed by Pavel Feldman. Otherwise it's visually hard to see changes in the replay image. Instead show a small spinner icon in the bottom right corner. * inspector/front-end/CanvasProfileView.js: (WebInspector.CanvasProfileView): (WebInspector.CanvasProfileView.prototype._enableWaitIcon): * inspector/front-end/canvasProfiler.css: (#canvas-replay-image-container): (.canvas-debug-info): (.canvas-spinner-icon): 2013-02-19 Andrey Adaikin Web Inspector: [Canvas] UI: tweak replay control buttons behavior https://bugs.webkit.org/show_bug.cgi?id=110207 Reviewed by Pavel Feldman. New behavior for control buttons in the Canvas profiler. - The NextCall button (~StepInto) on a node group should expand it and move into its first child (instead of expanding and moving into the next node group) - The NextDrawCall button (~StepOver) should move to a next node that has children (instead of just iterating call group nodes, ignoring frame nodes). - The ReplayLast button should select the last expanded node (instead of always selecting last frame group node). * inspector/front-end/CanvasProfileView.js: (WebInspector.CanvasProfileView.prototype._onReplayStepClick): (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick): (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick): 2013-02-19 Andrei Bucur [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo https://bugs.webkit.org/show_bug.cgi?id=109914 Reviewed by David Hyatt. This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state (the RenderFlowThread object has both the region chain invalidated and the regions information cleared). RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the function and wait for the layout to cleanup the box information. Test: fast/regions/remove-box-info-assert.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::removeRegionFromThread): (WebCore::RenderFlowThread::invalidateRegions): (WebCore): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): * rendering/RenderFlowThread.h: * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::removeRegionFromThread): 2013-02-19 Alberto Garcia Fix build broekn by r142988. https://bugs.webkit.org/show_bug.cgi?id=109530 Unreviewed. Build fix. Properly add shortMonthFormat() to the LocaleNone class. * platform/text/LocaleNone.cpp: (LocaleNone): (WebCore::LocaleNone::shortMonthFormat): 2013-02-19 Anton Vayvod [Text Autosizing] Combine narrow descendants of a cluster into groups that should be autosized with the same multiplier. https://bugs.webkit.org/show_bug.cgi?id=109825 Enhancement of the approach introduced in https://bugs.webkit.org/show_bug.cgi?id=109573. Instead of using the same text size multiplier for all narrow descendants of any autosizing cluster, group the descendants by how much narrower they are than the cluster's |blockContainingAllText| and process each group separately with a different multiplier for each one. For example, we want nested comments on the page to be autosized as a group but separately from a sidebar on the same page. Reviewed by Kenneth Rohde Christiansen. Updated the existing test to verify the patch. * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::processClusterInternal): Splits the narrow descendants of the autosizing cluster into groups before processing each group individually. (WebCore::TextAutosizer::getNarrowDescendantsGroupedByWidth): Sorts the narrow descendants of the given cluster into groups, combining them by the difference between their content widths. If sorted by width, two consecutive nodes belong to the same group if their width difference is no greater than 100 CSS units. * rendering/TextAutosizer.h: New method definitions. 2013-02-18 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node. https://bugs.webkit.org/show_bug.cgi?id=110124 Reviewed by Yury Semikhatsky. Publish userProvidedName into grid node. * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): * inspector/front-end/NativeHeapSnapshot.js: (WebInspector.NativeHeapSnapshotNode.prototype.serialize): 2013-02-19 Arpita Bahuguna Caret is not displayed when trying to focus inside a contenteditable element containing an empty block. https://bugs.webkit.org/show_bug.cgi?id=108053 Reviewed by Ryosuke Niwa. Test: editing/selection/caret-in-div-containing-empty-block.html * rendering/RenderBox.cpp: (WebCore::RenderBox::localCaretRect): When trying to compute the caret rect for the contenteditable div, the border and the padding were not considered. Because of this, for the given test case, which had a border defined on the containing div, the caret was being painted just atop the border, thereby masking it. Have modified the code to ensure that the computed caret rect takes into account the border and padding (if any) specified on the box, but only if the node doesn't have content that shall be skipped for editing. We do not add border and padding while computing the caret rect for any element that either has no content or has content that shall be skipped for editing purposes. This holds true for table elements as well. This helps avoid the caret displacement previsouly observed before/after any controls placed within the contenteditable box, when considering border and padding in computation of the caret rect. 2013-02-19 Mihnea Ovidenie CSSRegions: crash positioned object with inline containing block in flow thread https://bugs.webkit.org/show_bug.cgi?id=108307 Reviewed by David Hyatt. The fix for https://bugs.webkit.org/show_bug.cgi?id=69896 allowed positioned blocks work with variable width regions. However, the information needed for that is available only when the container used for positioning is a block. This patch ensures we are using this solution only when the container used for positioning is a block. This needs to be revisited when we will extend support for other types of boxes as mentioned in RenderBox::renderBoxRegionInfo. Test: fast/regions/positioned-object-inline-cb-crash.html * rendering/RenderBox.cpp: (WebCore::RenderBox::renderBoxRegionInfo): (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::computePositionedLogicalWidth): Make sure we are using containerBlocks that are blocks. Add an assert that the type of containerBlock we are using can have computed RenderBoxRegionInfo. (WebCore::RenderBox::computePositionedLogicalHeight): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): This helper method will return the boxes that may have computed RenderBoxRegionInfo. Currently, returns true for blocks only. 2013-02-19 Ryosuke Niwa Yet anther JSC build fix after r143304. * bindings/js/JSDOMBinding.h: (WebCore::argumentOrNull): 2013-02-19 Kentaro Hara Unreviewed build fix. Fixed warning caused by r143305. * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): 2013-02-19 Kentaro Hara Unreviewed build fix after r143304. * bindings/js/JSDOMBinding.h: (WebCore::argumentOrNull): 2013-02-19 Kentaro Hara [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro https://bugs.webkit.org/show_bug.cgi?id=109899 Reviewed by Adam Barth. Currently: - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index]. - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local() if args[index] is missing (i.e. the length of |args| is less than |index|). It returns args[index] otherwise. No one other than CodeGeneratorV8.pm uses MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use args[index]. We should remove the redundant usage from CodeGeneratorV8.pm too. The long-name macro has been making generated code less readable. In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::Float64ArrayV8Internal::fooCallback): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback): (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::itemCallback): (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::TestMediaQueryListListenerV8Internal::methodCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::voidMethodWithArgsCallback): (WebCore::TestObjV8Internal::longMethodWithArgsCallback): (WebCore::TestObjV8Internal::objMethodWithArgsCallback): (WebCore::TestObjV8Internal::methodWithSequenceArgCallback): (WebCore::TestObjV8Internal::methodReturningSequenceCallback): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjV8Internal::optionsObjectCallback): (WebCore::TestObjV8Internal::methodWithOptionalArgCallback): (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjV8Internal::methodWithOptionalStringCallback): (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback): (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback): (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjV8Internal::overloadedMethod1Callback): (WebCore::TestObjV8Internal::overloadedMethod2Callback): (WebCore::TestObjV8Internal::overloadedMethod3Callback): (WebCore::TestObjV8Internal::overloadedMethod4Callback): (WebCore::TestObjV8Internal::overloadedMethod6Callback): (WebCore::TestObjV8Internal::overloadedMethod7Callback): (WebCore::TestObjV8Internal::overloadedMethod8Callback): (WebCore::TestObjV8Internal::overloadedMethod9Callback): (WebCore::TestObjV8Internal::overloadedMethod10Callback): (WebCore::TestObjV8Internal::overloadedMethod11Callback): (WebCore::TestObjV8Internal::classMethodWithOptionalCallback): (WebCore::TestObjV8Internal::overloadedMethod12Callback): (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback): (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback): (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback): (WebCore::TestObjV8Internal::stringArrayFunctionCallback): (WebCore::TestObjV8Internal::domStringListFunctionCallback): (WebCore::TestObjV8Internal::convert1Callback): (WebCore::TestObjV8Internal::convert2Callback): (WebCore::TestObjV8Internal::convert4Callback): (WebCore::TestObjV8Internal::convert5Callback): (WebCore::TestObjV8Internal::strictFunctionCallback): (WebCore::TestObjV8Internal::variadicStringMethodCallback): (WebCore::TestObjV8Internal::variadicDoubleMethodCallback): (WebCore::TestObjV8Internal::variadicNodeMethodCallback): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::V8TestOverloadedConstructors::constructor1Callback): (WebCore::V8TestOverloadedConstructors::constructor2Callback): (WebCore::V8TestOverloadedConstructors::constructor3Callback): (WebCore::V8TestOverloadedConstructors::constructor4Callback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::TestTypedefsV8Internal::funcCallback): (WebCore::TestTypedefsV8Internal::setShadowCallback): (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback): (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback): (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback): (WebCore::TestTypedefsV8Internal::stringArrayFunction2Callback): (WebCore::V8TestTypedefs::constructorCallback): * bindings/v8/V8BindingMacros.h: (WebCore): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::pushStateCallbackCustom): (WebCore::V8History::replaceStateCallbackCustom): 2013-02-19 Kentaro Hara [JSC] MAYBE_MISSING_PARAMETER(..., DefaultIsNullString) macro is redundant https://bugs.webkit.org/show_bug.cgi?id=109902 Reviewed by Adam Barth. Currently: - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined) returns exec->argument(index). - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsNullString) returns JSValue() if exec->argument(index) is missing (i.e. the length of the argument is less than index). It returns exec->argument(index) otherwise. No one other than CodeGeneratorJS.pm uses MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined). Instead, we simply use exec->argument(index). We should remove the redundant usage in CodeGeneratorJS.pm too. The long-name macro has been making generated code less readable. In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull(). c.f. corresponding V8 bug: https://bugs.webkit.org/show_bug.cgi?id=109899 No tests. No change in behavior. * bindings/js/JSDOMBinding.h: (WebCore): * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/test/JS/JSFloat64Array.cpp: (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence): (WebCore::jsTestObjPrototypeFunctionStringArrayFunction): (WebCore::jsTestObjPrototypeFunctionDomStringListFunction): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionStrictFunction): (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod): (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod): (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1): (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2): (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3): (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs): (WebCore::jsTestTypedefsPrototypeFunctionFunc): (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList): (WebCore::jsTestTypedefsPrototypeFunctionSetShadow): (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg): (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction): (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2): 2013-02-18 Hayato Ito Make EventDispatcher take an Event object in its constructor. https://bugs.webkit.org/show_bug.cgi?id=109898 Reviewed by Dimitri Glazkov. Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero. Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr) if mediator's event() returns null. Also Added a layout test to catch this kind of crash in the future. Test: fast/events/platform-wheelevent-with-delta-zero-crash.html * dom/EventDispatchMediator.cpp: (WebCore::EventDispatchMediator::dispatchEvent): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): (WebCore::EventDispatcher::EventDispatcher): (WebCore::EventDispatcher::ensureEventPath): (WebCore::EventDispatcher::dispatchSimulatedClick): (WebCore::EventDispatcher::dispatch): (WebCore::EventDispatcher::dispatchEventPreProcess): (WebCore::EventDispatcher::dispatchEventAtCapturing): (WebCore::EventDispatcher::dispatchEventAtTarget): (WebCore::EventDispatcher::dispatchEventAtBubbling): (WebCore::EventDispatcher::dispatchEventPostProcess): * dom/EventDispatcher.h: (EventDispatcher): (WebCore::EventDispatcher::node): (WebCore::EventDispatcher::event): * dom/FocusEvent.cpp: (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::dispatchEvent): (WebCore::FocusInEventDispatchMediator::dispatchEvent): (WebCore::FocusOutEventDispatchMediator::dispatchEvent): * dom/GestureEvent.cpp: (WebCore::GestureEventDispatchMediator::dispatchEvent): * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::dispatchEvent): Assert event() rather than an early exit since this code path should be hit only when event() is non-null. 2013-02-18 Takashi Sakamoto :before/:after pseudo elements do not always apply to the proper element https://bugs.webkit.org/show_bug.cgi?id=93925 Reviewed by Dimitri Glazkov. Disable sharing a style with siblings if :after or :before pseudo style is unique. Test: fast/css/before-after-pseudo-class.html * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Added a new condition, hasUniquePseudoStyle. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::hasUniquePseudoStyle): Added to check whether any pseudo style has unique bit or not. (WebCore): * rendering/style/RenderStyle.h: 2013-02-18 Andy Estes Focusing a new frame (via window.focus()) should blur the active element in the current frame https://bugs.webkit.org/show_bug.cgi?id=110172 Reviewed by Ryosuke Niwa. When a change in the focused node crosses a frame boundary, WebKit doesn't always succeed in blurring the old focused node before focusing the new one. Each document remembers its focused node, and a Page-scoped FocusController remembers the focused frame. If a new focused node is in a different frame than the focused frame, FocusController tells the old frame's document to clear its focused node before focusing the new one (and remembering the new frame). Unfortunately, web content can confuse FocusController by calling window.focus() at the wrong time. Since window.focus() changes FocusController's focused frame without focusing a new node, FocusController won't think that a frame boundary is being crossed if a node in this frame is later focused. Therefore it won't clear the old frame's focused node (it won't even know which frame contained the old focused node), causing at least two bugs: 1) The node in the old frame will not receive a blur event. 2) Calling document.activeElement on the main frame will return the previously focused node, but the HTML5 spec says it should return the frame owner element if a subframe has focus. Fix both of these bugs by explicitly clearing the current frame's focused node if window.focus() changes the focused frame. This fix carries some compatibility risk by changing a long-standing behavior of the engine (we've had this bug since the beginning of the project, AFAICT). On the upside, it matches the behavior of both Firefox and IE, matches what HTML5 says about subframe focus, and fixes at least one well-known enterprise web app. Tests: fast/dom/HTMLDocument/active-element-frames.html fast/frames/frame-focus-blurs-active-element.html * page/DOMWindow.cpp: (WebCore::DOMWindow::focus): If the frame being focused is not the same as the currently focused frame, clear the currently focused frame's focused node. 2013-02-18 Simon Fraser Clean up the boolean argument to visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=110167 Reviewed by Simon Fraser. Replace the boolean argument to visibleContentRect() with an enum. No behavior change. * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::viewportSize): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::update): * page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight): (WebCore::DOMWindow::innerWidth): * page/FrameView.cpp: (WebCore::FrameView::calculateScrollbarModesForLayout): (WebCore::FrameView::layout): (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::windowClipRect): * page/SpatialNavigation.cpp: (WebCore::canScrollInDirection): * platform/ScrollView.cpp: (WebCore::ScrollView::unscaledVisibleContentSize): (WebCore::ScrollView::visibleContentRect): (WebCore::ScrollView::layoutSize): (WebCore::ScrollView::updateScrollbars): (WebCore::ScrollView::paint): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::visibleContentRect): * platform/ScrollableArea.h: * rendering/RenderDialog.cpp: (WebCore::RenderDialog::layout): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::maximumScrollPosition): (WebCore::RenderLayer::visibleContentRect): * rendering/RenderLayer.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::updateRootLayerPosition): 2013-02-18 Ryosuke Niwa That didn't work either. Just make it public. This is why I hate nested classes. They just don't work. * rendering/RenderBlock.h: (RenderBlock): 2013-02-18 Ryosuke Niwa Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes. Work around it by directly instantiating the class inside createFloatingObjects. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects. * rendering/RenderBlock.h: (RenderBlock): Moved the declaration of createFloatingObjects up. (FloatingObjects::FloatingObjects): 2013-02-18 Ryosuke Niwa Merge handleSpecialChild into layoutBlockChildren https://bugs.webkit.org/show_bug.cgi?id=110165 Reviewed by Darin Adler. Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren to make the semantics of the code clear and to get rid of the outdated comment about how there are four types of four types of special children. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): * rendering/RenderBlock.h: (RenderBlock): 2013-02-18 Ryosuke Niwa Encapsulate FloatingObject's constructor inside create https://bugs.webkit.org/show_bug.cgi?id=110169 Reviewed by Darin Adler. Added FloatingObject::create and made FloatingObject's constructor private. Also added RenderBlock::ensureFloatingObjects to help lazily creating FloatingObjects. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::ensureFloatingObjects): (WebCore::RenderBlock::FloatingObjects::create): (WebCore::RenderBlock::FloatingObjects::FloatingObjects): * rendering/RenderBlock.h: (FloatingObjects): (RenderBlock): 2013-02-18 Anders Carlsson Add a DefaultHash for RefPtr https://bugs.webkit.org/show_bug.cgi?id=110170 Reviewed by Andreas Kling. Remove all explicit uses of SecurityOriginHash. * Modules/webdatabase/DatabaseTracker.h: * Modules/webdatabase/OriginQuotaManager.h: * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::getOriginsWithCache): * loader/cache/MemoryCache.h: * page/SecurityOriginHash.h: * storage/StorageNamespaceImpl.h: (StorageNamespaceImpl): 2013-02-18 David Hyatt Padding and border changes don't trigger the relayout of children in some cases. https://bugs.webkit.org/show_bug.cgi?id=109639. Reviewed by Ryosuke Niwa. The fix for this bug was way too general and involved putting code into RenderBox. Since RenderBox makes no assumptions about what kind of layout system might derive from it, it was incorrect to just mark all children as needing layout whenever borders and padding changed widths. This patch takes the two cases handled by the original code and makes them more specialized down in subclasses, i.e., RenderBlock and RenderTableRow. RenderBlock has been refined to only check if children aren't inline and to also not invalidate floats or irrelevant positioned objects that might not even have this block as their containing block. The RenderTableRow code is specialized to only care about collapsing borders and to only check borders rather than padding. It also requires that a child be a cell in order to do the invalidation. Covered by existing tests, since this is just specializing the code to more precisely cover the test cases that have already been written. Longer term, it should be layout code that figures this stuff out rather than style change code, but that involves more dramatic changes that can wait. Test: fast/block/positioning/border-change-relayout-test.html * rendering/RenderBlock.cpp: (WebCore::borderOrPaddingLogicalWidthChanged): (WebCore): (WebCore::RenderBlock::styleDidChange): * rendering/RenderBox.cpp: (WebCore): (WebCore::RenderBox::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::borderLogicalWidthChanged): (WebCore): (WebCore::RenderTableRow::styleDidChange): 2013-02-18 Mark Lam Small follow up to r143271: Fix SQLTransaction leak. https://bugs.webkit.org/show_bug.cgi?id=110052. Reviewed by Geoffrey Garen. Applied Geoff's suggestion nullify m_frontend sooner for greater code clarity. Also added some comments about m_frontend. No new tests. * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::doCleanup): * Modules/webdatabase/SQLTransactionBackend.h: (SQLTransactionBackend): 2013-02-18 Geoffrey Garen Shrank the SourceProvider cache https://bugs.webkit.org/show_bug.cgi?id=110158 Reviewed by Oliver Hunt. Test: fast/js/regress/nested-function-parsing.html No need to keep statistics on cache size, since we're going to throw it away no matter what. * WebCore.order: * bindings/js/CachedScriptSourceProvider.h: (CachedScriptSourceProvider): (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): * loader/cache/CachedScript.cpp: (WebCore::CachedScript::destroyDecodedData): (WebCore): (WebCore::CachedScript::reportMemoryUsage): * loader/cache/CachedScript.h: (CachedScript): 2013-02-18 peavo@outlook.com [Curl] The function cookiesForDOM() does not behave correctly. https://bugs.webkit.org/show_bug.cgi?id=109923 Reviewed by Brent Fulgham. The cookiesForDOM() function should return a list of matching cookies, both persistent and session cookies. * platform/network/curl/CookieJarCurl.cpp: (WebCore::readCurlCookieToken): Added function to read next token from Curl cookie string. (WebCore::addMatchingCurlCookie): Added function to add matching cookies to cookie list. (WebCore::setCookiesFromDOM): Add domain and path from url to cookie if not already set. (WebCore::cookiesForDOM): Return a list of matching cookies, both session and persistent cookies. 2013-02-17 Mark Lam Fix SQLTransaction leak. https://bugs.webkit.org/show_bug.cgi?id=110052. Reviewed by Geoffrey Garen. With https://bugs.webkit.org/show_bug.cgi?id=104750, there is now a circular reference between SQLTransaction and its backend. The clean up process needs to be fixed to explicitly break this reference cycle. The 5 phases of the SQLTransaction (and backend) phases and their clean up actions are: Phase 1. After Birth, before scheduling - During shutdown, DatabaseThread::databaseThread() calls DatabaseBackendAsync::close(). DatabaseBackendAsync::close() iterates DatabaseBackendAsync::m_transactionQueue and calls SQLtransactionBackend::notifyDatabaseThreadIsShuttingDown() on each transaction there. Phase 2. After scheduling, before state AcquireLock - ~DatabaseTask() calls SQLtransactionBackend's notifyDatabaseThreadIsShuttingDown(). Phase 3. After state AcquireLock, before "lockAcquired" - During shutdown, DatabaseThread::databaseThread() calls SQLTransactionCoordinator::shutdown(), which calls SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown(). Phase 4: After "lockAcquired", before state CleanupAndTerminate - Same as Phase 3. Phase 5: After state CleanupAndTerminate - state CleanupAndTerminate calls SQLTransactionBackend::doCleanup(). See comment at the top of SQLTransactionBackend.cpp for more details. Other supporting changes: - Moved Database::close() to the DatabaseBackendAsync. - Moved the "if already cleaned up" check from SQLTransactionBackend's notifyDatabaseThreadIsShuttingDown() to doCleanup(). - Added a check to prevent SQLTransactionCoordinator's releaseLock() from running when it's shutting down. No new tests. * Modules/webdatabase/Database.cpp: * Modules/webdatabase/Database.h: * Modules/webdatabase/DatabaseBackendAsync.cpp: (WebCore::DatabaseBackendAsync::close): Move from Database.cpp. * Modules/webdatabase/DatabaseBackendAsync.h: * Modules/webdatabase/DatabaseTask.cpp: (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask): (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::~DatabaseTransactionTask): (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask): * Modules/webdatabase/DatabaseTask.h: (DatabaseBackendAsync::DatabaseTransactionTask): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::databaseThread): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::doCleanup): (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown): (WebCore::SQLTransactionBackend::cleanupAndTerminate): * Modules/webdatabase/SQLTransactionCoordinator.cpp: (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator): (WebCore::SQLTransactionCoordinator::acquireLock): (WebCore::SQLTransactionCoordinator::releaseLock): (WebCore::SQLTransactionCoordinator::shutdown): * Modules/webdatabase/SQLTransactionCoordinator.h: (SQLTransactionCoordinator): 2013-02-18 David Kilzer Fix WebCore Xcode project * WebCore.xcodeproj/project.pbxproj: Fix path for CDMPrivate.h. 2013-02-18 Julien Chaffraix [CSS Grid Layout] Refactor grid position resolution code to support an internal grid representation https://bugs.webkit.org/show_bug.cgi?id=109718 Reviewed by Ojan Vafai. In order to support auto placement (where we can't infer a grid item's position from its style), we need to have 2 code paths: - One that places the elements on the grid representation. - One that reuse the grid representation to return the position. This code path implements this split so that we can add auto placement in a follow-up patch(es). Also in order to avoid a O(n^2) behavior [walking over our grid to find a grid item's position], the cached position code path needed an efficient way to find the grid items -> position mapping. Refactoring, covered by existing tests. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::cachedGridCoordinate): (WebCore::RenderGrid::resolveGridPositionFromStyle): These methods implements the above split. The first one reuses our cached information whereas the other one is used to build the cache. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::layoutGridItems): Added some code to clear the grid items' position. (WebCore::RenderGrid::findChildLogicalPosition): (WebCore::RenderGrid::logicalContentHeightForChild): Updated these functions to use cachedGridPosition. (WebCore::RenderGrid::maximumIndexInDirection): Added a comment about why we don't use cachedGridPosition. (WebCore::RenderGrid::insertItemIntoGrid): Added this helper function to insert into the grid and cache the position in the reverse lookup map. (WebCore::RenderGrid::placeItemsOnGrid): Updated to call insertItemIntoGrid. Also added an ASSERT similar to m_grid. (WebCore::RenderGrid::clearGrid): Added this helper function to clear our grid structure. * rendering/RenderGrid.h: (GridCoordinate): (WebCore::RenderGrid::GridCoordinate::GridCoordinate): Added this POD to hold the coordinates in our reverse map. 2013-02-18 Stephen Chenney feFlood incorrectly applied color-interpolation-filters https://bugs.webkit.org/show_bug.cgi?id=109985 Reviewed by Dirk Schulze. The SVG spec defines the color-interpolation-filters property for all filter effect elements in order to control cases where a color is based on some arithmetic computation on other colors. For example, when computing gradients or blending colors. feFlood simply fills a region with the given color, and that given color is always defined to be in sRGB space, so the feFlood result should always be sRGB. The new behavior matches both Opera and Firefox. Tests: svg/filters/feFlood-color-interpolation-expected.svg svg/filters/feFlood-color-interpolation.svg * platform/graphics/filters/FEFlood.cpp: (WebCore::FEFlood::platformApplySoftware): Force the color mode to be sRGB before returning. 2013-02-18 Mark Lam Introduced AbstractSQLStatement and AbstractSQLStatementBackend. https://bugs.webkit.org/show_bug.cgi?id=110148. Reviewed by Geoff Garen. This is part of the webdatabase refactoring for webkit2. - Also changed the frontend and backend to only refer to the abstract interface of each other. No new tests. * GNUmakefile.list.am: * Modules/webdatabase/AbstractSQLStatement.h: Added. (AbstractSQLStatement): (WebCore::AbstractSQLStatement::~AbstractSQLStatement): * Modules/webdatabase/AbstractSQLStatementBackend.h: Added. (AbstractSQLStatementBackend): (WebCore::AbstractSQLStatementBackend::~AbstractSQLStatementBackend): * Modules/webdatabase/SQLStatement.cpp: (WebCore::SQLStatement::setBackend): * Modules/webdatabase/SQLStatement.h: (SQLStatement): * Modules/webdatabase/SQLStatementBackend.cpp: (WebCore::SQLStatementBackend::create): (WebCore::SQLStatementBackend::SQLStatementBackend): (WebCore::SQLStatementBackend::frontend): * Modules/webdatabase/SQLStatementBackend.h: (SQLStatementBackend): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::deliverStatementCallback): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::currentStatement): (WebCore::SQLTransactionBackend::executeSQL): * Modules/webdatabase/SQLTransactionBackend.h: (SQLTransactionBackend): * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: 2013-02-18 David Kilzer BUILD FIX (r143230): Fix renamed header and implementation of -[WebAccessibilityObjectWrapper accessibilityPostedNotification:] Fixes the following build failures: AccessibilityObjectIOS.mm:35:9: fatal error: 'AccessibilityObjectWrapperIOS.h' file not found #import "AccessibilityObjectWrapperIOS.h" ^ 1 error generated. WebAccessibilityObjectWrapperIOS.mm:2051:35: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'? if (AXNotificationCallback && notificationString) ^~~~~~~~~~~~~~~~~~ notificationType WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType ^ WebAccessibilityObjectWrapperIOS.mm:2052:38: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'? AXNotificationCallback(self, notificationString, AXPostedNotificationContext); ^~~~~~~~~~~~~~~~~~ notificationType WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType ^ WebAccessibilityObjectWrapperIOS.mm:2052:38: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'WebCore::AXObjectCache::AXNotification' AXNotificationCallback(self, notificationString, AXPostedNotificationContext); ^~~~~~~~~~~~~~~~~~ WebAccessibilityObjectWrapperIOS.mm:2049:81: error: conflicting parameter types in implementation of 'accessibilityPostedNotification:': 'NSString *' vs 'WebCore::AXObjectCache::AXNotification' [-Werror,-Wmismatched-parameter-types] - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ WebAccessibilityObjectWrapperBase.h:48:53: note: previous definition is here - (void)accessibilityPostedNotification:(NSString *)notificationName; ~~~~~~~~~~ ^ 4 errors generated. * accessibility/ios/AccessibilityObjectIOS.mm: Fix name of included header. * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Fix implementation to match declaration. * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: * accessibility/ios/AXObjectCacheIOS.mm: - Clean up #endif comments. 2013-02-18 Jer Noble EME: Add a CDMPrivate implementation using AVFoundation. https://bugs.webkit.org/show_bug.cgi?id=109739 Reviewed by Eric Carlson. Add a CDMPrivate implementation using AVFoundation, similar to the EME v1 implementation in MediaPlayerPrivateAVFoundationObjC. This requires passing the AVAssetResourceLoadingRequest from the MediaPlayerPrivateAVFoundationObjC instance to CDMSessionAVFoundation. To do so without adding platform-specific API to MediaPlayer, add a static map from MediaPlayer -> MediaPlayerPrivateAVFoundationObjC instances to be used to vend the AVAssetResourceLoadingRequest to CDMSessionAVFoundation. * Modules/encryptedmedia/CDM.cpp: (WebCore::installedCDMFactories): Add the factory for CDMPrivateAVFoundation. * Modules/encryptedmedia/CDM.h: * Modules/encryptedmedia/CDMPrivateAVFoundation.h: Added. (WebCore::CDMPrivateAVFoundation::create): Simple factory method. (WebCore::CDMPrivateAVFoundation::~CDMPrivateAVFoundation): Simple virtual destructor. (WebCore::CDMPrivateAVFoundation::cdm): Simple getter. (WebCore::CDMPrivateAVFoundation::CDMPrivateAVFoundation): Simple constructor. * Modules/encryptedmedia/CDMPrivateAVFoundation.mm: Added. (WebCore::CDMSessionAVFoundation::~CDMSessionAVFoundation): Simple destructor. (WebCore::CDMPrivateAVFoundation::supportsKeySytem): Check whether the given key system is supported. (WebCore::CDMPrivateAVFoundation::supportsMIMEType): Check whether the given MIME type is supported. (WebCore::CDMPrivateAVFoundation::createSession): Return a new CDMSessionAVFoundation. (WebCore::CDMSessionAVFoundation::CDMSessionAVFoundation): Simple constructor. (WebCore::CDMSessionAVFoundation::generateKeyRequest): Retrieve the AVAssetResourceLoadingRequest from the MediaPlayer, and use it to generate a key request. (WebCore::CDMSessionAVFoundation::releaseKeys): No-op. (WebCore::CDMSessionAVFoundation::update): Add the passed in key to the AVAssetResourceLoadingRequest. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::playerToPrivateMap): Lazily instantiate static map. (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Register with the playerToPrivateMap. (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Unregister from same. (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Also send keyNeeded event in ENCRYPTED_MEDIA_V2. (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData): Convert this method from file-static to class static. (WebCore::MediaPlayerPrivateAVFoundationObjC::takeRequestForPlayerAndKeyURI): Pull the AVAssetResourceLoadingRequest from m_keyURIToRequestMap and return it, if present. 2013-02-18 Philip Rogers Fix scaling of tiled SVG backgrounds on high-dpi displays https://bugs.webkit.org/show_bug.cgi?id=110047 Reviewed by Dirk Schulze. This patch fixes the scaling of SVG when used for drawing patterns. Tiled/patterend SVG images are first drawn into an image buffer and then the image buffer is used to stamp out tiles. Because it is a raster source, the size of the image buffer needs to be scaled to the final resolution of the device. After scaling the image buffer, the source rect and pattern transforms need to be adjusted so they align in device pixel coordinates. This adjustment was not done before this patch, causing pixelated rendering. Additionally, a FIXME has been added due to webkit.org/b/110065 and the image buffer has been manually scaled (using "zoomedAndScaledContainerRect") instead of relying on the ImageBuffer's resolutionScale parameter. Test: svg/as-background-image/tiled-background-image.html * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawPatternForContainer): Note that fixing the FIXME does not change that the source rect and transform need to be adjusted for page scale. 2013-02-18 David Hyatt Make seamless iframes paginate properly in their enclosing document's pagination context. https://bugs.webkit.org/show_bug.cgi?id=106125 Text in iframe is clipped while printing Reviewed by Simon Fraser. Added new tests in fast/multicol and fast/region. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clampToStartAndEndRegions): Don't clamp when the RenderView is the containing block of an object in a RenderFlowThread. * rendering/RenderObject.cpp: (WebCore::RenderObject::containerForRepaint): Don't attempt any repaint container antics when we're in a seamless iframe, since the ancestor document will actually do the handoff into the flow thread. * rendering/RenderView.cpp: (WebCore::enclosingSeamlessRenderer): Heper function to test for an enclosing seamless iframe. (WebCore::RenderView::addChild): Subclass addChild on RenderView to properly set the inRenderFlowThread state for a seamless child document so thta it will check regions. (WebCore::RenderView::initializeLayoutState): New helper method for setting up the initial layout state of a RenderView. If inside a seamless paginated ancestor, set up the appropriate pagination information so the child document knows about it. This method will expand to inherit info about line grids and exclusions eventually also. (WebCore::RenderView::layout): Now calls initializeLayoutState to set up the layout state. * rendering/RenderView.h: (WebCore::RenderView::pageLogicalHeight): (WebCore::RenderView::setPageLogicalHeight): (RenderView): Fix the type of the page logical height methods to be LayoutUnit instead of unsigned. 2013-02-18 Sheriff Bot Unreviewed, rolling out r143145. http://trac.webkit.org/changeset/143145 https://bugs.webkit.org/show_bug.cgi?id=110143 Causes frequent crashes. (Requested by eric_carlson on #webkit). * dom/EventDispatchMediator.cpp: (WebCore::EventDispatchMediator::dispatchEvent): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): (WebCore::EventDispatcher::EventDispatcher): (WebCore::EventDispatcher::ensureEventPath): (WebCore::EventDispatcher::dispatchSimulatedClick): (WebCore::EventDispatcher::dispatchEventPreProcess): (WebCore::EventDispatcher::dispatchEventAtCapturing): (WebCore::EventDispatcher::dispatchEventAtTarget): (WebCore::EventDispatcher::dispatchEventAtBubbling): (WebCore::EventDispatcher::dispatchEventPostProcess): * dom/EventDispatcher.h: (EventDispatcher): (WebCore::EventDispatcher::node): (WebCore): * dom/FocusEvent.cpp: (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::dispatchEvent): (WebCore::FocusInEventDispatchMediator::dispatchEvent): (WebCore::FocusOutEventDispatchMediator::dispatchEvent): * dom/GestureEvent.cpp: (WebCore::GestureEventDispatchMediator::dispatchEvent): * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): 2013-02-18 Christophe Dumez [Soup] Free cookies explicitly in loops instead of using GOwnPtr https://bugs.webkit.org/show_bug.cgi?id=110103 Reviewed by Martin Robinson. Free cookies explicitly in loops instead of using GOwnPtr for this. Until now, the code was mixing both styles. This patch makes the code consistent one way. Adopting list items with GOwnPtr for the sole purpose to free them makes the freeing less obvious and may lead to mistakes if someone refactors the code and calls "break;" to abort loop iteration. No new tests, no behavior change. * platform/network/soup/CookieJarSoup.cpp: (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): 2013-02-18 Joseph Pecoraro [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript https://bugs.webkit.org/show_bug.cgi?id=109987 Reviewed by Pavel Feldman. Improved an existing test to cover this. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): Remove the sourceURL parsing and script.url replacement from the JSC implementation of ScriptDebugServer. The WebCore inspector code that this was added for already does this, at a more appropriate time. 2013-02-18 Mike West compareDocumentPosition reports disconnected nodes as following each other https://bugs.webkit.org/show_bug.cgi?id=108274 Reviewed by Dimitri Glazkov. jQuery has had to implement their own sorting mechanism in Sizzle[1] due to Node::compareDocumentPosition always reporting disconnected nodes as following each other. According to spec[2], we should instead be indicating that the result is (a) disconnected, (b) implementation specific, and (c) deterministically ordered. [1]: https://github.com/jquery/sizzle/commit/1c8aec91284af8d8c14447976235d5dd72b0d75e [2]: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition Test: fast/dom/compare-document-position-disconnected-nodes.html * dom/Node.cpp: (WebCore::Node::compareDocumentPosition): After walking the parentNode chain of both Nodes, compare the root. If the Nodes don't share a root, they're in distinct trees, and should return as described above. We determine which element "preceeds" the other in an arbitrary fashion via pointer comparison. 2013-02-18 Andrey Adaikin Web Inspector: [Canvas] fix replay log grouping by frames https://bugs.webkit.org/show_bug.cgi?id=110122 Reviewed by Pavel Feldman. Bug: log grouping by frames did not work if a frame end call is not a draw call. Drive-by: Last draw call group may not contain a draw call. In this case merge it into the previous group. * inspector/front-end/CanvasProfileView.js: (WebInspector.CanvasProfileView.prototype._appendCallNode): (WebInspector.CanvasProfileView.prototype._maybeMergeLastDrawCallGroups): 2013-02-18 Christophe Dumez [Soup] Superfluous HashMap check in SocketStreamHandleSoup::getHandleFromId() https://bugs.webkit.org/show_bug.cgi?id=110107 Reviewed by Martin Robinson. Remove Superfluous HashMap::contains() call in SocketStreamHandleSoup::getHandleFromId() as HashMap::get() will already return 0 in this case anyway. No new tests, no behavior change. * platform/network/soup/SocketStreamHandleSoup.cpp: (WebCore): (WebCore::getHandleFromId): 2013-02-18 Zan Dobersek Stop placing std::isfinite and std::signbit inside the global scope https://bugs.webkit.org/show_bug.cgi?id=109817 Reviewed by Darin Adler. Prefix calls to the isfinite and signbit methods with std:: as the two methods are no longer being imported into the global scope. No new tests as there's no change in functionality. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash): * bindings/js/JSDOMBinding.cpp: (WebCore::jsDateOrNull): * bindings/js/JSDOMBinding.h: (WebCore::finiteInt32Value): * bindings/v8/V8Binding.h: (WebCore::v8DateOrNull): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::parseToNumber): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValueAsNumber): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::setMin): (WebCore::HTMLMeterElement::setMax): (WebCore::HTMLMeterElement::setValue): (WebCore::HTMLMeterElement::setLow): (WebCore::HTMLMeterElement::setHigh): (WebCore::HTMLMeterElement::setOptimum): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::value): (WebCore::HTMLProgressElement::setValue): (WebCore::HTMLProgressElement::max): (WebCore::HTMLProgressElement::setMax): * html/MonthInputType.cpp: (WebCore::MonthInputType::valueAsDate): (WebCore::MonthInputType::defaultValueForStepUp): (WebCore::MonthInputType::parseToNumber): * html/NumberInputType.cpp: (WebCore::NumberInputType::typeMismatchFor): (WebCore::NumberInputType::sanitizeValue): (WebCore::NumberInputType::hasBadInput): * html/RangeInputType.cpp: (WebCore::RangeInputType::typeMismatchFor): * html/TimeInputType.cpp: (WebCore::TimeInputType::defaultValueForStepUp): * html/canvas/CanvasPathMethods.cpp: (WebCore::CanvasPathMethods::moveTo): (WebCore::CanvasPathMethods::lineTo): (WebCore::CanvasPathMethods::quadraticCurveTo): (WebCore::CanvasPathMethods::bezierCurveTo): (WebCore::CanvasPathMethods::arcTo): (WebCore::CanvasPathMethods::arc): (WebCore::CanvasPathMethods::rect): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setLineWidth): (WebCore::CanvasRenderingContext2D::setMiterLimit): (WebCore::CanvasRenderingContext2D::setShadowOffsetX): (WebCore::CanvasRenderingContext2D::setShadowOffsetY): (WebCore::CanvasRenderingContext2D::setShadowBlur): (WebCore::lineDashSequenceIsValid): (WebCore::CanvasRenderingContext2D::setLineDashOffset): (WebCore::CanvasRenderingContext2D::scale): (WebCore::CanvasRenderingContext2D::rotate): (WebCore::CanvasRenderingContext2D::translate): (WebCore::CanvasRenderingContext2D::transform): (WebCore::CanvasRenderingContext2D::setTransform): (WebCore::validateRectForCanvas): (WebCore::CanvasRenderingContext2D::isPointInPath): (WebCore::CanvasRenderingContext2D::isPointInStroke): (WebCore::CanvasRenderingContext2D::drawImage): (WebCore::CanvasRenderingContext2D::createLinearGradient): (WebCore::CanvasRenderingContext2D::createRadialGradient): (WebCore::CanvasRenderingContext2D::createImageData): (WebCore::CanvasRenderingContext2D::getImageData): (WebCore::CanvasRenderingContext2D::putImageData): (WebCore::CanvasRenderingContext2D::drawTextInternal): * html/parser/HTMLParserIdioms.cpp: (WebCore::parseToDoubleForNumberType): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTimelineElement::setDuration): * html/shadow/MediaControls.cpp: (WebCore::MediaControls::reset): * html/shadow/MediaControlsApple.cpp: (WebCore::MediaControlsApple::reset): * html/shadow/MediaControlsBlackBerry.cpp: (WebCore::MediaControlFullscreenTimelineElement::setDuration): (WebCore::MediaControlsBlackBerry::reset): * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::currentAge): (WebCore::CachedResource::freshnessLifetime): * page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): * platform/DateComponents.cpp: (WebCore::DateComponents::setMillisecondsSinceEpochForDate): (WebCore::DateComponents::setMillisecondsSinceEpochForDateTime): (WebCore::DateComponents::setMillisecondsSinceEpochForMonth): (WebCore::DateComponents::setMillisecondsSinceMidnight): (WebCore::DateComponents::setMonthsSinceEpoch): (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): * platform/Decimal.cpp: (WebCore::Decimal::fromDouble): * platform/FileSystem.h: (WebCore::isValidFileTime): * platform/LocalizedStrings.cpp: (WebCore::localizedMediaTimeDescription): * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::drawPatternToCairoContext): * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::addArc): (WebCore::Path::contains): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::addArc): * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: (WebCore::FullscreenVideoControllerGStreamer::timeToString): * platform/graphics/openvg/PathOpenVG.cpp: (WebCore::Path::addArc): * platform/graphics/skia/SkiaUtils.h: (WebCore::WebCoreFloatToSkScalar): (WebCore::WebCoreDoubleToSkScalar): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::maxTimeSeekable): * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::localizedMediaTimeDescription): * platform/mac/WebVideoFullscreenHUDWindowController.mm: (timeToString): * platform/network/ResourceResponseBase.cpp: (WebCore::parseDateValueInHeader): * platform/qt/LocalizedStringsQt.cpp: (WebCore::localizedMediaTimeDescription): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::resolveFlexibleLengths): * rendering/RenderMediaControlsChromium.cpp: (WebCore::formatChromiumMediaControlsTime): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::formatMediaControlsTime): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setFontSize): * svg/SVGPathParser.cpp: (WebCore::SVGPathParser::decomposeArcToCubic): * xml/XPathFunctions.cpp: (WebCore::XPath::FunRound::round): * xml/XPathValue.cpp: (WebCore::XPath::Value::toString): 2013-02-18 Chris Fleizach AX: Make iOS wrapper use the WebAccessibilityObjectBase wrapper https://bugs.webkit.org/show_bug.cgi?id=110077 Reviewed by David Kilzer. Make the iOS wrapper a subclass of the shared wrapper so that iOS can re-use code from the Mac. Rename the iOS file to reflect the class name. * WebCore.xcodeproj/project.pbxproj: * accessibility/ios/AXObjectCacheIOS.mm: (WebCore::AXObjectCache::attachWrapper): (WebCore::AXObjectCache::postPlatformNotification): * accessibility/ios/AccessibilityObjectWrapperIOS.h: Removed. * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Removed. * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.h. * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.mm. (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]): (-[WebAccessibilityObjectWrapper attachmentView]): (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]): 2013-02-18 Sheriff Bot Unreviewed, rolling out r143210. http://trac.webkit.org/changeset/143210 https://bugs.webkit.org/show_bug.cgi?id=110128 Still causing some test timeouts (Requested by anttik on #webkit). * platform/SharedTimer.h: (SharedTimer): (WebCore): (WebCore::MainThreadSharedTimer::stop): * platform/ThreadTimers.cpp: (WebCore::ThreadTimers::fireTimersInNestedEventLoop): * platform/mac/SharedTimerMac.mm: (WebCore): (WebCore::PowerObserver::restartSharedTimer): (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): 2013-02-18 Vladislav Kaznacheev Web Inspector: Disable hiding the debugger when it is below the source code https://bugs.webkit.org/show_bug.cgi?id=110106 Reviewed by Pavel Feldman. When the "Split horizontally" option is checked in the Sources panel the button responsible for the sidebar visibility is hidden and the sidebar is force-shown. Also set the "Split sidebar" option default to true. No new tests. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): * inspector/front-end/scriptsPanel.css: (.split-view-horizontal #scripts-debug-sidebar-resizer-widget): 2013-02-18 Bear Travis [CSS Exclusions] Support outside-shape layout for shape-inside property https://bugs.webkit.org/show_bug.cgi?id=102571 Reviewed by David Hyatt. A shape-inside value of 'outside-shape' should resolve to the value of the shape-outside property for layout. This patch introduces a helper method to resolve shape-inside in RenderStyle, and replaces calls to RenderStyle::shapeInside() when the resolved (layout) value should be used. Test: fast/exclusions/shape-inside/shape-inside-outside-shape.html * rendering/ExclusionShapeInfo.cpp: (WebCore::::computedShape): Use the resolved shape-inside getter. * rendering/ExclusionShapeInsideInfo.h: (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Ditto. (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Ditto. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): Ditto. (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto. * rendering/style/RenderStyle.h: Add the resolved shape inside getter. 2013-02-18 Pavel Feldman Web Inspector: hide vertical-sidebar-split in dock-to-right mode behind single experimental flag. https://bugs.webkit.org/show_bug.cgi?id=110119 Reviewed by Vsevolod Vlasov. Removed context menus, made it toggle automatically upon dock orientation change. * inspector/front-end/DockController.js: (WebInspector.DockController.prototype._toggleDockState): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired): (WebInspector.ElementsPanel.prototype._dockSideChanged): (WebInspector.ElementsPanel.prototype._setVerticalSplit): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems): (WebInspector.ScriptsPanel.prototype._dockSideChanged): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/inspector.css: * inspector/front-end/scriptsPanel.css: (#scripts-sidebar-stack-pane): (div.sidebar-pane-stack#scripts-debug-sidebar-contents): * inspector/front-end/tabbedPane.css: (.tabbed-pane): 2013-02-18 ChangSeok Oh [GTK] Fix nits for configuration https://bugs.webkit.org/show_bug.cgi?id=110083 Reviewed by Martin Robinson. Remove trailing white space. It has caused annoying warning while configuration. No new tests since no funtionality change. * GNUmakefile.list.am: 2013-02-18 Kondapally Kalyan [WebGL][EFL] Refactor GraphicsContext3DPrivate to add support for SharedContext. https://bugs.webkit.org/show_bug.cgi?id=109988 Reviewed by Kenneth Rohde Christiansen. Covered by existing WebGL tests. This patch refactors PlatformContext and GraphicsContext3DPrivate to add support for Shared Context. This would help share GL resources between transport surface and offscreen surface without having to worry about the context state. So far, we used the same drawable as transport surface and offscreen surface. After this patch we use pixmap surface as offscreen surface and use shared context to render texture content to transport surface. This would also align as to how shared surface is implemented on EFL and Qt ports. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore): (WebCore::GraphicsContext3DPrivate::initialize): (WebCore::GraphicsContext3DPrivate::makeSharedContextCurrent): (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface): * platform/graphics/efl/GraphicsContext3DPrivate.h: (GraphicsContext3DPrivate): * platform/graphics/opengl/GLPlatformContext.cpp: (WebCore::GLPlatformContext::initialize): * platform/graphics/opengl/GLPlatformContext.h: Needed changes to take shared context into use. * platform/graphics/opengl/GLPlatformSurface.cpp: (WebCore::GLPlatformSurface::createOffScreenSurface): (WebCore::GLPlatformSurface::updateContents): * platform/graphics/opengl/GLPlatformSurface.h: (GLPlatformSurface): * platform/graphics/surfaces/glx/GLXConfigSelector.h: (WebCore::GLXConfigSelector::GLXConfigSelector): (WebCore::GLXConfigSelector::visualInfo): (WebCore::GLXConfigSelector::pixmapContextConfig): (GLXConfigSelector): (WebCore::GLXConfigSelector::reset): * platform/graphics/surfaces/glx/GLXContext.cpp: Added support to query configiration supporting pixmap surface. (WebCore::GLXOffScreenContext::initialize): * platform/graphics/surfaces/glx/GLXContext.h: (GLXOffScreenContext): * platform/graphics/surfaces/glx/GLXSurface.cpp: (WebCore::GLXTransportSurface::GLXTransportSurface): (WebCore::GLXTransportSurface::swapBuffers): (WebCore::GLXOffScreenSurface::GLXOffScreenSurface): (WebCore::GLXOffScreenSurface::~GLXOffScreenSurface): (WebCore::GLXOffScreenSurface::initialize): (WebCore::GLXOffScreenSurface::configuration): (WebCore::GLXOffScreenSurface::destroy): (WebCore::GLXOffScreenSurface::freeResources): (WebCore::GLXOffScreenSurface::setGeometry): Renamed GLXPBuffer surface as GLXOffScreenSurface. * platform/graphics/surfaces/glx/GLXSurface.h: (GLXTransportSurface): (GLXOffScreenSurface): * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: (WebCore::GraphicsSurfacePrivate::createSurface): * platform/graphics/surfaces/glx/X11Helper.cpp: (WebCore::X11Helper::createPixmap): (WebCore): (WebCore::X11Helper::destroyPixmap): (WebCore::X11Helper::createOffScreenWindow): * platform/graphics/surfaces/glx/X11Helper.h: (X11Helper): Added functions to create and destroy pixmap. 2013-02-18 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: Generate meta information for HeapSnapshot parser. https://bugs.webkit.org/show_bug.cgi?id=110104 Reviewed by Yury Semikhatsky. The format of Native heap snapshot is slightly different so it should provide its own meta information. * inspector/HeapGraphSerializer.cpp: (WebCore::HeapGraphSerializer::HeapGraphSerializer): (WebCore::HeapGraphSerializer::finish): (WebCore::HeapGraphSerializer::reportMemoryUsage): (WebCore::HeapGraphSerializer::registerTypeString): (WebCore): * inspector/HeapGraphSerializer.h: (HeapGraphSerializer): * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl): * inspector/InspectorMemoryAgent.h: (InspectorMemoryAgent): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex): * inspector/front-end/NativeHeapSnapshot.js: (WebInspector.NativeHeapSnapshot): 2013-02-18 Carlos Garcia Campos [GTK] Force single header includes in GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=104676 Reviewed by Xan Lopez. Only including should be allowed from apps. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateHeader): * bindings/scripts/gobject-generate-headers.pl: * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: * bindings/scripts/test/GObject/WebKitDOMTestException.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestNode.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: 2013-02-16 Antti Koivisto Reschedule shared CFRunLoopTimer instead of reconstructing it https://bugs.webkit.org/show_bug.cgi?id=109765 Reviewed by Andreas Kling. Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers. * platform/SharedTimer.h: (WebCore::SharedTimer::willEnterNestedEventLoop): (WebCore): (MainThreadSharedTimer): (WebCore::MainThreadSharedTimer::willEnterNestedEventLoop): * platform/ThreadTimers.cpp: (WebCore::ThreadTimers::fireTimersInNestedEventLoop): * platform/mac/SharedTimerMac.mm: (WebCore): (WebCore::PowerObserver::clearSharedTimer): (WebCore::ensurePowerObserver): (WebCore::sharedTimer): (WebCore::reinsertSharedTimer): Before entering nested runloop (used for inspector debugger mostly) reconstruct and reinsert the timer. For some reason the timer doesn't fire otherwise. (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): 2013-02-18 Alexander Pavlov Web Inspector: [Resources] Only remember the tree element selection if explicitly made by user https://bugs.webkit.org/show_bug.cgi?id=110105 Reviewed by Pavel Feldman. This change instructs the Resources panel to remember the selected tree element only if it has been selected by the user (not automatically, like selecting a parent when its child is removed). All onselect() overrides pass the selectedByUser argument value to BaseStorageTreeElement.prototype.onselect. Drive-by: Use === comparisons everywhere. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._reset): Do not detach [immutable] category views. (WebInspector.BaseStorageTreeElement.prototype.onselect): Remember itemURL on user gesture only. (WebInspector.StorageCategoryTreeElement.prototype.onselect): (WebInspector.FrameTreeElement.prototype.onselect): (WebInspector.FrameResourceTreeElement.prototype.onselect): (WebInspector.DatabaseTreeElement.prototype.onselect): (WebInspector.DatabaseTableTreeElement.prototype.onselect): (WebInspector.IDBDatabaseTreeElement.prototype.onselect): (WebInspector.IDBObjectStoreTreeElement.prototype.onselect): (WebInspector.IDBIndexTreeElement.prototype.onselect): (WebInspector.DOMStorageTreeElement): (WebInspector.DOMStorageTreeElement.prototype.onselect): (WebInspector.CookieTreeElement.prototype.onselect): (WebInspector.ApplicationCacheManifestTreeElement.prototype.onselect): (WebInspector.ApplicationCacheFrameTreeElement.prototype.onselect): (WebInspector.FileSystemTreeElement.prototype.onselect): (WebInspector.FileSystemTreeElement.prototype.clear): (WebInspector.ResourcesSearchController.prototype.nextSearchResult): 2013-02-18 Vladislav Kaznacheev Web Inspector: Color picker should not be available in Computed Styles pane https://bugs.webkit.org/show_bug.cgi?id=109697 Reviewed by Pavel Feldman. Refactored PropertiesSection and TreeElement inheritors in StylesSidebarPane.js for cleaner separation of read-only and editable properties. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): (WebInspector.ComputedStylePropertiesSection): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.BlankStylePropertiesSection): (WebInspector.StylePropertyTreeElementBase): (WebInspector.StylePropertyTreeElementBase.prototype.node): (WebInspector.StylePropertyTreeElementBase.prototype.editablePane): (WebInspector.StylePropertyTreeElementBase.prototype.onattach): (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.linkifyURL): (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.): (WebInspector.StylePropertyTreeElementBase.prototype): (.event): (.isRevert): 2013-02-18 Andrey Adaikin Web Inspector: [Canvas] group replay log calls by frames https://bugs.webkit.org/show_bug.cgi?id=110101 Reviewed by Pavel Feldman. Group canvas replay log by frames, then by draw calls. * inspector/InjectedScriptCanvasModuleSource.js: (.): * inspector/Inspector.json: * inspector/front-end/CanvasProfileView.js: (WebInspector.CanvasProfileView): (WebInspector.CanvasProfileView.prototype.dispose): (WebInspector.CanvasProfileView.prototype._appendCallNode): (WebInspector.CanvasProfileView.prototype._appendDrawCallGroup): 2013-02-18 Christophe Dumez [Soup] CookieJarSoup::deleteCookie() should stop looking for the cookie after it is removed https://bugs.webkit.org/show_bug.cgi?id=110100 Reviewed by Kenneth Rohde Christiansen. CookieJarSoup::deleteCookie() retrieves the list of cookies that apply to a given URL, then iterates through the cookies to find the one with the right name and delete it. However, the current implementation keeps on comparing cookie names after the cookie was removed. This patch introduces a "wasDeleted" boolean to stop comparing cookie names after the cookie was deleted. Note that we cannot break as soon as the cookie is found as we need to keep iterating so that the cookies get freed by GOwnPtr. No new tests, no behavior change. * platform/network/soup/CookieJarSoup.cpp: (WebCore::deleteCookie): 2013-02-18 Vsevolod Vlasov Web Inspector: Create separate project for each domain for UISourceCode based on browser resources. https://bugs.webkit.org/show_bug.cgi?id=109691 Reviewed by Pavel Feldman. Separate project of certain type is now created for each domain. UISourceCode path represents a path in the project now. UISourceCode uri is now calculated based on project id and path. It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods. * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath): (WebInspector.FileSystemProjectDelegate.prototype.setFileContent): (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded): (WebInspector.FileSystemProjectDelegate.prototype._populate): (WebInspector.FileSystemProjectDelegate.prototype._removeFile): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleProjectDelegate): (WebInspector.SimpleProjectDelegate.projectId): (WebInspector.SimpleProjectDelegate.prototype.id): (WebInspector.SimpleProjectDelegate.prototype.displayName): (WebInspector.SimpleProjectDelegate.prototype.addFile): (WebInspector.SimpleWorkspaceProvider): (WebInspector.SimpleWorkspaceProvider.splitURL): (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL): (WebInspector.SimpleWorkspaceProvider.uriForURL): (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL): (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile): (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName): (WebInspector.SimpleWorkspaceProvider.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.uri): (WebInspector.UISourceCode.path): (WebInspector.UISourceCode.prototype.uri): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype._fileRemoved): (WebInspector.Project.prototype.uiSourceCodeForURI): 2013-02-18 Gyuyoung Kim [EFL] Rebaseline failure media tests after r142947 https://bugs.webkit.org/show_bug.cgi?id=109904 Reviewed by Kenneth Rohde Christiansen. * css/mediaControlsEfl.css: Align time text vertically. (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): 2013-02-18 Vsevolod Vlasov Web Inspector: Extract FileSystemUtils from FileSystemProjectDelegate as IsolatedFileSystem class. https://bugs.webkit.org/show_bug.cgi?id=110086 Reviewed by Pavel Feldman. Extracted IsolatedFileSystem class that could be mocked for tests now. Renamed IsolatedFileSystemModel to IsolatedFileSystemManager. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate): (WebInspector.FileSystemProjectDelegate.prototype.id): (WebInspector.FileSystemProjectDelegate.prototype.displayName): (WebInspector.FileSystemProjectDelegate.prototype.setFileContent): (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded): (WebInspector.FileSystemProjectDelegate.prototype._populate): * inspector/front-end/IsolatedFileSystem.js: Added. (WebInspector.IsolatedFileSystem): (WebInspector.IsolatedFileSystem.errorMessage): (WebInspector.IsolatedFileSystem.prototype.id): (WebInspector.IsolatedFileSystem.prototype.path): (WebInspector.IsolatedFileSystem.prototype._requestFileSystem): (WebInspector.IsolatedFileSystem.prototype.fileSystemLoaded): (WebInspector.IsolatedFileSystem.prototype.innerCallback): (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive): (WebInspector.IsolatedFileSystem.prototype.fileEntryLoaded): (WebInspector.IsolatedFileSystem.prototype.fileLoaded): (WebInspector.IsolatedFileSystem.prototype.readerLoadEnd): (WebInspector.IsolatedFileSystem.prototype.errorHandler): (WebInspector.IsolatedFileSystem.prototype.requestFileContent): (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated.fileTruncated): (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated): (WebInspector.IsolatedFileSystem.prototype.writerEnd): (WebInspector.IsolatedFileSystem.prototype.setFileContent): (WebInspector.IsolatedFileSystem.prototype.): (WebInspector.IsolatedFileSystem.prototype.toArray): (WebInspector.IsolatedFileSystem.prototype._readDirectory): (WebInspector.IsolatedFileSystem.prototype._requestEntries): * inspector/front-end/IsolatedFileSystemManager.js: Renamed from Source/WebCore/inspector/front-end/IsolatedFileSystemModel.js. (WebInspector.IsolatedFileSystemManager): (WebInspector.IsolatedFileSystemManager.prototype.mapping): (WebInspector.IsolatedFileSystemManager.prototype.supportsFileSystems): (WebInspector.IsolatedFileSystemManager.prototype._requestFileSystems): (WebInspector.IsolatedFileSystemManager.prototype.addFileSystem): (WebInspector.IsolatedFileSystemManager.prototype.removeFileSystem): (WebInspector.IsolatedFileSystemManager.prototype._fileSystemsLoaded): (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem): (WebInspector.IsolatedFileSystemManager.prototype._fileSystemPaths): (WebInspector.IsolatedFileSystemManager.prototype._processPendingFileSystemRequests): (WebInspector.IsolatedFileSystemManager.prototype._fileSystemAdded): (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved): (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem): (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem): (WebInspector.IsolatedFileSystemDispatcher): (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemsLoaded): (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemRemoved): (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemAdded): * inspector/front-end/SettingsScreen.js: (WebInspector.WorkspaceSettingsTab.prototype._createFileSystemsEditor): (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow.removeFileSystemClicked): (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemClicked): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2013-02-18 Huang Dongsung [EFL][WK2] compositing/layer-creation/fixed-position-out-of-view-scaled.html is flaky https://bugs.webkit.org/show_bug.cgi?id=110059 Reviewed by Kenneth Rohde Christiansen. Remove the ASSERT check in TextureMapperLayer. This assertion seems valid because CoordinatedGraphicsScene::adjustPositionForFixedLayers() calls TextureMapperLayer::setScrollPositionDeltaIfNeeded() when the graphics layer is a fixed position layer. However, the assertion can be failed because it is possible that TextureMapperLayer is a non-fixed position layer when the graphics layer that holds the TextureMapperLayer is a fixed position layer. When CoordinatedGraphicsScene flushes, TextureMapperLayer becomes a fixed position layer. No new tests. No change in behavior. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded): 2013-02-18 Grzegorz Czajkowski [WK2][EFL] Unified text checker implementation https://bugs.webkit.org/show_bug.cgi?id=107682 Reviewed by Anders Carlsson. No new tests, covered by editing/spelling tests. * platform/text/TextChecking.h: (WebCore): Enabling unified text checker feature for WebKit-EFL. 2013-02-18 Nico Weber [chromium/clang] Remove -Wno-return-type-c-linkage https://bugs.webkit.org/show_bug.cgi?id=110098 Reviewed by Jochen Eisinger. The one instance where this triggered was removed in http://trac.webkit.org/changeset/141184 . A clang that has this warning landed in chromium r182694, so it should be safe to turn the warning on now. * WebCore.gyp/WebCore.gyp: 2013-02-18 Pavel Feldman Web Inspector: provide basic console.table implementation (no [,columns] support) https://bugs.webkit.org/show_bug.cgi?id=109453 Reviewed by Vsevolod Vlasov. Test: inspector/console/console-format-table.html Using console preview infrastructure to support console.table. * English.lproj/localizedStrings.js: * inspector/ConsoleAPITypes.h: * inspector/ConsoleMessage.cpp: (WebCore::messageTypeValue): (WebCore::ConsoleMessage::addToFrontend): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::wrapObject): (WebCore): (WebCore::InjectedScript::wrapTable): * inspector/InjectedScript.h: (InjectedScript): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl): (WebInspector.ConsoleMessageImpl.prototype.willHide): (WebInspector.ConsoleMessageImpl.prototype._format): (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview): (WebInspector.ConsoleMessageImpl.prototype._renderPropertyPreview): (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable): * inspector/front-end/ConsoleModel.js: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._appendConsoleMessage): (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._updateMessageList): (WebInspector.ConsoleCommand.prototype.wasShown): (WebInspector.ConsoleCommand.prototype.willHide): (WebInspector.ConsoleGroup.prototype.addMessage): * inspector/front-end/DataGrid.js: (.sortDataGrid.comparator): (.sortDataGrid): (WebInspector.DataGrid.createSortableDataGrid): (WebInspector.DataGrid.prototype.renderInline): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): * inspector/front-end/dataGrid.css: (.data-grid.inline): (.data-grid.inline td.corner): * inspector/front-end/resourcesPanel.css: (.storage-view > .data-grid): * page/Console.cpp: (WebCore::Console::table): (WebCore): * page/Console.h: (Console): * page/Console.idl: 2013-02-18 Vsevolod Vlasov Web Inspector: JavaScriptSourceFrame should inherit UISourceCodeFrame https://bugs.webkit.org/show_bug.cgi?id=110091 Reviewed by Pavel Feldman. Removed duplicated code from JavaScriptSourceFrame and made it inherit UISourceCodeFrame. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged): (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/UISourceCodeFrame.js: (WebInspector.UISourceCodeFrame.prototype.canEditSource): (WebInspector.UISourceCodeFrame.prototype.onTextChanged): (WebInspector.UISourceCodeFrame.prototype._onFormattedChanged): (WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged): (WebInspector.UISourceCodeFrame.prototype._innerSetContent): 2013-02-18 Vsevolod Vlasov Web Inspector: Remove unused _files field in FileSystemProjectDelegate https://bugs.webkit.org/show_bug.cgi?id=110082 Reviewed by Pavel Feldman. * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate): (WebInspector.FileSystemProjectDelegate.prototype._addFile): (WebInspector.FileSystemProjectDelegate.prototype._removeFile): 2013-02-18 Pavel Feldman Web Inspector: allow 0 as a formatted parameter in console message. https://bugs.webkit.org/show_bug.cgi?id=110096 Reviewed by Vsevolod Vlasov. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype.append): (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString): 2013-02-18 Ilya Tikhonovsky Unreviewed speculative fix for Chromium Mac. * WebCore.gypi: 2013-02-13 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly. https://bugs.webkit.org/show_bug.cgi?id=109554 In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we can't insert 0 into hashmap. It happens when we call addPrivateBuffer method. Drive by fix: I introduced a client interface for the HeapGraphSerializer. It helps me to do the tests for the serializer. Reviewed by Yury Semikhatsky. It is covered by newly added tests in TestWebKitAPI. * inspector/HeapGraphSerializer.cpp: (WebCore::HeapGraphSerializer::HeapGraphSerializer): (WebCore::HeapGraphSerializer::pushUpdate): (WebCore::HeapGraphSerializer::reportNode): (WebCore::HeapGraphSerializer::toNodeId): (WebCore::HeapGraphSerializer::addRootNode): * inspector/HeapGraphSerializer.h: (HeapGraphSerializer): (Client): (WebCore::HeapGraphSerializer::Client::~Client): * inspector/InspectorMemoryAgent.cpp: (WebCore): (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl): 2013-02-18 Sheriff Bot Unreviewed, rolling out r143100. http://trac.webkit.org/changeset/143100 https://bugs.webkit.org/show_bug.cgi?id=110088 Breaks file system support in workspace. (Requested by vsevik on #webkit). * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleProjectDelegate): (WebInspector.SimpleProjectDelegate.prototype.id): (WebInspector.SimpleProjectDelegate.prototype.displayName): (WebInspector.SimpleProjectDelegate.prototype.addFile): (WebInspector.SimpleWorkspaceProvider): (WebInspector.SimpleWorkspaceProvider.uriForURL): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL): (WebInspector.SimpleWorkspaceProvider.prototype.removeFile): (WebInspector.SimpleWorkspaceProvider.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.uri): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype._fileRemoved): (WebInspector.Project.prototype.uiSourceCodeForURI): (WebInspector.Workspace.prototype.projectForUISourceCode): 2013-02-15 Eugene Klyuchnikov Web Inspector: Introduce ProfilesPanelDescriptor. https://bugs.webkit.org/show_bug.cgi?id=109906 Reviewed by Pavel Feldman. Some constants/methods should be accesible before ProfilesPanel is instantiated. Extracted methods to check if profile is "user-initiated" and what is its index. Also profile URL regexp moved to ProfilesPanelDescriptor. * inspector/front-end/ProfilesPanelDescriptor.js: Added. * WebCore.gypi: Added ProfilesPanelDescriptor.js * WebCore.vcproj/WebCore.vcproj: Ditto. * inspector/compile-front-end.py: Ditto. * inspector/front-end/WebKit.qrc: Ditto. * inspector/front-end/inspector.html: Ditto. * inspector/front-end/HeapSnapshotView.js: Adopted changes. * inspector/front-end/ProfilesPanel.js: Ditto. * inspector/front-end/externs.js: Ditto. * inspector/front-end/inspector.js: Ditto. 2013-02-17 Dimitri Glazkov Stop passing around SelectorChecker in SelectorQuery, now that it's stack-allocated. https://bugs.webkit.org/show_bug.cgi?id=110038 Reviewed by Andreas Kling. No functional changes, covered by existing tests. * dom/SelectorQuery.cpp: (WebCore::SelectorDataList::matches): Moved instantiation of SelectorChecker in here. (WebCore::SelectorDataList::queryAll): Got rid of unneeded SelectorChecker arg. (WebCore::SelectorDataList::queryFirst): Ditto. (WebCore::SelectorDataList::execute): Moved instantiation of SelectorChecker in here. (WebCore::SelectorQuery::matches): Removed instantiation of SelectorChecker here. (WebCore::SelectorQuery::queryAll): Ditto. (WebCore::SelectorQuery::queryFirst): Ditto. * dom/SelectorQuery.h: (WebCore): Tweaked headers to make SelectorChecker just an implementation detail. (SelectorDataList): Tweaked decls to remove SelectorChecker args. 2013-02-17 Dimitri Glazkov Stop passing around SelectorChecker in ContentSelectorQuery. https://bugs.webkit.org/show_bug.cgi?id=110041 Now that SelectorChecker has no interesting state, we can simplify ContentSelectorQuery and get rid of a class. Reviewed by Andreas Kling. No functional changes, covered by existing tests. * html/shadow/ContentSelectorQuery.cpp: (WebCore::ContentSelectorDataList::checkContentSelector): Zapped ContentSelectorChecker and moved its only remaining method here. (WebCore::ContentSelectorDataList::matches): Removed SelectorChecker argument. (WebCore::ContentSelectorQuery::ContentSelectorQuery): Removed an unnecessary member. (WebCore::ContentSelectorQuery::matches): Removed unnecessary argument. * html/shadow/ContentSelectorQuery.h: (WebCore): Cleaned up the file. (ContentSelectorDataList): Updated decls. (ContentSelectorQuery): Ditto. 2013-02-17 Mike West WheelEvent should not target text nodes. https://bugs.webkit.org/show_bug.cgi?id=109939 Reviewed by Darin Adler. WheelEvent, like other mouse events, should not target text nodes. EventHandler correctly handles other mouse events by retargeting events to text nodes' parents; this patch adds that logic to the WheelEvent handler. This should allow jQuery to stop working around WebKit's behavior[1]. [1]: https://github.com/jquery/jquery/commit/c61150427fc8ccc8e884df8f221a6c9bb5477929 Test: fast/events/wheelevent-in-text-node.html * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): If a WheelEvent's hit test lands on a text node, retarget the event to the text node's parent. Do this before latching the node. 2013-02-17 Filip Pizlo Move all Structure out-of-line inline methods to StructureInlines.h https://bugs.webkit.org/show_bug.cgi?id=110024 Rubber stamped by Sam Weinig. No new tests because no new behavior. Just rewiring includes. * ForwardingHeaders/parser/SourceProviderCache.h: Added. * loader/cache/CachedScript.cpp: 2013-02-17 Hayato Ito Make EventDispatcher take an Event object in its constructor. https://bugs.webkit.org/show_bug.cgi?id=109898 Reviewed by Dimitri Glazkov. That makes EventDispatcher more RAII-like so that we can calculate an EventPath in its constructor. I'll remove EventDispatcher::ensureEventPath() in a following patch. No tests. No change in behavior. * dom/EventDispatchMediator.cpp: (WebCore::EventDispatchMediator::dispatchEvent): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): (WebCore::EventDispatcher::EventDispatcher): (WebCore::EventDispatcher::ensureEventPath): (WebCore::EventDispatcher::dispatchSimulatedClick): (WebCore::EventDispatcher::dispatch): (WebCore::EventDispatcher::dispatchEventPreProcess): (WebCore::EventDispatcher::dispatchEventAtCapturing): (WebCore::EventDispatcher::dispatchEventAtTarget): (WebCore::EventDispatcher::dispatchEventAtBubbling): (WebCore::EventDispatcher::dispatchEventPostProcess): * dom/EventDispatcher.h: (EventDispatcher): (WebCore::EventDispatcher::node): (WebCore::EventDispatcher::event): * dom/FocusEvent.cpp: (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::dispatchEvent): (WebCore::FocusInEventDispatchMediator::dispatchEvent): (WebCore::FocusOutEventDispatchMediator::dispatchEvent): * dom/GestureEvent.cpp: (WebCore::GestureEventDispatchMediator::dispatchEvent): * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): 2013-02-17 Philip Rogers Fix non-root SVG viewport under zoom https://bugs.webkit.org/show_bug.cgi?id=99453 Reviewed by Dirk Schulze. The root SVG element handles zoom differently than other SVG nodes because it needs to translate between CSS (where zoom is applied to all units) and SVG (where zoom is only applied at the top level). A good description of this difference can be found here: http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp?rev=142855#L2598 SVG elements can appear as children in the SVG tree as well, and in this mode SVGSVGElement should not consider the current zoom level. This patch fixes a bug where non-root viewport calculations were removing zoom. Test: svg/custom/symbol-zoom.html * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::currentViewportSize): This change removes the unnecessary zoom calculation for non-root nodes. This is similar to how zoom is handled elsewhere, e.g., SVGSVGElement::localCoordinateSpaceTransform. 2013-02-17 Chris Fleizach AX: Upstream iOS Accessibility files https://bugs.webkit.org/show_bug.cgi?id=110071 Reviewed by David Kilzer. Upstream the iOS Accessibility files for WebCore. * WebCore.xcodeproj/project.pbxproj: * accessibility/ios: Added. * accessibility/ios/AXObjectCacheIOS.mm: Added. (WebCore): (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::nodeTextChangePlatformNotification): (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::handleScrolledToAnchor): * accessibility/ios/AccessibilityObjectIOS.mm: Added. (-[WAKView accessibilityIsIgnored]): (WebCore): (WebCore::AccessibilityObject::detachFromParent): (WebCore::AccessibilityObject::overrideAttachmentParent): (WebCore::AccessibilityObject::accessibilityPasswordFieldLength): (WebCore::AccessibilityObject::accessibilityIgnoreAttachment): (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): * accessibility/ios/AccessibilityObjectWrapperIOS.h: Added. (WAKView): * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Added. (AccessibilityUnignoredAncestor): (-[WebAccessibilityTextMarker initWithTextMarker:cache:]): (-[WebAccessibilityTextMarker initWithData:cache:]): (-[WebAccessibilityTextMarker initWithData:accessibilityObject:]): (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]): (-[WebAccessibilityTextMarker dataRepresentation]): (-[WebAccessibilityTextMarker visiblePosition]): (-[WebAccessibilityTextMarker description]): (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]): (-[WebAccessibilityObjectWrapper detach]): (-[WebAccessibilityObjectWrapper dealloc]): (-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]): (-[WebAccessibilityObjectWrapper accessibilityObject]): (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]): (-[WebAccessibilityObjectWrapper accessibilityPostProcessHitTest:]): (-[WebAccessibilityObjectWrapper accessibilityHitTest:]): (-[WebAccessibilityObjectWrapper accessibilityElementCount]): (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]): (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]): (-[WebAccessibilityObjectWrapper accessibilityLanguage]): (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]): (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]): (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]): (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]): (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]): (-[WebAccessibilityObjectWrapper accessibilityTraits]): (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): (-[WebAccessibilityObjectWrapper isAccessibilityElement]): (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]): (-[WebAccessibilityObjectWrapper accessibilityLabel]): (-[WebAccessibilityObjectWrapper tableCellParent]): (-[WebAccessibilityObjectWrapper tableParent]): (-[WebAccessibilityObjectWrapper accessibilityTitleElement]): (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]): (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]): (-[WebAccessibilityObjectWrapper accessibilityRowRange]): (-[WebAccessibilityObjectWrapper accessibilityColumnRange]): (-[WebAccessibilityObjectWrapper accessibilityPlaceholderValue]): (-[WebAccessibilityObjectWrapper accessibilityValue]): (-[WebAccessibilityObjectWrapper accessibilityIsComboBox]): (-[WebAccessibilityObjectWrapper accessibilityHint]): (-[WebAccessibilityObjectWrapper accessibilityURL]): (-[WebAccessibilityObjectWrapper _convertIntRectToScreenCoordinates:]): (-[WebAccessibilityObjectWrapper accessibilityElementRect]): (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]): (-[WebAccessibilityObjectWrapper accessibilityFrame]): (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]): (-[WebAccessibilityObjectWrapper accessibilityContainer]): (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]): (-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]): (-[WebAccessibilityObjectWrapper _accessibilityNextElementsWithCount:]): (-[WebAccessibilityObjectWrapper _accessibilityPreviousElementsWithCount:]): (-[WebAccessibilityObjectWrapper accessibilityRequired]): (-[WebAccessibilityObjectWrapper accessibilityFlowToElements]): (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]): (-[WebAccessibilityObjectWrapper isAttachment]): (-[WebAccessibilityObjectWrapper _accessibilityActivate]): (-[WebAccessibilityObjectWrapper attachmentView]): (rendererForView): (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]): (-[WebAccessibilityObjectWrapper postFocusChangeNotification]): (-[WebAccessibilityObjectWrapper postSelectedTextChangeNotification]): (-[WebAccessibilityObjectWrapper postLayoutChangeNotification]): (-[WebAccessibilityObjectWrapper postLiveRegionChangeNotification]): (-[WebAccessibilityObjectWrapper postLoadCompleteNotification]): (-[WebAccessibilityObjectWrapper postChildrenChangedNotification]): (-[WebAccessibilityObjectWrapper postInvalidStatusChangedNotification]): (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]): (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]): (-[WebAccessibilityObjectWrapper accessibilityIncreaseSelection:]): (-[WebAccessibilityObjectWrapper accessibilityDecreaseSelection:]): (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]): (-[WebAccessibilityObjectWrapper accessibilityIncrement]): (-[WebAccessibilityObjectWrapper accessibilityDecrement]): (-[WebAccessibilityObjectWrapper _addAccessibilityObject:toTextMarkerArray:]): (-[WebAccessibilityObjectWrapper stringForTextMarkers:]): (blockquoteLevel): (AXAttributeStringSetBlockquoteLevel): (AXAttributeStringSetHeadingLevel): (AXAttributeStringSetFont): (AXAttributeStringSetNumber): (AXAttributeStringSetStyle): (AXAttributedStringAppendText): (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]): (-[WebAccessibilityObjectWrapper _convertToNSRange:]): (-[WebAccessibilityObjectWrapper _convertToDOMRange:]): (-[WebAccessibilityObjectWrapper positionForTextMarker:]): (-[WebAccessibilityObjectWrapper textMarkerRange]): (-[WebAccessibilityObjectWrapper elementTextRange]): (-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]): (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): (-[WebAccessibilityObjectWrapper textMarkerForPosition:]): (-[WebAccessibilityObjectWrapper _stringForRange:attributed:]): (-[WebAccessibilityObjectWrapper stringForRange:]): (-[WebAccessibilityObjectWrapper attributedStringForRange:]): (-[WebAccessibilityObjectWrapper elementsForRange:]): (-[WebAccessibilityObjectWrapper selectionRangeString]): (-[WebAccessibilityObjectWrapper selectedTextMarker]): (-[WebAccessibilityObjectWrapper lineEndMarkerForMarker:]): (-[WebAccessibilityObjectWrapper lineStartMarkerForMarker:]): (-[WebAccessibilityObjectWrapper nextMarkerForMarker:]): (-[WebAccessibilityObjectWrapper previousMarkerForMarker:]): (-[WebAccessibilityObjectWrapper frameForTextMarkers:]): (-[WebAccessibilityObjectWrapper textMarkerForPoint:]): (-[WebAccessibilityObjectWrapper accessibilityIdentifier]): (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]): (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]): (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]): (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]): (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]): (-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]): (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]): (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]): (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]): (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]): (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]): (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]): (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]): (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]): (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]): (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]): (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]): (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]): (-[WebAccessibilityObjectWrapper accessibilityMathType]): (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]): (-[WebAccessibilityObjectWrapper description]): 2013-02-17 Chris Fleizach AX: rename WebAccessibilityObjectWrapper to WebAccessibilityObjectWrapperBase https://bugs.webkit.org/show_bug.cgi?id=110061 Reviewed by David Kilzer. Rename the base accessibility wrapper class so that the iOS class can share the same name. * WebCore.xcodeproj/project.pbxproj: * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::attachWrapper): * accessibility/mac/WebAccessibilityObjectWrapper.h: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h. * accessibility/mac/WebAccessibilityObjectWrapper.mm: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm. * accessibility/mac/WebAccessibilityObjectWrapperBase.h: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.h. * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm. * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed. 2013-02-17 Andreas Kling REGRESSION(r143125): ~5% performance hit on Chromium's intl2 page cycler. Reviewed by Ojan Vafai. Streamline the case where GlyphPage has a per-glyph SimpleFontData* lookup table to allow taking earlier branches on pages with lots of mixed-font text. We accomplish this by explicitly storing a null SimpleFontData* for glyph #0 in the per-glyph lookup table instead of relying on "if (!glyph)" checks in getters. This is a speculative optimization, I can't get stable enough numbers locally to tell if this will resolve the issue on the bots. * platform/graphics/GlyphPage.h: (WebCore::GlyphPage::glyphDataForIndex): (WebCore::GlyphPage::fontDataForCharacter): (WebCore::GlyphPage::setGlyphDataForIndex): 2013-02-17 Chris Fleizach WebSpeech: plumb through a method to generate fake speech jobs for testing https://bugs.webkit.org/show_bug.cgi?id=107351 Reviewed by Adam Barth. We can't reliably use the platforms synthesizer to test speech synthesis internals. This patch adds an Internals method to enable a mock synthesizer, which is inherits from the PlatformSpeechSythesizer. The fake synthesizer goes through all the motions of a real synthesizer but doesn't do anything. A bunch of changes were needed here to make PlatformSpeechSynthesizer subclassable so that the right virtual are used. The Mock synthesizer only lives in WebCoreTestSupport. Because PlatformSpeechSynthesizer uses a RetainPtr, I needed to make WebCoreTestSupport link CoreFoundation 2013-02-17 Csaba Osztrogonác [Qt] Unreviewed buildfix for !USE(LIBXML) builds after r143112. * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2013-02-17 Andreas Kling Optimize GlyphPage for case where all glyphs are available in the same font. Reviewed by Antti Koivisto. Let GlyphPage begin optimistically assuming that all its glyphs will be represented in the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*. If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData* is allocated transparently. This was landed before with some bogus branch prediction hints and didn't fare well on page cyclers (intl2 specifically.) These have been removed this time around, and will hopefully be regression-free. 4.98 MB progression on Membuster3. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): * platform/graphics/GlyphPage.h: (WebCore::GlyphPage::createUninitialized): (WebCore::GlyphPage::createZeroedSystemFallbackPage): (WebCore::GlyphPage::createCopiedSystemFallbackPage): There are now three ways of constructing a GlyphPage, two of them are only used for creating system fallback pages. (WebCore::GlyphPage::setGlyphDataForIndex): Hold off creating a SimpleFontData* array until we're sure there are two different SimpleFontData* backing the glyphs in this page. We don't store font data for glyph #0, instead we let the getters always return null for it. (WebCore::GlyphPage::~GlyphPage): Free the SimpleFontData* array if needed. (WebCore::GlyphPage::glyphDataForCharacter): (WebCore::GlyphPage::glyphDataForIndex): (WebCore::GlyphPage::fontDataForCharacter): The font data for glyph #0 is always a null pointer now. (WebCore::GlyphPage::clearForFontData): Updated for new storage format. * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Fix bug where non-zero glyph was temporarily associated with null font data, which triggered the new assertion in setGlyphDataForIndex(). 2013-02-16 Andreas Kling Remove multi-threading gunk from WebKit2's PluginInfoStore. Reviewed by Alexey Proskuryakov. Remove now-unused code for making deep (isolated) copies of WebCore plugin structures. * plugins/PluginData.h: (MimeClassInfo): (PluginInfo): 2013-02-16 Alexey Proskuryakov Identifier generated twice in FrameLoader::loadResourceSynchronously() https://bugs.webkit.org/show_bug.cgi?id=110022 Reviewed by Darin Adler. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): Fix an apparent refactoring mistake. 2013-02-16 Andreas Kling [JSC] Remove custom mark function for NamedNodeMap. Reviewed by Darin Adler. NamedNodeMap refs and unrefs its Element owner, so there's no need for the wrapper to keep the Element alive. Covered by fast/dom/Attr/access-after-element-destruction.html * bindings/js/JSNamedNodeMapCustom.cpp: * dom/NamedNodeMap.idl: 2013-02-16 Peter Nelson REGRESSION(r143076): Crash when calling removeNamedItem or removeNamedItemNS with a non-existent attribute of newly created element. Reviewed by Andreas Kling. Now checks Element::hasAttributes() before calling Element::getAttributeItemIndex(). Test: http/tests/misc/acid3.html * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::removeNamedItemNS): 2013-02-16 Andreas Kling Element: Devirtualize attribute synchronization functions. Reviewed by Darin Adler. Devirtualize the functions that perform re-serialization of lazy attributes and give them "synchronize"-style names: - SVGElement::synchronizeAnimatedSVGAttribute() - StyledElement::synchronizeStyleAttributeInternal() * dom/Element.cpp: (WebCore::Element::synchronizeAllAttributes): (WebCore::Element::synchronizeAttribute): * dom/Element.h: * dom/StyledElement.cpp: (WebCore::StyledElement::synchronizeStyleAttribute): * dom/StyledElement.h: (StyledElement): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * svg/SVGElement.cpp: (WebCore::SVGElement::synchronizeAnimatedSVGAttribute): * svg/SVGElement.h: (SVGElement): 2013-02-16 Andreas Kling Element: Avoid unrelated attribute synchronization on other attribute access. Reviewed by Darin Adler. We've been extremely trigger happy with re-serializing the style attribute (and SVG animatables) whenever any Element attribute API was used. This patch narrows this down to (almost always) only synchronizing an attribute when someone specifically wants to read/update it. Also removed two more confusing ElementData accessors: - Element::elementDataWithSynchronizedAttributes() - Element::ensureElementDataWithSynchronizedAttributes() * dom/Element.h: * dom/Element.cpp: (WebCore::Element::hasAttributes): (WebCore::Element::hasEquivalentAttributes): (WebCore::Element::cloneAttributesFromElement): (WebCore::Element::synchronizeAllAttributes): Renamed updateInvalidAttributes() to synchronizeAllAttributes(). This function should only be used when we need every single attribute to be up-to-date. (WebCore::Element::synchronizeAttribute): Broke out logic for synchronizing a specific attribute, given either a full QualifiedName or a localName. (WebCore::Element::setSynchronizedLazyAttribute): Don't call ensureUniqueElementData() indisciminately here. This avoids converting the attribute storage when re-serializing the inline style yields the same CSS text that was already in the style attribute. (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::getAttribute): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::setAttribute): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): Only synchronize the attribute in question. * dom/Node.cpp: (WebCore::Node::compareDocumentPosition): Call synchronizeAllAttributes() when comparing two Attr nodes on the same Element instead of relying on the side-effects of another function doing this. 2013-02-16 Seokju Kwon Fix build warnings after r139853 https://bugs.webkit.org/show_bug.cgi?id=109929 Reviewed by Alexey Proskuryakov. Use UNUSED_PARAM macro to fix build warning -Wunused-parameter when INSPECTOR is disabled. No new tests, no behavior change. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameStartedLoading): (WebCore::InspectorInstrumentation::frameStoppedLoading): (WebCore::InspectorInstrumentation::frameScheduledNavigation): (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation): 2013-02-16 Sheriff Bot Unreviewed, rolling out r142734. http://trac.webkit.org/changeset/142734 https://bugs.webkit.org/show_bug.cgi?id=110018 "Triggered crashes on lots of websites" (Requested by ggaren on #webkit). * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::getOwnPropertySlotDelegate): 2013-02-16 Robert Hogan percentage top value of position:relative element not calculated using parent's min-height unless height set https://bugs.webkit.org/show_bug.cgi?id=14762 Reviewed by Julien Chaffraix. Percentage height "is calculated with respect to the height of the generated box's containing block" says http://www.w3.org/TR/CSS21/visudet.html#the-height-property and "If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to 'auto'." So when calculating the used height of a replaced element do not crawl through ancestor blocks except when traversing anonymous blocks. Ensure that anonymous table cells are not skipped through though. http://www.w3.org/TR/CSS21/tables.html#height-layout adds "In CSS 2.1, the height of a cell box is the minimum height required by the content." This height is decided by allowing table cells to report their height as auto. It's not clear why http://trac.webkit.org/changeset/91242 decided it should no longer do this - doing so caused us to regress in our rendering of computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor.html. Tests: fast/block/percent-top-parent-respects-min-height.html fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr.html fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor.html fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor-vertical-lr.html fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): (WebCore): (WebCore::RenderBoxModelObject::relativePositionOffset): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::hasReplacedLogicalHeight): 2013-02-16 Stephen White [skia] FEOffset should have a Skia implementation. https://bugs.webkit.org/show_bug.cgi?id=109831 Reviewed by James Robinson. Covered by css3/filters/effect-reference.html and -hw.html. * WebCore.gypi: * platform/graphics/filters/FEOffset.h: Implement createImageFilter() for the Skia path. * platform/graphics/filters/skia/FEOffsetSkia.cpp: Added. (WebCore::FEOffset::createImageFilter): Instantiate an SkOffsetImageFilter when building the Skia DAG. 2013-02-16 Vsevolod Vlasov Web Inspector: Create separate project for each domain for UISourceCode based on browser resources. https://bugs.webkit.org/show_bug.cgi?id=109691 Reviewed by Pavel Feldman. Separate project of certain type is now created for each domain. UISourceCode path represents a path in the project now. UISourceCode uri is now calculated based on project id and path. It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods. * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleProjectDelegate): (WebInspector.SimpleProjectDelegate.projectId): (WebInspector.SimpleProjectDelegate.prototype.id): (WebInspector.SimpleProjectDelegate.prototype.displayName): (WebInspector.SimpleProjectDelegate.prototype.addFile): (WebInspector.SimpleWorkspaceProvider): (WebInspector.SimpleWorkspaceProvider.splitURL): (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL): (WebInspector.SimpleWorkspaceProvider.uriForURL): (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL): (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName): (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile): (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName): (WebInspector.SimpleWorkspaceProvider.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.uri): (WebInspector.UISourceCode.path): (WebInspector.UISourceCode.prototype.uri): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype._fileAdded): (WebInspector.Project.prototype._fileRemoved): (WebInspector.Project.prototype.uiSourceCodeForURI): 2013-02-15 Chris Fleizach AX: Split WebAccessibilityObjectWrapper so code can be shared with iOS https://bugs.webkit.org/show_bug.cgi?id=109849 Reviewed by David Kilzer. Split up the WebAccessibilityObjectWrapper so that iOS can share more code with MacOS. I imagine over time, more code will move into this base class, but for now this will be a good start. A base class called WebAccessibilityObjectWrapper now exists, and Mac has a subclass of that. iOS will be able to do the same. * WebCore.xcodeproj/project.pbxproj: * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::attachWrapper): * accessibility/mac/WebAccessibilityObjectWrapper.h: * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper detach]): (-[WebAccessibilityObjectWrapper attachmentView]): (-[WebAccessibilityObjectWrapper accessibilityObject]): (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]): (-[WebAccessibilityObjectWrapper accessibilityTitle]): (-[WebAccessibilityObjectWrapper accessibilityDescription]): (-[WebAccessibilityObjectWrapper accessibilityHelpText]): * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Added. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added. (std): (-[WebAccessibilityObjectWrapperMac detach]): (-[WebAccessibilityObjectWrapperMac attachmentView]): (CFAutoreleaseHelper): (AXObjectIsTextMarker): (AXObjectIsTextMarkerRange): (AXTextMarkerRange): (AXTextMarkerRangeStart): (AXTextMarkerRangeEnd): (SearchKeyEntry): (createAccessibilitySearchKeyMap): (accessibilitySearchKeyForString): (textMarkerForVisiblePosition): (-[WebAccessibilityObjectWrapperMac textMarkerForVisiblePosition:]): (visiblePositionForTextMarker): (-[WebAccessibilityObjectWrapperMac visiblePositionForTextMarker:]): (visiblePositionForStartOfTextMarkerRange): (visiblePositionForEndOfTextMarkerRange): (textMarkerRangeFromMarkers): (AXAttributedStringRangeIsValid): (AXAttributeStringSetFont): (CreateCGColorIfDifferent): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetStyle): (AXAttributeStringSetBlockquoteLevel): (AXAttributeStringSetSpelling): (AXAttributeStringSetHeadingLevel): (AXAttributeStringSetElement): (AXAttributedStringAppendText): (nsStringForReplacedNode): (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForTextMarkerRange:]): (textMarkerRangeFromVisiblePositions): (-[WebAccessibilityObjectWrapperMac textMarkerRangeFromVisiblePositions:endPosition:]): (-[WebAccessibilityObjectWrapperMac accessibilityActionNames]): (-[WebAccessibilityObjectWrapperMac additionalAccessibilityAttributeNames]): (-[WebAccessibilityObjectWrapperMac accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapperMac visiblePositionRangeForTextMarkerRange:]): (-[WebAccessibilityObjectWrapperMac renderWidgetChildren]): (-[WebAccessibilityObjectWrapperMac remoteAccessibilityParentObject]): (convertToVector): (convertToNSArray): (-[WebAccessibilityObjectWrapperMac textMarkerRangeForSelection]): (-[WebAccessibilityObjectWrapperMac position]): (createAccessibilityRoleMap): (roleValueToNSString): (-[WebAccessibilityObjectWrapperMac role]): (-[WebAccessibilityObjectWrapperMac subrole]): (-[WebAccessibilityObjectWrapperMac roleDescription]): (-[WebAccessibilityObjectWrapperMac scrollViewParent]): (-[WebAccessibilityObjectWrapperMac titleTagShouldBeUsedInDescriptionField]): (-[WebAccessibilityObjectWrapperMac accessibilityTitle]): (-[WebAccessibilityObjectWrapperMac accessibilityDescription]): (-[WebAccessibilityObjectWrapperMac accessibilityHelpText]): (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:]): (-[WebAccessibilityObjectWrapperMac accessibilityFocusedUIElement]): (-[WebAccessibilityObjectWrapperMac accessibilityHitTest:]): (-[WebAccessibilityObjectWrapperMac accessibilityIsAttributeSettable:]): (-[WebAccessibilityObjectWrapperMac accessibilityIsIgnored]): (-[WebAccessibilityObjectWrapperMac accessibilityParameterizedAttributeNames]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformPressAction]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformIncrementAction]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformDecrementAction]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformShowMenuAction]): (-[WebAccessibilityObjectWrapperMac accessibilityShowContextMenu]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformAction:]): (-[WebAccessibilityObjectWrapperMac accessibilitySetValue:forAttribute:]): (rendererForView): (-[WebAccessibilityObjectWrapperMac _accessibilityParentForSubview:]): (-[WebAccessibilityObjectWrapperMac accessibilityActionDescription:]): (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForRange:]): (-[WebAccessibilityObjectWrapperMac _convertToNSRange:]): (-[WebAccessibilityObjectWrapperMac _indexForTextMarker:]): (-[WebAccessibilityObjectWrapperMac _textMarkerForIndex:]): (-[WebAccessibilityObjectWrapperMac doAXRTFForRange:]): (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:forParameter:]): (-[WebAccessibilityObjectWrapperMac accessibilitySupportsOverriddenAttributes]): (-[WebAccessibilityObjectWrapperMac accessibilityShouldUseUniqueId]): (-[WebAccessibilityObjectWrapperMac accessibilityIndexOfChild:]): (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeCount:]): (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeValues:index:maxCount:]): ([WebAccessibilityObjectWrapperMac accessibilitySetShouldRepostNotifications:]): (-[WebAccessibilityObjectWrapperMac accessibilityPostedNotification:]): 2013-02-15 Eric Carlson [Mac] remove wkCaptionAppearance from WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=109996 Reviewed by Simon Fraser. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2013-02-15 Sheriff Bot Unreviewed, rolling out r143088. http://trac.webkit.org/changeset/143088 https://bugs.webkit.org/show_bug.cgi?id=110000 Breaks the build (Requested by dgorbik on #webkit). * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2013-02-15 Chris Rogers Enhance AudioBus copyFrom() and sumFrom() to be able to handle discrete and speakers up and down-mixing https://bugs.webkit.org/show_bug.cgi?id=109983 Reviewed by Kenneth Russell. The Web Audio spec has a more detailed explanation for how channels are to be up and down-mixed: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#UpMix This patch adds the initial support for handling ChannelInterpretation, although no new JS API is yet implemented. No new tests since no new APIs have yet been exposed. * platform/audio/AudioBus.cpp: (WebCore::AudioBus::copyFrom): (WebCore): (WebCore::AudioBus::sumFrom): (WebCore::AudioBus::speakersCopyFrom): (WebCore::AudioBus::speakersSumFrom): (WebCore::AudioBus::discreteCopyFrom): (WebCore::AudioBus::discreteSumFrom): * platform/audio/AudioBus.h: (AudioBus): 2013-02-15 Tony Chang Padding and border changes doesn't trigger relayout of children https://bugs.webkit.org/show_bug.cgi?id=109639 Reviewed by Kent Tamura. In RenderBlock::layoutBlock, we only relayout our children if our logical width changes. This misses cases where our logical width doesn't change (i.e., padding or border changes), but our content width does change. Also convert the needsLayout ASSERT into the if statement. This is because RenderScrollbarPart can change border widths and not need a layout if the scrollbar doesn't have a parent. In this case, we don't need to set any children for layout. This is a more general case of bug 104997. Test: fast/block/dynamic-padding-border.html * rendering/RenderBox.cpp: (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed. (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen even without border-box box sizing. 2013-02-15 Mark Lam Split SQLStatement work between the frontend and backend. https://bugs.webkit.org/show_bug.cgi?id=104751. Reviewed by Geoffrey Garen. This is part of the webdatabase refactoring for webkit2. 1. Copied SQLTransaction to SQLTransactionBackend, and then reduce the 2 to only handle frontend and backend work respectively. 2. Changed how statements are created. - SQLTransaction::executeSQL() first creates a SQLStatement frontend which encapsulates the 2 script callbacks. It then passes the SQLStatement to the backend database to create the SQLStatementBackend. - The SQLStatementBackend manages all sqlite work. 3. Remove the Database::reportExecuteStatementResult() wrapper because it is only needed in the backend now. 4. Added new files to the build / project files. 5. Updated / added comments about how the SQLStatement life-cycle works. No new tests. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/webdatabase/Database.cpp: * Modules/webdatabase/Database.h: (Database): (WebCore::Database::reportCommitTransactionResult): * Modules/webdatabase/DatabaseBackend.h: (DatabaseBackend): * Modules/webdatabase/SQLStatement.cpp: (WebCore::SQLStatement::create): (WebCore::SQLStatement::SQLStatement): (WebCore::SQLStatement::setBackend): (WebCore::SQLStatement::hasCallback): (WebCore::SQLStatement::hasErrorCallback): (WebCore::SQLStatement::performCallback): * Modules/webdatabase/SQLStatement.h: (SQLStatement): * Modules/webdatabase/SQLStatementBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.cpp. (WebCore::SQLStatementBackend::create): (WebCore::SQLStatementBackend::SQLStatementBackend): (WebCore::SQLStatementBackend::frontend): (WebCore::SQLStatementBackend::sqlError): (WebCore::SQLStatementBackend::sqlResultSet): (WebCore::SQLStatementBackend::execute): (WebCore::SQLStatementBackend::setDatabaseDeletedError): (WebCore::SQLStatementBackend::setVersionMismatchedError): (WebCore::SQLStatementBackend::setFailureDueToQuota): (WebCore::SQLStatementBackend::clearFailureDueToQuota): (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): * Modules/webdatabase/SQLStatementBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.h. (SQLStatementBackend): (WebCore::SQLStatementBackend::hasStatementCallback): (WebCore::SQLStatementBackend::hasStatementErrorCallback): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::deliverStatementCallback): (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): (WebCore::SQLTransaction::executeSQL): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::doCleanup): (WebCore::SQLTransactionBackend::currentStatement): (WebCore::SQLTransactionBackend::enqueueStatementBackend): (WebCore::SQLTransactionBackend::executeSQL): (WebCore::SQLTransactionBackend::runStatements): (WebCore::SQLTransactionBackend::getNextStatement): (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): * Modules/webdatabase/SQLTransactionBackend.h: (SQLTransactionBackend): * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: 2013-02-15 Elliott Sprehn Rename HasCustomCallbacks to HasCustomStyleCallbacks https://bugs.webkit.org/show_bug.cgi?id=109982 Reviewed by Eric Seidel. Now that inside ChildFrameDisconnector we only call isFrameOwnerElement() on elements that report having descendants (or themselves) have connected frames we don't need to be as agressive about avoiding the virtual call to isFrameOwnerElement() which lets us rename hasCustomCallbacks to hasCustomStyleCallbacks to better reflect it's purpose. * dom/ContainerNodeAlgorithms.h: (WebCore::ChildFrameDisconnector::collectFrameOwners): * dom/Element.cpp: (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): (WebCore::Element::willRecalcStyle): (WebCore::Element::didRecalcStyle): (WebCore::Element::customStyleForRenderer): * dom/Node.h: (WebCore::Node::pseudoId): (WebCore::Node::hasCustomStyleCallbacks): (WebCore::Node::customPseudoId): (WebCore::Node::setHasCustomStyleCallbacks): * dom/PseudoElement.cpp: (WebCore::PseudoElement::PseudoElement): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcStyle): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::HTMLFrameSetElement): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::HTMLIFrameElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::HTMLOptionElement): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditElement::DateTimeEditElement): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::TextFieldDecorationElement): * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): 2013-02-15 Eric Carlson [Mac] remove wkCaptionAppearance from WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=109996 Reviewed by Simon Fraser. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2013-02-15 Andreas Kling Calling DOM Element.attributes shouldn't force creation of ElementData. Reviewed by Darin Adler. Don't create ElementData for an Element unnecessarily just because someone calls .attributes on it. Previously, JS like this would create empty ElementData when 'element' has no attributes: for (i = 0; i < element.attributes.length; ++i) doStuff(element.attributes[i]); Make NamedNodeMap::length() short-circuit and return 0 if !Element::hasAttributes(). * dom/Element.cpp: (WebCore::Element::attributes): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::length): 2013-02-15 Kentaro Hara [V8] An "EvenTarget" type in IDL should be converted to EventTarget*, not to Node* https://bugs.webkit.org/show_bug.cgi?id=109895 Reviewed by Adam Barth. Currently an "EventTarget" type in IDL is converted to Node*. This is wrong because there are non-Node interfaces that inherit a EventTarget. We should convert an "EventTarget" type to EventTarget*. This will fix FIXMEs in CodeGeneratorV8.pm. * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): (JSValueToNative): 2013-02-15 Simon Fraser REGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using back/forward buttons https://bugs.webkit.org/show_bug.cgi?id=109826 Reviewed by Beth Dakin. Fix a crash when going Back on some pages with fixed position elements. When a page was being restored from the page cache, and a layout from FrameLoader::commitProvisionalLoad() caused us to try to register the fixed position layer before the main scrolling layer, we'd crash trying to dereference the root node. Fix by bailing from ScrollingStateTree::attachNode() if we can't find the parent node. Test: platform/mac-wk2/tiled-drawing/null-parent-back-crash.html * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::attachNode): (WebCore::ScrollingStateTree::stateNodeForID): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode): 2013-02-15 Simon Fraser Constrain fixed layers to the viewport, not the document https://bugs.webkit.org/show_bug.cgi?id=109646 Reviewed by Beth Dakin. It's bad to constrain position:fixed compositing layers to the document rect, because their bounds will change every time the scroll position changes, and we're not good currently at synchronizing scrolling thread layer updates with main thread layer updates, so jiggles ensue. Fix by constraining position:fixed layers to the viewport. Test: compositing/geometry/limit-layer-bounds-fixed.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): 2013-02-13 Jer Noble Add a CDMClient class which allows the CDM to query for the currently attached MediaPlayer. https://bugs.webkit.org/show_bug.cgi?id=109702 Reviewed by Eric Carlson. Some CDM implementations will need to work closely with an associated MediaPlayer in order to generate key requests and provide keys. Add a client protocol to be implemented by the MediaKeys object which can provide access to the associated MediaPlayer if present. * Modules/encryptedmedia/CDM.cpp: (WebCore::CDM::CDM): Initialize the m_client ivar. (WebCore::CDM::mediaPlayer): Pass to the client, if present. * Modules/encryptedmedia/CDM.h: (WebCore::CDM::client): Simple getter. (WebCore::CDM::setClient): Simple setter. * Modules/encryptedmedia/MediaKeys.cpp: (WebCore::MediaKeys::MediaKeys): Initialize the m_mediaElement ivar and call setClient() on the passed in CDM. (WebCore::MediaKeys::setMediaElement): Simple setter. (WebCore::MediaKeys::cdmMediaPlayer): Retrieve the MediaPlayer from the m_mediaElement if present. * Modules/encryptedmedia/MediaKeys.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::~HTMLMediaElement): Call setMediaKeys(0) to clear the mediaElement in any associated MediaKeys. (WebCore::HTMLMediaElement::setMediaKeys): Clear the mediaElement on any associated MediaKeys, and set the mediaElement on the newly associated MediaKeys. 2013-02-15 Simon Fraser drop-shadow filter with overflow:hidden child misbehaves https://bugs.webkit.org/show_bug.cgi?id=109783 Reviewed by Dean Jackson. The change in r112745 was not sufficient; it failed to account for descendant layers that needed to not clipping to avoid artefacts with filters like drop-shadow. Test: css3/filters/filter-repaint-shadow-layer-child.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): Remove the useClipRect bool. Replace it with a clipToDirtyRect member on the LayerPaintingInfo, which gets passed to descendants. Remove some "Restore the clip" comments that added nothing. * rendering/RenderLayer.h: (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo): (LayerPaintingInfo): 2013-02-15 Sheriff Bot Unreviewed, rolling out r143066. http://trac.webkit.org/changeset/143066 https://bugs.webkit.org/show_bug.cgi?id=109986 Broke the Apple Lion build (among others). (Requested by ddkilzer on #webkit). * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::attachWrapper): * accessibility/mac/WebAccessibilityObjectWrapper.h: * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper unregisterUniqueIdForUIElement]): (-[WebAccessibilityObjectWrapper detach]): (-[WebAccessibilityObjectWrapper accessibilityObject]): (-[WebAccessibilityObjectWrapper attachmentView]): (CFAutoreleaseHelper): (AXObjectIsTextMarker): (AXObjectIsTextMarkerRange): (AXTextMarkerRange): (AXTextMarkerRangeStart): (AXTextMarkerRangeEnd): (SearchKeyEntry): (createAccessibilitySearchKeyMap): (accessibilitySearchKeyForString): (textMarkerForVisiblePosition): (-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]): (visiblePositionForTextMarker): (-[WebAccessibilityObjectWrapper visiblePositionForTextMarker:]): (visiblePositionForStartOfTextMarkerRange): (visiblePositionForEndOfTextMarkerRange): (textMarkerRangeFromMarkers): (AXAttributedStringRangeIsValid): (AXAttributeStringSetFont): (CreateCGColorIfDifferent): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetStyle): (AXAttributeStringSetBlockquoteLevel): (AXAttributeStringSetSpelling): (AXAttributeStringSetHeadingLevel): (AXAttributeStringSetElement): (AXAttributedStringAppendText): (nsStringForReplacedNode): (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): (textMarkerRangeFromVisiblePositions): (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]): (-[WebAccessibilityObjectWrapper accessibilityActionNames]): (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]): (-[WebAccessibilityObjectWrapper renderWidgetChildren]): (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]): (convertToVector): (convertToNSArray): (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): (-[WebAccessibilityObjectWrapper position]): (createAccessibilityRoleMap): (roleValueToNSString): (-[WebAccessibilityObjectWrapper role]): (-[WebAccessibilityObjectWrapper subrole]): (-[WebAccessibilityObjectWrapper roleDescription]): (-[WebAccessibilityObjectWrapper scrollViewParent]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]): (-[WebAccessibilityObjectWrapper accessibilityHitTest:]): (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]): (-[WebAccessibilityObjectWrapper accessibilityIsIgnored]): (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]): (-[WebAccessibilityObjectWrapper accessibilityPerformIncrementAction]): (-[WebAccessibilityObjectWrapper accessibilityPerformDecrementAction]): (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]): (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]): (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]): (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]): (rendererForView): (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]): (-[WebAccessibilityObjectWrapper accessibilityActionDescription:]): (-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]): (-[WebAccessibilityObjectWrapper _convertToNSRange:]): (-[WebAccessibilityObjectWrapper _indexForTextMarker:]): (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]): (-[WebAccessibilityObjectWrapper doAXRTFForRange:]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): (-[WebAccessibilityObjectWrapper accessibilitySupportsOverriddenAttributes]): (-[WebAccessibilityObjectWrapper accessibilityShouldUseUniqueId]): (-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]): (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]): (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]): * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed. * accessibility/mac/WebAccessibilityObjectWrapperMac.m: Removed. 2013-02-15 Emil A Eklund Change MouseRelatedEvent to use LayoutPoint::scale https://bugs.webkit.org/show_bug.cgi?id=109979 Reviewed by Dimitri Glazkov. Change MouseRelatedEvent::MouseRelatedEvent to use LayoutPoint:: scale to adjust location and scroll offset for scale factor and zooming. No new tests, no change in functionality. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2013-02-15 Chris Fleizach AX: Split WebAccessibilityObjectWrapper so code can be shared with iOS https://bugs.webkit.org/show_bug.cgi?id=109849 Reviewed by David Kilzer. Split up the WebAccessibilityObjectWrapper so that iOS can share more code with MacOS. I imagine over time, more code will move into this base class, but for now this will be a good start. A base class called WebAccessibilityObjectWrapper now exists, and Mac has a subclass of that. iOS will be able to do the same. * WebCore.xcodeproj/project.pbxproj: * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::attachWrapper): * accessibility/mac/WebAccessibilityObjectWrapper.h: * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper detach]): (-[WebAccessibilityObjectWrapper attachmentView]): (-[WebAccessibilityObjectWrapper accessibilityObject]): (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]): (-[WebAccessibilityObjectWrapper accessibilityTitle]): (-[WebAccessibilityObjectWrapper accessibilityDescription]): (-[WebAccessibilityObjectWrapper accessibilityHelpText]): * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Added. * accessibility/mac/WebAccessibilityObjectWrapperMac.m: Added. (std): (-[WebAccessibilityObjectWrapperMac detach]): (-[WebAccessibilityObjectWrapperMac attachmentView]): (CFAutoreleaseHelper): (AXObjectIsTextMarker): (AXObjectIsTextMarkerRange): (AXTextMarkerRange): (AXTextMarkerRangeStart): (AXTextMarkerRangeEnd): (SearchKeyEntry): (createAccessibilitySearchKeyMap): (accessibilitySearchKeyForString): (textMarkerForVisiblePosition): (-[WebAccessibilityObjectWrapperMac textMarkerForVisiblePosition:]): (visiblePositionForTextMarker): (-[WebAccessibilityObjectWrapperMac visiblePositionForTextMarker:]): (visiblePositionForStartOfTextMarkerRange): (visiblePositionForEndOfTextMarkerRange): (textMarkerRangeFromMarkers): (AXAttributedStringRangeIsValid): (AXAttributeStringSetFont): (CreateCGColorIfDifferent): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetStyle): (AXAttributeStringSetBlockquoteLevel): (AXAttributeStringSetSpelling): (AXAttributeStringSetHeadingLevel): (AXAttributeStringSetElement): (AXAttributedStringAppendText): (nsStringForReplacedNode): (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForTextMarkerRange:]): (textMarkerRangeFromVisiblePositions): (-[WebAccessibilityObjectWrapperMac textMarkerRangeFromVisiblePositions:endPosition:]): (-[WebAccessibilityObjectWrapperMac accessibilityActionNames]): (-[WebAccessibilityObjectWrapperMac additionalAccessibilityAttributeNames]): (-[WebAccessibilityObjectWrapperMac accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapperMac visiblePositionRangeForTextMarkerRange:]): (-[WebAccessibilityObjectWrapperMac renderWidgetChildren]): (-[WebAccessibilityObjectWrapperMac remoteAccessibilityParentObject]): (convertToVector): (convertToNSArray): (-[WebAccessibilityObjectWrapperMac textMarkerRangeForSelection]): (-[WebAccessibilityObjectWrapperMac position]): (createAccessibilityRoleMap): (roleValueToNSString): (-[WebAccessibilityObjectWrapperMac role]): (-[WebAccessibilityObjectWrapperMac subrole]): (-[WebAccessibilityObjectWrapperMac roleDescription]): (-[WebAccessibilityObjectWrapperMac scrollViewParent]): (-[WebAccessibilityObjectWrapperMac titleTagShouldBeUsedInDescriptionField]): (-[WebAccessibilityObjectWrapperMac accessibilityTitle]): (-[WebAccessibilityObjectWrapperMac accessibilityDescription]): (-[WebAccessibilityObjectWrapperMac accessibilityHelpText]): (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:]): (-[WebAccessibilityObjectWrapperMac accessibilityFocusedUIElement]): (-[WebAccessibilityObjectWrapperMac accessibilityHitTest:]): (-[WebAccessibilityObjectWrapperMac accessibilityIsAttributeSettable:]): (-[WebAccessibilityObjectWrapperMac accessibilityIsIgnored]): (-[WebAccessibilityObjectWrapperMac accessibilityParameterizedAttributeNames]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformPressAction]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformIncrementAction]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformDecrementAction]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformShowMenuAction]): (-[WebAccessibilityObjectWrapperMac accessibilityShowContextMenu]): (-[WebAccessibilityObjectWrapperMac accessibilityPerformAction:]): (-[WebAccessibilityObjectWrapperMac accessibilitySetValue:forAttribute:]): (rendererForView): (-[WebAccessibilityObjectWrapperMac _accessibilityParentForSubview:]): (-[WebAccessibilityObjectWrapperMac accessibilityActionDescription:]): (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForRange:]): (-[WebAccessibilityObjectWrapperMac _convertToNSRange:]): (-[WebAccessibilityObjectWrapperMac _indexForTextMarker:]): (-[WebAccessibilityObjectWrapperMac _textMarkerForIndex:]): (-[WebAccessibilityObjectWrapperMac doAXRTFForRange:]): (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:forParameter:]): (-[WebAccessibilityObjectWrapperMac accessibilitySupportsOverriddenAttributes]): (-[WebAccessibilityObjectWrapperMac accessibilityShouldUseUniqueId]): (-[WebAccessibilityObjectWrapperMac accessibilityIndexOfChild:]): (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeCount:]): (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeValues:index:maxCount:]): ([WebAccessibilityObjectWrapperMac accessibilitySetShouldRepostNotifications:]): (-[WebAccessibilityObjectWrapperMac accessibilityPostedNotification:]): 2013-02-15 Elliott Sprehn RenderQuote should not mark renderers as needing layout during layout https://bugs.webkit.org/show_bug.cgi?id=109876 Reviewed by Ojan Vafai. Marking RenderQuotes as needing pref width recalcs and layouts during a layout is dangerous since an ancestor may mark itself as having completed layout, but then some subtree still thinks it needs layout. Instead, since the only time we create RenderQuote instances is inside PseudoElement, we can call attachQuote inside PseudoElement::attach during the regular tree mutating cycle. We can then use RenderQuote::styleDidChange to update the kind of quotes on normal style changes. This makes RenderQuote behave much more similarly to DOM nodes and means we no longer need to set dirty bits during layout. Test: fast/css-generated-content/quote-layout-focus-crash.html * dom/PseudoElement.cpp: (WebCore::PseudoElement::attach): Now call attachQuote(). * rendering/RenderQuote.cpp: (WebCore::RenderQuote::~RenderQuote): (WebCore::RenderQuote::willBeRemovedFromTree): (WebCore::RenderQuote::styleDidChange): (WebCore::RenderQuote::updateText): (WebCore::RenderQuote::attachQuote): (WebCore::RenderQuote::detachQuote): (WebCore::RenderQuote::updateDepth): * rendering/RenderQuote.h: (RenderQuote): 2013-02-15 Sheriff Bot Unreviewed, rolling out r143044. http://trac.webkit.org/changeset/143044 https://bugs.webkit.org/show_bug.cgi?id=109974 broke windows build (Requested by kling on #webkit). * dom/DocumentSharedObjectPool.cpp: (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes): * dom/Element.cpp: (WebCore::sizeForShareableElementDataWithAttributeCount): (WebCore::ShareableElementData::ShareableElementData): (WebCore::ShareableElementData::~ShareableElementData): (WebCore::UniqueElementData::UniqueElementData): * dom/Element.h: (WebCore::ShareableElementData::immutableAttributeArray): (ShareableElementData): (WebCore::ElementData::attributeItem): 2013-02-15 Adam Barth Enable the preload scanner on the background parser thread https://bugs.webkit.org/show_bug.cgi?id=108027 Reviewed by Tony Gentilcore. The patch causes us to pass all the fast/preloader tests with the threaded parser enabled. This patch wires up the BackgroundHTMLParser to the TokenPreloadScanner. Currently, we bail out of preload scanning if we encounter a document.write becaues we don't know how to rewind the preload scanner, but that's something we can tune in the future. The BackgroundHTMLParser delivers the preloads to the HTMLDocumentParser together with the token stream. If the HTMLDocumentParser isn't able to use the token stream immediately, it kicks off the preloads. * html/parser/BackgroundHTMLParser.cpp: (WebCore::checkThatPreloadsAreSafeToSendToAnotherThread): (WebCore::BackgroundHTMLParser::BackgroundHTMLParser): (WebCore::BackgroundHTMLParser::resumeFrom): (WebCore::BackgroundHTMLParser::pumpTokenizer): (WebCore::BackgroundHTMLParser::sendTokensToMainThread): * html/parser/BackgroundHTMLParser.h: (Configuration): - We need to add a struct for the create function because the number of arguments exceeds the limits of Functional.h. (BackgroundHTMLParser): (WebCore::BackgroundHTMLParser::create): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::scanCommon): (WebCore::CSSPreloadScanner::scan): (WebCore::CSSPreloadScanner::emitRule): - We need to use a new string here so that the string is safe to send to another thread. * html/parser/CSSPreloadScanner.h: (CSSPreloadScanner): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser): (WebCore::HTMLDocumentParser::startBackgroundParser): - Following the example of the XSSAuditor, we create the TokenPreloadScanner on the main thread and then send it to the background thread for operation. * html/parser/HTMLDocumentParser.h: (WebCore): (ParsedChunk): * html/parser/HTMLParserOptions.h: (HTMLParserOptions): - We need to add a default constructor so that the HTMLDocumentParser can create an empty BackgroundHTMLParser::Configuration struct. * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::scan): (WebCore::TokenPreloadScanner::scanCommon): (WebCore::HTMLPreloadScanner::scan): * html/parser/HTMLPreloadScanner.h: (TokenPreloadScanner): (WebCore::TokenPreloadScanner::isSafeToSendToAnotherThread): * html/parser/HTMLResourcePreloader.cpp: (WebCore::HTMLResourcePreloader::takeAndPreload): (WebCore): * html/parser/HTMLResourcePreloader.h: (WebCore::PreloadRequest::PreloadRequest): (WebCore): (HTMLResourcePreloader): 2013-02-15 Ryosuke Niwa Build fix after r143030. We need to keep updatedRange around until createMarkupInternal returns. * editing/markup.cpp: (WebCore::createMarkup): 2013-02-15 Rik Cabanier Add platform support for -webkit-background-blend-mode to CG context https://bugs.webkit.org/show_bug.cgi?id=108549 Reviewed by Dean Jackson. Tests: css3/compositing/effect-background-blend-mode-stacking.html css3/compositing/effect-background-blend-mode.html This patch adds support for blending on background images to the Core Graphics port of WebKit. * platform/graphics/CrossfadeGeneratedImage.cpp: Added interface change for blending. (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: Added interface change for blending. (CrossfadeGeneratedImage): * platform/graphics/GeneratedImage.h: Added interface change for blending. (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: Added interface change for blending. (WebCore::GeneratorGeneratedImage::drawPattern): * platform/graphics/GeneratorGeneratedImage.h: Added interface change for blending. (GeneratorGeneratedImage): * platform/graphics/GraphicsContext.cpp: Added interface change for blending and passes blend mode to image object. (WebCore::GraphicsContext::drawTiledImage): (WebCore::GraphicsContext::blendModeOperation): (WebCore): * platform/graphics/GraphicsContext.h: Added interface change for blending. (GraphicsContext): * platform/graphics/Image.cpp: Added interface change for blending and passed it to graphics layer. (WebCore::Image::drawTiled): * platform/graphics/Image.h: Added interface change for blending. (Image): * platform/graphics/cg/ImageCG.cpp: Added interface change for blending and passed it to OS. (WebCore::Image::drawPattern): * rendering/RenderBoxModelObject.cpp: Passed blend mode when drawing background images. (WebCore::RenderBoxModelObject::paintFillLayerExtended): * platform/graphics/cairo/ImageCairo.cpp: Added interface change for blending. (WebCore::Image::drawPattern): * platform/graphics/qt/ImageQt.cpp: Added interface change for blending. (WebCore::Image::drawPattern): * platform/graphics/skia/ImageSkia.cpp: Added interface change for blending. (WebCore::Image::drawPattern): * rendering/RenderBoxModelObject.cpp: Added interface change for blending. (WebCore::RenderBoxModelObject::paintFillLayerExtended): * svg/graphics/SVGImageForContainer.cpp: Added interface change for blending. (WebCore::SVGImageForContainer::drawPattern): * svg/graphics/SVGImageForContainer.h: Added interface change for blending. 2013-02-14 Emil A Eklund Clamp span value in RenderTableCell::parse[Col|Row]SpanFromDOM https://bugs.webkit.org/show_bug.cgi?id=109878 Reviewed by Abhishek Arya. Test: fast/table/colspan-huge-number.html Clamp colspan and rowspan values to their respective maximum supported values. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::parseColSpanFromDOM): (WebCore::RenderTableCell::parseRowSpanFromDOM): 2013-02-15 Andreas Kling ShareableElementData should use zero-length array for storage. Reviewed by Anders Carlsson. Use a zero-length Attribute array instead of always casting from void* to an array. It was done this way originally because I didn't know we could sidestep the MSVC build error with some #pragma hackery. * dom/DocumentSharedObjectPool.cpp: (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes): * dom/Element.cpp: (WebCore::sizeForShareableElementDataWithAttributeCount): (WebCore::ShareableElementData::ShareableElementData): (WebCore::ShareableElementData::~ShareableElementData): (WebCore::UniqueElementData::UniqueElementData): * dom/Element.h: (ShareableElementData): (WebCore::ElementData::attributeItem): 2013-02-14 Ojan Vafai Implement RenderGrid::computeIntrinsicLogicalWidths https://bugs.webkit.org/show_bug.cgi?id=109881 Reviewed by Tony Chang. For now this is not observable due to the FIXMEs for unimplemented bits of computePreferredLogicalWidths. But, soon, I'll be removing the computePreferredLogicalWidths override entirely and instead use RenderBlock's, which will also address the RenderGrid FIXMEs. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeIntrinsicLogicalWidths): const_cast the usages of m_grid. Alternately, we could stack allocate it, but there's disagreement on whether that's the right choice. See https://bugs.webkit.org/show_bug.cgi?id=109880. (WebCore::RenderGrid::computePreferredLogicalWidths): * rendering/RenderGrid.h: 2013-02-15 Xueqing Huang Flexbox should ignore firstLine pseudo element. https://bugs.webkit.org/show_bug.cgi?id=104485 Reviewed by Tony Chang. Spec[1] said that "None of the properties defined in this module apply to '::first-line' or '::first-letter' pseudo-elements." and css2[2] define "The :first-line pseudo-element can only be attached to a block container element." [1]http://dev.w3.org/csswg/css3-flexbox/#display-flex [2]http://www.w3.org/TR/CSS2/selector.html#first-line-pseudo tests: css3/flexbox/flexbox-ignore-firstLine.html css3/flexbox/flexitem-firstLine-valid.html css3/flexbox/inline-flexbox-ignore-firstLine.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::firstLineBlock): 2013-02-15 Alec Flett IndexedDB: Implement SharedBuffer version of put() https://bugs.webkit.org/show_bug.cgi?id=109092 Reviewed by Adam Barth. Switch IDBDatabaseBackendInterface::put over to SharedBuffer, to avoid buffer copies of the value. No new tests, this is a refactor. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::IDBBackingStore::putRecord): * Modules/indexeddb/IDBBackingStore.h: (WebCore): (IDBBackingStore): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::PutOperation::create): (WebCore::PutOperation::PutOperation): (PutOperation): (WebCore::IDBDatabaseBackendImpl::put): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (WebCore): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::put): 2013-02-15 Anders Carlsson Implement StorageAreaProxy::length https://bugs.webkit.org/show_bug.cgi?id=109962 Reviewed by Andreas Kling. Export a symbol needed by WebKit2. * WebCore.exp.in: 2013-02-15 Anders Carlsson Remove const from a bunch of StorageArea member functions https://bugs.webkit.org/show_bug.cgi?id=109957 Reviewed by Beth Dakin. StorageArea is an abstract base class, and its subclasses might want to mutate the object when certain member functions are called so remove const from all member functions. * storage/StorageArea.h: (WebCore): (StorageArea): (WebCore::StorageArea::~StorageArea): (WebCore::StorageArea::incrementAccessCount): (WebCore::StorageArea::decrementAccessCount): (WebCore::StorageArea::closeDatabaseIfIdle): * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::canAccessStorage): (WebCore::StorageAreaImpl::length): (WebCore::StorageAreaImpl::key): (WebCore::StorageAreaImpl::getItem): (WebCore::StorageAreaImpl::contains): (WebCore::StorageAreaImpl::memoryBytesUsedByCache): * storage/StorageAreaImpl.h: (StorageAreaImpl): 2013-02-13 Ryosuke Niwa DeleteButtonController::enable and disable should be called via a RAII object https://bugs.webkit.org/show_bug.cgi?id=109550 Reviewed by Enrica Casucci. Added DeleteButtonControllerDisableScope, a friend class of DeleteButtonController, and made DeleteButtonController::enable/disable private. * dom/ContainerNode.cpp: * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::unapply): (WebCore::EditCommandComposition::reapply): (WebCore::CompositeEditCommand::apply): * editing/DeleteButtonController.h: (WebCore): (DeleteButtonController): (DeleteButtonControllerDisableScope): (WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope): (WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope): * editing/markup.cpp: (WebCore::createMarkup): (WebCore::createFragmentFromNodes): 2013-02-15 Max Vujovic Add code from other branch. [CSS Shaders] Parse src property in @-webkit-filter at-rules https://bugs.webkit.org/show_bug.cgi?id=109770 Reviewed by Dean Jackson. This patch implements the parsing for the CSS src property in @-webkit-filter at-rules. The Filter Effects spec [1] specifies its syntax: src: [ [format()]?]# In practice, it can look like: src: url(shader.vs) format('x-shader/x-vertex'), url(shader.fs) format('x-shader/x-fragment'); This src property is similar to the src property in CSS font-face rules, but a little different. The CSS Fonts spec [2] specifies: src: [ [format(#)]? | ]# The syntax for a is a unique font face name enclosed by "local(" and ")". Unlike the filter src property, the font face src property accepts the local function [e.g. src: local("SomeFont");]. Also, the font face src property accepts a list of strings instead of just one string in its format function. [1]: https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-src [2]: http://www.w3.org/TR/css3-fonts/#src-desc Tests: css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html * css/CSSGrammar.y.in: Set (and unset) a flag called "m_inFilterRule", which tells us if we are in a @-webkit-filter at-rule or in a @font-face at-rule when we encounter a src property. We parse the two variants of the src property separately so that we can create different objects (WebKitCSSShaderValue vs. CSSFontFaceSrcValue) and because their syntax is a little different. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFilterRuleSrcUriAndFormat): Parses a URI and format pair found in the @-webkit-filter src property. (WebCore::CSSParser::parseFilterRuleSrc): Parse the @-webkit-filter src property. * css/CSSParser.h: (CSSParser): * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::customCssText): WebKitCSSShaderValue now has an m_format member, which needs to be included in its cssText. (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage): * css/WebKitCSSShaderValue.h: (WebCore::WebKitCSSShaderValue::format): (WebCore::WebKitCSSShaderValue::setFormat): (WebKitCSSShaderValue): 2013-02-15 Eric Carlson Crash occurs at WebCore::TextTrackList::length() when enabling closed captions in movie https://bugs.webkit.org/show_bug.cgi?id=109886 Reviewed by Dean Jackson. No new tests, media/media-captions.html does not crash with this change. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Early return when m_textTracks is NULL. 2013-02-15 Adam Barth TokenPreloadScanner should be able to scan CompactHTMLTokens https://bugs.webkit.org/show_bug.cgi?id=109861 Reviewed by Eric Seidel. This patch moves the main scanning logic for the TokenPreloadScanner to a templated scanCommon routine that can scan either an HTMLToken or a CompactHTMLToken. This patch will let the BackgroundHTMLParser preload scan its CompactHTMLTokens. * html/parser/CSSPreloadScanner.cpp: (WebCore): (WebCore::CSSPreloadScanner::scanCommon): (WebCore::CSSPreloadScanner::scan): * html/parser/CSSPreloadScanner.h: (CSSPreloadScanner): - Tweak the CSSPreloadScanner API slightly to make it easier to call from templated code. * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::tagIdFor): (WebCore): (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): (TokenPreloadScanner::StartTagScanner): (WebCore::TokenPreloadScanner::scan): (WebCore::TokenPreloadScanner::scanCommon): (WebCore::TokenPreloadScanner::updatePredictedBaseURL): (WebCore::HTMLPreloadScanner::scan): * html/parser/HTMLPreloadScanner.h: (TokenPreloadScanner): 2013-02-15 Alexis Menard WebKit shouldn't accept "none, none" in transition shorthand property. https://bugs.webkit.org/show_bug.cgi?id=108751 Reviewed by Dean Jackson. http://dev.w3.org/csswg/css3-transitions/#transition-shorthand-property specifies that if there is more than one transition defined in the shorthand and any of them has a value of 'none' then the declaration is invalid. This patch fixes the problem by passing a parsing context to track if a keyword has been set for the transition-property and if so then use it to invalidate or not the declaration. Test: transitions/transitions-parsing.html * css/CSSParser.cpp: (AnimationParseContext): (WebCore::AnimationParseContext::AnimationParseContext): (WebCore::AnimationParseContext::commitFirstAnimation): track whether it's the first or not defined in the shorthand. (WebCore::AnimationParseContext::hasCommittedFirstAnimation): (WebCore::AnimationParseContext::commitAnimationPropertyKeywordInShorthand): In the shorthand as soon as a keyword has been found then the parsing is 'finished', if any other animation/transition declaration part of the shorthand are with a keyword then it's invalid. (WebCore::AnimationParseContext::animationPropertyKeywordInShorthandAllowed): (WebCore::AnimationParseContext::hasSeenAnimationPropertyKeyword): (WebCore::AnimationParseContext::sawAnimationPropertyKeyword): (WebCore): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::parseAnimationProperty): * css/CSSParser.h: (WebCore): 2013-02-15 Andreas Kling ElementData: Move leafy things out of the base class. Reviewed by Antti Koivisto. - Moved functions for mutating/adding/removing attributes into UniqueElementData. Attempts to modify shared element data will now fail at compile-time. - Removed mutableAttributeVector() and have call sites access the vector directly. - Move immutableAttributeArray() to ShareableElementData. - Move some function bodies from Element.h to Element.cpp since all clients are in there. * dom/Element.cpp: (WebCore::Element::addAttributeInternal): (WebCore::ShareableElementData::ShareableElementData): (WebCore::UniqueElementData::makeShareableCopy): (WebCore::UniqueElementData::addAttribute): (WebCore::UniqueElementData::removeAttribute): (WebCore::ElementData::reportMemoryUsage): (WebCore::UniqueElementData::getAttributeItem): (WebCore::UniqueElementData::attributeItem): * dom/Element.h: (ElementData): (WebCore::ShareableElementData::immutableAttributeArray): (ShareableElementData): (UniqueElementData): (WebCore::ElementData::length): (WebCore::ElementData::attributeItem): 2013-02-15 Hans Muller [CSS Exclusions] Enable shape-inside support for circles https://bugs.webkit.org/show_bug.cgi?id=109713 Reviewed by Dirk Schulze. Removed the test that disabled circle values for shape-inside. The remaining support for circles, which is based on rounded rectangles whose width/height is equal to their radiusX/radiusY, has not changed. Test: fast/exclusions/shape-inside/shape-inside-circle.html * rendering/ExclusionShapeInsideInfo.h: (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Now only disallows ellipse. 2013-02-15 Christophe Dumez [Soup] Leverage new soup_cookie_jar_get_cookie_list() API https://bugs.webkit.org/show_bug.cgi?id=109931 Reviewed by Kenneth Rohde Christiansen. In several cases, the CookieJarSoup implementation was retrieving / copying ALL the cookies using soup_cookie_jar_all_cookies() and then using soup_cookie_applies_to_uri() to filter out cookies it is not interested in. This was inefficient. In libsoup 2.40, soup_cookie_jar_get_cookie_list() was introduced to retrieve only the cookies that apply to a given URI. This patch leverages this new API in CookieJarSoup's getRawCookies() and deleteCookie(). This way, only the cookies we are interested in are retrieved and copied. Libsoup does not need to iterate over all the cookies itself because it keeps the cookies in a hash table using the host names as key. No new tests, no behavior change. * platform/network/soup/CookieJarSoup.cpp: (WebCore::getRawCookies): (WebCore::deleteCookie): 2013-02-15 Vladislav Kaznacheev Web Inspector: Added an option to split Elements and Sources sidebars in two panes. https://bugs.webkit.org/show_bug.cgi?id=109298. Reviewed by Vsevolod Vlasov. Introduced the "Split sidebar" context menu option that splits the horizontal sidebar into two panes. The width split ratio is 1:1 by default and is preserved when the Inspector window is resized. Elements sidebar is split into two tabbed panes, Sources sidebar is split into a pane stack and a tabbed pane. No new tests. * inspector/front-end/DOMBreakpointsSidebarPane.js: (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype._reattachBody): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired): (WebInspector.ElementsPanel.prototype._populateContextMenuForSidebar.toggleSetting): (WebInspector.ElementsPanel.prototype.get _arrangeSidebarPanes.get this): (WebInspector.ElementsPanel.prototype.addExtensionSidebarPane): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onCreateSidebarPane): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems): (WebInspector.ScriptsPanel.prototype._contextMenuEventFired): (WebInspector.ScriptsPanel.prototype._sidebarContextMenuEventFired): (WebInspector.ScriptsPanel.prototype._populateContextMenuForSidebar.toggleSetting): (WebInspector.ScriptsPanel.prototype.get _arrangeSidebarPanes.get this): * inspector/front-end/SidebarPane.js: (WebInspector.SidebarPane): (WebInspector.SidebarPane.prototype.expand): (WebInspector.SidebarPane.prototype.onContentReady): (WebInspector.SidebarPane.prototype._setExpandCallback): (WebInspector.SidebarPane.prototype.wasShown): (WebInspector.SidebarPaneTitle): (WebInspector.SidebarPaneTitle.prototype._expand): (WebInspector.SidebarPaneTitle.prototype._collapse): (WebInspector.SidebarPaneTitle.prototype._toggleExpanded): (WebInspector.SidebarPaneTitle.prototype._onTitleKeyDown): (WebInspector.SidebarPaneStack): (WebInspector.SidebarPaneStack.prototype.addPane): (WebInspector.SidebarTabbedPane): (WebInspector.SidebarTabbedPane.prototype.addPane): * inspector/front-end/SidebarView.js: * inspector/front-end/SplitView.js: (WebInspector.SplitView): (WebInspector.SplitView.prototype.get mainElement): (WebInspector.SplitView.prototype.get sidebarElement): 2013-02-15 Vsevolod Vlasov Web Inspector: Several consecutive Backspace or Delete strikes should not be marked as undoable state. https://bugs.webkit.org/show_bug.cgi?id=109915 Reviewed by Pavel Feldman. Extracted _isEditRangeUndoBoundary() and _isEditRangeAdjacentToLastCommand() in TextEditorModel to detect if markUndoableState() call is needed before and after editRange. * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.prototype.immediatelyPrecedes): (WebInspector.TextRange.prototype.immediatelyFollows): (WebInspector.TextEditorModel.endsWithBracketRegex.): 2013-02-15 Andrey Adaikin Fix inconsistency in WebGLRenderingContext.idl for getAttribLocation https://bugs.webkit.org/show_bug.cgi?id=109892 Reviewed by Kentaro Hara. * html/canvas/WebGLRenderingContext.idl: 2013-02-15 Andrey Adaikin Web Inspector: [Canvas] show replay log grouped by draw calls https://bugs.webkit.org/show_bug.cgi?id=109592 Reviewed by Pavel Feldman. Show canvas capturing log grouped by drawing calls. Drive-by: extended Array.prototype with a handy peekLast function. Drive-by: removed code dups in few places. * inspector/front-end/CanvasProfileView.js: (WebInspector.CanvasProfileView): (WebInspector.CanvasProfileView.prototype.dispose): (WebInspector.CanvasProfileView.prototype._onReplayStepClick): (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick): (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick): (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog): (WebInspector.CanvasProfileView.prototype._replayTraceLog): (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog): (WebInspector.CanvasProfileView.prototype._selectedCallIndex): (WebInspector.CanvasProfileView.prototype._selectedDrawCallGroupIndex): (WebInspector.CanvasProfileView.prototype._appendCallNode): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype.setColumnVisible): (WebInspector.DataGridNode.prototype.set hasChildren): (WebInspector.DataGridNode.prototype.set revealed): (WebInspector.DataGridNode.prototype.get leftPadding): * inspector/front-end/externs.js: (Array.prototype.peekLast): * inspector/front-end/utilities.js: 2013-02-15 Yury Semikhatsky Web Inspector: highlight record revealed in Timeline https://bugs.webkit.org/show_bug.cgi?id=109930 Reviewed by Pavel Feldman. Revealed timeline record is now highlighted with yellow background that fades out in 2 seconds. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._revealRecord): (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelinePanel.prototype._clearRecordHighlight): * inspector/front-end/timelinePanel.css: (.highlighted-timeline-record): (@-webkit-keyframes timeline_record_highlight): (to): 2013-02-15 Vsevolod Vlasov Web Inspector: Pass original selection to textModel to correctly restore it after undo. https://bugs.webkit.org/show_bug.cgi?id=109911 Reviewed by Pavel Feldman. We can distinguish backspace pressed with and without selection now. * inspector/front-end/DefaultTextEditor.js: (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): (WebInspector.DefaultTextEditor.WordMovementController.prototype._handleCtrlBackspace): * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorCommand): (WebInspector.TextEditorModel.endsWithBracketRegex.): 2013-02-15 Joe Mason [BlackBerry] Remove redundant requireAuth parameter of NetworkJob::notifyAuthReceived https://bugs.webkit.org/show_bug.cgi?id=109855 Reviewed by Yong Li. Internal PR: 296697 Internally Reviewed By: Leo Yang Code cleanup: The requireAuth parameter of NetworkJob::notifyAuthReceived is redundant as its value can be determined from "result" - if result is AuthResultRetry, requireAuth is false, otherwise it is true. No new tests as there is no behaviour change. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::notifyAuthReceived): * platform/network/blackberry/NetworkJob.h: (NetworkJob): 2013-02-15 Vsevolod Vlasov Web Inspector: Redo in text editor should always collapse selection to end. https://bugs.webkit.org/show_bug.cgi?id=109907 Reviewed by Pavel Feldman. * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): 2013-02-15 Dan Carney [v8] persistent handle dispose before last use https://bugs.webkit.org/show_bug.cgi?id=109927 Reviewed by Jochen Eisinger. No new tests. No change in functionality. * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::weakCallback): 2013-02-15 Keishi Hattori PagePopupController.formatMonth should support short month format https://bugs.webkit.org/show_bug.cgi?id=109530 Reviewed by Kent Tamura. PagePopupController.formatMonth should support short month format so we can use it in the new calendar picker. Tested by LocaleMacTest::formatMonth. * page/PagePopupController.cpp: (WebCore::PagePopupController::formatMonth): Take an extra bool argument to switch to short month format. * page/PagePopupController.h: (PagePopupController): * page/PagePopupController.idl: * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::shortMonthFormat): (WebCore): * platform/text/LocaleICU.h: (LocaleICU): * platform/text/LocaleNone.cpp: (WebCore::shortMonthFormat): (WebCore): * platform/text/PlatformLocale.cpp: (WebCore::DateTimeStringBuilder::visitField): (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: (Locale): * platform/text/mac/LocaleMac.h: (LocaleMac): * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::shortMonthFormat): (WebCore): * platform/text/win/LocaleWin.cpp: (WebCore::LocaleWin::shortMonthFormat): Windows doesn't have a short month format so we just replace MMMM with MMM. (WebCore): * platform/text/win/LocaleWin.h: (LocaleWin): 2013-02-15 Keishi Hattori Add setValue and closePopup methods to PagePopupController https://bugs.webkit.org/show_bug.cgi?id=109897 Reviewed by Kent Tamura. The new calendar picker (Bug 109439) needs to set a value without closing the popup. We can't do that with the existing setValueAndClosePopup. No new tests. Existing calendar picker and color suggestion picker tests that closing and setting values work properly. * Resources/pagepopups/pickerCommon.js: (Picker.prototype.submitValue): Stop using setValueAndClosePopup. (Picker.prototype.handleCancel): Ditto. * page/PagePopupClient.h: (PagePopupClient): * page/PagePopupController.cpp: (WebCore::PagePopupController::setValue): Sets value to element without closing popup. (WebCore): (WebCore::PagePopupController::closePopup): Just closes popup. * page/PagePopupController.h: (PagePopupController): * page/PagePopupController.idl: 2013-02-15 Mihnea Ovidenie [CSS Regions] RenderRegion should inherit from RenderBlock https://bugs.webkit.org/show_bug.cgi?id=74132 Reviewed by Julien Chaffraix. Change the base class for RenderRegion to be RenderBlock instead of RenderReplaced. Per spec http://dev.w3.org/csswg/css3-regions/#the-flow-from-property, a region is a non-replaced block container. This change is covered by the existing regions tests (in fast/region and fast/repaint). The RenderFlowThread object is a self-painting layer (it requires layer and is positioned). Because of that, the RenderFlowThread object is responsible for painting its children, the collected objects. When the RenderRegion::paintObject is called during paint, it delegates painting of content collected inside the flow thread to the associated RenderFlowThread object. Since we do not want to paint the flow thread content multiple times (for each paint phase in which the RenderRegion::paintObject is called), we allow RenderFlowThread painting only for selection and foreground paint phases. * rendering/RenderBox.cpp: Clean-up the code from regions specific stuff, now that the regions are render blocks. (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::RenderBox::computePositionedLogicalHeight): * rendering/RenderLayerBacking.cpp: A region should always render content from its associated flow thread, even when it does not have children of its own. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): * rendering/RenderMultiColumnSet.cpp: Make changes to match the new inheritance for RenderRegion. (WebCore::RenderMultiColumnSet::paint): (WebCore::RenderMultiColumnSet::paintColumnRules): * rendering/RenderMultiColumnSet.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::paintObject): (WebCore::RenderRegion::styleDidChange): (WebCore::RenderRegion::layoutBlock): (WebCore::RenderRegion::insertedIntoTree): (WebCore::RenderRegion::willBeRemovedFromTree): (WebCore::RenderRegion::computePreferredLogicalWidths): Use this method instead of min/maxPreferredLogicalWidth. (WebCore::RenderRegion::updateLogicalHeight): * rendering/RenderRegion.h: For now, assume the region is not allowed to have children. When we will implement the processing model for pseudo-elements http://dev.w3.org/csswg/css3-regions/#processing-model, we will have to remove this function. By having this function return false i was able to leave some tests unchanged. 2013-02-15 Andrey Lushnikov Web Inspector: implement smart braces functionality https://bugs.webkit.org/show_bug.cgi?id=109200 Reviewed by Pavel Feldman. - implement SmartBraceController which will handle character insertions and override them if brace character was inserted. Additionally it should handle Backspace key and override it if a cursor is located inside of a bracket pair. - guard smart brace functionality via experiment checkbox. New test: inspector/editor/text-editor-smart-braces.html * inspector/front-end/DefaultTextEditor.js: (WebInspector.TextEditorMainPanel): (WebInspector.TextEditorMainPanel.prototype._registerShortcuts): (WebInspector.TextEditorMainPanel.prototype._handleKeyPress): (WebInspector.TextEditorMainPanel.SmartBraceController): (WebInspector.TextEditorMainPanel.SmartBraceController.prototype.registerShortcuts): (WebInspector.TextEditorMainPanel.SmartBraceController.prototype.registerCharOverrides): (WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleBackspace): (WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleBracePairInsertion): (WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleClosingBraceOverride): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): 2013-02-15 Andrei Bucur [CSS Regions][Mac] fast/regions/full-screen-video-from-region.html hits an assertion in RenderFlowThread::removeRenderBoxRegionInfo https://bugs.webkit.org/show_bug.cgi?id=106075 Reviewed by Tony Chang. The crash is caused by two issues. The first problem is how a block inside a flow thread determines if the children needs relayout or not. When the region chain is invalidated, the information is lost so we need to return true, even for the enclosing RenderFlowThread. Because the video renderer is the first child of the flow thread this doesn't happen. The patch implements this behaviour by inspecting both if the region chain has changed and if the block has no range computed yet. The second problem is RenderMedia not inheriting from RenderBlock. The logic of child relayout doesn't apply to it. In the test case, when the full screen button is pressed, the region changes width to fill the viewport, the chain is invalidated and the box info hash map is cleared. When the video is laid out again (after fixing the first issue) it has the same size so the controls don't do a layout. They remain without box info inside the flow thread, thus causing the assertion. The patch forces the controls to relayout if the region chain was invalidated. We can't use the logicalWidthChangedInRegions method because it is block specific. This will be fixed in a later patch. Tests: No new tests. fast/regions/full-screen-video-from-region.html no longer crashes. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::checkForPaginationLogicalHeightChange): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::logicalWidthChangedInRegions): * rendering/RenderFlowThread.h: Renamed pageLogicalHeightChanged to pageLogicalSizeChanged. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::layout): 2013-02-13 Allan Sandfeld Jensen [CoordGfx] Regression from r135212: big layers with transform animations sometime fail to render tiles https://bugs.webkit.org/show_bug.cgi?id=109179 Reviewed by Jocelyn Turcotte. Fix adjustForContentsRect logic for AC layers that are higher or wider than the visible rect. Force updates of the visible rect while it is animating, and until we have done one last update after it stops animating. Test: compositing/transitions/transform-on-large-layer.html * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::adjustForContentsRect): (WebCore::TiledBackingStore::computeCoverAndKeepRect): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): (WebCore::CoordinatedGraphicsLayer::computePixelAlignment): (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): 2013-02-15 Sheriff Bot Unreviewed, rolling out r142876. http://trac.webkit.org/changeset/142876 https://bugs.webkit.org/show_bug.cgi?id=109920 Broke relative URL linkification in the computed styles pane (Requested by apavlov on #webkit). * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): 2013-02-15 Allan Sandfeld Jensen Simplify hitTestResultAtPoint and nodesFromRect APIs https://bugs.webkit.org/show_bug.cgi?id=95720 Reviewed by Julien Chaffraix. The existing API was overloaded and could be simplified by passing all the bool arguments in a HitTestRequest argument. This should also help clarify the call as the enum values explicitely state what they do. * WebCore.exp.in: * WebCore.order: * dom/Document.cpp: (WebCore::Document::nodesFromRect): * dom/Document.h: (Document): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::createContextMenu): * page/DragController.cpp: (WebCore::DragController::canProcessDrag): (WebCore::DragController::startDrag): * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu): (WebCore::EventHandler::bestClickableNodeForTouchPoint): (WebCore::EventHandler::bestContextMenuNodeForTouchPoint): (WebCore::EventHandler::bestZoomableAreaForTouchPoint): (WebCore::EventHandler::handleTouchEvent): * page/EventHandler.h: (WebCore): (EventHandler): * page/FocusController.cpp: (WebCore::updateFocusCandidateIfNeeded): * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): (WebCore::Frame::documentAtPoint): * page/TouchDisambiguation.cpp: (WebCore::findGoodTouchTargets): * rendering/HitTestRequest.h: (WebCore::HitTestRequest::allowsFrameScrollbars): * testing/Internals.cpp: (WebCore::Internals::nodesFromRect): 2013-02-14 Pavel Feldman Web Inspector: make component-based compile-front-end happy https://bugs.webkit.org/show_bug.cgi?id=109798 Reviewed by Vsevolod Vlasov. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setVariableValue): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/compile-front-end.py: * inspector/front-end/AuditResultView.js: * inspector/front-end/CPUProfileView.js: * inspector/front-end/DataGrid.js: * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.loadTimelineFromURL): 2013-02-14 Alexander Pavlov Web Inspector: Implement tracking of active stylesheets in the frontend https://bugs.webkit.org/show_bug.cgi?id=105828 Reviewed by Pavel Feldman. - This change introduces the CSS.styleSheetAdded() and CSS.styleSheetRemoved() events that update the frontend with all active stylesheet changes in the inspected page. As such, fetching stylesheet headers from the backend manually is no longer needed, and many asynchronous methods have been turned into normal accessors. - One notable change to the stylesheet binding process is that when a via-inspector stylesheet is created, it is instantly reported through the instrumentation, and the viaInspectorStyleSheet() method is [indirectly] called recursively from bindStyleSheet(). Thus, the actual creation and registration of the respective InspectorStyleSheet have been moved into bindStyleSheet(), which relies upon the m_creatingViaInspectorStyleSheet flag. Test: inspector/styles/stylesheet-tracking.html * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Instrumented. * inspector/Inspector.json: Add events, update the CSS domain description. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::enable): Push all existing stylesheet headers into the frontend. (WebCore::InspectorCSSAgent::activeStyleSheetsUpdated): Push added/removed stylesheet into the frontend. (WebCore::InspectorCSSAgent::getAllStyleSheets): Slightly refactored to make use of collectAllStyleSheets(). (WebCore::InspectorCSSAgent::collectAllStyleSheets): Added to collect InspectorStyleSheets rather than headers. (WebCore::InspectorCSSAgent::collectStyleSheets): (WebCore::InspectorCSSAgent::bindStyleSheet): Binds via-inspector stylesheets, too. (WebCore::InspectorCSSAgent::unbindStyleSheet): Now we can unbind stylesheets upon their removal from the document. (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): Modifies m_creatingViaInspectorStyleSheet when necessary. (WebCore::InspectorCSSAgent::detectOrigin): Modified to make use of m_creatingViaInspectorStyleSheet. (WebCore::InspectorCSSAgent::buildObjectForRule): Removed extraneous bound InspectorStyleSheet 0-check. * inspector/InspectorCSSAgent.h: * inspector/InspectorInstrumentation.cpp: Instrumentation of active stylesheet set updates. (WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl): * inspector/InspectorInstrumentation.h: Ditto. (WebCore::InspectorInstrumentation::activeStyleSheetsUpdated): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.styleSheetHeaders): (WebInspector.CSSStyleModel.prototype._styleSheetAdded): Added. (WebInspector.CSSStyleModel.prototype._styleSheetRemoved): Added. (WebInspector.CSSStyleModel.prototype.viaInspectorResourceForRule): (WebInspector.CSSStyleModelResourceBinding.prototype._setHeaderForStyleSheetId): (WebInspector.CSSStyleModelResourceBinding.prototype.resourceURLForStyleSheetId): (WebInspector.CSSStyleModelResourceBinding.prototype.styleSheetIdForResource): (WebInspector.CSSStyleModelResourceBinding.prototype._headerKey): Calculate the (frameID + URL) key for CSSStyleSheetHeader. (WebInspector.CSSStyleModelResourceBinding.prototype._createInspectorResource): (WebInspector.CSSStyleModelResourceBinding.prototype._inspectorResource): (WebInspector.CSSStyleModelResourceBinding.prototype._reset): (WebInspector.CSSDispatcher.prototype.styleSheetAdded): Added. (WebInspector.CSSDispatcher.prototype.styleSheetRemoved): Added. * inspector/front-end/SASSSourceMapping.js: Get rid of async implementations. (WebInspector.SASSSourceMapping.prototype._styleSheetChanged): * inspector/front-end/StylesSidebarPane.js: Ditto. (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): * inspector/front-end/StylesSourceMapping.js: Ditto. (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged): 2013-02-15 Andrei Bucur Implement the -webkit-margin-collapse properties correct rendering https://bugs.webkit.org/show_bug.cgi?id=108168 Reviewed by David Hyatt. The patch implements the correct behavior for the -webkit-margin-collapse properties: - a value of "discard" on a margin will truncate all the margins collapsing with it; - a value of "separate" will prevent the margin to collapse; - a value of "collapse" is the default collapse behavior. The implementation is aware of multiple writing-modes: - if the writing mode of a child is parallel with the writing mode of the container and has the same direction, the -webkit-margin-collapse properties on the child are left as is; - if the writing mode of a child is parallel with the writing mode of the container but has a different direction, the -webkit-margin-collapse properties on the child are reversed; - if the writing mode of a child is perpendicular on the writing mode of the container, the -webkit-margin-collapse properties on the child are ignored; I. The "discard" value implementation There are two new bits (before and after) added on the RenderBlockRareData structure specifying if the margins of the block will be discarded or not. We can't rely only on the value from style() because it's possible a block to discard it's margins because it has collapsed with a children that specified "discard" for -webkit-margin-collapse. However, the bits are set only if it is required. Another bit is added on the MarginInfo structure specifying if the margin has to be discarded or not. When collapsing at the before side of a block it will hold information if the container block needs to discard or not. If the collapsing happens between siblings/with after side of the container it will tell if the previous child discards the margin or not. The self collapsing blocks are a special case. If any of its margins discards then both its margins discard and all the other margins collapsing with it. To ensure an optimal behavior it is asserted margin values can't be set on the MarginInfo object if the discard flag is active. If this happens it may indicate someone ignored the possibility of the margin being discarded altogether and incorrectly updated the margin values. Float clearing also needs to change because it may force margins to stop collapsing. If this happens the discard flags and margins needs to be restored to their values before the collapse. II. The "separate" value implementation The implementation for separate was not changed too much. I've added new accessor methods for the property that take writing mode into consideration and I've removed some code that didn't work correctly in layoutBlockChild. The problem was the marginInfo structure was cleared if the child was specifying the "separate" value for before. This is wrong because you lose the margin information of the previous child/before side. Tests: fast/block/margin-collapse/webkit-margin-collapse-container.html fast/block/margin-collapse/webkit-margin-collapse-floats.html fast/block/margin-collapse/webkit-margin-collapse-siblings-bt.html fast/block/margin-collapse/webkit-margin-collapse-siblings.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::clearFloatsIfNeeded): (WebCore::RenderBlock::marginBeforeEstimateForChild): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::setCollapsedBottomMargin): (WebCore::RenderBlock::handleAfterSideOfBlock): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::setMustDiscardMarginBefore): (WebCore): (WebCore::RenderBlock::setMustDiscardMarginAfter): (WebCore::RenderBlock::mustDiscardMarginBefore): (WebCore::RenderBlock::mustDiscardMarginAfter): (WebCore::RenderBlock::mustDiscardMarginBeforeForChild): (WebCore::RenderBlock::mustDiscardMarginAfterForChild): (WebCore::RenderBlock::mustSeparateMarginBeforeForChild): (WebCore::RenderBlock::mustSeparateMarginAfterForChild): * rendering/RenderBlock.h: (RenderBlock): (WebCore::RenderBlock::initMaxMarginValues): (MarginInfo): (WebCore::RenderBlock::MarginInfo::setPositiveMargin): (WebCore::RenderBlock::MarginInfo::setNegativeMargin): (WebCore::RenderBlock::MarginInfo::setPositiveMarginIfLarger): (WebCore::RenderBlock::MarginInfo::setNegativeMarginIfLarger): (WebCore::RenderBlock::MarginInfo::setMargin): (WebCore::RenderBlock::MarginInfo::setCanCollapseMarginAfterWithChildren): (WebCore::RenderBlock::MarginInfo::setDiscardMargin): (WebCore::RenderBlock::MarginInfo::discardMargin): (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData): (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault): (RenderBlockRareData): * rendering/style/RenderStyle.h: 2013-02-14 Yury Semikhatsky Web Inspector: always show memory size in Mb on the native memory graph https://bugs.webkit.org/show_bug.cgi?id=109813 Reviewed by Pavel Feldman. Memory size vlue is alway shown in Mb on the native memory graph. * inspector/front-end/NativeMemoryGraph.js: (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue): 2013-02-14 Andrey Adaikin Use GL typedefs in WebGLRenderingContext.idl https://bugs.webkit.org/show_bug.cgi?id=109060 Reviewed by Kenneth Russell. Use GL typedefs in WebGLRenderingContext.idl according to the specs. Added a FIXME about inconsistency with the current WebGL spec for getAttribLocation. Tested manually that generators V8, JS, ObjC, GObject, CPP produce same output. * html/canvas/WebGLRenderingContext.idl: 2013-02-14 Vsevolod Vlasov Web Inspector: Copy-pasting selected text over itself should be an undoable state. https://bugs.webkit.org/show_bug.cgi?id=109830 Reviewed by Pavel Feldman. * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): 2013-02-14 Sheriff Bot Unreviewed, rolling out r142889. http://trac.webkit.org/changeset/142889 https://bugs.webkit.org/show_bug.cgi?id=109891 It caused an assertion failure in scrollbars/overflow- scrollbar-combinations.html (Requested by tkent on #webkit). * rendering/RenderBox.cpp: (WebCore::borderWidthChanged): (WebCore::RenderBox::styleDidChange): 2013-02-14 Arpita Bahuguna Caret positioned at the end of a text line (followed by an empty block) in vertical writing mode disappears when pressing the right/down arrow key. https://bugs.webkit.org/show_bug.cgi?id=106452 Reviewed by Ryosuke Niwa. Pressing the down or the right arrow key at the end of a text line in vertical writing mode would make the caret dissapear. This occurs only when the text line is followed by an empty block. When trying to compute the next position for placing the caret (for down/right key), we try to ascertain whether the renderer (in this case the empty block) is a valid candidate or not. For blockFlow elements we check against their height. In vertical writing mode though we would fail such a check since we should instead be comparing against the renderer's width and not it's height. Thus, a valid position for the placement of the caret was not found in such a case. Test: editing/selection/caret-at-end-of-text-line-followed-by-empty-block-in-vertical-mode.html * dom/Position.cpp: (WebCore::Position::isCandidate): * dom/PositionIterator.cpp: (WebCore::PositionIterator::isCandidate): Instead of checking against the height(), check against the logicalHeight() of the renderer has been added. logicalHeight() on blockFlow renderer's returns a value in accordance with the writing mode. 2013-02-14 Ryosuke Niwa Windows build fix after r142957. * dom/DOMAllInOne.cpp: 2013-02-14 Ryosuke Niwa Fix a typo introduced in r142705. Without this fix, text-input-controller.html can fail when DeleteButtonController is enabled. e.g. "run-webkit-tests platform/mac/editing/deleting/deletionUI-single-instance.html platform/mac/editing/input/text-input-controller.html --child-processes=1" * editing/Editor.cpp: (WebCore::Editor::avoidIntersectionWithDeleteButtonController): 2013-02-14 Hayato Ito Factor Event retargeting code. https://bugs.webkit.org/show_bug.cgi?id=109156 Reviewed by Dimitri Glazkov. To supoort Touch event retargeting (bug 107800), we have to factor event retargeting code so that it can support not only MouseEvent, but also other events. New class, EventRetargeter, was introduced. From now, EventDispatchMediator (and its subclasses) should call, if event retargeting is required, an appropriate function provided in EventRetargeter rather than calling EventDispatcher::adjustRelatedTarget(), which was removed in this patch. No tests. No change in behavior. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/EventDispatchMediator.cpp: * dom/EventDispatcher.cpp: (WebCore): (WebCore::EventDispatcher::ensureEventPath): Changed to return an EventPath, which will be used by EventRetargeter. (WebCore::EventDispatcher::dispatchScopedEvent): (WebCore::EventDispatcher::dispatchEvent): (WebCore::EventDispatcher::dispatchEventPostProcess): * dom/EventDispatcher.h: (WebCore): (EventDispatcher): * dom/EventRetargeter.cpp: Added. (WebCore): (WebCore::inTheSameScope): (WebCore::determineDispatchBehavior): (WebCore::EventRetargeter::calculateEventPath): Factored out from EventDispatcher::ensureEventPath(). (WebCore::EventRetargeter::adjustForMouseEvent): (WebCore::EventRetargeter::adjustForFocusEvent): (WebCore::EventRetargeter::adjustForRelatedTarget): (WebCore::EventRetargeter::calculateAdjustedNodes): Factored out from EventRelatedTargetAjuster::adjustRelatedTarget(). (WebCore::EventRetargeter::buildRelatedNodeMap): Factored out from EventRelatedTargetAjuster::adjustRelatedTarget(). (WebCore::EventRetargeter::findRelatedNode): * dom/EventRetargeter.h: Added. (WebCore): (EventRetargeter): (WebCore::EventRetargeter::eventTargetRespectingTargetRules): * dom/FocusEvent.cpp: (WebCore::FocusEventDispatchMediator::dispatchEvent): Changed to call EventRetargeter::adjustForFocusEvent(). (WebCore::BlurEventDispatchMediator::dispatchEvent): Ditto. (WebCore::FocusInEventDispatchMediator::dispatchEvent): Ditto. (WebCore::FocusOutEventDispatchMediator::dispatchEvent): Ditto. * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): Changed to call EventRetargeter::adjustForMouseEvent(). 2013-02-14 Simon Fraser Reverting r142861. Hit testing inside of style recalc is fundamentally wrong * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::handleMouseMoveEvent): * page/EventHandler.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::setStyle): (WebCore::areNonIdenticalCursorListsEqual): (WebCore::areCursorsEqual): (WebCore::RenderObject::styleDidChange): 2013-02-14 Florin Malita [SVG] Cached filter results are not invalidated on repaint rect change https://bugs.webkit.org/show_bug.cgi?id=106221 Reviewed by Dean Jackson. Since the cached filter results are not invalidated for different repaint rects, we need to render the content of the whole filter region upfront (otherwise elements not visible during the initial paint due to scrolling/window size/etc. are never redrawn). Tests: svg/filters/filter-hidden-content-expected.svg svg/filters/filter-hidden-content.svg * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::drawingRegion): (WebCore): * rendering/svg/RenderSVGResourceFilter.h: (FilterData): (RenderSVGResourceFilter): Track the filter drawing region in FilterData. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::~SVGRenderingContext): (WebCore::SVGRenderingContext::prepareToRenderSVGContent): * rendering/svg/SVGRenderingContext.h: Update paintInfo.rect to cover the whole drawing region while rendering filter content, and restore it when done. 2013-02-14 Jinwoo Song [EFL] Correct the mismatched cursor map https://bugs.webkit.org/show_bug.cgi?id=109655 Reviewed by Laszlo Gombos. Correct the mismatched ECORE_X_CURSOR values in the cursor map. * platform/efl/EflScreenUtilities.cpp: (WebCore::CursorMap::CursorMap): 2013-02-14 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::anyAttribute): (WebDOMTestObj::setAnyAttribute): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_any_attribute): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::TestTypedefsV8Internal::funcWithClampCallback): 2013-02-14 Christian Biesinger Convert media controls from DeprecatedFlexibleBox to FlexibleBox https://bugs.webkit.org/show_bug.cgi?id=109775 Reviewed by Ojan Vafai. Covered by existing tests in media/. * css/mediaControls.css: * css/mediaControlsBlackBerry.css: * css/mediaControlsChromium.css: * css/mediaControlsChromiumAndroid.css: * css/mediaControlsEfl.css: * css/mediaControlsGtk.css: * css/mediaControlsQt.css: * css/mediaControlsQuickTime.css: Automated search and replace of old flexbox CSS rules to new ones. Minor tuning of the chromium rules. * rendering/RenderMediaControlElements.cpp: (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay): (WebCore::RenderMediaControlTimeDisplay::layout): * rendering/RenderMediaControlElements.h: Make media controls inherit from RenderFlexibleBox 2013-02-14 Roger Fong Build fix for Windows. * Modules/webdatabase/SQLTransactionStateMachine.cpp: (WebCore::nameForSQLTransactionState): 2013-02-14 Dean Jackson Inspector doesn't show rules from pluginsStyleSheet https://bugs.webkit.org/show_bug.cgi?id=109872 Reviewed by Darin Adler. Make sure getWrapperForRuleInSheets collects the rules from CSSDefaultStyleSheets::plugInsStyleSheet. Making a test for this is difficult because the rules in this sheet only apply to snapshotted plugins at the moment, which are disabled in DRT, and would require a fairly long timeout in the test. * css/InspectorCSSOMWrappers.cpp: (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets): 2013-02-14 Hayato Ito Recover edge names used in MemoryInstrumentation for DocumentRuleSets. https://bugs.webkit.org/show_bug.cgi?id=109800 Reviewed by Hajime Morita. This is a following patch for r142573. r142563 accidentally removes edge names for MemoryInstrumentation. We should recover edge names. No tests. No change in behavior. * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::reportMemoryUsage): 2013-02-14 Hajime Morrita [V8] Assertion failure on an exception is thrown https://bugs.webkit.org/show_bug.cgi?id=109129 An assertion in V8AbstractEventListener is wrong. This change turns it into an error check. Reviewed by Kentaro Hara. Test: fast/events/onerror-no-constructor.html * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::handleEvent): 2013-02-14 Kentaro Hara [V8] CodeGeneratorV8.pm can assume that DOMWindow has [CheckSecurity] https://bugs.webkit.org/show_bug.cgi?id=109788 Reviewed by Adam Barth. There is code like this: if ($extendedAttr{"CheckSecurity"} || $interfaceName eq "DOMWindow") This check is redundant. DOMWindow has [CheckSecurity]. We can remove the DOMWindow check. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateReplaceableAttrSetter): (GenerateFunctionCallback): (GenerateNonStandardFunction): (GenerateImplementation): 2013-02-14 Joshua Bell [V8] IndexedDB: Remove unused creationContext paramter from idbKeyToV8Value https://bugs.webkit.org/show_bug.cgi?id=109870 Reviewed by Kentaro Hara. This parameter was left over from when the function was toV8(IDBKey). Remove it. No new tests - just removing dead code. * bindings/v8/IDBBindingUtilities.cpp: (WebCore::idbKeyToV8Value): Remove unused parameter. (WebCore::injectIDBKeyIntoScriptValue): No need for dummy handle. (WebCore::idbKeyToScriptValue): No need for dummy handle. 2013-02-14 Kondapally Kalyan [WebGL][Qt] regression:r142786 Qt Build fix for Arm and Windows. https://bugs.webkit.org/show_bug.cgi?id=109797 Reviewed by Csaba Osztrogonác. After r142786, we use OpenGLShims to load necessary GL functions exposed by ARB_vertex_array_object extension. Qt uses OpenGLShims to load functions with GLES too. This patch adds support for loading the equivalent functions on GLES exposed by OES_vertex_array_object. * platform/graphics/OpenGLShims.cpp: (WebCore::initializeOpenGLShims): * platform/graphics/OpenGLShims.h: 2013-02-14 Alexey Proskuryakov CORS preflight broken with NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=109753 Reviewed by Brady Eidson. * loader/DocumentThreadableLoader.h: * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::cancel): (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::dataReceived): (WebCore::DocumentThreadableLoader::didReceiveData): (WebCore::DocumentThreadableLoader::notifyFinished): (WebCore::DocumentThreadableLoader::didFinishLoading): (WebCore::DocumentThreadableLoader::didFail): (WebCore::DocumentThreadableLoader::preflightFailure): Notify InspectorInstrumentation immediately. In addition to keeping up eith other changes, this means that an accurate error will be passed now, not a cancellation. (WebCore::DocumentThreadableLoader::loadRequest): Get rid of m_preflightRequestIdentifier. Every loader has an identifier, and tracking identifiers twice is wrong. Pass identifier explicitly to more internal functions, so that they would not have to second-guess callers. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): Create an identifier for all loaders, not just those that we expect to have client callbacks about. Both Inspector and NetworkProcess need identifiers everywhere. * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::deprecatedDidReceiveCachedResource): * loader/TextTrackLoader.h: * loader/cache/CachedResourceClient.h: (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource): * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::data): Renamed didReceiveData to avoid conflict with the new DocumentThreadableLoader::didReceiveData. And we should really get rid of this CachedResourceClient function anyway. 2013-02-14 Kentaro Hara Replace 'DOMObject' with 'any' https://bugs.webkit.org/show_bug.cgi?id=109793 Reviewed by Dimitri Glazkov. In the Web IDL spec, there is no type named 'DOMObject'. It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's. * Modules/webdatabase/SQLResultSetRowList.idl: * bindings/scripts/CodeGeneratorCPP.pm: (GetClassName): (AddIncludesForType): * bindings/scripts/CodeGeneratorGObject.pm: (GenerateFunction): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): (GenerateImplementation): (JSValueToNative): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): (JSValueToNative): (GetV8HeaderName): * dom/CustomEvent.idl: * dom/MessageEvent.idl: * dom/PopStateEvent.idl: * fileapi/FileReader.idl: * html/HTMLCanvasElement.idl: * html/HTMLElement.idl: * html/canvas/DataView.idl: * inspector/InjectedScriptHost.idl: * inspector/InspectorFrontendHost.idl: * inspector/JavaScriptCallFrame.idl: * page/DOMWindow.idl: * page/Location.idl: 2013-02-14 Kentaro Hara [V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=109786 Reviewed by Adam Barth. Some code is duplicated between GenerateEventListenerCallback() and GenerateFunctionCallback(). By inlining GenerateEventListenerCallback() into GenerateFunctionCallback(), we can remove the duplication. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): 2013-02-14 Ojan Vafai Intrinsic and preferred widths on replaced elements are wrong in many cases https://bugs.webkit.org/show_bug.cgi?id=109859 Reviewed by Levi Weintraub. Test: fast/replaced/preferred-widths.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeIntrinsicLogicalWidths): Separate out computing the intrinsic widths. Eventually, we should be able to share computePreferredLogicalWidth implementations for all replaced elements and form controls since only the intrinsic width changes. (WebCore::RenderReplaced::computePreferredLogicalWidths): -Apply min-width and max-width constraints and then add borderAndPaddingLogicalWidth at the end to make sure it's always applied. This matches all our other computePreferredLogicalWidths override and makes use match Gecko's/Opera's rendering. -Only set the minPreferredLogicalWidth to 0 if the width or max-width is a percent value. Doing it for height values and for min-width doesn't make any sense and doesn't match other browsers. Doing this for max-width still doesn't match other browsers, but it sounds like Gecko at least would like to change that. * rendering/RenderReplaced.h: (WebCore::RenderReplaced::hasRelativeIntrinsicLogicalWidth): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth): Add a way to check if the logicalWidth is relative so that we only check the width in computePreferredLogicalWidths instead of also checking the height. * rendering/svg/RenderSVGRoot.h: 2013-02-14 Stephen Chenney Crash when selecting a HarfBuzz text run with SVG fonts included https://bugs.webkit.org/show_bug.cgi?id=109833 Reviewed by Tony Chang. There is an assert in SimpleFontData::applyTransforms that should not be there, as the code is valid for SVG fonts. If we get past this, then the HarfBuzz text run shaping code assumes that font data has a SkTypeface member, and SVG fonts do not. So we crash there too. For now, we fix the crashes. This still leaves incorrect selection rectangles in this situation, on all platforms, tracked in https://bugs.webkit.org/show_bug.cgi?id=108133 Test: svg/css/font-face-crash.html * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::applyTransforms): Remove ASSERT_NOT_REACHED as the code can legally be reached for SVG fonts. * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Check for SVG fonts in the text run, and abort if we find them. 2013-02-13 Joe Mason [BlackBerry] Notify platform layer of failing to get authentication credentials https://bugs.webkit.org/show_bug.cgi?id=109751 Reviewed by Yong Li. Reviewed internally by Leo Yang Internal PR: 181302 The BlackBerry platform network layer needs to know if a stream failed to get authentication credentials. This patch is using newly added stream API to do it. No functionality changed no new tests. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::notifyAuthReceived): (WebCore::NetworkJob::sendRequestWithCredentials): (WebCore::NetworkJob::notifyChallengeResult): * platform/network/blackberry/NetworkJob.h: * platform/network/blackberry/NetworkManager.cpp: (WebCore::protectionSpaceToPlatformAuth): (WebCore): (WebCore::setAuthCredentials): * platform/network/blackberry/NetworkManager.h: (WebCore): 2013-02-14 Kondapally Kalyan [GTK] Fix indentation in GNUmakefile.list.am. https://bugs.webkit.org/show_bug.cgi?id=109854 Reviewed by Martin Robinson. This patch fixes indentation in GNUmakefile.list.am. * GNUmakefile.list.am: 2013-02-14 Tony Chang Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files. https://bugs.webkit.org/show_bug.cgi?id=96934 * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style. * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style. 2013-02-14 Abhishek Arya Bad cast in RenderBlock::splitBlocks. https://bugs.webkit.org/show_bug.cgi?id=108691 Reviewed by Levi Weintraub. Test: fast/multicol/remove-child-split-flow-crash.html * rendering/RenderBlock.cpp: (WebCore): (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): rename gIsInColumnFlowSplit to gColumnFlowSplitEnabled and use it to decide when to do the column flow split or not. (WebCore::RenderBlock::removeChild): Do not allow column flow split inside removeChild since we might be merging anonymous blocks. 2013-02-14 Mark Lam Split SQLTransaction work between the frontend and backend. https://bugs.webkit.org/show_bug.cgi?id=104750. Reviewed by Sam Weinig. This is part of the webdatabase refactoring for webkit2. 1. Changed how transactions are created. - Database::runTransaction() first creates a SQLTransaction frontend which encapsulates the 3 script callbacks. It then passes the SQLTransaction to the backend database to create the SQLTransactionBackend. - The SQLTransactionBackend manages all SQLiteTransaction work. 2. Introduced SQLTransactionState and SQLTransactionStateMachine. - Instead of tracking the transaction phases as "steps" in m_nextStep, we now use m_nextState which is of enum class SQLTransactionState. Unlike m_nextStep which is a pointer to a "step" function, m_nextState is a state variable which is used to index into a state dispatch table. - Both SQLTransaction and SQLTransactionBackend now extends SQLTransactionStateMachine, and uses its dispatch mechanism based on the SQLTransactionState. - Instead of having 1 state machine instances, there are 2: 1 in the frontend, and 1 in the backend. The 2 have mirrored states, and transfers work to the other state machine when needed. - Previously, state functions can be called inline from other states. They are now only called from the state machines runStateMachine() method. This makes it possible to isolate the state transition mechanism going between the sides (frontend and backend) to 2 functions only: SQLTransaction::sendToBackendState() and SQLTransactionBackend::sendToFrontendState(). 3. Consolidated cleanup work (mostly) to a unified cleanup function. 4. Changed the frontend Database::runTransaction() to use a ChangeVersionData* (instead of a ChangeVersionWrapper ref ptr). - This is necessary because ChangeVersionWrapper contains functionality used in processing a transaction (to be invoked in the backend). Instead, what we want is to simply pass the 2 old and new version strings to the backend. The new ChangeVersionData simply packages up these 2 strings. - This makes ChangeVersionData easy to serialize for IPC messaging later. 5. Moved some transaction functions back to the frontend SQLTransaction because they belong there. 6. Moved some Database functions to its DatabaseBackendAsync backend now that the transaction has been split up. - This is driven naturally by those functions being used exclusively in the backend for transaction work. - SQLTransactionClient, SQLTransactionCoordinator, and SQLTransactionWrapper are now exclusively backend data structures. SQLTransactionClient still has some frontend "pollution" that I'll fix later. 7. Made the few database report functions used only by Chromium conditional on PLATFORM(chromium). - The report functions gets re-routed to Chromium's DatabaseObserver which further routes them elsewhere. It is unclear how Chromium uses these routed messages, and I am therefore not able to determine how they should work in a frontend/backend world. So, I'm #ifdef'ing them out. They still work like in the old way for Chromium. 8. Added new files to the build / project files. 9. Updated / added comments about how the transaction and its states work. No new tests. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/webdatabase/AbstractDatabaseServer.h: * Modules/webdatabase/ChangeVersionData.h: Added. (ChangeVersionData): (WebCore::ChangeVersionData::ChangeVersionData): (WebCore::ChangeVersionData::oldVersion): (WebCore::ChangeVersionData::newVersion): * Modules/webdatabase/ChangeVersionWrapper.cpp: (WebCore::ChangeVersionWrapper::performPreflight): (WebCore::ChangeVersionWrapper::performPostflight): (WebCore::ChangeVersionWrapper::handleCommitFailedAfterPostflight): * Modules/webdatabase/ChangeVersionWrapper.h: (ChangeVersionWrapper): * Modules/webdatabase/Database.cpp: (WebCore::Database::Database): (WebCore::Database::close): (WebCore::Database::changeVersion): (WebCore::Database::transaction): (WebCore::Database::readTransaction): (WebCore::Database::runTransaction): (WebCore::Database::reportStartTransactionResult): (WebCore::Database::reportCommitTransactionResult): (WebCore::Database::reportExecuteStatementResult): * Modules/webdatabase/Database.h: (WebCore::Database::databaseContext): (Database): (WebCore::Database::reportStartTransactionResult): (WebCore::Database::reportCommitTransactionResult): (WebCore::Database::reportExecuteStatementResult): * Modules/webdatabase/DatabaseBackend.cpp: * Modules/webdatabase/DatabaseBackend.h: (DatabaseBackend): (WebCore::DatabaseBackend::reportOpenDatabaseResult): (WebCore::DatabaseBackend::reportChangeVersionResult): (WebCore::DatabaseBackend::reportStartTransactionResult): (WebCore::DatabaseBackend::reportCommitTransactionResult): (WebCore::DatabaseBackend::reportExecuteStatementResult): (WebCore::DatabaseBackend::reportVacuumDatabaseResult): * Modules/webdatabase/DatabaseBackendAsync.cpp: (WebCore::DatabaseBackendAsync::DatabaseBackendAsync): (WebCore::DatabaseBackendAsync::runTransaction): (WebCore::DatabaseBackendAsync::inProgressTransactionCompleted): Moved from frontend. (WebCore::DatabaseBackendAsync::scheduleTransaction): Moved from frontend. (WebCore::DatabaseBackendAsync::scheduleTransactionStep): Moved from frontend. (WebCore::DatabaseBackendAsync::transactionClient): Moved from frontend. (WebCore::DatabaseBackendAsync::transactionCoordinator): Moved from frontend. * Modules/webdatabase/DatabaseBackendAsync.h: (DatabaseBackendAsync): * Modules/webdatabase/DatabaseBackendContext.cpp: (WebCore::DatabaseBackendContext::frontend): * Modules/webdatabase/DatabaseBackendContext.h: (DatabaseBackendContext): * Modules/webdatabase/DatabaseManager.cpp: * Modules/webdatabase/DatabaseManager.h: (DatabaseManager): * Modules/webdatabase/DatabaseServer.cpp: * Modules/webdatabase/DatabaseServer.h: * Modules/webdatabase/DatabaseTask.cpp: (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::create): (WebCore::SQLTransaction::SQLTransaction): (WebCore::SQLTransaction::setBackend): (WebCore::SQLTransaction::stateFunctionFor): (WebCore::SQLTransaction::requestTransitToState): (WebCore::SQLTransaction::nextStateForTransactionError): - was handleTransactionError(). There's also a backend version. (WebCore::SQLTransaction::deliverTransactionCallback): Moved from backend. (WebCore::SQLTransaction::deliverTransactionErrorCallback): Moved from backend. (WebCore::SQLTransaction::deliverStatementCallback): Moved from backend. (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Moved from backend. (WebCore::SQLTransaction::deliverSuccessCallback): Moved from backend. (WebCore::SQLTransaction::unreachableState): (WebCore::SQLTransaction::sendToBackendState): (WebCore::SQLTransaction::performPendingCallback): Moved from backend. (WebCore::SQLTransaction::executeSQL): Moved from backend. (WebCore::SQLTransaction::checkAndHandleClosedOrInterruptedDatabase): (WebCore::SQLTransaction::clearCallbackWrappers): * Modules/webdatabase/SQLTransaction.h: (SQLTransaction): (WebCore::SQLTransaction::database): (WebCore::SQLTransaction::hasCallback): (WebCore::SQLTransaction::hasSuccessCallback): (WebCore::SQLTransaction::hasErrorCallback): * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::create): (WebCore::SQLTransactionBackend::SQLTransactionBackend): (WebCore::SQLTransactionBackend::doCleanup): (WebCore::SQLTransactionBackend::transactionError): (WebCore::SQLTransactionBackend::setShouldRetryCurrentStatement): (WebCore::SQLTransactionBackend::stateFunctionFor): (WebCore::SQLTransactionBackend::enqueueStatement): (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase): (WebCore::SQLTransactionBackend::performNextStep): (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown): (WebCore::SQLTransactionBackend::acquireLock): (WebCore::SQLTransactionBackend::lockAcquired): (WebCore::SQLTransactionBackend::openTransactionAndPreflight): (WebCore::SQLTransactionBackend::runStatements): (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): - was runCurrentStatement(). (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): - was handleCurrentStatementError(). (WebCore::SQLTransactionBackend::postflightAndCommit): (WebCore::SQLTransactionBackend::cleanupAndTerminate): (WebCore::SQLTransactionBackend::nextStateForTransactionError): - was handleTransactionError(). There's also a frontend version. (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback): (WebCore::SQLTransactionBackend::requestTransitToState): (WebCore::SQLTransactionBackend::unreachableState): (WebCore::SQLTransactionBackend::sendToFrontendState): * Modules/webdatabase/SQLTransactionBackend.h: (SQLTransactionWrapper): (SQLTransactionBackend): (WebCore::SQLTransactionBackend::database): * Modules/webdatabase/SQLTransactionClient.cpp: (WebCore::SQLTransactionClient::didCommitWriteTransaction): (WebCore::SQLTransactionClient::didExecuteStatement): * Modules/webdatabase/SQLTransactionCoordinator.cpp: (WebCore::getDatabaseIdentifier): * Modules/webdatabase/SQLTransactionState.h: Added. * Modules/webdatabase/SQLTransactionStateMachine.cpp: Added. (WebCore::nameForSQLTransactionState): - was debugStepName(). * Modules/webdatabase/SQLTransactionStateMachine.h: Added. (SQLTransactionStateMachine): (WebCore::SQLTransactionStateMachine::~SQLTransactionStateMachine): (WebCore::::SQLTransactionStateMachine): (WebCore::::setStateToRequestedState): (WebCore::::runStateMachine): * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorDatabaseAgent.cpp: 2013-02-14 Jer Noble EME: replace MediaKeySession.addKey() -> update() https://bugs.webkit.org/show_bug.cgi?id=109461 Reviewed by Eric Carlson. No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html test. In the latest draft of the Encrypted Media Spec, the addKeys() method has been replaced with update(). * Modules/encryptedmedia/CDM.h: * Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::update): (WebCore::MediaKeySession::addKeyTimerFired): * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/MediaKeySession.idl: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::webkitAddKey): * testing/MockCDM.cpp: (WebCore::MockCDMSession::update): 2013-02-14 Tony Chang Unreviewed, set svn:eol-style CRLF for .sln files. * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style. * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style. 2013-02-14 Eric Carlson [Mac] adjust caption color user preference calculation https://bugs.webkit.org/show_bug.cgi?id=109840 Reviewed by Dean Jackson. No new tests, it isn't possible to test this with DRT. * page/CaptionUserPreferencesMac.mm: (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): The color is "important" if either the color or opacity are supposed to override. (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Ditto. (WebCore::CaptionUserPreferencesMac::captionsTextColor): Ditto. * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style. * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style. 2013-02-14 Cosmin Truta Numeric identifiers of events are not guaranteed to be unique https://bugs.webkit.org/show_bug.cgi?id=103259 Reviewed by Alexey Proskuryakov. The results of setTimeout, setInterval and navigator.geolocation.watchPosition are positive integer values extracted from a simple circular sequential number generator, whose uniqueness can be guaranteed for no more than 2^31 calls to any of these functions. In order to provide this guarantee beyond this limit, we repeatedly ask for the next sequential id until we get one that's not used already. This solution works instantly under normal circumstances, when there are few live timeout ids or geolocation ids at any given moment. Handling millions of live ids will require another solution. No new tests. Brief tests of uniqueness already exist. Moreover, reproducing this particular issue would require 2^31 set/clear function calls, which is prohibitively expensive. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::Watchers::add): Rename from Watchers::set; return false if watch id already exists. (WebCore::Geolocation::watchPosition): Repeat until the new watch id is unique. * Modules/geolocation/Geolocation.h: (Watchers): Rename Watchers::set to Watchers::add. * Modules/geolocation/Geolocation.idl: Rename the argument of Geolocation::clearWatch to WatchID. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): Update initialization. (WebCore::ScriptExecutionContext::circularSequentialID): Rename from newUniqueID; remove FIXME note. * dom/ScriptExecutionContext.h: (ScriptExecutionContext): Rename ScriptExecutionContext::newUniqueID to ScriptExecutionContext::circularSequentialID. (WebCore::ScriptExecutionContext::addTimeout): Return false (do not assert) if timeout id already exists. * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): Repeat until the new timeout id is unique. 2013-02-14 Sheriff Bot Unreviewed, rolling out r142825. http://trac.webkit.org/changeset/142825 https://bugs.webkit.org/show_bug.cgi?id=109856 Causes some inspector tests to time out (Requested by anttik on #webkit). * platform/mac/SharedTimerMac.mm: (WebCore): (WebCore::PowerObserver::restartSharedTimer): (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): 2013-02-14 Lamarque V. Souza Support the ch unit from css3-values https://bugs.webkit.org/show_bug.cgi?id=85755 Reviewed by David Hyatt. Original patch by Sumedha Widyadharma . Test: fast/css/css3-ch-unit.html * css/CSSCalculationValue.cpp: (WebCore::unitCategory): * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::detectNumberToken): * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::computeLengthDouble): (WebCore::CSSPrimitiveValue::customCssText): (WebCore::CSSPrimitiveValue::cloneForCSSOM): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isFontRelativeLength): (WebCore::CSSPrimitiveValue::isLength): * platform/graphics/FontMetrics.h: (WebCore::FontMetrics::FontMetrics): (WebCore::FontMetrics::zeroWidth): (WebCore::FontMetrics::setZeroWidth): (FontMetrics): (WebCore::FontMetrics::hasZeroWidth): (WebCore::FontMetrics::setHasZeroWidth): * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::platformGlyphInit): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::zeroGlyph): (WebCore::SimpleFontData::setZeroGlyph): (SimpleFontData): * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformInit): 2013-02-14 David Kilzer [Mac] Clean up WARNING_CFLAGS Reviewed by Mark Rowe. * Configurations/Base.xcconfig: Use GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable -Wshorten-64-to-32 rather than WARNING_CFLAGS. 2013-02-14 Christophe Dumez Add addHTTPHeaderField() method to ResourceResponse https://bugs.webkit.org/show_bug.cgi?id=109844 Reviewed by Adam Barth. ResourceRequestBase provides both setHTTPHeaderField() and addHTTPHeaderField(). However, ResourceResponseBase only provides setHTTPHeaderField(). This is a bit inconsistent. As a result, the addHTTPHeaderField() functionality's implementation is duplicated in several ports (at least chromium and soup). This patch introduces addHTTPHeaderField() to ResourceResponseBase and makes use of it in Chromium and Soup backends. No new tests, no behavior change. * platform/chromium/support/WebURLResponse.cpp: (WebKit::WebURLResponse::addHTTPHeaderField): Use ResourceResponseBase::addHTTPHeaderField(). * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::updateHeaderParsedState): Move headers' parsed state update code from setHTTPHeaderField() to a new updateHeaderParsedState() method to avoid code duplication. (WebCore): (WebCore::ResourceResponseBase::setHTTPHeaderField): (WebCore::ResourceResponseBase::addHTTPHeaderField): * platform/network/ResourceResponseBase.h: (ResourceResponseBase): * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::updateFromSoupMessageHeaders): Use ResourceResponseBase::addHTTPHeaderField(). 2013-02-14 Philip Rogers Prevent inconsistent firstChild during document destruction https://bugs.webkit.org/show_bug.cgi?id=106530 Reviewed by Abhishek Arya. During document destruction, addChildNodesToDeletionQueue can allow a container node to have an invalid first child, causing a crash. This patch updates addChildNodesToDeletionQueue to maintain a valid value for firstChild() even while updating its children. Test: svg/custom/animateMotion-path-change-crash.svg * dom/ContainerNodeAlgorithms.h: (WebCore::Private::addChildNodesToDeletionQueue): To ensure prevoiusSibling() is also valid, this code was slightly refactored to call setPreviousSibling(0) on the next node instead of the current node. 2013-02-14 Julien Chaffraix [CSS Grid Layout] Add an internal 2D grid representation to RenderGrid https://bugs.webkit.org/show_bug.cgi?id=109714 Reviewed by Ojan Vafai. This change introduces a 2D grid representation of the grid areas. Our implementation is a straight Vector of Vectors for the grid areas, each grid area able to hold an arbitrary number of RenderBox* so they hold a Vector of RenderBoxes. As an optimization, each grid area has enough inline storage to hold one grid item which should cover most cases. In order to keep the code readable, a GridIterator was introduced to hide the new grid. Refactoring, covered by existing tests. * rendering/RenderGrid.cpp: (RenderGrid::GridIterator): (WebCore::RenderGrid::GridIterator::GridIterator): (WebCore::RenderGrid::GridIterator::nextGridItem): Added a mono-directional iterator. In order to be more aligned with the rest of the code, this iterator actually walks orthogonally to the |direction| (ie fixing the |direction|'s track). * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computePreferredLogicalWidths): (WebCore::RenderGrid::layoutGridItems): Updated these 2 functions to place the items on the grid and clear it at the end. (WebCore::RenderGrid::computePreferredTrackWidth): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): Updated to use the GridIterator to walk over the rows / columns. (WebCore::RenderGrid::placeItemsOnGrid): Added this function that inserts the grid items into the right grid area. * rendering/RenderGrid.h: (WebCore::RenderGrid::gridColumnCount): (WebCore::RenderGrid::gridRowCount): Added these helper functions. 2013-02-14 Sheriff Bot Unreviewed, rolling out r141990. http://trac.webkit.org/changeset/141990 https://bugs.webkit.org/show_bug.cgi?id=109850 ~5% regression on intl2 page cycler (Requested by kling on #webkit). * platform/graphics/GlyphPage.h: (WebCore::GlyphPage::create): (WebCore::GlyphPage::glyphDataForCharacter): (WebCore::GlyphPage::glyphDataForIndex): (WebCore::GlyphPage::fontDataForCharacter): (WebCore::GlyphPage::setGlyphDataForIndex): (GlyphPage): (WebCore::GlyphPage::copyFrom): (WebCore::GlyphPage::clear): (WebCore::GlyphPage::clearForFontData): (WebCore::GlyphPage::GlyphPage): * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): 2013-02-14 Mark Pilgrim [Chromium] Move PlatformMessagePortChannel to WebCore https://bugs.webkit.org/show_bug.cgi?id=109845 Reviewed by Adam Barth. Part of a larger refactoring series; see tracking bug 106829. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * dom/default/chromium: Added. * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Added. (WebCore): (WebCore::MessagePortChannel::create): (WebCore::MessagePortChannel::createChannel): (WebCore::MessagePortChannel::MessagePortChannel): (WebCore::MessagePortChannel::~MessagePortChannel): (WebCore::MessagePortChannel::entangleIfOpen): (WebCore::MessagePortChannel::disentangle): (WebCore::MessagePortChannel::postMessageToRemote): (WebCore::MessagePortChannel::tryGetMessageFromRemote): (WebCore::MessagePortChannel::close): (WebCore::MessagePortChannel::isConnectedTo): (WebCore::MessagePortChannel::hasPendingActivity): (WebCore::MessagePortChannel::locallyEntangledPort): (WebCore::PlatformMessagePortChannel::create): (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel): (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel): (WebCore::PlatformMessagePortChannel::createChannel): (WebCore::PlatformMessagePortChannel::messageAvailable): (WebCore::PlatformMessagePortChannel::entangleIfOpen): (WebCore::PlatformMessagePortChannel::disentangle): (WebCore::PlatformMessagePortChannel::postMessageToRemote): (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): (WebCore::PlatformMessagePortChannel::close): (WebCore::PlatformMessagePortChannel::isConnectedTo): (WebCore::PlatformMessagePortChannel::hasPendingActivity): (WebCore::PlatformMessagePortChannel::setEntangledChannel): (WebCore::PlatformMessagePortChannel::webChannelRelease): * dom/default/chromium/PlatformMessagePortChannelChromium.h: Added. (WebKit): (WebCore): (PlatformMessagePortChannel): 2013-02-14 Chris Fleizach Remove Leopard Accessibility support from WebCore (now that no port builds on Leopard) https://bugs.webkit.org/show_bug.cgi?id=90250 Reviewed by Eric Seidel. The Leopard era checks for accessibility lists and accessibility tables can be removed now. * accessibility/AccessibilityARIAGrid.cpp: (WebCore): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): (WebCore::AccessibilityARIAGrid::isTableExposableThroughAccessibility): * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::computeAccessibilityIsIgnored): * accessibility/AccessibilityList.h: * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore::AccessibilityTable::init): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): 2013-02-14 Bear Travis Make outside-shape the default value for shape-inside https://bugs.webkit.org/show_bug.cgi?id=109605 Reviewed by Levi Weintraub. Creating a single reference outside-shape value and setting it as the default for shape-inside. Existing tests cover the default value, just updating them to use outside-shape. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape value. (WebCore): * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp file. 2013-02-14 Min Qin Passing alpha to DeferredImageDecoder once decoding completes https://bugs.webkit.org/show_bug.cgi?id=108892 Reviewed by Stephen White. We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed Added unit tests in ImageFrameGeneratorTest. * platform/graphics/chromium/DeferredImageDecoder.cpp: (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex): * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::tryToScale): (WebCore::ImageFrameGenerator::decode): * platform/graphics/chromium/LazyDecodingPixelRef.cpp: (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef): (WebCore::LazyDecodingPixelRef::onUnlockPixels): * platform/graphics/chromium/LazyDecodingPixelRef.h: (WebCore::LazyDecodingPixelRef::hasAlpha): (LazyDecodingPixelRef): * platform/graphics/chromium/ScaledImageFragment.cpp: (WebCore::ScaledImageFragment::ScaledImageFragment): * platform/graphics/chromium/ScaledImageFragment.h: (WebCore::ScaledImageFragment::create): (ScaledImageFragment): (WebCore::ScaledImageFragment::hasAlpha): 2013-02-14 David Grogan IndexedDB: Add a few more histogram calls https://bugs.webkit.org/show_bug.cgi?id=109762 Reviewed by Tony Chang. A few places where commits could fail weren't being logged. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::IDBBackingStore::deleteDatabase): (WebCore::IDBBackingStore::Transaction::commit): 2013-02-14 Tony Chang Padding and border changes doesn't trigger relayout of children https://bugs.webkit.org/show_bug.cgi?id=109639 Reviewed by Kent Tamura. In RenderBlock::layoutBlock, we only relayout our children if our logical width changes. This misses cases where our logical width doesn't change (i.e., padding or border changes), but our content width does change. This is a more general case of bug 104997. Test: fast/block/dynamic-padding-border.html * rendering/RenderBox.cpp: (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed. (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen even without border-box box sizing. 2013-02-14 Peter Rybin Web Inspector: fix closure compilation warnings caused by setVariableValue change https://bugs.webkit.org/show_bug.cgi?id=109488 Reviewed by Pavel Feldman. Annotations are fixed as required by closure compiler. Parameters in Inspector.json are reordered as required. * inspector/InjectedScriptExterns.js: (InjectedScriptHost.prototype.setFunctionVariableValue): (JavaScriptCallFrame.prototype.setVariableValue): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setVariableValue): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): 2013-02-14 Tommy Widenflycht MediaStream API: RTCDataChannel triggers a use-after-free https://bugs.webkit.org/show_bug.cgi?id=109806 Reviewed by Adam Barth. Making sure RTCPeerConnection::stop() is always called at least once. Also making sure that RTCDataChannels state gets set to Closed correctly. Hard to test in WebKit but covered by Chromium tests. * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::stop): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::~RTCPeerConnection): (WebCore::RTCPeerConnection::stop): 2013-02-14 Vsevolod Vlasov Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state. https://bugs.webkit.org/show_bug.cgi?id=109823 Reviewed by Pavel Feldman. * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): 2013-02-14 Sheriff Bot Unreviewed, rolling out r142820. http://trac.webkit.org/changeset/142820 https://bugs.webkit.org/show_bug.cgi?id=109839 Causing crashes on chromium canaries (Requested by atwilson_ on #webkit). * dom/Document.cpp: (WebCore::Document::updateLayout): (WebCore::Document::implicitClose): * rendering/RenderQuote.h: (RenderQuote): * rendering/RenderView.cpp: * rendering/RenderView.h: 2013-02-14 Mario Sanchez Prada [GTK] Missing call to g_object_ref while retrieving accessible table cells https://bugs.webkit.org/show_bug.cgi?id=106903 Reviewed by Martin Robinson. Add missing extra ref to implementation of atk_table_ref_at(). Test: accessibility/table-cell-for-column-and-row-crash.html * accessibility/atk/WebKitAccessibleInterfaceTable.cpp: (webkitAccessibleTableRefAt): This method transfers full ownership over the returned AtkObject, so an extra reference is needed here. 2013-02-14 Mike Fenton [BlackBerry] Update keyboard event details to match platform details. https://bugs.webkit.org/show_bug.cgi?id=109693 Reviewed by Yong Li. PR 220170. Update the keyboard event details to match the platform details available. Rename helper function to better describe the conversion. Reviewed Internally by Nima Ghanavatian and Gen Mak. * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp: (WebCore::windowsKeyCodeForBlackBerryKeycode): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2013-02-08 Andrey Kosyakov Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent https://bugs.webkit.org/show_bug.cgi?id=109192 Reviewed by Pavel Feldman. - remove frame and compositing instrumentation methods from InspectorInstrumentation; - expose those methods on InspectorController instead. * WebCore.exp.in: * inspector/InspectorController.cpp: (WebCore::InspectorController::didBeginFrame): (WebCore): (WebCore::InspectorController::didCancelFrame): (WebCore::InspectorController::willComposite): (WebCore::InspectorController::didComposite): * inspector/InspectorController.h: (InspectorController): * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * testing/Internals.cpp: (WebCore::Internals::emitInspectorDidBeginFrame): (WebCore::Internals::emitInspectorDidCancelFrame): 2013-02-14 Vladislav Kaznacheev Web Inspector: Fixed a layout regression in CanvasProfileView. https://bugs.webkit.org/show_bug.cgi?id=109835 Reviewed by Pavel Feldman. Changed splitView.css to supported nested SplitView instances. * inspector/front-end/splitView.css: (.split-view-vertical > .split-view-contents): (.split-view-vertical > .split-view-contents-first): (.split-view-vertical > .split-view-contents-first.maximized): (.split-view-vertical > .split-view-contents-second): (.split-view-vertical > .split-view-contents-second.maximized): (.split-view-horizontal > .split-view-contents): (.split-view-horizontal > .split-view-contents-first): (.split-view-horizontal > .split-view-contents-first.maximized): (.split-view-horizontal > .split-view-contents-second): (.split-view-horizontal > .split-view-contents-second.maximized): (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)): (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)): (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)): (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)): (.split-view-vertical > .split-view-resizer): (.split-view-horizontal > .split-view-resizer): 2013-02-14 Vladislav Kaznacheev Web Inspector: Color picker should not be available in Computed Styles pane. https://bugs.webkit.org/show_bug.cgi?id=109697 Reviewed by Alexander Pavlov. Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value (the ComputedStyleSidebarPane instance). * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): 2013-02-14 Yury Semikhatsky Web Inspector: don't create static local string for program literal in InspectorTimelineAgent https://bugs.webkit.org/show_bug.cgi?id=109811 Reviewed by Pavel Feldman. Use const char* constant value instead of creating String from it in thread-unsafe static local variable. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): 2013-02-14 Pan Deng [Web Inspector] Fix initiator name issue in reload scenario for Network Panel. https://bugs.webkit.org/show_bug.cgi?id=108746. Reviewed by Vsevolod Vlasov. WebInspector.displayNameForURL() does not work as expected in the reload scenario, for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another, the full host name will be displayed. This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL. No new tests. * inspector/front-end/ParsedURL.js: (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario. * inspector/front-end/ResourceUtils.js: (WebInspector.displayNameForURL): add host in the head if url trimed as a "/". 2013-02-14 Alexei Filippov Web Inspector: fix to record button remaining red after heap snapshot is taken https://bugs.webkit.org/show_bug.cgi?id=109804 Reviewed by Yury Semikhatsky. Revert part of r142243 fix. Namely heap snapshot taking button made stateless as it was before. * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.toggleRecordButton): 2013-02-14 Alexander Pavlov Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code https://bugs.webkit.org/show_bug.cgi?id=109801 Reviewed by Yury Semikhatsky. No new tests, as existing tests cover the change. * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didClearWindowObjectInWorld): * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::notifyContextCreated): 2013-02-14 Sergio Villar Senin Add logging support to IndexedDB for non-Chromium platforms https://bugs.webkit.org/show_bug.cgi?id=109809 Reviewed by Kentaro Hara. Enable logging of IndexedDB through the StorageAPI log channel for non-Chromium architectures. No new tests required, we're just enabling logging for IndexedDB using the currently available logging framework. * Modules/indexeddb/IDBTracing.h: 2013-02-14 Vsevolod Vlasov Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping. https://bugs.webkit.org/show_bug.cgi?id=109704 Reviewed by Alexander Pavlov. Replaced this methods with one line implementation on the only call site. * inspector/front-end/FileSystemMapping.js: * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI): (WebInspector.FileSystemProjectDelegate.prototype.setFileContent): (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded): (WebInspector.FileSystemProjectDelegate.prototype._populate): 2013-02-14 Anton Vayvod [Text Autosizing] Process narrow descendants with the same multiplier for the font size. https://bugs.webkit.org/show_bug.cgi?id=109573 Reviewed by Julien Chaffraix. Combine narrow descendants of the same autosizing cluster into a group that is autosized with the same multiplier. For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have a large margin individually applied (via a CSS selector), causing them all to individually appear narrower than their enclosing blockContainingAllText. Rather than making each of these paragraphs into a separate cluster, we want them all to share the same multiplier, as if they were a single cluster. Test: fast/text-autosizing/narrow-descendants-combined.html * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::processClusterInternal): Common implementation for processCluster() and processCompositeCluster that accepts the text width and whether the cluster should be autosized as parameters instead of calculating it inline. (WebCore::TextAutosizer::processCluster): Calculates the text width for a single cluster and whether it should be autosized, then calls processClusterInternal() to apply the multiplier and process the cluster's descendants. (WebCore::TextAutosizer::processCompositeCluster): Calculates the text width for a group of renderers and if the group should be autosized, then calls processClusterInternal() repeatedly with the same multiplier to apply it and process all the descendants of the group. (WebCore::TextAutosizer::clusterShouldBeAutosized): Calls the multiple renderers version to avoid code duplication. (WebCore::TextAutosizer::compositeClusterShouldBeAutosized): The multiple renderers version of clusterShouldBeAutosized. * rendering/TextAutosizer.h: Updated method declarations. 2013-02-14 Andrey Adaikin Look into possibilities of typedef in webkit idl files https://bugs.webkit.org/show_bug.cgi?id=52340 Reviewed by Kentaro Hara. Add typedef support for WebKit IDL parser. Drive by: fixed a bug of generating "unrestrictedfloat" without a space. Added a new IDL test TestTypedefs.idl. The results were generated without typedefs. * bindings/scripts/IDLParser.pm: (assertNoExtendedAttributesInTypedef): (parseDefinitions): (applyTypedefs): (applyTypedefsForSignature): (parseTypedef): (parseUnrestrictedFloatType): * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added. (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate): (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate): (WebDOMTestTypedefs::WebDOMTestTypedefs): (WebDOMTestTypedefs::operator=): (WebDOMTestTypedefs::impl): (WebDOMTestTypedefs::~WebDOMTestTypedefs): (WebDOMTestTypedefs::unsignedLongLongAttr): (WebDOMTestTypedefs::setUnsignedLongLongAttr): (WebDOMTestTypedefs::immutableSerializedScriptValue): (WebDOMTestTypedefs::setImmutableSerializedScriptValue): (WebDOMTestTypedefs::func): (WebDOMTestTypedefs::multiTransferList): (WebDOMTestTypedefs::setShadow): (WebDOMTestTypedefs::nullableArrayArg): (WebDOMTestTypedefs::immutablePointFunction): (toWebCore): (toWebKit): * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added. (WebCore): (WebDOMTestTypedefs): * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added. (_WebKitDOMTestTypedefsPrivate): (WebKit): (WebKit::kit): (WebKit::core): (WebKit::wrapTestTypedefs): (webkit_dom_test_typedefs_finalize): (webkit_dom_test_typedefs_set_property): (webkit_dom_test_typedefs_get_property): (webkit_dom_test_typedefs_constructor): (webkit_dom_test_typedefs_class_init): (webkit_dom_test_typedefs_init): (webkit_dom_test_typedefs_func): (webkit_dom_test_typedefs_multi_transfer_list): (webkit_dom_test_typedefs_set_shadow): (webkit_dom_test_typedefs_nullable_array_arg): (webkit_dom_test_typedefs_immutable_point_function): (webkit_dom_test_typedefs_string_array_function): (webkit_dom_test_typedefs_get_unsigned_long_long_attr): (webkit_dom_test_typedefs_set_unsigned_long_long_attr): (webkit_dom_test_typedefs_get_immutable_serialized_script_value): (webkit_dom_test_typedefs_set_immutable_serialized_script_value): * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added. (_WebKitDOMTestTypedefs): (_WebKitDOMTestTypedefsClass): * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added. (WebKit): * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added. (WebCore): (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs): (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor): (WebCore::JSTestTypedefsConstructor::finishCreation): (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot): (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor): (WebCore::JSTestTypedefsConstructor::getConstructData): (WebCore::JSTestTypedefsPrototype::self): (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot): (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor): (WebCore::JSTestTypedefs::JSTestTypedefs): (WebCore::JSTestTypedefs::finishCreation): (WebCore::JSTestTypedefs::createPrototype): (WebCore::JSTestTypedefs::destroy): (WebCore::JSTestTypedefs::~JSTestTypedefs): (WebCore::JSTestTypedefs::getOwnPropertySlot): (WebCore::JSTestTypedefs::getOwnPropertyDescriptor): (WebCore::jsTestTypedefsUnsignedLongLongAttr): (WebCore::jsTestTypedefsImmutableSerializedScriptValue): (WebCore::jsTestTypedefsConstructorTestSubObj): (WebCore::jsTestTypedefsConstructor): (WebCore::JSTestTypedefs::put): (WebCore::setJSTestTypedefsUnsignedLongLongAttr): (WebCore::setJSTestTypedefsImmutableSerializedScriptValue): (WebCore::JSTestTypedefs::getConstructor): (WebCore::jsTestTypedefsPrototypeFunctionFunc): (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList): (WebCore::jsTestTypedefsPrototypeFunctionSetShadow): (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg): (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction): (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction): (WebCore::isObservable): (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots): (WebCore::JSTestTypedefsOwner::finalize): (WebCore::toJS): (WebCore::toTestTypedefs): * bindings/scripts/test/JS/JSTestTypedefs.h: Added. (WebCore): (JSTestTypedefs): (WebCore::JSTestTypedefs::create): (WebCore::JSTestTypedefs::createStructure): (WebCore::JSTestTypedefs::impl): (WebCore::JSTestTypedefs::releaseImpl): (WebCore::JSTestTypedefs::releaseImplIfNotNull): (JSTestTypedefsOwner): (WebCore::wrapperOwner): (WebCore::wrapperContext): (JSTestTypedefsPrototype): (WebCore::JSTestTypedefsPrototype::create): (WebCore::JSTestTypedefsPrototype::createStructure): (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype): (JSTestTypedefsConstructor): (WebCore::JSTestTypedefsConstructor::create): (WebCore::JSTestTypedefsConstructor::createStructure): * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added. * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added. (-[DOMTestTypedefs dealloc]): (-[DOMTestTypedefs finalize]): (-[DOMTestTypedefs unsignedLongLongAttr]): (-[DOMTestTypedefs setUnsignedLongLongAttr:]): (-[DOMTestTypedefs immutableSerializedScriptValue]): (-[DOMTestTypedefs setImmutableSerializedScriptValue:]): (-[DOMTestTypedefs multiTransferList:tx:second:txx:]): (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]): (-[DOMTestTypedefs immutablePointFunction]): (core): (kit): * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added. (WebCore): * bindings/scripts/test/TestTypedefs.idl: Added. * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added. (WebCore): (WebCore::checkTypeOrDieTrying): (TestTypedefsV8Internal): (WebCore::TestTypedefsV8Internal::V8_USE): (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter): (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter): (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter): (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter): (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter): (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter): (WebCore::TestTypedefsV8Internal::funcCallback): (WebCore::TestTypedefsV8Internal::multiTransferListCallback): (WebCore::TestTypedefsV8Internal::setShadowCallback): (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback): (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback): (WebCore::TestTypedefsV8Internal::funcWithClampCallback): (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback): (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback): (WebCore::V8TestTypedefs::constructorCallback): (WebCore::ConfigureV8TestTypedefsTemplate): (WebCore::V8TestTypedefs::GetRawTemplate): (WebCore::V8TestTypedefs::GetTemplate): (WebCore::V8TestTypedefs::HasInstance): (WebCore::V8TestTypedefs::createWrapper): (WebCore::V8TestTypedefs::derefObject): * bindings/scripts/test/V8/V8TestTypedefs.h: Added. (WebCore): (V8TestTypedefs): (WebCore::V8TestTypedefs::toNative): (WebCore::V8TestTypedefs::installPerContextProperties): (WebCore::V8TestTypedefs::installPerContextPrototypeProperties): (WebCore::wrap): (WebCore::toV8): (WebCore::toV8Fast): 2013-02-13 Kentaro Hara [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(), and XXXAccessorSetter() to XXXAttrSetterCustom() https://bugs.webkit.org/show_bug.cgi?id=109679 Reviewed by Adam Barth. For naming consistency and clarification. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateHeaderCustomCall): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateImplementation): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::customAttrAttrGetter): (WebCore::TestObjV8Internal::customAttrAttrSetter): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom): * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp: (WebCore::V8BiquadFilterNode::typeAttrSetterCustom): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom): (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom): (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom): (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAttrGetterCustom): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAttrGetterCustom): (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom): (WebCore::V8Coordinates::headingAttrGetterCustom): (WebCore::V8Coordinates::speedAttrGetterCustom): * bindings/v8/custom/V8CustomEventCustom.cpp: (WebCore::V8CustomEvent::detailAttrGetterCustom): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::eventAttrGetterCustom): (WebCore::V8DOMWindow::eventAttrSetterCustom): (WebCore::V8DOMWindow::locationAttrSetterCustom): (WebCore::V8DOMWindow::openerAttrSetterCustom): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom): (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom): (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom): (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom): (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom): (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAttrGetterCustom): (WebCore::V8Document::locationAttrSetterCustom): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::V8Event::dataTransferAttrGetterCustom): (WebCore::V8Event::clipboardDataAttrGetterCustom): * bindings/v8/custom/V8FileReaderCustom.cpp: (WebCore::V8FileReader::resultAttrGetterCustom): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::allAttrSetterCustom): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::V8HTMLElement::itemValueAttrGetterCustom): (WebCore::V8HTMLElement::itemValueAttrSetterCustom): * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: (WebCore::V8HTMLFrameElement::locationAttrSetterCustom): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom): (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom): (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom): (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom): (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom): (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom): * bindings/v8/custom/V8HTMLLinkElementCustom.cpp: (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom): (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom): * bindings/v8/custom/V8HTMLMediaElementCustom.cpp: (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAttrGetterCustom): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom): (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom): (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::hashAttrSetterCustom): (WebCore::V8Location::hostAttrSetterCustom): (WebCore::V8Location::hostnameAttrSetterCustom): (WebCore::V8Location::hrefAttrSetterCustom): (WebCore::V8Location::pathnameAttrSetterCustom): (WebCore::V8Location::portAttrSetterCustom): (WebCore::V8Location::protocolAttrSetterCustom): (WebCore::V8Location::searchAttrSetterCustom): (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAttrGetterCustom): (WebCore::V8MessageEvent::portsAttrGetterCustom): * bindings/v8/custom/V8OscillatorNodeCustom.cpp: (WebCore::V8OscillatorNode::typeAttrSetterCustom): * bindings/v8/custom/V8PannerNodeCustom.cpp: (WebCore::V8PannerNode::panningModelAttrSetterCustom): (WebCore::V8PannerNode::distanceModelAttrSetterCustom): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAttrGetterCustom): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::valueAttrGetterCustom): (WebCore::V8SVGLength::valueAttrSetterCustom): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAttrGetterCustom): * bindings/v8/custom/V8WebKitAnimationCustom.cpp: (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom): (WebCore::V8XMLHttpRequest::responseAttrGetterCustom): 2013-02-14 Yury Semikhatsky Web Inspector: extract DOM counters graph implementation into its own class https://bugs.webkit.org/show_bug.cgi?id=109796 Reviewed by Alexander Pavlov. Extracted DOM counters graph implementation into DOMCountersGraph.js leaving in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js Added some closure annotations and converted object literals into classes with named constructors. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/DOMCountersGraph.js: Added. (WebInspector.DOMCountersGraph): (WebInspector.DOMCounterUI): (WebInspector.DOMCountersGraph.Counter): (WebInspector.DOMCounterUI.prototype.setRange): (WebInspector.DOMCounterUI.prototype.updateCurrentValue): (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker): (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker): (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker): (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker): (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar): (WebInspector.DOMCountersGraph.prototype._createCounterUIList): (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount): (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount): (WebInspector.DOMCountersGraph.prototype._canvasHeight): (WebInspector.DOMCountersGraph.prototype._onRecordAdded): (WebInspector.DOMCountersGraph.prototype._draw): (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker): (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker): (WebInspector.DOMCountersGraph.prototype._drawMarker): (WebInspector.DOMCountersGraph.prototype._drawGraph): (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics): (WebInspector.MemoryStatistics.Counter): (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar): (WebInspector.MemoryStatistics.prototype._createCounterUIList): (WebInspector.MemoryStatistics.prototype.setTopPosition): (WebInspector.MemoryStatistics.prototype._canvasHeight): (WebInspector.MemoryStatistics.prototype._onRecordAdded): (WebInspector.MemoryStatistics.prototype._draw): (WebInspector.MemoryStatistics.prototype._onClick): (WebInspector.MemoryStatistics.prototype._onMouseOut): (WebInspector.MemoryStatistics.prototype._onMouseOver): (WebInspector.MemoryStatistics.prototype._onMouseMove): (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker): (WebInspector.MemoryStatistics.prototype._drawMarker): (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker): * inspector/front-end/NativeMemoryGraph.js: (WebInspector.NativeMemoryGraph.Counter): (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics): (WebInspector.NativeMemoryGraph.prototype._onRecordAdded): (WebInspector.NativeMemoryGraph.prototype._draw): * inspector/front-end/TimelinePanel.js: * inspector/front-end/WebKit.qrc: 2013-02-13 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot. https://bugs.webkit.org/show_bug.cgi?id=109703 Also we need to traverse the tree from the top root element down to the leaves. Reviewed by Yury Semikhatsky. * dom/ContainerNode.cpp: (WebCore::ContainerNode::reportMemoryUsage): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2013-02-13 Hayato Ito [Shadow DOM] Implements a '::distributed()' pseudo element. https://bugs.webkit.org/show_bug.cgi?id=82169 Reviewed by Dimitri Glazkov. Implements a '::distributed()' pseudo element. See the Shadow DOM specification and the filed bug for the detail. - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684 For example, suppose we are given the following DOM tree and shadow tree: - - - [A's ShadowRoot] - tag is seen. It also (unfortunately) knows some about the loader guts and how to construct a proper CachedResourcRequest and issue a preload. This patch changes the model so that the preload scanners only know how to produce PreloadRequest objects and append them to a passed-in vector. This changes the preload-scanner behavior so that preloads are now all issued in one large batch at the end of scanning, instead of as we hit each resource. It's possible that we'll wait to instead check for preload requests more often, at a possible tradeoff to tokenizing speed. An alternate approach might be to pass in a preload-delegate of sorts which knew how to either build a vector, or send requests immediately. For now the build-a-vector-always approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least. This patch has 2 main pieces: - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner This is done through introduction of a new HTMLResourcePreloader class which holds a Document* and knows how to talk to the CachedResourceLoader. - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer. (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just be passed in tokens and expected to issue loads if necessary.) This passes all of the LayoutTests using the main thread parser. This patch does not make the HTMLPreloadScanner 100% ready for threading (it still uses AtomicString which is currently not-OK on the parser thread) but it's very close. Two further (already written) patches will complete this. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::CSSPreloadScanner): (WebCore::CSSPreloadScanner::scan): (WebCore::CSSPreloadScanner::emitRule): * html/parser/CSSPreloadScanner.h: (CSSPreloadScanner): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert): (WebCore::HTMLDocumentParser::append): (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): * html/parser/HTMLDocumentParser.h: (HTMLDocumentParser): * html/parser/HTMLPreloadScanner.cpp: (WebCore::isStartTag): (WebCore): (WebCore::isStartOrEndTag): (WebCore::PreloadTask::processAttributes): (WebCore::PreloadTask::charset): (PreloadTask): (WebCore::PreloadTask::resourceType): (WebCore::PreloadTask::shouldPreload): (WebCore::PreloadTask::createPreloadRequest): (WebCore::HTMLPreloadScanner::HTMLPreloadScanner): (WebCore::HTMLPreloadScanner::scan): (WebCore::HTMLPreloadScanner::processPossibleTemplateTag): (WebCore::HTMLPreloadScanner::processPossibleStyleTag): (WebCore::HTMLPreloadScanner::processPossibleBaseTag): (WebCore::HTMLPreloadScanner::processToken): * html/parser/HTMLPreloadScanner.h: (HTMLPreloadScanner): * html/parser/HTMLResourcePreloader.cpp: Added. (WebCore): (WebCore::isStringSafeToSendToAnotherThread): (WebCore::PreloadRequest::isSafeToSendToAnotherThread): (WebCore::PreloadRequest::completeURL): (WebCore::PreloadRequest::resourceRequest): (WebCore::HTMLResourcePreloader::preload): * html/parser/HTMLResourcePreloader.h: Added. (WebCore): (PreloadRequest): (WebCore::PreloadRequest::create): (WebCore::PreloadRequest::PreloadRequest): (HTMLResourcePreloader): (WebCore::HTMLResourcePreloader::HTMLResourcePreloader): (WebCore::HTMLResourcePreloader::createWeakPtr): * loader/cache/CachedResourceRequest.h: 2013-02-06 Kentaro Hara [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext() https://bugs.webkit.org/show_bug.cgi?id=109039 Reviewed by Adam Barth. This is a follow-up patch for r141983. Rename methods for consistency. No tests. No change in behavior. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::current): * bindings/v8/DOMWrapperWorld.h: (WebCore::DOMWrapperWorld::getWorld): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.h: (WebCore::worldForEnteredContext): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::constructorCallbackCustom): 2013-02-10 Alexandre Elias [chromium] Fix Android scrollbar size https://bugs.webkit.org/show_bug.cgi?id=109374 Reviewed by James Robinson. This shrinks scrollbars to 3 device-independent pixels (usually 6 physical pixels) and deletes the edge fade. Although the Android system theme does have an edge fade, it's a much sharper cliff than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0) and I can't perceive any difference compared with no fade at all. No new tests (due for rewrite in a week anyway). * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: (WebCore): (WebCore::ScrollbarThemeChromiumAndroid::paintThumb): 2013-02-04 Kentaro Hara [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise https://bugs.webkit.org/show_bug.cgi?id=108579 Reviewed by Adam Barth. Currently V8GCController::m_edenNodes stores a list of nodes whose wrappers have been created since the latest GC. The reason why we needed m_edenNodes is that there was no way to know a list of wrappers in the new space of V8. By using m_edenNodes, we had been approximating 'wrappers in the new space' by 'wrappers that have been created since the latest GC'. Now V8 provides VisitHandlesForPartialDependence(), with which WebKit can know a list of wrappers in the new space. By using the API, we can remove V8GCController::m_edenNodes. The benefit is that (1) we no longer need to keep m_edenNodes and that (2) it enables more precise minor DOM GC (Remember that m_edenNodes was just an approximation). Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 The benchmark runs 300 iterations, each of which creates 100000 elements. The benchmark measures average, min, median, max and stdev of execution times of the 300 iterations. This will tell us the worst-case overhead of this change. Before: mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms After: mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms As shown above, I couldn't observe any performance regression. No tests. No change in behavior. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): * bindings/v8/V8Binding.h: (WebCore): (WebCore::worldForEnteredContextIfIsolated): (WebCore::worldForEnteredContextWithoutContextCheck): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): * bindings/v8/V8GCController.cpp: (WebCore::gcTree): (WebCore): (MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::notifyFinished): (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): 2013-02-10 Tim Horton REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache https://bugs.webkit.org/show_bug.cgi?id=109317 Reviewed by Simon Fraser. Mark all scrolling that occurs beneath FrameView::layout as programmatic. Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html * page/FrameView.cpp: (WebCore::FrameView::layout): 2013-02-10 Kent Tamura [Mac] Fix release build failure by recent reverts * WebCore.exp.in: 2013-02-10 Philippe Normand [GStreamer] media/video-controls-fullscreen-volume.html crashes https://bugs.webkit.org/show_bug.cgi?id=108682 Reviewed by Martin Robinson. Clean up various signal handlers and avoid bad interaction between the FullscreenVideoControllerGStreamer and its subclasses, especially when the platform video window is created. * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen): Initialize the window before connecting to the volume/mute signals. This ensures that the signals won't ever interfere with an inexisting window. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus synchronous handler function. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Disconnect from volume/mute signals. (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement): Keep a trace of volume/mute signal handlers. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Various forward type declarations to avoid un-necessary header includes. (MediaPlayerPrivateGStreamerBase): * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp: (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk): (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out if volume button hasn't been created yet. (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto. 2013-02-10 Andreas Kling RenderStyle should use copy-on-write inheritance for NinePieceImage. Reviewed by Antti Koivisto. Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures. This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.) Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write to a border-image related value. 1.23 MB progression on Membuster3. * rendering/style/NinePieceImage.cpp: (WebCore::defaultData): (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImageData::NinePieceImageData): (WebCore::NinePieceImageData::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImageData::create): (WebCore::NinePieceImageData::copy): (NinePieceImageData): (NinePieceImage): (WebCore::NinePieceImage::operator==): (WebCore::NinePieceImage::operator!=): (WebCore::NinePieceImage::hasImage): (WebCore::NinePieceImage::image): (WebCore::NinePieceImage::setImage): (WebCore::NinePieceImage::imageSlices): (WebCore::NinePieceImage::setImageSlices): (WebCore::NinePieceImage::fill): (WebCore::NinePieceImage::setFill): (WebCore::NinePieceImage::borderSlices): (WebCore::NinePieceImage::setBorderSlices): (WebCore::NinePieceImage::outset): (WebCore::NinePieceImage::setOutset): (WebCore::NinePieceImage::horizontalRule): (WebCore::NinePieceImage::setHorizontalRule): (WebCore::NinePieceImage::verticalRule): (WebCore::NinePieceImage::setVerticalRule): (WebCore::NinePieceImage::copyImageSlicesFrom): (WebCore::NinePieceImage::copyBorderSlicesFrom): (WebCore::NinePieceImage::copyOutsetFrom): (WebCore::NinePieceImage::copyRepeatFrom): (WebCore::NinePieceImage::setMaskDefaults): (WebCore::NinePieceImage::computeOutset): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setBorderImageSource): (WebCore::RenderStyle::setBorderImageSlices): (WebCore::RenderStyle::setBorderImageWidth): (WebCore::RenderStyle::setBorderImageOutset): * rendering/style/RenderStyle.h: 2013-02-10 Kent Tamura Unreviewed, rolling out r142343. http://trac.webkit.org/changeset/142343 https://bugs.webkit.org/show_bug.cgi?id=108284 It might make inspector/profiler/selector-profiler-url.html crashy. * WebCore.exp.in: * css/plugIns.css: (p): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::createRenderer): (WebCore::HTMLPlugInImageElement::willRecalcStyle): (WebCore::HTMLPlugInImageElement::updateSnapshot): (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): * html/HTMLPlugInImageElement.h: (WebCore): (HTMLPlugInImageElement): * page/ChromeClient.h: (WebCore::ChromeClient::plugInStartLabelImage): * platform/LocalizedStrings.cpp: * platform/LocalizedStrings.h: * platform/blackberry/LocalizedStringsBlackBerry.cpp: * platform/chromium/LocalizedStringsChromium.cpp: * platform/efl/LocalizedStringsEfl.cpp: (WebCore): * platform/gtk/LocalizedStringsGtk.cpp: (WebCore): * platform/qt/LocalizedStringsQt.cpp: * rendering/RenderSnapshottedPlugIn.cpp: (WebCore): (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): (WebCore::RenderSnapshottedPlugIn::paint): (WebCore::RenderSnapshottedPlugIn::paintReplaced): (WebCore::RenderSnapshottedPlugIn::paintSnapshot): (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot): (WebCore::RenderSnapshottedPlugIn::startLabelImage): (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel): (WebCore::RenderSnapshottedPlugIn::getCursor): (WebCore::RenderSnapshottedPlugIn::handleEvent): (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): * rendering/RenderSnapshottedPlugIn.h: 2013-02-10 Andreas Kling RenderText: Access characters through m_text instead of caching data pointers separately. Reviewed by Antti Koivisto. Go through RenderText::m_text.impl() instead of caching the character data pointer. RenderText should never have a null String in m_text so it's safe to access impl() directly. We have assertions for this since before. Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class. 749 KB progression on Membuster3. * rendering/RenderText.cpp: (SameSizeAsRenderText): (WebCore::RenderText::RenderText): (WebCore::RenderText::setTextInternal): * rendering/RenderText.h: (WebCore::RenderText::is8Bit): (WebCore::RenderText::characters8): (WebCore::RenderText::characters16): (WebCore::RenderText::characterAt): (WebCore::RenderText::operator[]): (RenderText): 2013-02-10 Jae Hyun Park Rename ENABLE(GLIB_SUPPORT) to USE(GLIB) https://bugs.webkit.org/show_bug.cgi?id=104266 Reviewed by Philippe Normand. Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with the existing macro naming conventions. From Platform.h USE() - use a particular third-party library or optional OS service ENABLE() - turn on a specific feature of WebKit No new tests, no new functionality. * WebCore.pri: 2013-02-10 Zan Dobersek [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang https://bugs.webkit.org/show_bug.cgi?id=109321 Reviewed by Noam Rosenthal. Clang is reporting errors due to non-constant expressions that cannot be narrowed from double to float type in initializer list when constructing a matrix of GC3Dfloat numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor. No new tests - no new functionality. * platform/graphics/texmap/TextureMapperShaderProgram.cpp: (WebCore::TextureMapperShaderProgram::setMatrix): 2013-02-10 Philippe Normand [GStreamer] audio is muted when playback rate is between 0.8 and 2.0 https://bugs.webkit.org/show_bug.cgi?id=109362 Reviewed by Martin Robinson. Don't mute sound if the audio pitch is preserved. If this is not the case mute it if it's too extreme, as the HTML5 spec recommends. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::setRate): 2013-02-09 Dominic Mazzoni fast/encoding/parser-tests-*.html tests sometimes crash https://bugs.webkit.org/show_bug.cgi?id=108058 Reviewed by Chris Fleizach. To avoid calling accessibilityIsIgnored while the render tree is unstable, call accessibilityIsIgnored in the notification timer handler, only for childrenChanged notifications. This exposed a problem where notifications queued on objects can fire after the object has been deleted; fix that by checking the object's id, which is always set to 0 when removed from the tree. Covered by existing tests. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::notificationPostTimerFired): 2013-02-09 Eric Carlson [Mac] Do not assume MediaAccessibility framework is installed https://bugs.webkit.org/show_bug.cgi?id=109365 Reviewed by Sam Weinig. * page/CaptionUserPreferencesMac.h: * page/CaptionUserPreferencesMac.mm: (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework is not available. (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto. (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto. (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto. (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto. (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto. (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto. (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto. (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. 2013-02-09 Dominic Mazzoni AX: move isIgnored caching to AXObject https://bugs.webkit.org/show_bug.cgi?id=109322 Reviewed by Chris Fleizach. There's some benefit to caching accessibilityIsIgnored (using AXComputedObjectAttributeCache) for more than just AXRenderObject, so move the caching code to AXObject. AXObject now has a protected virtual method computeAccessibilityIsIgnored, and all subclasses override that instead. No new tests. * accessibility/AccessibilityImageMapLink.h: (AccessibilityImageMapLink): (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored): * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::computeAccessibilityIsIgnored): * accessibility/AccessibilityList.h: (AccessibilityList): * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored): * accessibility/AccessibilityListBox.h: (AccessibilityListBox): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored): * accessibility/AccessibilityListBoxOption.h: (AccessibilityListBoxOption): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored): (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored): * accessibility/AccessibilityMediaControls.h: (AccessibilityMediaControl): (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored): (AccessibilityMediaTimeDisplay): * accessibility/AccessibilityMenuList.h: (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored): * accessibility/AccessibilityMenuListOption.cpp: (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored): * accessibility/AccessibilityMenuListOption.h: (AccessibilityMenuListOption): * accessibility/AccessibilityMenuListPopup.cpp: (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored): * accessibility/AccessibilityMenuListPopup.h: (AccessibilityMenuListPopup): * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::accessibilityIsIgnored): (WebCore): * accessibility/AccessibilityObject.h: (AccessibilityObject): (WebCore::AccessibilityObject::computeAccessibilityIsIgnored): * accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored): * accessibility/AccessibilityProgressIndicator.h: (AccessibilityProgressIndicator): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored): * accessibility/AccessibilityScrollView.h: (AccessibilityScrollView): * accessibility/AccessibilityScrollbar.h: (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored): (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored): * accessibility/AccessibilitySlider.h: (AccessibilitySlider): (AccessibilitySliderThumb): * accessibility/AccessibilitySpinButton.h: (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored): (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::computeAccessibilityIsIgnored): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored): * accessibility/AccessibilityTableCell.h: (AccessibilityTableCell): * accessibility/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored): * accessibility/AccessibilityTableColumn.h: (AccessibilityTableColumn): * accessibility/AccessibilityTableHeaderContainer.cpp: (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored): * accessibility/AccessibilityTableHeaderContainer.h: (AccessibilityTableHeaderContainer): * accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored): * accessibility/AccessibilityTableRow.h: (AccessibilityTableRow): 2013-02-09 David Farler Make TestWebKitAPI work for iOS https://bugs.webkit.org/show_bug.cgi?id=108978 Reviewed by David Kilzer. Tests already exist - refactor only. * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods. * platform/KURL.cpp: Inlined hasPath() into the header * platform/KURL.h: Inlined hasPath() into the header 2013-02-09 Adam Barth Load event fires too early with threaded HTML parser https://bugs.webkit.org/show_bug.cgi?id=108984 Reviewed by Eric Seidel. Previously, the DocumentLoader would always be on the stack when the HTMLDocumentParser was processing data from the network. The DocumentLoader would then tell isLoadingInAPISense not to fire the load event. Now that we process data asynchronously with the threaded parser, the DocumentLoader is not always on the stack, which means we need to delay the load event using the clause that asks the parser whether it is processing data. Unfortunately, that clause is fragile because we can check for load completion while we're switching parsers between the network-created parser and a script-created parser. To avoid accidentially triggerin the load event during these "gaps," this patch introduces a counter on document to record how many parsers are active on the stack. While that numer is non-zero, we'll delay the load event. When that number reaches zero, we'll check for load complete. That last step is required because the DocumentLoader::finishLoading method is no longer guarunteed to check for load complete after calling finish on the parser because the finish operation might complete asynchronously. After this patch, the threaded parser passes all but four fast/parser tests. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::hasActiveParser): (WebCore): (WebCore::Document::decrementActiveParserCount): * dom/Document.h: (Document): (WebCore::Document::incrementActiveParserCount): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser): (WebCore::HTMLDocumentParser::pumpTokenizer): * html/parser/HTMLParserScheduler.cpp: (WebCore::ActiveParserSession::ActiveParserSession): (WebCore): (WebCore::ActiveParserSession::~ActiveParserSession): (WebCore::PumpSession::PumpSession): (WebCore::PumpSession::~PumpSession): * html/parser/HTMLParserScheduler.h: (WebCore): (ActiveParserSession): (PumpSession): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): 2013-02-09 Mike West Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes. https://bugs.webkit.org/show_bug.cgi?id=109295 Reviewed by Darin Adler. The monster patch in http://wkbug.com/108771 missed an entire class of ignored exceptions. It only dealt with call sites that never initialized the ExceptionCode variable, on the assumption that only such call sites would ignore the variable's value. That was a flawed assumption: a large number of sites that initialize the ExceptionCode to 0 ignore it regardless. This patch deals with the almost-as-large set of callsites that initialize the variable, pass it to a function, and then never touch it again. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::forceClose): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaSelectedTextRange): (WebCore::AccessibilityRenderObject::visiblePositionForIndex): (WebCore::AccessibilityRenderObject::indexForVisiblePosition): * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (getSelectionOffsetsForObject): * accessibility/atk/WebKitAccessibleUtil.cpp: (selectionBelongsToObject): * dom/Node.cpp: (WebCore::Node::textRects): * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::hide): * editing/EditingStyle.cpp: (WebCore::EditingStyle::styleAtSelectionStart): * editing/Editor.cpp: (WebCore::Editor::canDeleteRange): (WebCore::Editor::pasteAsPlainText): (WebCore::Editor::pasteAsFragment): (WebCore::Editor::shouldDeleteRange): (WebCore::Editor::dispatchCPPEvent): (WebCore::Editor::setComposition): (WebCore::Editor::advanceToNextMisspelling): (WebCore::isFrameInRange): * editing/EditorCommand.cpp: (WebCore::expandSelectionToGranularity): * editing/MergeIdenticalElementsCommand.cpp: (WebCore::MergeIdenticalElementsCommand::doApply): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::doUnapply): * editing/SplitTextNodeCommand.cpp: (WebCore::SplitTextNodeCommand::doApply): * editing/TextCheckingHelper.cpp: (WebCore::expandToParagraphBoundary): (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): (WebCore::TextCheckingHelper::isUngrammatical): (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange): * editing/TextInsertionBaseCommand.cpp: (WebCore::dispatchBeforeTextInsertedEvent): (WebCore::canAppendNewLineFeedToSelection): * editing/TextIterator.cpp: (WebCore::findPlainText): * editing/htmlediting.cpp: (WebCore::extendRangeToWrappingNodes): (WebCore::isNodeVisiblyContainedWithin): * editing/visible_units.cpp: (WebCore::nextBoundary): * html/FileInputType.cpp: (WebCore::FileInputType::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::setText): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::setText): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::didCompleteLoad): * html/RangeInputType.cpp: (WebCore::RangeInputType::createShadowSubtree): * html/SearchInputType.cpp: (WebCore::SearchInputType::createShadowSubtree): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): * html/track/TextTrackList.cpp: (TextTrackList::asyncEventTimerFired): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchDocument): * inspector/InspectorDatabaseAgent.cpp: (WebCore): * inspector/InspectorFileSystemAgent.cpp: (WebCore): * page/DOMSelection.cpp: (WebCore::DOMSelection::addRange): * page/DragController.cpp: (WebCore::DragController::dispatchTextInputEventFor): * page/EventHandler.cpp: (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::handleTouchEvent): * page/FrameActionScheduler.cpp: (WebCore::EventFrameAction::fire): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): * svg/SVGDocument.cpp: (WebCore::SVGDocument::dispatchZoomEvent): (WebCore::SVGDocument::dispatchScrollEvent): * svg/SVGLength.cpp: (WebCore::SVGLength::SVGLength): (WebCore::SVGLength::value): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::exitText): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::startDocument): (WebCore::XMLDocumentParser::parseCharacters): 2013-02-09 Stephen White [skia] Fix memory management in SkiaImageFilterBuilder and friends. https://bugs.webkit.org/show_bug.cgi?id=109326 Sadly, skia has no official ref-counted pointers, so we must make do with SkAutoTUnref. Reviewed by James Robinson. Correctness covered by existing tests in css3/filters. * platform/graphics/filters/skia/FEBlendSkia.cpp: (WebCore::FEBlend::createImageFilter): * platform/graphics/filters/skia/FEComponentTransferSkia.cpp: (WebCore::FEComponentTransfer::createImageFilter): * platform/graphics/filters/skia/FELightingSkia.cpp: (WebCore::FELighting::createImageFilter): Adopt refs produced by the build() pass with SkAutoTUnref. * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp: (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder): Unref the builder's hashmap effect pointers. (WebCore::SkiaImageFilterBuilder::build): Ref the pointer returned to the caller, and use SkAutoTUnref internally while building the tree. * platform/graphics/filters/skia/SkiaImageFilterBuilder.h: (SkiaImageFilterBuilder): Add a destructor to SkiaImageFilterBuilder. 2013-02-09 Dominic Mazzoni AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue https://bugs.webkit.org/show_bug.cgi?id=108238 Reviewed by Chris Fleizach. Simple refactoring, no new tests. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::childrenChanged): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::AccessibilityObject): (WebCore::AccessibilityObject::lastKnownIsIgnoredValue): (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue): (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged): * accessibility/AccessibilityObject.h: (AccessibilityObject): 2013-02-09 Anton Vayvod [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since non-null pointer is always expected. https://bugs.webkit.org/show_bug.cgi?id=109079 Reviewed by Kenneth Rohde Christiansen. Cleanup change, no need to add new tests or modify the existing ones. * rendering/TextAutosizer.cpp: Changed parameter from a pointer to a reference in the methods below. (WebCore::TextAutosizer::processSubtree): (WebCore::TextAutosizer::processCluster): (WebCore::TextAutosizer::processContainer): (WebCore::TextAutosizer::isNarrowDescendant): (WebCore::TextAutosizer::isWiderDescendant): (WebCore::TextAutosizer::isAutosizingCluster): (WebCore::TextAutosizer::clusterShouldBeAutosized): (WebCore::TextAutosizer::measureDescendantTextWidth): * rendering/TextAutosizer.h: updated method prototypes. 2013-02-09 Rafael Brandao [TexMap] Separate classes per file in TextureMapperBackingStore.h https://bugs.webkit.org/show_bug.cgi?id=109333 Reviewed by Noam Rosenthal. TextureMapperBackingStore.h had the classes TextureMapperBackingStore, TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and TextureMapperTile which was quite confusing. Now each one has its own header and its own source file. No new tests needed, refactoring only. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * platform/graphics/texmap/TextureMapperBackingStore.cpp: * platform/graphics/texmap/TextureMapperBackingStore.h: * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added. (WebCore): (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface): (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded): (WebCore::TextureMapperSurfaceBackingStore::texture): (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper): * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added. (WebCore): (TextureMapperSurfaceBackingStore): (WebCore::TextureMapperSurfaceBackingStore::create): (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore): (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore): * platform/graphics/texmap/TextureMapperTile.cpp: Added. (WebCore): (WebCore::TextureMapperTile::updateContents): (WebCore::TextureMapperTile::paint): * platform/graphics/texmap/TextureMapperTile.h: Added. (WebCore): (TextureMapperTile): (WebCore::TextureMapperTile::texture): (WebCore::TextureMapperTile::rect): (WebCore::TextureMapperTile::setTexture): (WebCore::TextureMapperTile::setRect): (WebCore::TextureMapperTile::~TextureMapperTile): (WebCore::TextureMapperTile::TextureMapperTile): * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp. (WebCore): (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore): (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded): (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect): (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper): (WebCore::TextureMapperTiledBackingStore::drawBorder): (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter): (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded): (WebCore::TextureMapperTiledBackingStore::updateContents): (WebCore::TextureMapperTiledBackingStore::texture): * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added. (WebCore): (TextureMapperTiledBackingStore): (WebCore::TextureMapperTiledBackingStore::create): (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore): (WebCore::TextureMapperTiledBackingStore::setContentsToImage): (WebCore::TextureMapperTiledBackingStore::rect): * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h: 2013-02-09 Philip Rogers Sanitize m_keyTimes for paced value animations https://bugs.webkit.org/show_bug.cgi?id=108828 Reviewed by Dirk Schulze. SVG animations with calcMode=paced calculate new m_keyTimes in SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists user-specified values, a crash could occur because the user-specified values were not sanitized. This change clears user-specified keyTimes before calculating new ones. Test: svg/animations/animate-keytimes-crash.html * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced): 2013-02-09 Eric Seidel Fix TextDocumentParser to play nice with threading https://bugs.webkit.org/show_bug.cgi?id=109240 Reviewed by Adam Barth. Before the HTML5 parser re-write the text document parser was completely custom. With the HTML5 parser, we just made the TextDocumentParser use the HTMLDocumentParser with an artificial script tag. However, our solution was slightly over-engineered to avoid lying about the column numbers of the first line of the text document during parsing. :) This change makes us use a simpler (and threading-compatible) solution by just inserting a real "
" tag into the
        input stream instead of hacking one together with the treebuilder
        and manually setting the Tokenizer state.

        fast/parser/empty-text-resource.html covers this case.

        * html/parser/TextDocumentParser.cpp:
        (WebCore::TextDocumentParser::TextDocumentParser):
        (WebCore::TextDocumentParser::insertFakePreElement):

2013-02-09  Kent Tamura  

        Add missing copyright header
        https://bugs.webkit.org/show_bug.cgi?id=107507

        * Resources/pagepopups/chromium/calendarPickerChromium.css:
        * Resources/pagepopups/chromium/pickerCommonChromium.css:

2013-02-09  Kent Tamura  

        Fix crash by img[ismap] with content property
        https://bugs.webkit.org/show_bug.cgi?id=108702

        Reviewed by Adam Barth.

        Test: fast/dom/HTMLAnchorElement/anchor-ismap-crash.html

        * html/HTMLAnchorElement.cpp:
        (WebCore::appendServerMapMousePosition):
        Check if the renderer of an img element is RenderImage.

2013-02-09  Mike West  

        Drop ExceptionCode from IDB's directionToString and modeToString.
        https://bugs.webkit.org/show_bug.cgi?id=109143

        Reviewed by Jochen Eisinger.

        No caller of either IDBCursor::directionToString or
        IDBTransaction::modeToString makes use of the ExceptionCode these
        methods require. This patch removes the 'ExceptionCode&' parameter from
        both methods and their callsites.

        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::direction):
        (WebCore::IDBCursor::directionToString):
            Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
            exception previously generated with ASSERT_NOT_REACHED.
        * Modules/indexeddb/IDBCursor.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::mode):
        (WebCore::IDBTransaction::modeToString):
            Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
            exception previously generated with ASSERT_NOT_REACHED.
        * Modules/indexeddb/IDBTransaction.h:

2013-02-09  Kondapally Kalyan  

        [EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
        https://bugs.webkit.org/show_bug.cgi?id=106666

        Reviewed by Kenneth Rohde Christiansen.

        Covered by existing WebGL tests.

        This patch removes any duplicate code in X11WindowResources and
        GraphicsSurfaceGLX. No new functionality is added.

        * PlatformEfl.cmake:
        * Target.pri:
        * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
        (WebCore::EGLConfigSelector::pixmapContextConfig):
        * platform/graphics/surfaces/egl/EGLConfigSelector.h:
        (EGLConfigSelector):
        * platform/graphics/surfaces/egl/EGLSurface.cpp:
        (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
        (WebCore::EGLWindowTransportSurface::destroy):
        (WebCore::EGLWindowTransportSurface::setGeometry):
        * platform/graphics/surfaces/egl/EGLSurface.h:
        (WebCore):
        (EGLWindowTransportSurface):
        * platform/graphics/surfaces/glx/GLXConfigSelector.h:
        (WebCore::GLXConfigSelector::GLXConfigSelector):
        (WebCore::GLXConfigSelector::visualInfo):
        (WebCore::GLXConfigSelector::pBufferContextConfig):
        (WebCore::GLXConfigSelector::createSurfaceConfig):
        (GLXConfigSelector):
        * platform/graphics/surfaces/glx/GLXContext.cpp:
        (WebCore::initializeARBExtensions):
        (WebCore::GLXOffScreenContext::GLXOffScreenContext):
        (WebCore::GLXOffScreenContext::initialize):
        (WebCore::GLXOffScreenContext::platformReleaseCurrent):
        (WebCore::GLXOffScreenContext::freeResources):
        * platform/graphics/surfaces/glx/GLXContext.h:
        (GLXOffScreenContext):
        * platform/graphics/surfaces/glx/GLXSurface.cpp:
        (WebCore::GLXTransportSurface::GLXTransportSurface):
        (WebCore::GLXTransportSurface::setGeometry):
        (WebCore::GLXTransportSurface::destroy):
        (WebCore::GLXPBuffer::initialize):
        * platform/graphics/surfaces/glx/GLXSurface.h:
        (GLXTransportSurface):
        (GLXPBuffer):
        * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
        (WebCore):
        (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
        (WebCore::GraphicsSurfacePrivate::initialize):
        (GraphicsSurfacePrivate):
        (WebCore::GraphicsSurfacePrivate::createSurface):
        (WebCore::GraphicsSurfacePrivate::createPixmap):
        (WebCore::GraphicsSurfacePrivate::display):
        (WebCore::GraphicsSurfacePrivate::flags):
        (WebCore::GraphicsSurfacePrivate::clear):
        (WebCore::GraphicsSurface::platformPaintToTextureMapper):
        No new functionality added. Made changes to take the common code into use.

        * platform/graphics/surfaces/glx/X11WindowResources.h: Removed.
        * platform/graphics/surfaces/glx/X11Helper.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp.
        (WebCore):
        (WebCore::DisplayConnection::DisplayConnection):
        (DisplayConnection):
        (WebCore::DisplayConnection::~DisplayConnection):
        (WebCore::DisplayConnection::display):
        (OffScreenRootWindow):
        (WebCore::OffScreenRootWindow::OffScreenRootWindow):
        (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
        (WebCore::OffScreenRootWindow::rootWindow):
        (WebCore::X11Helper::resizeWindow):
        (WebCore::X11Helper::createOffScreenWindow):
        (WebCore::X11Helper::destroyWindow):
        (WebCore::X11Helper::isXRenderExtensionSupported):
        (WebCore::X11Helper::nativeDisplay):
        (WebCore::X11Helper::offscreenRootWindow):
        * platform/graphics/surfaces/glx/X11Helper.h: Added.
        (WebCore):
        (WebCore::handleXPixmapCreationError):
        (X11Helper):
        (ScopedXPixmapCreationErrorHandler):
        (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
        (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
        (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
        Moved common code from GraphicsSurfaceGLX to X11Helper.

2013-02-09  Andrey Lushnikov  

        Web Inspector: show whitespace characters in DTE
        https://bugs.webkit.org/show_bug.cgi?id=108947

        Reviewed by Pavel Feldman.

        New test: inspector/editor/text-editor-show-whitespaces.html

        Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
        add ::before pseudoclass for this groups which contains necessary
        amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
        option in "Sources" section of "General" tab.

        * English.lproj/localizedStrings.js:
        * inspector/front-end/DefaultTextEditor.js:
        (WebInspector.TextEditorMainPanel.prototype.wasShown):
        (WebInspector.TextEditorMainPanel.prototype.willHide):
        (WebInspector.TextEditorMainPanel.prototype._renderRanges):
        (WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
        (WebInspector.TextEditorMainPanel.prototype._paintLine):
        * inspector/front-end/Settings.js:
        * inspector/front-end/SettingsScreen.js:
        (WebInspector.GenericSettingsTab):
        * inspector/front-end/inspectorSyntaxHighlight.css:
        (.webkit-whitespace-1::before):
        (.webkit-whitespace-2::before):
        (.webkit-whitespace-4::before):
        (.webkit-whitespace-8::before):
        (.webkit-whitespace-16::before):
        (.webkit-whitespace::before):

2013-02-08  Eric Carlson  

        [Mac] respect in-band caption color
        https://bugs.webkit.org/show_bug.cgi?id=109203

        Reviewed by Dean Jackson.

        Test: media/track/track-in-band-style.html

        * WebCore.xcodeproj/project.pbxproj: Add HTMLDivElement.h to private headers because it is 
            included by HTMLTextElement, which is included by HTMLMediaElement.h, which is included 
            by files in WebKit/WebKit2.
        * html/track/InbandTextTrack.cpp:
        (WebCore::InbandTextTrack::addGenericCue): Set cue colors if necessary.

        * html/track/TextTrackCue.h:
        (WebCore::TextTrackCue::element): New, accessor for the cue element so it can be styled.

        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set container and cue background 
            color if necessary.
        (WebCore::TextTrackCueGeneric::operator==): Compare cue colors.
        * html/track/TextTrackCueGeneric.h:
        (WebCore::TextTrackCueGeneric::foregroundColor): Add color accessors.
        (WebCore::TextTrackCueGeneric::setForegroundColor):
        (WebCore::TextTrackCueGeneric::backgroundColor):
        (WebCore::TextTrackCueGeneric::setBackgroundColor):

        * page/CaptionUserPreferencesMac.mm:
        (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Always
            regenerate override CSS when an element registers for callbacks.
        (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Drive by fix of "window color" padding.
        (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Log the stylesheet generated
            for easier debugging.

        * platform/graphics/InbandTextTrackPrivateClient.h:
        (WebCore::GenericCueData::foregroundColor): Add color getters/setters.
        (WebCore::GenericCueData::setForegroundColor):
        (WebCore::GenericCueData::backgroundColor):
        (WebCore::GenericCueData::setBackgroundColor):

        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::makeRGBA32FromARGBCFArray): Initialize a RGBA32 from a CFArray of color values.
        (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process cue colors.

2013-02-08  Benjamin Poulain  

        Move workerThreadCount from TestRunner to WebCore Internals
        https://bugs.webkit.org/show_bug.cgi?id=109239

        Reviewed by Darin Adler.

        Add the new read-only property workerThreadCount.

        * testing/Internals.cpp:
        (WebCore::Internals::workerThreadCount):
        (WebCore):
        * testing/Internals.h:
        (Internals):
        * testing/Internals.idl:

2013-02-08  Dean Jackson  

        Snapshotted plug-in should use shadow root
        https://bugs.webkit.org/show_bug.cgi?id=108284

        Reviewed by Simon Fraser.

        Take two! This time with updated exports file.

        A snapshotted plugin needs to indicate to the user that it can be clicked
        to be restarted. Previously this was done with an image that had embedded
        text. Instead, we now use an internal shadow root to embed some markup that
        will display instructions that can be localised.

        The UA stylesheet for plug-ins provides a default styling for the label, which
        can be overridden by ports.

        In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
        since it is only responsible for drawing a paused plug-in. The snapshot creation
        can work with the default renderer, but a shadow root requires something like
        RenderBlock in order to draw its children. We swap from one renderer to another when
        necessary either by creating the shadow root or by explicitly detaching and attaching
        the plugin element.

        Unfortunately this is difficult to test, because the snapshotting requires
        time to execute, and also a PluginView to be instantiated.

        * WebCore.exp.in: Export the InlineBox interface.

        * css/plugIns.css:
        (object::-webkit-snapshotted-plugin-content): New rules for a default label style.

        * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
        * platform/LocalizedStrings.h:
        * platform/blackberry/LocalizedStringsBlackBerry.cpp:
        * platform/chromium/LocalizedStringsChromium.cpp:
        * platform/efl/LocalizedStringsEfl.cpp:
        * platform/gtk/LocalizedStringsGtk.cpp:
        * platform/qt/LocalizedStringsQt.cpp:

        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
        that RenderSnapshottedPlugIn no longer is an embedded object.

        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
        (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
        (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
        (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
            a renderer, otherwise use the typical plug-in path.
        (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
            need to give it to the renderer.
        (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
        * html/HTMLPlugInImageElement.h:
        (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
            should show immediately.
        (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
            to swap to the Shadow Root.
        (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
            in being recreated. Make sure we reattach so that a plugin renderer will be created.
        (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
            displayState for snapshots.
        * html/HTMLPlugInImageElement.h:
        (HTMLPlugInImageElement): The new methods listed above.
        (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
            a snapshot should be immediately labeled.

        * page/ChromeClient.h: No need for plugInStartLabelImage any more.

        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
        (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
        (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
        (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
        (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
        (WebCore::RenderSnapshottedPlugIn::getCursor):
        (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
        * rendering/RenderSnapshottedPlugIn.h:
        (RenderSnapshottedPlugIn): New inheritance. Some method renaming.

2013-02-08  Dean Jackson  

        Rolling out r142333 and r142337 which broke Mac Release builds.

2013-02-08  Sheriff Bot  

        Unreviewed, rolling out r142337.
        http://trac.webkit.org/changeset/142337
        https://bugs.webkit.org/show_bug.cgi?id=109339

        Breaking Mac release builds (Requested by dino_ on #webkit).

        * rendering/RenderSnapshottedPlugIn.h:

2013-02-08  Dean Jackson  

        Attempted Mac and GTK build fix after r142333.

        * rendering/RenderSnapshottedPlugIn.h: Include InlineBox.h.

2013-02-08  Andy Estes  

        Restore pre-r118852 behavior for EllipsisBox::nodeAtPoint()
        https://bugs.webkit.org/show_bug.cgi?id=109277

        Reviewed by Simon Fraser.

        Test: fast/flexbox/line-clamp-link-after-ellipsis.html

        Roll out r118852. Enough time has passed that this can't be done
        mechanically, so transcribe the old method definition to current
        WebCore interfaces.

        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::markupBox): EllipsisBox no longer has
        m_markupBox, so break the logic for finding the markup box from
        paintMarkupBox() into its own function.
        (WebCore::EllipsisBox::paintMarkupBox): Call markupBox().
        (WebCore::EllipsisBox::nodeAtPoint): Transcribe the pre-r118852 implementation.
        * rendering/EllipsisBox.h:
        (EllipsisBox): Declare markupBox().

2013-02-08  Eric Carlson  

        [Mac] In-band closed caption tracks are not always initialized correctly
        https://bugs.webkit.org/show_bug.cgi?id=109323

        Reviewed by Dean Jackson.

        No new tests, this fix makes existing tests less flakey.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Create and configure legible output
            here instad of in tracksChanged.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing in a build with
            in-band track support.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Move legible output creation to 
            createAVPlayerItem, don't set look at track media type to see if the movie has captions 
            when we have support for in-band captions.

2013-02-08  Dean Jackson  

        Snapshotted plug-in should use shadow root
        https://bugs.webkit.org/show_bug.cgi?id=108284

        Reviewed by Simon Fraser.

        A snapshotted plugin needs to indicate to the user that it can be clicked
        to be restarted. Previously this was done with an image that had embedded
        text. Instead, we now use an internal shadow root to embed some markup that
        will display instructions that can be localised.

        The UA stylesheet for plug-ins provides a default styling for the label, which
        can be overridden by ports.

        In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
        since it is only responsible for drawing a paused plug-in. The snapshot creation
        can work with the default renderer, but a shadow root requires something like
        RenderBlock in order to draw its children. We swap from one renderer to another when
        necessary either by creating the shadow root or by explicitly detaching and attaching
        the plugin element.

        Unfortunately this is difficult to test, because the snapshotting requires
        time to execute, and also a PluginView to be instantiated.

        * css/plugIns.css:
        (object::-webkit-snapshotted-plugin-content): New rules for a default label style.

        * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
        * platform/LocalizedStrings.h:
        * platform/blackberry/LocalizedStringsBlackBerry.cpp:
        * platform/chromium/LocalizedStringsChromium.cpp:
        * platform/efl/LocalizedStringsEfl.cpp:
        * platform/gtk/LocalizedStringsGtk.cpp:
        * platform/qt/LocalizedStringsQt.cpp:

        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
        that RenderSnapshottedPlugIn no longer is an embedded object.

        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
        (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
        (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
        (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
            a renderer, otherwise use the typical plug-in path.
        (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
            need to give it to the renderer.
        (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
        * html/HTMLPlugInImageElement.h:
        (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
            should show immediately.
        (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
            to swap to the Shadow Root.
        (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
            in being recreated. Make sure we reattach so that a plugin renderer will be created.
        (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
            displayState for snapshots.
        * html/HTMLPlugInImageElement.h:
        (HTMLPlugInImageElement): The new methods listed above.
        (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
            a snapshot should be immediately labeled.

        * page/ChromeClient.h: No need for plugInStartLabelImage any more.

        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
        (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
        (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
        (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
        (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
        (WebCore::RenderSnapshottedPlugIn::getCursor):
        (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
        * rendering/RenderSnapshottedPlugIn.h:
        (RenderSnapshottedPlugIn): New inheritance. Some method renaming.

2013-02-08  Kentaro Hara  

        {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp
        https://bugs.webkit.org/show_bug.cgi?id=109265

        Reviewed by Dimitri Glazkov.

        Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp.
        We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp.

        No tests. No change in behavior.

        * dom/EventDispatchMediator.cpp:
        * dom/EventDispatchMediator.h:
        * dom/FocusEvent.cpp:
        (WebCore::FocusEventDispatchMediator::create):
        (WebCore):
        (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
        (WebCore::FocusEventDispatchMediator::dispatchEvent):
        (WebCore::BlurEventDispatchMediator::create):
        (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
        (WebCore::BlurEventDispatchMediator::dispatchEvent):
        (WebCore::FocusInEventDispatchMediator::create):
        (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
        (WebCore::FocusInEventDispatchMediator::dispatchEvent):
        (WebCore::FocusOutEventDispatchMediator::create):
        (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
        (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
        * dom/FocusEvent.h:
        (WebCore):
        (FocusEventDispatchMediator):
        (BlurEventDispatchMediator):
        (FocusInEventDispatchMediator):
        (FocusOutEventDispatchMediator):
        * dom/UIEvent.cpp:
        * dom/UIEvent.h:

2013-02-08  Jer Noble  

        Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::notificationName):

2013-02-08  Jer Noble  

        Bring WebKit up to speed with latest Encrypted Media spec.
        https://bugs.webkit.org/show_bug.cgi?id=97037

        Reviewed by Eric Carlson.

        The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
        HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
        has been pulled out of the media element, we create a proxy CDM class and factory system for
        creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
        into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
        keymessage events, respectively.

        Tests: media/encrypted-media/encrypted-media-v2-events.html
               media/encrypted-media/encrypted-media-v2-syntax.html

        CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
        implementation is registered with the CDMFactory and will be created if that implementation supports
        the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
        by concrete CDMPrivate subclasses.  Its lifetime is owned by MediaKeySession.
        * Modules/encryptedmedia/CDM.cpp: Added.
        (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
        (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
        (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
        (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
        (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
        (WebCore::CDM::create): Simple constructor wrapper.
        (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
        (WebCore::CDM::~CDM): Simple destructor.
        (WebCore::CDM::createSession): Creates a new CDMSession.
        * Modules/encryptedmedia/CDM.h: Added.
        (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
        (WebCore::CDMSession::CDMSession): Simple constructor.
        (WebCore::CDMSession::~CDMSession): Simple destructor.
        * Modules/encryptedmedia/CDMPrivate.h: Added.
        (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
        (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.

        The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
        the original MediaKeyMessageEvent.
        * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
        (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
            parameters.
        (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
        (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
        (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
        * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
        (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
        (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
        (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
        * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
        * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
        (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
        (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
        (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
        (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
        * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
        (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
        (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
        * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.

        MediaKeySession is a new class that maps keys and key requests to a given session ID:
        * Modules/encryptedmedia/MediaKeySession.cpp: Added.
        (WebCore::MediaKeySession::create): Simple construction wrapper.
        (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
        (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
        (WebCore::MediaKeySession::setError): Simple setter for m_error;
        (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
        (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
        (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
        (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
        (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
        * Modules/encryptedmedia/MediaKeySession.h: Added.
        (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
        (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
        (WebCore::MediaKeySession::error): Simple accessor for m_error;
        * Modules/encryptedmedia/MediaKeySession.idl:

        MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
        * Modules/encryptedmedia/MediaKeySession.cpp: Added.
        (WebCore::MediaKeySession::interfaceName):
        * Modules/encryptedmedia/MediaKeySession.h: Added.
        (WebCore::MediaKeySession::refEventTarget):
        (WebCore::MediaKeySession::derefEventTarget):
        (WebCore::MediaKeySession::eventTargetData):
        (WebCore::MediaKeySession::ensureEventTargetData):
        (WebCore::MediaKeySession::scriptExecutionContext):

        MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
        * Modules/encryptedmedia/MediaKeys.cpp: Added.
        (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
            and a new MediaKeys session.
        (WebCore::MediaKeys::MediaKeys): Simple constructor.
        (WebCore::MediaKeys::~MediaKeys): Simple destructor.
        (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
        * Modules/encryptedmedia/MediaKeys.h: Added.
        * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.

        Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::keyNeeded):

        MediaKeyError now has a systemCode parameter and member variable.
        * html/MediaKeyError.h:
        (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
        (WebCore::MediaKeyError::MediaKeyError): Ditto.
        (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
        * html/MediaKeyError.idl:

        Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
        for the MediaKeyNeededEvent.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
        (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
            than the deprecated version.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys.
        * html/HTMLMediaElement.idl: Add the mediaKeys attribute.

        Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one:
        * html/MediaError.h:
        * html/MediaError.idl:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::bestMediaEngineForTypeAndCodecs):
        (WebCore::MediaPlayer::supportsType):
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the
            deprecated version.

        Support the new version of canPlayType which takes an extra parameter:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType):
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
        (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType):

        Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession
        APIs and events:
        * testing/Internals.cpp:
        (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories.
        * testing/Internals.h:
        * testing/Internals.idl: Add the initializeMockCDM() method.
        * testing/MockCDM.cpp: Added.
        (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system.
        (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type.
        (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'.
        (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'.
        (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'.
        (WebCore::generateSessionId): Return a monotonically increasing number.
        (WebCore::MockCDMSession::MockCDMSession): Simple constructor.
        (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array.
        (WebCore::MockCDMSession::releaseKeys): No-op.
        (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array.
        * testing/MockCDM.h: Added.
        (WebCore::MockCDM::create):
        (WebCore::MockCDM::~MockCDM): Simple destructor.
        (WebCore::MockCDM::MockCDM): Simple constructor.

        Add the new classes to the built system:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.make:
        * WebCore.exp.in:
        * WebCore.xcodeproj/project.pbxproj:

        Miscelaneous changes:
        * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent.
        * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession.
        * page/DOMWindow.idl: Add constructors for the new classes to the window object.

2013-02-08  Chris Fleizach  

        Refactor platform-specific code in SpeechSynthesis
        https://bugs.webkit.org/show_bug.cgi?id=107414

        Reviewed by Sam Weinig.

        Refactor WebSpeech code to use a platform mechanism to provide access to platform resources.

        * Modules/speech/DOMWindowSpeechSynthesis.cpp:
        (WebCore::DOMWindowSpeechSynthesis::from):
        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::SpeechSynthesis):
        (WebCore):
        (WebCore::SpeechSynthesis::voicesDidChange):
        (WebCore::SpeechSynthesis::getVoices):
        (WebCore::SpeechSynthesis::pending):
        (WebCore::SpeechSynthesis::speaking):
        (WebCore::SpeechSynthesis::paused):
        (WebCore::SpeechSynthesis::speak):
        (WebCore::SpeechSynthesis::cancel):
        (WebCore::SpeechSynthesis::pause):
        (WebCore::SpeechSynthesis::resume):
        * Modules/speech/SpeechSynthesis.h:
        (WebCore):
        (SpeechSynthesis):
        (WebCore::SpeechSynthesis::didStartSpeaking):
        (WebCore::SpeechSynthesis::didFinishSpeaking):
        (WebCore::SpeechSynthesis::speakingErrorOccurred):
        * Modules/speech/SpeechSynthesisUtterance.cpp:
        (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
        * Modules/speech/SpeechSynthesisUtterance.h:
        (WebCore::SpeechSynthesisUtterance::text):
        (WebCore::SpeechSynthesisUtterance::setText):
        (WebCore::SpeechSynthesisUtterance::lang):
        (WebCore::SpeechSynthesisUtterance::setLang):
        (WebCore::SpeechSynthesisUtterance::voiceURI):
        (WebCore::SpeechSynthesisUtterance::setVoiceURI):
        (WebCore::SpeechSynthesisUtterance::volume):
        (WebCore::SpeechSynthesisUtterance::setVolume):
        (WebCore::SpeechSynthesisUtterance::rate):
        (WebCore::SpeechSynthesisUtterance::setRate):
        (WebCore::SpeechSynthesisUtterance::pitch):
        (WebCore::SpeechSynthesisUtterance::setPitch):
        (SpeechSynthesisUtterance):
        (WebCore::SpeechSynthesisUtterance::platformUtterance):
        * Modules/speech/SpeechSynthesisVoice.cpp:
        (WebCore::SpeechSynthesisVoice::create):
        (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
        * Modules/speech/SpeechSynthesisVoice.h:
        (SpeechSynthesisVoice):
        (WebCore::SpeechSynthesisVoice::voiceURI):
        (WebCore::SpeechSynthesisVoice::name):
        (WebCore::SpeechSynthesisVoice::lang):
        (WebCore::SpeechSynthesisVoice::localService):
        (WebCore::SpeechSynthesisVoice::isDefault):
        * Modules/speech/mac/SpeechSynthesisMac.mm:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/PlatformSpeechSynthesis.h: Added.
        (WebCore):
        (PlatformSpeechSynthesis):
        * platform/PlatformSpeechSynthesisUtterance.cpp: Added.
        (WebCore):
        (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
        * platform/PlatformSpeechSynthesisUtterance.h: Added.
        (WebCore):
        (PlatformSpeechSynthesisUtteranceClient):
        (WebCore::PlatformSpeechSynthesisUtteranceClient::~PlatformSpeechSynthesisUtteranceClient):
        (PlatformSpeechSynthesisUtterance):
        (WebCore::PlatformSpeechSynthesisUtterance::text):
        (WebCore::PlatformSpeechSynthesisUtterance::setText):
        (WebCore::PlatformSpeechSynthesisUtterance::lang):
        (WebCore::PlatformSpeechSynthesisUtterance::setLang):
        (WebCore::PlatformSpeechSynthesisUtterance::voiceURI):
        (WebCore::PlatformSpeechSynthesisUtterance::setVoiceURI):
        (WebCore::PlatformSpeechSynthesisUtterance::volume):
        (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
        (WebCore::PlatformSpeechSynthesisUtterance::rate):
        (WebCore::PlatformSpeechSynthesisUtterance::setRate):
        (WebCore::PlatformSpeechSynthesisUtterance::pitch):
        (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
        * platform/PlatformSpeechSynthesisVoice.cpp: Added.
        (WebCore):
        (WebCore::PlatformSpeechSynthesisVoice::create):
        (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
        * platform/PlatformSpeechSynthesisVoice.h: Added.
        (WebCore):
        (PlatformSpeechSynthesisVoice):
        (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
        (WebCore::PlatformSpeechSynthesisVoice::name):
        (WebCore::PlatformSpeechSynthesisVoice::lang):
        (WebCore::PlatformSpeechSynthesisVoice::localService):
        (WebCore::PlatformSpeechSynthesisVoice::isDefault):
        * platform/PlatformSpeechSynthesizer.cpp: Added.
        (WebCore):
        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
        * platform/PlatformSpeechSynthesizer.h: Added.
        (WebCore):
        (PlatformSpeechSynthesizerClient):
        (WebCore::PlatformSpeechSynthesizerClient::~PlatformSpeechSynthesizerClient):
        (PlatformSpeechSynthesizer):
        (WebCore::PlatformSpeechSynthesizer::voiceList):
        * platform/mac/PlatformSpeechSynthesisMac.mm: Added.
        (WebCore):
        (WebCore::PlatformSpeechSynthesis::create):
        (WebCore::PlatformSpeechSynthesis::PlatformSpeechSynthesis):
        (WebCore::PlatformSpeechSynthesis::platformSpeak):
        * platform/mac/PlatformSpeechSynthesizerMac.mm: Added.
        (WebCore):
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
        (WebCore::PlatformSpeechSynthesizer::speak):

2013-02-08  Dean Jackson  

        Put snapshotting label text into localizable strings
        https://bugs.webkit.org/show_bug.cgi?id=108268

        Reviewed by Simon Fraser.

        In preparation for a snapshotted plug-in using a ShadowRoot, allow
        its label to be localized.

        * English.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::snapshottedPlugInLabelTitle): New method for returning title.
        (WebCore::snapshottedPlugInLabelSubtitle): New method for returning subtitle.
        * platform/LocalizedStrings.h:

2013-02-08  Dean Jackson  

        Do not register autostart for plugins from file:// (or nowhere)
        https://bugs.webkit.org/show_bug.cgi?id=108271

        Reviewed by Tim Horton.

        If the page url origin is treated as a local URL, don't attempt
        to add it to the auto-start list.

        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):

2013-02-08  Adam Barth  

        Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
        https://bugs.webkit.org/show_bug.cgi?id=107190

        Reviewed by Eric Seidel.

        This patch replaces the parser map with WeakPtr. We now use WeakPtrs to
        communicate from the main thread to the background thread. (We were
        already using WeakPtrs to communicate from the background thread to the
        main thread.) This change lets us remove a bunch of boilerplate code.

        * html/parser/BackgroundHTMLParser.cpp:
        (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
        (WebCore::BackgroundHTMLParser::stop):
        (WebCore):
        * html/parser/BackgroundHTMLParser.h:
        (WebCore::BackgroundHTMLParser::create):
        (BackgroundHTMLParser):
        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::didFailSpeculation):
        (WebCore::HTMLDocumentParser::startBackgroundParser):
        (WebCore::HTMLDocumentParser::stopBackgroundParser):
        (WebCore::HTMLDocumentParser::append):
        (WebCore::HTMLDocumentParser::finish):
        * html/parser/HTMLDocumentParser.h:
        (WebCore):
        (HTMLDocumentParser):

2013-02-07  Roger Fong  

        VS2010 WebCore TestSupport project.
        https://bugs.webkit.org/show_bug.cgi?id=107034.

        Reviewed by Brent Fulgham.

        * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Added.
        * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Added.

2013-02-08  ChangSeok Oh  

        [GTK][AC] GraphicsLayerActor code clean up after clutter version up.
        https://bugs.webkit.org/show_bug.cgi?id=109304

        Reviewed by Gustavo Noronha Silva.

        This patch cleans up GraphicsLayerActor functions by using new clutter apis
        and makes existing functions simple & readable.

        No new tests since no change in functionality

        * platform/graphics/clutter/GraphicsLayerActor.cpp:
        (_GraphicsLayerActorPrivate):
        (graphicsLayerActorApplyTransform):
        (graphicsLayerActorPaint):
        (graphicsLayerActorDraw):
        (graphicsLayerActorUpdateTexture):
        (drawLayerContents):
        (graphicsLayerActorNew):
        (graphicsLayerActorInvalidateRectangle):
        (graphicsLayerActorSetTransform):
        (graphicsLayerActorSetAnchorPoint):
        (graphicsLayerActorGetAnchorPoint):
        (graphicsLayerActorSetScrollPosition):
        * platform/graphics/clutter/PlatformClutterAnimation.h:

2013-02-08  Harald Alvestrand  

        Fix and test for missing return statement

        RTCPeerConnection.getStats() failed when remote stats were instantiated.
        https://bugs.webkit.org/show_bug.cgi?id=109292

        Reviewed by Adam Barth.

        Tested by extending the existing mock's behaviour.

        * Modules/mediastream/RTCStatsReport.cpp:
        (WebCore::RTCStatsReport::addElement):

2013-02-08  Anton Vayvod  

        [Text Autosizing] Split isAutosizingCluster into three independent checks
        https://bugs.webkit.org/show_bug.cgi?id=109093

        Refactoring to create more flexible version of isAutosizingCluster since there're more types
        of autosizing cluster now: narrower than the parent cluster, wider than the parent cluster
        and the one that doesn't depend on the parent cluster.

        Reviewed by Kenneth Rohde Christiansen.

        Refactoring, no test changes.

        * rendering/TextAutosizer.cpp:

        (WebCore::TextAutosizer::isNarrowDescendant):

            Separate check for the container to be of the narrow-descendant type. Was a part of
            isAutosizingCluster().

        (WebCore::TextAutosizer::isWiderDescendant):

            Separate check for the container to be of the wider-descendant type. Was a part of
            isAutosizingCluster().

        (WebCore::TextAutosizer::isIndependentDescendant):

            Separate check for the container to be autosized separately from the ancestor cluster.
            Checks for conditions independent of the aforementioned cluster.

        (WebCore::TextAutosizer::isAutosizingCluster):

            Handy method to check all separate conditions together.

        (WebCore::TextAutosizer::processSubtree):
        (WebCore::TextAutosizer::processCluster):
        (WebCore::TextAutosizer::processContainer):
        (WebCore::TextAutosizer::clusterShouldBeAutosized):
        (WebCore::TextAutosizer::measureDescendantTextWidth):
        (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):

            The methods above were updated to use new functions/arguments.

        * rendering/TextAutosizer.h:

            Updated/added method definitions.

2013-02-08  Vsevolod Vlasov  

        Web Inspector: Extension sever should use Workspace.projectForType() instead of Workspace.project()
        https://bugs.webkit.org/show_bug.cgi?id=109301

        Reviewed by Alexander Pavlov.

        * inspector/front-end/ExtensionServer.js:
        (WebInspector.ExtensionServer.prototype._onGetPageResources):

2013-02-04  Yury Semikhatsky  

        Web Inspector: simplify Memory.getDOMNodeCount implementation
        https://bugs.webkit.org/show_bug.cgi?id=108821

        Reviewed by Alexander Pavlov.

        Removed Memory.getDOMNodeCount command from the protocol. Memory.getDOMCounters
        should be used instead.

        * inspector/Inspector.json:
        * inspector/InspectorMemoryAgent.cpp:
        * inspector/InspectorMemoryAgent.h:
        (InspectorMemoryAgent):

2013-02-08  Yury Semikhatsky  

        Web Inspector: refactor MemoryStatistics.js
        https://bugs.webkit.org/show_bug.cgi?id=109299

        Reviewed by Vsevolod Vlasov.

        Extracted functionality specific to DOM counter graphs drawing into
        separate methods on MemoryStatistics class.
        Introduced CounterUIBase base class for DOMCounterUI that contains
        functionality which can be shared with native memory graph.

        * inspector/front-end/MemoryStatistics.js:
        (WebInspector.MemoryStatistics):
        (WebInspector.CounterUIBase):
        (WebInspector.CounterUIBase.prototype.updateCurrentValue):
        (WebInspector.CounterUIBase.prototype.clearCurrentValueAndMarker):
        (WebInspector.CounterUIBase.prototype.get visible):
        (WebInspector.DOMCounterUI):
        (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
        (WebInspector.MemoryStatistics.prototype._onMouseOut):
        (WebInspector.MemoryStatistics.prototype._clearCurrentValueAndMarker):
        (WebInspector.MemoryStatistics.prototype._refreshCurrentValues):
        (WebInspector.MemoryStatistics.prototype._updateCurrentValue):
        (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
        (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
        (WebInspector.MemoryStatistics.prototype._saveImageUnderMarker):
        (WebInspector.MemoryStatistics.prototype._drawMarker):
        (WebInspector.MemoryStatistics.prototype._clear):
        (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):

2013-02-08  Mike West  

        Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting
        https://bugs.webkit.org/show_bug.cgi?id=108771

        Reviewed by Eric Seidel.

        In cases where the ExceptionCode passed into a function is completely
        ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
        makes our expectations about possible exceptions (or lack thereof)
        explicit, rather than relying on implicit assumptions about whether a
        variable is intentionally uninitialized or not. It also removes
        knowledge about the internals of ExceptionCodes (that they're currently
        ints, for instance) from code that shouldn't care, which will help with
        future refactorings.

        The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
        shouldn't have any visible effect on the web. As long as all the
        current tests pass, we're good.

        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::dispatchEvent):
        (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::stop):
        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::processBuffer):
        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        * dom/ExceptionCodePlaceholder.h:
        (WebCore):
        * dom/Node.cpp:
        (WebCore::Node::normalize):
        * dom/Text.cpp:
        (WebCore::Text::replaceWholeText):
        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::insertDictatedText):
        * editing/AppendNodeCommand.cpp:
        (WebCore::AppendNodeCommand::doApply):
        (WebCore::AppendNodeCommand::doUnapply):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
        * editing/DeleteFromTextNodeCommand.cpp:
        (WebCore::DeleteFromTextNodeCommand::doUnapply):
        * editing/Editor.cpp:
        (WebCore::dispatchEditableContentChangedEvents):
        (WebCore::Editor::applyEditingStyleToElement):
        * editing/EditorCommand.cpp:
        (WebCore::executeFormatBlock):
        * editing/FormatBlockCommand.cpp:
        (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
        * editing/InsertIntoTextNodeCommand.cpp:
        (WebCore::InsertIntoTextNodeCommand::doApply):
        (WebCore::InsertIntoTextNodeCommand::doUnapply):
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::doApplyForSingleParagraph):
        * editing/InsertNodeBeforeCommand.cpp:
        (WebCore::InsertNodeBeforeCommand::doApply):
        (WebCore::InsertNodeBeforeCommand::doUnapply):
        * editing/RemoveCSSPropertyCommand.cpp:
        (WebCore::RemoveCSSPropertyCommand::doApply):
        (WebCore::RemoveCSSPropertyCommand::doUnapply):
        * editing/RemoveNodeCommand.cpp:
        (WebCore::RemoveNodeCommand::doApply):
        (WebCore::RemoveNodeCommand::doUnapply):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::getLocationAndLengthFromRange):
        * editing/WrapContentsInDummySpanCommand.cpp:
        (WebCore::WrapContentsInDummySpanCommand::executeApply):
        (WebCore::WrapContentsInDummySpanCommand::doUnapply):
        * editing/htmlediting.cpp:
        (WebCore::comparePositions):
        * editing/markup.cpp:
        (WebCore::highestAncestorToWrapMarkup):
        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocumentParser::appendEntry):
        (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
        (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
        (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::rewind):
        (WebCore::HTMLMediaElement::returnToRealtime):
        (WebCore::HTMLMediaElement::playInternal):
        (WebCore::HTMLMediaElement::percentLoaded):
        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
        (WebCore::HTMLMediaElement::applyMediaFragmentURI):
        * html/HTMLOutputElement.cpp:
        (WebCore::HTMLOutputElement::setTextContentInternal):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::remove):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::createTHead):
        (WebCore::HTMLTableElement::deleteTHead):
        (WebCore::HTMLTableElement::createTFoot):
        (WebCore::HTMLTableElement::deleteTFoot):
        (WebCore::HTMLTableElement::createCaption):
        (WebCore::HTMLTableElement::deleteCaption):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::setDefaultValue):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::createDocumentStructure):
        * html/InputType.cpp:
        (WebCore::InputType::stepUpFromRenderer):
        * html/MediaController.cpp:
        (MediaController::bringElementUpToSpeed):
        (MediaController::asyncEventTimerFired):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocumentParser::createDocumentStructure):
        (WebCore::MediaDocument::replaceMediaElementTimerFired):
        * html/PluginDocument.cpp:
        (WebCore::PluginDocumentParser::createDocumentStructure):
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::handleKeydownEvent):
        * html/TimeRanges.cpp:
        (TimeRanges::contain):
        (TimeRanges::nearest):
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawImageFromRect):
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::MediaControlSeekButtonElement::seekTimerFired):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::setPosition):
        (WebCore::MediaControlPanelElement::resetPosition):
        (WebCore::MediaControlStatusDisplayElement::update):
        (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
        (WebCore::MediaControlTimelineElement::defaultEventHandler):
        * html/shadow/MediaControls.cpp:
        (WebCore::MediaControls::updateCurrentTimeDisplay):
        (WebCore::MediaControls::createTextTrackDisplay):
        * html/shadow/MediaControlsApple.cpp:
        (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
        * html/shadow/MediaControlsBlackBerry.cpp:
        (WebCore::MediaControlEmbeddedPanelElement::setPosition):
        (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
        (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
        (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
        * html/shadow/MediaControlsChromium.cpp:
        (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
        * html/track/InbandTextTrack.cpp:
        (WebCore::InbandTextTrack::addGenericCue):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
        * inspector/InspectorHistory.cpp:
        (WebCore::InspectorHistory::markUndoableState):
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::replayXHR):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected):
        * page/DOMWindow.cpp:
        (WebCore::didAddStorageEventListener):
        * page/DragController.cpp:
        (WebCore::documentFragmentFromDragData):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::dispatchDragEvent):
        (WebCore::EventHandler::keyEvent):
        (WebCore::EventHandler::handleTextInputEvent):
        * page/Page.cpp:
        (WebCore::Page::findStringMatchingRanges):
        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::paintMediaSliderTrack):
        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
        (WebCore::MediaPlayerPrivate::percentLoaded):
        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::paintMediaSliderTrack):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::getDataSelection):
        (WebCore::documentFragmentWithImageResource):
        (WebCore::Pasteboard::documentFragment):
        * platform/mac/WebVideoFullscreenHUDWindowController.mm:
        (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
        (-[WebVideoFullscreenHUDWindowController setVolume:]):
        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::paintMediaSliderTrack):
        * rendering/RenderNamedFlowThread.cpp:
        (WebCore::RenderNamedFlowThread::getRanges):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintMediaSliderTrack):
        * svg/SVGTRefElement.cpp:
        (WebCore::SVGTRefElement::detachTarget):
        * xml/XMLTreeViewer.cpp:
        (WebCore::XMLTreeViewer::transformDocumentToTreeView):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::endElementNs):
        * xml/parser/XMLDocumentParserQt.cpp:
        (WebCore::XMLDocumentParser::parseEndElement):

2013-02-08  Vsevolod Vlasov  

        Web Inspector: Introduce workspace provider/project type, encapsulate uri creation in SimpleWorkspaceProvider.
        https://bugs.webkit.org/show_bug.cgi?id=109282

        Reviewed by Alexander Pavlov.

        SimpleWorkspaceProvider now fully takes care of creating uri based on project/workspace provider type.
        This is the first step on the way to project-per-domain mode for non file system project types.
        Workspace is now partly aware of the possibility that several projects with the same type exist.
        Drive-by: ScriptsPanel now uses FileMapping to show anchor location properly.

        * inspector/front-end/DefaultScriptMapping.js:
        (WebInspector.DefaultScriptMapping):
        (WebInspector.DefaultScriptMapping.prototype.addScript):
        * inspector/front-end/ExtensionServer.js:
        (WebInspector.ExtensionServer.prototype._onGetPageResources):
        * inspector/front-end/FileMapping.js:
        (WebInspector.FileMapping.prototype.uriForURL):
        * inspector/front-end/FileSystemWorkspaceProvider.js:
        (WebInspector.FileSystemWorkspaceProvider.prototype.type):
        * inspector/front-end/JavaScriptSourceFrame.js:
        (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
        * inspector/front-end/LiveEditSupport.js:
        (WebInspector.LiveEditSupport):
        (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
        * inspector/front-end/ScriptSnippetModel.js:
        (WebInspector.ScriptSnippetModel):
        (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
        * inspector/front-end/ScriptsNavigator.js:
        (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
        (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
        (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
        (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._addUISourceCode):
        (WebInspector.ScriptsPanel.prototype._projectWillReset):
        (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
        (WebInspector.ScriptsPanel.prototype._createSourceFrame):
        (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
        * inspector/front-end/SimpleWorkspaceProvider.js:
        (WebInspector.SimpleWorkspaceProvider):
        (WebInspector.SimpleWorkspaceProvider.uriForURL):
        (WebInspector.SimpleWorkspaceProvider.prototype.type):
        (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
        (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
        (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
        (WebInspector.SimpleWorkspaceProvider.prototype._uniqueURI):
        * inspector/front-end/Workspace.js:
        (WebInspector.WorkspaceProvider.prototype.type):
        (WebInspector.Project.prototype.type):
        (WebInspector.Project.prototype.isServiceProject):
        (WebInspector.Workspace.prototype.uiSourceCodeForOriginURL):
        (WebInspector.Workspace.prototype.uiSourceCodesForProjectType):
        (WebInspector.Workspace.prototype.projectsForType):
        * inspector/front-end/inspector.js:

2013-02-08  ChangSeok Oh  

        [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position.
        https://bugs.webkit.org/show_bug.cgi?id=109226

        Reviewed by Gustavo Noronha Silva.

        Clutter has a different coordinate system from mac port's, so we don't need to
        recalulate GraphicsLayer position after changing its anchor position.

        Covered by existing ac tests.

        * platform/graphics/clutter/GraphicsLayerClutter.cpp:
        (WebCore::GraphicsLayerClutter::updateGeometry):

2013-02-08  Mike West  

        Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
        https://bugs.webkit.org/show_bug.cgi?id=109266

        Reviewed by Jochen Eisinger.

        The pattern:

            ExceptionCode ec = 0;
            methodThatGeneratesException(ec);
            ASSERT(!ec);

        is more clearly and succinctly written as:

            methodThatGeneratesException(ASSERT_NO_EXCEPTION);

        This patch replaces the occurances of the former in IDB code that never
        touch 'ec' again with the latter. No change in behavior should result
        from this refactoring.

        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::advance):
        (WebCore::IDBCursor::continueFunction):
        (WebCore::IDBCursor::deleteFunction):
            These methods checked the value of the ExceptionCode without first
            initializing it to 0. Now the ExceptionCode is explicitly set to 0
            before doing potentially exception-generating work.
        (WebCore::IDBCursor::direction):
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::mode):
            Replace the above pattern with ASSERT_NO_EXCEPTION.

2013-02-08  Mike West  

        Migrate ExceptionCode ASSERTs in SVG to ASSERT_NO_EXCEPTION.
        https://bugs.webkit.org/show_bug.cgi?id=109267

        Reviewed by Jochen Eisinger.

        The pattern:

            ExceptionCode ec = 0;
            methodThatGeneratesException(ec);
            ASSERT(!ec);

        is more clearly and succinctly written as:

            methodThatGeneratesException(ASSERT_NO_EXCEPTION);

        This patch replaces the occurances of the former in SVG code that never
        touch 'ec' again with the latter. No change in behavior should result
        from this refactoring.

        * svg/SVGLength.cpp:
        (WebCore::SVGLength::SVGLength):
        (WebCore::SVGLength::setValue):
            This method checked the value of the ExceptionCode without first
            initializing it to 0. Now it initializes before doing potentially
            exception-generating work.
        * rendering/style/SVGRenderStyle.h:
        (WebCore::SVGRenderStyle::initialBaselineShiftValue):
        (WebCore::SVGRenderStyle::initialKerning):
        (WebCore::SVGRenderStyle::initialStrokeDashOffset):
        (WebCore::SVGRenderStyle::initialStrokeWidth):
        * svg/SVGAnimatedLength.cpp:
        (WebCore::sharedSVGLength):
        (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
        (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
        * svg/SVGAnimatedLengthList.cpp:
        (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
        (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::textLengthAnimated):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::constructQualifiedName):
            Replace the above pattern with ASSERT_NO_EXCEPTION.

2013-02-08  Vsevolod Vlasov  

        Web Inspector: Replace workspace with project in UISourceCode constructor.
        https://bugs.webkit.org/show_bug.cgi?id=109256

        Reviewed by Alexander Pavlov.

        Replaced workspace with project in UISourceCode constructor since every UISourceCode
        operation is delegated to project anyway.

        * inspector/front-end/UISourceCode.js:
        (WebInspector.UISourceCode):
        (WebInspector.UISourceCode.prototype.project):
        (WebInspector.UISourceCode.prototype.requestContent):
        (WebInspector.UISourceCode.prototype.requestOriginalContent):
        (WebInspector.UISourceCode.prototype._commitContent):
        (WebInspector.UISourceCode.prototype.searchInContent):
        * inspector/front-end/Workspace.js:
        (WebInspector.Project.prototype._fileAdded):
        (WebInspector.Project.prototype.requestFileContent):
        (WebInspector.Project.prototype.setFileContent):
        (WebInspector.Project.prototype.searchInFileContent):

2013-02-08  Patrick Gansterer  

        Build fix for Windows after r141981.

        * platform/network/win/ResourceHandleWin.cpp:
        (WebCore::ResourceHandle::loadResourceSynchronously):

2013-02-08  Sheriff Bot  

        Unreviewed, rolling out r141695 and r141697.
        http://trac.webkit.org/changeset/141695
        http://trac.webkit.org/changeset/141697
        https://bugs.webkit.org/show_bug.cgi?id=109279

        broke on-disk buffering for http(s) media (Requested by philn
        on #webkit).

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::load):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (MediaPlayerPrivateGStreamer):
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcGetProtocols):
        (webKitWebSrcSetUri):

2013-02-08  Dan Carney  

        [v8] isolate parameter added to all v8::peristent calls
        https://bugs.webkit.org/show_bug.cgi?id=109268

        Reviewed by Kentaro Hara.

        No new tests. No change in functionality.

        * bindings/scripts/CodeGeneratorV8.pm:
        (GenerateDomainSafeFunctionGetter):
        (GenerateNamedConstructorCallback):
        (GenerateImplementation):
        * bindings/scripts/test/V8/V8Float64Array.cpp:
        (WebCore::V8Float64Array::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
        (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
        (WebCore::V8TestActiveDOMObject::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
        (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
        (WebCore::V8TestEventConstructor::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestEventTarget.cpp:
        (WebCore::V8TestEventTarget::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestException.cpp:
        (WebCore::V8TestException::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestInterface.cpp:
        (WebCore::V8TestInterface::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
        (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
        (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
        (WebCore::V8TestNamedConstructor::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestNode.cpp:
        (WebCore::V8TestNode::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestObj.cpp:
        (WebCore::V8TestObj::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
        (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
        (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
        * bindings/v8/DOMWrapperMap.h:
        (WebCore::DOMWrapperMap::clear):
        * bindings/v8/DOMWrapperWorld.cpp:
        (WebCore::isolatedWorldWeakCallback):
        (WebCore::DOMWrapperWorld::makeContextWeak):
        * bindings/v8/NPV8Object.cpp:
        (WebCore::freeV8NPObject):
        (WebCore::npCreateV8ScriptObject):
        * bindings/v8/ScheduledAction.cpp:
        (WebCore::ScheduledAction::ScheduledAction):
        (WebCore::ScheduledAction::~ScheduledAction):
        * bindings/v8/ScopedPersistent.h:
        (WebCore::ScopedPersistent::ScopedPersistent):
        (WebCore::ScopedPersistent::set):
        (WebCore::ScopedPersistent::clear):
        * bindings/v8/ScriptWrappable.h:
        (WebCore::ScriptWrappable::setWrapper):
        (WebCore::ScriptWrappable::disposeWrapper):
        (WebCore::ScriptWrappable::weakCallback):
        * bindings/v8/V8Binding.cpp:
        (WebCore::createRawTemplate):
        * bindings/v8/V8Binding.h:
        (WebCore):
        * bindings/v8/V8GCController.cpp:
        (WebCore::gcTree):
        (WebCore::V8GCController::gcPrologue):
        (WebCore::V8GCController::minorGCPrologue):
        * bindings/v8/V8GCController.h:
        (V8GCController):
        * bindings/v8/V8HiddenPropertyName.cpp:
        (WebCore::V8HiddenPropertyName::createString):
        * bindings/v8/V8LazyEventListener.cpp:
        (WebCore::V8LazyEventListener::prepareListenerObject):
        * bindings/v8/V8NPObject.cpp:
        (WebCore::V8NPTemplateMap::dispose):
        (WebCore::npObjectGetProperty):
        (WebCore::createV8ObjectForNPObject):
        * bindings/v8/V8PerContextData.cpp:
        (WebCore::V8PerContextData::dispose):
        (WebCore::V8PerContextData::createWrapperFromCacheSlowCase):
        (WebCore::V8PerContextData::constructorForTypeSlowCase):
        * bindings/v8/V8ValueCache.cpp:
        (WebCore::makeExternalString):
        * bindings/v8/WrapperTypeInfo.h:
        (WebCore::WrapperConfiguration::configureWrapper):
        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
        (WebCore::V8HTMLDocument::wrapInShadowObject):
        * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
        (WebCore::V8HTMLImageElementConstructor::GetTemplate):
        * bindings/v8/custom/V8InjectedScriptManager.cpp:
        (WebCore::WeakReferenceCallback):
        (WebCore::createInjectedScriptHostV8Wrapper):
        * bindings/v8/custom/V8LocationCustom.cpp:
        (WebCore::V8Location::reloadAccessorGetter):
        (WebCore::V8Location::replaceAccessorGetter):
        (WebCore::V8Location::assignAccessorGetter):

2013-02-08  Kent Tamura  

        Adjust usage of ENABLE flags to enable whole content
        https://bugs.webkit.org/show_bug.cgi?id=109270

        Reviewed by Eric Seidel.

        Our common usage of ENABLE flags to enable whole content of files is:

        For .cpp files:
          #include "config.h"
          #if ENABLE(FOOBAR)
          #include "FooBar.h"

        For .h files:
          #ifndef FooBar_h
          #define FooBar_h
          #if ENABLE(FOOBAR)

        Fix files which have uncommon usage, and fix CodeGeneratorV8.pm so that
        it generates the common pattern. Note that CodeGeneratorJS.pm already
        generates code in this order.

        * bindings/scripts/CodeGeneratorV8.pm:
        (GenerateHeaderContentHeader):
        (GenerateImplementationContentHeader):
        * bindings/scripts/test/V8/V8TestCallback.cpp:
        * bindings/scripts/test/V8/V8TestCallback.h:
        * bindings/scripts/test/V8/V8TestInterface.cpp:
        * bindings/scripts/test/V8/V8TestInterface.h:
        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
        * html/BaseMultipleFieldsDateAndTimeInputType.h:
        * html/ColorInputType.cpp:
        * html/ColorInputType.h:
        * html/DateInputType.cpp:
        * html/DateTimeInputType.cpp:
        * html/DateTimeInputType.h:
        * html/DateTimeLocalInputType.cpp:
        * html/HTMLAudioElement.cpp:
        * html/HTMLAudioElement.h:
        * html/HTMLDataListElement.cpp:
        * html/HTMLDialogElement.cpp:
        * html/HTMLDialogElement.h:
        * html/HTMLMediaElement.cpp:
        * html/HTMLMediaElement.h:
        * html/HTMLMeterElement.cpp:
        * html/HTMLProgressElement.cpp:
        * html/HTMLSourceElement.cpp:
        * html/HTMLSourceElement.h:
        * html/HTMLTrackElement.cpp:
        * html/HTMLTrackElement.h:
        * html/HTMLVideoElement.cpp:
        * html/HTMLVideoElement.h:
        * html/MonthInputType.cpp:
        * html/TimeInputType.cpp:
        * html/WeekInputType.cpp:
        * html/shadow/DateTimeFieldElement.h:
        * html/shadow/DetailsMarkerControl.cpp:
        * html/shadow/MeterShadowElement.cpp:
        * html/shadow/ProgressShadowElement.cpp:
        * rendering/RenderDetailsMarker.cpp:
        * rendering/RenderInputSpeech.cpp:
        * rendering/RenderMeter.cpp:
        * rendering/RenderProgress.cpp:

2013-02-08  Mike West  

        Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
        https://bugs.webkit.org/show_bug.cgi?id=109044

        Reviewed by Darin Adler.

        The pattern:

            ExceptionCode ec = 0;
            methodThatGeneratesException(ec);
            ASSERT(!ec);

        is more clearly and succinctly written as:

            methodThatGeneratesException(ASSERT_NO_EXCEPTION);

        This patch replaces the occurances of the former that never touch 'ec'
        again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
        a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
        where it does indeed matter that 'ec' get set properly.

        No change in behavior should result from this refactoring.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::takeAllChildrenFrom):
        * dom/Document.cpp:
        (WebCore::Document::setTitle):
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::dispatchMessages):
        (WebCore::MessagePort::disentanglePorts):
        * editing/DeleteButtonController.cpp:
        (WebCore::enclosingDeletableElement):
        (WebCore::DeleteButtonController::createDeletionUI):
            Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
        (WebCore::DeleteButtonController::show):
            Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
        * editing/EditorCommand.cpp:
        (WebCore::unionDOMRanges):
        * editing/ReplaceNodeWithSpanCommand.cpp:
        (WebCore::swapInNodePreservingAttributesAndChildren):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::ReplacementFragment):
        (WebCore::ReplacementFragment::removeNode):
        (WebCore::ReplacementFragment::insertNodeBefore):
        (WebCore::ReplacementFragment::insertFragmentForTestRendering):
        (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
        (WebCore::ReplaceSelectionCommand::insertAsListItems):
        * editing/SplitTextNodeCommand.cpp:
        (WebCore::SplitTextNodeCommand::doUnapply):
        * editing/TextIterator.cpp:
        (WebCore::CharacterIterator::range):
        (WebCore::BackwardsCharacterIterator::range):
        (WebCore::TextIterator::rangeFromLocationAndLength):
        (WebCore::collapsedToBoundary):
        * editing/htmlediting.cpp:
        (WebCore::createTabSpanElement):
        * editing/mac/EditorMac.mm:
        (WebCore::Editor::fontForSelection):
        (WebCore::Editor::fontAttributesForSelectionStart):
        * editing/markup.cpp:
        (WebCore::createMarkup):
        (WebCore::trimFragment):
        (WebCore::createFragmentFromMarkupWithContext):
        (WebCore::fillContainerFromString):
        (WebCore::createFragmentFromText):
        (WebCore::createFragmentFromNodes):
        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::createShadowSubtree):
            Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
        * html/HTMLOptionsCollection.cpp:
        (WebCore::HTMLOptionsCollection::add):
            Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::updatePlaceholderText):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
        (WebCore::HTMLTextFormControlElement::setInnerTextValue):
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::updatePlaceholderText):
        * html/ValidationMessage.cpp:
        (WebCore::ValidationMessage::buildBubbleTree):
        * html/shadow/MediaControlElementTypes.cpp:
        (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
        * inspector/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::getCookies):
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::addRule):
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::dispatchDOMEvent):
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::deleteFromDocument):
        * page/DragController.cpp:
        (WebCore::prepareClipboardForImageDrag):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::visiblePositionForIndex):
            Replaced inline ASSERT with ASSERT_NO_EXCEPTION.

2013-02-08  Alexei Filippov  

        Web Inspector: disable profile type switching while profile in progress
        https://bugs.webkit.org/show_bug.cgi?id=109178

        Reviewed by Yury Semikhatsky.

        Disables profile type selection controls when a profiling session
        is in progress.

        * inspector/front-end/HeapSnapshotView.js:
        (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
        * inspector/front-end/ProfileLauncherView.js:
        (WebInspector.ProfileLauncherView.prototype._updateControls):
        * inspector/front-end/ProfilesPanel.js:
        (WebInspector.ProfilesPanel.prototype.toggleRecordButton):

2013-02-08  Ilya Tikhonovsky  

        Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.
        https://bugs.webkit.org/show_bug.cgi?id=109263

        Reviewed by Yury Semikhatsky.

        The chunk size is changed from 100 to 10000.
        addString counts only first 256 symbols of the string.o

        * inspector/HeapGraphSerializer.cpp:
        (WebCore::HeapGraphSerializer::pushUpdateIfNeeded):
        (WebCore::HeapGraphSerializer::addString):
        * inspector/front-end/NativeMemorySnapshotView.js:

2013-02-08  Kentaro Hara  

        Support a relatedTarget attribute on focus/blur events
        https://bugs.webkit.org/show_bug.cgi?id=109176

        Reviewed by Ojan Vafai.

        In bug 76216, we supported a relatedTarget attribute on
        focusin/focusout events. We should also support it on focus/blur events.

        See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html
        for the www-dom discussion.

        Test: fast/dom/shadow/shadow-boundary-events.html
              fast/events/related-target-focusevent.html

        * dom/EventDispatchMediator.cpp:
        (WebCore::FocusEventDispatchMediator::create):
        (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
        (WebCore::BlurEventDispatchMediator::create):
        (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
        * dom/EventDispatchMediator.h:
        (FocusEventDispatchMediator):
        (BlurEventDispatchMediator):
        * dom/Node.cpp:
        (WebCore::Node::dispatchFocusInEvent):
        (WebCore::Node::dispatchFocusOutEvent):
        (WebCore::Node::dispatchFocusEvent):
        (WebCore::Node::dispatchBlurEvent):

2013-02-07  Yury Semikhatsky  

        Web Inspector: reduce number of native memory instrumentation categories
        https://bugs.webkit.org/show_bug.cgi?id=109146

        Reviewed by Pavel Feldman.

        Merged some of memory instrumentation categories.

        * dom/WebCoreMemoryInstrumentation.cpp:
        (WebCore):
        * inspector/front-end/NativeMemorySnapshotView.js:
        (WebInspector.MemoryBlockViewProperties._initialize):
        * platform/PlatformMemoryInstrumentation.cpp:
        (WebCore):

2013-02-07  Mike West