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

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

Issue 2442833002: Fix the overflow clip rect rounding for overflow scrolling (Closed)
Patch Set: Fix Slimming Paint v2 Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 // apply. However for layout purposes we do generate child layout objects for 455 // apply. However for layout purposes we do generate child layout objects for
456 // them, e.g. button label. We should clip the overflow from those children. 456 // them, e.g. button label. We should clip the overflow from those children.
457 // This is called control clip and we technically treat them like overflow 457 // This is called control clip and we technically treat them like overflow
458 // clip. 458 // clip.
459 LayoutRect clipRect; 459 LayoutRect clipRect;
460 if (box.hasControlClip()) { 460 if (box.hasControlClip()) {
461 clipRect = box.controlClipRect(context.current.paintOffset); 461 clipRect = box.controlClipRect(context.current.paintOffset);
462 } else if (box.hasOverflowClip() || box.styleRef().containsPaint() || 462 } else if (box.hasOverflowClip() || box.styleRef().containsPaint() ||
463 (box.isSVGRoot() && 463 (box.isSVGRoot() &&
464 toLayoutSVGRoot(box).shouldApplyViewportClip())) { 464 toLayoutSVGRoot(box).shouldApplyViewportClip())) {
465 clipRect = box.overflowClipRect(context.current.paintOffset); 465 clipRect = LayoutRect(
466 pixelSnappedIntRect(box.overflowClipRect(context.current.paintOffset)));
466 } else { 467 } else {
467 if (auto* properties = object.getMutableForPainting().paintProperties()) { 468 if (auto* properties = object.getMutableForPainting().paintProperties()) {
468 properties->clearInnerBorderRadiusClip(); 469 properties->clearInnerBorderRadiusClip();
469 properties->clearOverflowClip(); 470 properties->clearOverflowClip();
470 } 471 }
471 return; 472 return;
472 } 473 }
473 474
474 if (box.styleRef().hasBorderRadius()) { 475 if (box.styleRef().hasBorderRadius()) {
475 auto innerBorder = box.styleRef().getRoundedInnerBorderFor( 476 auto innerBorder = box.styleRef().getRoundedInnerBorderFor(
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 return; 791 return;
791 792
792 updateOverflowClip(object, context); 793 updateOverflowClip(object, context);
793 updatePerspective(object, context); 794 updatePerspective(object, context);
794 updateSvgLocalToBorderBoxTransform(object, context); 795 updateSvgLocalToBorderBoxTransform(object, context);
795 updateScrollAndScrollTranslation(object, context); 796 updateScrollAndScrollTranslation(object, context);
796 updateOutOfFlowContext(object, context); 797 updateOutOfFlowContext(object, context);
797 } 798 }
798 799
799 } // namespace blink 800 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698