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

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

Issue 2777493003: Include control clip in list of clip-related properties. (Closed)
Patch Set: Created 3 years, 9 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. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 } 417 }
418 418
419 LayoutObject* LayoutObject::nextInPreOrder() const { 419 LayoutObject* LayoutObject::nextInPreOrder() const {
420 if (LayoutObject* o = slowFirstChild()) 420 if (LayoutObject* o = slowFirstChild())
421 return o; 421 return o;
422 422
423 return nextInPreOrderAfterChildren(); 423 return nextInPreOrderAfterChildren();
424 } 424 }
425 425
426 bool LayoutObject::hasClipRelatedProperty() const {
427 if (hasClip() || hasOverflowClip() || hasClipPath() ||
428 style()->containsPaint())
429 return true;
430 if (isBox() && toLayoutBox(this)->hasControlClip())
431 return true;
432 return false;
433 }
434
426 LayoutObject* LayoutObject::nextInPreOrderAfterChildren() const { 435 LayoutObject* LayoutObject::nextInPreOrderAfterChildren() const {
427 LayoutObject* o = nextSibling(); 436 LayoutObject* o = nextSibling();
428 if (!o) { 437 if (!o) {
429 o = parent(); 438 o = parent();
430 while (o && !o->nextSibling()) 439 while (o && !o->nextSibling())
431 o = o->parent(); 440 o = o->parent();
432 if (o) 441 if (o)
433 o = o->nextSibling(); 442 o = o->nextSibling();
434 } 443 }
435 444
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3554 const blink::LayoutObject* root = object1; 3563 const blink::LayoutObject* root = object1;
3555 while (root->parent()) 3564 while (root->parent())
3556 root = root->parent(); 3565 root = root->parent();
3557 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3566 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3558 } else { 3567 } else {
3559 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3568 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3560 } 3569 }
3561 } 3570 }
3562 3571
3563 #endif 3572 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698