Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2876803003: Generate diffs for fields in ComputedStyle that use their public getters (Closed)
Patch Set: alancutter@'s suggestions Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation( 575 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
576 const ComputedStyle& other) const { 576 const ComputedStyle& other) const {
577 // FIXME: Not all cases in this method need both full layout and paint 577 // FIXME: Not all cases in this method need both full layout and paint
578 // invalidation. 578 // invalidation.
579 // Should move cases into DiffNeedsFullLayout() if 579 // Should move cases into DiffNeedsFullLayout() if
580 // - don't need paint invalidation at all; 580 // - don't need paint invalidation at all;
581 // - or the layoutObject knows how to exactly invalidate paints caused by the 581 // - or the layoutObject knows how to exactly invalidate paints caused by the
582 // layout change instead of forced full paint invalidation. 582 // layout change instead of forced full paint invalidation.
583 583
584 if (surround_data_.Get() != other.surround_data_.Get()) {
585 // If our border widths change, then we need to layout. Other changes to
586 // borders only necessitate a paint invalidation.
587 if (!(BorderWidthEquals(BorderLeftWidth(), other.BorderLeftWidth())) ||
588 !(BorderWidthEquals(BorderTopWidth(), other.BorderTopWidth())) ||
589 !(BorderWidthEquals(BorderBottomWidth(), other.BorderBottomWidth())) ||
590 !(BorderWidthEquals(BorderRightWidth(), other.BorderRightWidth())))
591 return true;
592 }
593
594 if (ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(other)) 584 if (ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(other))
595 return true; 585 return true;
596 586
597 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { 587 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
598 if (rare_non_inherited_data_->appearance_ != 588 if (rare_non_inherited_data_->appearance_ !=
599 other.rare_non_inherited_data_->appearance_ || 589 other.rare_non_inherited_data_->appearance_ ||
600 rare_non_inherited_data_->margin_before_collapse != 590 rare_non_inherited_data_->margin_before_collapse !=
601 other.rare_non_inherited_data_->margin_before_collapse || 591 other.rare_non_inherited_data_->margin_before_collapse ||
602 rare_non_inherited_data_->margin_after_collapse != 592 rare_non_inherited_data_->margin_after_collapse !=
603 other.rare_non_inherited_data_->margin_after_collapse || 593 other.rare_non_inherited_data_->margin_after_collapse ||
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 if (value < 0) 2495 if (value < 0)
2506 fvalue -= 0.5f; 2496 fvalue -= 0.5f;
2507 else 2497 else
2508 fvalue += 0.5f; 2498 fvalue += 0.5f;
2509 } 2499 }
2510 2500
2511 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2501 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2512 } 2502 }
2513 2503
2514 } // namespace blink 2504 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698