Changeset 194955 in webkit


Ignore:
Timestamp:
Jan 12, 2016 10:47:10 PM (8 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Fix return value of some paint methods in RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153015

Reviewed by Michael Catanzaro.

The bool value returned by paint methods in RenderTheme means
whether the appearance is supported or not, so we should return
true when not supported (so we didn't paint anything) and false
when supported (so we actually painted the theme part).

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::RenderThemeGtk::paintMediaButton):
(WebCore::RenderThemeGtk::paintMediaMuteButton):
(WebCore::RenderThemeGtk::paintMediaPlayButton):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Deleted.

  • rendering/RenderThemeGtk.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r194952 r194955  
     12016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Fix return value of some paint methods in RenderThemeGtk
     4        https://bugs.webkit.org/show_bug.cgi?id=153015
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        The bool value returned by paint methods in RenderTheme means
     9        whether the appearance is supported or not, so we should return
     10        true when not supported (so we didn't paint anything) and false
     11        when supported (so we actually painted the theme part).
     12
     13        * rendering/RenderThemeGtk.cpp:
     14        (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
     15        (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
     16        (WebCore::RenderThemeGtk::paintMediaButton):
     17        (WebCore::RenderThemeGtk::paintMediaMuteButton):
     18        (WebCore::RenderThemeGtk::paintMediaPlayButton):
     19        (WebCore::RenderThemeGtk::paintMediaSliderTrack):
     20        (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Deleted.
     21        * rendering/RenderThemeGtk.h:
     22
    1232016-01-12  Andy Estes  <aestes@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderThemeGtk.cpp

    r194847 r194955  
    10081008    IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect);
    10091009    if (iconRect.isEmpty())
    1010         return false;
    1011 
    1012     return paintEntryIcon(EntryIconLeft, "edit-find-symbolic", paintInfo.context(), iconRect, gtkTextDirection(renderObject.style().direction()),
     1010        return true;
     1011
     1012    return !paintEntryIcon(EntryIconLeft, "edit-find-symbolic", paintInfo.context(), iconRect, gtkTextDirection(renderObject.style().direction()),
    10131013        gtkIconStateFlags(this, renderObject));
    10141014}
     
    10231023    IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect);
    10241024    if (iconRect.isEmpty())
    1025         return false;
    1026 
    1027     return paintEntryIcon(EntryIconRight, "edit-clear-symbolic", paintInfo.context(), iconRect, gtkTextDirection(renderObject.style().direction()),
     1025        return true;
     1026
     1027    return !paintEntryIcon(EntryIconRight, "edit-clear-symbolic", paintInfo.context(), iconRect, gtkTextDirection(renderObject.style().direction()),
    10281028        gtkIconStateFlags(this, renderObject));
    10291029}
     
    13831383    static const unsigned mediaIconSize = 16;
    13841384    IntRect iconRect(rect.x() + (rect.width() - mediaIconSize) / 2, rect.y() + (rect.height() - mediaIconSize) / 2, mediaIconSize, mediaIconSize);
    1385     return paintIcon(context.get(), graphicsContext, iconRect, iconName);
     1385    return !paintIcon(context.get(), graphicsContext, iconRect, iconName);
    13861386}
    13871387
     
    14001400    Node* node = renderObject.node();
    14011401    if (!node)
    1402         return false;
     1402        return true;
    14031403    Node* mediaNode = node->shadowHost();
    14041404    if (!is<HTMLMediaElement>(mediaNode))
    1405         return false;
     1405        return true;
    14061406
    14071407    HTMLMediaElement* mediaElement = downcast<HTMLMediaElement>(mediaNode);
     
    14131413    Node* node = renderObject.node();
    14141414    if (!node)
    1415         return false;
    1416 
     1415        return true;
    14171416    if (!nodeHasPseudo(node, "-webkit-media-controls-play-button"))
    1418         return false;
     1417        return true;
    14191418
    14201419    return paintMediaButton(renderObject, paintInfo.context(), rect, nodeHasClass(node, "paused") ? "media-playback-start-symbolic" : "media-playback-pause-symbolic");
     
    14511450    HTMLMediaElement* mediaElement = parentMediaElement(o);
    14521451    if (!mediaElement)
    1453         return false;
     1452        return true;
    14541453
    14551454    GraphicsContext& context = paintInfo.context();
     
    14871486}
    14881487
    1489 bool RenderThemeGtk::paintMediaVolumeSliderContainer(const RenderObject&, const PaintInfo&, const IntRect&)
    1490 {
    1491     return true;
    1492 }
    1493 
    14941488bool RenderThemeGtk::paintMediaVolumeSliderTrack(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
    14951489{
  • trunk/Source/WebCore/rendering/RenderThemeGtk.h

    r194847 r194955  
    163163    virtual bool paintMediaSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
    164164    virtual bool paintMediaSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
    165     virtual bool paintMediaVolumeSliderContainer(const RenderObject&, const PaintInfo&, const IntRect&) override;
    166165    virtual bool paintMediaVolumeSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
    167166    virtual bool paintMediaVolumeSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
Note: See TracChangeset for help on using the changeset viewer.