OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 | 253 |
254 // Absolute/fixed positioned elements, floating elements and the documen t element need block-like outside display. | 254 // Absolute/fixed positioned elements, floating elements and the documen t element need block-like outside display. |
255 if (style->hasOutOfFlowPosition() || style->isFloating() || (e && e->doc ument().documentElement() == e)) | 255 if (style->hasOutOfFlowPosition() || style->isFloating() || (e && e->doc ument().documentElement() == e)) |
256 style->setDisplay(equivalentBlockDisplay(style->display(), style->is Floating(), !m_useQuirksModeStyles)); | 256 style->setDisplay(equivalentBlockDisplay(style->display(), style->is Floating(), !m_useQuirksModeStyles)); |
257 | 257 |
258 // FIXME: Don't support this mutation for pseudo styles like first-lette r or first-line, since it's not completely | 258 // FIXME: Don't support this mutation for pseudo styles like first-lette r or first-line, since it's not completely |
259 // clear how that should work. | 259 // clear how that should work. |
260 if (style->display() == INLINE && style->styleType() == NOPSEUDO && styl e->writingMode() != parentStyle->writingMode()) | 260 if (style->display() == INLINE && style->styleType() == NOPSEUDO && styl e->writingMode() != parentStyle->writingMode()) |
261 style->setDisplay(INLINE_BLOCK); | 261 style->setDisplay(INLINE_BLOCK); |
262 | 262 |
263 // After performing the display mutation, check table rows. We do not ho nor position:relative or position:sticky on | 263 // After performing the display mutation, check table rows. We do not ho nor position:relativetable rows or cells. |
264 // table rows or cells. This has been established for position:relative in CSS2.1 (and caused a crash in containingBlock() | 264 // This has been established for position:relative in CSS2.1 (and caused a crash in containingBlock() |
265 // on some sites). | 265 // on some sites). |
266 if ((style->display() == TABLE_HEADER_GROUP || style->display() == TABLE _ROW_GROUP | 266 if (((style->display() == TABLE_HEADER_GROUP || style->display() == TABL E_ROW_GROUP |
267 || style->display() == TABLE_FOOTER_GROUP || style->display() == TAB LE_ROW) | 267 || style->display() == TABLE_FOOTER_GROUP || style->display() == TAB LE_ROW) |
268 && style->position() == RelativePosition) | 268 && style->position() == RelativePosition) |
269 // Do not allow position:sticky for table columns and column groups because table columns | |
270 // don't have RenderLayer | |
271 || ((style->display() == TABLE_COLUMN_GROUP || style->display() == T ABLE_COLUMN) | |
272 && style->position() == StickyPosition)) | |
Julien - ping for review
2014/03/12 18:41:38
I would rather have that as a separate branch belo
ostap
2014/03/12 20:12:57
Done.
| |
269 style->setPosition(StaticPosition); | 273 style->setPosition(StaticPosition); |
270 | 274 |
271 // writing-mode does not apply to table row groups, table column groups, table rows, and table columns. | 275 // writing-mode does not apply to table row groups, table column groups, table rows, and table columns. |
272 // FIXME: Table cells should be allowed to be perpendicular or flipped w ith respect to the table, though. | 276 // FIXME: Table cells should be allowed to be perpendicular or flipped w ith respect to the table, though. |
273 if (style->display() == TABLE_COLUMN || style->display() == TABLE_COLUMN _GROUP || style->display() == TABLE_FOOTER_GROUP | 277 if (style->display() == TABLE_COLUMN || style->display() == TABLE_COLUMN _GROUP || style->display() == TABLE_FOOTER_GROUP |
274 || style->display() == TABLE_HEADER_GROUP || style->display() == TAB LE_ROW || style->display() == TABLE_ROW_GROUP | 278 || style->display() == TABLE_HEADER_GROUP || style->display() == TAB LE_ROW || style->display() == TABLE_ROW_GROUP |
275 || style->display() == TABLE_CELL) | 279 || style->display() == TABLE_CELL) |
276 style->setWritingMode(parentStyle->writingMode()); | 280 style->setWritingMode(parentStyle->writingMode()); |
277 | 281 |
278 // FIXME: Since we don't support block-flow on flexible boxes yet, disal low setting | 282 // FIXME: Since we don't support block-flow on flexible boxes yet, disal low setting |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 if (prop.isNamedGridArea() && !map.contains(prop.namedGridLine())) \ | 445 if (prop.isNamedGridArea() && !map.contains(prop.namedGridLine())) \ |
442 style->setGrid##Prop(GridPosition()); | 446 style->setGrid##Prop(GridPosition()); |
443 | 447 |
444 CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart); | 448 CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart); |
445 CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd); | 449 CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd); |
446 CLEAR_UNKNOWN_NAMED_AREA(rowStartPosition, RowStart); | 450 CLEAR_UNKNOWN_NAMED_AREA(rowStartPosition, RowStart); |
447 CLEAR_UNKNOWN_NAMED_AREA(rowEndPosition, RowEnd); | 451 CLEAR_UNKNOWN_NAMED_AREA(rowEndPosition, RowEnd); |
448 } | 452 } |
449 | 453 |
450 } | 454 } |
OLD | NEW |