diff options
| author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-13 18:29:33 +0200 |
|---|---|---|
| committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-09-13 18:29:33 +0200 |
| commit | 39a94d7c2c5d720ee6c8743b7315c7040afdaae1 (patch) | |
| tree | 3163a177a6b26598b39ad1bd94aadb452746ab14 | |
| parent | ee8436b6ee3bb3742316b51d3b6bf4330f6c81b1 (diff) | |
| parent | 6eecd106312582cacbfce3085e5a7b0b82778c92 (diff) | |
| download | qtwebkit-39a94d7c2c5d720ee6c8743b7315c7040afdaae1.tar.gz | |
Merge branch 'stable' into dev
Conflicts:
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Change-Id: Iaa6209d0d611d18b8c916bcd165c8bf5b7441b7b
| -rw-r--r-- | Source/JavaScriptCore/assembler/ARMAssembler.h | 4 | ||||
| -rw-r--r-- | Source/JavaScriptCore/disassembler/udis86/itab.py | 4 | ||||
| -rw-r--r-- | Source/JavaScriptCore/disassembler/udis86/ud_opcode.py | 8 | ||||
| -rw-r--r-- | Source/JavaScriptCore/disassembler/udis86/ud_optable.py | 12 | ||||
| -rw-r--r-- | Source/WebCore/platform/graphics/FontFastPath.cpp | 12 | ||||
| -rw-r--r-- | Source/WebCore/platform/graphics/WidthIterator.cpp | 6 | ||||
| -rw-r--r-- | Source/WebCore/platform/graphics/WidthIterator.h | 3 | ||||
| -rw-r--r-- | Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp | 3 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp | 2 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp | 13 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp | 9 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 12 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h | 1 | ||||
| -rw-r--r-- | Source/api.pri | 2 | ||||
| -rw-r--r-- | Source/widgetsapi.pri | 2 |
15 files changed, 60 insertions, 33 deletions
diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.h b/Source/JavaScriptCore/assembler/ARMAssembler.h index 18b10179c..31d316d0d 100644 --- a/Source/JavaScriptCore/assembler/ARMAssembler.h +++ b/Source/JavaScriptCore/assembler/ARMAssembler.h @@ -163,8 +163,8 @@ namespace JSC { VMOV_VFP32 = 0x0e000a10, VMOV_ARM32 = 0x0e100a10, VCVT_F64_S32 = 0x0eb80bc0, - VCVT_S32_F64 = 0x0ebd0b40, - VCVT_U32_F64 = 0x0ebc0b40, + VCVT_S32_F64 = 0x0ebd0bc0, + VCVT_U32_F64 = 0x0ebc0bc0, VCVT_F32_F64 = 0x0eb70bc0, VCVT_F64_F32 = 0x0eb70ac0, VMRS_APSR = 0x0ef1fa10, diff --git a/Source/JavaScriptCore/disassembler/udis86/itab.py b/Source/JavaScriptCore/disassembler/udis86/itab.py index 07e20a6e1..3d50ad061 100644 --- a/Source/JavaScriptCore/disassembler/udis86/itab.py +++ b/Source/JavaScriptCore/disassembler/udis86/itab.py @@ -268,13 +268,13 @@ class UdItabGenerator( ud_opcode.UdOpcodeTables ): opr = e[ 'operands' ] for i in range(len(opr)): if not (opr[i] in self.OperandDict.keys()): - print "error: invalid operand declaration: %s\n" % opr[i] + print("error: invalid operand declaration: %s\n" % opr[i]) opr_c[i] = "O_" + opr[i] opr = "%s %s %s" % (opr_c[0] + ",", opr_c[1] + ",", opr_c[2]) for p in e['prefixes']: if not ( p in self.PrefixDict.keys() ): - print "error: invalid prefix specification: %s \n" % pfx + print("error: invalid prefix specification: %s \n" % pfx) pfx_c.append( self.PrefixDict[p] ) if len(e['prefixes']) == 0: pfx_c.append( "P_none" ) diff --git a/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py b/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py index f301b5246..f82738062 100644 --- a/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py +++ b/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py @@ -218,17 +218,17 @@ class UdOpcodeTables: self.parse(self.OpcodeTable0, insn) def print_table( self, table, pfxs ): - print "%s |" % pfxs + print("%s |" % pfxs) keys = table[ 'entries' ].keys() if ( len( keys ) ): keys.sort() for idx in keys: e = table[ 'entries' ][ idx ] if e[ 'type' ] == 'insn': - print "%s |-<%s>" % ( pfxs, idx ), - print "%s %s" % ( e[ 'mnemonic' ], ' '.join( e[ 'operands'] ) ) + print("%s |-<%s>" % ( pfxs, idx )), + print("%s %s" % ( e[ 'mnemonic' ], ' '.join( e[ 'operands'] ))) else: - print "%s |-<%s> %s" % ( pfxs, idx, e['type'] ) + print("%s |-<%s> %s" % ( pfxs, idx, e['type'] )) self.print_table( e, pfxs + ' |' ) def print_tree( self ): diff --git a/Source/JavaScriptCore/disassembler/udis86/ud_optable.py b/Source/JavaScriptCore/disassembler/udis86/ud_optable.py index 5b5c55d3b..0350643fd 100644 --- a/Source/JavaScriptCore/disassembler/udis86/ud_optable.py +++ b/Source/JavaScriptCore/disassembler/udis86/ud_optable.py @@ -50,7 +50,7 @@ class UdOptableXmlParser: elif def_node.localName == 'vendor': ven = ( def_node.firstChild.data ); else: - print "warning: invalid node - %s" % def_node.localName + print("warning: invalid node - %s" % def_node.localName) continue return ( pfx, opc, opr, ven ) @@ -65,7 +65,7 @@ class UdOptableXmlParser: if not insnNode.localName: continue if insnNode.localName != "instruction": - print "warning: invalid insn node - %s" % insnNode.localName + print("warning: invalid insn node - %s" % insnNode.localName) continue mnemonic = insnNode.getElementsByTagName( 'mnemonic' )[ 0 ].firstChild.data @@ -84,11 +84,11 @@ class UdOptableXmlParser: def printFn( pfx, mnm, opc, opr, ven ): - print 'def: ', + print('def: '), if len( pfx ): - print ' '.join( pfx ), - print "%s %s %s %s" % \ - ( mnm, ' '.join( opc ), ' '.join( opr ), ven ) + print(' '.join( pfx )), + print("%s %s %s %s" % \ + ( mnm, ' '.join( opc ), ' '.join( opr ), ven )) def parse( xml, callback ): diff --git a/Source/WebCore/platform/graphics/FontFastPath.cpp b/Source/WebCore/platform/graphics/FontFastPath.cpp index 22ce7f57e..d1553ea3f 100644 --- a/Source/WebCore/platform/graphics/FontFastPath.cpp +++ b/Source/WebCore/platform/graphics/FontFastPath.cpp @@ -335,13 +335,13 @@ float Font::getGlyphsAndAdvancesForSimpleText(const TextRun& run, int from, int float totalWidth = it.m_runWidthSoFar; float beforeWidth = 0; int glyphPos = 0; - for (; glyphPos < localGlyphBuffer.size() && it.m_characterIndex[glyphPos] < from; ++glyphPos) + for (; glyphPos < localGlyphBuffer.size() && it.m_characterIndexOfGlyph[glyphPos] < from; ++glyphPos) beforeWidth += localGlyphBuffer.advanceAt(glyphPos); int glyphFrom = glyphPos; float afterWidth = totalWidth; glyphPos = localGlyphBuffer.size() - 1; - for (; glyphPos >= glyphFrom && it.m_characterIndex[glyphPos] >= to; --glyphPos) + for (; glyphPos >= glyphFrom && it.m_characterIndexOfGlyph[glyphPos] >= to; --glyphPos) afterWidth -= localGlyphBuffer.advanceAt(glyphPos); int glyphTo = glyphPos + 1; @@ -494,13 +494,13 @@ FloatRect Font::selectionRectForSimpleText(const TextRun& run, const FloatPoint& float totalWidth = it.m_runWidthSoFar; float beforeWidth = 0; int glyphPos = 0; - for (; glyphPos < glyphBuffer.size() && it.m_characterIndex[glyphPos] < from; ++glyphPos) + for (; glyphPos < glyphBuffer.size() && it.m_characterIndexOfGlyph[glyphPos] < from; ++glyphPos) beforeWidth += glyphBuffer.advanceAt(glyphPos); int glyphFrom = glyphPos; float afterWidth = totalWidth; glyphPos = glyphBuffer.size() - 1; - for (; glyphPos >= glyphFrom && it.m_characterIndex[glyphPos] >= to; --glyphPos) + for (; glyphPos >= glyphFrom && it.m_characterIndexOfGlyph[glyphPos] >= to; --glyphPos) afterWidth -= glyphBuffer.advanceAt(glyphPos); // Using roundf() rather than ceilf() for the right edge as a compromise to ensure correct caret positioning. @@ -525,7 +525,7 @@ int Font::offsetForPositionForSimpleText(const TextRun& run, float x, bool inclu characterOffset = run.length(); break; } - characterOffset = it.m_characterIndex[glyphPosition]; + characterOffset = it.m_characterIndexOfGlyph[glyphPosition]; float glyphWidth = glyphBuffer.advanceAt(glyphPosition); if (includePartialGlyphs) { if (currentX - glyphWidth / 2.0f <= x) @@ -543,7 +543,7 @@ int Font::offsetForPositionForSimpleText(const TextRun& run, float x, bool inclu characterOffset = run.length(); break; } - characterOffset = it.m_characterIndex[glyphPosition]; + characterOffset = it.m_characterIndexOfGlyph[glyphPosition]; float glyphWidth = glyphBuffer.advanceAt(glyphPosition); if (includePartialGlyphs) { if (currentX + glyphWidth / 2.0f >= x) diff --git a/Source/WebCore/platform/graphics/WidthIterator.cpp b/Source/WebCore/platform/graphics/WidthIterator.cpp index 1fb1d9b40..7a1698d19 100644 --- a/Source/WebCore/platform/graphics/WidthIterator.cpp +++ b/Source/WebCore/platform/graphics/WidthIterator.cpp @@ -67,6 +67,8 @@ WidthIterator::WidthIterator(const Font* font, const TextRun& run, HashSet<const else m_expansionPerOpportunity = m_expansion / expansionOpportunityCount; } + // Character-index will end up the same or slightly shorter than m_run, so if we reserve that much it will never need to resize. + m_characterIndexOfGlyph.reserveInitialCapacity(m_run.length()); } GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength) @@ -226,7 +228,7 @@ inline unsigned WidthIterator::advanceInternal(TextIterator& textIterator, Glyph if (glyphBuffer) { if (glyphBuffer->isEmpty()) { glyphBuffer->add(fontData->spaceGlyph(), fontData, expansionAtThisOpportunity); - m_characterIndex.append(currentCharacterIndex); + m_characterIndexOfGlyph.append(currentCharacterIndex); } else glyphBuffer->expandLastAdvance(expansionAtThisOpportunity); } @@ -295,7 +297,7 @@ inline unsigned WidthIterator::advanceInternal(TextIterator& textIterator, Glyph if (glyphBuffer) { glyphBuffer->add(glyph, fontData, (rtl ? oldWidth + lastRoundingWidth : width)); - m_characterIndex.append(currentCharacterIndex); + m_characterIndexOfGlyph.append(currentCharacterIndex); } lastRoundingWidth = width - oldWidth; diff --git a/Source/WebCore/platform/graphics/WidthIterator.h b/Source/WebCore/platform/graphics/WidthIterator.h index 43007e80d..8aa26782c 100644 --- a/Source/WebCore/platform/graphics/WidthIterator.h +++ b/Source/WebCore/platform/graphics/WidthIterator.h @@ -82,7 +82,8 @@ public: float m_expansionPerOpportunity; bool m_isAfterExpansion; float m_finalRoundingWidth; - Vector<int> m_characterIndex; + // An inline capacity of 10 catches around 2/3 of the cases. To catch 90% we would need 32. + Vector<int, 10> m_characterIndexOfGlyph; #if ENABLE(SVG_FONTS) String m_lastGlyphName; diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp index d2a10aa66..40243335b 100644 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp @@ -400,6 +400,9 @@ void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* g m_size = graphicsLayer->size(); + if ((changeMask & DrawsContentChange) && graphicsLayer->drawsContent()) + graphicsLayer->setNeedsDisplay(); + if (changeMask & MaskLayerChange) { if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->maskLayer())) layer->m_effectTarget = this; diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index 78c36f2b9..b04c6d522 100644 --- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -475,7 +475,7 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event) if (kevent->altKey()) shouldInsertText = true; } else { -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC // We need to exclude checking for Alt because it is just a different Shift if (!kevent->altKey()) #endif diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp index 595d758b4..baf5d5d00 100644 --- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp +++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp @@ -634,19 +634,20 @@ bool QWebFrameAdapter::renderFromTiledBackingStore(QPainter* painter, const QReg int scrollX = view->scrollX(); int scrollY = view->scrollY(); - context.translate(-scrollX, -scrollY); + QRect frameRect = view->frameRect(); for (int i = 0; i < vector.size(); ++i) { const QRect& clipRect = vector.at(i); - painter->save(); - - QRect rect = clipRect.translated(scrollX, scrollY); - painter->setClipRect(rect, Qt::IntersectClip); + context.save(); + QRect rect = clipRect.intersected(frameRect); + context.translate(-scrollX, -scrollY); + rect.translate(scrollX, scrollY); + context.clip(rect); frame->tiledBackingStore()->paint(&context, rect); - painter->restore(); + context.restore(); } #if USE(ACCELERATED_COMPOSITING) diff --git a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp index 4442bafff..8b4748bd0 100644 --- a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp @@ -103,7 +103,14 @@ void TextureMapperLayerClientQt::renderCompositedLayers(GraphicsContext* context return; m_textureMapper->setGraphicsContext(context); - m_textureMapper->setImageInterpolationQuality(context->imageInterpolationQuality()); + // GraphicsContext::imageInterpolationQuality is always InterpolationDefault here, + // but 'default' may be interpreted differently due to a different backend QPainter, + // so we need to set an explicit imageInterpolationQuality. + if (context->platformContext()->renderHints() & QPainter::SmoothPixmapTransform) + m_textureMapper->setImageInterpolationQuality(WebCore::InterpolationMedium); + else + m_textureMapper->setImageInterpolationQuality(WebCore::InterpolationNone); + m_textureMapper->setTextDrawingMode(context->textDrawingMode()); QPainter* painter = context->platformContext(); const QTransform transform = painter->worldTransform(); diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index 053987b3e..2806ce5d5 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -498,6 +498,7 @@ void QQuickWebViewPrivate::didRelaunchProcess() updateViewportSize(); updateUserScripts(); + updateSchemeDelegates(); emit q->experimental()->didRelaunchProcess(); } @@ -796,6 +797,17 @@ void QQuickWebViewPrivate::updateUserScripts() webPageProxy->setUserScripts(scripts); } +void QQuickWebViewPrivate::updateSchemeDelegates() +{ + webPageProxy->registerApplicationScheme(ASCIILiteral("qrc")); + + QQmlListProperty<QQuickUrlSchemeDelegate> schemes = experimental->schemeDelegates(); + for (int i = 0, numSchemes = experimental->schemeDelegates_Count(&schemes); i < numSchemes; ++i) { + QQuickUrlSchemeDelegate* scheme = experimental->schemeDelegates_At(&schemes, i); + webPageProxy->registerApplicationScheme(scheme->scheme()); + } +} + QPointF QQuickWebViewPrivate::contentPos() const { Q_Q(const QQuickWebView); diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h index 2a46d5cdc..19ace9a3a 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h @@ -121,6 +121,7 @@ public: bool transparentBackground() const; void setNavigatorQtObjectEnabled(bool); void updateUserScripts(); + void updateSchemeDelegates(); QPointF contentPos() const; void setContentPos(const QPointF&); diff --git a/Source/api.pri b/Source/api.pri index 628a49ba1..61fcba101 100644 --- a/Source/api.pri +++ b/Source/api.pri @@ -68,7 +68,7 @@ BASE_TARGET = $$TARGET load(qt_module) # Make sure the install_name of the QtWebKit library point to webkit -force_independent:macx { +!production_build:force_independent:macx { # We do our own absolute path so that we can trick qmake into # using the webkit build path instead of the Qt install path. CONFIG -= absolute_library_soname diff --git a/Source/widgetsapi.pri b/Source/widgetsapi.pri index 9504d91f2..86693da88 100644 --- a/Source/widgetsapi.pri +++ b/Source/widgetsapi.pri @@ -70,7 +70,7 @@ BASE_TARGET = $$TARGET load(qt_module) # Make sure the install_name of the QtWebKit library point to webkit -force_independent:macx { +!production_build:force_independent:macx { # We do our own absolute path so that we can trick qmake into # using the webkit build path instead of the Qt install path. CONFIG -= absolute_library_soname |
