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

Side by Side Diff: Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 1328673003: Remove -webkit-line-box-contain implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix up a few more tests. Created 5 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * * Redistributions of source code must retain the above copyright 4 * * Redistributions of source code must retain the above copyright
5 * notice, this list of conditions and the following disclaimer. 5 * notice, this list of conditions and the following disclaimer.
6 * * Redistributions in binary form must reproduce the above 6 * * Redistributions in binary form must reproduce the above
7 * copyright notice, this list of conditions and the following disclaimer 7 * copyright notice, this list of conditions and the following disclaimer
8 * in the documentation and/or other materials provided with the 8 * in the documentation and/or other materials provided with the
9 * distribution. 9 * distribution.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 581 }
582 582
583 TabSize StyleBuilderConverter::convertLengthOrTabSpaces(StyleResolverState& stat e, CSSValue* value) 583 TabSize StyleBuilderConverter::convertLengthOrTabSpaces(StyleResolverState& stat e, CSSValue* value)
584 { 584 {
585 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 585 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
586 if (primitiveValue->isNumber()) 586 if (primitiveValue->isNumber())
587 return TabSize(primitiveValue->getIntValue()); 587 return TabSize(primitiveValue->getIntValue());
588 return TabSize(primitiveValue->computeLength<float>(state.cssToLengthConvers ionData())); 588 return TabSize(primitiveValue->computeLength<float>(state.cssToLengthConvers ionData()));
589 } 589 }
590 590
591 LineBoxContain StyleBuilderConverter::convertLineBoxContain(StyleResolverState&, CSSValue* value)
592 {
593 if (value->isPrimitiveValue()) {
594 ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNone);
595 return LineBoxContainNone;
596 }
597
598 return toCSSLineBoxContainValue(value)->value();
599 }
600
601 static CSSToLengthConversionData lineHeightToLengthConversionData(StyleResolverS tate& state) 591 static CSSToLengthConversionData lineHeightToLengthConversionData(StyleResolverS tate& state)
602 { 592 {
603 float multiplier = state.style()->effectiveZoom(); 593 float multiplier = state.style()->effectiveZoom();
604 if (LocalFrame* frame = state.document().frame()) 594 if (LocalFrame* frame = state.document().frame())
605 multiplier *= frame->textZoomFactor(); 595 multiplier *= frame->textZoomFactor();
606 return state.cssToLengthConversionData().copyWithAdjustedZoom(multiplier); 596 return state.cssToLengthConversionData().copyWithAdjustedZoom(multiplier);
607 } 597 }
608 598
609 Length StyleBuilderConverter::convertLineHeight(StyleResolverState& state, CSSVa lue* value) 599 Length StyleBuilderConverter::convertLineHeight(StyleResolverState& state, CSSVa lue* value)
610 { 600 {
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale 3D); 948 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale 3D);
959 } 949 }
960 950
961 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style ResolverState& state, CSSValue* value) 951 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style ResolverState& state, CSSValue* value)
962 { 952 {
963 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 953 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
964 return primitiveValue->getValueID() == CSSValueFromImage ? RespectImageOrien tation : DoNotRespectImageOrientation; 954 return primitiveValue->getValueID() == CSSValueFromImage ? RespectImageOrien tation : DoNotRespectImageOrientation;
965 } 955 }
966 956
967 } // namespace blink 957 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698