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

Side by Side Diff: sky/engine/core/rendering/RenderFlexibleBox.cpp

Issue 709503003: Remove RenderObject::isVideo (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | sky/engine/core/rendering/RenderImage.cpp » ('j') | 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) 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 bool RenderFlexibleBox::childPreferredMainAxisContentExtentRequiresLayout(Render Box* child, bool hasInfiniteLineLength) const 531 bool RenderFlexibleBox::childPreferredMainAxisContentExtentRequiresLayout(Render Box* child, bool hasInfiniteLineLength) const
532 { 532 {
533 return preferredMainAxisExtentDependsOnLayout(flexBasisForChild(child), hasI nfiniteLineLength) && hasOrthogonalFlow(child); 533 return preferredMainAxisExtentDependsOnLayout(flexBasisForChild(child), hasI nfiniteLineLength) && hasOrthogonalFlow(child);
534 } 534 }
535 535
536 LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox* child, bool hasInfiniteLineLength, bool relayoutChildren) 536 LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox* child, bool hasInfiniteLineLength, bool relayoutChildren)
537 { 537 {
538 child->clearOverrideSize(); 538 child->clearOverrideSize();
539 539
540 if (child->style()->hasAspectRatio() || child->isImage() || child->isVideo() || child->isCanvas()) 540 if (child->style()->hasAspectRatio() || child->isImage() || child->isCanvas( ))
541 UseCounter::count(document(), UseCounter::AspectRatioFlexItem); 541 UseCounter::count(document(), UseCounter::AspectRatioFlexItem);
542 542
543 Length flexBasis = flexBasisForChild(child); 543 Length flexBasis = flexBasisForChild(child);
544 if (preferredMainAxisExtentDependsOnLayout(flexBasis, hasInfiniteLineLength) ) { 544 if (preferredMainAxisExtentDependsOnLayout(flexBasis, hasInfiniteLineLength) ) {
545 LayoutUnit mainAxisExtent; 545 LayoutUnit mainAxisExtent;
546 if (hasOrthogonalFlow(child)) { 546 if (hasOrthogonalFlow(child)) {
547 if (child->needsLayout() || relayoutChildren) { 547 if (child->needsLayout() || relayoutChildren) {
548 m_intrinsicSizeAlongMainAxis.remove(child); 548 m_intrinsicSizeAlongMainAxis.remove(child);
549 child->forceChildLayout(); 549 child->forceChildLayout();
550 m_intrinsicSizeAlongMainAxis.set(child, child->logicalHeight()); 550 m_intrinsicSizeAlongMainAxis.set(child, child->logicalHeight());
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 ASSERT(child); 1320 ASSERT(child);
1321 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1321 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1322 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1322 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1323 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1323 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1324 adjustAlignmentForChild(child, newOffset - originalOffset); 1324 adjustAlignmentForChild(child, newOffset - originalOffset);
1325 } 1325 }
1326 } 1326 }
1327 } 1327 }
1328 1328
1329 } 1329 }
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698