| OLD | NEW | 
|     1 /* |     1 /* | 
|     2  * Copyright (C) 2011 Google Inc. All rights reserved. |     2  * Copyright (C) 2011 Google Inc. All rights reserved. | 
|     3  * |     3  * | 
|     4  * Redistribution and use in source and binary forms, with or without |     4  * Redistribution and use in source and binary forms, with or without | 
|     5  * modification, are permitted provided that the following conditions |     5  * modification, are permitted provided that the following conditions | 
|     6  * are met: |     6  * are met: | 
|     7  * 1.  Redistributions of source code must retain the above copyright |     7  * 1.  Redistributions of source code must retain the above copyright | 
|     8  *     notice, this list of conditions and the following disclaimer. |     8  *     notice, this list of conditions and the following disclaimer. | 
|     9  * 2.  Redistributions in binary form must reproduce the above copyright |     9  * 2.  Redistributions in binary form must reproduce the above copyright | 
|    10  *     notice, this list of conditions and the following disclaimer in the |    10  *     notice, this list of conditions and the following disclaimer in the | 
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   580         if (normalEnabled && ident == CSSValueNormal) { |   580         if (normalEnabled && ident == CSSValueNormal) { | 
|   581             length = 0; |   581             length = 0; | 
|   582         } else if (thicknessEnabled && ident == CSSValueThin) { |   582         } else if (thicknessEnabled && ident == CSSValueThin) { | 
|   583             length = 1; |   583             length = 1; | 
|   584         } else if (thicknessEnabled && ident == CSSValueMedium) { |   584         } else if (thicknessEnabled && ident == CSSValueMedium) { | 
|   585             length = 3; |   585             length = 3; | 
|   586         } else if (thicknessEnabled && ident == CSSValueThick) { |   586         } else if (thicknessEnabled && ident == CSSValueThick) { | 
|   587             length = 5; |   587             length = 5; | 
|   588         } else if (ident == CSSValueInvalid) { |   588         } else if (ident == CSSValueInvalid) { | 
|   589             float zoom = (svgZoomEnabled && styleResolver->useSVGZoomRules()) ? 
      1.0f : styleResolver->style()->effectiveZoom(); |   589             float zoom = (svgZoomEnabled && styleResolver->useSVGZoomRules()) ? 
      1.0f : styleResolver->style()->effectiveZoom(); | 
|   590             length = primitiveValue->computeLength<T>(styleResolver->style(), st
      yleResolver->rootElementStyle(), zoom); |   590  | 
 |   591             // Any original result that was >= 1 should not be allowed to fall b
      elow 1. | 
 |   592             // This keeps border lines from vanishing. | 
 |   593             length = primitiveValue->computeLength<T>(styleResolver->style(), st
      yleResolver->rootElementStyle(), 1.0); | 
 |   594             T zoomedLength = length * zoom; | 
 |   595             if (zoom < 1.0f && zoomedLength < 1.0 && length >= 1.0) | 
 |   596                 length = 1.0; | 
 |   597             else | 
 |   598                 length = zoomedLength; | 
 |   599  | 
|   591         } else { |   600         } else { | 
|   592             ASSERT_NOT_REACHED(); |   601             ASSERT_NOT_REACHED(); | 
|   593             length = 0; |   602             length = 0; | 
|   594         } |   603         } | 
|   595  |   604  | 
|   596         setValue(styleResolver->style(), length); |   605         setValue(styleResolver->style(), length); | 
|   597     } |   606     } | 
|   598     static PropertyHandler createHandler() |   607     static PropertyHandler createHandler() | 
|   599     { |   608     { | 
|   600         PropertyHandler handler = ApplyPropertyDefaultBase<T, getterFunction, T,
       setterFunction, T, initialFunction>::createHandler(); |   609         PropertyHandler handler = ApplyPropertyDefaultBase<T, getterFunction, T,
       setterFunction, T, initialFunction>::createHandler(); | 
| (...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2072     setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width
      , &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabl
      ed, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled>::createHandler()); |  2081     setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width
      , &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabl
      ed, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled>::createHandler()); | 
|  2073     setPropertyHandler(CSSPropertyWordBreak, ApplyPropertyDefault<EWordBreak, &R
      enderStyle::wordBreak, EWordBreak, &RenderStyle::setWordBreak, EWordBreak, &Rend
      erStyle::initialWordBreak>::createHandler()); |  2082     setPropertyHandler(CSSPropertyWordBreak, ApplyPropertyDefault<EWordBreak, &R
      enderStyle::wordBreak, EWordBreak, &RenderStyle::setWordBreak, EWordBreak, &Rend
      erStyle::initialWordBreak>::createHandler()); | 
|  2074     setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &
      RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLet
      terWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler
      ()); |  2083     setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &
      RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLet
      terWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler
      ()); | 
|  2075     setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault<EWordWrap, &Ren
      derStyle::wordWrap, EWordWrap, &RenderStyle::setWordWrap, EWordWrap, &RenderStyl
      e::initialWordWrap>::createHandler()); |  2084     setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault<EWordWrap, &Ren
      derStyle::wordWrap, EWordWrap, &RenderStyle::setWordWrap, EWordWrap, &RenderStyl
      e::initialWordWrap>::createHandler()); | 
|  2076     setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::z
      Index, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHa
      sAutoZIndex>::createHandler()); |  2085     setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::z
      Index, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHa
      sAutoZIndex>::createHandler()); | 
|  2077     setPropertyHandler(CSSPropertyZoom, ApplyPropertyZoom::createHandler()); |  2086     setPropertyHandler(CSSPropertyZoom, ApplyPropertyZoom::createHandler()); | 
|  2078 } |  2087 } | 
|  2079  |  2088  | 
|  2080  |  2089  | 
|  2081 } |  2090 } | 
| OLD | NEW |