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

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

Issue 2250523003: Implement SANACLAP (http://bit.ly/sanaclap). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improve comment Created 4 years, 4 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 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 diff.setNeedsPositionedMovementLayout(); 496 diff.setNeedsPositionedMovementLayout();
497 } 497 }
498 498
499 if (diffNeedsPaintInvalidationSubtree(other)) 499 if (diffNeedsPaintInvalidationSubtree(other))
500 diff.setNeedsPaintInvalidationSubtree(); 500 diff.setNeedsPaintInvalidationSubtree();
501 else if (diffNeedsPaintInvalidationObject(other)) 501 else if (diffNeedsPaintInvalidationObject(other))
502 diff.setNeedsPaintInvalidationObject(); 502 diff.setNeedsPaintInvalidationObject();
503 503
504 updatePropertySpecificDifferences(other, diff); 504 updatePropertySpecificDifferences(other, diff);
505 505
506 // TODO(skobes): Refine the criteria for ScrollAnchor-disabling properties.
507 // Some things set needsLayout but shouldn't disable scroll anchoring.
508 if (diff.needsLayout() || diff.transformChanged())
509 diff.setScrollAnchorDisablingPropertyChanged();
510
506 // Cursors are not checked, since they will be set appropriately in response to mouse events, 511 // Cursors are not checked, since they will be set appropriately in response to mouse events,
507 // so they don't need to cause any paint invalidation or layout. 512 // so they don't need to cause any paint invalidation or layout.
508 513
509 // Animations don't need to be checked either. We always set the new style o n the layoutObject, so we will get a chance to fire off 514 // Animations don't need to be checked either. We always set the new style o n the layoutObject, so we will get a chance to fire off
510 // the resulting transition properly. 515 // the resulting transition properly.
511 516
512 return diff; 517 return diff;
513 } 518 }
514 519
515 bool ComputedStyle::diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) const 520 bool ComputedStyle::diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) const
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 if (value < 0) 1971 if (value < 0)
1967 fvalue -= 0.5f; 1972 fvalue -= 0.5f;
1968 else 1973 else
1969 fvalue += 0.5f; 1974 fvalue += 0.5f;
1970 } 1975 }
1971 1976
1972 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 1977 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
1973 } 1978 }
1974 1979
1975 } // namespace blink 1980 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698