Changeset 82788 in webkit


Ignore:
Timestamp:
Apr 2, 2011 10:40:51 PM (13 years ago)
Author:
mitz@apple.com
Message:

REGRESSION (r82786): Media controls render incorrectly on GTK and Qt
https://bugs.webkit.org/show_bug.cgi?id=57719

Reviewed by Maciej Stachowiak.

r82786 exposed an incorrect assumption inRenderMediaControlTimeDisplay::layout()
that the timeline container is the parent of the time display. This is not true
with the GTK media style, where the current time display is an inline box, and
thus wrapped in an anonymous flexible box. The code was incorrectly considering
the width of the anonymous box and deciding to hide the time display. Prior to
r82786, this mistake was corrected by the call to computeLogicalWidth() in line layout.

  • rendering/MediaControlElements.cpp:

(WebCore::RenderMediaControlTimeDisplay::layout): Changed to skip past anonymous ancestors.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r82787 r82788  
     12011-04-02  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        REGRESSION (r82786): Media controls render incorrectly on GTK and Qt
     6        https://bugs.webkit.org/show_bug.cgi?id=57719
     7
     8        r82786 exposed an incorrect assumption inRenderMediaControlTimeDisplay::layout()
     9        that the timeline container is the parent of the time display. This is not true
     10        with the GTK media style, where the current time display is an inline box, and
     11        thus wrapped in an anonymous flexible box. The code was incorrectly considering
     12        the width of the anonymous box and deciding to hide the time display. Prior to
     13        r82786, this mistake was corrected by the call to computeLogicalWidth() in line layout.
     14
     15        * rendering/MediaControlElements.cpp:
     16        (WebCore::RenderMediaControlTimeDisplay::layout): Changed to skip past anonymous ancestors.
     17
    1182011-04-02  Nico Weber  <thakis@chromium.org>
    219
  • trunk/Source/WebCore/rendering/MediaControlElements.cpp

    r82053 r82788  
    10561056    RenderFlexibleBox::layout();
    10571057    RenderBox* timelineContainerBox = parentBox();
     1058    while (timelineContainerBox && timelineContainerBox->isAnonymous())
     1059        timelineContainerBox = timelineContainerBox->parentBox();
     1060
    10581061    if (timelineContainerBox && timelineContainerBox->width() < minWidthToDisplayTimeDisplays)
    10591062        setWidth(0);
Note: See TracChangeset for help on using the changeset viewer.