[Webkit-unassigned] [Bug 110940] CSS border property does not work on area element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 27 11:15:55 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=110940





--- Comment #8 from Arunprasad <ararunprasad at gmail.com>  2013-02-27 11:18:19 PST ---
Created an attachment (id=190559)
 --> (https://bugs.webkit.org/attachment.cgi?id=190559&action=review)
screen shot of all major browser's rendering when using "outline" property on image map

>>1) Can any CSS properties be applied to an image map area?

Tried with outline property as like below,
:focus { 
    outline-width: 10px;
    outline-color: green;
    outline-style: solid;
}

None of the browsers rendering properly for image map(<area> element) except QtWebKit(I did some change in GraphicsContextQt.cpp).

I majorly use QtWebKit for my work. Actually Qt WebKit GraphicsContext implementation for focus-ring drawing never considers the width(considers only color). I modified as like below, it shows something like attached(Refer qt_launcher_nightly_r143840.png).

Index: platform/graphics/qt/GraphicsContextQt.cpp
===================================================================
--- platform/graphics/qt/GraphicsContextQt.cpp    (revision 143841)
+++ platform/graphics/qt/GraphicsContextQt.cpp    (working copy)
@@ -913,7 +913,7 @@
     p->setClipPath(platformPath, Qt::IntersectClip);
 }

-void drawFocusRingForPath(QPainter* p, const QPainterPath& path, const Color& color, bool antiAliasing)
+void drawFocusRingForPath(QPainter* p, const QPainterPath& path, const Color& color, bool antiAliasing, int width = 0)
 {
     const bool antiAlias = p->testRenderHint(QPainter::Antialiasing);
     p->setRenderHint(QPainter::Antialiasing, antiAliasing);
@@ -924,6 +924,9 @@
     QPen nPen = p->pen();
     nPen.setColor(color);
     p->setBrush(Qt::NoBrush);
+    if (width)
+        nPen.setWidth(width);
+
     nPen.setStyle(Qt::DotLine);

     p->strokePath(path, nPen);
@@ -933,14 +936,14 @@
     p->setRenderHint(QPainter::Antialiasing, antiAlias);
 }

-void GraphicsContext::drawFocusRing(const Path& path, int /* width */, int offset, const Color& color)
+void GraphicsContext::drawFocusRing(const Path& path, int width, int offset, const Color& color)
 {
     // FIXME: Use 'offset' for something? http://webkit.org/b/49909

     if (paintingDisabled() || !color.isValid())
         return;

-    drawFocusRingForPath(m_data->p(), path.platformPath(), color, m_data->antiAliasingForRectsAndLines);
+    drawFocusRingForPath(m_data->p(), path.platformPath(), color, m_data->antiAliasingForRectsAndLines, width);
 }

 /**

So what is the expected behavior?. I'm in confusion now :( Since I use Linux I can't take Safari's screen-shot? How does it renders?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list