Changeset 73361 in webkit


Ignore:
Timestamp:
Dec 6, 2010 6:33:39 AM (13 years ago)
Author:
yael.aharon@nokia.com
Message:

[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:
Location:
trunk
Files:
9 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73360 r73361  
     12010-12-06  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Fix focus ring outline color support
     6        https://bugs.webkit.org/show_bug.cgi?id=50325
     7
     8        * platform/qt/Skipped:
     9        * platform/qt/fast/images/imagemap-focus-ring-expected.checksum:
     10        * platform/qt/fast/images/imagemap-focus-ring-expected.png:
     11        * platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.checksum: Added.
     12        * platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png: Added.
     13        * platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.txt: Added.
     14        * platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum: Added.
     15        * platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Added.
     16        * platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt: Added.
     17        * platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum: Added.
     18        * platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Added.
     19        * platform/qt/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt: Added.
     20        * platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum:
     21        * platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png:
     22
    1232010-12-06  Yael Aharon  <yael.aharon@nokia.com>
    224
  • trunk/LayoutTests/platform/qt/Skipped

    r73341 r73361  
    53625362editing/selection/modify-up-on-rtl-wrapping-text.html
    53635363
    5364 # [Qt] Add focus ring outline color support
    5365 # https://bugs.webkit.org/show_bug.cgi?id=50325
    5366 fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html
    5367 fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html
    5368 fast/images/imagemap-focus-ring-outline-color.html
     5364
  • trunk/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-expected.checksum

    r72371 r73361  
    1 8dde1dc86444be23b879a85cc6c9fa39
     1e2fe57150bb99e49cd36bf4c98304cb8
  • trunk/LayoutTests/platform/qt/fast/images/imagemap-focus-ring-zoom-expected.checksum

    r72523 r73361  
    1 95ccced13128f484b3a38893a972c659
     16ffbc1a891bb5332fc893e5d96df73ff
  • trunk/WebCore/ChangeLog

    r73358 r73361  
     12010-12-06  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Fix focus ring outline color support
     6        https://bugs.webkit.org/show_bug.cgi?id=50325
     7
     8        * platform/graphics/qt/GraphicsContextQt.cpp:
     9        (WebCore::GraphicsContext::drawFocusRing):
     10
     11        Take the outline width into account when drawing the focus ring of image map.
     12        Change the outline-style from dotted to solid. The default outline-width is
     13        5 pixels, and dotted lines just don't make sense anymore.
     14        Give the focus ring alpha of 50%, following what other ports do.
     15        Save and restore the pen when drawing a focus ring.
     16
    1172010-12-06  Andras Becsi  <abecsi@webkit.org>
    218
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r73125 r73361  
    833833    p->setRenderHint(QPainter::Antialiasing, m_data->antiAliasingForRectsAndLines);
    834834
     835    const QPen oldPen = p->pen();
    835836    const QBrush oldBrush = p->brush();
    836837
    837838    QPen nPen = p->pen();
    838     nPen.setColor(color);
     839    nPen.setColor(QColor(color.red(), color.green(), color.blue(), 127));
     840    nPen.setWidth(width);
    839841    p->setBrush(Qt::NoBrush);
    840     nPen.setStyle(Qt::DotLine);
     842    nPen.setStyle(Qt::SolidLine);
    841843
    842844    p->strokePath(path.platformPath(), nPen);
    843845    p->setBrush(oldBrush);
     846    p->setPen(oldPen);
    844847
    845848    p->setRenderHint(QPainter::Antialiasing, antiAlias);
Note: See TracChangeset for help on using the changeset viewer.