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

Side by Side Diff: Source/core/layout/LayoutFlexibleBox.cpp

Issue 949303002: Fix invalidation during painting of scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 } 577 }
578 578
579 LayoutPoint LayoutFlexibleBox::flowAwareLocationForChild(LayoutBox& child) const 579 LayoutPoint LayoutFlexibleBox::flowAwareLocationForChild(LayoutBox& child) const
580 { 580 {
581 return isHorizontalFlow() ? child.location() : child.location().transposedPo int(); 581 return isHorizontalFlow() ? child.location() : child.location().transposedPo int();
582 } 582 }
583 583
584 void LayoutFlexibleBox::setFlowAwareLocationForChild(LayoutBox& child, const Lay outPoint& location) 584 void LayoutFlexibleBox::setFlowAwareLocationForChild(LayoutBox& child, const Lay outPoint& location)
585 { 585 {
586 if (isHorizontalFlow()) 586 if (isHorizontalFlow())
587 child.setLocation(location); 587 child.setLocationAndUpdateOverflowControlsIfNeeded(location);
588 else 588 else
589 child.setLocation(location.transposedPoint()); 589 child.setLocationAndUpdateOverflowControlsIfNeeded(location.transposedPo int());
590 } 590 }
591 591
592 LayoutUnit LayoutFlexibleBox::mainAxisBorderAndPaddingExtentForChild(LayoutBox& child) const 592 LayoutUnit LayoutFlexibleBox::mainAxisBorderAndPaddingExtentForChild(LayoutBox& child) const
593 { 593 {
594 return isHorizontalFlow() ? child.borderAndPaddingWidth() : child.borderAndP addingHeight(); 594 return isHorizontalFlow() ? child.borderAndPaddingWidth() : child.borderAndP addingHeight();
595 } 595 }
596 596
597 static inline bool preferredMainAxisExtentDependsOnLayout(const Length& flexBasi s, bool hasInfiniteLineLength) 597 static inline bool preferredMainAxisExtentDependsOnLayout(const Length& flexBasi s, bool hasInfiniteLineLength)
598 { 598 {
599 return flexBasis.isAuto() || (flexBasis.isPercent() && hasInfiniteLineLength ); 599 return flexBasis.isAuto() || (flexBasis.isPercent() && hasInfiniteLineLength );
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 ASSERT(child); 1400 ASSERT(child);
1401 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1401 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1402 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1402 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1403 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1403 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1404 adjustAlignmentForChild(*child, newOffset - originalOffset); 1404 adjustAlignmentForChild(*child, newOffset - originalOffset);
1405 } 1405 }
1406 } 1406 }
1407 } 1407 }
1408 1408
1409 } 1409 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBox.cpp ('k') | Source/core/layout/compositing/CompositedLayerMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698