Changeset 109867 in webkit


Ignore:
Timestamp:
Mar 5, 2012 11:31:45 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Element not fully repainted after application and removal of transform
https://bugs.webkit.org/show_bug.cgi?id=61338

Source/WebCore:

Patch by Kishore Bolisetty <kbolisetty@innominds.com> on 2012-03-05
Reviewed by Simon Fraser.
RenderLayer is created and removed when a transform is applied and removed to element.
To render the element properly after removal of transform on it, preferred widths and dimensions of
the element and its containing block needs to be recalculated.

Test: fast/repaint/transform-rotate-and-remove.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore):
(WebCore::RenderBoxModelObject::styleWillChange):
(WebCore::RenderBoxModelObject::styleDidChange):

  • rendering/RenderBoxModelObject.h:

(RenderBoxModelObject):

LayoutTests:

Patch by Kishore Bolisetty <kbolisetty@innominds.com> on 2012-03-05
Reviewed by Simon Fraser.
Test to remove the transform property of an element upon onload event.

  • fast/repaint/transform-rotate-and-remove.html: Added.
  • platform/chromium-linux/fast/repaint/transform-rotate-and-remove-expected.png: Added.
  • platform/chromium-linux/fast/repaint/transform-rotate-and-remove-expected.txt: Added.
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109866 r109867  
     12012-03-05  Kishore Bolisetty  <kbolisetty@innominds.com>
     2
     3        Element not fully repainted after application and removal of transform
     4        https://bugs.webkit.org/show_bug.cgi?id=61338
     5
     6        Reviewed by Simon Fraser.
     7        Test to remove the transform property of an element upon onload event.
     8
     9        * fast/repaint/transform-rotate-and-remove.html: Added.
     10        * platform/chromium-linux/fast/repaint/transform-rotate-and-remove-expected.png: Added.
     11        * platform/chromium-linux/fast/repaint/transform-rotate-and-remove-expected.txt: Added.
     12
    1132012-03-05  Gavin Barraclough  <barraclough@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r109866 r109867  
     12012-03-05  Kishore Bolisetty  <kbolisetty@innominds.com>
     2
     3        Element not fully repainted after application and removal of transform
     4        https://bugs.webkit.org/show_bug.cgi?id=61338
     5
     6        Reviewed by Simon Fraser.
     7        RenderLayer is created and removed when a transform is applied and removed to element.
     8        To render the element properly after removal of transform on it, preferred widths and dimensions of
     9        the element and its containing block needs to be recalculated.
     10
     11        Test: fast/repaint/transform-rotate-and-remove.html
     12
     13        * rendering/RenderBoxModelObject.cpp:
     14        (WebCore):
     15        (WebCore::RenderBoxModelObject::styleWillChange):
     16        (WebCore::RenderBoxModelObject::styleDidChange):
     17        * rendering/RenderBoxModelObject.h:
     18        (RenderBoxModelObject):
     19
    1202012-03-05  Gavin Barraclough  <barraclough@apple.com>
    221
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r109818 r109867  
    4949bool RenderBoxModelObject::s_wasFloating = false;
    5050bool RenderBoxModelObject::s_hadLayer = false;
     51bool RenderBoxModelObject::s_hadTransform = false;
    5152bool RenderBoxModelObject::s_layerWasSelfPainting = false;
    5253
     
    303304    s_wasFloating = isFloating();
    304305    s_hadLayer = hasLayer();
     306    s_hadTransform = hasTransform();
    305307    if (s_hadLayer)
    306308        s_layerWasSelfPainting = layer()->isSelfPaintingLayer();
     
    378380        if (s_wasFloating && isFloating())
    379381            setChildNeedsLayout(true);
     382        if (s_hadTransform)
     383            setNeedsLayoutAndPrefWidthsRecalc();
    380384    }
    381385
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.h

    r109818 r109867  
    241241    static bool s_wasFloating;
    242242    static bool s_hadLayer;
     243    static bool s_hadTransform;
    243244    static bool s_layerWasSelfPainting;
    244245};
Note: See TracChangeset for help on using the changeset viewer.