Changeset 177035 in webkit
- Timestamp:
- Dec 9, 2014 1:03:54 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt
r72880 r177035 1 1 This is an element 2 2 3 3 4 This is an element 4 5 This is an element -
trunk/LayoutTests/fast/spatial-navigation/snav-container-white-space.html
r155272 r177035 73 73 </a> 74 74 </div> 75 75 <br/> 76 76 <div> 77 77 <a href="#" id="2">This is an element</a><br> -
trunk/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas-expected.txt
r73452 r177035 1 1 2 2 3 3 -
trunk/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas.html
r155272 r177035 58 58 59 59 <a id="start" href="a"><img src="resources/green.png" width=50px height=50px></a> 60 <br> 60 61 <div> 61 62 <img src="resources/green.png" width=200px height=200px usemap="#map"> -
trunk/Source/WebCore/ChangeLog
r177031 r177035 1 2014-12-09 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Delete Node::boundingBox() 4 https://bugs.webkit.org/show_bug.cgi?id=139333 5 6 Conceptually, boundingBox() should be on RenderInline. In addition, 7 Node::boundingBox() is completely broken for inline elements: it 8 makes a rect from the top left of the first inline child to the 9 bottom right of the last inline child, disregarding the intermediate 10 inline children. This breaks with vertical text and with line 11 breaks. 12 13 What makes this problem worse is that some functions actually rely 14 on this bad behavior. These functions are functions that use the 15 Node's so-called "bounding box" to scroll to an anchor tag. 16 17 This patch goes through all the call sites of Node::boundingBox(), 18 and segregates them into calls that expect the true bounding box 19 and calls that need this false bounding box. This patch then moves 20 this false bounding box into RenderElement, using the name 21 anchorRect(). Callers what want the correct bounding box have been 22 updated to use RenderElement::absoluteBoundingBoxRect(). 23 24 Reviewed by Zalan Bujtas. 25 26 No new tests because there should be no behavior change. 27 28 * accessibility/AccessibilitySlider.cpp: 29 (WebCore::AccessibilitySliderThumb::elementRect): Use 30 RenderObject::absoluteBoundingBoxRect() 31 * dom/ContainerNode.cpp: 32 (WebCore::ContainerNode::getUpperLeftCorner): Deleted. 33 (WebCore::ContainerNode::getLowerRightCorner): Deleted. 34 (WebCore::ContainerNode::boundingBox): Deleted. 35 * dom/ContainerNode.h: 36 * dom/Element.cpp: 37 (WebCore::Element::scrollIntoView): Use RenderElement::anchorRect(). 38 (WebCore::Element::scrollIntoViewIfNeeded): Ditto. 39 (WebCore::Element::updateFocusAppearance): Ditto. 40 * dom/Node.cpp: 41 (WebCore::Node::boundingBox): Deleted. 42 * dom/Node.h: 43 (WebCore::Node::pixelSnappedBoundingBox): Deleted. 44 * html/ColorInputType.cpp: 45 (WebCore::ColorInputType::elementRectRelativeToRootView): Use 46 RenderObject::absoluteBoundingBoxRect() 47 * html/HTMLInputElement.cpp: 48 (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto. 49 * html/ValidationMessage.cpp: 50 (WebCore::ValidationMessage::buildBubbleTree): Ditto. 51 * page/FrameView.cpp: 52 (WebCore::FrameView::scrollElementToRect): Use 53 RenderElement::anchorRect(). 54 (WebCore::FrameView::scrollToAnchor): Ditto. 55 * page/SpatialNavigation.cpp: 56 (WebCore::nodeRectInAbsoluteCoordinates): Use 57 RenderObject::absoluteBoundingBoxRect() 58 * rendering/RenderElement.cpp: 59 (WebCore::RenderElement::getUpperLeftCorner): Moved from ContainerNode. 60 (WebCore::RenderElement::getLowerRightCorner): Moved from 61 ContainerNode. 62 (WebCore::RenderElement::anchorRect): Moved from ContainerNode. 63 * rendering/RenderObject.h: 64 * rendering/RenderText.cpp: 65 (WebCore::RenderText::topOfFirstText): Helper for 66 RenderElement::anchorRect() 67 * rendering/RenderText.h: 68 1 69 2014-12-09 Antti Koivisto <antti@apple.com> 2 70 -
trunk/Source/WebCore/WebCore.exp.in
r177012 r177035 2321 2321 __ZN7WebCore19TextIndicatorWindowD1Ev 2322 2322 __ZN7WebCore19applicationIsSafariEv 2323 __ZN7WebCore19rendererBoundingBoxERKNS_4NodeE 2323 2324 __ZN7WebCore20PlatformEventFactory24createPlatformMouseEventEP7NSEventP6NSView 2324 2325 __ZN7WebCore20PlatformEventFactory27createPlatformKeyboardEventEP7NSEvent -
trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp
r174898 r177035 160 160 if (!sliderRenderer || !sliderRenderer->isSlider()) 161 161 return LayoutRect(); 162 return downcast<HTMLInputElement>(sliderRenderer->node())->sliderThumbElement()->boundingBox();162 return rendererBoundingBox(*downcast<HTMLInputElement>(sliderRenderer->node())->sliderThumbElement()); 163 163 } 164 164 -
trunk/Source/WebCore/dom/ContainerNode.cpp
r176502 r177035 778 778 } 779 779 780 bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const781 {782 if (!renderer())783 return false;784 // What is this code really trying to do?785 RenderObject* o = renderer();786 if (!o->isInline() || o->isReplaced()) {787 point = o->localToAbsolute(FloatPoint(), UseTransforms);788 return true;789 }790 791 // find the next text/image child, to get a position792 while (o) {793 RenderObject* p = o;794 if (RenderObject* child = o->firstChildSlow())795 o = child;796 else if (o->nextSibling())797 o = o->nextSibling();798 else {799 RenderObject* next = 0;800 while (!next && o->parent()) {801 o = o->parent();802 next = o->nextSibling();803 }804 o = next;805 806 if (!o)807 break;808 }809 ASSERT(o);810 811 if (!o->isInline() || o->isReplaced()) {812 point = o->localToAbsolute(FloatPoint(), UseTransforms);813 return true;814 }815 816 if (p->node() && p->node() == this && is<RenderText>(*o) && !downcast<RenderText>(*o).firstTextBox()) {817 // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor818 } else if (is<RenderText>(*o) || o->isReplaced()) {819 point = FloatPoint();820 if (is<RenderText>(*o) && downcast<RenderText>(*o).firstTextBox())821 point.move(downcast<RenderText>(*o).linesBoundingBox().x(), downcast<RenderText>(*o).firstTextBox()->root().lineTop());822 else if (is<RenderBox>(*o))823 point.moveBy(downcast<RenderBox>(*o).location());824 point = o->container()->localToAbsolute(point, UseTransforms);825 return true;826 }827 }828 829 // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be830 // at the end of the document. Scroll to the bottom. FIXME: who said anything about scrolling?831 if (!o && document().view()) {832 point = FloatPoint(0, document().view()->contentsHeight());833 return true;834 }835 return false;836 }837 838 bool ContainerNode::getLowerRightCorner(FloatPoint& point) const839 {840 if (!renderer())841 return false;842 843 RenderObject* o = renderer();844 if (!o->isInline() || o->isReplaced()) {845 point = o->localToAbsolute(LayoutPoint(downcast<RenderBox>(*o).size()), UseTransforms);846 return true;847 }848 849 // find the last text/image child, to get a position850 while (o) {851 if (RenderObject* child = o->lastChildSlow())852 o = child;853 else if (o->previousSibling())854 o = o->previousSibling();855 else {856 RenderObject* prev = 0;857 while (!prev) {858 o = o->parent();859 if (!o)860 return false;861 prev = o->previousSibling();862 }863 o = prev;864 }865 ASSERT(o);866 if (is<RenderText>(*o) || o->isReplaced()) {867 point = FloatPoint();868 if (is<RenderText>(*o)) {869 IntRect linesBox = downcast<RenderText>(*o).linesBoundingBox();870 if (!linesBox.maxX() && !linesBox.maxY())871 continue;872 point.moveBy(linesBox.maxXMaxYCorner());873 } else874 point.moveBy(downcast<RenderBox>(*o).frameRect().maxXMaxYCorner());875 point = o->container()->localToAbsolute(point, UseTransforms);876 return true;877 }878 }879 return true;880 }881 882 LayoutRect ContainerNode::boundingBox() const883 {884 FloatPoint upperLeft, lowerRight;885 bool foundUpperLeft = getUpperLeftCorner(upperLeft);886 bool foundLowerRight = getLowerRightCorner(lowerRight);887 888 // If we've found one corner, but not the other,889 // then we should just return a point at the corner that we did find.890 if (foundUpperLeft != foundLowerRight) {891 if (foundUpperLeft)892 lowerRight = upperLeft;893 else894 upperLeft = lowerRight;895 }896 897 return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));898 }899 900 780 unsigned ContainerNode::countChildNodes() const 901 781 { … … 1031 911 } 1032 912 913 LayoutRect rendererAnchorRect(const ContainerNode& node) 914 { 915 if (RenderElement* renderer = node.renderer()) 916 return renderer->anchorRect(); 917 return LayoutRect(); 918 } 919 1033 920 } // namespace WebCore -
trunk/Source/WebCore/dom/ContainerNode.h
r176502 r177035 113 113 void cloneChildNodes(ContainerNode* clone); 114 114 115 virtual LayoutRect boundingBox() const override;116 117 115 enum ChildChangeType { ElementInserted, ElementRemoved, TextInserted, TextRemoved, TextChanged, AllChildrenRemoved, NonContentsChildChanged }; 118 116 enum ChildChangeSource { ChildChangeSourceParser, ChildChangeSourceAPI }; … … 158 156 void insertBeforeCommon(Node& nextChild, Node& oldChild); 159 157 160 bool getUpperLeftCorner(FloatPoint&) const;161 bool getLowerRightCorner(FloatPoint&) const;162 163 158 void notifyChildInserted(Node& child, ChildChangeSource); 164 159 void notifyChildRemoved(Node& child, Node* previousSibling, Node* nextSibling, ChildChangeSource); … … 310 305 }; 311 306 307 LayoutRect rendererAnchorRect(const ContainerNode&); 308 312 309 } // namespace WebCore 313 310 -
trunk/Source/WebCore/dom/Element.cpp
r176630 r177035 573 573 return; 574 574 575 LayoutRect bounds = boundingBox();575 LayoutRect bounds = renderer()->anchorRect(); 576 576 // Align to the top / bottom and to the closest edge. 577 577 if (alignToTop) … … 588 588 return; 589 589 590 LayoutRect bounds = boundingBox();590 LayoutRect bounds = renderer()->anchorRect(); 591 591 if (centerIfNeeded) 592 592 renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded); … … 1979 1979 } 1980 1980 } else if (renderer() && !renderer()->isWidget()) 1981 renderer()->scrollRectToVisible( boundingBox());1981 renderer()->scrollRectToVisible(renderer()->anchorRect()); 1982 1982 } 1983 1983 -
trunk/Source/WebCore/dom/Node.cpp
r176502 r177035 638 638 return is<RenderBoxModelObject>(renderer) ? downcast<RenderBoxModelObject>(renderer) : nullptr; 639 639 } 640 641 LayoutRect Node::boundingBox() const642 {643 if (renderer())644 return renderer()->absoluteBoundingBoxRect();645 return LayoutRect();646 }647 640 648 641 LayoutRect Node::renderRect(bool* isReplaced) … … 2267 2260 } 2268 2261 2262 IntRect rendererBoundingBox(const Node& node) 2263 { 2264 if (RenderObject* renderer = node.renderer()) 2265 return renderer->absoluteBoundingBoxRect(); 2266 return IntRect(); 2267 } 2268 2269 2269 } // namespace WebCore 2270 2270 -
trunk/Source/WebCore/dom/Node.h
r176502 r177035 378 378 } 379 379 380 virtual LayoutRect boundingBox() const;381 IntRect pixelSnappedBoundingBox() const { return snappedIntRect(boundingBox()); }382 380 WEBCORE_EXPORT LayoutRect renderRect(bool* isReplaced); 383 381 IntRect pixelSnappedRenderRect(bool* isReplaced) { return snappedIntRect(renderRect(isReplaced)); } … … 740 738 } 741 739 740 WEBCORE_EXPORT IntRect rendererBoundingBox(const Node&); 741 742 742 } // namespace WebCore 743 743 -
trunk/Source/WebCore/html/ColorInputType.cpp
r174047 r177035 205 205 IntRect ColorInputType::elementRectRelativeToRootView() const 206 206 { 207 return element().document().view()->contentsToRootView( element().pixelSnappedBoundingBox());207 return element().document().view()->contentsToRootView(rendererBoundingBox(element())); 208 208 } 209 209 -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r176502 r177035 1878 1878 } 1879 1879 1880 parameters.anchorRectInRootView = document().view()->contentsToRootView( pixelSnappedBoundingBox());1880 parameters.anchorRectInRootView = document().view()->contentsToRootView(rendererBoundingBox(*this)); 1881 1881 parameters.currentValue = value(); 1882 1882 parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; -
trunk/Source/WebCore/html/ValidationMessage.cpp
r176459 r177035 179 179 shadowRoot.appendChild(m_bubble.get(), ASSERT_NO_EXCEPTION); 180 180 document.updateLayout(); 181 adjustBubblePosition( m_element->boundingBox(), m_bubble.get());181 adjustBubblePosition(rendererBoundingBox(*m_element), m_bubble.get()); 182 182 183 183 RefPtr<HTMLDivElement> clipper = HTMLDivElement::create(document); -
trunk/Source/WebCore/loader/FrameLoader.cpp
r176958 r177035 1149 1149 1150 1150 if (m_frame.view()) 1151 m_frame.view()->maintainScrollPositionAtAnchor( 0);1151 m_frame.view()->maintainScrollPositionAtAnchor(nullptr); 1152 1152 m_activityAssertion = nullptr; 1153 1153 } -
trunk/Source/WebCore/page/FrameView.cpp
r176899 r177035 1985 1985 return false; 1986 1986 1987 maintainScrollPositionAtAnchor(anchorElement ? static_cast<Node*>(anchorElement) : frame().document()); 1987 ContainerNode* scrollPositionAnchor = anchorElement; 1988 if (!scrollPositionAnchor) 1989 scrollPositionAnchor = frame().document(); 1990 maintainScrollPositionAtAnchor(scrollPositionAnchor); 1988 1991 1989 1992 // If the anchor accepts keyboard focus, move focus there to aid users relying on keyboard navigation. … … 1994 1997 } 1995 1998 1996 void FrameView::maintainScrollPositionAtAnchor( Node* anchorNode)1999 void FrameView::maintainScrollPositionAtAnchor(ContainerNode* anchorNode) 1997 2000 { 1998 2001 m_maintainScrollPositionAnchor = anchorNode; … … 2015 2018 frame().document()->updateLayoutIgnorePendingStylesheets(); 2016 2019 2017 LayoutRect bounds = element->boundingBox();2020 LayoutRect bounds = rendererAnchorRect(*element); 2018 2021 int centeringOffsetX = (rect.width() - bounds.width()) / 2; 2019 2022 int centeringOffsetY = (rect.height() - bounds.height()) / 2; … … 2776 2779 void FrameView::scrollToAnchor() 2777 2780 { 2778 RefPtr< Node> anchorNode = m_maintainScrollPositionAnchor;2781 RefPtr<ContainerNode> anchorNode = m_maintainScrollPositionAnchor; 2779 2782 if (!anchorNode) 2780 2783 return; … … 2785 2788 LayoutRect rect; 2786 2789 if (anchorNode != frame().document()) 2787 rect = anchorNode->boundingBox();2790 rect = rendererAnchorRect(*anchorNode.get()); 2788 2791 2789 2792 // Scroll nested layers and frames to reveal the anchor. -
trunk/Source/WebCore/page/FrameView.h
r176798 r177035 28 28 #include "AdjustViewSizeOrNot.h" 29 29 #include "Color.h" 30 #include "ContainerNode.h" 30 31 #include "LayoutMilestones.h" 31 32 #include "LayoutRect.h" … … 389 390 bool scrollToFragment(const URL&); 390 391 bool scrollToAnchor(const String&); 391 void maintainScrollPositionAtAnchor( Node*);392 void maintainScrollPositionAtAnchor(ContainerNode*); 392 393 WEBCORE_EXPORT void scrollElementToRect(Element*, const IntRect&); 393 394 … … 716 717 bool m_firstVisuallyNonEmptyLayoutCallbackPending; 717 718 718 RefPtr< Node> m_maintainScrollPositionAnchor;719 RefPtr<ContainerNode> m_maintainScrollPositionAnchor; 719 720 720 721 // Renderer to hold our custom scroll corner. -
trunk/Source/WebCore/page/SpatialNavigation.cpp
r174840 r177035 502 502 } 503 503 504 // FIXME: This is completely broken. This should be deleted and callers should be calling ScrollView::contentsToWindow() instead. 504 505 static LayoutRect rectToAbsoluteCoordinates(Frame* initialFrame, const LayoutRect& initialRect) 505 506 { … … 522 523 if (is<Document>(*node)) 523 524 return frameRectInAbsoluteCoordinates(downcast<Document>(*node).frame()); 524 LayoutRect rect = rectToAbsoluteCoordinates(node->document().frame(), node->boundingBox()); 525 526 LayoutRect rect = rectToAbsoluteCoordinates(node->document().frame(), rendererBoundingBox(*node)); 525 527 526 528 // For authors that use border instead of outline in their CSS, we compensate by ignoring the border when calculating -
trunk/Source/WebCore/rendering/RenderElement.cpp
r176974 r177035 1512 1512 } 1513 1513 1514 } 1514 bool RenderElement::getLeadingCorner(FloatPoint& point) const 1515 { 1516 if (!isInline() || isReplaced()) { 1517 point = localToAbsolute(FloatPoint(), UseTransforms); 1518 return true; 1519 } 1520 1521 // find the next text/image child, to get a position 1522 const RenderObject* o = this; 1523 while (o) { 1524 const RenderObject* p = o; 1525 if (RenderObject* child = o->firstChildSlow()) 1526 o = child; 1527 else if (o->nextSibling()) 1528 o = o->nextSibling(); 1529 else { 1530 RenderObject* next = 0; 1531 while (!next && o->parent()) { 1532 o = o->parent(); 1533 next = o->nextSibling(); 1534 } 1535 o = next; 1536 1537 if (!o) 1538 break; 1539 } 1540 ASSERT(o); 1541 1542 if (!o->isInline() || o->isReplaced()) { 1543 point = o->localToAbsolute(FloatPoint(), UseTransforms); 1544 return true; 1545 } 1546 1547 if (p->node() && p->node() == element() && is<RenderText>(*o) && !downcast<RenderText>(*o).firstTextBox()) { 1548 // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor 1549 } else if (is<RenderText>(*o) || o->isReplaced()) { 1550 point = FloatPoint(); 1551 if (is<RenderText>(*o) && downcast<RenderText>(*o).firstTextBox()) 1552 point.move(downcast<RenderText>(*o).linesBoundingBox().x(), downcast<RenderText>(*o).topOfFirstText()); 1553 else if (is<RenderBox>(*o)) 1554 point.moveBy(downcast<RenderBox>(*o).location()); 1555 point = o->container()->localToAbsolute(point, UseTransforms); 1556 return true; 1557 } 1558 } 1559 1560 // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be 1561 // at the end of the document. Scroll to the bottom. FIXME: who said anything about scrolling? 1562 if (!o && document().view()) { 1563 point = FloatPoint(0, document().view()->contentsHeight()); 1564 return true; 1565 } 1566 return false; 1567 } 1568 1569 bool RenderElement::getTrailingCorner(FloatPoint& point) const 1570 { 1571 if (!isInline() || isReplaced()) { 1572 point = localToAbsolute(LayoutPoint(downcast<RenderBox>(*this).size()), UseTransforms); 1573 return true; 1574 } 1575 1576 // find the last text/image child, to get a position 1577 const RenderObject* o = this; 1578 while (o) { 1579 if (RenderObject* child = o->lastChildSlow()) 1580 o = child; 1581 else if (o->previousSibling()) 1582 o = o->previousSibling(); 1583 else { 1584 RenderObject* prev = 0; 1585 while (!prev) { 1586 o = o->parent(); 1587 if (!o) 1588 return false; 1589 prev = o->previousSibling(); 1590 } 1591 o = prev; 1592 } 1593 ASSERT(o); 1594 if (is<RenderText>(*o) || o->isReplaced()) { 1595 point = FloatPoint(); 1596 if (is<RenderText>(*o)) { 1597 IntRect linesBox = downcast<RenderText>(*o).linesBoundingBox(); 1598 if (!linesBox.maxX() && !linesBox.maxY()) 1599 continue; 1600 point.moveBy(linesBox.maxXMaxYCorner()); 1601 } else 1602 point.moveBy(downcast<RenderBox>(*o).frameRect().maxXMaxYCorner()); 1603 point = o->container()->localToAbsolute(point, UseTransforms); 1604 return true; 1605 } 1606 } 1607 return true; 1608 } 1609 1610 LayoutRect RenderElement::anchorRect() const 1611 { 1612 FloatPoint leading, trailing; 1613 bool foundLeading = getLeadingCorner(leading); 1614 bool foundTrailing = getTrailingCorner(trailing); 1615 1616 // If we've found one corner, but not the other, 1617 // then we should just return a point at the corner that we did find. 1618 if (foundLeading != foundTrailing) { 1619 if (foundLeading) 1620 foundTrailing = foundLeading; 1621 else 1622 foundLeading = foundTrailing; 1623 } 1624 1625 FloatPoint upperLeft = leading; 1626 FloatPoint lowerRight = trailing; 1627 1628 // Vertical writing modes might mean the leading point is not in the top left 1629 if (!isInline() || isReplaced()) { 1630 upperLeft = FloatPoint(std::min(leading.x(), trailing.x()), std::min(leading.y(), trailing.y())); 1631 lowerRight = FloatPoint(std::max(leading.x(), trailing.x()), std::max(leading.y(), trailing.y())); 1632 } // Otherwise, it's not obvious what to do. 1633 1634 return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft)); 1635 } 1636 1637 } -
trunk/Source/WebCore/rendering/RenderElement.h
r176478 r177035 151 151 bool hasHiddenBackface() const { return style().backfaceVisibility() == BackfaceVisibilityHidden; } 152 152 153 // anchorRect() is conceptually similar to absoluteBoundingBoxRect(), but is intended for scrolling to an anchor. 154 // It works differently than absoluteBoundingBoxRect() for inline renderers. 155 LayoutRect anchorRect() const; 156 153 157 bool hasFilter() const { return style().hasFilter(); } 154 158 bool hasBackdropFilter() const … … 262 266 virtual void newImageAnimationFrameAvailable(CachedImage&) final override; 263 267 268 bool getLeadingCorner(FloatPoint& output) const; 269 bool getTrailingCorner(FloatPoint& output) const; 270 264 271 unsigned m_baseTypeFlags : 6; 265 272 unsigned m_ancestorLineBoxDirty : 1; -
trunk/Source/WebCore/rendering/RenderText.cpp
r176790 r177035 1007 1007 } 1008 1008 1009 LayoutUnit RenderText::topOfFirstText() const 1010 { 1011 return firstTextBox()->root().lineTop(); 1012 } 1013 1009 1014 void applyTextTransform(const RenderStyle& style, String& text, UChar previousCharacter) 1010 1015 { -
trunk/Source/WebCore/rendering/RenderText.h
r176473 r177035 164 164 165 165 StringView stringView(int start = 0, int stop = -1) const; 166 167 LayoutUnit topOfFirstText() const; 166 168 167 169 protected: -
trunk/Source/WebKit/mac/ChangeLog
r177011 r177035 1 2014-12-09 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Delete Node::boundingBox() 4 https://bugs.webkit.org/show_bug.cgi?id=139333 5 6 Reviewed by Zalan Bujtas. 7 8 * WebView/WebActionMenuController.mm: 9 (elementBoundingBoxInWindowCoordinatesFromNode): Use 10 RenderObject::absoluteBoundingBoxRect(). 11 1 12 2014-12-08 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm
r176999 r177035 263 263 return IntRect(); 264 264 265 return view->contentsToWindow( node->pixelSnappedBoundingBox());265 return view->contentsToWindow(rendererBoundingBox(*node)); 266 266 } 267 267 -
trunk/Source/WebKit2/ChangeLog
r177033 r177035 1 2014-12-09 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Delete Node::boundingBox() 4 https://bugs.webkit.org/show_bug.cgi?id=139333 5 6 Reviewed by Zalan Bujtas. 7 8 * Shared/WebHitTestResult.cpp: 9 (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): 10 Use RenderObject::absoluteBoundingBoxRect(). 11 * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: 12 (WebKit::WebPage::findZoomableAreaForPoint): Use 13 RenderObject::absoluteBoundingBoxRect(). 14 1 15 2014-12-09 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebKit2/Shared/WebHitTestResult.cpp
r176999 r177035 26 26 #include <WebCore/FrameView.h> 27 27 #include <WebCore/HitTestResult.h> 28 #include <WebCore/RenderObject.h> 28 29 #include <WebCore/URL.h> 29 30 #include <WebCore/Node.h> … … 118 119 return IntRect(); 119 120 120 return view->contentsToWindow( node->pixelSnappedBoundingBox());121 return view->contentsToWindow(rendererBoundingBox(*node)); 121 122 } 122 123 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp
r173606 r177035 38 38 #include <WebCore/Frame.h> 39 39 #include <WebCore/FrameView.h> 40 #include <WebCore/RenderObject.h> 40 41 #include <WebCore/ScrollView.h> 41 42 … … 55 56 return; 56 57 57 IntRect zoomableArea = node->pixelSnappedBoundingBox();58 IntRect zoomableArea = rendererBoundingBox(*node); 58 59 59 60 while (true) { … … 71 72 72 73 node = node->parentNode(); 73 zoomableArea.unite( node->pixelSnappedBoundingBox());74 zoomableArea.unite(rendererBoundingBox(*node)); 74 75 } 75 76
Note: See TracChangeset
for help on using the changeset viewer.