diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2018-01-07 19:43:21 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2018-01-07 17:08:48 +0000 |
commit | cb895f50d5c08976c0f5ecbb82e6bd19d9ea090d (patch) | |
tree | fd8632d48c2ee72747feaa0e2b458d591e254288 /Source/WebCore | |
parent | 8cab1238d6ea14fa6a61ed4e0c5d39ccd0736ec2 (diff) | |
download | qtwebkit-cb895f50d5c08976c0f5ecbb82e6bd19d9ea090d.tar.gz |
Import WebKit commit 69d327017a8d700cbfc7e1120270db4d55416f41
Change-Id: I38406c67ba681f7693a45b0fa2d8c2e44a6d9a0e
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/html/HTMLAnchorElement.cpp | 10 | ||||
-rw-r--r-- | Source/WebCore/page/Performance.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/page/Settings.in | 4 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/GraphicsContext.h | 1 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp | 35 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp | 1 |
7 files changed, 36 insertions, 23 deletions
diff --git a/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp b/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp index 3aed7052f..cb2119b10 100644 --- a/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp +++ b/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp @@ -30,8 +30,7 @@ #include "HTMLCollection.h" #include "HTMLFormElement.h" #include "JSDOMWindowCustom.h" -#include "JSNodeList.h" -#include "StaticNodeList.h" +#include "JSRadioNodeList.h" using namespace JSC; @@ -48,8 +47,7 @@ bool JSHTMLFormElement::nameGetter(ExecState* exec, PropertyName propertyName, J return true; } - // FIXME: HTML5 specifies that this should be a RadioNodeList. - value = toJS(exec, globalObject(), StaticElementList::adopt(namedItems).get()); + value = toJS(exec, globalObject(), wrapped().radioNodeList(propertyNameToAtomicString(propertyName)).get()); return true; } diff --git a/Source/WebCore/html/HTMLAnchorElement.cpp b/Source/WebCore/html/HTMLAnchorElement.cpp index bc100a870..75eb7a2a3 100644 --- a/Source/WebCore/html/HTMLAnchorElement.cpp +++ b/Source/WebCore/html/HTMLAnchorElement.cpp @@ -46,6 +46,7 @@ #include "SecurityOrigin.h" #include "SecurityPolicy.h" #include "Settings.h" +#include "URLUtils.h" #include <wtf/text/StringBuilder.h> namespace WebCore { @@ -76,15 +77,6 @@ HTMLAnchorElement::~HTMLAnchorElement() clearRootEditableElementForSelectionOnMouseDown(); } -// This function does not allow leading spaces before the port number. -static unsigned parsePortFromStringPosition(const String& value, unsigned portStart, unsigned& portEnd) -{ - portEnd = portStart; - while (isASCIIDigit(value[portEnd])) - ++portEnd; - return value.substring(portStart, portEnd - portStart).toUInt(); -} - bool HTMLAnchorElement::supportsFocus() const { if (hasEditableStyle()) diff --git a/Source/WebCore/page/Performance.cpp b/Source/WebCore/page/Performance.cpp index ed39a1d15..1c491da5d 100644 --- a/Source/WebCore/page/Performance.cpp +++ b/Source/WebCore/page/Performance.cpp @@ -233,7 +233,7 @@ void Performance::webkitClearMeasures(const String& measureName) double Performance::now() const { double nowSeconds = monotonicallyIncreasingTime() - m_referenceTime; - const double resolutionSeconds = 0.000005; + const double resolutionSeconds = 0.0001; return 1000.0 * floor(nowSeconds / resolutionSeconds) * resolutionSeconds; } diff --git a/Source/WebCore/page/Settings.in b/Source/WebCore/page/Settings.in index 84a9f0cd0..74d9e0709 100644 --- a/Source/WebCore/page/Settings.in +++ b/Source/WebCore/page/Settings.in @@ -79,7 +79,6 @@ needsSiteSpecificQuirks initial=false domTimersThrottlingEnabled initial=true webArchiveDebugModeEnabled initial=false, conditional=WEB_ARCHIVE localFileContentSniffingEnabled initial=false -offlineStorageDatabaseEnabled initial=false offlineWebApplicationCacheEnabled initial=false enforceCSSMIMETypeInNoQuirksMode initial=true usesEncodingDetector initial=false @@ -91,6 +90,9 @@ acceleratedFiltersEnabled initial=false useLegacyTextAlignPositionedElementBehavior initial=false javaScriptRuntimeFlags type=JSC::RuntimeFlags +# PLATFORM(QT) only +offlineStorageDatabaseEnabled initial=true + # FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files # they can't use by. Leaving enabled for now to not change existing behavior. downloadableBinaryFontsEnabled initial=true diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h index d7f529cf8..8b821fa98 100644 --- a/Source/WebCore/platform/graphics/GraphicsContext.h +++ b/Source/WebCore/platform/graphics/GraphicsContext.h @@ -563,6 +563,7 @@ public: #if PLATFORM(QT) void pushTransparencyLayerInternal(const QRect&, qreal, QPixmap&); + void popTransparencyLayerInternal(); void takeOwnershipOfPlatformContext(); #endif diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 260081946..1e041050e 100644 --- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -358,7 +358,7 @@ void GraphicsContext::restorePlatformState() { if (!m_data->layers.isEmpty() && !m_data->layers.top()->alphaMask.isNull()) if (!--m_data->layers.top()->saveCounter) - endPlatformTransparencyLayer(); + popTransparencyLayerInternal(); m_data->p()->restore(); } @@ -1313,18 +1313,39 @@ void GraphicsContext::beginPlatformTransparencyLayer(float opacity) ++m_data->layerCount; } +void GraphicsContext::popTransparencyLayerInternal() +{ + TransparencyLayer* layer = m_data->layers.pop(); + ASSERT(!layer->alphaMask.isNull()); + ASSERT(layer->saveCounter == 0); + layer->painter.resetTransform(); + layer->painter.setCompositionMode(QPainter::CompositionMode_DestinationIn); + layer->painter.drawPixmap(QPoint(), layer->alphaMask); + layer->painter.end(); + + QPainter* p = m_data->p(); + p->save(); + p->resetTransform(); + p->setOpacity(layer->opacity); + p->drawPixmap(layer->offset, layer->pixmap); + p->restore(); + + delete layer; +} + void GraphicsContext::endPlatformTransparencyLayer() { if (paintingDisabled()) return; + while ( ! m_data->layers.top()->alphaMask.isNull() ){ + --m_data->layers.top()->saveCounter; + popTransparencyLayerInternal(); + if (m_data->layers.isEmpty()) + return; + } TransparencyLayer* layer = m_data->layers.pop(); - if (!layer->alphaMask.isNull()) { - layer->painter.resetTransform(); - layer->painter.setCompositionMode(QPainter::CompositionMode_DestinationIn); - layer->painter.drawPixmap(QPoint(), layer->alphaMask); - } else - --m_data->layerCount; // see the comment for layerCount + --m_data->layerCount; // see the comment for layerCount layer->painter.end(); QPainter* p = m_data->p(); diff --git a/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp index 2295362aa..af798f761 100644 --- a/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp +++ b/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp @@ -34,7 +34,6 @@ #include "IntRect.h" #include "MIMETypeRegistry.h" #include "StillImageQt.h" -#include "TransparencyLayer.h" #include <runtime/JSCInlines.h> #include <runtime/TypedArrayInlines.h> #include <wtf/text/WTFString.h> |