| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 // so that the common case doesn't need to create a new LayoutStyle in | 485 // so that the common case doesn't need to create a new LayoutStyle in |
| 486 // Document::inheritHtmlAndBodyElementStyles. | 486 // Document::inheritHtmlAndBodyElementStyles. |
| 487 documentStyle->setDisplay(BLOCK); | 487 documentStyle->setDisplay(BLOCK); |
| 488 documentStyle->setScrollBlocksOn(WebScrollBlocksOnStartTouch | WebScrollBloc
ksOnWheelEvent); | 488 documentStyle->setScrollBlocksOn(WebScrollBlocksOnStartTouch | WebScrollBloc
ksOnWheelEvent); |
| 489 | 489 |
| 490 document.setupFontBuilder(*documentStyle); | 490 document.setupFontBuilder(*documentStyle); |
| 491 | 491 |
| 492 return documentStyle.release(); | 492 return documentStyle.release(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 static AuthorStyleInfo authorStyleInfo(StyleResolverState& state) | 495 AuthorStyleInfo StyleResolver::authorStyleInfo(StyleResolverState& state) |
| 496 { | 496 { |
| 497 const CachedUAStyle* cachedUAStyle = state.cachedUAStyle(); | 497 const CachedUAStyle* cachedUAStyle = state.cachedUAStyle(); |
| 498 | 498 |
| 499 if (!cachedUAStyle) | 499 if (!cachedUAStyle) |
| 500 return AuthorStyleInfo(); | 500 return AuthorStyleInfo(); |
| 501 | 501 |
| 502 // Exclude background-repeat from comparison by resetting it. | 502 // Exclude background-repeat from comparison by resetting it. |
| 503 FillLayer backgroundCopy = cachedUAStyle->backgroundLayers; | 503 FillLayer backgroundCopy = cachedUAStyle->backgroundLayers; |
| 504 FillLayer backgroundLayersCopy = state.style()->backgroundLayers(); | 504 FillLayer backgroundLayersCopy = state.style()->backgroundLayers(); |
| 505 backgroundCopy.setRepeatX(NoRepeatFill); | 505 backgroundCopy.setRepeatX(NoRepeatFill); |
| 506 backgroundCopy.setRepeatY(NoRepeatFill); | 506 backgroundCopy.setRepeatY(NoRepeatFill); |
| 507 backgroundLayersCopy.setRepeatX(NoRepeatFill); | 507 backgroundLayersCopy.setRepeatX(NoRepeatFill); |
| 508 backgroundLayersCopy.setRepeatY(NoRepeatFill); | 508 backgroundLayersCopy.setRepeatY(NoRepeatFill); |
| 509 | 509 |
| 510 bool backgroundChanged = backgroundLayersCopy != backgroundCopy | 510 bool backgroundChanged = backgroundLayersCopy != backgroundCopy |
| 511 || state.style()->visitedDependentColor(CSSPropertyBackgroundColor) != c
achedUAStyle->backgroundColor; | 511 || state.style()->backgroundColor() != cachedUAStyle->backgroundColor; |
| 512 bool borderChanged = state.style()->border() != cachedUAStyle->border; | 512 bool borderChanged = state.style()->border() != cachedUAStyle->border; |
| 513 | 513 |
| 514 return AuthorStyleInfo(backgroundChanged, borderChanged); | 514 return AuthorStyleInfo(backgroundChanged, borderChanged); |
| 515 } | 515 } |
| 516 | 516 |
| 517 void StyleResolver::adjustLayoutStyle(StyleResolverState& state, Element* elemen
t) | 517 void StyleResolver::adjustLayoutStyle(StyleResolverState& state, Element* elemen
t) |
| 518 { | 518 { |
| 519 StyleAdjuster adjuster(document().inQuirksMode()); | 519 StyleAdjuster adjuster(document().inQuirksMode()); |
| 520 adjuster.adjustLayoutStyle(state.mutableStyleRef(), *state.parentStyle(), el
ement, authorStyleInfo(state)); | 520 adjuster.adjustLayoutStyle(state.mutableStyleRef(), *state.parentStyle(), el
ement, authorStyleInfo(state)); |
| 521 } | 521 } |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 visitor->trace(m_uncommonAttributeRuleSet); | 1513 visitor->trace(m_uncommonAttributeRuleSet); |
| 1514 visitor->trace(m_watchedSelectorsRules); | 1514 visitor->trace(m_watchedSelectorsRules); |
| 1515 visitor->trace(m_treeBoundaryCrossingRules); | 1515 visitor->trace(m_treeBoundaryCrossingRules); |
| 1516 visitor->trace(m_styleSharingLists); | 1516 visitor->trace(m_styleSharingLists); |
| 1517 visitor->trace(m_pendingStyleSheets); | 1517 visitor->trace(m_pendingStyleSheets); |
| 1518 visitor->trace(m_document); | 1518 visitor->trace(m_document); |
| 1519 #endif | 1519 #endif |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 } // namespace blink | 1522 } // namespace blink |
| OLD | NEW |