WebKit Bugzilla
Attachment 348916 Details for
Bug 184302
: Start migration to a version of contentsToRootView() that may take scroll offset into account for delegated scrolling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-Bug-184302-Start-migration-to-a-version-of-contentsT.patch (text/plain), 29.70 KB, created by
Frédéric Wang (:fredw)
on 2018-09-05 07:14:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-05 07:14:25 PDT
Size:
29.70 KB
patch
obsolete
>From f8c5484c707a68165f2ca850e40f7e90559ea267 Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Wed, 11 Jul 2018 15:34:02 +0200 >Subject: [PATCH xserver 1/2] Bug 184302 - Start migration to a version of > contentsToRootView() that may take scroll offset into account for delegated > scrolling > >--- > Source/WebCore/ChangeLog | 47 +++++++++++++++++++ > .../ios/WebAccessibilityObjectWrapperIOS.mm | 2 +- > .../mac/WebAccessibilityObjectWrapperMac.mm | 2 +- > Source/WebCore/dom/Element.cpp | 4 +- > .../editing/AlternativeTextController.cpp | 2 +- > Source/WebCore/editing/FrameSelection.cpp | 2 +- > Source/WebCore/html/ColorInputType.cpp | 3 +- > Source/WebCore/html/HTMLInputElement.cpp | 2 +- > Source/WebCore/inspector/InspectorOverlay.cpp | 4 +- > .../inspector/agents/InspectorPageAgent.cpp | 2 +- > Source/WebCore/page/FrameView.cpp | 2 +- > Source/WebCore/page/TextIndicator.cpp | 6 +-- > Source/WebCore/platform/ScrollView.cpp | 4 +- > Source/WebCore/platform/ScrollView.h | 2 +- > Source/WebKit/ChangeLog | 32 +++++++++++++ > .../Automation/WebAutomationSessionProxy.cpp | 2 +- > .../InjectedBundleHitTestResult.cpp | 2 +- > .../WebProcess/WebPage/FindController.cpp | 2 +- > .../WebProcess/WebPage/ios/WebPageIOS.mm | 24 +++++----- > .../cocoa/VideoFullscreenManager.mm | 4 +- > 20 files changed, 115 insertions(+), 35 deletions(-) > >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 225cb67172d..43b2563851f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,50 @@ >+2018-04-04 Frederic Wang <fwang@igalia.com> >+ >+ Start migration to a version of contentsToRootView() that may take scroll offset into account for delegated scrolling >+ https://bugs.webkit.org/show_bug.cgi?id=184302 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ ScrollView::contentsToRootView(const RectPoint&) does not currently take into account the >+ scroll position of the ScrollView when it delegatesScrolling(), which is not always correct. >+ In order to correctly position text highlight in unflattened subframes for iOS's find UI >+ (bug 184297), this should be fixed. However, that is a bit difficult because >+ contentsToRootView and similar functions are used everywhere in the code. This patch just >+ renames the function to deprecateContentsToRootView so that we can smoothly transition >+ existing code to newer versions in the future. >+ >+ No new tests, behavior unchanged. >+ >+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: >+ (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]): >+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: >+ (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]): >+ * dom/Element.cpp: >+ (WebCore::Element::boundsInRootViewSpace): >+ (WebCore::Element::clientRect const): >+ * editing/AlternativeTextController.cpp: >+ (WebCore::AlternativeTextController::rootViewRectForRange const): >+ * editing/FrameSelection.cpp: >+ (WebCore::DragCaretController::caretRectInRootViewCoordinates const): >+ * html/ColorInputType.cpp: >+ (WebCore::ColorInputType::elementRectRelativeToRootView const): >+ * html/HTMLInputElement.cpp: >+ (WebCore::HTMLInputElement::setupDateTimeChooserParameters): >+ * inspector/InspectorOverlay.cpp: >+ (WebCore::InspectorOverlay::showPaintRect): >+ (WebCore::buildObjectForElementData): >+ * inspector/agents/InspectorPageAgent.cpp: >+ (WebCore::InspectorPageAgent::didPaint): >+ * page/FrameView.cpp: >+ (WebCore::FrameView::scrollContentsFastPath): >+ * page/TextIndicator.cpp: >+ (WebCore::takeSnapshots): >+ (WebCore::initializeIndicator): >+ * platform/ScrollView.cpp: >+ (WebCore::ScrollView::deprecatedContentsToRootView const): >+ (WebCore::ScrollView::contentsToScreen const): >+ * platform/ScrollView.h: >+ > 2018-09-04 Frederic Wang <fwang@igalia.com> > > Add basic support for ScrollIntoViewOptions >diff --git a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm b/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >index d4fce542493..2d7394bbd07 100644 >--- a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >+++ b/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >@@ -1637,7 +1637,7 @@ static void appendStringToResult(NSMutableString *result, NSString *string) > scrollView = downcast<AccessibilityScrollView>(*parent).scrollView(); > > if (scrollView) >- rect = scrollView->contentsToRootView(rect); >+ rect = scrollView->deprecatedContentsToRootView(rect); > > Page* page = m_object->page(); > >diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >index 04c186a08ac..567521a6970 100644 >--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >@@ -3566,7 +3566,7 @@ static NSString *roleValueToNSString(AccessibilityRole value) > for (AccessibilityObject* parent = m_object->parentObject(); parent; parent = parent->parentObject()) { > if (is<AccessibilityScrollView>(*parent)) { > ScrollView* scrollView = downcast<AccessibilityScrollView>(*parent).scrollView(); >- rect = scrollView->contentsToRootView(rect); >+ rect = scrollView->deprecatedContentsToRootView(rect); > break; > } > } >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 6fa86b1a63c..994a8ea18d5 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -1069,7 +1069,7 @@ IntRect Element::boundsInRootViewSpace() > for (size_t i = 1; i < quads.size(); ++i) > result.unite(quads[i].enclosingBoundingBox()); > >- result = view->contentsToRootView(result); >+ result = view->deprecatedContentsToRootView(result); > return result; > } > >@@ -1295,7 +1295,7 @@ Ref<DOMRect> Element::getBoundingClientRect() > IntRect Element::clientRect() const > { > if (RenderObject* renderer = this->renderer()) >- return document().view()->contentsToRootView(renderer->absoluteBoundingBoxRect()); >+ return document().view()->deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect()); > return IntRect(); > } > >diff --git a/Source/WebCore/editing/AlternativeTextController.cpp b/Source/WebCore/editing/AlternativeTextController.cpp >index e64f9478a24..fc9659a6c02 100644 >--- a/Source/WebCore/editing/AlternativeTextController.cpp >+++ b/Source/WebCore/editing/AlternativeTextController.cpp >@@ -391,7 +391,7 @@ FloatRect AlternativeTextController::rootViewRectForRange(const Range* range) co > FloatRect boundingRect; > for (auto& textQuad : textQuads) > boundingRect.unite(textQuad.boundingBox()); >- return view->contentsToRootView(IntRect(boundingRect)); >+ return view->deprecatedContentsToRootView(IntRect(boundingRect)); > } > > void AlternativeTextController::respondToChangedSelection(const VisibleSelection& oldSelection) >diff --git a/Source/WebCore/editing/FrameSelection.cpp b/Source/WebCore/editing/FrameSelection.cpp >index 768c44bb6ba..1fc4a871f6f 100644 >--- a/Source/WebCore/editing/FrameSelection.cpp >+++ b/Source/WebCore/editing/FrameSelection.cpp >@@ -108,7 +108,7 @@ IntRect DragCaretController::caretRectInRootViewCoordinates() const > > if (auto* document = m_position.deepEquivalent().document()) { > if (auto* documentView = document->view()) >- return documentView->contentsToRootView(m_position.absoluteCaretBounds()); >+ return documentView->deprecatedContentsToRootView(m_position.absoluteCaretBounds()); > } > > return { }; >diff --git a/Source/WebCore/html/ColorInputType.cpp b/Source/WebCore/html/ColorInputType.cpp >index 3f8e20c9929..146f5acb53a 100644 >--- a/Source/WebCore/html/ColorInputType.cpp >+++ b/Source/WebCore/html/ColorInputType.cpp >@@ -263,7 +263,8 @@ IntRect ColorInputType::elementRectRelativeToRootView() const > ASSERT(element()); > if (!element()->renderer()) > return IntRect(); >- return element()->document().view()->contentsToRootView(element()->renderer()->absoluteBoundingBoxRect()); >+ >+ return element()->document().view()->deprecatedContentsToRootView(element()->renderer()->absoluteBoundingBoxRect()); > } > > Color ColorInputType::currentColor() >diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp >index bd102a57b8f..1f3e24f369e 100644 >--- a/Source/WebCore/html/HTMLInputElement.cpp >+++ b/Source/WebCore/html/HTMLInputElement.cpp >@@ -2112,7 +2112,7 @@ bool HTMLInputElement::setupDateTimeChooserParameters(DateTimeChooserParameters& > } > > if (RenderElement* renderer = this->renderer()) >- parameters.anchorRectInRootView = document().view()->contentsToRootView(renderer->absoluteBoundingBoxRect()); >+ parameters.anchorRectInRootView = document().view()->deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect()); > else > parameters.anchorRectInRootView = IntRect(); > parameters.currentValue = value(); >diff --git a/Source/WebCore/inspector/InspectorOverlay.cpp b/Source/WebCore/inspector/InspectorOverlay.cpp >index c5b9aa5564a..1299db8856d 100644 >--- a/Source/WebCore/inspector/InspectorOverlay.cpp >+++ b/Source/WebCore/inspector/InspectorOverlay.cpp >@@ -386,7 +386,7 @@ void InspectorOverlay::showPaintRect(const FloatRect& rect) > if (!m_showingPaintRects) > return; > >- IntRect rootRect = m_page.mainFrame().view()->contentsToRootView(enclosingIntRect(rect)); >+ IntRect rootRect = m_page.mainFrame().view()->deprecatedContentsToRootView(enclosingIntRect(rect)); > > const auto removeDelay = 250_ms; > >@@ -605,7 +605,7 @@ static RefPtr<Inspector::Protocol::OverlayTypes::ElementData> buildObjectForElem > > Frame* containingFrame = node->document().frame(); > FrameView* containingView = containingFrame->view(); >- IntRect boundingBox = snappedIntRect(containingView->contentsToRootView(renderer->absoluteBoundingBoxRect())); >+ IntRect boundingBox = snappedIntRect(containingView->deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect())); > RenderBoxModelObject* modelObject = is<RenderBoxModelObject>(*renderer) ? downcast<RenderBoxModelObject>(renderer) : nullptr; > auto sizeObject = Inspector::Protocol::OverlayTypes::Size::create() > .setWidth(modelObject ? adjustForAbsoluteZoom(roundToInt(modelObject->offsetWidth()), *modelObject) : boundingBox.width()) >diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >index e00d509c368..615d07151d4 100644 >--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >@@ -695,7 +695,7 @@ void InspectorPageAgent::didPaint(RenderObject& renderer, const LayoutRect& rect > > LayoutRect rootRect = absoluteRect; > if (!view->frame().isMainFrame()) { >- IntRect rootViewRect = view->contentsToRootView(snappedIntRect(absoluteRect)); >+ IntRect rootViewRect = view->deprecatedContentsToRootView(snappedIntRect(absoluteRect)); > rootRect = view->frame().mainFrame().view()->rootViewToContents(rootViewRect); > } > >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index 18c54774443..f391af81484 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -2064,7 +2064,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect > > // FIXME: use pixel snapping instead of enclosing when ScrollView has finished transitioning from IntRect to Float/LayoutRect. > IntRect updateRect = enclosingIntRect(layer->repaintRectIncludingNonCompositingDescendants()); >- updateRect = contentsToRootView(updateRect); >+ updateRect = deprecatedContentsToRootView(updateRect); > if (!isCompositedContentLayer) > updateRect.intersect(rectToScroll); > if (!updateRect.isEmpty()) >diff --git a/Source/WebCore/page/TextIndicator.cpp b/Source/WebCore/page/TextIndicator.cpp >index 2ac016c216b..d65e70e833e 100644 >--- a/Source/WebCore/page/TextIndicator.cpp >+++ b/Source/WebCore/page/TextIndicator.cpp >@@ -175,7 +175,7 @@ static bool takeSnapshots(TextIndicatorData& data, Frame& frame, IntRect snapsho > float snapshotScaleFactor; > auto snapshotRect = frame.view()->visibleContentRect(); > data.contentImageWithoutSelection = takeSnapshot(frame, snapshotRect, SnapshotOptionsPaintEverythingExcludingSelection, snapshotScaleFactor, { }); >- data.contentImageWithoutSelectionRectInRootViewCoordinates = frame.view()->contentsToRootView(snapshotRect); >+ data.contentImageWithoutSelectionRectInRootViewCoordinates = frame.view()->deprecatedContentsToRootView(snapshotRect); > } > > return true; >@@ -358,7 +358,7 @@ static bool initializeIndicator(TextIndicatorData& data, Frame& frame, const Ran > textRectInDocumentCoordinatesIncludingMargin.inflateY(margin.height()); > textBoundingRectInDocumentCoordinates.unite(textRectInDocumentCoordinatesIncludingMargin); > >- FloatRect textRectInRootViewCoordinates = frame.view()->contentsToRootView(enclosingIntRect(textRectInDocumentCoordinatesIncludingMargin)); >+ FloatRect textRectInRootViewCoordinates = frame.view()->deprecatedContentsToRootView(enclosingIntRect(textRectInDocumentCoordinatesIncludingMargin)); > textRectsInRootViewCoordinates.append(textRectInRootViewCoordinates); > textBoundingRectInRootViewCoordinates.unite(textRectInRootViewCoordinates); > } >@@ -371,7 +371,7 @@ static bool initializeIndicator(TextIndicatorData& data, Frame& frame, const Ran > > // Store the selection rect in window coordinates, to be used subsequently > // to determine if the indicator and selection still precisely overlap. >- data.selectionRectInRootViewCoordinates = frame.view()->contentsToRootView(enclosingIntRect(frame.selection().selectionBounds())); >+ data.selectionRectInRootViewCoordinates = frame.view()->deprecatedContentsToRootView(enclosingIntRect(frame.selection().selectionBounds())); > data.textBoundingRectInRootViewCoordinates = textBoundingRectInRootViewCoordinates; > data.textRectsInBoundingRectCoordinates = textRectsInBoundingRectCoordinates; > >diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp >index b8adee4e4f3..76dee752bc3 100644 >--- a/Source/WebCore/platform/ScrollView.cpp >+++ b/Source/WebCore/platform/ScrollView.cpp >@@ -892,7 +892,7 @@ IntPoint ScrollView::rootViewToTotalContents(const IntPoint& rootViewPoint) cons > return viewPoint + toIntSize(scrollPosition()) - IntSize(0, topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)); > } > >-IntRect ScrollView::contentsToRootView(const IntRect& contentsRect) const >+IntRect ScrollView::deprecatedContentsToRootView(const IntRect& contentsRect) const > { > if (delegatesScrolling()) > return convertToRootView(contentsRect); >@@ -939,7 +939,7 @@ IntRect ScrollView::contentsToScreen(const IntRect& rect) const > return platformContentsToScreen(rect); > if (!window) > return IntRect(); >- return window->rootViewToScreen(contentsToRootView(rect)); >+ return window->rootViewToScreen(deprecatedContentsToRootView(rect)); > } > > IntPoint ScrollView::screenToContents(const IntPoint& point) const >diff --git a/Source/WebCore/platform/ScrollView.h b/Source/WebCore/platform/ScrollView.h >index 83149810ba2..b1631177147 100644 >--- a/Source/WebCore/platform/ScrollView.h >+++ b/Source/WebCore/platform/ScrollView.h >@@ -282,7 +282,7 @@ public: > WEBCORE_EXPORT IntPoint rootViewToContents(const IntPoint&) const; > WEBCORE_EXPORT IntPoint contentsToRootView(const IntPoint&) const; > WEBCORE_EXPORT IntRect rootViewToContents(const IntRect&) const; >- WEBCORE_EXPORT IntRect contentsToRootView(const IntRect&) const; >+ WEBCORE_EXPORT IntRect deprecatedContentsToRootView(const IntRect&) const; > > IntPoint viewToContents(const IntPoint&) const; > IntPoint contentsToView(const IntPoint&) const; >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 266104c9dd0..39d4c95fe4d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,35 @@ >+2018-04-04 Frederic Wang <fwang@igalia.com> >+ >+ Start migration to a version of contentsToRootView() that may take scroll offset into account for delegated scrolling >+ https://bugs.webkit.org/show_bug.cgi?id=184302 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ ScrollView::contentsToRootView(const RectPoint&) does not currently take into account the >+ scroll position of the ScrollView when it delegatesScrolling(), which is not always correct. >+ In order to correctly position text highlight in unflattened subframes for iOS's find UI >+ (bug 184297), this should be fixed. However, that is a bit difficult because >+ contentsToRootView and similar functions are used everywhere in the code. This patch just >+ renames the function to deprecateContentsToRootView so that we can smoothly transition >+ existing code to newer versions in the future. >+ >+ * WebProcess/Automation/WebAutomationSessionProxy.cpp: >+ (WebKit::WebAutomationSessionProxy::computeElementLayout): >+ * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: >+ (WebKit::InjectedBundleHitTestResult::imageRect const): >+ * WebProcess/WebPage/FindController.cpp: >+ (WebKit::FindController::drawRect): >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::platformEditorState const): >+ (WebKit::WebPage::rectForElementAtInteractionLocation): >+ (WebKit::WebPage::convertSelectionRectsToRootView): >+ (WebKit::WebPage::getPositionInformation): >+ (WebKit::elementRectInRootViewCoordinates): >+ (WebKit::WebPage::getAssistedNodeInformation): >+ (WebKit::WebPage::dynamicViewportSizeUpdate): >+ * WebProcess/cocoa/VideoFullscreenManager.mm: >+ (WebKit::inlineVideoFrame): >+ > 2018-09-04 Frederic Wang <fwang@igalia.com> > > Add basic support for ScrollIntoViewOptions >diff --git a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >index dd978b07e79..f6cd39318c0 100644 >--- a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >+++ b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >@@ -581,7 +581,7 @@ void WebAutomationSessionProxy::computeElementLayout(uint64_t pageID, uint64_t f > WebCore::FrameView* frameView = frame->coreFrame()->view(); > WebCore::FrameView* mainView = frame->coreFrame()->mainFrame().view(); > WebCore::IntRect frameElementBounds = roundedIntRect(coreElement->boundingClientRect()); >- WebCore::IntRect rootElementBounds = mainView->rootViewToContents(frameView->contentsToRootView(frameElementBounds)); >+ WebCore::IntRect rootElementBounds = mainView->rootViewToContents(frameView->deprecatedContentsToRootView(frameElementBounds)); > WebCore::IntRect resultElementBounds; > switch (coordinateSystem) { > case CoordinateSystem::Page: >diff --git a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp >index 1bb0ba16037..6459ee5b6c6 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp >@@ -166,7 +166,7 @@ IntRect InjectedBundleHitTestResult::imageRect() const > if (!view) > return imageRect; > >- return view->contentsToRootView(imageRect); >+ return view->deprecatedContentsToRootView(imageRect); > } > > RefPtr<WebImage> InjectedBundleHitTestResult::image() const >diff --git a/Source/WebKit/WebProcess/WebPage/FindController.cpp b/Source/WebKit/WebProcess/WebPage/FindController.cpp >index 0387263ced9..03a7cc507a4 100644 >--- a/Source/WebKit/WebProcess/WebPage/FindController.cpp >+++ b/Source/WebKit/WebProcess/WebPage/FindController.cpp >@@ -471,7 +471,7 @@ void FindController::drawRect(PageOverlay&, GraphicsContext& graphicsContext, co > return; > > if (Frame* selectedFrame = frameWithSelection(m_webPage->corePage())) { >- IntRect findIndicatorRect = selectedFrame->view()->contentsToRootView(enclosingIntRect(selectedFrame->selection().selectionBounds())); >+ IntRect findIndicatorRect = selectedFrame->view()->deprecatedContentsToRootView(enclosingIntRect(selectedFrame->selection().selectionBounds())); > > if (findIndicatorRect != m_findIndicatorRect) > hideFindIndicator(); >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index f74c9a59743..49a94e9b6e4 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -208,7 +208,7 @@ void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePost > bool startNodeIsInsideFixedPosition = false; > bool endNodeIsInsideFixedPosition = false; > if (selection.isCaret()) { >- postLayoutData.caretRectAtStart = view->contentsToRootView(frame.selection().absoluteCaretBounds(&startNodeIsInsideFixedPosition)); >+ postLayoutData.caretRectAtStart = view->deprecatedContentsToRootView(frame.selection().absoluteCaretBounds(&startNodeIsInsideFixedPosition)); > endNodeIsInsideFixedPosition = startNodeIsInsideFixedPosition; > postLayoutData.caretRectAtEnd = postLayoutData.caretRectAtStart; > // FIXME: The following check should take into account writing direction. >@@ -217,8 +217,8 @@ void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePost > if (selection.isContentEditable()) > charactersAroundPosition(selection.start(), postLayoutData.characterAfterSelection, postLayoutData.characterBeforeSelection, postLayoutData.twoCharacterBeforeSelection); > } else if (selection.isRange()) { >- postLayoutData.caretRectAtStart = view->contentsToRootView(VisiblePosition(selection.start()).absoluteCaretBounds(&startNodeIsInsideFixedPosition)); >- postLayoutData.caretRectAtEnd = view->contentsToRootView(VisiblePosition(selection.end()).absoluteCaretBounds(&endNodeIsInsideFixedPosition)); >+ postLayoutData.caretRectAtStart = view->deprecatedContentsToRootView(VisiblePosition(selection.start()).absoluteCaretBounds(&startNodeIsInsideFixedPosition)); >+ postLayoutData.caretRectAtEnd = view->deprecatedContentsToRootView(VisiblePosition(selection.end()).absoluteCaretBounds(&endNodeIsInsideFixedPosition)); > RefPtr<Range> selectedRange = selection.toNormalizedRange(); > String selectedText; > if (selectedRange) { >@@ -236,7 +236,7 @@ void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePost > postLayoutData.insideFixedPosition = startNodeIsInsideFixedPosition || endNodeIsInsideFixedPosition; > if (!selection.isNone()) { > if (m_assistedNode && m_assistedNode->renderer()) { >- postLayoutData.selectionClipRect = view->contentsToRootView(m_assistedNode->renderer()->absoluteBoundingBoxRect()); >+ postLayoutData.selectionClipRect = view->deprecatedContentsToRootView(m_assistedNode->renderer()->absoluteBoundingBoxRect()); > postLayoutData.caretColor = m_assistedNode->renderer()->style().caretColor(); > } > computeEditableRootHasContentAndPlainText(selection, postLayoutData); >@@ -528,7 +528,7 @@ IntRect WebPage::rectForElementAtInteractionLocation() > Node* hitNode = result.innerNode(); > if (!hitNode || !hitNode->renderer()) > return IntRect(); >- return result.innerNodeFrame()->view()->contentsToRootView(hitNode->renderer()->absoluteBoundingBoxRect(true)); >+ return result.innerNodeFrame()->view()->deprecatedContentsToRootView(hitNode->renderer()->absoluteBoundingBoxRect(true)); > } > > void WebPage::updateSelectionAppearance() >@@ -1715,7 +1715,7 @@ void WebPage::convertSelectionRectsToRootView(FrameView* view, Vector<SelectionR > { > for (size_t i = 0; i < selectionRects.size(); ++i) { > SelectionRect& currentRect = selectionRects[i]; >- currentRect.setRect(view->contentsToRootView(currentRect.rect())); >+ currentRect.setRect(view->deprecatedContentsToRootView(currentRect.rect())); > } > } > >@@ -2069,7 +2069,7 @@ void WebPage::getPositionInformation(const InteractionInformationRequest& reques > position = compositionRange->startPosition(); > else if (position > compositionRange->endPosition()) > position = compositionRange->endPosition(); >- IntRect caretRect = view.contentsToRootView(position.absoluteCaretBounds()); >+ IntRect caretRect = view.deprecatedContentsToRootView(position.absoluteCaretBounds()); > float deltaX = abs(caretRect.x() + (caretRect.width() / 2) - request.point.x()); > float deltaYFromTheTop = abs(caretRect.y() - request.point.y()); > float deltaYFromTheBottom = abs(caretRect.y() + caretRect.height() - request.point.y()); >@@ -2175,7 +2175,7 @@ void WebPage::getPositionInformation(const InteractionInformationRequest& reques > > if (!renderer->document().frame()->isMainFrame()) { > FrameView *view = renderer->document().frame()->view(); >- info.bounds = view->contentsToRootView(info.bounds); >+ info.bounds = view->deprecatedContentsToRootView(info.bounds); > } > } > } >@@ -2323,7 +2323,7 @@ static IntRect elementRectInRootViewCoordinates(const Node& node, const Frame& f > if (!renderer) > return { }; > >- return view->contentsToRootView(renderer->absoluteBoundingBoxRect()); >+ return view->deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect()); > } > > void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information) >@@ -2348,7 +2348,7 @@ void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information) > if (inFixed && elementFrame.isMainFrame() && !frameView->frame().settings().visualViewportEnabled()) { > IntRect currentFixedPositionRect = frameView->customFixedPositionLayoutRect(); > frameView->setCustomFixedPositionLayoutRect(frameView->renderView()->documentRect()); >- information.elementRect = frameView->contentsToRootView(renderer->absoluteBoundingBoxRect()); >+ information.elementRect = frameView->deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect()); > frameView->setCustomFixedPositionLayoutRect(currentFixedPositionRect); > > if (!information.elementRect.contains(m_lastInteractionLocation)) >@@ -2593,7 +2593,7 @@ void WebPage::dynamicViewportSizeUpdate(const FloatSize& viewLayoutSize, const W > if (Node* node = hitTestResult.innerNode()) { > if (RenderObject* renderer = node->renderer()) { > FrameView& containingView = *node->document().frame()->view(); >- FloatRect boundingBox = containingView.contentsToRootView(renderer->absoluteBoundingBoxRect(true)); >+ FloatRect boundingBox = containingView.deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect(true)); > relativeHorizontalPositionInNodeAtCenter = (unobscuredContentRectCenter.x() - boundingBox.x()) / boundingBox.width(); > relativeVerticalPositionInNodeAtCenter = (unobscuredContentRectCenter.y() - boundingBox.y()) / boundingBox.height(); > oldNodeAtCenter = node; >@@ -2661,7 +2661,7 @@ void WebPage::dynamicViewportSizeUpdate(const FloatSize& viewLayoutSize, const W > > if (RenderObject* renderer = oldNodeAtCenter ? oldNodeAtCenter->renderer() : nullptr) { > FrameView& containingView = *oldNodeAtCenter->document().frame()->view(); >- FloatRect newBoundingBox = containingView.contentsToRootView(renderer->absoluteBoundingBoxRect(true)); >+ FloatRect newBoundingBox = containingView.deprecatedContentsToRootView(renderer->absoluteBoundingBoxRect(true)); > newRelativeContentCenter = FloatPoint(newBoundingBox.x() + relativeHorizontalPositionInNodeAtCenter * newBoundingBox.width(), newBoundingBox.y() + relativeVerticalPositionInNodeAtCenter * newBoundingBox.height()); > } else > newRelativeContentCenter = relativeCenterAfterContentSizeChange(targetUnobscuredRect, oldContentSize, newContentSize); >diff --git a/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm b/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm >index 719cc2bb48c..1fec9ded968 100644 >--- a/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm >+++ b/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm >@@ -70,12 +70,12 @@ static IntRect inlineVideoFrame(HTMLVideoElement& element) > if (renderer->hasLayer() && renderer->enclosingLayer()->isComposited()) { > FloatQuad contentsBox = static_cast<FloatRect>(renderer->enclosingLayer()->backing()->contentsBox()); > contentsBox = renderer->localToAbsoluteQuad(contentsBox); >- return element.document().view()->contentsToRootView(contentsBox.enclosingBoundingBox()); >+ return element.document().view()->deprecatedContentsToRootView(contentsBox.enclosingBoundingBox()); > } > > auto rect = renderer->videoBox(); > rect.moveBy(renderer->absoluteBoundingBoxRect().location()); >- return element.document().view()->contentsToRootView(rect); >+ return element.document().view()->deprecatedContentsToRootView(rect); > } > > #pragma mark - VideoFullscreenInterfaceContext >-- >2.18.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 184302
:
337167
|
337192
|
337200
|
337258
|
344763
| 348916