| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 if (style.display() == EDisplay::Contents) | 332 if (style.display() == EDisplay::Contents) |
| 333 return; | 333 return; |
| 334 | 334 |
| 335 // FIXME: Don't support this mutation for pseudo styles like first-letter or | 335 // FIXME: Don't support this mutation for pseudo styles like first-letter or |
| 336 // first-line, since it's not completely clear how that should work. | 336 // first-line, since it's not completely clear how that should work. |
| 337 if (style.display() == EDisplay::Inline && | 337 if (style.display() == EDisplay::Inline && |
| 338 style.styleType() == PseudoIdNone && | 338 style.styleType() == PseudoIdNone && |
| 339 style.getWritingMode() != layoutParentStyle.getWritingMode()) | 339 style.getWritingMode() != layoutParentStyle.getWritingMode()) |
| 340 style.setDisplay(EDisplay::InlineBlock); | 340 style.setDisplay(EDisplay::InlineBlock); |
| 341 | 341 |
| 342 // After performing the display mutation, check table rows. We do not honor | 342 // We do not honor position: relative or sticky for table rows, headers, and |
| 343 // position: relative table rows. This has been established for position: | 343 // footers. This is correct for position: relative in CSS2.1 (and caused a |
| 344 // relative in CSS2.1 (and caused a crash in containingBlock() on some sites). | 344 // crash in containingBlock() on some sites) and position: sticky is defined |
| 345 // as following position: relative behavior for table elements. It is |
| 346 // incorrect for CSS3. |
| 345 if ((style.display() == EDisplay::TableHeaderGroup || | 347 if ((style.display() == EDisplay::TableHeaderGroup || |
| 346 style.display() == EDisplay::TableRowGroup || | 348 style.display() == EDisplay::TableRowGroup || |
| 347 style.display() == EDisplay::TableFooterGroup || | 349 style.display() == EDisplay::TableFooterGroup || |
| 348 style.display() == EDisplay::TableRow) && | 350 style.display() == EDisplay::TableRow) && |
| 349 style.position() == EPosition::kRelative) | 351 style.hasInFlowPosition()) |
| 350 style.setPosition(EPosition::kStatic); | 352 style.setPosition(EPosition::kStatic); |
| 351 | 353 |
| 352 // Cannot support position: sticky for table columns and column groups because | 354 // Cannot support position: sticky for table columns and column groups because |
| 353 // current code is only doing background painting through columns / column | 355 // current code is only doing background painting through columns / column |
| 354 // groups. | 356 // groups. |
| 355 if ((style.display() == EDisplay::TableColumnGroup || | 357 if ((style.display() == EDisplay::TableColumnGroup || |
| 356 style.display() == EDisplay::TableColumn) && | 358 style.display() == EDisplay::TableColumn) && |
| 357 style.position() == EPosition::kSticky) | 359 style.position() == EPosition::kSticky) |
| 358 style.setPosition(EPosition::kStatic); | 360 style.setPosition(EPosition::kStatic); |
| 359 | 361 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 style.setDisplay(EDisplay::Block); | 505 style.setDisplay(EDisplay::Block); |
| 504 | 506 |
| 505 // Columns don't apply to svg text elements. | 507 // Columns don't apply to svg text elements. |
| 506 if (isSVGTextElement(*element)) | 508 if (isSVGTextElement(*element)) |
| 507 style.clearMultiCol(); | 509 style.clearMultiCol(); |
| 508 } | 510 } |
| 509 adjustStyleForAlignment(style, parentStyle); | 511 adjustStyleForAlignment(style, parentStyle); |
| 510 } | 512 } |
| 511 | 513 |
| 512 } // namespace blink | 514 } // namespace blink |
| OLD | NEW |