OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2878 LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(); // Constant pa
rt of left offset. | 2878 LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(); // Constant pa
rt of left offset. |
2879 LayoutUnit logicalRightOffset; // Constant part of right offset. | 2879 LayoutUnit logicalRightOffset; // Constant part of right offset. |
2880 logicalRightOffset = logicalRightOffsetForContent(); | 2880 logicalRightOffset = logicalRightOffsetForContent(); |
2881 | 2881 |
2882 LayoutUnit floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject)
, logicalRightOffset - logicalLeftOffset); // The width we look for. | 2882 LayoutUnit floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject)
, logicalRightOffset - logicalLeftOffset); // The width we look for. |
2883 | 2883 |
2884 LayoutUnit floatLogicalLeft; | 2884 LayoutUnit floatLogicalLeft; |
2885 | 2885 |
2886 bool insideFlowThread = flowThreadContainingBlock(); | 2886 bool insideFlowThread = flowThreadContainingBlock(); |
2887 | 2887 |
2888 if (childBox->style()->floating() == EFloat::LeftFloat) { | 2888 if (childBox->style()->floating() == EFloat::Left) { |
2889 LayoutUnit heightRemainingLeft = LayoutUnit(1); | 2889 LayoutUnit heightRemainingLeft = LayoutUnit(1); |
2890 LayoutUnit heightRemainingRight = LayoutUnit(1); | 2890 LayoutUnit heightRemainingRight = LayoutUnit(1); |
2891 floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset
, logicalLeftOffset, &heightRemainingLeft); | 2891 floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset
, logicalLeftOffset, &heightRemainingLeft); |
2892 while (logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRi
ghtOffset, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) { | 2892 while (logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRi
ghtOffset, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) { |
2893 logicalTopOffset += std::min<LayoutUnit>(heightRemainingLeft, height
RemainingRight); | 2893 logicalTopOffset += std::min<LayoutUnit>(heightRemainingLeft, height
RemainingRight); |
2894 floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOf
fset, logicalLeftOffset, &heightRemainingLeft); | 2894 floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOf
fset, logicalLeftOffset, &heightRemainingLeft); |
2895 if (insideFlowThread) { | 2895 if (insideFlowThread) { |
2896 // Have to re-evaluate all of our offsets, since they may have c
hanged. | 2896 // Have to re-evaluate all of our offsets, since they may have c
hanged. |
2897 logicalRightOffset = logicalRightOffsetForContent(); // Constant
part of right offset. | 2897 logicalRightOffset = logicalRightOffsetForContent(); // Constant
part of right offset. |
2898 logicalLeftOffset = logicalLeftOffsetForContent(); // Constant p
art of left offset. | 2898 logicalLeftOffset = logicalLeftOffsetForContent(); // Constant p
art of left offset. |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3773 | 3773 |
3774 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 3774 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
3775 } | 3775 } |
3776 | 3776 |
3777 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const | 3777 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const |
3778 { | 3778 { |
3779 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); | 3779 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); |
3780 } | 3780 } |
3781 | 3781 |
3782 } // namespace blink | 3782 } // namespace blink |
OLD | NEW |