| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 4 * reserved. | 4 * reserved. |
| 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 ComputedStyleBase::copyNonInheritedFromCached(other); | 338 ComputedStyleBase::copyNonInheritedFromCached(other); |
| 339 m_box = other.m_box; | 339 m_box = other.m_box; |
| 340 m_visual = other.m_visual; | 340 m_visual = other.m_visual; |
| 341 m_background = other.m_background; | 341 m_background = other.m_background; |
| 342 m_surround = other.m_surround; | 342 m_surround = other.m_surround; |
| 343 m_rareNonInheritedData = other.m_rareNonInheritedData; | 343 m_rareNonInheritedData = other.m_rareNonInheritedData; |
| 344 | 344 |
| 345 // The flags are copied one-by-one because m_nonInheritedData.m_contains a | 345 // The flags are copied one-by-one because m_nonInheritedData.m_contains a |
| 346 // bunch of stuff other than real style data. | 346 // bunch of stuff other than real style data. |
| 347 // See comments for each skipped flag below. | 347 // See comments for each skipped flag below. |
| 348 m_nonInheritedData.m_originalDisplay = | 348 setOriginalDisplay( |
| 349 other.m_nonInheritedData.m_originalDisplay; | 349 other.originalDisplay()); // Not generated in ComputedStyleBase. |
| 350 m_nonInheritedData.m_verticalAlign = other.m_nonInheritedData.m_verticalAlign; | 350 m_nonInheritedData.m_verticalAlign = other.m_nonInheritedData.m_verticalAlign; |
| 351 m_nonInheritedData.m_hasViewportUnits = | 351 m_nonInheritedData.m_hasViewportUnits = |
| 352 other.m_nonInheritedData.m_hasViewportUnits; | 352 other.m_nonInheritedData.m_hasViewportUnits; |
| 353 m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits; | 353 m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits; |
| 354 | 354 |
| 355 // Correctly set during selector matching: | 355 // Correctly set during selector matching: |
| 356 // m_nonInheritedData.m_styleType | 356 // m_nonInheritedData.m_styleType |
| 357 // m_nonInheritedData.m_pseudoBits | 357 // m_nonInheritedData.m_pseudoBits |
| 358 | 358 |
| 359 // Set correctly while computing style for children: | 359 // Set correctly while computing style for children: |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 m_rareInheritedData == other.m_rareInheritedData; | 474 m_rareInheritedData == other.m_rareInheritedData; |
| 475 } | 475 } |
| 476 | 476 |
| 477 bool ComputedStyle::loadingCustomFontsEqual(const ComputedStyle& other) const { | 477 bool ComputedStyle::loadingCustomFontsEqual(const ComputedStyle& other) const { |
| 478 return font().loadingCustomFonts() == other.font().loadingCustomFonts(); | 478 return font().loadingCustomFonts() == other.font().loadingCustomFonts(); |
| 479 } | 479 } |
| 480 | 480 |
| 481 bool ComputedStyle::nonInheritedEqual(const ComputedStyle& other) const { | 481 bool ComputedStyle::nonInheritedEqual(const ComputedStyle& other) const { |
| 482 // compare everything except the pseudoStyle pointer | 482 // compare everything except the pseudoStyle pointer |
| 483 return ComputedStyleBase::nonInheritedEqual(other) && | 483 return ComputedStyleBase::nonInheritedEqual(other) && |
| 484 originalDisplay() == |
| 485 other.originalDisplay() && // Not generated in ComputedStyleBase |
| 484 m_nonInheritedData == other.m_nonInheritedData && | 486 m_nonInheritedData == other.m_nonInheritedData && |
| 485 m_box == other.m_box && m_visual == other.m_visual && | 487 m_box == other.m_box && m_visual == other.m_visual && |
| 486 m_background == other.m_background && m_surround == other.m_surround && | 488 m_background == other.m_background && m_surround == other.m_surround && |
| 487 m_rareNonInheritedData == other.m_rareNonInheritedData && | 489 m_rareNonInheritedData == other.m_rareNonInheritedData && |
| 488 m_svgStyle->nonInheritedEqual(*other.m_svgStyle); | 490 m_svgStyle->nonInheritedEqual(*other.m_svgStyle); |
| 489 } | 491 } |
| 490 | 492 |
| 491 bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const { | 493 bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const { |
| 492 // This is a fast check that only looks if the data structures are shared. | 494 // This is a fast check that only looks if the data structures are shared. |
| 493 // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method? | 495 // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method? |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 rtlOrdering() != other.rtlOrdering() || | 782 rtlOrdering() != other.rtlOrdering() || |
| 781 textAlign() != other.textAlign() || | 783 textAlign() != other.textAlign() || |
| 782 textTransform() != other.textTransform() || | 784 textTransform() != other.textTransform() || |
| 783 direction() != other.direction() || whiteSpace() != other.whiteSpace() || | 785 direction() != other.direction() || whiteSpace() != other.whiteSpace() || |
| 784 getWritingMode() != other.getWritingMode()) | 786 getWritingMode() != other.getWritingMode()) |
| 785 return true; | 787 return true; |
| 786 | 788 |
| 787 if (overflowX() != other.overflowX() || overflowY() != other.overflowY() || | 789 if (overflowX() != other.overflowX() || overflowY() != other.overflowY() || |
| 788 clear() != other.clear() || getUnicodeBidi() != other.getUnicodeBidi() || | 790 clear() != other.clear() || getUnicodeBidi() != other.getUnicodeBidi() || |
| 789 floating() != other.floating() || | 791 floating() != other.floating() || |
| 790 m_nonInheritedData.m_originalDisplay != | 792 originalDisplay() != other.originalDisplay()) |
| 791 other.m_nonInheritedData.m_originalDisplay) | |
| 792 return true; | 793 return true; |
| 793 | 794 |
| 794 if (isDisplayTableType(display())) { | 795 if (isDisplayTableType(display())) { |
| 795 if (borderCollapse() != other.borderCollapse() || | 796 if (borderCollapse() != other.borderCollapse() || |
| 796 emptyCells() != other.emptyCells() || | 797 emptyCells() != other.emptyCells() || |
| 797 captionSide() != other.captionSide() || | 798 captionSide() != other.captionSide() || |
| 798 tableLayout() != other.tableLayout()) | 799 tableLayout() != other.tableLayout()) |
| 799 return true; | 800 return true; |
| 800 | 801 |
| 801 // In the collapsing border model, 'hidden' suppresses other borders, while | 802 // In the collapsing border model, 'hidden' suppresses other borders, while |
| (...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2489 if (value < 0) | 2490 if (value < 0) |
| 2490 fvalue -= 0.5f; | 2491 fvalue -= 0.5f; |
| 2491 else | 2492 else |
| 2492 fvalue += 0.5f; | 2493 fvalue += 0.5f; |
| 2493 } | 2494 } |
| 2494 | 2495 |
| 2495 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2496 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2496 } | 2497 } |
| 2497 | 2498 |
| 2498 } // namespace blink | 2499 } // namespace blink |
| OLD | NEW |