Changeset 180455 in webkit


Ignore:
Timestamp:
Feb 20, 2015, 2:24:31 PM (11 years ago)
Author:
timothy_horton@apple.com
Message:

<attachment> turns the wrong blue when you highlight it
https://bugs.webkit.org/show_bug.cgi?id=141853

Reviewed by Simon Fraser.

  • rendering/RenderAttachment.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::shouldDrawSelectionTint):
(WebCore::RenderReplaced::paint):

  • rendering/RenderReplaced.h:

Don't draw the selection tint for RenderAttachment.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r180454 r180455  
     12015-02-20  Tim Horton  <timothy_horton@apple.com>
     2
     3        <attachment> turns the wrong blue when you highlight it
     4        https://bugs.webkit.org/show_bug.cgi?id=141853
     5
     6        Reviewed by Simon Fraser.
     7
     8        * rendering/RenderAttachment.h:
     9        * rendering/RenderReplaced.cpp:
     10        (WebCore::RenderReplaced::shouldDrawSelectionTint):
     11        (WebCore::RenderReplaced::paint):
     12        * rendering/RenderReplaced.h:
     13        Don't draw the selection tint for RenderAttachment.
     14
    1152015-02-20  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderAttachment.h

    r180454 r180455  
    4848    virtual const char* renderName() const override { return "RenderAttachment"; }
    4949    virtual void paintReplaced(PaintInfo&, const LayoutPoint&) override;
     50
     51    virtual bool shouldDrawSelectionTint() const override { return false; }
    5052};
    5153
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r179488 r180455  
    131131}
    132132
     133bool RenderReplaced::shouldDrawSelectionTint() const
     134{
     135    return selectionState() != SelectionNone && !document().printing();
     136}
     137
    133138void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    134139{
     
    156161        return;
    157162   
    158     bool drawSelectionTint = selectionState() != SelectionNone && !document().printing();
     163    bool drawSelectionTint = shouldDrawSelectionTint();
    159164    if (paintInfo.phase == PaintPhaseSelection) {
    160165        if (selectionState() == SelectionNone)
  • trunk/Source/WebCore/rendering/RenderReplaced.h

    r177259 r180455  
    8787    void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constrainedSize, double& intrinsicRatio) const;
    8888
     89    virtual bool shouldDrawSelectionTint() const;
     90
    8991    mutable LayoutSize m_intrinsicSize;
    9092};
Note: See TracChangeset for help on using the changeset viewer.