| 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. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 if (style.display() == EDisplay::Block && !style.isFloating()) | 322 if (style.display() == EDisplay::Block && !style.isFloating()) |
| 323 return; | 323 return; |
| 324 | 324 |
| 325 // FIXME: Don't support this mutation for pseudo styles like first-letter or | 325 // FIXME: Don't support this mutation for pseudo styles like first-letter or |
| 326 // first-line, since it's not completely clear how that should work. | 326 // first-line, since it's not completely clear how that should work. |
| 327 if (style.display() == EDisplay::Inline && | 327 if (style.display() == EDisplay::Inline && |
| 328 style.styleType() == PseudoIdNone && | 328 style.styleType() == PseudoIdNone && |
| 329 style.getWritingMode() != parentStyle.getWritingMode()) | 329 style.getWritingMode() != parentStyle.getWritingMode()) |
| 330 style.setDisplay(EDisplay::InlineBlock); | 330 style.setDisplay(EDisplay::InlineBlock); |
| 331 | 331 |
| 332 // After performing the display mutation, check table rows. We do not honor | 332 // We do not honor position: relative or sticky for table rows, headers, and |
| 333 // position: relative table rows. This has been established for position: | 333 // footers. This is correct for position: relative in CSS2.1 (and caused a |
| 334 // relative in CSS2.1 (and caused a crash in containingBlock() on some sites). | 334 // crash in containingBlock() on some sites) and position: sticky is defined |
| 335 // as following position: relative behavior for table elements. It is |
| 336 // incorrect for CSS3. |
| 335 if ((style.display() == EDisplay::TableHeaderGroup || | 337 if ((style.display() == EDisplay::TableHeaderGroup || |
| 336 style.display() == EDisplay::TableRowGroup || | 338 style.display() == EDisplay::TableRowGroup || |
| 337 style.display() == EDisplay::TableFooterGroup || | 339 style.display() == EDisplay::TableFooterGroup || |
| 338 style.display() == EDisplay::TableRow) && | 340 style.display() == EDisplay::TableRow) && |
| 339 style.position() == RelativePosition) | 341 style.hasInFlowPosition()) |
| 340 style.setPosition(StaticPosition); | 342 style.setPosition(StaticPosition); |
| 341 | 343 |
| 342 // Cannot support position: sticky for table columns and column groups because | 344 // Cannot support position: sticky for table columns and column groups because |
| 343 // current code is only doing background painting through columns / column | 345 // current code is only doing background painting through columns / column |
| 344 // groups. | 346 // groups. |
| 345 if ((style.display() == EDisplay::TableColumnGroup || | 347 if ((style.display() == EDisplay::TableColumnGroup || |
| 346 style.display() == EDisplay::TableColumn) && | 348 style.display() == EDisplay::TableColumn) && |
| 347 style.position() == StickyPosition) | 349 style.position() == StickyPosition) |
| 348 style.setPosition(StaticPosition); | 350 style.setPosition(StaticPosition); |
| 349 | 351 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 style.setDisplay(EDisplay::Block); | 478 style.setDisplay(EDisplay::Block); |
| 477 | 479 |
| 478 // Columns don't apply to svg text elements. | 480 // Columns don't apply to svg text elements. |
| 479 if (isSVGTextElement(*element)) | 481 if (isSVGTextElement(*element)) |
| 480 style.clearMultiCol(); | 482 style.clearMultiCol(); |
| 481 } | 483 } |
| 482 adjustStyleForAlignment(style, parentStyle); | 484 adjustStyleForAlignment(style, parentStyle); |
| 483 } | 485 } |
| 484 | 486 |
| 485 } // namespace blink | 487 } // namespace blink |
| OLD | NEW |