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

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

Issue 2773163002: 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 } 420 }
421 421
422 LayoutObject* LayoutObject::nextInPreOrder() const { 422 LayoutObject* LayoutObject::nextInPreOrder() const {
423 if (LayoutObject* o = slowFirstChild()) 423 if (LayoutObject* o = slowFirstChild())
424 return o; 424 return o;
425 425
426 return nextInPreOrderAfterChildren(); 426 return nextInPreOrderAfterChildren();
427 } 427 }
428 428
429 bool LayoutObject::hasClipRelatedProperty() const {
430 if (hasClip() || hasOverflowClip() || hasClipPath() ||
431 style()->containsPaint())
432 return true;
433 if (isBox() && toLayoutBox(this)->hasControlClip())
434 return true;
435 return false;
436 }
437
429 LayoutObject* LayoutObject::nextInPreOrderAfterChildren() const { 438 LayoutObject* LayoutObject::nextInPreOrderAfterChildren() const {
430 LayoutObject* o = nextSibling(); 439 LayoutObject* o = nextSibling();
431 if (!o) { 440 if (!o) {
432 o = parent(); 441 o = parent();
433 while (o && !o->nextSibling()) 442 while (o && !o->nextSibling())
434 o = o->parent(); 443 o = o->parent();
435 if (o) 444 if (o)
436 o = o->nextSibling(); 445 o = o->nextSibling();
437 } 446 }
438 447
(...skipping 3052 matching lines...) Expand 10 before | Expand all | Expand 10 after
3491 const blink::LayoutObject* root = object1; 3500 const blink::LayoutObject* root = object1;
3492 while (root->parent()) 3501 while (root->parent())
3493 root = root->parent(); 3502 root = root->parent();
3494 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3503 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3495 } else { 3504 } else {
3496 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3505 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3497 } 3506 }
3498 } 3507 }
3499 3508
3500 #endif 3509 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698