Changeset 230933 in webkit
- Timestamp:
- Apr 23, 2018 5:13:16 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r230921 r230933 1 2018-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 1 13 2018-04-23 Daniel Bates <dabates@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r230932 r230933 1 2018-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 1 22 2018-04-23 Daniel Bates <dabates@apple.com> 2 23 -
trunk/Source/WebCore/css/MediaQueryEvaluator.cpp
r230211 r230933 336 336 return false; 337 337 338 auto viewSize = view->layoutSizeForMediaQuery(); 338 auto width = view->layoutWidth(); 339 auto height = view->layoutHeight(); 340 339 341 if (!is<CSSPrimitiveValue>(value)) { 340 342 // Expression (orientation) evaluates to true if width and height >= 0. 341 return viewSize.height() >= 0 && viewSize.width()>= 0;343 return height >= 0 && width >= 0; 342 344 } 343 345 344 346 auto keyword = downcast<CSSPrimitiveValue>(*value).valueID(); 345 347 bool result; 346 if ( viewSize.width() > viewSize.height()) // Square viewport is portrait.348 if (width > height) // Square viewport is portrait. 347 349 result = keyword == CSSValueLandscape; 348 350 else 349 351 result = keyword == CSSValuePortrait; 350 352 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); 352 354 return result; 353 355 } … … 362 364 if (!view) 363 365 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); 367 368 return result; 368 369 } … … 496 497 if (!view) 497 498 return false; 498 int height = view->layout SizeForMediaQuery().height();499 int height = view->layoutHeight(); 499 500 if (!value) 500 501 return height; … … 516 517 if (!view) 517 518 return false; 518 int width = view->layout SizeForMediaQuery().width();519 int width = view->layoutWidth(); 519 520 if (!value) 520 521 return width; -
trunk/Source/WebCore/page/FrameView.cpp
r230819 r230933 5093 5093 return renderView() && renderView()->shouldPlaceBlockDirectionScrollbarOnLeft(); 5094 5094 } 5095 5096 IntSize FrameView::layoutSizeForMediaQuery() const 5097 { 5098 return m_frameFlatteningViewSizeForMediaQuery.value_or(ScrollView::layoutSize()); 5099 } 5100 5095 5101 5096 } // namespace WebCore -
trunk/Source/WebCore/page/FrameView.h
r230819 r230933 210 210 211 211 WEBCORE_EXPORT void adjustViewSize(); 212 IntSize layoutSizeForMediaQuery() const;213 212 214 213 WEBCORE_EXPORT void setViewportSizeForCSSViewportUnits(IntSize); … … 780 779 void notifyWidgets(WidgetNotification); 781 780 782 void setFrameFlatteningViewSizeForMediaQuery() { m_frameFlatteningViewSizeForMediaQuery = layoutSize(); }783 bool frameFlatteningViewSizeForMediaQueryIsSet() const { return m_frameFlatteningViewSizeForMediaQuery.has_value(); }784 781 RenderElement* viewportRenderer() const; 785 782 … … 889 886 // The intrinsic content size decided by autosizing. 890 887 IntSize m_autoSizeContentSize; 891 // Report the first computed frame view size to media queries.892 std::optional<IntSize> m_frameFlatteningViewSizeForMediaQuery;893 888 894 889 std::unique_ptr<ScrollableAreaSet> m_scrollableAreas; -
trunk/Source/WebCore/page/LayoutContext.cpp
r230498 r230933 510 510 return false; 511 511 512 if (!view().frameFlatteningViewSizeForMediaQueryIsSet()) {513 LOG_WITH_STREAM(MediaQueries, stream << "FrameView " << this << " snapshotting size " << view().layoutSize() << " for media queries");514 view().setFrameFlatteningViewSizeForMediaQuery();515 }516 512 startLayoutAtMainFrameViewIfNeeded(); 517 513 auto* layoutRoot = subtreeLayoutRoot() ? subtreeLayoutRoot() : frame().document()->renderView();
Note: See TracChangeset
for help on using the changeset viewer.