WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
199741
[iOS WK2] Can't place caret or select in content that overflows a contenteditable element
https://bugs.webkit.org/show_bug.cgi?id=199741
Summary
[iOS WK2] Can't place caret or select in content that overflows a contentedit...
Simon Fraser (smfr)
Reported
2019-07-11 17:51:13 PDT
[iOS WK2] Can't place caret or select in content that overflows a contenteditable element
Attachments
Patch
(28.53 KB, patch)
2019-07-11 17:57 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(28.31 KB, patch)
2019-07-11 17:59 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(29.60 KB, patch)
2019-07-12 12:58 PDT
,
Simon Fraser (smfr)
wenson_hsieh
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2019-07-11 17:57:27 PDT
Created
attachment 373985
[details]
Patch
Simon Fraser (smfr)
Comment 2
2019-07-11 17:57:29 PDT
<
rdar://problem/50545233
>
Simon Fraser (smfr)
Comment 3
2019-07-11 17:59:19 PDT
Created
attachment 373986
[details]
Patch
Wenson Hsieh
Comment 4
2019-07-11 21:34:37 PDT
> Test suite failed > Failed > TestWebKitAPI.KeyboardInputTests.SelectionClipRectsWhenPresentingInputView > > /Volumes/Data/worker/iOS-12-Simulator-Build-EWS/build/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:524 > Expected equality of these values: > 10 > selectionClipRect.origin.x > Which is: 11
It looks like this can just be rebaselined.
Simon Fraser (smfr)
Comment 5
2019-07-12 12:58:23 PDT
Created
attachment 374028
[details]
Patch
Wenson Hsieh
Comment 6
2019-07-12 13:08:15 PDT
Comment on
attachment 374028
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374028&action=review
> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1610 > + boundingBox.setWidth(boundingBox.width() - style.borderLeftWidth() - style.borderRightWidth()); > + boundingBox.setHeight(boundingBox.height() - style.borderBottomWidth() - style.borderTopWidth());
Nit - could consider using contract instead.
> LayoutTests/editing/caret/ios/caret-in-overflow-area.html:47 > + window.addEventListener('load', async () => { > + runTest(); > + }, false);
Nit - addEventListener(‘load’, runTest);?
> LayoutTests/editing/selection/ios/place-selection-in-overflow-area.html:53 > + window.addEventListener('load', async () => { > + runTest(); > + }, false);
Ditto.
> LayoutTests/editing/selection/ios/selection-extends-into-overflow-area.html:61 > + window.addEventListener('load', async () => { > + runTest(); > + }, false);
Ditto.
Simon Fraser (smfr)
Comment 7
2019-07-12 14:42:34 PDT
https://trac.webkit.org/r247398
Sam Weinig
Comment 8
2019-07-12 14:46:19 PDT
Comment on
attachment 374028
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374028&action=review
> Source/WebKit/WebProcess/WebPage/WebPage.h:1212 > +#if PLATFORM(IOS_FAMILY) > + // This excludes layout overflow, includes borders. > + static WebCore::IntRect rootViewBoundsForElement(const WebCore::Element&); > + // These include layout overflow for overflow:visible elements, but exclude borders. > + static WebCore::IntRect absoluteInteractionBoundsForElement(const WebCore::Element&); > + static WebCore::IntRect rootViewInteractionBoundsForElement(const WebCore::Element&); > +#endif // PLATFORM(IOS_FAMILY)
Do these really need to be iOS specific? They seem pretty general. We really should be aiming to have less platform specific code like this.
Simon Fraser (smfr)
Comment 9
2019-07-12 14:48:32 PDT
(In reply to Sam Weinig from
comment #8
)
> Comment on
attachment 374028
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=374028&action=review
> > > Source/WebKit/WebProcess/WebPage/WebPage.h:1212 > > +#if PLATFORM(IOS_FAMILY) > > + // This excludes layout overflow, includes borders. > > + static WebCore::IntRect rootViewBoundsForElement(const WebCore::Element&); > > + // These include layout overflow for overflow:visible elements, but exclude borders. > > + static WebCore::IntRect absoluteInteractionBoundsForElement(const WebCore::Element&); > > + static WebCore::IntRect rootViewInteractionBoundsForElement(const WebCore::Element&); > > +#endif // PLATFORM(IOS_FAMILY) > > Do these really need to be iOS specific? They seem pretty general. We really > should be aiming to have less platform specific code like this.
Agreed. I started to clean things up and it got messy; it's unclear if all the callers want to include borders or not, and which want the interaction rect vs. the content box rect.
Sam Weinig
Comment 10
2019-07-12 15:02:35 PDT
(In reply to Simon Fraser (smfr) from
comment #9
)
> (In reply to Sam Weinig from
comment #8
) > > Comment on
attachment 374028
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=374028&action=review
> > > > > Source/WebKit/WebProcess/WebPage/WebPage.h:1212 > > > +#if PLATFORM(IOS_FAMILY) > > > + // This excludes layout overflow, includes borders. > > > + static WebCore::IntRect rootViewBoundsForElement(const WebCore::Element&); > > > + // These include layout overflow for overflow:visible elements, but exclude borders. > > > + static WebCore::IntRect absoluteInteractionBoundsForElement(const WebCore::Element&); > > > + static WebCore::IntRect rootViewInteractionBoundsForElement(const WebCore::Element&); > > > +#endif // PLATFORM(IOS_FAMILY) > > > > Do these really need to be iOS specific? They seem pretty general. We really > > should be aiming to have less platform specific code like this. > > Agreed. I started to clean things up and it got messy; it's unclear if all > the callers want to include borders or not, and which want the interaction > rect vs. the content box rect.
Will you finish :) ? Since these are static, and don't rely on the Page at all, it might also be better to move them to their own ElementGeometry.h/cpp (or whatever) file. And/Or move them to WebCore.
Simon Fraser (smfr)
Comment 11
2019-07-12 15:13:22 PDT
Not right now.
Sam Weinig
Comment 12
2019-07-14 17:26:38 PDT
(In reply to Simon Fraser (smfr) from
comment #11
)
> Not right now.
Bummer.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug