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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2051703002: Implement closed shadow adjustment for Element.offsetParent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); 640 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
641 641
642 LayoutObject* layoutObject = this->layoutObject(); 642 LayoutObject* layoutObject = this->layoutObject();
643 if (!layoutObject) 643 if (!layoutObject)
644 return nullptr; 644 return nullptr;
645 645
646 Element* element = layoutObject->offsetParent(); 646 Element* element = layoutObject->offsetParent();
647 if (!element) 647 if (!element)
648 return nullptr; 648 return nullptr;
649 649
650 if (element->isInShadowTree() && !element->containingShadowRoot()->isOpenOrV 0())
651 return nullptr;
652
653 return element; 650 return element;
654 } 651 }
655 652
656 int Element::clientLeft() 653 int Element::clientLeft()
657 { 654 {
658 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); 655 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
659 656
660 if (LayoutBox* layoutObject = layoutBox()) 657 if (LayoutBox* layoutObject = layoutBox())
661 return adjustLayoutUnitForAbsoluteZoom(layoutObject->clientLeft(), layou tObject->styleRef()).round(); 658 return adjustLayoutUnitForAbsoluteZoom(layoutObject->clientLeft(), layou tObject->styleRef()).round();
662 return 0; 659 return 0;
(...skipping 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after
3717 3714
3718 DEFINE_TRACE_WRAPPERS(Element) 3715 DEFINE_TRACE_WRAPPERS(Element)
3719 { 3716 {
3720 if (hasRareData()) { 3717 if (hasRareData()) {
3721 visitor->traceWrappers(elementRareData()); 3718 visitor->traceWrappers(elementRareData());
3722 } 3719 }
3723 ContainerNode::traceWrappers(visitor); 3720 ContainerNode::traceWrappers(visitor);
3724 } 3721 }
3725 3722
3726 } // namespace blink 3723 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698