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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2365263002: Added isComputedStyle::isDisplayTableType() and made it static (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 return true; 708 return true;
709 709
710 if (m_nonInheritedData.m_overflowX != other.m_nonInheritedData.m_overflowX 710 if (m_nonInheritedData.m_overflowX != other.m_nonInheritedData.m_overflowX
711 || m_nonInheritedData.m_overflowY != other.m_nonInheritedData.m_overflow Y 711 || m_nonInheritedData.m_overflowY != other.m_nonInheritedData.m_overflow Y
712 || m_nonInheritedData.m_clear != other.m_nonInheritedData.m_clear 712 || m_nonInheritedData.m_clear != other.m_nonInheritedData.m_clear
713 || m_nonInheritedData.m_unicodeBidi != other.m_nonInheritedData.m_unicod eBidi 713 || m_nonInheritedData.m_unicodeBidi != other.m_nonInheritedData.m_unicod eBidi
714 || m_nonInheritedData.m_floating != other.m_nonInheritedData.m_floating 714 || m_nonInheritedData.m_floating != other.m_nonInheritedData.m_floating
715 || m_nonInheritedData.m_originalDisplay != other.m_nonInheritedData.m_or iginalDisplay) 715 || m_nonInheritedData.m_originalDisplay != other.m_nonInheritedData.m_or iginalDisplay)
716 return true; 716 return true;
717 717
718 if (m_nonInheritedData.m_effectiveDisplay >= FIRST_TABLE_DISPLAY && m_nonInh eritedData.m_effectiveDisplay <= LAST_TABLE_DISPLAY) { 718 if (isDisplayTableType(display())) {
719 if (m_inheritedData.m_borderCollapse != other.m_inheritedData.m_borderCo llapse 719 if (m_inheritedData.m_borderCollapse != other.m_inheritedData.m_borderCo llapse
720 || m_inheritedData.m_emptyCells != other.m_inheritedData.m_emptyCell s 720 || m_inheritedData.m_emptyCells != other.m_inheritedData.m_emptyCell s
721 || m_inheritedData.m_captionSide != other.m_inheritedData.m_captionS ide 721 || m_inheritedData.m_captionSide != other.m_inheritedData.m_captionS ide
722 || m_nonInheritedData.m_tableLayout != other.m_nonInheritedData.m_ta bleLayout) 722 || m_nonInheritedData.m_tableLayout != other.m_nonInheritedData.m_ta bleLayout)
723 return true; 723 return true;
724 724
725 // In the collapsing border model, 'hidden' suppresses other borders, wh ile 'none' 725 // In the collapsing border model, 'hidden' suppresses other borders, wh ile 'none'
726 // does not, so these style differences can be width differences. 726 // does not, so these style differences can be width differences.
727 if (m_inheritedData.m_borderCollapse 727 if (m_inheritedData.m_borderCollapse
728 && ((borderTopStyle() == BorderStyleHidden && other.borderTopStyle() == BorderStyleNone) 728 && ((borderTopStyle() == BorderStyleHidden && other.borderTopStyle() == BorderStyleNone)
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 if (value < 0) 2053 if (value < 0)
2054 fvalue -= 0.5f; 2054 fvalue -= 0.5f;
2055 else 2055 else
2056 fvalue += 0.5f; 2056 fvalue += 0.5f;
2057 } 2057 }
2058 2058
2059 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2059 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2060 } 2060 }
2061 2061
2062 } // namespace blink 2062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698