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

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

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Use only gpuBenchmarking. Created 3 years, 6 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 3643 matching lines...) Expand 10 before | Expand all | Expand 10 after
3654 return CSSIdentifierValue::Create(style.GetScrollSnapType()); 3654 return CSSIdentifierValue::Create(style.GetScrollSnapType());
3655 case CSSPropertyScrollSnapPointsX: 3655 case CSSPropertyScrollSnapPointsX:
3656 return ValueForScrollSnapPoints(style.ScrollSnapPointsX(), style); 3656 return ValueForScrollSnapPoints(style.ScrollSnapPointsX(), style);
3657 case CSSPropertyScrollSnapPointsY: 3657 case CSSPropertyScrollSnapPointsY:
3658 return ValueForScrollSnapPoints(style.ScrollSnapPointsY(), style); 3658 return ValueForScrollSnapPoints(style.ScrollSnapPointsY(), style);
3659 case CSSPropertyScrollSnapCoordinate: 3659 case CSSPropertyScrollSnapCoordinate:
3660 return ValueForScrollSnapCoordinate(style.ScrollSnapCoordinate(), style); 3660 return ValueForScrollSnapCoordinate(style.ScrollSnapCoordinate(), style);
3661 case CSSPropertyScrollSnapDestination: 3661 case CSSPropertyScrollSnapDestination:
3662 return ValueForScrollSnapDestination(style.ScrollSnapDestination(), 3662 return ValueForScrollSnapDestination(style.ScrollSnapDestination(),
3663 style); 3663 style);
3664 case CSSPropertyScrollBoundaryBehavior:
3665 if (style.ScrollBoundaryBehaviorX() == style.ScrollBoundaryBehaviorY())
3666 return CSSIdentifierValue::Create(style.ScrollBoundaryBehaviorX());
3667 return nullptr;
3668 case CSSPropertyScrollBoundaryBehaviorX:
3669 return CSSIdentifierValue::Create(style.ScrollBoundaryBehaviorX());
3670 case CSSPropertyScrollBoundaryBehaviorY:
3671 return CSSIdentifierValue::Create(style.ScrollBoundaryBehaviorY());
3664 case CSSPropertyTranslate: { 3672 case CSSPropertyTranslate: {
3665 if (!style.Translate()) 3673 if (!style.Translate())
3666 return CSSIdentifierValue::Create(CSSValueNone); 3674 return CSSIdentifierValue::Create(CSSValueNone);
3667 3675
3668 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); 3676 CSSValueList* list = CSSValueList::CreateSpaceSeparated();
3669 if (layout_object && layout_object->IsBox()) { 3677 if (layout_object && layout_object->IsBox()) {
3670 LayoutRect box = ToLayoutBox(layout_object)->BorderBoxRect(); 3678 LayoutRect box = ToLayoutBox(layout_object)->BorderBoxRect();
3671 list->Append(*ZoomAdjustedPixelValue( 3679 list->Append(*ZoomAdjustedPixelValue(
3672 FloatValueForLength(style.Translate()->X(), box.Width().ToFloat()), 3680 FloatValueForLength(style.Translate()->X(), box.Width().ToFloat()),
3673 style)); 3681 style));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3753 case CSSPropertyAll: 3761 case CSSPropertyAll:
3754 return nullptr; 3762 return nullptr;
3755 default: 3763 default:
3756 break; 3764 break;
3757 } 3765 }
3758 NOTREACHED(); 3766 NOTREACHED();
3759 return nullptr; 3767 return nullptr;
3760 } 3768 }
3761 3769
3762 } // namespace blink 3770 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698