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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2701523003: Don't pixel-snap overflow clips in clip paint property nodes. (Closed)
Patch Set: Merge branch 'master' into fixclipping Created 3 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilder.h" 5 #include "core/paint/PaintPropertyTreeBuilder.h"
6 6
7 #include "core/dom/DOMNodeIds.h" 7 #include "core/dom/DOMNodeIds.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 608
609 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 609 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
610 const LayoutBox& box = toLayoutBox(object); 610 const LayoutBox& box = toLayoutBox(object);
611 // The <input> elements can't have contents thus CSS overflow property 611 // The <input> elements can't have contents thus CSS overflow property
612 // doesn't apply. However for layout purposes we do generate child layout 612 // doesn't apply. However for layout purposes we do generate child layout
613 // objects for them, e.g. button label. We should clip the overflow from 613 // objects for them, e.g. button label. We should clip the overflow from
614 // those children. This is called control clip and we technically treat them 614 // those children. This is called control clip and we technically treat them
615 // like overflow clip. 615 // like overflow clip.
616 LayoutRect clipRect; 616 LayoutRect clipRect;
617 if (box.shouldClipOverflow()) { 617 if (box.shouldClipOverflow()) {
618 clipRect = LayoutRect(pixelSnappedIntRect( 618 clipRect = LayoutRect(box.overflowClipRect(context.current.paintOffset));
619 box.overflowClipRect(context.current.paintOffset)));
620 } else { 619 } else {
621 if (auto* properties = object.getMutableForPainting().paintProperties()) { 620 if (auto* properties = object.getMutableForPainting().paintProperties()) {
622 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); 621 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip();
623 context.forceSubtreeUpdate |= properties->clearOverflowClip(); 622 context.forceSubtreeUpdate |= properties->clearOverflowClip();
624 } 623 }
625 return; 624 return;
626 } 625 }
627 626
628 auto& properties = object.getMutableForPainting().ensurePaintProperties(); 627 auto& properties = object.getMutableForPainting().ensurePaintProperties();
629 const auto* currentClip = context.current.clip; 628 const auto* currentClip = context.current.clip;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 updateOverflowClip(object, context); 975 updateOverflowClip(object, context);
977 updatePerspective(object, context); 976 updatePerspective(object, context);
978 updateSvgLocalToBorderBoxTransform(object, context); 977 updateSvgLocalToBorderBoxTransform(object, context);
979 updateScrollAndScrollTranslation(object, context); 978 updateScrollAndScrollTranslation(object, context);
980 updateOutOfFlowContext(object, context); 979 updateOutOfFlowContext(object, context);
981 980
982 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 981 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
983 } 982 }
984 983
985 } // namespace blink 984 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698