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

Side by Side Diff: xfa/src/fdp/src/css/fde_cssdatatable.cpp

Issue 1730553002: Fixing whitespace lint errors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 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 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/src/fdp/src/css/fde_cssdatatable.h" 7 #include "xfa/src/fdp/src/css/fde_cssdatatable.h"
8 #include "xfa/src/foxitlib.h" 8 #include "xfa/src/foxitlib.h"
9 9
10 FX_BOOL FDE_CSSLengthToFloat(const FDE_CSSLENGTH& len, 10 FX_BOOL FDE_CSSLengthToFloat(const FDE_CSSLENGTH& len,
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 iLength = SkipTo(m_Separator, TRUE, TRUE); 836 iLength = SkipTo(m_Separator, TRUE, TRUE);
837 eType = FDE_CSSPRIMITIVETYPE_String; 837 eType = FDE_CSSPRIMITIVETYPE_String;
838 } 838 }
839 return m_pCur <= m_pEnd && iLength > 0; 839 return m_pCur <= m_pEnd && iLength > 0;
840 } 840 }
841 int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch, 841 int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch,
842 FX_BOOL bWSSeparator, 842 FX_BOOL bWSSeparator,
843 FX_BOOL bBrContinue) { 843 FX_BOOL bBrContinue) {
844 const FX_WCHAR* pStart = m_pCur; 844 const FX_WCHAR* pStart = m_pCur;
845 if (!bBrContinue) { 845 if (!bBrContinue) {
846 if (bWSSeparator) 846 if (bWSSeparator) {
847 while (++m_pCur<m_pEnd&& * m_pCur != wch&& * m_pCur> ' ') 847 while ((++m_pCur < m_pEnd) && (*m_pCur != wch) && (*m_pCur > ' ')) {
dsinclair 2016/02/23 15:53:59 I added ()'s to this to keep git cl format from do
Tom Sepez 2016/02/23 17:44:19 Really? That's bad. I've not seen it do that befo
dsinclair 2016/02/23 19:14:01 Acknowledged.
848 ; 848 }
849 else 849 } else {
850 while (++m_pCur < m_pEnd && *m_pCur != wch) 850 while (++m_pCur < m_pEnd && *m_pCur != wch) {
851 ; 851 }
852 }
853
852 } else { 854 } else {
853 int32_t iBracketCount = 0; 855 int32_t iBracketCount = 0;
854 if (bWSSeparator) { 856 if (bWSSeparator) {
855 while (m_pCur<m_pEnd&& * m_pCur != wch&& * m_pCur> ' ') { 857 while ((m_pCur < m_pEnd) && (*m_pCur != wch) && (*m_pCur > ' ')) {
856 if (*m_pCur == '(') { 858 if (*m_pCur == '(') {
857 iBracketCount++; 859 iBracketCount++;
858 } else if (*m_pCur == ')') { 860 } else if (*m_pCur == ')') {
859 iBracketCount--; 861 iBracketCount--;
860 } 862 }
861 m_pCur++; 863 m_pCur++;
862 } 864 }
863 } else { 865 } else {
864 while (m_pCur < m_pEnd && *m_pCur != wch) { 866 while (m_pCur < m_pEnd && *m_pCur != wch) {
865 if (*m_pCur == '(') { 867 if (*m_pCur == '(') {
866 iBracketCount++; 868 iBracketCount++;
867 } else if (*m_pCur == ')') { 869 } else if (*m_pCur == ')') {
868 iBracketCount--; 870 iBracketCount--;
869 } 871 }
870 m_pCur++; 872 m_pCur++;
871 } 873 }
872 } 874 }
873 while (iBracketCount > 0 && m_pCur < m_pEnd) { 875 while (iBracketCount > 0 && m_pCur < m_pEnd) {
874 if (*m_pCur == ')') { 876 if (*m_pCur == ')') {
875 iBracketCount--; 877 iBracketCount--;
876 } 878 }
877 m_pCur++; 879 m_pCur++;
878 } 880 }
879 } 881 }
880 return m_pCur - pStart; 882 return m_pCur - pStart;
881 } 883 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698