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

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

Issue 2851763004: Remove LayoutObject::LayerCreationAllowedForSubtree. (Closed)
Patch Set: Created 3 years, 7 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 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 * 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 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 kLayoutObjectSVGInline, 1988 kLayoutObjectSVGInline,
1989 kLayoutObjectSVGInlineText, 1989 kLayoutObjectSVGInlineText,
1990 kLayoutObjectSVGImage, 1990 kLayoutObjectSVGImage,
1991 kLayoutObjectSVGForeignObject, 1991 kLayoutObjectSVGForeignObject,
1992 kLayoutObjectSVGResourceContainer, 1992 kLayoutObjectSVGResourceContainer,
1993 kLayoutObjectSVGResourceFilter, 1993 kLayoutObjectSVGResourceFilter,
1994 kLayoutObjectSVGResourceFilterPrimitive, 1994 kLayoutObjectSVGResourceFilterPrimitive,
1995 }; 1995 };
1996 virtual bool IsOfType(LayoutObjectType type) const { return false; } 1996 virtual bool IsOfType(LayoutObjectType type) const { return false; }
1997 1997
1998 inline bool LayerCreationAllowedForSubtree() const;
1999
2000 // Overrides should call the superclass at the end. m_style will be 0 the 1998 // Overrides should call the superclass at the end. m_style will be 0 the
2001 // first time this function will be called. 1999 // first time this function will be called.
2002 virtual void StyleWillChange(StyleDifference, const ComputedStyle& new_style); 2000 virtual void StyleWillChange(StyleDifference, const ComputedStyle& new_style);
2003 // Overrides should call the superclass at the start. |oldStyle| will be 0 the 2001 // Overrides should call the superclass at the start. |oldStyle| will be 0 the
2004 // first time this function is called. 2002 // first time this function is called.
2005 virtual void StyleDidChange(StyleDifference, const ComputedStyle* old_style); 2003 virtual void StyleDidChange(StyleDifference, const ComputedStyle* old_style);
2006 void PropagateStyleToAnonymousChildren(); 2004 void PropagateStyleToAnonymousChildren();
2007 // Return true for objects that don't want style changes automatically 2005 // Return true for objects that don't want style changes automatically
2008 // propagated via propagateStyleToAnonymousChildren(), but rather rely on 2006 // propagated via propagateStyleToAnonymousChildren(), but rather rely on
2009 // other custom mechanisms (if they need to be notified of parent style 2007 // other custom mechanisms (if they need to be notified of parent style
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 MarkContainerChainForLayout(); 2727 MarkContainerChainForLayout();
2730 } 2728 }
2731 2729
2732 inline bool LayoutObject::PreservesNewline() const { 2730 inline bool LayoutObject::PreservesNewline() const {
2733 if (IsSVGInlineText()) 2731 if (IsSVGInlineText())
2734 return false; 2732 return false;
2735 2733
2736 return Style()->PreserveNewline(); 2734 return Style()->PreserveNewline();
2737 } 2735 }
2738 2736
2739 inline bool LayoutObject::LayerCreationAllowedForSubtree() const {
2740 LayoutObject* parent_layout_object = Parent();
2741 while (parent_layout_object) {
2742 if (parent_layout_object->IsSVGHiddenContainer())
2743 return false;
2744 parent_layout_object = parent_layout_object->Parent();
2745 }
2746
2747 return true;
2748 }
2749
2750 inline void LayoutObject::SetSelectionStateIfNeeded(SelectionState state) { 2737 inline void LayoutObject::SetSelectionStateIfNeeded(SelectionState state) {
2751 if (GetSelectionState() == state) 2738 if (GetSelectionState() == state)
2752 return; 2739 return;
2753 2740
2754 SetSelectionState(state); 2741 SetSelectionState(state);
2755 } 2742 }
2756 2743
2757 inline void LayoutObject::SetHasBoxDecorationBackground(bool b) { 2744 inline void LayoutObject::SetHasBoxDecorationBackground(bool b) {
2758 if (b == bitfields_.HasBoxDecorationBackground()) 2745 if (b == bitfields_.HasBoxDecorationBackground())
2759 return; 2746 return;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2814 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2828 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2815 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2829 // We don't make object2 an optional parameter so that showLayoutTree 2816 // We don't make object2 an optional parameter so that showLayoutTree
2830 // can be called from gdb easily. 2817 // can be called from gdb easily.
2831 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2818 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2832 const blink::LayoutObject* object2); 2819 const blink::LayoutObject* object2);
2833 2820
2834 #endif 2821 #endif
2835 2822
2836 #endif // LayoutObject_h 2823 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698