| 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 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3991 if (isLayoutView()) { | 3991 if (isLayoutView()) { |
| 3992 ScrollOffset offset = toLayoutView(this)->frameView()->getScrollOffset(); | 3992 ScrollOffset offset = toLayoutView(this)->frameView()->getScrollOffset(); |
| 3993 adjustedLocation.move(LayoutSize(offset)); | 3993 adjustedLocation.move(LayoutSize(offset)); |
| 3994 } | 3994 } |
| 3995 | 3995 |
| 3996 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); | 3996 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| 3997 FloatingObjectSetIterator begin = floatingObjectSet.begin(); | 3997 FloatingObjectSetIterator begin = floatingObjectSet.begin(); |
| 3998 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { | 3998 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { |
| 3999 --it; | 3999 --it; |
| 4000 const FloatingObject& floatingObject = *it->get(); | 4000 const FloatingObject& floatingObject = *it->get(); |
| 4001 if (floatingObject.shouldPaint() && | 4001 if (floatingObject.shouldPaint()) { |
| 4002 // TODO(wangxianzhu): Should this be a DCHECK? | |
| 4003 !floatingObject.layoutObject()->hasSelfPaintingLayer()) { | |
| 4004 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - | 4002 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - |
| 4005 floatingObject.layoutObject()->location().x(); | 4003 floatingObject.layoutObject()->location().x(); |
| 4006 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - | 4004 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - |
| 4007 floatingObject.layoutObject()->location().y(); | 4005 floatingObject.layoutObject()->location().y(); |
| 4008 LayoutPoint childPoint = flipFloatForWritingModeForChild( | 4006 LayoutPoint childPoint = flipFloatForWritingModeForChild( |
| 4009 floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset)); | 4007 floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset)); |
| 4010 if (floatingObject.layoutObject()->hitTest(result, locationInContainer, | 4008 if (floatingObject.layoutObject()->hitTest(result, locationInContainer, |
| 4011 childPoint)) { | 4009 childPoint)) { |
| 4012 updateHitTestResult( | 4010 updateHitTestResult( |
| 4013 result, locationInContainer.point() - toLayoutSize(childPoint)); | 4011 result, locationInContainer.point() - toLayoutSize(childPoint)); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4046 LayoutUnit logicalTop, | 4044 LayoutUnit logicalTop, |
| 4047 LayoutUnit fixedOffset, | 4045 LayoutUnit fixedOffset, |
| 4048 LayoutUnit logicalHeight) const { | 4046 LayoutUnit logicalHeight) const { |
| 4049 if (m_floatingObjects && m_floatingObjects->hasRightObjects()) | 4047 if (m_floatingObjects && m_floatingObjects->hasRightObjects()) |
| 4050 return m_floatingObjects->logicalRightOffset(fixedOffset, logicalTop, | 4048 return m_floatingObjects->logicalRightOffset(fixedOffset, logicalTop, |
| 4051 logicalHeight); | 4049 logicalHeight); |
| 4052 | 4050 |
| 4053 return fixedOffset; | 4051 return fixedOffset; |
| 4054 } | 4052 } |
| 4055 | 4053 |
| 4056 void LayoutBlockFlow::updateAncestorShouldPaintFloatingObject( | 4054 void LayoutBlockFlow::setAncestorShouldPaintFloatingObject( |
| 4057 const LayoutBox& floatBox) { | 4055 const LayoutBox& floatBox) { |
| 4058 ASSERT(floatBox.isFloating()); | 4056 ASSERT(floatBox.isFloating()); |
| 4059 bool floatBoxIsSelfPaintingLayer = | 4057 bool floatBoxIsSelfPaintingLayer = |
| 4060 floatBox.hasLayer() && floatBox.layer()->isSelfPaintingLayer(); | 4058 floatBox.hasLayer() && floatBox.layer()->isSelfPaintingLayer(); |
| 4061 for (LayoutObject* ancestor = floatBox.parent(); | 4059 for (LayoutObject* ancestor = floatBox.parent(); |
| 4062 ancestor && ancestor->isLayoutBlockFlow(); | 4060 ancestor && ancestor->isLayoutBlockFlow(); |
| 4063 ancestor = ancestor->parent()) { | 4061 ancestor = ancestor->parent()) { |
| 4064 LayoutBlockFlow* ancestorBlock = toLayoutBlockFlow(ancestor); | 4062 LayoutBlockFlow* ancestorBlock = toLayoutBlockFlow(ancestor); |
| 4065 FloatingObjects* ancestorFloatingObjects = | 4063 FloatingObjects* ancestorFloatingObjects = |
| 4066 ancestorBlock->m_floatingObjects.get(); | 4064 ancestorBlock->m_floatingObjects.get(); |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4600 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 4598 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
| 4601 } | 4599 } |
| 4602 | 4600 |
| 4603 void LayoutBlockFlow::invalidateDisplayItemClients( | 4601 void LayoutBlockFlow::invalidateDisplayItemClients( |
| 4604 PaintInvalidationReason invalidationReason) const { | 4602 PaintInvalidationReason invalidationReason) const { |
| 4605 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( | 4603 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( |
| 4606 invalidationReason); | 4604 invalidationReason); |
| 4607 } | 4605 } |
| 4608 | 4606 |
| 4609 } // namespace blink | 4607 } // namespace blink |
| OLD | NEW |