Changeset 88251 in webkit
- Timestamp:
- Jun 7, 2011 11:58:22 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88250 r88251 1 2011-06-07 Emil A Eklund <eae@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Convert RenderTextControl::hitInnerTextElement to IntPoint 6 https://bugs.webkit.org/show_bug.cgi?id=62167 7 8 Covered by existing tests. 9 10 * rendering/RenderTextControl.cpp: 11 (WebCore::RenderTextControl::hitInnerTextElement): 12 * rendering/RenderTextControl.h: 13 * rendering/RenderTextControlMultiLine.cpp: 14 (WebCore::RenderTextControlMultiLine::nodeAtPoint): 15 * rendering/RenderTextControlSingleLine.cpp: 16 (WebCore::RenderTextControlSingleLine::nodeAtPoint): 17 1 18 2011-06-07 Levi Weintraub <leviw@chromium.org> 2 19 -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r88087 r88251 450 450 } 451 451 452 void RenderTextControl::hitInnerTextElement(HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty) 453 { 452 void RenderTextControl::hitInnerTextElement(HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset) 453 { 454 IntPoint adjustedLocation = accumulatedOffset + location(); 454 455 HTMLElement* innerText = innerTextElement(); 455 456 result.setInnerNode(innerText); 456 457 result.setInnerNonSharedNode(innerText); 457 result.setLocalPoint(pointInContainer - 458 IntSize(tx + x() + innerText->renderBox()->x(), ty + y() + innerText->renderBox()->y())); 458 result.setLocalPoint(pointInContainer - toSize(adjustedLocation + innerText->renderBox()->location())); 459 459 } 460 460 -
trunk/Source/WebCore/rendering/RenderTextControl.h
r88178 r88251 64 64 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 65 65 66 void hitInnerTextElement(HitTestResult&, const IntPoint& pointInContainer, int tx, int ty);66 void hitInnerTextElement(HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset); 67 67 void forwardEvent(Event*); 68 68 -
trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp
r87067 r88251 71 71 72 72 if (result.innerNode() == node() || result.innerNode() == innerTextElement()) 73 hitInnerTextElement(result, pointInContainer, tx, ty);73 hitInnerTextElement(result, pointInContainer, IntPoint(tx, ty)); 74 74 75 75 return true; -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r88250 r88251 343 343 // inner text element so that it gains focus. 344 344 if (result.innerNode()->isDescendantOf(innerTextElement()) || result.innerNode() == node()) 345 hitInnerTextElement(result, pointInContainer, tx, ty);345 hitInnerTextElement(result, pointInContainer, IntPoint(tx, ty)); 346 346 347 347 // If we found a spin button, we're done.
Note: See TracChangeset
for help on using the changeset viewer.