Chromium Code Reviews| 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. |
|
Julien - ping for review
2014/03/13 01:08:06
Nit: Space after the colon.
ostap
2014/03/13 15:46:45
Done.
| |
| 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() == TABLE _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 style->setPosition(StaticPosition); | 269 style->setPosition(StaticPosition); |
| 270 | 270 |
| 271 // Do not allow position:sticky for table columns and column groups beca use table columns | |
|
Julien - ping for review
2014/03/13 01:08:06
Same nit.
ostap
2014/03/13 15:46:45
Done.
| |
| 272 // don't have RenderLayer | |
|
Julien - ping for review
2014/03/13 01:08:06
I don't think this is a good explanation. A better
ostap
2014/03/13 15:46:45
Done.
| |
| 273 if ((style->display() == TABLE_COLUMN_GROUP || style->display() == TABLE _COLUMN) | |
| 274 && style->position() == StickyPosition) | |
| 275 style->setPosition(StaticPosition); | |
| 276 | |
| 271 // writing-mode does not apply to table row groups, table column groups, table rows, and table columns. | 277 // 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. | 278 // 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 | 279 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 | 280 || style->display() == TABLE_HEADER_GROUP || style->display() == TAB LE_ROW || style->display() == TABLE_ROW_GROUP |
| 275 || style->display() == TABLE_CELL) | 281 || style->display() == TABLE_CELL) |
| 276 style->setWritingMode(parentStyle->writingMode()); | 282 style->setWritingMode(parentStyle->writingMode()); |
| 277 | 283 |
| 278 // FIXME: Since we don't support block-flow on flexible boxes yet, disal low setting | 284 // FIXME: Since we don't support block-flow on flexible boxes yet, disal low setting |
| 279 // of block-flow to anything other than TopToBottomWritingMode. | 285 // of block-flow to anything other than TopToBottomWritingMode. |
| 280 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. | 286 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 441 if (prop.isNamedGridArea() && !map.contains(prop.namedGridLine())) \ | 447 if (prop.isNamedGridArea() && !map.contains(prop.namedGridLine())) \ |
| 442 style->setGrid##Prop(GridPosition()); | 448 style->setGrid##Prop(GridPosition()); |
| 443 | 449 |
| 444 CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart); | 450 CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart); |
| 445 CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd); | 451 CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd); |
| 446 CLEAR_UNKNOWN_NAMED_AREA(rowStartPosition, RowStart); | 452 CLEAR_UNKNOWN_NAMED_AREA(rowStartPosition, RowStart); |
| 447 CLEAR_UNKNOWN_NAMED_AREA(rowEndPosition, RowEnd); | 453 CLEAR_UNKNOWN_NAMED_AREA(rowEndPosition, RowEnd); |
| 448 } | 454 } |
| 449 | 455 |
| 450 } | 456 } |
| OLD | NEW |