Changeset 201752 in webkit


Ignore:
Timestamp:
Jun 7, 2016 8:03:40 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Video elements are painted twice, in PaintPhaseForeground and PaintPhaseSelfOutline
https://bugs.webkit.org/show_bug.cgi?id=158247

Patch by Fujii Hironori <Fujii Hironori> on 2016-06-07
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/replaced/outline-replaced-elements-offset.html

In <http://trac.webkit.org/changeset/105247>,
RenderReplaced::paint was changed to call
RenderReplaced::paintReplaced in PaintPhaseOutline and
PaintPhaseSelfOutline to paint outline of SVG.

As the result, RenderVideo::paintReplaced paints twice,
in forground and outline phase.

It was changed to paint outline of SVG in PaintPhaseForeground
since <http://trac.webkit.org/changeset/168645>. No need to call
RenderReplaced::paintReplaced in outline phases anymore.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::paint): Return early if
PaintPhaseOutline or PaintPhaseSelfOutline.
Return early unless PaintPhaseForeground nor PaintPhaseSelection,
even if canHaveChildren().

LayoutTests:

  • fast/replaced/outline-replaced-elements-offset-expected.html: Added.
  • fast/replaced/outline-replaced-elements-offset.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r201751 r201752  
     12016-06-07  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Video elements are painted twice, in PaintPhaseForeground and PaintPhaseSelfOutline
     4        https://bugs.webkit.org/show_bug.cgi?id=158247
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/replaced/outline-replaced-elements-offset-expected.html: Added.
     9        * fast/replaced/outline-replaced-elements-offset.html: Added.
     10
    1112016-06-07  Michael Catanzaro  <mcatanzaro@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r201747 r201752  
     12016-06-07  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Video elements are painted twice, in PaintPhaseForeground and PaintPhaseSelfOutline
     4        https://bugs.webkit.org/show_bug.cgi?id=158247
     5
     6        Reviewed by Simon Fraser.
     7
     8        Test: fast/replaced/outline-replaced-elements-offset.html
     9
     10        In <http://trac.webkit.org/changeset/105247>,
     11        RenderReplaced::paint was changed to call
     12        RenderReplaced::paintReplaced in PaintPhaseOutline and
     13        PaintPhaseSelfOutline to paint outline of SVG.
     14
     15        As the result, RenderVideo::paintReplaced paints twice,
     16        in forground and outline phase.
     17
     18        It was changed to paint outline of SVG in PaintPhaseForeground
     19        since <http://trac.webkit.org/changeset/168645>.  No need to call
     20        RenderReplaced::paintReplaced in outline phases anymore.
     21
     22        * rendering/RenderReplaced.cpp:
     23        (WebCore::RenderReplaced::paint): Return early if
     24        PaintPhaseOutline or PaintPhaseSelfOutline.
     25        Return early unless PaintPhaseForeground nor PaintPhaseSelection,
     26        even if canHaveChildren().
     27
    1282016-06-07  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
    229
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r201040 r201752  
    155155
    156156    LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size());
    157     if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style().outlineWidth())
    158         paintOutline(paintInfo, paintRect);
    159    
    160     if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && !canHaveChildren())
     157    if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) {
     158        if (style().outlineWidth())
     159            paintOutline(paintInfo, paintRect);
     160        return;
     161    }
     162
     163    if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
    161164        return;
    162165   
Note: See TracChangeset for help on using the changeset viewer.