[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
yael.aharon at nokia.com
yael.aharon at nokia.com
Wed Dec 22 18:02:17 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2de0c8210492716372c63dfb3558451e31d885f1
Author: yael.aharon at nokia.com <yael.aharon at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 6 14:33:39 2010 +0000
[Qt] Fix focus ring outline color support
https://bugs.webkit.org/show_bug.cgi?id=50325
Reviewed by Andreas Kling.
WebCore:
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::drawFocusRing):
Take the outline width into account when drawing the focus ring of image map.
Change the outline-style from dotted to solid. The default outline-width is
5 pixels, and dotted lines just don't make sense anymore.
Give the focus ring alpha of 50%, following what other ports do.
Save and restore the pen when drawing a focus ring.
LayoutTests:
* platform/qt/Skipped:
* platform/qt/fast/images/imagemap-focus-ring-expected.checksum:
* platform/qt/fast/images/imagemap-focus-ring-expected.png:
* platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.checksum: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.txt: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Added.
* platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt: Added.
* platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum:
* platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a107347..76558bc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,27 @@
2010-12-06 Yael Aharon <yael.aharon at nokia.com>
+ Reviewed by Andreas Kling.
+
+ [Qt] Fix focus ring outline color support
+ https://bugs.webkit.org/show_bug.cgi?id=50325
+
+ * platform/qt/Skipped:
+ * platform/qt/fast/images/imagemap-focus-ring-expected.checksum:
+ * platform/qt/fast/images/imagemap-focus-ring-expected.png:
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.checksum: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.txt: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt: Added.
+ * platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum:
+ * platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png:
+
+2010-12-06 Yael Aharon <yael.aharon at nokia.com>
+
Unreviewed.
Added a proper mime-type to images.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index c4b50ef..88a5c18 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5361,8 +5361,4 @@ plugins/keyboard-events.html
editing/selection/click-left-of-rtl-wrapping-text.html
editing/selection/modify-up-on-rtl-wrapping-text.html
-# [Qt] Add focus ring outline color support
-# https://bugs.webkit.org/show_bug.cgi?id=50325
-fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html
-fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html
-fast/images/imagemap-focus-ring-outline-color.html
+
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.checksum b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.checksum
index 7cc785e..5036c74 100644
--- a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.checksum
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.checksum
@@ -1 +1 @@
-8dde1dc86444be23b879a85cc6c9fa39
\ No newline at end of file
+e2fe57150bb99e49cd36bf4c98304cb8
\ No newline at end of file
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.png b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.png
index 9534b52..d1ae970 100644
Binary files a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.png and b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.png differ
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.checksum b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.checksum
new file mode 100644
index 0000000..b413d2d
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.checksum
@@ -0,0 +1 @@
+4a7383a52d5acf8c1b802a751e117f31
\ No newline at end of file
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png
new file mode 100644
index 0000000..2a9486a
Binary files /dev/null and b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png differ
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.txt b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.txt
new file mode 100644
index 0000000..bbace36
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.txt
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x42
+ RenderText {#text} at (0,0) size 777x42
+ text run at (0,0) width 777: "Assuming the port-specific theme draws focus rings, this test can be used to ensure that a focus ring is drawn for an"
+ text run at (0,21) width 741: "<area>. This test PASSED if a green-colored focus ring is drawn around the <area> in the imagemap (below)."
+ RenderBlock (anonymous) at (0,58) size 784x128
+ RenderInline {MAP} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderImage {IMG} at (0,0) size 128x128
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum
new file mode 100644
index 0000000..d7a8ae9
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum
@@ -0,0 +1 @@
+28e63594571b745939cf0c2c442b09f8
\ No newline at end of file
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png
new file mode 100644
index 0000000..3c9bf6c
Binary files /dev/null and b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png differ
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt
new file mode 100644
index 0000000..48d2fab
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x63
+ RenderText {#text} at (0,0) size 781x63
+ text run at (0,0) width 765: "Assuming the port-specific theme draws focus rings, this test can be used to ensure that the focus ring color for an"
+ text run at (0,21) width 781: "<area> can be explicitly inherited from <map>. This test PASSED if a green-colored focus ring is drawn around the"
+ text run at (0,42) width 222: "<area> in the imagemap (below)."
+ RenderBlock (anonymous) at (0,79) size 784x128
+ RenderInline {MAP} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderImage {IMG} at (0,0) size 128x128
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum
new file mode 100644
index 0000000..6604fb2
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum
@@ -0,0 +1 @@
+b8abcefc292d94798ddfd8fd6ac06a54
\ No newline at end of file
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png
new file mode 100644
index 0000000..3325c6b
Binary files /dev/null and b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png differ
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt
new file mode 100644
index 0000000..847698b
--- /dev/null
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x63
+ RenderText {#text} at (0,0) size 760x42
+ text run at (0,0) width 760: "Assuming the port-specific theme draws focus rings, this test can be used to ensure that the focus ring color is not"
+ text run at (0,21) width 289: "inherited for an <area> (by default) as per "
+ RenderInline {A} at (0,0) size 754x42 [color=#0000EE]
+ RenderText {#text} at (289,21) size 754x42
+ text run at (289,21) width 465: "section 18.4 \"Dynamic outlines: the 'outline' property\" of the CSS2.1"
+ text run at (0,42) width 29: "spec"
+ RenderText {#text} at (29,42) size 677x21
+ text run at (29,42) width 677: ". This test FAILED if a red-colored focus ring is drawn around the <area> in the imagemap (below)."
+ RenderBlock (anonymous) at (0,79) size 784x128
+ RenderInline {MAP} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderImage {IMG} at (0,0) size 128x128
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum
index a5802e5..3631a57 100644
--- a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum
+++ b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum
@@ -1 +1 @@
-95ccced13128f484b3a38893a972c659
\ No newline at end of file
+6ffbc1a891bb5332fc893e5d96df73ff
\ No newline at end of file
diff --git a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png
index 1d4ed58..dd5bf2f 100644
Binary files a/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png and b/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d645d63..f9a7fed 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-06 Yael Aharon <yael.aharon at nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Fix focus ring outline color support
+ https://bugs.webkit.org/show_bug.cgi?id=50325
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawFocusRing):
+
+ Take the outline width into account when drawing the focus ring of image map.
+ Change the outline-style from dotted to solid. The default outline-width is
+ 5 pixels, and dotted lines just don't make sense anymore.
+ Give the focus ring alpha of 50%, following what other ports do.
+ Save and restore the pen when drawing a focus ring.
+
2010-12-06 Andras Becsi <abecsi at webkit.org>
Reviewed by Csaba Osztrogonác.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index bbbcedb..b986e0f 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -832,15 +832,18 @@ void GraphicsContext::drawFocusRing(const Path& path, int width, int offset, con
const bool antiAlias = p->testRenderHint(QPainter::Antialiasing);
p->setRenderHint(QPainter::Antialiasing, m_data->antiAliasingForRectsAndLines);
+ const QPen oldPen = p->pen();
const QBrush oldBrush = p->brush();
QPen nPen = p->pen();
- nPen.setColor(color);
+ nPen.setColor(QColor(color.red(), color.green(), color.blue(), 127));
+ nPen.setWidth(width);
p->setBrush(Qt::NoBrush);
- nPen.setStyle(Qt::DotLine);
+ nPen.setStyle(Qt::SolidLine);
p->strokePath(path.platformPath(), nPen);
p->setBrush(oldBrush);
+ p->setPen(oldPen);
p->setRenderHint(QPainter::Antialiasing, antiAlias);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list