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 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 if (element->isFormControlElement()) { | 1337 if (element->isFormControlElement()) { |
1338 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). | 1338 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). |
1339 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTo
p() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1339 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTo
p() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
1340 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().margi
nBottom() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1340 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().margi
nBottom() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
1341 } | 1341 } |
1342 LayoutUnit baseHeight = box().size().height() - (isBoxSizingBorder ? Lay
outUnit() : box().borderAndPaddingHeight()); | 1342 LayoutUnit baseHeight = box().size().height() - (isBoxSizingBorder ? Lay
outUnit() : box().borderAndPaddingHeight()); |
1343 baseHeight = LayoutUnit(baseHeight / zoomFactor); | 1343 baseHeight = LayoutUnit(baseHeight / zoomFactor); |
1344 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::UnitType::Pixels); | 1344 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::UnitType::Pixels); |
1345 } | 1345 } |
1346 | 1346 |
1347 document.updateLayout(); | 1347 document.updateStyleAndLayout(); |
1348 | 1348 |
1349 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. | 1349 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. |
1350 } | 1350 } |
1351 | 1351 |
1352 LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
t ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) | 1352 LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
t ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) |
1353 { | 1353 { |
1354 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec
t)), UseTransforms).boundingBox()); | 1354 LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rec
t)), UseTransforms).boundingBox()); |
1355 localExposeRect.move(-box().borderLeft(), -box().borderTop()); | 1355 localExposeRect.move(-box().borderLeft(), -box().borderTop()); |
1356 LayoutRect layerBounds(LayoutPoint(), LayoutSize(box().clientWidth(), box().
clientHeight())); | 1356 LayoutRect layerBounds(LayoutPoint(), LayoutSize(box().clientWidth(), box().
clientHeight())); |
1357 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect
, alignX, alignY); | 1357 LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect
, alignX, alignY); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 } | 1609 } |
1610 | 1610 |
1611 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1611 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
1612 { | 1612 { |
1613 visitor->trace(m_scrollableArea); | 1613 visitor->trace(m_scrollableArea); |
1614 visitor->trace(m_hBar); | 1614 visitor->trace(m_hBar); |
1615 visitor->trace(m_vBar); | 1615 visitor->trace(m_vBar); |
1616 } | 1616 } |
1617 | 1617 |
1618 } // namespace blink | 1618 } // namespace blink |
OLD | NEW |