Changeset 230933 in webkit


Ignore:
Timestamp:
Apr 23, 2018 5:13:16 PM (6 years ago)
Author:
Antti Koivisto
Message:

REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
https://bugs.webkit.org/show_bug.cgi?id=182859
<rdar://problem/37595065>

Source/WebCore:

Reviewed by Zalan Bujtas.

Roll out this change from the trunk as the issue it fixed no longer occurs.

  • css/MediaQueryEvaluator.cpp:

(WebCore::orientationEvaluate):
(WebCore::aspectRatioEvaluate):
(WebCore::heightEvaluate):
(WebCore::widthEvaluate):

  • page/FrameView.cpp:

(WebCore::FrameView::layoutSizeForMediaQuery const): Deleted.

  • page/FrameView.h:
  • page/LayoutContext.cpp:

(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):

LayoutTests:

Reviewed by Zalan Bujtas

  • fast/frames/flattening/media-query-growing-content-expected.txt: Removed.
  • fast/frames/flattening/media-query-growing-content.html: Removed.
  • fast/frames/flattening/resources/media-query-min-height-with-flattening.html: Removed.
Location:
trunk
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r230921 r230933  
     12018-04-23  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
     4        https://bugs.webkit.org/show_bug.cgi?id=182859
     5        <rdar://problem/37595065>
     6
     7        Reviewed by Zalan Bujtas
     8
     9        * fast/frames/flattening/media-query-growing-content-expected.txt: Removed.
     10        * fast/frames/flattening/media-query-growing-content.html: Removed.
     11        * fast/frames/flattening/resources/media-query-min-height-with-flattening.html: Removed.
     12
    1132018-04-23  Daniel Bates  <dabates@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r230932 r230933  
     12018-04-23  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
     4        https://bugs.webkit.org/show_bug.cgi?id=182859
     5        <rdar://problem/37595065>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Roll out this change from the trunk as the issue it fixed no longer occurs.
     10
     11        * css/MediaQueryEvaluator.cpp:
     12        (WebCore::orientationEvaluate):
     13        (WebCore::aspectRatioEvaluate):
     14        (WebCore::heightEvaluate):
     15        (WebCore::widthEvaluate):
     16        * page/FrameView.cpp:
     17        (WebCore::FrameView::layoutSizeForMediaQuery const): Deleted.
     18        * page/FrameView.h:
     19        * page/LayoutContext.cpp:
     20        (WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
     21
    1222018-04-23  Daniel Bates  <dabates@apple.com>
    223
  • trunk/Source/WebCore/css/MediaQueryEvaluator.cpp

    r230211 r230933  
    336336        return false;
    337337
    338     auto viewSize = view->layoutSizeForMediaQuery();
     338    auto width = view->layoutWidth();
     339    auto height = view->layoutHeight();
     340
    339341    if (!is<CSSPrimitiveValue>(value)) {
    340342        // Expression (orientation) evaluates to true if width and height >= 0.
    341         return viewSize.height() >= 0 && viewSize.width() >= 0;
     343        return height >= 0 && width >= 0;
    342344    }
    343345
    344346    auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
    345347    bool result;
    346     if (viewSize.width() > viewSize.height()) // Square viewport is portrait.
     348    if (width > height) // Square viewport is portrait.
    347349        result = keyword == CSSValueLandscape;
    348350    else
    349351        result = keyword == CSSValuePortrait;
    350352
    351     LOG_WITH_STREAM(MediaQueries, stream << "  orientationEvaluate: view size " << viewSize.width() << "x" << viewSize.height() << " is " << value->cssText() << ": " << result);
     353    LOG_WITH_STREAM(MediaQueries, stream << "  orientationEvaluate: view size " << width << "x" << height << " is " << value->cssText() << ": " << result);
    352354    return result;
    353355}
     
    362364    if (!view)
    363365        return true;
    364     auto viewSize = view->layoutSizeForMediaQuery();
    365     bool result = compareAspectRatioValue(value, viewSize.width(), viewSize.height(), op);
    366     LOG_WITH_STREAM(MediaQueries, stream << "  aspectRatioEvaluate: " << op << " " << aspectRatioValueAsString(value) << " actual view size " << viewSize << ": " << result);
     366    bool result = compareAspectRatioValue(value, view->layoutWidth(), view->layoutHeight(), op);
     367    LOG_WITH_STREAM(MediaQueries, stream << "  aspectRatioEvaluate: " << op << " " << aspectRatioValueAsString(value) << " actual view size " << view->layoutWidth() << "x" << view->layoutHeight() << " : " << result);
    367368    return result;
    368369}
     
    496497    if (!view)
    497498        return false;
    498     int height = view->layoutSizeForMediaQuery().height();
     499    int height = view->layoutHeight();
    499500    if (!value)
    500501        return height;
     
    516517    if (!view)
    517518        return false;
    518     int width = view->layoutSizeForMediaQuery().width();
     519    int width = view->layoutWidth();
    519520    if (!value)
    520521        return width;
  • trunk/Source/WebCore/page/FrameView.cpp

    r230819 r230933  
    50935093    return renderView() && renderView()->shouldPlaceBlockDirectionScrollbarOnLeft();
    50945094}
    5095 
    5096 IntSize FrameView::layoutSizeForMediaQuery() const
    5097 {
    5098     return m_frameFlatteningViewSizeForMediaQuery.value_or(ScrollView::layoutSize());
    5099 }
    5100 
     5095   
    51015096} // namespace WebCore
  • trunk/Source/WebCore/page/FrameView.h

    r230819 r230933  
    210210
    211211    WEBCORE_EXPORT void adjustViewSize();
    212     IntSize layoutSizeForMediaQuery() const;
    213212
    214213    WEBCORE_EXPORT void setViewportSizeForCSSViewportUnits(IntSize);
     
    780779    void notifyWidgets(WidgetNotification);
    781780
    782     void setFrameFlatteningViewSizeForMediaQuery() { m_frameFlatteningViewSizeForMediaQuery = layoutSize(); }
    783     bool frameFlatteningViewSizeForMediaQueryIsSet() const { return m_frameFlatteningViewSizeForMediaQuery.has_value(); }
    784781    RenderElement* viewportRenderer() const;
    785782   
     
    889886    // The intrinsic content size decided by autosizing.
    890887    IntSize m_autoSizeContentSize;
    891     // Report the first computed frame view size to media queries.
    892     std::optional<IntSize> m_frameFlatteningViewSizeForMediaQuery;
    893888
    894889    std::unique_ptr<ScrollableAreaSet> m_scrollableAreas;
  • trunk/Source/WebCore/page/LayoutContext.cpp

    r230498 r230933  
    510510        return false;
    511511   
    512     if (!view().frameFlatteningViewSizeForMediaQueryIsSet()) {
    513         LOG_WITH_STREAM(MediaQueries, stream << "FrameView " << this << " snapshotting size " <<  view().layoutSize() << " for media queries");
    514         view().setFrameFlatteningViewSizeForMediaQuery();
    515     }
    516512    startLayoutAtMainFrameViewIfNeeded();
    517513    auto* layoutRoot = subtreeLayoutRoot() ? subtreeLayoutRoot() : frame().document()->renderView();
Note: See TracChangeset for help on using the changeset viewer.