Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 1607703003: Don't force display:inline-table/table on table elements when in quirks mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/quirks-mode-ignore-display-inline-table.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // we don't actually use NOWRAP. 356 // we don't actually use NOWRAP.
357 if (style.width().isFixed()) 357 if (style.width().isFixed())
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
367 // these tags to retain their display types.
368 if (m_useQuirksModeStyles)
369 style.setDisplay(style.isDisplayInlineType() ? INLINE_TABLE : TABLE) ;
370 // Tables never support the -webkit-* values for text-align and will res et back to the default. 366 // 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) 367 if (style.textAlign() == WEBKIT_LEFT || style.textAlign() == WEBKIT_CENT ER || style.textAlign() == WEBKIT_RIGHT)
372 style.setTextAlign(TASTART); 368 style.setTextAlign(TASTART);
373 return; 369 return;
374 } 370 }
375 371
376 if (isHTMLFrameElement(element) || isHTMLFrameSetElement(element)) { 372 if (isHTMLFrameElement(element) || isHTMLFrameSetElement(element)) {
377 // Frames and framesets never honor position:relative or position:absolu te. This is necessary to 373 // 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. 374 // fix a crash where a site tries to position these objects. They also n ever honor display.
379 style.setPosition(StaticPosition); 375 style.setPosition(StaticPosition);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 // We want to count vertical percentage paddings/margins on flex items b ecause our current 479 // We want to count vertical percentage paddings/margins on flex items b ecause our current
484 // behavior is different from the spec and we want to gather compatibili ty data. 480 // behavior is different from the spec and we want to gather compatibili ty data.
485 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t()) 481 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t())
486 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical); 482 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical);
487 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( )) 483 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( ))
488 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal); 484 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal);
489 } 485 }
490 } 486 }
491 487
492 } 488 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/quirks-mode-ignore-display-inline-table.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698