Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2826273005: Don't include descendants into LocalVisualRect if a box has both mask and overflow clip (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 if (HasLayer() && Layer()->GetCompositingState() == kPaintsIntoOwnBacking) 2428 if (HasLayer() && Layer()->GetCompositingState() == kPaintsIntoOwnBacking)
2429 return false; 2429 return false;
2430 2430
2431 return true; 2431 return true;
2432 } 2432 }
2433 2433
2434 LayoutRect LayoutBox::LocalVisualRect() const { 2434 LayoutRect LayoutBox::LocalVisualRect() const {
2435 if (Style()->Visibility() != EVisibility::kVisible) 2435 if (Style()->Visibility() != EVisibility::kVisible)
2436 return LayoutRect(); 2436 return LayoutRect();
2437 2437
2438 if (HasMask() && !RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 2438 if (HasMask() && !ShouldClipOverflow() &&
2439 !RuntimeEnabledFeatures::slimmingPaintV2Enabled())
2439 return LayoutRect(Layer()->BoxForFilterOrMask()); 2440 return LayoutRect(Layer()->BoxForFilterOrMask());
2441
2440 return SelfVisualOverflowRect(); 2442 return SelfVisualOverflowRect();
2441 } 2443 }
2442 2444
2443 void LayoutBox::InflateVisualRectForFilterUnderContainer( 2445 void LayoutBox::InflateVisualRectForFilterUnderContainer(
2444 TransformState& transform_state, 2446 TransformState& transform_state,
2445 const LayoutObject& container, 2447 const LayoutObject& container,
2446 const LayoutBoxModelObject* ancestor_to_stop_at) const { 2448 const LayoutBoxModelObject* ancestor_to_stop_at) const {
2447 transform_state.Flatten(); 2449 transform_state.Flatten();
2448 // Apply visual overflow caused by reflections and filters defined on objects 2450 // Apply visual overflow caused by reflections and filters defined on objects
2449 // between this object and container (not included) or ancestorToStopAt 2451 // between this object and container (not included) or ancestorToStopAt
(...skipping 3448 matching lines...) Expand 10 before | Expand all | Expand 10 after
5898 void LayoutBox::MutableForPainting:: 5900 void LayoutBox::MutableForPainting::
5899 SavePreviousContentBoxSizeAndLayoutOverflowRect() { 5901 SavePreviousContentBoxSizeAndLayoutOverflowRect() {
5900 auto& rare_data = GetLayoutBox().EnsureRareData(); 5902 auto& rare_data = GetLayoutBox().EnsureRareData();
5901 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; 5903 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true;
5902 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); 5904 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size();
5903 rare_data.previous_layout_overflow_rect_ = 5905 rare_data.previous_layout_overflow_rect_ =
5904 GetLayoutBox().LayoutOverflowRect(); 5906 GetLayoutBox().LayoutOverflowRect();
5905 } 5907 }
5906 5908
5907 } // namespace blink 5909 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698