| 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.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 | 655 |
| 656 if (element == document().documentElement()) | 656 if (element == document().documentElement()) |
| 657 resetDirectionAndWritingModeOnDocument(document()); | 657 resetDirectionAndWritingModeOnDocument(document()); |
| 658 StyleResolverState state(document(), element, defaultParent, regionForStylin
g); | 658 StyleResolverState state(document(), element, defaultParent, regionForStylin
g); |
| 659 | 659 |
| 660 if (sharingBehavior == AllowStyleSharing && !state.distributedToInsertionPoi
nt() && state.parentStyle()) { | 660 if (sharingBehavior == AllowStyleSharing && !state.distributedToInsertionPoi
nt() && state.parentStyle()) { |
| 661 SharedStyleFinder styleFinder(state.elementContext(), m_features, m_sibl
ingRuleSet.get(), m_uncommonAttributeRuleSet.get(), *this); | 661 SharedStyleFinder styleFinder(state.elementContext(), m_features, m_sibl
ingRuleSet.get(), m_uncommonAttributeRuleSet.get(), *this); |
| 662 if (RefPtr<RenderStyle> sharedStyle = styleFinder.findSharedStyle()) | 662 if (RefPtr<RenderStyle> sharedStyle = styleFinder.findSharedStyle()) |
| 663 return sharedStyle.release(); | 663 return sharedStyle.release(); |
| 664 } | 664 } |
| 665 | |
| 666 if (state.parentStyle()) { | 665 if (state.parentStyle()) { |
| 667 state.setStyle(RenderStyle::create()); | 666 state.setStyle(RenderStyle::create()); |
| 668 state.style()->inheritFrom(state.parentStyle(), isAtShadowBoundary(eleme
nt) ? RenderStyle::AtShadowBoundary : RenderStyle::NotAtShadowBoundary); | 667 state.style()->inheritFrom(state.parentStyle(), isAtShadowBoundary(eleme
nt) ? RenderStyle::AtShadowBoundary : RenderStyle::NotAtShadowBoundary); |
| 669 } else { | 668 } else { |
| 670 state.setStyle(defaultStyleForElement()); | 669 state.setStyle(defaultStyleForElement()); |
| 671 state.setParentStyle(RenderStyle::clone(state.style())); | 670 state.setParentStyle(RenderStyle::clone(state.style())); |
| 672 } | 671 } |
| 673 // contenteditable attribute (implemented by -webkit-user-modify) should | 672 // contenteditable attribute (implemented by -webkit-user-modify) should |
| 674 // be propagated from shadow host to distributed node. | 673 // be propagated from shadow host to distributed node. |
| 675 if (state.distributedToInsertionPoint()) { | 674 if (state.distributedToInsertionPoint()) { |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 bool StyleResolver::mediaQueryAffectedByViewportChange() const | 1513 bool StyleResolver::mediaQueryAffectedByViewportChange() const |
| 1515 { | 1514 { |
| 1516 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { | 1515 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { |
| 1517 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) | 1516 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) |
| 1518 return true; | 1517 return true; |
| 1519 } | 1518 } |
| 1520 return false; | 1519 return false; |
| 1521 } | 1520 } |
| 1522 | 1521 |
| 1523 } // namespace WebCore | 1522 } // namespace WebCore |
| OLD | NEW |