OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
6 * All rights reserved. | 6 * All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
686 | 686 |
687 if (base_computed_style) { | 687 if (base_computed_style) { |
688 state.SetStyle(ComputedStyle::Clone(*base_computed_style)); | 688 state.SetStyle(ComputedStyle::Clone(*base_computed_style)); |
689 if (!state.ParentStyle()) { | 689 if (!state.ParentStyle()) { |
690 state.SetParentStyle(InitialStyleForElement()); | 690 state.SetParentStyle(InitialStyleForElement()); |
691 state.SetLayoutParentStyle(state.ParentStyle()); | 691 state.SetLayoutParentStyle(state.ParentStyle()); |
692 } | 692 } |
693 } else { | 693 } else { |
694 if (state.ParentStyle()) { | 694 if (state.ParentStyle()) { |
695 RefPtr<ComputedStyle> style = ComputedStyle::Create(); | 695 RefPtr<ComputedStyle> style = ComputedStyle::Create(); |
696 style->InheritFrom(*state.ParentStyle(), | 696 style->InheritFrom( |
697 IsAtShadowBoundary(element) | 697 *state.ParentStyle(), |
698 ? ComputedStyleBase::kAtShadowBoundary | 698 IsAtShadowBoundary(element) |
699 : ComputedStyleBase::kNotAtShadowBoundary); | 699 ? ComputedStyleBase<ComputedStyle>::kAtShadowBoundary |
700 : ComputedStyleBase<ComputedStyle>::kNotAtShadowBoundary); | |
alancutter (OOO until 2018)
2017/05/12 06:45:43
Can this just be ComputedStyle::kEnumValue?
nainar
2017/05/12 06:59:18
Yup, Done.
| |
700 state.SetStyle(std::move(style)); | 701 state.SetStyle(std::move(style)); |
701 } else { | 702 } else { |
702 state.SetStyle(InitialStyleForElement()); | 703 state.SetStyle(InitialStyleForElement()); |
703 state.SetParentStyle(ComputedStyle::Clone(*state.Style())); | 704 state.SetParentStyle(ComputedStyle::Clone(*state.Style())); |
704 state.SetLayoutParentStyle(state.ParentStyle()); | 705 state.SetLayoutParentStyle(state.ParentStyle()); |
705 } | 706 } |
706 } | 707 } |
707 | 708 |
708 // contenteditable attribute (implemented by -webkit-user-modify) should | 709 // contenteditable attribute (implemented by -webkit-user-modify) should |
709 // be propagated from shadow host to distributed node. | 710 // be propagated from shadow host to distributed node. |
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2034 | 2035 |
2035 DEFINE_TRACE(StyleResolver) { | 2036 DEFINE_TRACE(StyleResolver) { |
2036 visitor->Trace(matched_properties_cache_); | 2037 visitor->Trace(matched_properties_cache_); |
2037 visitor->Trace(selector_filter_); | 2038 visitor->Trace(selector_filter_); |
2038 visitor->Trace(style_sharing_lists_); | 2039 visitor->Trace(style_sharing_lists_); |
2039 visitor->Trace(document_); | 2040 visitor->Trace(document_); |
2040 visitor->Trace(tracker_); | 2041 visitor->Trace(tracker_); |
2041 } | 2042 } |
2042 | 2043 |
2043 } // namespace blink | 2044 } // namespace blink |
OLD | NEW |