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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2650583003: Fix ::first-letter not to apply non-block containers (Closed)
Patch Set: Fix ListItem, add test Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 } 3354 }
3355 3355
3356 // Display utility functions. 3356 // Display utility functions.
3357 bool isDisplayReplacedType() const { 3357 bool isDisplayReplacedType() const {
3358 return isDisplayReplacedType(display()); 3358 return isDisplayReplacedType(display());
3359 } 3359 }
3360 bool isDisplayInlineType() const { return isDisplayInlineType(display()); } 3360 bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
3361 bool isOriginalDisplayInlineType() const { 3361 bool isOriginalDisplayInlineType() const {
3362 return isDisplayInlineType(originalDisplay()); 3362 return isDisplayInlineType(originalDisplay());
3363 } 3363 }
3364 bool isDisplayBlockContainer() const {
3365 return isDisplayBlockContainer(display());
3366 }
3364 bool isDisplayFlexibleOrGridBox() const { 3367 bool isDisplayFlexibleOrGridBox() const {
3365 return isDisplayFlexibleBox(display()) || isDisplayGridBox(display()); 3368 return isDisplayFlexibleBox(display()) || isDisplayGridBox(display());
3366 } 3369 }
3367 bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); } 3370 bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); }
3368 3371
3369 // Isolation utility functions. 3372 // Isolation utility functions.
3370 bool hasIsolation() const { return isolation() != IsolationAuto; } 3373 bool hasIsolation() const { return isolation() != IsolationAuto; }
3371 3374
3372 // Content utility functions. 3375 // Content utility functions.
3373 bool hasContent() const { return contentData(); } 3376 bool hasContent() const { return contentData(); }
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
3705 } 3708 }
3706 void setVisitedLinkTextStrokeColor(const StyleColor& v) { 3709 void setVisitedLinkTextStrokeColor(const StyleColor& v) {
3707 SET_VAR_WITH_SETTER(m_rareInheritedData, visitedLinkTextStrokeColor, 3710 SET_VAR_WITH_SETTER(m_rareInheritedData, visitedLinkTextStrokeColor,
3708 setVisitedLinkTextStrokeColor, v); 3711 setVisitedLinkTextStrokeColor, v);
3709 } 3712 }
3710 void setVisitedLinkCaretColor(const StyleAutoColor& v) { 3713 void setVisitedLinkCaretColor(const StyleAutoColor& v) {
3711 SET_VAR_WITH_SETTER(m_rareInheritedData, visitedLinkCaretColor, 3714 SET_VAR_WITH_SETTER(m_rareInheritedData, visitedLinkCaretColor,
3712 setVisitedLinkCaretColor, v); 3715 setVisitedLinkCaretColor, v);
3713 } 3716 }
3714 3717
3718 static bool isDisplayBlockContainer(EDisplay display) {
3719 return display == EDisplay::Block || display == EDisplay::ListItem ||
3720 display == EDisplay::InlineBlock || display == EDisplay::FlowRoot ||
3721 display == EDisplay::TableCell || display == EDisplay::TableCaption;
3722 }
3723
3715 static bool isDisplayFlexibleBox(EDisplay display) { 3724 static bool isDisplayFlexibleBox(EDisplay display) {
3716 return display == EDisplay::Flex || display == EDisplay::InlineFlex; 3725 return display == EDisplay::Flex || display == EDisplay::InlineFlex;
3717 } 3726 }
3718 3727
3719 static bool isDisplayGridBox(EDisplay display) { 3728 static bool isDisplayGridBox(EDisplay display) {
3720 return display == EDisplay::Grid || display == EDisplay::InlineGrid; 3729 return display == EDisplay::Grid || display == EDisplay::InlineGrid;
3721 } 3730 }
3722 3731
3723 static bool isDisplayReplacedType(EDisplay display) { 3732 static bool isDisplayReplacedType(EDisplay display) {
3724 return display == EDisplay::InlineBlock || 3733 return display == EDisplay::InlineBlock ||
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
3935 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 3944 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
3936 } 3945 }
3937 3946
3938 inline bool ComputedStyle::hasPseudoElementStyle() const { 3947 inline bool ComputedStyle::hasPseudoElementStyle() const {
3939 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3948 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3940 } 3949 }
3941 3950
3942 } // namespace blink 3951 } // namespace blink
3943 3952
3944 #endif // ComputedStyle_h 3953 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698