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

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

Issue 1856993004: Let mapToVisualRectInAncestorSpace apply ancestor clip if not scrollsOverflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Saturated
Patch Set: Use the same clip policy for slow path and fast path Created 4 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
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 // For any layout object that doesn't override this method (the main example is LayoutText), 1636 // For any layout object that doesn't override this method (the main example is LayoutText),
1637 // the rect is assumed to be in the coordinate space of the object's parent. 1637 // the rect is assumed to be in the coordinate space of the object's parent.
1638 1638
1639 if (ancestor == this) 1639 if (ancestor == this)
1640 return true; 1640 return true;
1641 1641
1642 if (LayoutObject* parent = this->parent()) { 1642 if (LayoutObject* parent = this->parent()) {
1643 if (parent->hasOverflowClip()) { 1643 if (parent->hasOverflowClip()) {
1644 LayoutBox* parentBox = toLayoutBox(parent); 1644 LayoutBox* parentBox = toLayoutBox(parent);
1645 parentBox->mapScrollingContentsRectToBoxSpace(rect); 1645 parentBox->mapScrollingContentsRectToBoxSpace(rect);
1646 if (parent != ancestor && !parentBox->applyOverflowClip(rect, visual RectFlags)) 1646 if (parent != ancestor || !parentBox->scrollsOverflow()) {
1647 return false; 1647 if (!parentBox->applyOverflowClip(rect, visualRectFlags))
1648 return false;
1649 }
1648 } 1650 }
1649 1651
1650 return parent->mapToVisualRectInAncestorSpace(ancestor, rect, visualRect Flags); 1652 return parent->mapToVisualRectInAncestorSpace(ancestor, rect, visualRect Flags);
1651 } 1653 }
1652 return true; 1654 return true;
1653 } 1655 }
1654 1656
1655 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) 1657 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*)
1656 { 1658 {
1657 } 1659 }
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
3699 const blink::LayoutObject* root = object1; 3701 const blink::LayoutObject* root = object1;
3700 while (root->parent()) 3702 while (root->parent())
3701 root = root->parent(); 3703 root = root->parent();
3702 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3704 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3703 } else { 3705 } else {
3704 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3706 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3705 } 3707 }
3706 } 3708 }
3707 3709
3708 #endif 3710 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698