summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into 5.5v5.5.0-beta1Liang Qi2015-04-153-20/+41
|\ | | | | | | Change-Id: I0d9dd63455dc12402afd56cc1bd97d0cc97c24e8
| * Fix crash when exiting browser with WebGL or accelerated canvas.Yohan Chuzeville2015-04-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue is that the TextureMapperGL creates a GraphicsContext3D using the current OpenGL context. This is done by storing a reference on QOpenGLContext::currentContext() inside GraphicsContext3DPrivate::GraphicsContext3DPrivate(). When exiting the browser, Qt releases QOpenGLContext before the release of the GraphicsContext3D in webkit which leads to a crash when destoying GraphicsContext3DPrivate. Task-number: QTBUG-45481 Change-Id: I2b9d7b1a96fbbe8517ea323d45ef3922ada208a3 Reviewed-by: Julien Brianceau <jbriance@cisco.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Avoid backing store for texturemapper layers over 8192x8192Allan Sandfeld Jensen2015-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We already block too large elements from getting a composited layer with backing store, but in the case where an already composited layer is resized above the size limit, it may have bad size until relayed out. This patch blocks the backing store of such a graphics layer from being instantiated. Change-Id: I03c1688c00c1f96fdaf7ef251ee285c05c072730 Task-number: QTBUG-44523 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Fix URLs visited during private browsing showing up in WebpageIcons.db.Florian Bruhin2015-03-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ported from http://trac.webkit.org/changeset/181565 by beidson@apple.com. Upstream patch by Sam Weinig, reviewed by Brady Eidson. * loader/icon/IconController.cpp: (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session. (WebCore::IconController::continueLoadWithDecision): Instead of here. Change-Id: I263bb6122606caa3488d641b127dd377012ee424 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix crash on exit in OpenGL accelerated modeAllan Sandfeld Jensen2015-03-171-15/+16
| | | | | | | | | | | | | | Do not try to cleanup on an already destroyed OpenGL context. Change-Id: I56d2a07700b1f69100be7fc9537dd0bc69449a0c Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5v5.5.0-alpha1Allan Sandfeld Jensen2015-03-105-29/+62
|\| | | | | | | Change-Id: I824a984e8552340c2f9f631ac951f2c9eaa90b74
| * Fix building with glib 2.43+Allan Sandfeld Jensen2015-03-021-24/+24
| | | | | | | | | | | | | | | | | | The newest version of glib have introduced their own GMutexLocker conflicting with the one defined in WebCore. Task-number: QTBUG-44714 Change-Id: Ibdd1646e129eaed84c65dc0d96bebe80f2a61f4b Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
| * Forward show and hide events to PluginViewsMichael Bruning2015-02-264-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | This was causing issues with windows plugins on windows, which were always visible on top of all other widgets and not hidden correctly when the owning web view was hidden. Task-number: QTBUG-44401 Task-number: QTBUG-42588 Task-number: QTBUG-43024 Change-Id: Ie0307fa2f7b2bf59f51a76db5feef2e8446c359d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-253-2/+8
|\| | | | | | | Change-Id: If6bc4592dc0539dc8b95c712bb90f5be4acf9475
| * Don't do high-quality scaling on individual video framesAllan Sandfeld Jensen2015-02-241-1/+1
| | | | | | | | | | | | | | | | | | Each frame of a video needs to be scaled fast, there is not time for high-quality scaling, and doing so will also blow our image scaling cache. Change-Id: Ibdd38ccffa273d0848aedcef19ffb2b4861c08a0 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Fix build with -no-rttiCorentin Jabot2015-02-241-0/+2
| | | | | | | | | | | | | | WebCore was unable to build with -no-rtti since 82d8a5c8 Change-Id: I52dbd9b8db6c3b44ebad9e2518d89bdbe1430c3a Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Fix crash on html5video.org by detecting inconsistent frame dataAllan Sandfeld Jensen2015-02-242-1/+5
| | | | | | | | | | | | | | | | | | | | | | GStreamer is on this particular video sending us invalid dimensions that would leave us to operate on invalid addresses. We ignore that frame and print a warning to the log so the user might know their gstreamer plugin is dangerously broken. Task-number: QTBUG-44245 Change-Id: I476ec9822ff2f8210161a8642e16bbafb6786357 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1617-18/+17
| | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Icc6f774c9ca37ea88ac024163386b16fc50fb2a7 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-1620-59/+122
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib6552c4dd0fbfecfa1800689eb2ae75b9d54a22b
| * Fix memory leak in ImageDocumentAllan Sandfeld Jensen2015-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An ImageLoader may hold a reference to its image element, and any element holds a guard on the document. To make the ImageLoader release the reference it needs to receive the notifyFinished() call, but that doesn't happen if the CachedResource is in the wrong state. The solution is to ensure we set the finish state on the resource before calling the method signifying loading is finished. Task-number: QTBUG-44023 Change-Id: I694483f6201b7ea4656016731e431f2806c3ab1c Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Check if OpenGL context is supportedAllan Sandfeld Jensen2015-01-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | Before the support for dynamic GL builds, the WebCore initialize OpenGL shims would check if the OpenGL version had all the necessary methods. After we removed this we now risk continuing with an OpenGL version that is not supported by WebCore and can cause crashes. Task-number: QTBUG-43831 Change-Id: I19caffc645ea5dede8b98408cbe0cae5fae8c22f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * Allow 3D transforms without composited layersAllan Sandfeld Jensen2015-01-122-0/+16
| | | | | | | | | | | | | | | | | | | | | | Qt has no problems doing static 3D transforms without composited layers, since the performance is not optimal we want to still trigger composited layers when available, but allowing this without can fix the rendering in the screenshot and printing API. Task-number: QTBUG-43106 Change-Id: I30869d0f86704b84369273d7c2b875ee22badf22 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Optimize HTML5 video painting on LinuxAllan Sandfeld Jensen2015-01-092-22/+15
| | | | | | | | | | | | | | | | | | | | | | We were doing a needless inversion of image data, that gstreamer somehow detected and corrected for. The inversion can be safely removed and we can also avoid copying the image data by releasing the gstreamer buffer later like the cairo implementation does. Task-number: QTBUG-43520 Change-Id: I5910d5358d049abe3570dd5468e9e0bb56517639 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * Fix build without OpenGLAllan Sandfeld Jensen2015-01-086-12/+20
| | | | | | | | | | | | | | | | | | | | The accelerated 2D canvas feature broke building without OpenGL due to missing feature checks. Task-number: QTBUG-43549 Change-Id: I7e62751d5237e1c600bc784539c70db50bccfa22 Reviewed-by: Ashish Kulkarni <kulkarni.ashish@gmail.com> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * fix build on MSVC with system libraries for zlib, libpng and libjpegAshish Kulkarni2015-01-081-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | The definitions in qtbase were used as a source. zlib => qtbase/src/3rdparty/zlib_dependency.pri libpng => qtbase/src/gui/image/qpnghandler.pri libjpeg => qtbase/src/gui/image/qjpeghandler.pri Change-Id: I41529493d382d693311f3a2c1a2590bf1406baff Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * fix build on MSVC with --system-libpng or --system-libjpegAshish Kulkarni2015-01-082-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced in WebKit r108792, as in the related bug https://bugs.webkit.org/show_bug.cgi?id=32410#c26 it was confirmed as broken for Windows MSVC (for Chromium). The final merge made it conditional for PLATFORM(QT) but did not fix the underlying issue, which was the wrong placement of NO_RETURN as MSVC does not allow __declspec(noreturn) to be put after the declaration but GCC allows __attribute((__noreturn__)) at either location. This is similar with the usage of NO_RETURN in other places. Change-Id: I95ae3727553093b84b3645eb6dad63779f08e09d Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.Ada Chan2015-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=137305 Reviewed by Darin Adler. This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless m_volumeInitialized is true. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateVolume): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175003 268f45cc-cd09-0410-ab3c-d52691b4dbfc Task-number: QTBUG-43479 Change-Id: I7f40dfc2535e2874d8c396051c488b7d92046919 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * [GStreamer] Video player sets system volume to 100%Xabier Rodriguez Calvar2015-01-064-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=118974 Reviewed by Philippe Normand. In order to preserve the system volume we need to keep track of the volume being initialized in the HTMLMediaElement and then just setting the volume to the sink when initializing the pipeline if that volume was changed before. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialized attribute to false. (WebCore::HTMLMediaElement::setVolume): Set the attribute to true when volume is changed. (WebCore::HTMLMediaElement::updateVolume): Set the volume only if volume was initialized. (WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired): Platform volume configuration is required only if volume was not initialized before. * html/HTMLMediaElement.h: Added attribute and interface method. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired): Declared and added default implementation for the interface method. (WebCore::MediaPlayer::platformVolumeConfigurationRequired): Asked the client, meaning the HTMLMediaElement if the platform volume configuration is required. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log. (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log. (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement): Set the volume only if not platform volume is required and added log. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154970 268f45cc-cd09-0410-ab3c-d52691b4dbfc Task-number: QTBUG-43479 Task-number: QTBUG-34896 Change-Id: I4031b33e52e2299b03a5844770dc17c69822059c Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Support MSIE compatible pasteboard typesAllan Sandfeld Jensen2015-01-061-6/+23
| | | | | | | | | | | | | | | | | | | | Treat 'Text' pasteboard type as 'text/plain' matching Apple and GTK webkit ports and the whatwg spec. Task-number: QTBUG-43149 Change-Id: Iac491fd15f1e9e8539daabf30a61e64921c82222 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devFrederik Gladhorn2015-01-192-1/+5
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-172-1/+5
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I623088d8d000cd57cea011bb33c482e8f379021f
| | * Remove double quotation from $preprocessorStephan Binner2014-12-121-0/+3
| | | | | | | | | | | | | | | Change-Id: I975dda0df62b61ae82d0a0f58f8446c7513b507e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Do not set the mainframe graphicslayer to being opaque when it isn'tAllan Sandfeld Jensen2014-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the frameview has a transparent background we need to tell the GraphicsLayer that it is not opaque otherwise the TextureMapperGL might choose not to use blend. Task-number: QTBUG-40063 Change-Id: If129305fed8620cd3c28cec5357625d8892ad063 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | | Add support authenticated POST requestsAllan Sandfeld Jensen2015-01-132-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To resend a POST request on authentication challenge we need to be able to reset the FormData IODevice so it can give the same data again to QtNetwork. Task-number: QTBUG-43628 Change-Id: Icc0a25f45dee80240501b18f1e3f61af022552d1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | | Map CSS font-weights to new QFont enumsAllan Sandfeld Jensen2015-01-081-5/+33
|/ / | | | | | | | | | | | | | | Fixes the selection of light font for weight 300, and adds mapping for the rest of the values that was added in Qt 5.5. Change-Id: Ic92e61bc9e452d44328ac05ad5c9a2b15fceb91e Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* / Use deepbind when loading plugins.Allan Sandfeld Jensen2014-12-031-1/+10
|/ | | | | | | | | | This patch adds the deepbind option when loading plugins. This allows us to load plugins linked against different library versions, especially plugins linked against Qt 4. It is not recursive though, and plugins loading subplugins must still be blacklisted. Change-Id: Id4f86dc01c1712a08eb4828a852f8a0733eaf899 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-212-7/+13
|\ | | | | | | Change-Id: I3df74c8b47ff6e3d668f8b2126e6145670327d73
| * Clear a stray ref on layers when purging GL resourcesv5.4.0-rc1Jocelyn Turcotte2014-11-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix a regression of 3df57f7e550a19cb4450ed3896aa51ddb38c2ed2 where a reference to TextureMapperBackingStore would be kept in the TextureMapperLayers after purgeGLResources(). This would crash later on if the window would get destroyed before the CoordinatedGraphicsScene that own those layers. Task-number: QTBUG-40734 Change-Id: Id1a596c0f0ba9afd1e163f83c38dda939f521314 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Do not force a direction before we know itAllan Sandfeld Jensen2014-11-131-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebCore does not calculate the text direction when calculating widths the best we can do here is let the shaper guess the direction. Forcing it to the default LTR breaks HarfbuzzNG on Arabic scripts. Since the default HarfBuzz engine changed in 5.4, this was a regression from 5.3. See also https://bugs.webkit.org/show_bug.cgi?id=101440 Task-number: QTBUG-41450 Change-Id: Ia324c8e5ebd1744ce2dfaea94d5046ef1f77b483 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Avoid crashing when applying CSS to disconnected scrollbarsAllan Sandfeld Jensen2014-11-191-1/+1
| | | | | | | | | | | | | | | | | | Assume the scrollbar has no scroll corner if it isn't attached to any scrollable area. Task-number: QTBUG-37679 Change-Id: Ib1bd2a4b1aa504885d52932b6c0fbd76daa356a5 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Support DELETE requests with a bodyAllan Sandfeld Jensen2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | While non-standard, other browsers allow DELETE requests to send a body in the HTTP request. Since there is no specific API for delete requests with a body in QNetworkAccessManager, we use custom HTTP request for this. Task-number: QTBUG-42456 Change-Id: I01a055ea173b5a65086f97d0c6ef14a9e01141b3 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Fix race-condition crash on leaving pages using Indexed DBAllan Sandfeld Jensen2014-11-182-1/+16
| | | | | | | | | | | | | | | | | | | | ScriptExecutionContext does not allow the list of active DOM objects to change while it is iterating over it. Since the IDB transaction backend implementations holds several active DOM objects it should not delete itself while aborting. Change-Id: Icd2f5b5a3f1957461b9a253d1005896bb2461466 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | Don't fill with invalid fill colorAllan Sandfeld Jensen2014-11-181-0/+6
| | | | | | | | | | | | | | | | WebInspector may set a default invalid fill color to disable fill, we shouldn't fill with black in this case. Change-Id: Ida1eaf187aca7fbca27449a9829c452f99634558 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* | Avoid using a separate QOpenGLContext for 2D canvas if possibleSamuel Rødal2014-11-142-22/+30
|/ | | | | | | | | | | | | | | | | | | | | When using a QGLWidget or QOpenGLWidget as a QGraphicsView viewport, we can share the context used there. The OpenGL paint engines already keep track of which engine is currently active on a context, and if necessary do a state sync to give control to a different paint engine. The TextureMapperGL does not interfere with the canvas rendering, as canvas rendering happens entirely separate from the compositing step. TextureMapperGL's compositing code is also wrapped inside a QPainter::beginNativePainting() and QPainter::endNativePainting() block, which means that the paint engine gets a chance to ensure the correct paint device is the active target, if there have been framebuffer objects bound for canvas rendering since the last frame. This can result in significant performance improvements on graphics drivers where context switching is expensive. Change-Id: I00ac4e26c026e10549b18bef1fdf4322dd17eeee Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fixed upside down drawing of accelerated 2d canvasSamuel Rødal2014-11-041-2/+10
| | | | | | | | | | | The convention used by the Qt OpenGL paint engine's internal drawTexture() function didn't match the texture layout of the accelerated 2D canvas. We need to adjust the coordinates according to whether flipped painting is in effect. Task-number: QTBUG-42376 Change-Id: I787a2deb5f26df532f2e7c475754f0fd2189132c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Fixed self-drawing of 2D canvas with accelerated 2D canvas enabled.Samuel Rødal2014-11-043-7/+34
| | | | | | | | | | | | | | | The canvas 2D API allows drawing the canvas onto itself, however with accelerated 2D canvas enabled the canvas is implemented in terms of rendering to a texture using framebuffer objects. OpenGL does not allow having the same texture be both a source and a destination in the same rendering operation, so the results are undefined. Instead, we need to blit the texture into a temporary framebuffer object, before using that as the source of the final drawing operation. Task-number: QTBUG-42275 Change-Id: I8114814dab2c8c6ca90b8d35a37b383b79923cb3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Fix merge errorAllan Sandfeld Jensen2014-11-031-2/+2
| | | | | | | | | | The change 4a39158368f6184c8d56e1d65866ba99f83297e0 merged a part of the diff for prepend to append. This patch moves the wrongly merged line. Task-number: QTBUG-40284 Change-Id: I32d1b2f8e730aca38964d3675d3dec94512e0026 Reviewed-by: Julien Brianceau <jbriance@cisco.com> Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Add mappings from new Qt key values to key identifiersAllan Sandfeld Jensen2014-10-311-4/+14
| | | | | Change-Id: Iab57bbe15c6fd4d33dfe6e36cd0bd01ca6644841 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Do not send focus event to missing plugins on OS XAllan Sandfeld Jensen2014-10-301-0/+3
| | | | | | | | | Fix a crash when trying to focus a pluginview that doesn't have a loaded plugin. Task-number: QTBUG-40273 Change-Id: I0875cab81a3484094fc705d59df80b87ca83a9ff Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix preloading of video when using QtMultimedia backend.Michael Brüning2014-10-302-5/+15
| | | | | | | | Based on a patch by Yoann Lopes (yoann.lopes@theqtcompany.com). Task-number: QTBUG-37381 Change-Id: I8647c578399a592f8feef0d4028187afd3726b2d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Do not enumerate plugins when plugins are disabledJan Kundrát2014-10-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if plugins were disabled through QWebSettings::PluginsEnabled, WebKit would still enumerate the on-disk NPAPI plugins and attempt to load them. This caused all sorts of havoc especially when loading plugins linked to Qt4. Even if that wasn't the case, plugins should *not* be loaded unless there's a compelling reason to do so. Loading plugins needlessly takes time and it might even have security implications -- it sounds like a good practice to not execute random code, even though it comes from trusted locations, when that code is not needed. After this change, the code still passes the tst_qwebpage tests which are related to plugin loading. As it turns out, the "QtWebKit application plugins" (application/x-qt-plugin and application/x-qt-styled-widget) do not use this code path at all, they instead go through a path like this one: #0 PluginPage::createPlugin ... #1 QWebPagePrivate::createPlugin ... #2 WebCore::FrameLoaderClientQt::createPlugin ... #3 WebCore::SubframeLoader::loadPlugin ... #4 WebCore::SubframeLoader::requestPlugin ... #5 WebCore::SubframeLoader::requestObject ... #6 WebCore::HTMLObjectElement::updateWidget ... #7 WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary ... #8 WebCore::HTMLPlugInImageElement::updateWidgetCallback ... #9 WebCore::ContainerNode::dispatchPostAttachCallbacks ... #10 WebCore::ContainerNode::resumePostAttachCallbacks ... #11 WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler ... #12 WebCore::Document::recalcStyle ... #13 WebCore::Document::updateStyleIfNeeded ... #14 WebCore::Document::finishedParsing ... #15 WebCore::HTMLConstructionSite::finishedParsing ... #16 WebCore::HTMLTreeBuilder::finished ... #17 WebCore::HTMLDocumentParser::end ... #18 WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd ... #19 WebCore::HTMLDocumentParser::prepareToStopParsing ... #20 WebCore::HTMLDocumentParser::attemptToEnd ... #21 WebCore::HTMLDocumentParser::finish ... #22 WebCore::DocumentWriter::end ... #23 WebCore::DocumentLoader::finishedLoading ... Task-number: QTBUG-36349 Change-Id: Id8f37fb16bb295781c22f439fd54a65486deef8e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Do not schedule navigation to invalid URLAllan Sandfeld Jensen2014-10-221-1/+1
| | | | | | | | | | Fix an assert triggered by navigation to a fragment URL of an unset URL. The code was assuming the string given was a valid encoded URL, so we shouldn't continue if the completed URL is invalid. Task-number: QTBUG-38546 Change-Id: I377b09814150ae9926de95efe3f3e2e750145c4a Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix Qt 5.3 backward compatible buildAllan Sandfeld Jensen2014-10-164-6/+29
| | | | | | | | | | The accelerated canvas and dynamic GL support used Qt 5.4 specific features. These can be avoided by disabling one webgl extension and being less efficient in accelerated canvas, thereby making it possible to still build QtWebKit with Qt 5.3. Change-Id: Ic64f7f5ac6b836b314331c4d509e4d64cb0dcb7c Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Blacklist libkpartspluginSune Vuorela2014-10-161-1/+2
| | | | | | | | KPartsPlugin is built using qt4, and loading that into a Qt5 QtWebkit makes stuff crash. Change-Id: I47d01dfe3b215192b012911013b352ea5b5b1530 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* StylePendingImage needs to correctly manage the CSSValue pointer lifetimeDarin Adler2014-10-157-8/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.webkit.org/show_bug.cgi?id=125468 Reviewed by Andreas Kling. Source/WebCore: Test: fast/css/pending-image-crash.xhtml Disconnect the reference counted StylePendingImage from the CSSValue that owns it when it's not needed any more, otherwise we could end up using a pointer that might no longer be valid. * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the current image if it is a StylePendingImage. (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage. (WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing m_image to a new value. (WebCore::CSSCursorImageValue::clearCachedImage): Ditto. * css/CSSCursorImageValue.h: Added detachPendingImage. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue on the current image set if it is a StylePendingImage. (WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage. (WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing m_imageSet to a new value. * css/CSSImageSetValue.h: Added detachPendingImage. * css/CSSImageValue.cpp: (WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the current image if it is a StylePendingImage. (WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage. (WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image to a new value. * css/CSSImageValue.h: Added detachPendingImage. * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::cssImageValue): Added a null check. (WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check. (WebCore::StylePendingImage::cssCursorImageValue): Added a null check. (WebCore::StylePendingImage::cssImageSetValue): Added a null check. (WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since the style is no longer using this StylePendingImage. (WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we need is some arbitrary pointer uniquely identifying the image. Before loading the image, we have no suitable weak identifier, so it suffices to use the unique pointer to each StylePendingImage object. This function is used only in a limited way; it would be nice to find a way to make the code less strange long term. Change-Id: Iab8a5d033c5cdf9a488ac18d8f233dee48c5f3e7 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160479 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Michael Bruning <michael.bruning@digia.com>