| 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@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 bool isBoxSizingBorder = box().style()->boxSizing() == BORDER_BOX; | 1294 bool isBoxSizingBorder = box().style()->boxSizing() == BORDER_BOX; |
| 1295 | 1295 |
| 1296 EResize resize = box().style()->resize(); | 1296 EResize resize = box().style()->resize(); |
| 1297 if (resize != RESIZE_VERTICAL && difference.width()) { | 1297 if (resize != RESIZE_VERTICAL && difference.width()) { |
| 1298 if (element->isFormControlElement()) { | 1298 if (element->isFormControlElement()) { |
| 1299 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). | 1299 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). |
| 1300 element->setInlineStyleProperty(CSSPropertyMarginLeft, box().marginL
eft() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1300 element->setInlineStyleProperty(CSSPropertyMarginLeft, box().marginL
eft() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
| 1301 element->setInlineStyleProperty(CSSPropertyMarginRight, box().margin
Right() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1301 element->setInlineStyleProperty(CSSPropertyMarginRight, box().margin
Right() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
| 1302 } | 1302 } |
| 1303 LayoutUnit baseWidth = box().size().width() - (isBoxSizingBorder ? Layou
tUnit() : box().borderAndPaddingWidth()); | 1303 LayoutUnit baseWidth = box().size().width() - (isBoxSizingBorder ? Layou
tUnit() : box().borderAndPaddingWidth()); |
| 1304 baseWidth = baseWidth / zoomFactor; | 1304 baseWidth = LayoutUnit(baseWidth / zoomFactor); |
| 1305 element->setInlineStyleProperty(CSSPropertyWidth, roundToInt(baseWidth +
difference.width()), CSSPrimitiveValue::UnitType::Pixels); | 1305 element->setInlineStyleProperty(CSSPropertyWidth, roundToInt(baseWidth +
difference.width()), CSSPrimitiveValue::UnitType::Pixels); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 if (resize != RESIZE_HORIZONTAL && difference.height()) { | 1308 if (resize != RESIZE_HORIZONTAL && difference.height()) { |
| 1309 if (element->isFormControlElement()) { | 1309 if (element->isFormControlElement()) { |
| 1310 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). | 1310 // Make implicit margins from the theme explicit (see <http://bugs.w
ebkit.org/show_bug.cgi?id=9547>). |
| 1311 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTo
p() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1311 element->setInlineStyleProperty(CSSPropertyMarginTop, box().marginTo
p() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
| 1312 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().margi
nBottom() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); | 1312 element->setInlineStyleProperty(CSSPropertyMarginBottom, box().margi
nBottom() / zoomFactor, CSSPrimitiveValue::UnitType::Pixels); |
| 1313 } | 1313 } |
| 1314 LayoutUnit baseHeight = box().size().height() - (isBoxSizingBorder ? Lay
outUnit() : box().borderAndPaddingHeight()); | 1314 LayoutUnit baseHeight = box().size().height() - (isBoxSizingBorder ? Lay
outUnit() : box().borderAndPaddingHeight()); |
| 1315 baseHeight = baseHeight / zoomFactor; | 1315 baseHeight = LayoutUnit(baseHeight / zoomFactor); |
| 1316 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::UnitType::Pixels); | 1316 element->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight
+ difference.height()), CSSPrimitiveValue::UnitType::Pixels); |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 document.updateLayout(); | 1319 document.updateLayout(); |
| 1320 | 1320 |
| 1321 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. | 1321 // FIXME (Radar 4118564): We should also autoscroll the window as necessary
to keep the point under the cursor in view. |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
t ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) | 1324 LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
t ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) |
| 1325 { | 1325 { |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1556 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
| 1557 { | 1557 { |
| 1558 visitor->trace(m_scrollableArea); | 1558 visitor->trace(m_scrollableArea); |
| 1559 visitor->trace(m_hBar); | 1559 visitor->trace(m_hBar); |
| 1560 visitor->trace(m_vBar); | 1560 visitor->trace(m_vBar); |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 } // namespace blink | 1563 } // namespace blink |
| OLD | NEW |