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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 style.setWhiteSpace(NORMAL); | 358 style.setWhiteSpace(NORMAL); |
| 359 else | 359 else |
| 360 style.setWhiteSpace(NOWRAP); | 360 style.setWhiteSpace(NOWRAP); |
| 361 } | 361 } |
| 362 return; | 362 return; |
| 363 } | 363 } |
| 364 | 364 |
| 365 if (isHTMLTableElement(element)) { | 365 if (isHTMLTableElement(element)) { |
| 366 // Sites commonly use display:inline/block on <td>s and <table>s. In qui rks mode we force | 366 // Sites commonly use display:inline/block on <td>s and <table>s. In qui rks mode we force |
| 367 // these tags to retain their display types. | 367 // these tags to retain their display types. |
| 368 if (m_useQuirksModeStyles) | 368 if (m_useQuirksModeStyles && style.display() != INLINE) |
| 369 style.setDisplay(style.isDisplayInlineType() ? INLINE_TABLE : TABLE) ; | 369 style.setDisplay(style.isDisplayInlineType() ? INLINE_TABLE : TABLE) ; |
|
rune
2016/01/19 09:54:51
We should just drop this whole quirk altogether, I
nainar
2016/01/19 10:44:11
I looked up the quirks spec - this isn't mentioned
nainar
2016/01/20 00:44:23
Done.
| |
| 370 // Tables never support the -webkit-* values for text-align and will res et back to the default. | 370 // Tables never support the -webkit-* values for text-align and will res et back to the default. |
| 371 if (style.textAlign() == WEBKIT_LEFT || style.textAlign() == WEBKIT_CENT ER || style.textAlign() == WEBKIT_RIGHT) | 371 if (style.textAlign() == WEBKIT_LEFT || style.textAlign() == WEBKIT_CENT ER || style.textAlign() == WEBKIT_RIGHT) |
| 372 style.setTextAlign(TASTART); | 372 style.setTextAlign(TASTART); |
| 373 return; | 373 return; |
| 374 } | 374 } |
| 375 | 375 |
| 376 if (isHTMLFrameElement(element) || isHTMLFrameSetElement(element)) { | 376 if (isHTMLFrameElement(element) || isHTMLFrameSetElement(element)) { |
| 377 // Frames and framesets never honor position:relative or position:absolu te. This is necessary to | 377 // Frames and framesets never honor position:relative or position:absolu te. This is necessary to |
| 378 // fix a crash where a site tries to position these objects. They also n ever honor display. | 378 // fix a crash where a site tries to position these objects. They also n ever honor display. |
| 379 style.setPosition(StaticPosition); | 379 style.setPosition(StaticPosition); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 // We want to count vertical percentage paddings/margins on flex items b ecause our current | 488 // We want to count vertical percentage paddings/margins on flex items b ecause our current |
| 489 // behavior is different from the spec and we want to gather compatibili ty data. | 489 // behavior is different from the spec and we want to gather compatibili ty data. |
| 490 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t()) | 490 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t()) |
| 491 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical); | 491 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical); |
| 492 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( )) | 492 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( )) |
| 493 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal); | 493 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal); |
| 494 } | 494 } |
| 495 } | 495 } |
| 496 | 496 |
| 497 } | 497 } |
| OLD | NEW |