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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 if (style.display() == EDisplay::kContents) | 333 if (style.display() == EDisplay::kContents) |
334 return; | 334 return; |
335 | 335 |
336 // FIXME: Don't support this mutation for pseudo styles like first-letter or | 336 // FIXME: Don't support this mutation for pseudo styles like first-letter or |
337 // first-line, since it's not completely clear how that should work. | 337 // first-line, since it's not completely clear how that should work. |
338 if (style.display() == EDisplay::kInline && | 338 if (style.display() == EDisplay::kInline && |
339 style.styleType() == PseudoIdNone && | 339 style.styleType() == PseudoIdNone && |
340 style.getWritingMode() != layoutParentStyle.getWritingMode()) | 340 style.getWritingMode() != layoutParentStyle.getWritingMode()) |
341 style.setDisplay(EDisplay::kInlineBlock); | 341 style.setDisplay(EDisplay::kInlineBlock); |
342 | 342 |
343 // We do not honor position: relative or sticky for table rows, headers, and | 343 // We do not honor position: relative for table rows, headers, and footers. |
344 // footers. This is correct for position: relative in CSS2.1 (and caused a | 344 // This is correct for CSS2.1 (and honoring it caused a crash in |
345 // crash in containingBlock() on some sites) and position: sticky is defined | 345 // containingBlock() on some sites). It is incorrect for CSS3. |
346 // as following position: relative behavior for table elements. It is | |
347 // incorrect for CSS3. | |
348 if ((style.display() == EDisplay::kTableHeaderGroup || | 346 if ((style.display() == EDisplay::kTableHeaderGroup || |
349 style.display() == EDisplay::kTableRowGroup || | 347 style.display() == EDisplay::kTableRowGroup || |
350 style.display() == EDisplay::kTableFooterGroup || | 348 style.display() == EDisplay::kTableFooterGroup || |
351 style.display() == EDisplay::kTableRow) && | 349 style.display() == EDisplay::kTableRow) && |
352 style.hasInFlowPosition()) | 350 style.position() == EPosition::kRelative) |
mstensho (USE GERRIT)
2017/03/29 18:27:55
This change will let e.g. a table-row act as a con
| |
353 style.setPosition(EPosition::kStatic); | 351 style.setPosition(EPosition::kStatic); |
354 | 352 |
355 // Cannot support position: sticky for table columns and column groups because | 353 // Cannot support position: sticky for table columns and column groups because |
356 // current code is only doing background painting through columns / column | 354 // current code is only doing background painting through columns / column |
357 // groups. | 355 // groups. |
358 if ((style.display() == EDisplay::kTableColumnGroup || | 356 if ((style.display() == EDisplay::kTableColumnGroup || |
359 style.display() == EDisplay::kTableColumn) && | 357 style.display() == EDisplay::kTableColumn) && |
360 style.position() == EPosition::kSticky) | 358 style.position() == EPosition::kSticky) |
361 style.setPosition(EPosition::kStatic); | 359 style.setPosition(EPosition::kStatic); |
362 | 360 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
506 style.setDisplay(EDisplay::kBlock); | 504 style.setDisplay(EDisplay::kBlock); |
507 | 505 |
508 // Columns don't apply to svg text elements. | 506 // Columns don't apply to svg text elements. |
509 if (isSVGTextElement(*element)) | 507 if (isSVGTextElement(*element)) |
510 style.clearMultiCol(); | 508 style.clearMultiCol(); |
511 } | 509 } |
512 adjustStyleForAlignment(style, layoutParentStyle); | 510 adjustStyleForAlignment(style, layoutParentStyle); |
513 } | 511 } |
514 | 512 |
515 } // namespace blink | 513 } // namespace blink |
OLD | NEW |