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

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

Issue 1970183002: Don't use canCollapseAnonymousBlockChild() to determine whether to truncate text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Declaration soup - aka LayoutTest. Created 4 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. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 Document& document() const 773 Document& document() const
774 { 774 {
775 ASSERT(m_node || parent()); // crbug.com/402056 775 ASSERT(m_node || parent()); // crbug.com/402056
776 return m_node ? m_node->document() : parent()->document(); 776 return m_node ? m_node->document() : parent()->document();
777 } 777 }
778 LocalFrame* frame() const { return document().frame(); } 778 LocalFrame* frame() const { return document().frame(); }
779 779
780 virtual LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const { re turn nullptr; } 780 virtual LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const { re turn nullptr; }
781 bool isColumnSpanAll() const { return style()->getColumnSpan() == ColumnSpan All && spannerPlaceholder(); } 781 bool isColumnSpanAll() const { return style()->getColumnSpan() == ColumnSpan All && spannerPlaceholder(); }
782 782
783 // We include isLayoutButton in this check because buttons are implemented 783 // We include isLayoutButton() in this check, because buttons are
784 // using flex box but should still support first-line|first-letter. 784 // implemented using flex box but should still support things like
785 // first-line, first-letter and text-overflow.
785 // The flex box and grid specs require that flex box and grid do not 786 // The flex box and grid specs require that flex box and grid do not
786 // support first-line|first-letter, though. 787 // support first-line|first-letter, though.
787 // TODO(cbiesinger): Remove when buttons are implemented with align-items in stead 788 // TODO(cbiesinger): Remove when buttons are implemented with align-items in stead
788 // of flex box. crbug.com/226252. 789 // of flex box. crbug.com/226252.
789 bool canHaveFirstLineOrFirstLetterStyle() const { return isLayoutBlockFlow() || isLayoutButton(); } 790 bool behavesLikeBlockContainer() const { return isLayoutBlockFlow() || isLay outButton(); }
790 791
791 bool hasFilterOrReflection() const; 792 bool hasFilterOrReflection() const;
792 793
793 // This function returns the containing block of the object. 794 // This function returns the containing block of the object.
794 // Due to CSS being inconsistent, a containing block can be a relatively 795 // Due to CSS being inconsistent, a containing block can be a relatively
795 // positioned inline, thus we can't return a LayoutBlock from this function. 796 // positioned inline, thus we can't return a LayoutBlock from this function.
796 // 797 //
797 // This method is extremely similar to containingBlock(), but with a few 798 // This method is extremely similar to containingBlock(), but with a few
798 // notable exceptions. 799 // notable exceptions.
799 // (1) It can be used on orphaned subtrees, i.e., it can be called safely 800 // (1) It can be used on orphaned subtrees, i.e., it can be called safely
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 void showTree(const blink::LayoutObject*); 2182 void showTree(const blink::LayoutObject*);
2182 void showLineTree(const blink::LayoutObject*); 2183 void showLineTree(const blink::LayoutObject*);
2183 void showLayoutTree(const blink::LayoutObject* object1); 2184 void showLayoutTree(const blink::LayoutObject* object1);
2184 // We don't make object2 an optional parameter so that showLayoutTree 2185 // We don't make object2 an optional parameter so that showLayoutTree
2185 // can be called from gdb easily. 2186 // can be called from gdb easily.
2186 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2187 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2187 2188
2188 #endif 2189 #endif
2189 2190
2190 #endif // LayoutObject_h 2191 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.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