diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-11-17 14:57:39 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2014-11-18 16:27:44 +0100 |
commit | e54a6126cef33a2345127ddee6f633ac57f63b5e (patch) | |
tree | 0efb37289e16e6674f123fa33572316a7b40ed56 | |
parent | c5a9155fa0da2da1918e7419881eb472f408f9dc (diff) | |
download | qtwebkit-e54a6126cef33a2345127ddee6f633ac57f63b5e.tar.gz |
Don't fill with invalid fill color
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>
-rw-r--r-- | Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index da02416d5..4cbf17a24 100644 --- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -660,6 +660,9 @@ void GraphicsContext::fillPath(const Path& path) if (paintingDisabled()) return; + if (!(m_state.fillPattern || m_state.fillGradient || m_state.fillColor.isValid())) + return; + QPainter* p = m_data->p(); QPainterPath platformPath = path.platformPath(); platformPath.setFillRule(toQtFillRule(fillRule())); @@ -824,6 +827,9 @@ void GraphicsContext::fillRect(const FloatRect& rect) if (paintingDisabled()) return; + if (!(m_state.fillPattern || m_state.fillGradient || m_state.fillColor.isValid())) + return; + QPainter* p = m_data->p(); QRectF normalizedRect = rect.normalized(); |