Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698