OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
967 | 967 |
968 double scaledLeft = viewport->scrollPositionDouble().x(); | 968 double scaledLeft = viewport->scrollPositionDouble().x(); |
969 double scaledTop = viewport->scrollPositionDouble().y(); | 969 double scaledTop = viewport->scrollPositionDouble().y(); |
970 if (scrollToOptions.hasLeft()) | 970 if (scrollToOptions.hasLeft()) |
971 scaledLeft = ScrollableArea::normalizeNonFiniteScroll(scrollToOptions.le ft()) * frame->pageZoomFactor(); | 971 scaledLeft = ScrollableArea::normalizeNonFiniteScroll(scrollToOptions.le ft()) * frame->pageZoomFactor(); |
972 if (scrollToOptions.hasTop()) | 972 if (scrollToOptions.hasTop()) |
973 scaledTop = ScrollableArea::normalizeNonFiniteScroll(scrollToOptions.top ()) * frame->pageZoomFactor(); | 973 scaledTop = ScrollableArea::normalizeNonFiniteScroll(scrollToOptions.top ()) * frame->pageZoomFactor(); |
974 viewport->setScrollPosition(DoublePoint(scaledLeft, scaledTop), Programmatic Scroll, scrollBehavior); | 974 viewport->setScrollPosition(DoublePoint(scaledLeft, scaledTop), Programmatic Scroll, scrollBehavior); |
975 } | 975 } |
976 | 976 |
977 void Element::incrementProxyCount() | 977 bool Element::hasCompositorProxy() const |
978 { | 978 { |
979 if (ensureElementRareData().incrementProxyCount() == 1) | 979 return hasRareData() && elementRareData()->proxiedPropertyCounts(); |
980 } | |
981 | |
982 void Element::incrementCompositorProxiedProperties(uint32_t mutableProperties) | |
983 { | |
984 ElementRareData& rareData = ensureElementRareData(); | |
985 if (!rareData.proxiedPropertyCounts()) | |
986 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::CompositorProxy)); | |
987 rareData.incrementCompositorProxiedProperties(mutableProperties); | |
988 } | |
989 | |
990 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) | |
991 { | |
992 ElementRareData& rareData = *elementRareData(); | |
993 rareData.decrementCompositorProxiedProperties(mutableProperties); | |
994 if (!rareData.proxiedPropertyCounts()) | |
980 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::CompositorProxy)); | 995 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::CompositorProxy)); |
981 } | 996 } |
982 | 997 |
983 void Element::decrementProxyCount() | 998 uint32_t Element::compositorMutableProperties() const |
984 { | 999 { |
985 if (ensureElementRareData().decrementProxyCount() == 0) | 1000 if (!hasCompositorProxy()) |
esprehn
2015/12/07 20:54:24
this technically is a few extra branches and funct
Ian Vollick
2015/12/08 00:16:44
I did it!
| |
986 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::CompositorProxy)); | 1001 return WebCompositorMutablePropertyNone; |
1002 return elementRareData()->proxiedPropertyCounts()->proxiedProperties(); | |
987 } | 1003 } |
988 | 1004 |
989 bool Element::hasNonEmptyLayoutSize() const | 1005 bool Element::hasNonEmptyLayoutSize() const |
990 { | 1006 { |
991 document().updateLayoutIgnorePendingStylesheets(); | 1007 document().updateLayoutIgnorePendingStylesheets(); |
992 | 1008 |
993 if (LayoutBoxModelObject* box = layoutBoxModelObject()) | 1009 if (LayoutBoxModelObject* box = layoutBoxModelObject()) |
994 return box->hasNonEmptyLayoutSize(); | 1010 return box->hasNonEmptyLayoutSize(); |
995 return false; | 1011 return false; |
996 } | 1012 } |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1680 if (ElementAnimations* elementAnimations = this->elementAnimations()) { | 1696 if (ElementAnimations* elementAnimations = this->elementAnimations()) { |
1681 elementAnimations->cssAnimations().maybeApplyPendingUpdate(this); | 1697 elementAnimations->cssAnimations().maybeApplyPendingUpdate(this); |
1682 elementAnimations->updateAnimationFlags(*style); | 1698 elementAnimations->updateAnimationFlags(*style); |
1683 } | 1699 } |
1684 | 1700 |
1685 if (style->hasTransform()) { | 1701 if (style->hasTransform()) { |
1686 if (const StylePropertySet* inlineStyle = this->inlineStyle()) | 1702 if (const StylePropertySet* inlineStyle = this->inlineStyle()) |
1687 style->setHasInlineTransform(inlineStyle->hasProperty(CSSPropertyTra nsform)); | 1703 style->setHasInlineTransform(inlineStyle->hasProperty(CSSPropertyTra nsform)); |
1688 } | 1704 } |
1689 | 1705 |
1690 if (hasRareData() && elementRareData()->proxyCount() > 0) | |
1691 style->setHasCompositorProxy(true); | |
1692 | |
1693 document().didRecalculateStyleForElement(); | 1706 document().didRecalculateStyleForElement(); |
1694 return style.release(); | 1707 return style.release(); |
1695 } | 1708 } |
1696 | 1709 |
1697 PassRefPtr<ComputedStyle> Element::originalStyleForLayoutObject() | 1710 PassRefPtr<ComputedStyle> Element::originalStyleForLayoutObject() |
1698 { | 1711 { |
1699 ASSERT(document().inStyleRecalc()); | 1712 ASSERT(document().inStyleRecalc()); |
1700 return document().ensureStyleResolver().styleForElement(this); | 1713 return document().ensureStyleResolver().styleForElement(this); |
1701 } | 1714 } |
1702 | 1715 |
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3616 { | 3629 { |
3617 #if ENABLE(OILPAN) | 3630 #if ENABLE(OILPAN) |
3618 if (hasRareData()) | 3631 if (hasRareData()) |
3619 visitor->trace(elementRareData()); | 3632 visitor->trace(elementRareData()); |
3620 visitor->trace(m_elementData); | 3633 visitor->trace(m_elementData); |
3621 #endif | 3634 #endif |
3622 ContainerNode::trace(visitor); | 3635 ContainerNode::trace(visitor); |
3623 } | 3636 } |
3624 | 3637 |
3625 } // namespace blink | 3638 } // namespace blink |
OLD | NEW |