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

Side by Side Diff: third_party/WebKit/Source/core/dom/Range.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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 end = endOfDocument(end); 1516 end = endOfDocument(end);
1517 } else { 1517 } else {
1518 return; 1518 return;
1519 } 1519 }
1520 setStart(start.deepEquivalent().computeContainerNode(), start.deepEquivalent ().computeOffsetInContainerNode(), exceptionState); 1520 setStart(start.deepEquivalent().computeContainerNode(), start.deepEquivalent ().computeOffsetInContainerNode(), exceptionState);
1521 setEnd(end.deepEquivalent().computeContainerNode(), end.deepEquivalent().com puteOffsetInContainerNode(), exceptionState); 1521 setEnd(end.deepEquivalent().computeContainerNode(), end.deepEquivalent().com puteOffsetInContainerNode(), exceptionState);
1522 } 1522 }
1523 1523
1524 ClientRectList* Range::getClientRects() const 1524 ClientRectList* Range::getClientRects() const
1525 { 1525 {
1526 m_ownerDocument->updateLayoutIgnorePendingStylesheets(); 1526 m_ownerDocument->updateStyleAndLayoutIgnorePendingStylesheets();
1527 1527
1528 Vector<FloatQuad> quads; 1528 Vector<FloatQuad> quads;
1529 getBorderAndTextQuads(quads); 1529 getBorderAndTextQuads(quads);
1530 1530
1531 return ClientRectList::create(quads); 1531 return ClientRectList::create(quads);
1532 } 1532 }
1533 1533
1534 ClientRect* Range::getBoundingClientRect() const 1534 ClientRect* Range::getBoundingClientRect() const
1535 { 1535 {
1536 return ClientRect::create(boundingRect()); 1536 return ClientRect::create(boundingRect());
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 m_ownerDocument->adjustFloatQuadsForScrollAndAbsoluteZoom(textQu ads, *layoutText); 1569 m_ownerDocument->adjustFloatQuadsForScrollAndAbsoluteZoom(textQu ads, *layoutText);
1570 1570
1571 quads.appendVector(textQuads); 1571 quads.appendVector(textQuads);
1572 } 1572 }
1573 } 1573 }
1574 } 1574 }
1575 } 1575 }
1576 1576
1577 FloatRect Range::boundingRect() const 1577 FloatRect Range::boundingRect() const
1578 { 1578 {
1579 m_ownerDocument->updateLayoutIgnorePendingStylesheets(); 1579 m_ownerDocument->updateStyleAndLayoutIgnorePendingStylesheets();
1580 1580
1581 Vector<FloatQuad> quads; 1581 Vector<FloatQuad> quads;
1582 getBorderAndTextQuads(quads); 1582 getBorderAndTextQuads(quads);
1583 1583
1584 FloatRect result; 1584 FloatRect result;
1585 // As per section 10 in https://www.w3.org/TR/cssom-view/ 1585 // As per section 10 in https://www.w3.org/TR/cssom-view/
1586 // "Return a static DOMRect object describing the smallest rectangle that 1586 // "Return a static DOMRect object describing the smallest rectangle that
1587 // includes the first rectangle in list and all of the remaining rectangles 1587 // includes the first rectangle in list and all of the remaining rectangles
1588 // of which the height or width is not zero." 1588 // of which the height or width is not zero."
1589 for (const FloatQuad& quad : quads) { 1589 for (const FloatQuad& quad : quads) {
(...skipping 21 matching lines...) Expand all
1611 { 1611 {
1612 if (range && range->boundaryPointsValid()) { 1612 if (range && range->boundaryPointsValid()) {
1613 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); 1613 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E");
1614 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); 1614 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset());
1615 } else { 1615 } else {
1616 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n"); 1616 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n");
1617 } 1617 }
1618 } 1618 }
1619 1619
1620 #endif 1620 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698