Changeset 167803 in webkit
- Timestamp:
- Apr 25, 2014 6:56:12 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167800 r167803 1 2014-04-25 Radu Stavila <stavila@adobe.com> 2 3 [CSS Regions] Overflow selection doesn't work properly 4 https://bugs.webkit.org/show_bug.cgi?id=130715 5 6 Reviewed by David Hyatt. 7 8 Added tests for hit-testing and painting selection gaps in the region's overflow area. 9 10 * fast/regions/selection-in-overflow-expected.html: Added. 11 * fast/regions/selection-in-overflow-hit-testing-expected.html: Added. 12 * fast/regions/selection-in-overflow-hit-testing.html: Added. 13 * fast/regions/selection-in-overflow.html: Added. 14 * fast/regions/selection-in-text-after-overflow-hit-testing-expected.html: Added. 15 * fast/regions/selection-in-text-after-overflow-hit-testing.html: Added. 16 1 17 2014-04-25 Enrique Ocaña González <eocanha@igalia.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r167802 r167803 1 2014-04-25 Radu Stavila <stavila@adobe.com> 2 3 [CSS Regions] Overflow selection doesn't work properly 4 https://bugs.webkit.org/show_bug.cgi?id=130715 5 6 Reviewed by David Hyatt. 7 8 When hit-testing, painting block selection gaps and searching for the node at a specific point inside a flow thread, 9 the region range of the box being checked must be validated in order to not return false positives. Otherwise, hit-testing 10 at the top of region B could hit elements that overflow the bottom of region A. 11 12 Tests: fast/regions/selection-in-overflow-hit-testing.html 13 fast/regions/selection-in-overflow.html 14 fast/regions/selection-in-text-after-overflow-hit-testing.html 15 16 * accessibility/AccessibilityRenderObject.cpp: 17 (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine): 18 (WebCore::AccessibilityRenderObject::visiblePositionForPoint): 19 * dom/Document.cpp: 20 (WebCore::Document::caretRangeFromPoint): 21 * editing/FrameSelection.cpp: 22 (WebCore::FrameSelection::contains): 23 * editing/VisibleUnits.cpp: 24 (WebCore::previousLinePosition): 25 (WebCore::nextLinePosition): 26 * page/EventHandler.cpp: 27 (WebCore::EventHandler::selectClosestWordFromHitTestResult): 28 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): 29 (WebCore::EventHandler::handleMousePressEventTripleClick): 30 (WebCore::EventHandler::handleMousePressEventSingleClick): 31 (WebCore::selectionExtentRespectingEditingBoundary): 32 (WebCore::EventHandler::updateSelectionForMouseDrag): 33 (WebCore::EventHandler::handleMouseReleaseEvent): 34 * page/Frame.cpp: 35 (WebCore::Frame::visiblePositionForPoint): 36 * rendering/RenderBlock.cpp: 37 (WebCore::RenderBlock::selectionGaps): 38 (WebCore::RenderBlock::nodeAtPoint): 39 (WebCore::positionForPointRespectingEditingBoundaries): 40 (WebCore::RenderBlock::positionForPointWithInlineChildren): 41 (WebCore::isChildHitTestCandidate): 42 (WebCore::RenderBlock::positionForPoint): 43 * rendering/RenderBlock.h: 44 * rendering/RenderBlockFlow.cpp: 45 (WebCore::RenderBlockFlow::positionForPointWithInlineChildren): 46 (WebCore::RenderBlockFlow::positionForPoint): 47 * rendering/RenderBlockFlow.h: 48 * rendering/RenderBox.cpp: 49 (WebCore::RenderBox::positionForPoint): 50 * rendering/RenderBox.h: 51 * rendering/RenderFileUploadControl.cpp: 52 (WebCore::RenderFileUploadControl::positionForPoint): 53 * rendering/RenderFileUploadControl.h: 54 * rendering/RenderInline.cpp: 55 (WebCore::RenderInline::positionForPoint): 56 * rendering/RenderInline.h: 57 * rendering/RenderLineBreak.cpp: 58 (WebCore::RenderLineBreak::positionForPoint): 59 * rendering/RenderLineBreak.h: 60 * rendering/RenderMultiColumnSet.cpp: 61 (WebCore::RenderMultiColumnSet::positionForPoint): 62 * rendering/RenderMultiColumnSet.h: 63 * rendering/RenderObject.cpp: 64 (WebCore::RenderObject::positionForPoint): 65 * rendering/RenderObject.h: 66 * rendering/RenderRegion.cpp: 67 (WebCore::RenderRegion::positionForPoint): 68 * rendering/RenderRegion.h: 69 * rendering/RenderReplaced.cpp: 70 (WebCore::RenderReplaced::positionForPoint): 71 * rendering/RenderReplaced.h: 72 * rendering/RenderText.cpp: 73 (WebCore::RenderText::positionForPoint): 74 * rendering/RenderText.h: 75 * rendering/svg/RenderSVGInlineText.cpp: 76 (WebCore::RenderSVGInlineText::positionForPoint): 77 * rendering/svg/RenderSVGInlineText.h: 78 * rendering/svg/RenderSVGText.cpp: 79 (WebCore::RenderSVGText::positionForPoint): 80 * rendering/svg/RenderSVGText.h: 81 1 82 2014-04-25 Philippe Normand <pnormand@igalia.com> 2 83 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r166649 r167803 1825 1825 // FIXME: this is wrong when lineNumber is lineCount+1, because nextLinePosition takes you to the 1826 1826 // last offset of the last line 1827 VisiblePosition visiblePos = m_renderer->view().positionForPoint(IntPoint() );1827 VisiblePosition visiblePos = m_renderer->view().positionForPoint(IntPoint(), nullptr); 1828 1828 VisiblePosition savedVisiblePos; 1829 1829 while (--lineCount) { … … 2033 2033 } 2034 2034 2035 return innerNode->renderer()->positionForPoint(pointResult );2035 return innerNode->renderer()->positionForPoint(pointResult, nullptr); 2036 2036 } 2037 2037 -
trunk/Source/WebCore/dom/Document.cpp
r167780 r167803 1422 1422 if (!renderer) 1423 1423 return nullptr; 1424 VisiblePosition visiblePosition = renderer->positionForPoint(localPoint );1424 VisiblePosition visiblePosition = renderer->positionForPoint(localPoint, nullptr); 1425 1425 if (visiblePosition.isNull()) 1426 1426 return nullptr; -
trunk/Source/WebCore/editing/FrameSelection.cpp
r167755 r167803 1586 1586 return false; 1587 1587 1588 VisiblePosition visiblePos(innerNode->renderer()->positionForPoint(result.localPoint() ));1588 VisiblePosition visiblePos(innerNode->renderer()->positionForPoint(result.localPoint(), nullptr)); 1589 1589 if (visiblePos.isNull()) 1590 1590 return false; -
trunk/Source/WebCore/editing/VisibleUnits.cpp
r167642 r167803 974 974 if (node && editingIgnoresContent(node)) 975 975 return positionInParentBeforeNode(node); 976 return renderer.positionForPoint(pointInLine );976 return renderer.positionForPoint(pointInLine, nullptr); 977 977 } 978 978 … … 1032 1032 if (node && editingIgnoresContent(node)) 1033 1033 return positionInParentBeforeNode(node); 1034 return renderer.positionForPoint(pointInLine );1034 return renderer.positionForPoint(pointInLine, nullptr); 1035 1035 } 1036 1036 -
trunk/Source/WebCore/page/EventHandler.cpp
r167788 r167803 526 526 527 527 if (targetNode && targetNode->renderer()) { 528 VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint() ));528 VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint(), nullptr)); 529 529 if (pos.isNotNull()) { 530 530 newSelection = VisibleSelection(pos); … … 557 557 VisibleSelection newSelection; 558 558 Element* URLElement = result.hitTestResult().URLElement(); 559 VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint() ));559 VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint(), nullptr)); 560 560 if (pos.isNotNull() && pos.deepEquivalent().deprecatedNode()->isDescendantOf(URLElement)) 561 561 newSelection = VisibleSelection::selectionFromContentsOfNode(URLElement); … … 593 593 594 594 VisibleSelection newSelection; 595 VisiblePosition pos(targetNode->renderer()->positionForPoint(event.localPoint() ));595 VisiblePosition pos(targetNode->renderer()->positionForPoint(event.localPoint(), nullptr)); 596 596 if (pos.isNotNull()) { 597 597 newSelection = VisibleSelection(pos); … … 628 628 } 629 629 630 VisiblePosition visiblePos(targetNode->renderer()->positionForPoint(event.localPoint() ));630 VisiblePosition visiblePos(targetNode->renderer()->positionForPoint(event.localPoint(), nullptr)); 631 631 if (visiblePos.isNull()) 632 632 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(targetNode), DOWNSTREAM); … … 861 861 } 862 862 863 return targetNode->renderer()->positionForPoint(selectionEndPoint );863 return targetNode->renderer()->positionForPoint(selectionEndPoint, nullptr); 864 864 } 865 865 … … 907 907 } else { 908 908 // Reset base for user select all when base is inside user-select-all area and extent < base. 909 if (rootUserSelectAllForMousePressNode && comparePositions(target->renderer()->positionForPoint(hitTestResult.localPoint() ), m_mousePressNode->renderer()->positionForPoint(m_dragStartPos)) < 0)909 if (rootUserSelectAllForMousePressNode && comparePositions(target->renderer()->positionForPoint(hitTestResult.localPoint(), nullptr), m_mousePressNode->renderer()->positionForPoint(m_dragStartPos, nullptr)) < 0) 910 910 newSelection.setBase(positionAfterNode(rootUserSelectAllForMousePressNode).downstream(CanCrossEditingBoundary)); 911 911 912 912 Node* rootUserSelectAllForTarget = Position::rootUserSelectAllForNode(target); 913 if (rootUserSelectAllForTarget && m_mousePressNode->renderer() && comparePositions(target->renderer()->positionForPoint(hitTestResult.localPoint() ), m_mousePressNode->renderer()->positionForPoint(m_dragStartPos)) < 0)913 if (rootUserSelectAllForTarget && m_mousePressNode->renderer() && comparePositions(target->renderer()->positionForPoint(hitTestResult.localPoint(), nullptr), m_mousePressNode->renderer()->positionForPoint(m_dragStartPos, nullptr)) < 0) 914 914 newSelection.setExtent(positionBeforeNode(rootUserSelectAllForTarget).upstream(CanCrossEditingBoundary)); 915 915 else if (rootUserSelectAllForTarget && m_mousePressNode->renderer()) … … 983 983 bool caretBrowsing = m_frame.settings().caretBrowsingEnabled(); 984 984 if (node && node->renderer() && (caretBrowsing || node->hasEditableStyle())) { 985 VisiblePosition pos = node->renderer()->positionForPoint(event.localPoint() );985 VisiblePosition pos = node->renderer()->positionForPoint(event.localPoint(), nullptr); 986 986 newSelection = VisibleSelection(pos); 987 987 } -
trunk/Source/WebCore/page/Frame.cpp
r167594 r167803 854 854 if (!renderer) 855 855 return VisiblePosition(); 856 VisiblePosition visiblePos = renderer->positionForPoint(result.localPoint() );856 VisiblePosition visiblePos = renderer->positionForPoint(result.localPoint(), nullptr); 857 857 if (visiblePos.isNull()) 858 858 visiblePos = firstPositionInOrBeforeNode(node); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r167755 r167803 2413 2413 return result; 2414 2414 } 2415 2416 if (paintInfo && paintInfo->renderNamedFlowFragment && paintInfo->paintContainer->isRenderFlowThread()) { 2417 // Make sure the current object is actually flowed into the region being painted. 2418 if (!toRenderFlowThread(paintInfo->paintContainer)->objectShouldPaintInFlowRegion(this, paintInfo->renderNamedFlowFragment)) 2419 return result; 2420 } 2415 2421 2416 2422 if (childrenInline()) … … 2947 2953 LayoutPoint adjustedLocation(accumulatedOffset + location()); 2948 2954 LayoutSize localOffset = toLayoutSize(adjustedLocation); 2955 2956 // If we are now searching inside a region, make sure this element 2957 // is being fragmented into this region. 2958 if (locationInContainer.region()) { 2959 RenderFlowThread* flowThread = flowThreadContainingBlock(); 2960 ASSERT(flowThread); 2961 if (!flowThread->objectShouldPaintInFlowRegion(this, locationInContainer.region())) 2962 return false; 2963 } 2949 2964 2950 2965 if (!isRenderView()) { … … 3141 3156 Element* childElement= child.nonPseudoElement(); 3142 3157 if (!childElement) 3143 return child.positionForPoint(pointInChildCoordinates );3158 return child.positionForPoint(pointInChildCoordinates, nullptr); 3144 3159 3145 3160 // Otherwise, first make sure that the editability of the parent and child agree. … … 3151 3166 // If we can't find an ancestor to check editability on, or editability is unchanged, we recur like normal 3152 3167 if (isEditingBoundary(ancestor, child)) 3153 return child.positionForPoint(pointInChildCoordinates );3168 return child.positionForPoint(pointInChildCoordinates, nullptr); 3154 3169 3155 3170 #if PLATFORM(IOS) … … 3170 3185 } 3171 3186 3172 VisiblePosition RenderBlock::positionForPointWithInlineChildren(const LayoutPoint& )3187 VisiblePosition RenderBlock::positionForPointWithInlineChildren(const LayoutPoint&, const RenderRegion*) 3173 3188 { 3174 3189 ASSERT_NOT_REACHED(); … … 3182 3197 3183 3198 // Valid candidates in a FlowThread must be rendered by the region. 3184 static inline bool isChildHitTestCandidate(const RenderBox& box, RenderRegion* region, const LayoutPoint& point)3199 static inline bool isChildHitTestCandidate(const RenderBox& box, const RenderRegion* region, const LayoutPoint& point) 3185 3200 { 3186 3201 if (!isChildHitTestCandidate(box)) … … 3192 3207 } 3193 3208 3194 VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point )3209 VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point, const RenderRegion* region) 3195 3210 { 3196 3211 if (isTable()) 3197 return RenderBox::positionForPoint(point );3212 return RenderBox::positionForPoint(point, region); 3198 3213 3199 3214 if (isReplaced()) { … … 3215 3230 3216 3231 if (childrenInline()) 3217 return positionForPointWithInlineChildren(pointInLogicalContents); 3218 3219 RenderRegion* region = regionAtBlockOffset(pointInLogicalContents.y()); 3232 return positionForPointWithInlineChildren(pointInLogicalContents, region); 3233 3220 3234 RenderBox* lastCandidateBox = lastChildBox(); 3235 3236 if (!region) 3237 region = regionAtBlockOffset(pointInLogicalContents.y()); 3238 3221 3239 while (lastCandidateBox && !isChildHitTestCandidate(*lastCandidateBox, region, pointInLogicalContents)) 3222 3240 lastCandidateBox = lastCandidateBox->previousSiblingBox(); … … 3240 3258 3241 3259 // We only get here if there are no hit test candidate children below the click. 3242 return RenderBox::positionForPoint(point );3260 return RenderBox::positionForPoint(point, region); 3243 3261 } 3244 3262 -
trunk/Source/WebCore/rendering/RenderBlock.h
r167093 r167803 184 184 LayoutUnit textIndentOffset() const; 185 185 186 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;186 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 187 187 188 188 // Block flows subclass availableWidth to handle multi column layout (shrinking the width available to children when laying out.) … … 544 544 545 545 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBlockFlow 546 virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint& );546 virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint&, const RenderRegion*); 547 547 548 548 virtual void computeColumnCountAndWidth(); -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r167617 r167803 3093 3093 } 3094 3094 3095 VisiblePosition RenderBlockFlow::positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents )3095 VisiblePosition RenderBlockFlow::positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderRegion* region) 3096 3096 { 3097 3097 ASSERT(childrenInline()); … … 3110 3110 RootInlineBox* lastRootBoxWithChildren = 0; 3111 3111 for (RootInlineBox* root = firstRootBox(); root; root = root->nextRootBox()) { 3112 if (region && root->containingRegion() != region) 3113 continue; 3114 3112 3115 if (!root->firstLeafChild()) 3113 3116 continue; … … 3166 3169 if (closestBox->renderer().isReplaced()) 3167 3170 return positionForPointRespectingEditingBoundaries(*this, toRenderBox(closestBox->renderer()), point); 3168 return closestBox->renderer().positionForPoint(point );3171 return closestBox->renderer().positionForPoint(point, nullptr); 3169 3172 } 3170 3173 … … 3183 3186 } 3184 3187 3185 VisiblePosition RenderBlockFlow::positionForPoint(const LayoutPoint& point )3188 VisiblePosition RenderBlockFlow::positionForPoint(const LayoutPoint& point, const RenderRegion* region) 3186 3189 { 3187 3190 if (auto fragment = renderNamedFlowFragment()) 3188 return fragment->positionForPoint(point );3189 return RenderBlock::positionForPoint(point );3191 return fragment->positionForPoint(point, region); 3192 return RenderBlock::positionForPoint(point, region); 3190 3193 } 3191 3194 -
trunk/Source/WebCore/rendering/RenderBlockFlow.h
r167617 r167803 286 286 virtual void deleteLines() override; 287 287 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false) override; 288 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;288 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 289 289 290 290 void removeFloatingObjects(); … … 511 511 512 512 Position positionForBox(InlineBox*, bool start = true) const; 513 virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents ) override;513 virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderRegion*) override; 514 514 virtual void addFocusRingRectsForInlineChildren(Vector<IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) override; 515 515 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r167771 r167803 4130 4130 } 4131 4131 4132 VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point )4132 VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const RenderRegion* region) 4133 4133 { 4134 4134 // no children...return this render object's element, if there is one, and offset 0 … … 4157 4157 if (!renderObject->isBox()) 4158 4158 continue; 4159 4160 if (isRenderFlowThread()) { 4161 ASSERT(region); 4162 if (!toRenderFlowThread(this)->objectShouldPaintInFlowRegion(renderObject, region)) 4163 continue; 4164 } 4165 4159 4166 RenderBox* renderer = toRenderBox(renderObject); 4160 4167 … … 4170 4177 if (point.x() <= right && point.x() >= left && point.y() <= top && point.y() >= bottom) { 4171 4178 if (renderer->isTableRow()) 4172 return renderer->positionForPoint(point + adjustedPoint - renderer->locationOffset() );4173 return renderer->positionForPoint(point - renderer->locationOffset() );4179 return renderer->positionForPoint(point + adjustedPoint - renderer->locationOffset(), region); 4180 return renderer->positionForPoint(point - renderer->locationOffset(), region); 4174 4181 } 4175 4182 … … 4208 4215 4209 4216 if (closestRenderer) 4210 return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset() );4217 return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset(), region); 4211 4218 4212 4219 return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoElement())); -
trunk/Source/WebCore/rendering/RenderBox.h
r167727 r167803 513 513 LayoutRect maskClipRect(); 514 514 515 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;515 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 516 516 517 517 RenderBlockFlow* outermostBlockContainingFloatingObject(); -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r167755 r167803 247 247 } 248 248 249 VisiblePosition RenderFileUploadControl::positionForPoint(const LayoutPoint& )249 VisiblePosition RenderFileUploadControl::positionForPoint(const LayoutPoint&, const RenderRegion*) 250 250 { 251 251 return VisiblePosition(); -
trunk/Source/WebCore/rendering/RenderFileUploadControl.h
r163560 r167803 58 58 int maxFilenameWidth() const; 59 59 60 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;60 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 61 61 62 62 HTMLInputElement* uploadButton() const; -
trunk/Source/WebCore/rendering/RenderInline.cpp
r167524 r167803 846 846 } 847 847 848 VisiblePosition RenderInline::positionForPoint(const LayoutPoint& point )848 VisiblePosition RenderInline::positionForPoint(const LayoutPoint& point, const RenderRegion* region) 849 849 { 850 850 // FIXME: Does not deal with relative or sticky positioned inlines (should it?) … … 853 853 // This inline actually has a line box. We must have clicked in the border/padding of one of these boxes. We 854 854 // should try to find a result by asking our containing block. 855 return cb->positionForPoint(point );855 return cb->positionForPoint(point, region); 856 856 } 857 857 … … 862 862 RenderBox* contBlock = c->isInline() ? c->containingBlock() : toRenderBlock(c); 863 863 if (c->isInline() || c->firstChild()) 864 return c->positionForPoint(parentBlockPoint - contBlock->locationOffset() );864 return c->positionForPoint(parentBlockPoint - contBlock->locationOffset(), region); 865 865 c = toRenderBlock(c)->inlineElementContinuation(); 866 866 } 867 867 868 return RenderBoxModelObject::positionForPoint(point );868 return RenderBoxModelObject::positionForPoint(point, region); 869 869 } 870 870 -
trunk/Source/WebCore/rendering/RenderInline.h
r165836 r167803 145 145 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override; 146 146 147 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override final;147 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override final; 148 148 149 149 virtual LayoutRect frameRectForStickyPositioning() const override final { return linesBoundingBox(); } -
trunk/Source/WebCore/rendering/RenderLineBreak.cpp
r158842 r167803 123 123 } 124 124 125 VisiblePosition RenderLineBreak::positionForPoint(const LayoutPoint& )125 VisiblePosition RenderLineBreak::positionForPoint(const LayoutPoint&, const RenderRegion*) 126 126 { 127 127 return createVisiblePosition(0, DOWNSTREAM); -
trunk/Source/WebCore/rendering/RenderLineBreak.h
r162198 r167803 59 59 virtual void paint(PaintInfo&, const LayoutPoint&) override final { } 60 60 61 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;61 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 62 62 virtual int caretMinOffset() const override; 63 63 virtual int caretMaxOffset() const override; -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp
r167764 r167803 868 868 } 869 869 870 VisiblePosition RenderMultiColumnSet::positionForPoint(const LayoutPoint& physicalPoint )870 VisiblePosition RenderMultiColumnSet::positionForPoint(const LayoutPoint& physicalPoint, const RenderRegion*) 871 871 { 872 872 // Determine which columns we intersect. … … 915 915 flipForWritingMode(portion); 916 916 point.move(isHorizontalWritingMode() ? LayoutUnit() : portion.x(), isHorizontalWritingMode() ? portion.y() : LayoutUnit()); 917 return multiColumnFlowThread()->positionForPoint(point );917 return multiColumnFlowThread()->positionForPoint(point, this); 918 918 } 919 919 … … 952 952 point.move(isHorizontalWritingMode() ? LayoutUnit() : portion.x(), isHorizontalWritingMode() ? portion.y() : LayoutUnit()); 953 953 954 return multiColumnFlowThread()->positionForPoint(point );954 return multiColumnFlowThread()->positionForPoint(point, this); 955 955 } 956 956 -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.h
r167597 r167803 143 143 virtual void adjustRegionBoundsFromFlowThreadPortionRect(const LayoutPoint& layerOffset, LayoutRect& regionBounds) override; 144 144 145 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;145 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 146 146 147 147 virtual const char* renderName() const; -
trunk/Source/WebCore/rendering/RenderObject.cpp
r167755 r167803 2002 2002 } 2003 2003 2004 VisiblePosition RenderObject::positionForPoint(const LayoutPoint& )2004 VisiblePosition RenderObject::positionForPoint(const LayoutPoint&, const RenderRegion*) 2005 2005 { 2006 2006 return createVisiblePosition(caretMinOffset(), DOWNSTREAM); -
trunk/Source/WebCore/rendering/RenderObject.h
r167755 r167803 60 60 class RenderLayerModelObject; 61 61 class RenderNamedFlowThread; 62 class RenderRegion; 62 63 class RenderTheme; 63 64 class SelectionSubtreeRoot; … … 649 650 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); 650 651 651 virtual VisiblePosition positionForPoint(const LayoutPoint& );652 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*); 652 653 VisiblePosition createVisiblePosition(int offset, EAffinity) const; 653 654 VisiblePosition createVisiblePosition(const Position&) const; -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r167541 r167803 105 105 } 106 106 107 VisiblePosition RenderRegion::positionForPoint(const LayoutPoint& point )107 VisiblePosition RenderRegion::positionForPoint(const LayoutPoint& point, const RenderRegion* region) 108 108 { 109 109 if (!isValid() || !m_flowThread->firstChild()) // checking for empty region blocks. 110 return RenderBlock::positionForPoint(point );111 112 return m_flowThread->positionForPoint(mapRegionPointIntoFlowThreadCoordinates(point) );110 return RenderBlock::positionForPoint(point, region); 111 112 return m_flowThread->positionForPoint(mapRegionPointIntoFlowThreadCoordinates(point), this); 113 113 } 114 114 -
trunk/Source/WebCore/rendering/RenderRegion.h
r167335 r167803 125 125 virtual bool canHaveChildren() const override { return false; } 126 126 virtual bool canHaveGeneratedChildren() const override { return true; } 127 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;127 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 128 128 129 129 virtual bool hasAutoLogicalHeight() const { return false; } -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r165699 r167803 518 518 } 519 519 520 VisiblePosition RenderReplaced::positionForPoint(const LayoutPoint& point )520 VisiblePosition RenderReplaced::positionForPoint(const LayoutPoint& point, const RenderRegion* region) 521 521 { 522 522 // FIXME: This code is buggy if the replaced element is relative positioned. … … 542 542 } 543 543 544 return RenderBox::positionForPoint(point );544 return RenderBox::positionForPoint(point, region); 545 545 } 546 546 -
trunk/Source/WebCore/rendering/RenderReplaced.h
r165479 r167803 80 80 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override; 81 81 82 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override final;82 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override final; 83 83 84 84 virtual bool canBeSelectionLeaf() const override { return true; } -
trunk/Source/WebCore/rendering/RenderText.cpp
r167568 r167803 432 432 } 433 433 434 VisiblePosition RenderText::positionForPoint(const LayoutPoint& point )434 VisiblePosition RenderText::positionForPoint(const LayoutPoint& point, const RenderRegion*) 435 435 { 436 436 ensureLineBoxes(); -
trunk/Source/WebCore/rendering/RenderText.h
r167568 r167803 73 73 Vector<FloatQuad> absoluteQuadsClippedToEllipsis() const; 74 74 75 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;75 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 76 76 77 77 bool is8Bit() const { return m_text.impl()->is8Bit(); } -
trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
r165676 r167803 167 167 } 168 168 169 VisiblePosition RenderSVGInlineText::positionForPoint(const LayoutPoint& point )169 VisiblePosition RenderSVGInlineText::positionForPoint(const LayoutPoint& point, const RenderRegion*) 170 170 { 171 171 if (!firstTextBox() || !textLength()) -
trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h
r163440 r167803 60 60 virtual bool isSVGInlineText() const override { return true; } 61 61 62 virtual VisiblePosition positionForPoint(const LayoutPoint& ) override;62 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; 63 63 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0) override; 64 64 virtual IntRect linesBoundingBox() const override; -
trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp
r165676 r167803 466 466 } 467 467 468 VisiblePosition RenderSVGText::positionForPoint(const LayoutPoint& pointInContents )468 VisiblePosition RenderSVGText::positionForPoint(const LayoutPoint& pointInContents, const RenderRegion* region) 469 469 { 470 470 RootInlineBox* rootBox = firstRootBox(); … … 480 480 return createVisiblePosition(0, DOWNSTREAM); 481 481 482 return closestBox->renderer().positionForPoint(LayoutPoint(pointInContents.x(), closestBox->y()) );482 return closestBox->renderer().positionForPoint(LayoutPoint(pointInContents.x(), closestBox->y()), region); 483 483 } 484 484 -
trunk/Source/WebCore/rendering/svg/RenderSVGText.h
r165676 r167803 71 71 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; 72 72 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction); 73 virtual VisiblePosition positionForPoint(const LayoutPoint& );73 virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*); 74 74 75 75 virtual bool requiresLayer() const { return false; }
Note: See TracChangeset
for help on using the changeset viewer.