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

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: Formatting merge 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
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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 584
585 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation( 585 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
586 const ComputedStyle& other) const { 586 const ComputedStyle& other) const {
587 // FIXME: Not all cases in this method need both full layout and paint 587 // FIXME: Not all cases in this method need both full layout and paint
588 // invalidation. 588 // invalidation.
589 // Should move cases into DiffNeedsFullLayout() if 589 // Should move cases into DiffNeedsFullLayout() if
590 // - don't need paint invalidation at all; 590 // - don't need paint invalidation at all;
591 // - or the layoutObject knows how to exactly invalidate paints caused by the 591 // - or the layoutObject knows how to exactly invalidate paints caused by the
592 // layout change instead of forced full paint invalidation. 592 // layout change instead of forced full paint invalidation.
593 593
594 if (surround_data_.Get() != other.surround_data_.Get()) {
595 // If our border widths change, then we need to layout. Other changes to
596 // borders only necessitate a paint invalidation.
597 if (!(BorderWidthEquals(BorderLeftWidth(), other.BorderLeftWidth())) ||
598 !(BorderWidthEquals(BorderTopWidth(), other.BorderTopWidth())) ||
599 !(BorderWidthEquals(BorderBottomWidth(), other.BorderBottomWidth())) ||
600 !(BorderWidthEquals(BorderRightWidth(), other.BorderRightWidth())))
601 return true;
602 }
603
604 if (ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(other)) 594 if (ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(other))
605 return true; 595 return true;
606 596
607 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { 597 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
608 if (rare_non_inherited_data_->appearance_ != 598 if (rare_non_inherited_data_->appearance_ !=
609 other.rare_non_inherited_data_->appearance_ || 599 other.rare_non_inherited_data_->appearance_ ||
610 rare_non_inherited_data_->margin_before_collapse != 600 rare_non_inherited_data_->margin_before_collapse !=
611 other.rare_non_inherited_data_->margin_before_collapse || 601 other.rare_non_inherited_data_->margin_before_collapse ||
612 rare_non_inherited_data_->margin_after_collapse != 602 rare_non_inherited_data_->margin_after_collapse !=
613 other.rare_non_inherited_data_->margin_after_collapse || 603 other.rare_non_inherited_data_->margin_after_collapse ||
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 if (value < 0) 2513 if (value < 0)
2524 fvalue -= 0.5f; 2514 fvalue -= 0.5f;
2525 else 2515 else
2526 fvalue += 0.5f; 2516 fvalue += 0.5f;
2527 } 2517 }
2528 2518
2529 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2519 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2530 } 2520 }
2531 2521
2532 } // namespace blink 2522 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698