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

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

Issue 2876353002: Generate diffing functions for generated subgroup BoxData in ComputedStyle (Closed)
Patch Set: 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 551
552 return diff; 552 return diff;
553 } 553 }
554 554
555 bool ComputedStyle::ScrollAnchorDisablingPropertyChanged( 555 bool ComputedStyle::ScrollAnchorDisablingPropertyChanged(
556 const ComputedStyle& other, 556 const ComputedStyle& other,
557 const StyleDifference& diff) const { 557 const StyleDifference& diff) const {
558 if (GetPosition() != other.GetPosition()) 558 if (GetPosition() != other.GetPosition())
559 return true; 559 return true;
560 560
561 if (box_data_.Get() != other.box_data_.Get()) {
562 if (box_data_->width_ != other.box_data_->width_ ||
563 box_data_->min_width_ != other.box_data_->min_width_ ||
564 box_data_->max_width_ != other.box_data_->max_width_ ||
565 box_data_->height_ != other.box_data_->height_ ||
566 box_data_->min_height_ != other.box_data_->min_height_ ||
567 box_data_->max_height_ != other.box_data_->max_height_)
568 return true;
569 }
570
571 if (ComputedStyleBase::ScrollAnchorDisablingPropertyChanged(other)) 561 if (ComputedStyleBase::ScrollAnchorDisablingPropertyChanged(other))
572 return true; 562 return true;
573 563
574 if (diff.TransformChanged()) 564 if (diff.TransformChanged())
575 return true; 565 return true;
576 566
577 return false; 567 return false;
578 } 568 }
579 569
580 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation( 570 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 other.HasPseudoStyle(kPseudoIdScrollbar)) 800 other.HasPseudoStyle(kPseudoIdScrollbar))
811 return true; 801 return true;
812 802
813 // Movement of non-static-positioned object is special cased in 803 // Movement of non-static-positioned object is special cased in
814 // ComputedStyle::VisualInvalidationDiff(). 804 // ComputedStyle::VisualInvalidationDiff().
815 805
816 return false; 806 return false;
817 } 807 }
818 808
819 bool ComputedStyle::DiffNeedsFullLayout(const ComputedStyle& other) const { 809 bool ComputedStyle::DiffNeedsFullLayout(const ComputedStyle& other) const {
810 if (ComputedStyleBase::DiffNeedsFullLayout(other))
811 return true;
812
820 if (box_data_.Get() != other.box_data_.Get()) { 813 if (box_data_.Get() != other.box_data_.Get()) {
821 if (box_data_->width_ != other.box_data_->width_ ||
shend 2017/05/15 01:40:22 Hmm, why do the generated code have a different or
nainar 2017/05/15 01:53:30 This is because the order is determined by the ord
822 box_data_->min_width_ != other.box_data_->min_width_ ||
823 box_data_->max_width_ != other.box_data_->max_width_ ||
824 box_data_->height_ != other.box_data_->height_ ||
825 box_data_->min_height_ != other.box_data_->min_height_ ||
826 box_data_->max_height_ != other.box_data_->max_height_)
827 return true;
828
829 if (box_data_->vertical_align_length_ != 814 if (box_data_->vertical_align_length_ !=
830 other.box_data_->vertical_align_length_) 815 other.box_data_->vertical_align_length_)
831 return true; 816 return true;
832
833 if (box_data_->box_sizing_ != other.box_data_->box_sizing_)
834 return true;
835 } 817 }
836 818
837 if (VerticalAlign() != other.VerticalAlign() || 819 if (VerticalAlign() != other.VerticalAlign() ||
838 GetPosition() != other.GetPosition()) 820 GetPosition() != other.GetPosition())
839 return true; 821 return true;
840 822
841 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { 823 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
842 if (rare_non_inherited_data_->align_content_ != 824 if (rare_non_inherited_data_->align_content_ !=
843 other.rare_non_inherited_data_->align_content_ || 825 other.rare_non_inherited_data_->align_content_ ||
844 rare_non_inherited_data_->align_items_ != 826 rare_non_inherited_data_->align_items_ !=
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 if (value < 0) 2500 if (value < 0)
2519 fvalue -= 0.5f; 2501 fvalue -= 0.5f;
2520 else 2502 else
2521 fvalue += 0.5f; 2503 fvalue += 0.5f;
2522 } 2504 }
2523 2505
2524 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2506 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2525 } 2507 }
2526 2508
2527 } // namespace blink 2509 } // 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