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

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

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Add documentation Created 3 years, 5 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 3748 matching lines...) Expand 10 before | Expand all | Expand 10 after
3759 style); 3759 style);
3760 case CSSPropertyScrollSnapMarginBlockEnd: 3760 case CSSPropertyScrollSnapMarginBlockEnd:
3761 return ZoomAdjustedPixelValueForLength(style.ScrollSnapMarginBlockEnd(), 3761 return ZoomAdjustedPixelValueForLength(style.ScrollSnapMarginBlockEnd(),
3762 style); 3762 style);
3763 case CSSPropertyScrollSnapMarginInlineStart: 3763 case CSSPropertyScrollSnapMarginInlineStart:
3764 return ZoomAdjustedPixelValueForLength( 3764 return ZoomAdjustedPixelValueForLength(
3765 style.ScrollSnapMarginInlineStart(), style); 3765 style.ScrollSnapMarginInlineStart(), style);
3766 case CSSPropertyScrollSnapMarginInlineEnd: 3766 case CSSPropertyScrollSnapMarginInlineEnd:
3767 return ZoomAdjustedPixelValueForLength(style.ScrollSnapMarginInlineEnd(), 3767 return ZoomAdjustedPixelValueForLength(style.ScrollSnapMarginInlineEnd(),
3768 style); 3768 style);
3769 case CSSPropertyScrollBoundaryBehavior:
3770 if (style.ScrollBoundaryBehaviorX() == style.ScrollBoundaryBehaviorY())
3771 return CSSIdentifierValue::Create(style.ScrollBoundaryBehaviorX());
3772 return nullptr;
3773 case CSSPropertyScrollBoundaryBehaviorX:
3774 return CSSIdentifierValue::Create(style.ScrollBoundaryBehaviorX());
3775 case CSSPropertyScrollBoundaryBehaviorY:
3776 return CSSIdentifierValue::Create(style.ScrollBoundaryBehaviorY());
3769 case CSSPropertyTranslate: { 3777 case CSSPropertyTranslate: {
3770 if (!style.Translate()) 3778 if (!style.Translate())
3771 return CSSIdentifierValue::Create(CSSValueNone); 3779 return CSSIdentifierValue::Create(CSSValueNone);
3772 3780
3773 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); 3781 CSSValueList* list = CSSValueList::CreateSpaceSeparated();
3774 if (layout_object && layout_object->IsBox()) { 3782 if (layout_object && layout_object->IsBox()) {
3775 LayoutRect box = ToLayoutBox(layout_object)->BorderBoxRect(); 3783 LayoutRect box = ToLayoutBox(layout_object)->BorderBoxRect();
3776 list->Append(*ZoomAdjustedPixelValue( 3784 list->Append(*ZoomAdjustedPixelValue(
3777 FloatValueForLength(style.Translate()->X(), box.Width().ToFloat()), 3785 FloatValueForLength(style.Translate()->X(), box.Width().ToFloat()),
3778 style)); 3786 style));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3858 case CSSPropertyAll: 3866 case CSSPropertyAll:
3859 return nullptr; 3867 return nullptr;
3860 default: 3868 default:
3861 break; 3869 break;
3862 } 3870 }
3863 NOTREACHED(); 3871 NOTREACHED();
3864 return nullptr; 3872 return nullptr;
3865 } 3873 }
3866 3874
3867 } // namespace blink 3875 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698