2014-01-08 Alberto Garcia Fix some compilation warnings https://bugs.webkit.org/show_bug.cgi?id=126635 Reviewed by Csaba Osztrogonác. Remove code that is no longer being used. * platform/graphics/cairo/GraphicsContextCairo.cpp: * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * platform/gtk/PopupMenuGtk.cpp: * platform/gtk/RedirectedXCompositeWindow.h: 2013-12-30 Carlos Garcia Campos [SOUP] willSendRequest doesn't work after a redirect https://bugs.webkit.org/show_bug.cgi?id=126290 Reviewed by Martin Robinson. The problem is that we are creating the new soup request for the redirect before calling ResourceHandleClient::willSendRequest() so that any change made to the request by the client is ignored. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::doRedirect): Create the new soup request and soup message for the redirect after calling willSendRequest() on the client. 2013-12-06 Lukasz Gajowy [ATK] Missing aria roles mappings https://bugs.webkit.org/show_bug.cgi?id=117729 Reviewed by Mario Sanchez Prada. Added a few mappings from ARIA roles to ATK roles. Test: accessibility/aria-mappings.html * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-12-23 Zan Dobersek webkit gtk 2.2.3 stable tarball compilation error https://bugs.webkit.org/show_bug.cgi?id=125987 Reviewed by Gustavo Noronha Silva. Only try including and using GDK_IS_WAYLAND_DISPLAY if the Wayland support has been enabled and when not compiling with GTK+ 2 (which occurs when building for libPlatformGtk2). * platform/graphics/GLContext.cpp: (WebCore::GLContext::createContextForWindow): 2013-09-10 Mario Sanchez Prada [GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails https://bugs.webkit.org/show_bug.cgi?id=105538 Reviewed by Chris Fleizach. Expose '\n' for linebreaks when they were explicitly set by the author of the web content with a
tag. Tests: accessibility/paragraph-with-linebreaks.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper function to decide when to append spaces when building the text under an element, considering line breaks. (WebCore::AccessibilityNodeObject::textUnderElement): Use the shouldAddSpaceBeforeAppendingNextElement() function here. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::textUnderElement): Return the renderer's text for accessibility objects exposing
elements. * html/parser/HTMLParserIdioms.h: (WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful to be passed to other functions like simplifyWhiteSpace(). 2013-12-06 Roger Fong Hook into some shader symbol logic following the ANGLE update in r159533. https://bugs.webkit.org/show_bug.cgi?id=125332. Reviewed by Brent Fulgham. No new functionality added. * html/canvas/WebGLRenderingContext.cpp: Add some error checking for errors related to shader symbols that exist across both vertex and fragment shaders. (WebCore::WebGLRenderingContext::linkProgram): * platform/graphics/ANGLEWebKitBridge.cpp: Add logic for handling varyings and add new fields to the ANGLEShaderSymbol struct. (WebCore::getSymbolInfo): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext3D.h: Add those same fields to the SymbolInfo struct as well so that we can access them from our shader source map. Also add a map of varyings along side the uniforms and attributes. (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::areProgramSymbolsValid): Will be filled in later, this method will use the shader source map to check for issues with unused varyings and precisions mismatches of shader symbols that exist across both the vertex and fragment shaders. 2013-10-04 Dean Jackson [WebGL] program should not be able to link if a bad shader is attached https://bugs.webkit.org/show_bug.cgi?id=94036 Reviewed by Darin Adler. If you attempt to link a program when bad shaders are attached, the link should fail. WebGL also requires that the previously linked program should remain intact. We were doing the former, but not the latter. Fix this by not calling glLinkProgram if we know we have bad shaders, and synthesize a bad link status instead. Test: WebGL conformance test conformance/programs/program-test.html (found in LayoutTests/webgl) * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::compileShader): Mark a shader as valid if it compiled ok. (WebCore::WebGLRenderingContext::linkProgram): Don't call into GraphicsContext3D::linkProgram if we know that we don't have valid shaders. * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::WebGLShader): Initialize m_isValid. * html/canvas/WebGLShader.h: (WebCore::WebGLShader::isValid): New member variable getter and setter. (WebCore::WebGLShader::setValid): 2013-11-19 Roger Fong Update ANGLE sources. https://bugs.webkit.org/show_bug.cgi?id=124615. Reviewed by Dean Jackson. Tests covered by Khronos WebGL conformance tests. * platform/graphics/ANGLEWebKitBridge.cpp: Resolve a build error that resulted from updating ANGLE. (WebCore::getSymbolInfo): (WebCore::ANGLEWebKitBridge::compileShaderSource): 2013-12-07 Gustavo Noronha Silva ubuntu software center hits _XReadEvents() error https://bugs.webkit.org/show_bug.cgi?id=123480 Reviewed by Martin Robinson. * platform/gtk/WidgetBackingStoreGtkX11.cpp: (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface before freeing the associated pixmap. 2013-12-10 Gustavo Noronha Silva [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change https://bugs.webkit.org/show_bug.cgi?id=125444 Reviewed by Martin Robinson. * platform/gtk/UserAgentGtk.cpp: (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X. (WebCore::standardUserAgent): ditto. 2013-11-14 Aloisio Almeida Jr [Cairo] Avoid extra copy when drawing images https://bugs.webkit.org/show_bug.cgi?id=124209 Reviewed by Martin Robinson. To solve the bug #58309 a cairo subsurface is being used to limit the source image boundaries. In many cases, when a cairo subsurface is used for drawing an image, it occurs an image copy, causing performance penalty. In the case of the function PlatformContextCairo::drawSurfaceToContext, the image copy always happens. So, we should use the subsurface only when it's really necessary. In cases where we're drawing the whole image, the subsurface is unnecessary. The proposed patch avoid the use of subsurfaces when sampling the whole image. No new tests. It's an enhancement. Already covered by existing tests. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::drawSurfaceToContext): 2013-08-29 Arnaud Renevier [cairo] canvas drawing on itself doesn't work with accelerated canvas https://bugs.webkit.org/show_bug.cgi?id=118808 Reviewed by Martin Robinson. When copying an accelerated image, we try to get its dimensions with cairo_image_surface_get_width/cairo_image_surface_get_height. As surface is not an image, this returns width and height of 0. Many other places use cairo_image_surface_get although the surface may be a gl surface. This patch fixes those issues by implementing a cairoSurfaceSize helper that returns the surface size whatever type it is. It use cairo_surface_create_similar instead of cairo_image_surface_create in copyCairoImageSurface. It also calls cairo_paint in encodeImage when a drawing over a black background is needed. It copies the surface to an image surface if needed in extractImage. No new tests. Covered by existing tests. * platform/graphics/cairo/BitmapImageCairo.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): (WebCore::BitmapImage::checkForSolidColor): * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::copyCairoImageSurface): (WebCore::cairoSurfaceSize): * platform/graphics/cairo/CairoUtilities.h: * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::ImageExtractor::extractImage): * platform/graphics/gtk/GdkCairoUtilities.cpp: (cairoSurfaceToGdkPixbuf): * platform/graphics/gtk/GdkCairoUtilities.h: * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::encodeImage): * platform/graphics/gtk/ImageGtk.cpp: (WebCore::BitmapImage::getGdkPixbuf): * platform/gtk/DragIcon.cpp: (WebCore::DragIcon::setImage): 2013-12-02 Andres Gomez [GTK] Fails to build with freetype 2.5.1 https://bugs.webkit.org/show_bug.cgi?id=125074 Reviewed by Carlos Garcia Campos. FreeType specifies a canonical way of including their own headers. Now, we are following this recommendation so the compilation won't be broken again due to an upgrade in FeeType's including paths. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: * platform/graphics/freetype/SimpleFontDataFreeType.cpp: * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: 2013-11-21 Carlos Garcia Campos [GTK] Cannot scroll in option menu when it larger than the screen https://bugs.webkit.org/show_bug.cgi?id=124671 Reviewed by Martin Robinson. The problem is that the popup menu is not resized to fit in the screen, so it doesn't scroll and some of the items are offscreen so they can't be selected either. GTK+ automatically resizes the popup menus to fit in the work area, but only when the menu is already positioned. * platform/gtk/GtkPopupMenu.cpp: (WebCore::GtkPopupMenu::popUp): Schedule a resize of the popup menu right after showing it once it has a position. 2013-11-20 Víctor Manuel Jáquez Leal [GTK] Remove Chromium as user agent and claim to be Safari in OS X https://bugs.webkit.org/show_bug.cgi?id=124229 Reviewed by Martin Robinson. http://www.duolingo.com/ doesn't get render correctly because it uses Chrome/Chromium specific variables, added after it was forked. Because of this, it is necessary to remove the Chrome/Chromium identification in the user agent. Also, from now on, by default, The GTK+ port will claim to be Safari in OS X to avoid loading wrong resources. * platform/gtk/UserAgentGtk.cpp: (WebCore::standardUserAgent): 2013-09-24 Lorenzo Tilve [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE https://bugs.webkit.org/show_bug.cgi?id=121782 Reviewed by Martin Robinson. Disabled drag functions. * page/gtk/EventHandlerGtk.cpp: * platform/gtk/PasteboardGtk.cpp: 2013-08-28 Chris Curtis https://bugs.webkit.org/show_bug.cgi?id=119548 Refactoring Exception throws. Reviewed by Geoffrey Garen. Gets column information from the error object for reporting exceptions. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStackFromException): Moved setting an exception into the vm, These functions changed to use the new functionality. * bindings/js/JSAudioBufferSourceNodeCustom.cpp: (WebCore::JSAudioBufferSourceNode::setBuffer): * bindings/js/JSBiquadFilterNodeCustom.cpp: (WebCore::JSBiquadFilterNode::setType): * bindings/js/JSCryptoCustom.cpp: (WebCore::JSCrypto::getRandomValues): * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::setFunctionVariableValue): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): (WebCore::JSJavaScriptCallFrame::setVariableValue): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSOscillatorNodeCustom.cpp: (WebCore::JSOscillatorNode::setType): * bindings/js/JSPannerNodeCustom.cpp: (WebCore::JSPannerNode::setPanningModel): (WebCore::JSPannerNode::setDistanceModel): * bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::convertToSpecifiedUnits): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::JSWebGLRenderingContext::getAttachedShaders): (WebCore::JSWebGLRenderingContext::getExtension): (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): (WebCore::JSWebGLRenderingContext::getParameter): (WebCore::JSWebGLRenderingContext::getProgramParameter): (WebCore::JSWebGLRenderingContext::getShaderParameter): (WebCore::JSWebGLRenderingContext::getUniform): (WebCore::dataFunctionf): (WebCore::dataFunctioni): (WebCore::dataFunctionMatrix): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneBase::throwStackOverflow): (WebCore::CloneDeserializer::throwValidationError): (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): (WebCore::WorkerScriptController::setException): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::moveGlobalExceptionToExecState): (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): (JSC::Bindings::CInstance::toJSPrimitive): * bridge/objc/objc_instance.mm: (ObjcInstance::invokeMethod): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcArray::setValueAt): (JSC::Bindings::ObjcArray::valueAt): * bridge/objc/objc_utility.mm: (JSC::Bindings::throwError): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtField::valueFromInstance): (JSC::Bindings::QtField::setValueToInstance): * bridge/runtime_array.cpp: (JSC::RuntimeArray::put): (JSC::RuntimeArray::putByIndex): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::throwInvalidAccessError): 2013-09-13 Gustavo Noronha Silva [GTK] Move to the new web inspector https://bugs.webkit.org/show_bug.cgi?id=120647 Reviewed by Carlos Garcia Campos. No tests for the new inspector UI as of yet. * GNUmakefile.am: no longer install the deprecated inspector UI files. * WebCore.exp.in: add SchemeRegistry symbol that is now used. 2013-09-11 Mario Sanchez Prada [GTK] Remove Gail dependency from build system for GTK3 https://bugs.webkit.org/show_bug.cgi?id=119673 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Removed GAIL_CFLAGS. * PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES. 2013-09-11 Mario Sanchez Prada [GTK] Get rid of Pango/Gail dependencies in accessibility for ATK https://bugs.webkit.org/show_bug.cgi?id=114867 Reviewed by Martin Robinson. Removed all trace of Gail and Pango specific code from the AtkText implementation, now everything has been reimplemented. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (webkitAccessibleTextGetTextForOffset): Removed fallback code relying in Gail/Pango, now all the related code has been removed. Also, replaced the collection of if statements with a switch, for better readability of the code. 2013-09-10 Mario Sanchez Prada [GTK] Reimplement atk_text_get_text_*_offset for LINE boundaries https://bugs.webkit.org/show_bug.cgi?id=114872 Reviewed by Gustavo Noronha Silva. Re-implement these functions without using GailTextUtil nor Pango. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (lineAtPositionForAtkBoundary): New helper function to find the line at a given position considering values of AtkTextBoundary. (webkitAccessibleTextLineForBoundary): New function, implementing atk_text_get_text_*_offset for LINE. (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for LINE boundaries with webkitAccessibleTextLineForBoundary(). 2013-09-04 Mario Sanchez Prada [GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries https://bugs.webkit.org/show_bug.cgi?id=114873 Reviewed by Chris Fleizach. Re-implement these functions without using GailTextUtil nor Pango. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary, to keep it consistent with names for new functions. (isSentenceBoundary): Helper function to know when we are either at the beginning or the end of a sentence. (isWhiteSpaceBetweenSentences): It returns true if we are in the middle of a white space between sentences. Useful for implementing the SENTENCE_END boundary type. (sentenceAtPositionForAtkBoundary): New helper function to find the sentence at a given position considering values of AtkTextBoundary. (webkitAccessibleTextSentenceForBoundary): New function, implementing atk_text_get_text_*_offset for SENTENCE. (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary(). 2013-09-14 Alberto Garcia Missing allow-none introspection annotation for DomDocument.evaluate method https://bugs.webkit.org/show_bug.cgi?id=118310 Reviewed by Martin Robinson. Add (allow-none) introspection annotation to parameters that can be NULL. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateFunction): 2013-09-14 Alberto Garcia [GTK] WebKitGTK+ is linking against libxslt in too many places https://bugs.webkit.org/show_bug.cgi?id=121356 Reviewed by Martin Robinson. Don't use LIBXSLT_CFLAGS when compiling libWebCorePlatform and libWebCoreGtk, no source files use libxslt there. * GNUmakefile.am: 2013-09-06 Anders Carlsson Stop using fastNew/fastDelete in WebCore https://bugs.webkit.org/show_bug.cgi?id=120867 Reviewed by Geoffrey Garen. Using fastNew/fastDelete can be dangerous, especially when put into a smart pointer such as OwnPtr which uses regular delete. Because of this I'd like to remove fastNew/fastDelete. Turns out it's only used in a couple of places in WebCore, so just use new/delete here instead. * platform/audio/FFTFrame.h: * platform/audio/gstreamer/FFTFrameGStreamer.cpp: (WebCore::FFTFrame::FFTFrame): (WebCore::FFTFrame::~FFTFrame): (WebCore::FFTFrame::doFFT): (WebCore::FFTFrame::doInverseFFT): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkitVideoSinkDispose): 2013-09-09 Claudio Saavedra [GTK] ghost cursor when mouse hovers over an image file in a tab https://bugs.webkit.org/show_bug.cgi?id=120675 Reviewed by Carlos Garcia Campos. No new tests, covered by existing. * platform/gtk/CursorGtk.cpp: (WebCore::createNamedCursor): Use new gdk_cursor_new_from_surface() when compiling against GTK+ 3.9.12 or newer. 2013-09-04 Zan Dobersek [GTK] Add support for the Wayland build target https://bugs.webkit.org/show_bug.cgi?id=120627 Reviewed by Gustavo Noronha Silva. * GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files. The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND conditional is used. If neither of those two targets is being built we fall back to adding source files to the build as necessary by the actual build target. * platform/gtk/GtkVersioning.c: (gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being defined - these should only be built when building the X11 target, checked for with PLATFORM(X11). 2013-09-04 Claudio Saavedra [GTK] Color of input button's text broken with recent gnome-themes-standard https://bugs.webkit.org/show_bug.cgi?id=120581 Reviewed by Carlos Garcia Campos. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::getStyleContext): add the "text-button" class. (WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag, as this is the one actually used for button labels. 2013-09-04 Andre Moreira Magalhaes [GStreamer] cannot play live streams https://bugs.webkit.org/show_bug.cgi?id=116831 Reviewed by Philippe Normand. Fix issues with rtsp streams embedded on