OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@gmail.com> | 9 * Christian Biesinger <cbiesinger@gmail.com> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 if (element->isFormControlElement()) { | 1336 if (element->isFormControlElement()) { |
1337 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). | 1337 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). |
1338 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTo
p() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1338 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTo
p() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
1339 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().margi
nBottom() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1339 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().margi
nBottom() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
1340 } | 1340 } |
1341 LayoutUnit baseHeight = box().size().height() - (isBoxSizingBorder ? Lay
outUnit() : box().borderAndPaddingHeight()); | 1341 LayoutUnit baseHeight = box().size().height() - (isBoxSizingBorder ? Lay
outUnit() : box().borderAndPaddingHeight()); |
1342 baseHeight = LayoutUnit(baseHeight / zoomFactor); | 1342 baseHeight = LayoutUnit(baseHeight / zoomFactor); |
1343 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::UnitType::Pixels); | 1343 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::UnitType::Pixels); |
1344 } | 1344 } |
1345 | 1345 |
1346 document.updateLayout(); | 1346 document.updateStyleAndLayout(); |
1347 | 1347 |
1348 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. | 1348 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. |
1349 } | 1349 } |
1350 | 1350 |
1351 LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
t ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) | 1351 LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
t ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) |
1352 { | 1352 { |
1353 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec
t)), UseTransforms).boundingBox()); | 1353 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec
t)), UseTransforms).boundingBox()); |
1354 localExposeRect.move(-box().borderLeft(), -box().borderTop()); | 1354 localExposeRect.move(-box().borderLeft(), -box().borderTop()); |
1355 LayoutRect layerBounds(LayoutPoint(), LayoutSize(box().clientWidth(), box().
clientHeight())); | 1355 LayoutRect layerBounds(LayoutPoint(), LayoutSize(box().clientWidth(), box().
clientHeight())); |
1356 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect
, alignX, alignY); | 1356 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect
, alignX, alignY); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 } | 1608 } |
1609 | 1609 |
1610 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1610 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
1611 { | 1611 { |
1612 visitor->trace(m_scrollableArea); | 1612 visitor->trace(m_scrollableArea); |
1613 visitor->trace(m_hBar); | 1613 visitor->trace(m_hBar); |
1614 visitor->trace(m_vBar); | 1614 visitor->trace(m_vBar); |
1615 } | 1615 } |
1616 | 1616 |
1617 } // namespace blink | 1617 } // namespace blink |
OLD | NEW |