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

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

Issue 2391893004: Reformat comments in core/layout up until LayoutBox (Closed)
Patch Set: Rebase w/HEAD (again) Created 4 years, 2 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GeneratedChildren_h 5 #ifndef GeneratedChildren_h
6 #define GeneratedChildren_h 6 #define GeneratedChildren_h
7 7
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // We only create "generated" child layoutObjects like one for first-letter if: 12 // We only create "generated" child layoutObjects like one for first-letter if:
13 // - the firstLetterBlock can have children in the DOM and 13 // - the firstLetterBlock can have children in the DOM and
14 // - the block doesn't have any special assumption on its text children. 14 // - the block doesn't have any special assumption on its text children.
15 // This correctly prevents form controls from having such layoutObjects. 15 // This correctly prevents form controls from having such layoutObjects.
16 static bool canHaveGeneratedChildren(const LayoutObject& layoutObject) { 16 static bool canHaveGeneratedChildren(const LayoutObject& layoutObject) {
17 // FIXME: LayoutMedia::layout makes assumptions about what children are allowe d 17 // FIXME: LayoutMedia::layout makes assumptions about what children are
18 // so we can't support generated content. 18 // allowed so we can't support generated content.
19 if (layoutObject.isMedia() || layoutObject.isTextControl() || 19 if (layoutObject.isMedia() || layoutObject.isTextControl() ||
20 layoutObject.isMenuList()) 20 layoutObject.isMenuList())
21 return false; 21 return false;
22 22
23 // Input elements can't have generated children, but button elements can. We'l l 23 // Input elements can't have generated children, but button elements can.
24 // write the code assuming any other button types that might emerge in the fut ure 24 // We'll write the code assuming any other button types that might emerge in
25 // can also have children. 25 // the future can also have children.
26 if (layoutObject.isLayoutButton()) 26 if (layoutObject.isLayoutButton())
27 return !isHTMLInputElement(*layoutObject.node()); 27 return !isHTMLInputElement(*layoutObject.node());
28 28
29 return layoutObject.canHaveChildren(); 29 return layoutObject.canHaveChildren();
30 } 30 }
31 31
32 } // namespace blink 32 } // namespace blink
33 33
34 #endif // GeneratedChildren_h 34 #endif // GeneratedChildren_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/FragmentationContext.h ('k') | third_party/WebKit/Source/core/layout/HitTestCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698