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

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

Issue 2642193011: Unify all types of overflow-related clips for paint and hit testing. (Closed)
Patch Set: none Created 3 years, 11 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 return; 625 return;
626 626
627 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 627 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
628 const LayoutBox& box = toLayoutBox(object); 628 const LayoutBox& box = toLayoutBox(object);
629 // The <input> elements can't have contents thus CSS overflow property 629 // The <input> elements can't have contents thus CSS overflow property
630 // doesn't apply. However for layout purposes we do generate child layout 630 // doesn't apply. However for layout purposes we do generate child layout
631 // objects for them, e.g. button label. We should clip the overflow from 631 // objects for them, e.g. button label. We should clip the overflow from
632 // those children. This is called control clip and we technically treat them 632 // those children. This is called control clip and we technically treat them
633 // like overflow clip. 633 // like overflow clip.
634 LayoutRect clipRect; 634 LayoutRect clipRect;
635 if (box.hasControlClip()) { 635 if (box.shouldClipOverflow()) {
636 clipRect = box.controlClipRect(context.current.paintOffset);
637 } else if (box.shouldClipOverflow()) {
638 clipRect = LayoutRect(pixelSnappedIntRect( 636 clipRect = LayoutRect(pixelSnappedIntRect(
639 box.overflowClipRect(context.current.paintOffset))); 637 box.overflowClipRect(context.current.paintOffset)));
640 } else { 638 } else {
641 if (auto* properties = object.getMutableForPainting().paintProperties()) { 639 if (auto* properties = object.getMutableForPainting().paintProperties()) {
642 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); 640 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip();
643 context.forceSubtreeUpdate |= properties->clearOverflowClip(); 641 context.forceSubtreeUpdate |= properties->clearOverflowClip();
644 } 642 }
645 return; 643 return;
646 } 644 }
647 645
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 updateOverflowClip(object, context); 989 updateOverflowClip(object, context);
992 updatePerspective(object, context); 990 updatePerspective(object, context);
993 updateSvgLocalToBorderBoxTransform(object, context); 991 updateSvgLocalToBorderBoxTransform(object, context);
994 updateScrollAndScrollTranslation(object, context); 992 updateScrollAndScrollTranslation(object, context);
995 updateOutOfFlowContext(object, context); 993 updateOutOfFlowContext(object, context);
996 994
997 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 995 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
998 } 996 }
999 997
1000 } // namespace blink 998 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698