| 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 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2659 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); | 2659 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| 2660 FloatingObjectSetIterator begin = floatingObjectSet.begin(); | 2660 FloatingObjectSetIterator begin = floatingObjectSet.begin(); |
| 2661 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { | 2661 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { |
| 2662 --it; | 2662 --it; |
| 2663 FloatingObject* floatingObject = it->get(); | 2663 FloatingObject* floatingObject = it->get(); |
| 2664 if (floatingObject->shouldPaint() && !floatingObject->layoutObject()->ha
sSelfPaintingLayer()) { | 2664 if (floatingObject->shouldPaint() && !floatingObject->layoutObject()->ha
sSelfPaintingLayer()) { |
| 2665 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject
) - floatingObject->layoutObject()->location().x(); | 2665 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject
) - floatingObject->layoutObject()->location().x(); |
| 2666 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject
) - floatingObject->layoutObject()->location().y(); | 2666 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject
) - floatingObject->layoutObject()->location().y(); |
| 2667 LayoutPoint childPoint = flipFloatForWritingModeForChild(floatingObj
ect, adjustedLocation + LayoutSize(xOffset, yOffset)); | 2667 LayoutPoint childPoint = flipFloatForWritingModeForChild(floatingObj
ect, adjustedLocation + LayoutSize(xOffset, yOffset)); |
| 2668 if (floatingObject->layoutObject()->hitTest(result, locationInContai
ner, childPoint)) { | 2668 if (floatingObject->layoutObject()->hitTest(result, locationInContai
ner, childPoint)) { |
| 2669 updateHitTestResult(result, locationInContainer.point() - toLayo
utSize(childPoint)); | 2669 // TODO(dtapuska): calculate the layout rect |
| 2670 updateHitTestResult(result, locationInContainer.point() - toLayo
utSize(childPoint), result.validityRect()); |
| 2670 return true; | 2671 return true; |
| 2671 } | 2672 } |
| 2672 } | 2673 } |
| 2673 } | 2674 } |
| 2674 | 2675 |
| 2675 return false; | 2676 return false; |
| 2676 } | 2677 } |
| 2677 | 2678 |
| 2678 LayoutUnit LayoutBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop,
LayoutUnit fixedOffset, LayoutUnit logicalHeight) const | 2679 LayoutUnit LayoutBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop,
LayoutUnit fixedOffset, LayoutUnit logicalHeight) const |
| 2679 { | 2680 { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 FrameView* frameView = document().view(); | 3151 FrameView* frameView = document().view(); |
| 3151 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3152 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
| 3152 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3153 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
| 3153 if (size().height() < visibleHeight) | 3154 if (size().height() < visibleHeight) |
| 3154 top += (visibleHeight - size().height()) / 2; | 3155 top += (visibleHeight - size().height()) / 2; |
| 3155 setY(top); | 3156 setY(top); |
| 3156 dialog->setCentered(top); | 3157 dialog->setCentered(top); |
| 3157 } | 3158 } |
| 3158 | 3159 |
| 3159 } // namespace blink | 3160 } // namespace blink |
| OLD | NEW |