| 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
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 m_rareInheritedData = inheritParent.m_rareInheritedData; | 322 m_rareInheritedData = inheritParent.m_rareInheritedData; |
| 323 } | 323 } |
| 324 m_styleInheritedData = inheritParent.m_styleInheritedData; | 324 m_styleInheritedData = inheritParent.m_styleInheritedData; |
| 325 m_inheritedData = inheritParent.m_inheritedData; | 325 m_inheritedData = inheritParent.m_inheritedData; |
| 326 if (m_svgStyle != inheritParent.m_svgStyle) | 326 if (m_svgStyle != inheritParent.m_svgStyle) |
| 327 m_svgStyle.access()->inheritFrom(inheritParent.m_svgStyle.get()); | 327 m_svgStyle.access()->inheritFrom(inheritParent.m_svgStyle.get()); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void ComputedStyle::copyNonInheritedFromCached(const ComputedStyle& other) | 330 void ComputedStyle::copyNonInheritedFromCached(const ComputedStyle& other) |
| 331 { | 331 { |
| 332 ComputedStyleBase::copyNonInheritedFromCached(other); |
| 332 m_box = other.m_box; | 333 m_box = other.m_box; |
| 333 m_visual = other.m_visual; | 334 m_visual = other.m_visual; |
| 334 m_background = other.m_background; | 335 m_background = other.m_background; |
| 335 m_surround = other.m_surround; | 336 m_surround = other.m_surround; |
| 336 m_rareNonInheritedData = other.m_rareNonInheritedData; | 337 m_rareNonInheritedData = other.m_rareNonInheritedData; |
| 337 | 338 |
| 338 // The flags are copied one-by-one because m_nonInheritedData.m_contains a b
unch of stuff other than real style data. | 339 // The flags are copied one-by-one because m_nonInheritedData.m_contains a b
unch of stuff other than real style data. |
| 339 // See comments for each skipped flag below. | 340 // See comments for each skipped flag below. |
| 340 m_nonInheritedData.m_effectiveDisplay = other.m_nonInheritedData.m_effective
Display; | 341 m_nonInheritedData.m_effectiveDisplay = other.m_nonInheritedData.m_effective
Display; |
| 341 m_nonInheritedData.m_originalDisplay = other.m_nonInheritedData.m_originalDi
splay; | 342 m_nonInheritedData.m_originalDisplay = other.m_nonInheritedData.m_originalDi
splay; |
| 342 m_nonInheritedData.m_overflowAnchor = other.m_nonInheritedData.m_overflowAnc
hor; | 343 m_nonInheritedData.m_overflowAnchor = other.m_nonInheritedData.m_overflowAnc
hor; |
| 343 m_nonInheritedData.m_overflowX = other.m_nonInheritedData.m_overflowX; | 344 m_nonInheritedData.m_overflowX = other.m_nonInheritedData.m_overflowX; |
| 344 m_nonInheritedData.m_overflowY = other.m_nonInheritedData.m_overflowY; | 345 m_nonInheritedData.m_overflowY = other.m_nonInheritedData.m_overflowY; |
| 345 m_nonInheritedData.m_verticalAlign = other.m_nonInheritedData.m_verticalAlig
n; | 346 m_nonInheritedData.m_verticalAlign = other.m_nonInheritedData.m_verticalAlig
n; |
| 346 m_nonInheritedData.m_clear = other.m_nonInheritedData.m_clear; | 347 m_nonInheritedData.m_clear = other.m_nonInheritedData.m_clear; |
| 347 m_nonInheritedData.m_position = other.m_nonInheritedData.m_position; | 348 m_nonInheritedData.m_position = other.m_nonInheritedData.m_position; |
| 348 m_nonInheritedData.m_floating = other.m_nonInheritedData.m_floating; | |
| 349 m_nonInheritedData.m_tableLayout = other.m_nonInheritedData.m_tableLayout; | 349 m_nonInheritedData.m_tableLayout = other.m_nonInheritedData.m_tableLayout; |
| 350 m_nonInheritedData.m_unicodeBidi = other.m_nonInheritedData.m_unicodeBidi; | 350 m_nonInheritedData.m_unicodeBidi = other.m_nonInheritedData.m_unicodeBidi; |
| 351 m_nonInheritedData.m_hasViewportUnits = other.m_nonInheritedData.m_hasViewpo
rtUnits; | 351 m_nonInheritedData.m_hasViewportUnits = other.m_nonInheritedData.m_hasViewpo
rtUnits; |
| 352 m_nonInheritedData.m_breakBefore = other.m_nonInheritedData.m_breakBefore; | 352 m_nonInheritedData.m_breakBefore = other.m_nonInheritedData.m_breakBefore; |
| 353 m_nonInheritedData.m_breakAfter = other.m_nonInheritedData.m_breakAfter; | 353 m_nonInheritedData.m_breakAfter = other.m_nonInheritedData.m_breakAfter; |
| 354 m_nonInheritedData.m_breakInside = other.m_nonInheritedData.m_breakInside; | 354 m_nonInheritedData.m_breakInside = other.m_nonInheritedData.m_breakInside; |
| 355 m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits; | 355 m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits; |
| 356 | 356 |
| 357 // Correctly set during selector matching: | 357 // Correctly set during selector matching: |
| 358 // m_nonInheritedData.m_styleType | 358 // m_nonInheritedData.m_styleType |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 | 492 |
| 493 bool ComputedStyle::loadingCustomFontsEqual(const ComputedStyle& other) const | 493 bool ComputedStyle::loadingCustomFontsEqual(const ComputedStyle& other) const |
| 494 { | 494 { |
| 495 return font().loadingCustomFonts() == other.font().loadingCustomFonts(); | 495 return font().loadingCustomFonts() == other.font().loadingCustomFonts(); |
| 496 } | 496 } |
| 497 | 497 |
| 498 bool ComputedStyle::nonInheritedEqual(const ComputedStyle& other) const | 498 bool ComputedStyle::nonInheritedEqual(const ComputedStyle& other) const |
| 499 { | 499 { |
| 500 // compare everything except the pseudoStyle pointer | 500 // compare everything except the pseudoStyle pointer |
| 501 return m_nonInheritedData == other.m_nonInheritedData | 501 return ComputedStyleBase::nonInheritedEqual(other) |
| 502 && m_nonInheritedData == other.m_nonInheritedData |
| 502 && m_box == other.m_box | 503 && m_box == other.m_box |
| 503 && m_visual == other.m_visual | 504 && m_visual == other.m_visual |
| 504 && m_background == other.m_background | 505 && m_background == other.m_background |
| 505 && m_surround == other.m_surround | 506 && m_surround == other.m_surround |
| 506 && m_rareNonInheritedData == other.m_rareNonInheritedData | 507 && m_rareNonInheritedData == other.m_rareNonInheritedData |
| 507 && m_svgStyle->nonInheritedEqual(*other.m_svgStyle); | 508 && m_svgStyle->nonInheritedEqual(*other.m_svgStyle); |
| 508 } | 509 } |
| 509 | 510 |
| 510 bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const | 511 bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const |
| 511 { | 512 { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 || m_inheritedData.m_textTransform != other.m_inheritedData.m_textTransf
orm | 705 || m_inheritedData.m_textTransform != other.m_inheritedData.m_textTransf
orm |
| 705 || m_inheritedData.m_direction != other.m_inheritedData.m_direction | 706 || m_inheritedData.m_direction != other.m_inheritedData.m_direction |
| 706 || m_inheritedData.m_whiteSpace != other.m_inheritedData.m_whiteSpace | 707 || m_inheritedData.m_whiteSpace != other.m_inheritedData.m_whiteSpace |
| 707 || m_inheritedData.m_writingMode != other.m_inheritedData.m_writingMode) | 708 || m_inheritedData.m_writingMode != other.m_inheritedData.m_writingMode) |
| 708 return true; | 709 return true; |
| 709 | 710 |
| 710 if (m_nonInheritedData.m_overflowX != other.m_nonInheritedData.m_overflowX | 711 if (m_nonInheritedData.m_overflowX != other.m_nonInheritedData.m_overflowX |
| 711 || m_nonInheritedData.m_overflowY != other.m_nonInheritedData.m_overflow
Y | 712 || m_nonInheritedData.m_overflowY != other.m_nonInheritedData.m_overflow
Y |
| 712 || m_nonInheritedData.m_clear != other.m_nonInheritedData.m_clear | 713 || m_nonInheritedData.m_clear != other.m_nonInheritedData.m_clear |
| 713 || m_nonInheritedData.m_unicodeBidi != other.m_nonInheritedData.m_unicod
eBidi | 714 || m_nonInheritedData.m_unicodeBidi != other.m_nonInheritedData.m_unicod
eBidi |
| 714 || m_nonInheritedData.m_floating != other.m_nonInheritedData.m_floating | 715 || floating() != other.floating() |
| 715 || m_nonInheritedData.m_originalDisplay != other.m_nonInheritedData.m_or
iginalDisplay) | 716 || m_nonInheritedData.m_originalDisplay != other.m_nonInheritedData.m_or
iginalDisplay) |
| 716 return true; | 717 return true; |
| 717 | 718 |
| 718 if (m_nonInheritedData.m_effectiveDisplay >= FIRST_TABLE_DISPLAY && m_nonInh
eritedData.m_effectiveDisplay <= LAST_TABLE_DISPLAY) { | 719 if (m_nonInheritedData.m_effectiveDisplay >= FIRST_TABLE_DISPLAY && m_nonInh
eritedData.m_effectiveDisplay <= LAST_TABLE_DISPLAY) { |
| 719 if (m_inheritedData.m_borderCollapse != other.m_inheritedData.m_borderCo
llapse | 720 if (m_inheritedData.m_borderCollapse != other.m_inheritedData.m_borderCo
llapse |
| 720 || m_inheritedData.m_emptyCells != other.m_inheritedData.m_emptyCell
s | 721 || m_inheritedData.m_emptyCells != other.m_inheritedData.m_emptyCell
s |
| 721 || m_inheritedData.m_captionSide != other.m_inheritedData.m_captionS
ide | 722 || m_inheritedData.m_captionSide != other.m_inheritedData.m_captionS
ide |
| 722 || m_nonInheritedData.m_tableLayout != other.m_nonInheritedData.m_ta
bleLayout) | 723 || m_nonInheritedData.m_tableLayout != other.m_nonInheritedData.m_ta
bleLayout) |
| 723 return true; | 724 return true; |
| 724 | 725 |
| (...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 if (value < 0) | 2054 if (value < 0) |
| 2054 fvalue -= 0.5f; | 2055 fvalue -= 0.5f; |
| 2055 else | 2056 else |
| 2056 fvalue += 0.5f; | 2057 fvalue += 0.5f; |
| 2057 } | 2058 } |
| 2058 | 2059 |
| 2059 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2060 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2060 } | 2061 } |
| 2061 | 2062 |
| 2062 } // namespace blink | 2063 } // namespace blink |
| OLD | NEW |