|
|
|
Lines 367-391
nsStyleContext::ApplyStyleFixups(bool aS
|
Link Here
|
|---|
|
| 367 |
if ((parentDisp->mDisplay == NS_STYLE_DISPLAY_FLEX || |
367 |
if ((parentDisp->mDisplay == NS_STYLE_DISPLAY_FLEX || |
| 368 |
parentDisp->mDisplay == NS_STYLE_DISPLAY_INLINE_FLEX) && |
368 |
parentDisp->mDisplay == NS_STYLE_DISPLAY_INLINE_FLEX) && |
| 369 |
GetPseudo() != nsCSSAnonBoxes::mozNonElement) { |
369 |
GetPseudo() != nsCSSAnonBoxes::mozNonElement) { |
| 370 |
uint8_t displayVal = disp->mDisplay; |
370 |
uint8_t displayVal = disp->mDisplay; |
| 371 |
// Skip table parts. |
371 |
// Skip table parts. |
| 372 |
// NOTE: This list needs to be kept in sync with |
372 |
// NOTE: This list needs to be kept in sync with |
| 373 |
// nsCSSFrameConstructor.cpp's "sDisplayData" array -- specifically, |
373 |
// nsCSSFrameConstructor.cpp's "sDisplayData" array -- specifically, |
| 374 |
// this should be the list of display-values that have |
374 |
// this should be the list of display-values that have |
| 375 |
// FCDATA_DESIRED_PARENT_TYPE_TO_BITS specified in that array. |
375 |
// FCDATA_DESIRED_PARENT_TYPE_TO_BITS specified in that array, plus |
|
|
376 |
// NS_STYLE_DISPLAY_CONTENTS. |
| 376 |
if (NS_STYLE_DISPLAY_TABLE_CAPTION != displayVal && |
377 |
if (NS_STYLE_DISPLAY_TABLE_CAPTION != displayVal && |
| 377 |
NS_STYLE_DISPLAY_TABLE_ROW_GROUP != displayVal && |
378 |
NS_STYLE_DISPLAY_TABLE_ROW_GROUP != displayVal && |
| 378 |
NS_STYLE_DISPLAY_TABLE_HEADER_GROUP != displayVal && |
379 |
NS_STYLE_DISPLAY_TABLE_HEADER_GROUP != displayVal && |
| 379 |
NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP != displayVal && |
380 |
NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP != displayVal && |
| 380 |
NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP != displayVal && |
381 |
NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP != displayVal && |
| 381 |
NS_STYLE_DISPLAY_TABLE_COLUMN != displayVal && |
382 |
NS_STYLE_DISPLAY_TABLE_COLUMN != displayVal && |
| 382 |
NS_STYLE_DISPLAY_TABLE_ROW != displayVal && |
383 |
NS_STYLE_DISPLAY_TABLE_ROW != displayVal && |
| 383 |
NS_STYLE_DISPLAY_TABLE_CELL != displayVal) { |
384 |
NS_STYLE_DISPLAY_TABLE_CELL != displayVal && |
|
|
385 |
NS_STYLE_DISPLAY_CONTENTS != displayVal) { |
| 384 |
|
386 |
|
| 385 |
// NOTE: Technically, we shouldn't modify the 'display' value of |
387 |
// NOTE: Technically, we shouldn't modify the 'display' value of |
| 386 |
// positioned elements, since they aren't flex items. However, we don't |
388 |
// positioned elements, since they aren't flex items. However, we don't |
| 387 |
// need to worry about checking for that, because if we're positioned, |
389 |
// need to worry about checking for that, because if we're positioned, |
| 388 |
// we'll have already been through a call to EnsureBlockDisplay() in |
390 |
// we'll have already been through a call to EnsureBlockDisplay() in |
| 389 |
// nsRuleNode, so this call here won't change anything. So we're OK. |
391 |
// nsRuleNode, so this call here won't change anything. So we're OK. |
| 390 |
nsRuleNode::EnsureBlockDisplay(displayVal); |
392 |
nsRuleNode::EnsureBlockDisplay(displayVal); |
| 391 |
if (displayVal != disp->mDisplay) { |
393 |
if (displayVal != disp->mDisplay) { |