| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index ba359cea2d719e2710bf57da93ab21c849aed03d..3b05ef7f2dc0d75a09499b9afc64e6b2eafe8104 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -438,7 +438,7 @@ bool Element::shouldIgnoreAttributeCase() const
|
|
|
| void Element::scrollIntoView(bool alignToTop)
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (!layoutObject())
|
| return;
|
| @@ -457,7 +457,7 @@ void Element::scrollIntoView(bool alignToTop)
|
|
|
| void Element::scrollIntoViewIfNeeded(bool centerIfNeeded)
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (!layoutObject())
|
| return;
|
| @@ -548,8 +548,8 @@ void Element::nativeApplyScroll(ScrollState& scrollState)
|
| if (delta.isZero())
|
| return;
|
|
|
| - // TODO(esprehn): This should use updateLayoutIgnorePendingStylesheetsForNode.
|
| - document().updateLayoutIgnorePendingStylesheets();
|
| + // TODO(esprehn): This should use updateStyleAndLayoutIgnorePendingStylesheetsForNode.
|
| + document().updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| LayoutBox* boxToScroll = nullptr;
|
|
|
| @@ -602,7 +602,7 @@ void Element::callApplyScroll(ScrollState& scrollState)
|
|
|
| int Element::offsetLeft()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject())
|
| return adjustLayoutUnitForAbsoluteZoom(LayoutUnit(layoutObject->pixelSnappedOffsetLeft()), layoutObject->styleRef()).round();
|
| return 0;
|
| @@ -610,7 +610,7 @@ int Element::offsetLeft()
|
|
|
| int Element::offsetTop()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject())
|
| return adjustLayoutUnitForAbsoluteZoom(LayoutUnit(layoutObject->pixelSnappedOffsetTop()), layoutObject->styleRef()).round();
|
| return 0;
|
| @@ -618,7 +618,7 @@ int Element::offsetTop()
|
|
|
| int Element::offsetWidth()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject())
|
| return adjustLayoutUnitForAbsoluteZoom(LayoutUnit(layoutObject->pixelSnappedOffsetWidth()), layoutObject->styleRef()).round();
|
| return 0;
|
| @@ -626,7 +626,7 @@ int Element::offsetWidth()
|
|
|
| int Element::offsetHeight()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject())
|
| return adjustLayoutUnitForAbsoluteZoom(LayoutUnit(layoutObject->pixelSnappedOffsetHeight()), layoutObject->styleRef()).round();
|
| return 0;
|
| @@ -634,7 +634,7 @@ int Element::offsetHeight()
|
|
|
| Element* Element::offsetParent()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| LayoutObject* layoutObject = this->layoutObject();
|
| if (!layoutObject)
|
| @@ -652,7 +652,7 @@ Element* Element::offsetParent()
|
|
|
| int Element::clientLeft()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (LayoutBox* layoutObject = layoutBox())
|
| return adjustLayoutUnitForAbsoluteZoom(layoutObject->clientLeft(), layoutObject->styleRef()).round();
|
| @@ -661,7 +661,7 @@ int Element::clientLeft()
|
|
|
| int Element::clientTop()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (LayoutBox* layoutObject = layoutBox())
|
| return adjustLayoutUnitForAbsoluteZoom(layoutObject->clientTop(), layoutObject->styleRef()).round();
|
| @@ -670,7 +670,7 @@ int Element::clientTop()
|
|
|
| int Element::clientWidth()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| // When in strict mode, clientWidth for the document element should return the width of the containing frame.
|
| // When in quirks mode, clientWidth for the body element should return the width of the containing frame.
|
| @@ -691,7 +691,7 @@ int Element::clientWidth()
|
|
|
| int Element::clientHeight()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| // When in strict mode, clientHeight for the document element should return the height of the containing frame.
|
| // When in quirks mode, clientHeight for the body element should return the height of the containing frame.
|
| @@ -713,7 +713,7 @@ int Element::clientHeight()
|
|
|
| double Element::scrollLeft()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (document().scrollingElement() == this) {
|
| if (document().domWindow())
|
| @@ -729,7 +729,7 @@ double Element::scrollLeft()
|
|
|
| double Element::scrollTop()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (document().scrollingElement() == this) {
|
| if (document().domWindow())
|
| @@ -745,7 +745,7 @@ double Element::scrollTop()
|
|
|
| void Element::setScrollLeft(double newLeft)
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| newLeft = ScrollableArea::normalizeNonFiniteScroll(newLeft);
|
|
|
| @@ -761,7 +761,7 @@ void Element::setScrollLeft(double newLeft)
|
|
|
| void Element::setScrollTop(double newTop)
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| newTop = ScrollableArea::normalizeNonFiniteScroll(newTop);
|
|
|
| @@ -777,7 +777,7 @@ void Element::setScrollTop(double newTop)
|
|
|
| int Element::scrollWidth()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (document().scrollingElement() == this) {
|
| if (document().view())
|
| @@ -792,7 +792,7 @@ int Element::scrollWidth()
|
|
|
| int Element::scrollHeight()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (document().scrollingElement() == this) {
|
| if (document().view())
|
| @@ -817,7 +817,7 @@ void Element::scrollBy(const ScrollToOptions& scrollToOptions)
|
| {
|
| // FIXME: This should be removed once scroll updates are processed only after
|
| // the compositing update. See http://crbug.com/420741.
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (document().scrollingElement() == this) {
|
| scrollFrameBy(scrollToOptions);
|
| @@ -838,7 +838,7 @@ void Element::scrollTo(const ScrollToOptions& scrollToOptions)
|
| {
|
| // FIXME: This should be removed once scroll updates are processed only after
|
| // the compositing update. See http://crbug.com/420741.
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (document().scrollingElement() == this) {
|
| scrollFrameTo(scrollToOptions);
|
| @@ -959,7 +959,7 @@ uint32_t Element::compositorMutableProperties() const
|
|
|
| bool Element::hasNonEmptyLayoutSize() const
|
| {
|
| - document().updateLayoutIgnorePendingStylesheets();
|
| + document().updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| if (LayoutBoxModelObject* box = layoutBoxModelObject())
|
| return box->hasNonEmptyLayoutSize();
|
| @@ -968,7 +968,7 @@ bool Element::hasNonEmptyLayoutSize() const
|
|
|
| IntRect Element::boundsInViewport() const
|
| {
|
| - document().updateLayoutIgnorePendingStylesheets();
|
| + document().updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| FrameView* view = document().view();
|
| if (!view)
|
| @@ -997,7 +997,7 @@ IntRect Element::boundsInViewport() const
|
|
|
| ClientRectList* Element::getClientRects()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| LayoutObject* elementLayoutObject = layoutObject();
|
| if (!elementLayoutObject || (!elementLayoutObject->isBoxModelObject() && !elementLayoutObject->isBR()))
|
| @@ -1014,7 +1014,7 @@ ClientRectList* Element::getClientRects()
|
|
|
| ClientRect* Element::getBoundingClientRect()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| Vector<FloatQuad> quads;
|
| LayoutObject* elementLayoutObject = layoutObject();
|
| @@ -1042,14 +1042,14 @@ ClientRect* Element::getBoundingClientRect()
|
|
|
| const AtomicString& Element::computedRole()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document());
|
| return cache->get()->computedRoleForNode(this);
|
| }
|
|
|
| String Element::computedName()
|
| {
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document());
|
| return cache->get()->computedNameForNode(this);
|
| }
|
| @@ -2373,7 +2373,7 @@ void Element::focus(const FocusParams& params)
|
| if (!document().isActive())
|
| return;
|
|
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
| if (!isFocusable())
|
| return;
|
|
|
| @@ -2692,7 +2692,7 @@ void Element::releasePointerCapture(int pointerId, ExceptionState& exceptionStat
|
| String Element::innerText()
|
| {
|
| // We need to update layout, since plainText uses line boxes in the layout tree.
|
| - document().updateLayoutIgnorePendingStylesheetsForNode(this);
|
| + document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
|
|
|
| if (!layoutObject())
|
| return textContent(true);
|
|
|