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

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: none 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 614 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
615 const LayoutBox& box = toLayoutBox(object); 615 const LayoutBox& box = toLayoutBox(object);
616 // The <input> elements can't have contents thus CSS overflow property 616 // The <input> elements can't have contents thus CSS overflow property
617 // doesn't apply. However for layout purposes we do generate child layout 617 // doesn't apply. However for layout purposes we do generate child layout
618 // objects for them, e.g. button label. We should clip the overflow from 618 // objects for them, e.g. button label. We should clip the overflow from
619 // those children. This is called control clip and we technically treat them 619 // those children. This is called control clip and we technically treat them
620 // like overflow clip. 620 // like overflow clip.
621 LayoutRect clipRect; 621 LayoutRect clipRect;
622 if (box.shouldClipOverflow()) { 622 if (box.shouldClipOverflow()) {
623 clipRect = LayoutRect(pixelSnappedIntRect( 623 clipRect = LayoutRect(box.overflowClipRect(context.current.paintOffset));
624 box.overflowClipRect(context.current.paintOffset)));
625 } else { 624 } else {
626 if (auto* properties = object.getMutableForPainting().paintProperties()) { 625 if (auto* properties = object.getMutableForPainting().paintProperties()) {
627 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); 626 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip();
628 context.forceSubtreeUpdate |= properties->clearOverflowClip(); 627 context.forceSubtreeUpdate |= properties->clearOverflowClip();
629 } 628 }
630 return; 629 return;
631 } 630 }
632 631
633 auto& properties = object.getMutableForPainting().ensurePaintProperties(); 632 auto& properties = object.getMutableForPainting().ensurePaintProperties();
634 const auto* currentClip = context.current.clip; 633 const auto* currentClip = context.current.clip;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 updateOverflowClip(object, context); 976 updateOverflowClip(object, context);
978 updatePerspective(object, context); 977 updatePerspective(object, context);
979 updateSvgLocalToBorderBoxTransform(object, context); 978 updateSvgLocalToBorderBoxTransform(object, context);
980 updateScrollAndScrollTranslation(object, context); 979 updateScrollAndScrollTranslation(object, context);
981 updateOutOfFlowContext(object, context); 980 updateOutOfFlowContext(object, context);
982 981
983 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 982 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
984 } 983 }
985 984
986 } // namespace blink 985 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698