Changeset 128677 in webkit
- Timestamp:
- Sep 14, 2012 6:24:30 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r128658 r128677 1 2012-09-14 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Revert r127457 and following fixes due to several hit-testing regressions 4 https://bugs.webkit.org/show_bug.cgi?id=96830 5 6 Reviewed by Antonio Gomes. 7 8 This change reverts r127457, r127863 and r128505. 9 10 * Source/autotools/symbols.filter: 11 1 12 2012-09-14 Adam Barth <abarth@webkit.org> 2 13 -
trunk/LayoutTests/ChangeLog
r128676 r128677 1 2012-09-14 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Revert r127457 and following fixes due to several hit-testing regressions 4 https://bugs.webkit.org/show_bug.cgi?id=96830 5 6 Reviewed by Antonio Gomes. 7 8 This change reverts r127457, r127863 and r128505. As the tests relies on the extended API 9 after r127457, we cannot keep them. 10 11 * fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt: Removed. 12 * fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: Removed. 13 * fast/dom/nodesFromRect/resources/child-frame.html: Removed. 14 * fast/dom/nodesFromRect/resources/nodesFromRect.js: 15 (check): 16 (checkShadowContent): 17 * touchadjustment/iframe-boundary-expected.txt: Removed. 18 * touchadjustment/iframe-boundary.html: Removed. 19 * touchadjustment/resources/inner-content-page.html: Removed. 20 * touchadjustment/resources/inner-navigation-frame.html: Removed. 21 1 22 2012-09-14 Bo Liu <boliu@chromium.org> 2 23 -
trunk/LayoutTests/fast/dom/nodesFromRect/resources/nodesFromRect.js
r127457 r128677 2 2 * Contributors: 3 3 * * Antonio Gomes <tonikitoo@webkit.org> 4 * * Allan Sandfeld Jensen <allan.jensen@nokia.com> 5 **/ 4 **/ 6 5 7 6 function check(x, y, topPadding, rightPadding, bottomPadding, leftPadding, list, doc) … … 13 12 doc = document; 14 13 15 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow shadow content */ , false /* allow child-frame content */);14 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, false /* allow shadow content */); 16 15 if (!nodes) 17 16 return; … … 47 46 doc = document; 48 47 49 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allowShadowContent */ , false /* allow child-frame content */);48 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allowShadowContent */); 50 49 if (!nodes) 51 50 return; … … 69 68 } 70 69 71 function checkRect(left, top, width, height, expectedNodeString, doc)72 {73 if (!window.internals)74 return;75 76 if (height <=0 || width <= 0)77 return;78 79 if (!doc)80 doc = document;81 82 var topPadding = height / 2;83 var leftPadding = width / 2;84 // FIXME: When nodesFromRect is changed to not add 1 to width and height, remove the correction here.85 var bottomPadding = (height - 1) - topPadding;86 var rightPadding = (width - 1) - leftPadding;87 88 var nodeString = nodesFromRectAsString(doc, left + leftPadding, top + topPadding, topPadding, rightPadding, bottomPadding, leftPadding);89 90 if (nodeString == expectedNodeString) {91 testPassed("All correct nodes found for rect");92 } else {93 testFailed("NodesFromRect should be [" + expectedNodeString + "] was [" + nodeString + "]");94 }95 }96 97 function nodesFromRectAsString(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding)98 {99 var nodeString = "";100 var nodes = internals.nodesFromRect(doc, x, y, topPadding, rightPadding, bottomPadding, leftPadding, true /* ignoreClipping */, true /* allow shadow content */, true /* allow child-frame content */);101 if (!nodes)102 return nodeString;103 104 for (var i = 0; i < nodes.length; i++) {105 if (nodes[i].nodeType == 1) {106 nodeString += nodes[i].nodeName;107 if (nodes[i].id)108 nodeString += '#' + nodes[i].id;109 else if (nodes[i].class) {110 nodeString += '.' + nodes[i].class;111 }112 } else if (nodes[i].nodeType == 3) {113 nodeString += "'" + nodes[i].data + "'";114 } else if (nodes[i].nodeType == 9) {115 nodeString += "#document";116 } else {117 continue;118 }119 if (i + 1 < nodes.length) {120 nodeString += ", ";121 }122 }123 return nodeString;124 }125 126 70 function getCenterFor(element) 127 71 { -
trunk/Source/WebCore/ChangeLog
r128674 r128677 1 2012-09-14 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Revert r127457 and following fixes due to several hit-testing regressions 4 https://bugs.webkit.org/show_bug.cgi?id=96830 5 6 Reviewed by Antonio Gomes. 7 8 This change reverts r127457, r127863 and r128505. 9 10 * WebCore.exp.in: 11 * WebCore.order: 12 * dom/Document.cpp: 13 (WebCore::Document::nodesFromRect): 14 * dom/Document.h: 15 (Document): 16 * page/EventHandler.cpp: 17 (WebCore::EventHandler::hitTestResultAtPoint): 18 * rendering/HitTestRequest.h: 19 * rendering/HitTestResult.cpp: 20 (WebCore::HitTestLocation::HitTestLocation): 21 * rendering/HitTestResult.h: 22 (HitTestLocation): 23 * rendering/RenderFrameBase.cpp: 24 * rendering/RenderFrameBase.h: 25 (RenderFrameBase): 26 * rendering/RenderLayer.cpp: 27 (WebCore::RenderLayer::hitTest): 28 * testing/Internals.cpp: 29 (WebCore::Internals::nodesFromRect): 30 * testing/Internals.h: 31 (Internals): 32 * testing/Internals.idl: 33 1 34 2012-09-14 Joshua Bell <jsbell@chromium.org> 2 35 -
trunk/Source/WebCore/WebCore.exp.in
r128653 r128677 1361 1361 __ZNK7WebCore8Document11completeURLERKN3WTF6StringE 1362 1362 __ZNK7WebCore8Document13axObjectCacheEv 1363 __ZNK7WebCore8Document13nodesFromRectEiijjjjbb b1363 __ZNK7WebCore8Document13nodesFromRectEiijjjjbb 1364 1364 __ZNK7WebCore8Document14getElementByIdERKN3WTF12AtomicStringE 1365 1365 __ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE -
trunk/Source/WebCore/WebCore.order
r128403 r128677 22786 22786 __ZNK7WebCore4Node20traversePreviousNodeEPKS0_ 22787 22787 __ZN7WebCore37jsNodeIteratorPrototypeFunctionDetachEPN3JSC9ExecStateE 22788 __ZNK7WebCore8Document13nodesFromRectEiijjjjb bb22788 __ZNK7WebCore8Document13nodesFromRectEiijjjjb 22789 22789 __ZNK7WebCore8Document17handleZeroPaddingERKNS_14HitTestRequestERNS_13HitTestResultE 22790 22790 __ZN3WTF21ListHashSetTranslatorINS_6RefPtrIN7WebCore4NodeEEELm256ENS_7PtrHashIS4_EEE9translateERPNS_15ListHashSetNodeIS4_Lm256EEERKS4_PNS_24ListHashSetNodeAllocatorIS4_Lm256EEE -
trunk/Source/WebCore/dom/Document.cpp
r128673 r128677 1393 1393 // * making it receive the expading size of each direction separately, 1394 1394 // i.e. nodesFromRect(x, y, topSize, rightSize, bottomSize, leftSize); 1395 PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent , bool allowChildFrameContent) const1395 PassRefPtr<NodeList> Document::nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent) const 1396 1396 { 1397 1397 // FIXME: Share code between this, elementFromPoint and caretRangeFromPoint. … … 1417 1417 if (allowShadowContent) 1418 1418 type |= HitTestRequest::AllowShadowContent; 1419 if (allowChildFrameContent)1420 type |= HitTestRequest::AllowChildFrameContent;1421 1419 1422 1420 HitTestRequest request(type); -
trunk/Source/WebCore/dom/Document.h
r128670 r128677 382 382 * If false, this method returns null for coordinates outside of the viewport. 383 383 */ 384 PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY, 385 unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, 386 bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent = false) const; 384 PassRefPtr<NodeList> nodesFromRect(int centerX, int centerY, unsigned topPadding, unsigned rightPadding, 385 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent) const; 387 386 Element* elementFromPoint(int x, int y) const; 388 387 PassRefPtr<Range> caretRangeFromPoint(int x, int y); -
trunk/Source/WebCore/page/EventHandler.cpp
r128615 r128677 1050 1050 if (allowShadowContent) 1051 1051 hitType |= HitTestRequest::AllowShadowContent; 1052 if (testScrollbars == ShouldHitTestScrollbars)1053 hitType |= HitTestRequest::TestChildFrameScrollBars;1054 // We always need to handle child frame content.1055 hitType |= HitTestRequest::AllowChildFrameContent;1056 1057 1052 m_frame->contentRenderer()->hitTest(HitTestRequest(hitType), result); 1058 1053 1054 while (true) { 1055 Node* n = result.innerNode(); 1056 if (!result.isOverWidget() || !n || !n->renderer() || !n->renderer()->isWidget()) 1057 break; 1058 RenderWidget* renderWidget = toRenderWidget(n->renderer()); 1059 Widget* widget = renderWidget->widget(); 1060 if (!widget || !widget->isFrameView()) 1061 break; 1062 Frame* frame = static_cast<HTMLFrameElementBase*>(n)->contentFrame(); 1063 if (!frame || !frame->contentRenderer()) 1064 break; 1065 FrameView* view = static_cast<FrameView*>(widget); 1066 LayoutPoint widgetPoint(result.localPoint().x() + view->scrollX() - renderWidget->borderLeft() - renderWidget->paddingLeft(), 1067 result.localPoint().y() + view->scrollY() - renderWidget->borderTop() - renderWidget->paddingTop()); 1068 HitTestResult widgetHitTestResult(widgetPoint, padding.height(), padding.width(), padding.height(), padding.width()); 1069 frame->contentRenderer()->hitTest(HitTestRequest(hitType), widgetHitTestResult); 1070 result = widgetHitTestResult; 1071 1072 if (testScrollbars == ShouldHitTestScrollbars) { 1073 Scrollbar* eventScrollbar = view->scrollbarAtPoint(roundedIntPoint(point)); 1074 if (eventScrollbar) 1075 result.setScrollbar(eventScrollbar); 1076 } 1077 } 1078 1059 1079 // If our HitTestResult is not visible, then we started hit testing too far down the frame chain. 1060 1080 // Another hit test at the main frame level should get us the correct visible result. -
trunk/Source/WebCore/rendering/HitTestRequest.h
r128403 r128677 36 36 SVGClipContent = 1 << 6, 37 37 TouchEvent = 1 << 7, 38 AllowShadowContent = 1 << 8, 39 AllowChildFrameContent = 1 << 9, 40 ChildFrameHitTest = 1 << 10, 41 TestChildFrameScrollBars = 1 << 11 38 AllowShadowContent = 1 << 8 42 39 }; 43 40 … … 58 55 bool mouseEvent() const { return !touchEvent(); } 59 56 bool allowsShadowContent() const { return m_requestType & AllowShadowContent; } 60 bool allowsChildFrameContent() const { return m_requestType & AllowChildFrameContent; }61 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }62 bool shouldTestChildFrameScrollBars() const { return m_requestType & TestChildFrameScrollBars; }63 57 64 58 // Convenience functions -
trunk/Source/WebCore/rendering/HitTestResult.cpp
r127457 r128677 105 105 , m_transformedPoint(other.m_transformedPoint) 106 106 , m_transformedRect(other.m_transformedRect) 107 , m_region(region ? region : other.m_region)107 , m_region(region) 108 108 , m_isRectBased(other.m_isRectBased) 109 109 , m_isRectilinear(other.m_isRectilinear) -
trunk/Source/WebCore/rendering/HitTestResult.h
r127457 r128677 56 56 HitTestLocation(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding); 57 57 // Make a copy the HitTestLocation in a new region by applying given offset to internal point and area. 58 HitTestLocation(const HitTestLocation&, const LayoutSize& offset, RenderRegion* = 0);58 HitTestLocation(const HitTestLocation&, const LayoutSize& offset, RenderRegion*); 59 59 HitTestLocation(const HitTestLocation&); 60 60 ~HitTestLocation(); -
trunk/Source/WebCore/rendering/RenderFrameBase.cpp
r128468 r128677 30 30 #include "FrameView.h" 31 31 #include "HTMLFrameElementBase.h" 32 #include "HitTestResult.h"33 #include "RenderLayer.h"34 32 #include "RenderView.h" 35 33 … … 107 105 } 108 106 109 bool RenderFrameBase::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action)110 {111 if (request.allowsChildFrameContent()) {112 FrameView* childFrameView = static_cast<FrameView*>(widget());113 RenderView* childRoot = childFrameView ? static_cast<RenderView*>(childFrameView->frame()->contentRenderer()) : 0;114 115 if (childRoot) {116 LayoutPoint adjustedLocation = accumulatedOffset + location();117 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), borderTop() + paddingTop()) - childFrameView->scrollOffset();118 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocation - contentOffset);119 HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildFrameHitTest);120 121 bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTestLocation, result);122 if (isInsideChildFrame)123 return true;124 125 if (request.shouldTestChildFrameScrollBars()) {126 // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls,127 // so we need to test ScrollView scrollbars separately here.128 // FIXME: Consider if this test could be done unconditionally.129 Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitTestLocation.roundedPoint());130 if (frameScrollbar)131 result.setScrollbar(frameScrollbar);132 }133 }134 }135 136 return RenderPart::nodeAtPoint(request, result, locationInContainer, accumulatedOffset, action);137 107 } 138 139 } -
trunk/Source/WebCore/rendering/RenderFrameBase.h
r127457 r128677 37 37 38 38 public: 39 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;40 39 void layoutWithFlattening(bool fixedWidth, bool fixedHeight); 41 40 }; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r128468 r128677 3462 3462 // return ourselves. We do this so mouse events continue getting delivered after a drag has 3463 3463 // exited the WebView, and so hit testing over a scrollbar hits the content document. 3464 if ( !request.isChildFrameHitTest() &&(request.active() || request.release()) && isRootLayer()) {3464 if ((request.active() || request.release()) && isRootLayer()) { 3465 3465 renderer()->updateHitTestResult(result, toRenderView(renderer())->flipForWritingMode(result.point())); 3466 3466 insideLayer = this; -
trunk/Source/WebCore/testing/Internals.cpp
r128403 r128677 967 967 968 968 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y, unsigned topPadding, unsigned rightPadding, 969 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent,ExceptionCode& ec) const969 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, ExceptionCode& ec) const 970 970 { 971 971 if (!document || !document->frame() || !document->frame()->view()) { … … 974 974 } 975 975 976 return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, ignoreClipping, allowShadowContent , allowChildFrameContent);976 return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding, leftPadding, ignoreClipping, allowShadowContent); 977 977 } 978 978 -
trunk/Source/WebCore/testing/Internals.h
r127757 r128677 161 161 162 162 PassRefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding, 163 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent,ExceptionCode&) const;163 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, ExceptionCode&) const; 164 164 165 165 void emitInspectorDidBeginFrame(); -
trunk/Source/WebCore/testing/Internals.idl
r127577 r128677 139 139 NodeList nodesFromRect(in Document document, in long x, in long y, 140 140 in unsigned long topPadding, in unsigned long rightPadding, in unsigned long bottomPadding, in unsigned long leftPadding, 141 in boolean ignoreClipping, in boolean allowShadowContent , in boolean allowChildFrameContent) raises (DOMException);141 in boolean ignoreClipping, in boolean allowShadowContent) raises (DOMException); 142 142 143 143 void emitInspectorDidBeginFrame(); -
trunk/Source/WebKit/chromium/ChangeLog
r128663 r128677 1 2012-09-14 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Revert r127457 and following fixes due to several hit-testing regressions 4 https://bugs.webkit.org/show_bug.cgi?id=96830 5 6 Reviewed by Antonio Gomes. 7 8 This change reverts r127457, r127863 and r128505. 9 10 * src/ContextMenuClientImpl.cpp: 11 (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): 12 1 13 2012-09-14 Ojan Vafai <ojan@chromium.org> 2 14 -
trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
r128505 r128677 161 161 162 162 WebContextMenuData data; 163 data.mousePosition = r.roundedPoint();163 data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint()); 164 164 165 165 // Compute edit flags. -
trunk/Source/WebKit2/ChangeLog
r128658 r128677 1 2012-09-14 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Revert r127457 and following fixes due to several hit-testing regressions 4 https://bugs.webkit.org/show_bug.cgi?id=96830 5 6 Reviewed by Antonio Gomes. 7 8 This change reverts r127457, r127863 and r128505. 9 10 * win/WebKit2.def: 11 * win/WebKit2CFLite.def: 12 1 13 2012-09-14 Adam Barth <abarth@webkit.org> 2 14 -
trunk/Source/WebKit2/win/WebKit2.def
r128653 r128677 267 267 ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ 268 268 ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z 269 ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0 0@Z269 ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0@Z 270 270 ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z 271 271 ?webkitWillEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r128583 r128677 258 258 ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ 259 259 ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z 260 ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0 0@Z260 ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N0@Z 261 261 ?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z 262 262 ?restrictScaleFactorToInitialScaleIfNotUserScalable@WebCore@@YAXAAUViewportAttributes@1@@Z -
trunk/Source/autotools/symbols.filter
r128653 r128677 167 167 _ZN7WebCore22RuntimeEnabledFeatures22isDialogElementEnabledE; 168 168 _ZN7WebCore22RuntimeEnabledFeatures37isAuthorShadowDOMForAnyElementEnabledE; 169 _ZNK7WebCore8Document13nodesFromRectEiijjjjbb b;169 _ZNK7WebCore8Document13nodesFromRectEiijjjjbb; 170 170 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE; 171 171 _ZNK7WebCore6Editor26selectionStartHasMarkerForENS_14DocumentMarker10MarkerTypeEii;
Note: See TracChangeset
for help on using the changeset viewer.