Changeset 128644 in webkit
- Timestamp:
- Sep 14, 2012 1:01:36 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r128642 r128644 1 2012-09-14 Emil A Eklund <eae@chromium.org> 2 3 https://bugs.webkit.org/show_bug.cgi?id=96226 4 REGRESSION (r128006): Three spatial navigation tests are failing 5 6 Reviewed by Ryosuke Niwa. 7 8 Remove spatial navigation tests from Skipped list. 9 10 * platform/mac/Skipped: 11 1 12 2012-09-14 James Robinson <jamesr@chromium.org> 2 13 -
trunk/LayoutTests/platform/mac/Skipped
r128532 r128644 1011 1011 svg/custom/use-instanceRoot-as-event-target.xhtml 1012 1012 1013 # https://bugs.webkit.org/show_bug.cgi?id=962261014 # REGRESSION (r128006): Three spatial navigation tests are failing1015 fast/spatial-navigation/snav-container-white-space.html1016 fast/spatial-navigation/snav-div-overflow-scrol-hidden.html1017 fast/spatial-navigation/snav-imagemap-overlapped-areas.html1018 1019 1013 # Assorted failures that need investigation 1020 1014 -
trunk/Source/WebCore/ChangeLog
r128642 r128644 1 2012-09-14 Emil A Eklund <eae@chromium.org> 2 3 https://bugs.webkit.org/show_bug.cgi?id=96226 4 REGRESSION (r128006): Three spatial navigation tests are failing 5 6 Reviewed by Ryosuke Niwa. 7 8 Fix spatial navigation regression by reverting parts of r128006. 9 Specifically the change to remove the overridden boundingBox 10 method in ContainerNode. 11 12 * dom/ContainerNode.cpp: 13 (WebCore::ContainerNode::getUpperLeftCorner): 14 (WebCore): 15 (WebCore::ContainerNode::getLowerRightCorner): 16 (WebCore::ContainerNode::boundingBox): 17 * dom/ContainerNode.h: 18 (ContainerNode): 19 1 20 2012-09-14 James Robinson <jamesr@chromium.org> 2 21 -
trunk/Source/WebCore/dom/ContainerNode.cpp
r128559 r128644 727 727 } 728 728 729 bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const 730 { 731 if (!renderer()) 732 return false; 733 // What is this code really trying to do? 734 RenderObject* o = renderer(); 735 RenderObject* p = o; 736 737 if (!o->isInline() || o->isReplaced()) { 738 point = o->localToAbsolute(FloatPoint(), false, true); 739 return true; 740 } 741 742 // find the next text/image child, to get a position 743 while (o) { 744 p = o; 745 if (o->firstChild()) 746 o = o->firstChild(); 747 else if (o->nextSibling()) 748 o = o->nextSibling(); 749 else { 750 RenderObject* next = 0; 751 while (!next && o->parent()) { 752 o = o->parent(); 753 next = o->nextSibling(); 754 } 755 o = next; 756 757 if (!o) 758 break; 759 } 760 ASSERT(o); 761 762 if (!o->isInline() || o->isReplaced()) { 763 point = o->localToAbsolute(FloatPoint(), false, true); 764 return true; 765 } 766 767 if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toRenderText(o)->firstTextBox()) { 768 // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor 769 } else if ((o->isText() && !o->isBR()) || o->isReplaced()) { 770 point = FloatPoint(); 771 if (o->isText() && toRenderText(o)->firstTextBox()) { 772 point.move(toRenderText(o)->linesBoundingBox().x(), toRenderText(o)->firstTextBox()->root()->lineTop()); 773 } else if (o->isBox()) { 774 RenderBox* box = toRenderBox(o); 775 point.moveBy(box->location()); 776 } 777 point = o->container()->localToAbsolute(point, false, true); 778 return true; 779 } 780 } 781 782 // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be 783 // at the end of the document. Scroll to the bottom. FIXME: who said anything about scrolling? 784 if (!o && document()->view()) { 785 point = FloatPoint(0, document()->view()->contentsHeight()); 786 return true; 787 } 788 return false; 789 } 790 791 bool ContainerNode::getLowerRightCorner(FloatPoint& point) const 792 { 793 if (!renderer()) 794 return false; 795 796 RenderObject* o = renderer(); 797 if (!o->isInline() || o->isReplaced()) { 798 RenderBox* box = toRenderBox(o); 799 point = o->localToAbsolute(LayoutPoint(box->size()), false, true); 800 return true; 801 } 802 803 // find the last text/image child, to get a position 804 while (o) { 805 if (o->lastChild()) 806 o = o->lastChild(); 807 else if (o->previousSibling()) 808 o = o->previousSibling(); 809 else { 810 RenderObject* prev = 0; 811 while (!prev) { 812 o = o->parent(); 813 if (!o) 814 return false; 815 prev = o->previousSibling(); 816 } 817 o = prev; 818 } 819 ASSERT(o); 820 if (o->isText() || o->isReplaced()) { 821 point = FloatPoint(); 822 if (o->isText()) { 823 RenderText* text = toRenderText(o); 824 IntRect linesBox = text->linesBoundingBox(); 825 if (!linesBox.maxX() && !linesBox.maxY()) 826 continue; 827 point.moveBy(linesBox.maxXMaxYCorner()); 828 } else { 829 RenderBox* box = toRenderBox(o); 830 point.moveBy(box->frameRect().maxXMaxYCorner()); 831 } 832 point = o->container()->localToAbsolute(point, false, true); 833 return true; 834 } 835 } 836 return true; 837 } 838 839 LayoutRect ContainerNode::boundingBox() const 840 { 841 FloatPoint upperLeft, lowerRight; 842 bool foundUpperLeft = getUpperLeftCorner(upperLeft); 843 bool foundLowerRight = getLowerRightCorner(lowerRight); 844 845 // If we've found one corner, but not the other, 846 // then we should just return a point at the corner that we did find. 847 if (foundUpperLeft != foundLowerRight) { 848 if (foundUpperLeft) 849 lowerRight = upperLeft; 850 else 851 upperLeft = lowerRight; 852 } 853 854 return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft)); 855 } 856 729 857 void ContainerNode::setFocus(bool received) 730 858 { -
trunk/Source/WebCore/dom/ContainerNode.h
r128006 r128644 76 76 virtual void attach() OVERRIDE; 77 77 virtual void detach() OVERRIDE; 78 virtual LayoutRect boundingBox() const OVERRIDE; 78 79 virtual void setFocus(bool = true) OVERRIDE; 79 80 virtual void setActive(bool active = true, bool pause = false) OVERRIDE; … … 131 132 132 133 static void dispatchPostAttachCallbacks(); 134 135 bool getUpperLeftCorner(FloatPoint&) const; 136 bool getLowerRightCorner(FloatPoint&) const; 133 137 134 138 Node* m_firstChild;
Note: See TracChangeset
for help on using the changeset viewer.