From eb611b3f830cb4af80baabadc1f4e71f284ab786 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 12 Aug 2014 10:06:25 +0200 Subject: Fix case in documentation of qobjectbridge bindings The method toDataURL does not work, but calling toDataUrl does. This patch updates the documentation to match the exported method name. Task-number: QTBUG-40268 Change-Id: Icf0ee233df141d43367da045834e6a42c9afb31a Reviewed-by: Simon Hausmann --- Source/WebKit/qt/docs/qtwebkit-bridge.qdoc | 4 ++-- Source/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc b/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc index c7b3c27e7..5db9e931c 100644 --- a/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc +++ b/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc @@ -360,8 +360,8 @@ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 1 The JavaScript environment can then use the pixmap from Qt and display it inside the HTML environment, - by assigning it to an existing \c{} element with \c{assignToHTMLImageElement()}. It can also use the \c{toDataURL()} function, - which allows using the pixmap as the \c{src} attribute of an image or as a \c{background-image} URL. Note that the \c{toDataURL()} + by assigning it to an existing \c{} element with \c{assignToHTMLImageElement()}. It can also use the \c{toDataUrl()} function, + which allows using the pixmap as the \c{src} attribute of an image or as a \c{background-image} URL. Note that the \c{toDataUrl()} function is costly and should be used with caution. It can also use the \c{toImageData()} function to convert the pixmap to a JavaScript \c{ImageData} object. diff --git a/Source/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp b/Source/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp index 27018af33..14331d195 100644 --- a/Source/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp +++ b/Source/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp @@ -13,7 +13,7 @@ void wrapInFunction() { width: ..., height: ..., - toDataURL: function() { ... }, + toDataUrl: function() { ... }, assignToHTMLImageElement: function(element) { ... } toImageData: function() { ... } } -- cgit v1.2.1 From 593ea5a6fdd5d057387615935bf6eeaed5888de9 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Wed, 13 Aug 2014 11:07:58 +0200 Subject: Fix crash in DeviceOrientationController when !HAVE(QTSENSORS) Regression introduced by QSensors leak fix (QTBUG-38857). Change-Id: I22dd4f774012ef9b8af9ba8b59e1e4603a3ebbf4 Reviewed-by: Allan Sandfeld Jensen --- Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp index 13fbe88d3..ca0f7d371 100644 --- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp +++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp @@ -258,8 +258,10 @@ void QWebPageAdapter::initializeWebCorePage() m_deviceMotionClient = new DeviceMotionClientQt; } #endif - WebCore::provideDeviceOrientationTo(page, m_deviceOrientationClient); - WebCore::provideDeviceMotionTo(page, m_deviceMotionClient); + if (m_deviceOrientationClient) + WebCore::provideDeviceOrientationTo(page, m_deviceOrientationClient); + if (m_deviceMotionClient) + WebCore::provideDeviceMotionTo(page, m_deviceMotionClient); #endif // By default each page is put into their own unique page group, which affects popup windows -- cgit v1.2.1 From cb96122c43e5fcf015d735559aec54fc8665db1c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 13 Aug 2014 15:03:23 +0200 Subject: Fix regression in QQuickWebView's transparent backgound We need to set both setDrawsTransparentBackground and setDrawsBackground to get the full correct behavior of transparent backgrounds. Task-number: QTBUG-40063 Change-Id: Iaa276a6a12e3cff40d8bc2892fb0667242afb88b Reviewed-by: Jocelyn Turcotte --- Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index a46b6972e..fede9aee0 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -522,6 +522,7 @@ void QQuickWebViewPrivate::didChangeBackForwardList(WKPageRef, WKBackForwardList void QQuickWebViewPrivate::setTransparentBackground(bool enable) { webPageProxy->setDrawsTransparentBackground(enable); + webPageProxy->setDrawsBackground(!enable); } bool QQuickWebViewPrivate::transparentBackground() const -- cgit v1.2.1 From 13f80d34ae84c3231118c8013beee55badab8929 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 15 Aug 2014 16:03:47 +0200 Subject: Fix fallback conversion of recognized objects All objects are added the list of visited objects, but only those that were not recognized more specific than 'Object' are removed before trying the fallback conversion. This prevents the fallback from working as the algorithm will assume we are looping. Task-number: QTBUG-39951 Change-Id: I1d538c452092485b371c335e53f16db162bd4fb1 Reviewed-by: Simon Hausmann --- Source/WebCore/bridge/qt/qt_runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/bridge/qt/qt_runtime.cpp b/Source/WebCore/bridge/qt/qt_runtime.cpp index e6a3e6b9f..58259ff3e 100644 --- a/Source/WebCore/bridge/qt/qt_runtime.cpp +++ b/Source/WebCore/bridge/qt/qt_runtime.cpp @@ -638,7 +638,7 @@ QVariant convertValueToQVariant(JSContextRef context, JSValueRef value, QMetaTyp *distance = 1; return QVariant(); } - if (type == Object) { + if (JSValueIsObject(context, value)) { // Since we haven't really visited this object yet, we remove it visitedObjects->remove(object); } -- cgit v1.2.1 From bc8af0ec15de3c45b7461be0aee100a0d99c6962 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 13 Dec 2013 14:30:35 +0100 Subject: Fix key identifier for comma key ("Separator") Change-Id: Ib450ba08d1bf53e2f7879560cb8ec764997570db Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp index 8ac6e0099..6fbd3eb07 100644 --- a/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp +++ b/Source/WebCore/platform/qt/PlatformKeyboardEventQt.cpp @@ -140,7 +140,7 @@ String keyIdentifierForQtKeyCode(int keyCode) case Qt::Key_Zoom: return ASCIILiteral("Zoom"); case Qt::Key_Comma: - return ASCIILiteral("Seperator"); + return ASCIILiteral("Separator"); case Qt::Key_Plus: return ASCIILiteral("Add"); case Qt::Key_Minus: -- cgit v1.2.1 From d61a03cf5951a6ee9e890783039e68c8598714e6 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Thu, 28 Aug 2014 16:32:15 +0200 Subject: Correct GC length unit and prevent division by 0 in showObjectStatistics. https://bugs.webkit.org/show_bug.cgi?id=136340 Reviewed by Mark Hahnenberg. Change-Id: I20483be1225d674160bbdab183bc52121fe4411c git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173062 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Michael Bruning --- Source/JavaScriptCore/heap/HeapStatistics.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Source/JavaScriptCore/heap/HeapStatistics.cpp b/Source/JavaScriptCore/heap/HeapStatistics.cpp index 55e3e9d9d..b63c316ce 100644 --- a/Source/JavaScriptCore/heap/HeapStatistics.cpp +++ b/Source/JavaScriptCore/heap/HeapStatistics.cpp @@ -232,22 +232,23 @@ void HeapStatistics::showObjectStatistics(Heap* heap) dataLogF("\n=== Heap Statistics: ===\n"); dataLogF("size: %ldkB\n", static_cast(heap->m_sizeAfterLastCollect / KB)); dataLogF("capacity: %ldkB\n", static_cast(heap->capacity() / KB)); - dataLogF("pause time: %lfms\n\n", heap->m_lastGCLength); + dataLogF("pause time: %lfs\n\n", heap->m_lastGCLength); StorageStatistics storageStatistics; heap->m_objectSpace.forEachLiveCell(storageStatistics); - dataLogF("wasted .property storage: %ldkB (%ld%%)\n", - static_cast( - (storageStatistics.storageCapacity() - storageStatistics.storageSize()) / KB), - static_cast( - (storageStatistics.storageCapacity() - storageStatistics.storageSize()) * 100 - / storageStatistics.storageCapacity())); - dataLogF("objects with out-of-line .property storage: %ld (%ld%%)\n", - static_cast( - storageStatistics.objectWithOutOfLineStorageCount()), - static_cast( - storageStatistics.objectWithOutOfLineStorageCount() * 100 - / storageStatistics.objectCount())); + long wastedPropertyStorageBytes = 0; + long wastedPropertyStoragePercent = 0; + long objectWithOutOfLineStorageCount = 0; + long objectsWithOutOfLineStoragePercent = 0; + if ((storageStatistics.storageCapacity() > 0) && (storageStatistics.objectCount() > 0)) { + wastedPropertyStorageBytes = static_cast((storageStatistics.storageCapacity() - storageStatistics.storageSize()) / KB); + wastedPropertyStoragePercent = static_cast( + (storageStatistics.storageCapacity() - storageStatistics.storageSize()) * 100 / storageStatistics.storageCapacity()); + objectWithOutOfLineStorageCount = static_cast(storageStatistics.objectWithOutOfLineStorageCount()); + objectsWithOutOfLineStoragePercent = objectWithOutOfLineStorageCount * 100 / storageStatistics.objectCount(); + } + dataLogF("wasted .property storage: %ldkB (%ld%%)\n", wastedPropertyStorageBytes, wastedPropertyStoragePercent); + dataLogF("objects with out-of-line .property storage: %ld (%ld%%)\n", objectWithOutOfLineStorageCount, objectsWithOutOfLineStoragePercent); } } // namespace JSC -- cgit v1.2.1 From 025a5cc3ba51bf8bb3aded0d2464cb49bea1d0a7 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 29 Aug 2014 11:33:47 +0200 Subject: Bump version Change-Id: Icd62ad6ca89ac8039272d9b3caaacabc571e0c8d --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 866003e46..076bb9903 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -3,4 +3,4 @@ MODULE_QMAKE_OUTDIR = $$shadowed($$PWD/Tools/qmake) QMAKEPATH += $$PWD/Tools/qmake $$MODULE_QMAKE_OUTDIR load(qt_build_config) -MODULE_VERSION = 5.3.2 +MODULE_VERSION = 5.3.3 -- cgit v1.2.1 From 493382c64f32630ee72ef74771ddb53d5c098f3b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 27 Aug 2014 12:51:20 +0200 Subject: Use Qt's qt_gl_read_framebuffer method instead of reimplementing it The fallback for rending a 3D graphics context was using an inefficient read_framebuffer implementation. This patch instead uses the internal Qt version which is exported for exactly this purpose. Change-Id: Icf38d072feea7b5dec6c6ff568d42136943674bc Reviewed-by: Jocelyn Turcotte --- .../platform/graphics/qt/GraphicsContext3DQt.cpp | 37 ++++------------------ 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp index 1e57fd386..9e455a82a 100644 --- a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp @@ -46,6 +46,10 @@ #if USE(3D_GRAPHICS) +QT_BEGIN_NAMESPACE +extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha); +QT_END_NAMESPACE + namespace WebCore { #if !defined(GLchar) @@ -216,11 +220,6 @@ GraphicsContext3DPrivate::~GraphicsContext3DPrivate() m_surfaceOwner = 0; } -static inline quint32 swapBgrToRgb(quint32 pixel) -{ - return (((pixel << 16) | (pixel >> 16)) & 0x00ff00ff) | (pixel & 0xff00ff00); -} - #if USE(ACCELERATED_COMPOSITING) void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity) { @@ -235,6 +234,7 @@ void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper* textureMapper return; } + // Alternatively read pixels to a memory buffer. GraphicsContext* context = textureMapper->graphicsContext(); QPainter* painter = context->platformContext(); painter->save(); @@ -244,37 +244,12 @@ void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper* textureMapper const int height = m_context->m_currentHeight; const int width = m_context->m_currentWidth; - // Alternatively read pixels to a memory buffer. - QImage offscreenImage(width, height, QImage::Format_ARGB32); - quint32* imagePixels = reinterpret_cast(offscreenImage.bits()); - painter->beginNativePainting(); makeCurrentIfNeeded(); glBindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_context->m_fbo); - glReadPixels(/* x */ 0, /* y */ 0, width, height, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, imagePixels); + QImage offscreenImage = qt_gl_read_framebuffer(QSize(width, height), true, true); glBindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_context->m_state.boundFBO); - // OpenGL gives us ABGR on 32 bits, and with the origin at the bottom left - // We need RGB32 or ARGB32_PM, with the origin at the top left. - quint32* pixelsSrc = imagePixels; - const int halfHeight = height / 2; - for (int row = 0; row < halfHeight; ++row) { - const int targetIdx = (height - 1 - row) * width; - quint32* pixelsDst = imagePixels + targetIdx; - for (int column = 0; column < width; ++column) { - quint32 tempPixel = *pixelsSrc; - *pixelsSrc = swapBgrToRgb(*pixelsDst); - *pixelsDst = swapBgrToRgb(tempPixel); - ++pixelsSrc; - ++pixelsDst; - } - } - if (static_cast(height) % 2) { - for (int column = 0; column < width; ++column) { - *pixelsSrc = swapBgrToRgb(*pixelsSrc); - ++pixelsSrc; - } - } painter->endNativePainting(); painter->drawImage(targetRect, offscreenImage); -- cgit v1.2.1 From 49b71cd747ed5144c60198d8c09f4c2e99eca853 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 1 Sep 2014 15:02:07 +0200 Subject: Improve layout and rendering speed of complex font path This patch enables the use of the TextLayout object previously only used by the Mac port. This caches a line of laid out text making reflowing text much faster when using the complex font path. The patch also enables caching in the QTextLayout, this improves also drawing and measuring of complex fonts, since previously we would throw away details of the layout after calculating a line, but then recalculate it for drawing or measuring. Change-Id: I9db40cdb5a35d28072204f950a8aa50669ac643b Reviewed-by: Pierre Rossi --- Source/WebCore/platform/graphics/Font.cpp | 2 +- Source/WebCore/platform/graphics/Font.h | 1 + Source/WebCore/platform/graphics/qt/FontQt.cpp | 66 +++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/platform/graphics/Font.cpp b/Source/WebCore/platform/graphics/Font.cpp index f58bcc843..4f6570f8a 100644 --- a/Source/WebCore/platform/graphics/Font.cpp +++ b/Source/WebCore/platform/graphics/Font.cpp @@ -329,7 +329,7 @@ float Font::width(const TextRun& run, int& charsConsumed, String& glyphName) con return width(run); } -#if !PLATFORM(MAC) +#if !PLATFORM(MAC) && !PLATFORM(QT) PassOwnPtr Font::createLayout(RenderText*, float, bool) const { return nullptr; diff --git a/Source/WebCore/platform/graphics/Font.h b/Source/WebCore/platform/graphics/Font.h index 08e0ad49a..f2625871f 100644 --- a/Source/WebCore/platform/graphics/Font.h +++ b/Source/WebCore/platform/graphics/Font.h @@ -212,6 +212,7 @@ private: friend struct WidthIterator; friend class SVGTextRunRenderingContext; + friend class TextLayout; public: // Useful for debugging the different font rendering code paths. diff --git a/Source/WebCore/platform/graphics/qt/FontQt.cpp b/Source/WebCore/platform/graphics/qt/FontQt.cpp index 324fdf05f..3eead7e70 100644 --- a/Source/WebCore/platform/graphics/qt/FontQt.cpp +++ b/Source/WebCore/platform/graphics/qt/FontQt.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2012, 2014 Digia Plc. and/or its subsidiary(-ies) Copyright (C) 2008, 2010 Holger Hans Peter Freyther Copyright (C) 2009 Dirk Schulze @@ -31,6 +31,8 @@ #include "GraphicsContext.h" #include "NotImplemented.h" #include "Pattern.h" +#include "RenderBlock.h" +#include "RenderText.h" #include "ShadowBlur.h" #include "TextRun.h" @@ -62,6 +64,7 @@ static QTextLine setupLayout(QTextLayout* layout, const TextRun& style) int flags = style.rtl() ? Qt::TextForceRightToLeft : Qt::TextForceLeftToRight; if (style.expansion()) flags |= Qt::TextJustificationForced; + layout->setCacheEnabled(true); layout->setFlags(flags); layout->beginLayout(); QTextLine line = layout->createLine(); @@ -168,6 +171,67 @@ static void drawQtGlyphRun(GraphicsContext* context, const QGlyphRun& qtGlyphRun } } +class TextLayout { +public: + static bool isNeeded(RenderText* text, const Font& font) + { + TextRun run = RenderBlock::constructTextRun(text, font, text, text->style()); + return font.codePath(run) == Font::Complex; + } + + TextLayout(RenderText* text, const Font& font, float xPos) + { + const TextRun run(constructTextRun(text, font, xPos)); + const String sanitized = Font::normalizeSpaces(run.characters16(), run.length()); + const QString string(sanitized); + m_layout.setText(string); + m_layout.setRawFont(font.rawFont()); + font.initFormatForTextLayout(&m_layout, run); + m_line = setupLayout(&m_layout, run); + } + + float width(unsigned from, unsigned len, HashSet* fallbackFonts) + { + Q_UNUSED(fallbackFonts); + float x1 = m_line.cursorToX(from); + float x2 = m_line.cursorToX(from + len); + float width = qAbs(x2 - x1); + + return width; + } + +private: + static TextRun constructTextRun(RenderText* text, const Font& font, float xPos) + { + TextRun run = RenderBlock::constructTextRun(text, font, text, text->style()); + run.setCharactersLength(text->textLength()); + ASSERT(run.charactersLength() >= run.length()); + + run.setXPos(xPos); + return run; + } + + QTextLayout m_layout; + QTextLine m_line; +}; + +PassOwnPtr Font::createLayout(RenderText* text, float xPos, bool collapseWhiteSpace) const +{ + if (!collapseWhiteSpace || !TextLayout::isNeeded(text, *this)) + return PassOwnPtr(); + return adoptPtr(new TextLayout(text, *this, xPos)); +} + +void Font::deleteLayout(TextLayout* layout) +{ + delete layout; +} + +float Font::width(TextLayout& layout, unsigned from, unsigned len, HashSet* fallbackFonts) +{ + return layout.width(from, len, fallbackFonts); +} + void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const FloatPoint& point, int from, int to) const { String sanitized = Font::normalizeSpaces(run.characters16(), run.length()); -- cgit v1.2.1 From ea22657d17a934b04c8621dc8891a1d4d80510e3 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Wed, 3 Sep 2014 19:16:20 +0200 Subject: [mips] Handle properly halfword load in JavaScriptCore. This patch improves YarrJIT efficiency on mips platforms. SunSpider's regexp-dna test can be used to monitor performance impact. Change-Id: I28d99fb01628bc72f29c120caf8bc53c5d06e3ff Reviewed-by: Allan Sandfeld Jensen --- .../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 48 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h index 754e5cf4e..927b08b07 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h @@ -768,7 +768,53 @@ public: void load16Unaligned(BaseIndex address, RegisterID dest) { - load16(address, dest); + if (address.offset >= -32768 && address.offset <= 32766 && !m_fixedWidth) { + /* + sll addrtemp, address.index, address.scale + addu addrtemp, addrtemp, address.base + lbu immTemp, address.offset+x(addrtemp) (x=0 for LE, x=1 for BE) + lbu dest, address.offset+x(addrtemp) (x=1 for LE, x=0 for BE) + sll dest, dest, 8 + or dest, dest, immTemp + */ + m_assembler.sll(addrTempRegister, address.index, address.scale); + m_assembler.addu(addrTempRegister, addrTempRegister, address.base); +#if CPU(BIG_ENDIAN) + m_assembler.lbu(immTempRegister, addrTempRegister, address.offset + 1); + m_assembler.lbu(dest, addrTempRegister, address.offset); +#else + m_assembler.lbu(immTempRegister, addrTempRegister, address.offset); + m_assembler.lbu(dest, addrTempRegister, address.offset + 1); +#endif + m_assembler.sll(dest, dest, 8); + m_assembler.orInsn(dest, dest, immTempRegister); + } else { + /* + sll addrTemp, address.index, address.scale + addu addrTemp, addrTemp, address.base + lui immTemp, address.offset >> 16 + ori immTemp, immTemp, address.offset & 0xffff + addu addrTemp, addrTemp, immTemp + lbu immTemp, x(addrtemp) (x=0 for LE, x=1 for BE) + lbu dest, x(addrtemp) (x=1 for LE, x=0 for BE) + sll dest, dest, 8 + or dest, dest, immTemp + */ + m_assembler.sll(addrTempRegister, address.index, address.scale); + m_assembler.addu(addrTempRegister, addrTempRegister, address.base); + m_assembler.lui(immTempRegister, address.offset >> 16); + m_assembler.ori(immTempRegister, immTempRegister, address.offset); + m_assembler.addu(addrTempRegister, addrTempRegister, immTempRegister); +#if CPU(BIG_ENDIAN) + m_assembler.lbu(immTempRegister, addrTempRegister, 1); + m_assembler.lbu(dest, addrTempRegister, 0); +#else + m_assembler.lbu(immTempRegister, addrTempRegister, 0); + m_assembler.lbu(dest, addrTempRegister, 1); +#endif + m_assembler.sll(dest, dest, 8); + m_assembler.orInsn(dest, dest, immTempRegister); + } } void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) -- cgit v1.2.1 From d41aa87d6b1164666c9f013a785bc6217ae1ced2 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Fri, 5 Sep 2014 10:44:35 +0200 Subject: [mips] Fix unaligned access in Low Level Interpreter (LLINT). Address loads used with btbxx opcodes were wrongly converted to lw instruction instead of lbu, leading to unaligned access on mips platforms. Change-Id: I7b14aa40215affe582bcadade2f783769a97a7d3 Reviewed-by: Jocelyn Turcotte --- Source/JavaScriptCore/offlineasm/mips.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/JavaScriptCore/offlineasm/mips.rb b/Source/JavaScriptCore/offlineasm/mips.rb index c0adfd029..08fd02662 100644 --- a/Source/JavaScriptCore/offlineasm/mips.rb +++ b/Source/JavaScriptCore/offlineasm/mips.rb @@ -231,9 +231,10 @@ def lowerMIPSCondBranch(list, condOp, node) [node.operands[0], MIPS_ZERO_REG, node.operands[-1]], node.annotation) elsif node.operands.size == 3 + tl = condOp[-1, 1] tmp = Tmp.new(node.codeOrigin, :gpr) list << Instruction.new(node.codeOrigin, - "andi", + "and" + tl, [node.operands[0], node.operands[1], tmp], node.annotation) list << Instruction.new(node.codeOrigin, @@ -503,6 +504,10 @@ def mipsLowerMisplacedAddresses(list) newList << Instruction.new(node.codeOrigin, node.opcode, riscAsRegisters(newList, [], node.operands, "b")) + when "andb" + newList << Instruction.new(node.codeOrigin, + "andi", + riscAsRegisters(newList, [], node.operands, "b")) when /^(bz|bnz|bs|bo)/ tl = $~.post_match == "" ? "i" : $~.post_match newList << Instruction.new(node.codeOrigin, -- cgit v1.2.1 From ceaa9ecc67a9ebb83ce735a24c6061df3dd8c489 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 3 Sep 2014 14:27:42 +0200 Subject: Fix crossbuilding QtWebKit from Windows A number of checks needed for the building process was checking the target instead of the host environment, making them fail to work when crossbuilding from windows to a non-windows target. Change-Id: Iba61016471a6fadf8fc34012f4a323bc7264c945 Reviewed-by: Michael Bruning --- Tools/qmake/mkspecs/features/default_post.prf | 2 +- Tools/qmake/mkspecs/features/default_pre.prf | 2 +- Tools/qmake/mkspecs/features/functions.prf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf index 79b64547a..e07d5e47d 100644 --- a/Tools/qmake/mkspecs/features/default_post.prf +++ b/Tools/qmake/mkspecs/features/default_post.prf @@ -91,7 +91,7 @@ contains(TEMPLATE, derived) { # on Linux and Mac OS X. On Windows we do have a convenience copy in # Qt5's top-level repository, so let's add that to the PATH if we can # find it. - win32 { + equals(QMAKE_HOST.os, Windows) { GNUTOOLS_DIR=$$[QT_HOST_DATA]/../gnuwin32/bin exists($$GNUTOOLS_DIR/gperf.exe) { GNUTOOLS = "(set $$escape_expand(\\\")PATH=$$toSystemPath($$GNUTOOLS_DIR);%PATH%$$escape_expand(\\\"))" diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf index 69f039387..06f10dec5 100644 --- a/Tools/qmake/mkspecs/features/default_pre.prf +++ b/Tools/qmake/mkspecs/features/default_pre.prf @@ -106,7 +106,7 @@ if(win32|mac):!macx-xcode { # A newer version of flex is required on Windows. At the moment the only # one that appears to provide binaries and is not cygwin is winflex. FLEX = flex -win32: FLEX = win_flex +equals(QMAKE_HOST.os, Windows): FLEX = win_flex BIN_EXTENSION = win32: BIN_EXTENSION = .exe diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf index 46293fe6a..7b3ab01c4 100644 --- a/Tools/qmake/mkspecs/features/functions.prf +++ b/Tools/qmake/mkspecs/features/functions.prf @@ -196,7 +196,7 @@ defineTest(haveQt) { } defineTest(programExistsInPath) { - win32: program = $${1}.exe + equals(QMAKE_HOST.os, Windows): program = $${1}.exe else: program = $$1 PATH = "$$(PATH)" -- cgit v1.2.1 From e869050a9ea37662847811fb0f67c33b25cf2d1f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 10 Dec 2013 23:59:03 +0100 Subject: QWidgetPluginImpl: fix build with QT_NO_STYLE_STYLESHEET Change-Id: Ia96efd95ff5f92e5b6569b343764c337fb1a8d41 Reviewed-by: Simon Hausmann --- Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.cpp b/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.cpp index 2beabf1d0..b34e1fd21 100644 --- a/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.cpp +++ b/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.cpp @@ -54,7 +54,9 @@ void QWidgetPluginImpl::setVisible(bool visible) void QWidgetPluginImpl::setStyleSheet(const QString &stylesheet) { +#ifndef QT_NO_STYLE_STYLESHEET m_widget->setStyleSheet(stylesheet); +#endif } void QWidgetPluginImpl::setWidgetParent(QObject *parent) -- cgit v1.2.1 From 3248c5b93cd22cb2d9f1a7368daf0902e68b58e0 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 3 Sep 2014 16:02:24 +0200 Subject: Fix building QtWebKit for QNX Fix method now available in QNX 6.6, lack of std::move even with C++11 enabled, binary structure of stack frames on QNX x86 and the wrongly advertised existence of MADV_FREE and MADV_REUSE. Change-Id: I0dacbd19ed932ec6b3b2cc1d625a347e169615a5 Reviewed-by: Milian Wolff Reviewed-by: Michael Bruning --- Source/JavaScriptCore/jit/JITStubs.h | 2 +- Source/WTF/wtf/Compiler.h | 19 ++++++++++++++----- Source/WTF/wtf/MathExtras.h | 4 ++-- Source/WTF/wtf/Platform.h | 5 ----- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Source/JavaScriptCore/jit/JITStubs.h b/Source/JavaScriptCore/jit/JITStubs.h index 51873507e..2659d6899 100644 --- a/Source/JavaScriptCore/jit/JITStubs.h +++ b/Source/JavaScriptCore/jit/JITStubs.h @@ -140,7 +140,7 @@ struct JITStackFrame { ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast(this) - 1; } }; #elif CPU(X86) -#if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) +#if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) || OS(QNX) #pragma pack(push) #pragma pack(4) #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h index 493894c09..ead844f9e 100644 --- a/Source/WTF/wtf/Compiler.h +++ b/Source/WTF/wtf/Compiler.h @@ -62,11 +62,6 @@ #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums) #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions) -#if defined(__APPLE__) && COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) && defined(_GLIBCXX_VERSION) && (_GLIBCXX_VERSION <= 20070719) -/* WTF expects the standard library to have std::move when the compiler supports rvalue references, but some old versions of stdc++11 shipped by Apple does not. */ -#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 0 -#endif - #endif #ifndef CLANG_PRAGMA @@ -185,6 +180,20 @@ #define WTF_COMPILER_SUPPORTS_EABI 1 #endif +/* Library C++11 support */ +#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) +/* WTF expects the standard library to have std::move when the compiler supports rvalue references */ +#if defined(__APPLE__) && defined(_GLIBCXX_VERSION) && (_GLIBCXX_VERSION <= 20070719) +/* Some old versions of stdc++11 shipped by Apple does not have std::move. */ +#undef WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES +#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 0 +#elif defined(__QNXNTO__) && (defined(_YVALS) || defined(_LIBCPP_VER)) +/* libcpp (Dinkumware) does not support std::move */ +#undef WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES +#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 0 +#endif +#endif + /* ==== Compiler features ==== */ /* ALWAYS_INLINE */ diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h index 1bdbc6108..859722386 100644 --- a/Source/WTF/wtf/MathExtras.h +++ b/Source/WTF/wtf/MathExtras.h @@ -148,8 +148,8 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); } #endif -#if COMPILER(GCC) && OS(QNX) -// The stdlib on QNX doesn't contain long abs(long). See PR #104666. +#if COMPILER(GCC) && OS(QNX) && _CPPLIB_VER < 640 +// The stdlib on QNX < 6.6 doesn't contain long abs(long). See PR #104666. inline long long abs(long num) { return labs(num); } #endif diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 1327ef54c..1339642b4 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -694,11 +694,6 @@ #define HAVE_VIRTUALALLOC 1 #endif -#if OS(QNX) -#define HAVE_MADV_FREE_REUSE 1 -#define HAVE_MADV_FREE 1 -#endif - /* ENABLE macro defaults */ /* FIXME: move out all ENABLE() defines from here to FeatureDefines.h */ -- cgit v1.2.1 From 40af385a1b7e7fdd60e3fb0adf872cc946515a06 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 15 Sep 2014 15:53:53 +0200 Subject: Fix repainting of subpixel positioned composited layers Since the offset-from-renderer includes the pixel snapping based on subpixel accumulation, we should take the accumulation into account to calculate the repaint area in layer coordinates. Task-number: QTBUG-40218 Change-Id: I66f9cb0943ba69bb892c686ecea9ed5fec805a0d Reviewed-by: Michael Bruning --- Source/WebCore/rendering/RenderLayerBacking.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp index 143c7d32c..acfc67776 100644 --- a/Source/WebCore/rendering/RenderLayerBacking.cpp +++ b/Source/WebCore/rendering/RenderLayerBacking.cpp @@ -1925,35 +1925,32 @@ void RenderLayerBacking::setContentsNeedDisplayInRect(const IntRect& r) { ASSERT(!paintsIntoCompositedAncestor()); + LayoutRect layerDirtyRect(r); + layerDirtyRect.move(m_subpixelAccumulation); if (m_graphicsLayer && m_graphicsLayer->drawsContent()) { - IntRect layerDirtyRect = r; layerDirtyRect.move(-m_graphicsLayer->offsetFromRenderer()); - m_graphicsLayer->setNeedsDisplayInRect(layerDirtyRect); + m_graphicsLayer->setNeedsDisplayInRect(enclosingIntRect(layerDirtyRect)); } if (m_foregroundLayer && m_foregroundLayer->drawsContent()) { - IntRect layerDirtyRect = r; layerDirtyRect.move(-m_foregroundLayer->offsetFromRenderer()); - m_foregroundLayer->setNeedsDisplayInRect(layerDirtyRect); + m_foregroundLayer->setNeedsDisplayInRect(enclosingIntRect(layerDirtyRect)); } // FIXME: need to split out repaints for the background. if (m_backgroundLayer && m_backgroundLayer->drawsContent()) { - IntRect layerDirtyRect = r; layerDirtyRect.move(-m_backgroundLayer->offsetFromRenderer()); - m_backgroundLayer->setNeedsDisplayInRect(layerDirtyRect); + m_backgroundLayer->setNeedsDisplayInRect(enclosingIntRect(layerDirtyRect)); } if (m_maskLayer && m_maskLayer->drawsContent()) { - IntRect layerDirtyRect = r; layerDirtyRect.move(-m_maskLayer->offsetFromRenderer()); - m_maskLayer->setNeedsDisplayInRect(layerDirtyRect); + m_maskLayer->setNeedsDisplayInRect(enclosingIntRect(layerDirtyRect)); } if (m_scrollingContentsLayer && m_scrollingContentsLayer->drawsContent()) { - IntRect layerDirtyRect = r; layerDirtyRect.move(-m_scrollingContentsLayer->offsetFromRenderer()); - m_scrollingContentsLayer->setNeedsDisplayInRect(layerDirtyRect); + m_scrollingContentsLayer->setNeedsDisplayInRect(enclosingIntRect(layerDirtyRect)); } } -- cgit v1.2.1 From 7a0c9f3d2828b7b9bbae9e1358f34332d3bdf943 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 27 Aug 2014 11:43:55 +0200 Subject: Do not let platform font-engine handle zero-width spaces WebCore has special handling of zero-width spacing, including using a glyph with index 0 to represent it if the font doesn't have one. This handling might get overridden by QRawFont::advancesForGlyphIndexes which redoes advances for everything not marked as spaces. This patch makes WebCore mark the zero-width spaces as spaces for width iteration thereby handling it on the WebCore side instead of by the platform font-engine. Task-number: QTBUG-40912 Change-Id: Ida1711d3c65f1954273c786c902ef3ae77a72558 Reviewed-by: Michael Bruning Reviewed-by: Pierre Rossi --- Source/WebCore/platform/graphics/WidthIterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/platform/graphics/WidthIterator.cpp b/Source/WebCore/platform/graphics/WidthIterator.cpp index 48a59a27c..8e83544b7 100644 --- a/Source/WebCore/platform/graphics/WidthIterator.cpp +++ b/Source/WebCore/platform/graphics/WidthIterator.cpp @@ -265,7 +265,7 @@ inline unsigned WidthIterator::advanceInternal(TextIterator& textIterator, Glyph m_isAfterExpansion = false; } - if (shouldApplyFontTransforms() && glyphBuffer && Font::treatAsSpace(character)) + if (shouldApplyFontTransforms() && glyphBuffer && (Font::treatAsSpace(character) || Font::treatAsZeroWidthSpace(character))) charactersTreatedAsSpace.append(make_pair(glyphBuffer->size(), OriginalAdvancesForCharacterTreatedAsSpace(character == ' ', glyphBuffer->size() ? glyphBuffer->advanceAt(glyphBuffer->size() - 1).width() : 0, width))); -- cgit v1.2.1 From 5ef0ef71b06b0d7949c88db6719fd43907f342fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 17 Sep 2014 12:08:57 +0200 Subject: [Win] Call set window twice for the Acrobat reader plugin. Works around a quirk of the Acrobat reader that displayed the window with incorrect dimensions before. Task-number: QTBUG-36425 Change-Id: Ic5b7544a74c8e8613251850aa21537fab420b9c4 Reviewed-by: Jocelyn Turcotte --- Source/WebCore/plugins/PluginQuirkSet.h | 3 ++- Source/WebCore/plugins/win/PluginPackageWin.cpp | 6 ++++++ Source/WebCore/plugins/win/PluginViewWin.cpp | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/plugins/PluginQuirkSet.h b/Source/WebCore/plugins/PluginQuirkSet.h index 7e296dc25..37068c9c1 100644 --- a/Source/WebCore/plugins/PluginQuirkSet.h +++ b/Source/WebCore/plugins/PluginQuirkSet.h @@ -49,7 +49,8 @@ namespace WebCore { PluginQuirkRequiresDefaultScreenDepth = 1 << 13, PluginQuirkDontCallSetWindowMoreThanOnce = 1 << 14, PluginQuirkIgnoreRightClickInWindowlessMode = 1 << 15, - PluginQuirkWantsChromeUserAgent = 1 << 16 + PluginQuirkWantsChromeUserAgent = 1 << 16, + PluginQuirkNeedsSetWindowTwice = 1 << 17 }; class PluginQuirkSet { diff --git a/Source/WebCore/plugins/win/PluginPackageWin.cpp b/Source/WebCore/plugins/win/PluginPackageWin.cpp index ab8459f75..988fbfeef 100644 --- a/Source/WebCore/plugins/win/PluginPackageWin.cpp +++ b/Source/WebCore/plugins/win/PluginPackageWin.cpp @@ -162,6 +162,12 @@ void PluginPackage::determineQuirks(const String& mimeType) if (compareFileVersion(lastKnownUnloadableRealPlayerVersion) > 0) m_quirks.add(PluginQuirkDontUnloadPlugin); } + + // The Adobe Acrobat plugin only displays the pdf correctly on the first load if set window is + // called on it twice in a row. + if (name() == "Adobe Acrobat") + m_quirks.add(PluginQuirkNeedsSetWindowTwice); + } bool PluginPackage::fetchInfo() diff --git a/Source/WebCore/plugins/win/PluginViewWin.cpp b/Source/WebCore/plugins/win/PluginViewWin.cpp index fd03ac7fa..3fa897db8 100644 --- a/Source/WebCore/plugins/win/PluginViewWin.cpp +++ b/Source/WebCore/plugins/win/PluginViewWin.cpp @@ -865,6 +865,8 @@ void PluginView::setNPWindowRect(const IntRect& rect) JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonVM()); setCallingPlugin(true); m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); + if (m_plugin->quirks().contains(PluginQuirkNeedsSetWindowTwice)) + m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); setCallingPlugin(false); m_haveCalledSetWindow = true; -- cgit v1.2.1 From 9f18335913fc8b0fab3e1fcd2aea596bd8d650c9 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 17 Sep 2014 13:56:10 +0200 Subject: Fix the Adobe Reader plugin loading of local pdf files The Adobe Reader plugin can take a while to load and we must make sure that the temporary file handle stays valid until it was able to pick it. Keep track of resources loaded to temporary files and delete those files only when destroying the plugin instance. Task-number: QTBUG-36425 Change-Id: I2c5c2d11dc4710b11e4c4d6a574c5f968f4b2517 Reviewed-by: Michael Bruning --- Source/WebCore/plugins/PluginStream.cpp | 8 ++++++-- Source/WebCore/plugins/PluginStream.h | 1 + Source/WebCore/plugins/PluginView.cpp | 5 +++++ Source/WebCore/plugins/PluginView.h | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/plugins/PluginStream.cpp b/Source/WebCore/plugins/PluginStream.cpp index b03436166..8fb5d6e34 100644 --- a/Source/WebCore/plugins/PluginStream.cpp +++ b/Source/WebCore/plugins/PluginStream.cpp @@ -307,8 +307,12 @@ void PluginStream::destroyStream() if (!m_loadManually && m_client) m_client->streamDidFinishLoading(this); - if (!m_path.isNull()) - deleteFile(m_path); + if (!m_path.isNull()) { + if (m_client) + m_client->streamDidSaveTempFile(m_path); + else + deleteFile(m_path); + } } void PluginStream::delayDeliveryTimerFired(Timer* timer) diff --git a/Source/WebCore/plugins/PluginStream.h b/Source/WebCore/plugins/PluginStream.h index 55d1702bf..52606b8be 100644 --- a/Source/WebCore/plugins/PluginStream.h +++ b/Source/WebCore/plugins/PluginStream.h @@ -52,6 +52,7 @@ namespace WebCore { class PluginStreamClient { public: virtual ~PluginStreamClient() {} + virtual void streamDidSaveTempFile(const String &) {} virtual void streamDidFinishLoading(PluginStream*) {} }; diff --git a/Source/WebCore/plugins/PluginView.cpp b/Source/WebCore/plugins/PluginView.cpp index 74fd5d79a..237cda701 100644 --- a/Source/WebCore/plugins/PluginView.cpp +++ b/Source/WebCore/plugins/PluginView.cpp @@ -383,6 +383,11 @@ void PluginView::stop() LOG_NPERROR(npErr); PluginView::setCurrentPluginView(0); + Vector::iterator e = m_streamTempFilePaths.end(); + for (Vector::iterator it = m_streamTempFilePaths.begin(); it != e; ++it) + deleteFile(*it); + m_streamTempFilePaths.clear(); + #if ENABLE(NETSCAPE_PLUGIN_API) if (savedData) { // TODO: Actually save this data instead of just discarding it diff --git a/Source/WebCore/plugins/PluginView.h b/Source/WebCore/plugins/PluginView.h index a81bd0ad4..0fa2436d4 100644 --- a/Source/WebCore/plugins/PluginView.h +++ b/Source/WebCore/plugins/PluginView.h @@ -194,6 +194,7 @@ namespace WebCore { void privateBrowsingStateChanged(bool); void disconnectStream(PluginStream*); + void streamDidSaveTempFile(const String &path) { m_streamTempFilePaths.append(path); } void streamDidFinishLoading(PluginStream* stream) { disconnectStream(stream); } // Widget functions @@ -364,6 +365,7 @@ namespace WebCore { HashSet > m_streams; Vector > m_requests; + Vector m_streamTempFilePaths; bool m_isWindowed; bool m_isTransparent; -- cgit v1.2.1 From 88deb30e238adc5d662b1e3b98edb4fef101408f Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 17 Sep 2014 14:18:27 +0200 Subject: Remove code dealing with separate-debug-info on its own It is no longer possible to use separate-debug-info without using a debug build or also activating force-debug-info. This means code dealing with this specific situation is now unnecessary. Change-Id: I64bf562f88b4d63f4d05c4b3507ccdc8d7e9a710 Reviewed-by: Oswald Buddenhagen --- Tools/qmake/mkspecs/features/unix/default_post.prf | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf index 5d92b548c..9c524065d 100644 --- a/Tools/qmake/mkspecs/features/unix/default_post.prf +++ b/Tools/qmake/mkspecs/features/unix/default_post.prf @@ -23,7 +23,6 @@ linux-g++*:isEqual(QT_ARCH,i386) { greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 7) { QMAKE_CXXFLAGS_DEBUG += -fdebug-types-section QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -fdebug-types-section - separate_debug_info: QMAKE_CXXFLAGS_RELEASE += -fdebug-types-section QMAKE_LFLAGS += -fdebug-types-section } else { # If DWARF-2 is desired -feliminate-dwarf2-dups can be used with GCC 4.7, @@ -32,10 +31,6 @@ linux-g++*:isEqual(QT_ARCH,i386) { QMAKE_CXXFLAGS_DEBUG += -gstabs QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -g QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -gstabs - separate_debug_info { - QMAKE_CXXFLAGS_RELEASE -= -g - QMAKE_CXXFLAGS_RELEASE += -gstabs - } } } @@ -66,7 +61,7 @@ linux-*g++* { contains(TEMPLATE, app): CONFIG += rpath -CONFIG(debug, debug|release)|force_debug_info|separate_debug_info { +CONFIG(debug, debug|release)|force_debug_info { # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase. !force_static_libs_as_shared:config_gnuld: QMAKE_LFLAGS += -Wl,--no-keep-memory } -- cgit v1.2.1 From ab437e2fa0b15ef2b15456e4bafe3127b5ea227d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 17 Sep 2014 14:12:20 +0200 Subject: Use compiling_thirdparty_code instead of disabling specific warnings Instead of disabling all the extra warnings that appear in third-party libraries we should just use the already existing build config to avoid adding all the extra WebKit warning flags when building those libraries. Change-Id: I809b7f51a992f0314e2f5983008bc3b4b580c68e Reviewed-by: Simon Hausmann --- Source/ThirdParty/ANGLE/Target.pri | 4 +--- Source/ThirdParty/leveldb/Target.pri | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/ThirdParty/ANGLE/Target.pri b/Source/ThirdParty/ANGLE/Target.pri index 52fef9e61..dc08a1550 100644 --- a/Source/ThirdParty/ANGLE/Target.pri +++ b/Source/ThirdParty/ANGLE/Target.pri @@ -147,9 +147,7 @@ else: SOURCES += src/compiler/ossource_posix.cpp # Make sure the derived sources are built include(DerivedSources.pri) -*g++* { - QMAKE_CXXFLAGS += -Wno-unused-variable -Wno-missing-noreturn -Wno-unused-function -Wno-reorder -Wno-error -Wno-unknown-pragmas -Wno-undef -} +CONFIG += compiling_thirdparty_code # We do not need anything from Qt QT = diff --git a/Source/ThirdParty/leveldb/Target.pri b/Source/ThirdParty/leveldb/Target.pri index e071b6d5c..6ea57d97c 100644 --- a/Source/ThirdParty/leveldb/Target.pri +++ b/Source/ThirdParty/leveldb/Target.pri @@ -108,11 +108,6 @@ mac: DEFINES += OS_MACOSX linux: DEFINES += OS_LINUX freebsd*: DEFINES += OS_FREEBSD -gcc { - greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 5) { - QMAKE_CXXFLAGS_WARN_ON += -Wno-error=unused-but-set-variable - QMAKE_CXXFLAGS += -Wno-error=unused-but-set-variable - } -} +CONFIG += compiling_thirdparty_code QT += core -- cgit v1.2.1 From bb5c794c91298a3dfc0acf4a2299bf74b52f3eaa Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Fri, 13 Sep 2013 07:34:14 +0000 Subject: Fixed crash in V8 benchmark suite in ARM,softp,EABI environment. https://bugs.webkit.org/show_bug.cgi?id=117281 Patch by Youngho Yoo on 2013-09-13 Reviewed by Michael Saboff. Fix the missing EABI_32BIT_DUMMY_ARG in FPRReg using callOperation function. Change-Id: I77e7e7a37ada9d33574949220d109e8b5f2392b2 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155675 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen --- Source/JavaScriptCore/dfg/DFGCCallHelpers.h | 44 +++++++++++++++++++++++---- Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h | 20 +++++++----- 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h index ab33677ba..caf7a91d4 100644 --- a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +++ b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h @@ -489,6 +489,12 @@ public: swap(GPRInfo::argumentGPR2, GPRInfo::argumentGPR3); } +#if CPU(MIPS) +#define POKE_ARGUMENT_OFFSET 4 +#else +#define POKE_ARGUMENT_OFFSET 0 +#endif + #if CPU(X86_64) ALWAYS_INLINE void setupArguments(FPRReg arg1) { @@ -549,6 +555,20 @@ public: setupStubArguments(arg1, arg2); move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32, FPRReg arg2, GPRReg arg3) + { + moveDouble(arg2, FPRInfo::argumentFPR0); + move(arg3, GPRInfo::argumentGPR1); + move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32, GPRReg arg2, GPRReg arg3, FPRReg arg4) + { + moveDouble(arg4, FPRInfo::argumentFPR0); + setupStubArguments(arg2, arg3); + move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); + } #else ALWAYS_INLINE void setupArguments(FPRReg arg1) { @@ -575,6 +595,24 @@ public: assembler().vmov(GPRInfo::argumentGPR3, GPRInfo::nonArgGPR0, arg3); poke(GPRInfo::nonArgGPR0); } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, FPRReg arg2, GPRReg arg3) + { + poke(arg3, POKE_ARGUMENT_OFFSET); + move(arg1, GPRInfo::argumentGPR1); + assembler().vmov(GPRInfo::argumentGPR2, GPRInfo::argumentGPR3, arg2); + move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, FPRReg arg4) + { + setupStubArguments(arg1, arg2); + move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); + move(arg3, GPRInfo::argumentGPR3); + assembler().vmov(GPRInfo::nonArgGPR0, GPRInfo::nonArgGPR1, arg4); + poke(GPRInfo::nonArgGPR0, POKE_ARGUMENT_OFFSET); + poke(GPRInfo::nonArgGPR1, POKE_ARGUMENT_OFFSET + 1); + } #endif // CPU(ARM_HARDFP) #elif CPU(MIPS) ALWAYS_INLINE void setupArguments(FPRReg arg1) @@ -868,12 +906,6 @@ public: // exactly 4 argument registers, e.g. ARMv7. #if NUMBER_OF_ARGUMENT_REGISTERS == 4 -#if CPU(MIPS) -#define POKE_ARGUMENT_OFFSET 4 -#else -#define POKE_ARGUMENT_OFFSET 0 -#endif - ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4) { poke(arg4, POKE_ARGUMENT_OFFSET); diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h index f4e80996e..648b6951f 100644 --- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h +++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h @@ -1033,12 +1033,6 @@ public: return appendCallWithExceptionCheck(operation); } - JITCompiler::Call callOperation(V_DFGOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3) - { - m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); - return appendCallWithExceptionCheck(operation); - } - JITCompiler::Call callOperation(V_DFGOperation_W operation, WatchpointSet* watchpointSet) { m_jit.setupArguments(TrustedImmPtr(watchpointSet)); @@ -1264,6 +1258,12 @@ public: return appendCallWithExceptionCheckSetResult(operation, result); } + JITCompiler::Call callOperation(V_DFGOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3) + { + m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); + return appendCallWithExceptionCheck(operation); + } + JITCompiler::Call callOperation(V_DFGOperation_EJPP operation, GPRReg arg1, GPRReg arg2, void* pointer) { m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(pointer)); @@ -1411,7 +1411,7 @@ public: } JITCompiler::Call callOperation(J_DFGOperation_EDA operation, GPRReg resultTag, GPRReg resultPayload, FPRReg arg1, GPRReg arg2) { - m_jit.setupArgumentsWithExecState(arg1, arg2); + m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1, arg2); return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); } JITCompiler::Call callOperation(J_DFGOperation_EJA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2) @@ -1511,6 +1511,12 @@ public: return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); } + JITCompiler::Call callOperation(V_DFGOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3) + { + m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3); + return appendCallWithExceptionCheck(operation); + } + JITCompiler::Call callOperation(V_DFGOperation_EJPP operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, void* pointer) { m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(pointer)); -- cgit v1.2.1 From 4f553958aca984c93dcfcf7d6c1c3e682ee7b4b4 Mon Sep 17 00:00:00 2001 From: "ossy@webkit.org" Date: Fri, 13 Sep 2013 15:55:51 +0000 Subject: ARM EABI hardfp buildfix after r155675 https://bugs.webkit.org/show_bug.cgi?id=121287 Reviewed by Geoffrey Garen. Change-Id: I03c086a652b501c5424a6de6763fed1c88466e3a git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155705 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen --- Source/JavaScriptCore/dfg/DFGCCallHelpers.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h index caf7a91d4..1a0b723ee 100644 --- a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +++ b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h @@ -563,12 +563,13 @@ public: move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); } - ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32, GPRReg arg2, GPRReg arg3, FPRReg arg4) + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32, FPRReg arg4) { moveDouble(arg4, FPRInfo::argumentFPR0); - setupStubArguments(arg2, arg3); + setupStubArguments(arg1, arg2); move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); } + #else ALWAYS_INLINE void setupArguments(FPRReg arg1) { -- cgit v1.2.1 From 55f814fc556631b390f0c5764bb4ee3ceeea1d45 Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Mon, 16 Sep 2013 17:56:17 +0000 Subject: Aligned argument signatures of setupArgumentsWithExecState are missing on MIPS. https://bugs.webkit.org/show_bug.cgi?id=121439 Patch by Balazs Kilvady on 2013-09-16 Reviewed by Geoffrey Garen. Missing implementations of setupArgumentsWithExecState added. Change-Id: Ief1b1505d6c20b091ae0fcc24d7c21f50fcc712a git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155884 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen --- Source/JavaScriptCore/dfg/DFGCCallHelpers.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h index 1a0b723ee..ebf0bfd89 100644 --- a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +++ b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h @@ -648,6 +648,16 @@ public: move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); poke(arg3, 4); } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, FPRReg arg2, GPRReg arg3) + { + setupArgumentsWithExecState(arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, FPRReg arg4) + { + setupArgumentsWithExecState(arg1, arg2, arg4); + } #elif CPU(SH4) ALWAYS_INLINE void setupArguments(FPRReg arg1) { -- cgit v1.2.1