Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 959 svg_style.SetBaselineShift(BS_SUB); | 959 svg_style.SetBaselineShift(BS_SUB); |
| 960 return; | 960 return; |
| 961 case CSSValueSuper: | 961 case CSSValueSuper: |
| 962 svg_style.SetBaselineShift(BS_SUPER); | 962 svg_style.SetBaselineShift(BS_SUPER); |
| 963 return; | 963 return; |
| 964 default: | 964 default: |
| 965 NOTREACHED(); | 965 NOTREACHED(); |
| 966 } | 966 } |
| 967 } | 967 } |
| 968 | 968 |
| 969 void StyleBuilderFunctions::applyInitialCSSPropertyPosition( | |
| 970 StyleResolverState& state) { | |
| 971 state.Style()->SetPosition(ComputedStyle::InitialPosition()); | |
| 972 state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); | |
| 973 } | |
| 974 | |
| 969 void StyleBuilderFunctions::applyInheritCSSPropertyPosition( | 975 void StyleBuilderFunctions::applyInheritCSSPropertyPosition( |
| 970 StyleResolverState& state) { | 976 StyleResolverState& state) { |
| 971 if (!state.ParentNode()->IsDocumentNode()) | 977 if (!state.ParentNode()->IsDocumentNode()) |
| 972 state.Style()->SetPosition(state.ParentStyle()->GetPosition()); | 978 state.Style()->SetPosition(state.ParentStyle()->GetPosition()); |
| 979 state.Style()->SetIsInStickySubtree(state.ParentStyle()->IsInStickySubtree()); | |
|
flackr
2017/04/27 15:50:02
I patched this in and I only see StyleBuilderFunct
smcgruer
2017/04/27 16:05:28
Did you set position to inherit? That is the case
flackr
2017/04/27 17:17:01
But if the methods don't get called automatically
flackr
2017/04/27 17:20:53
Looks like it doesn't get inherited to the descend
flackr
2017/04/27 19:20:51
Nevermind I was mistakenly assuming the offsetTop
smcgruer
2017/04/28 18:20:37
Done.
| |
| 980 } | |
| 981 | |
| 982 void StyleBuilderFunctions::applyValueCSSPropertyPosition( | |
| 983 StyleResolverState& state, | |
| 984 const CSSValue& value) { | |
| 985 EPosition position = ToCSSIdentifierValue(value).ConvertTo<EPosition>(); | |
| 986 state.Style()->SetPosition(position); | |
| 987 state.Style()->SetIsInStickySubtree(position == EPosition::kSticky || | |
| 988 state.ParentStyle()->IsInStickySubtree()); | |
| 973 } | 989 } |
| 974 | 990 |
| 975 void StyleBuilderFunctions::applyInitialCSSPropertyCaretColor( | 991 void StyleBuilderFunctions::applyInitialCSSPropertyCaretColor( |
| 976 StyleResolverState& state) { | 992 StyleResolverState& state) { |
| 977 StyleAutoColor color = StyleAutoColor::AutoColor(); | 993 StyleAutoColor color = StyleAutoColor::AutoColor(); |
| 978 if (state.ApplyPropertyToRegularStyle()) | 994 if (state.ApplyPropertyToRegularStyle()) |
| 979 state.Style()->SetCaretColor(color); | 995 state.Style()->SetCaretColor(color); |
| 980 if (state.ApplyPropertyToVisitedLinkStyle()) | 996 if (state.ApplyPropertyToVisitedLinkStyle()) |
| 981 state.Style()->SetVisitedLinkCaretColor(color); | 997 state.Style()->SetVisitedLinkCaretColor(color); |
| 982 } | 998 } |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 997 state.Style()->SetCaretColor( | 1013 state.Style()->SetCaretColor( |
| 998 StyleBuilderConverter::ConvertStyleAutoColor(state, value)); | 1014 StyleBuilderConverter::ConvertStyleAutoColor(state, value)); |
| 999 } | 1015 } |
| 1000 if (state.ApplyPropertyToVisitedLinkStyle()) { | 1016 if (state.ApplyPropertyToVisitedLinkStyle()) { |
| 1001 state.Style()->SetVisitedLinkCaretColor( | 1017 state.Style()->SetVisitedLinkCaretColor( |
| 1002 StyleBuilderConverter::ConvertStyleAutoColor(state, value, true)); | 1018 StyleBuilderConverter::ConvertStyleAutoColor(state, value, true)); |
| 1003 } | 1019 } |
| 1004 } | 1020 } |
| 1005 | 1021 |
| 1006 } // namespace blink | 1022 } // namespace blink |
| OLD | NEW |