WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239460
Inline Element::shadowRoot()
https://bugs.webkit.org/show_bug.cgi?id=239460
Summary
Inline Element::shadowRoot()
Chris Dumez
Reported
2022-04-18 12:21:20 PDT
Inline Element::shadowRoot() given that it is small and shows up in Speedometer profiles.
Attachments
Patch
(4.23 KB, patch)
2022-04-18 13:18 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(7.27 KB, patch)
2022-04-18 14:21 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(8.65 KB, patch)
2022-04-18 15:13 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(11.35 KB, patch)
2022-04-18 16:20 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(13.86 KB, patch)
2022-04-18 16:42 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(14.80 KB, patch)
2022-04-18 16:57 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(20.05 KB, patch)
2022-04-18 19:51 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(20.20 KB, patch)
2022-04-18 20:00 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(20.40 KB, patch)
2022-04-18 20:25 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(21.44 KB, patch)
2022-04-18 21:45 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(23.85 KB, patch)
2022-04-19 10:16 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(27.28 KB, patch)
2022-04-19 11:44 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(11)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2022-04-18 13:18:43 PDT
Created
attachment 457818
[details]
Patch
Chris Dumez
Comment 2
2022-04-18 14:21:28 PDT
Created
attachment 457823
[details]
Patch
Chris Dumez
Comment 3
2022-04-18 15:13:16 PDT
Created
attachment 457828
[details]
Patch
Chris Dumez
Comment 4
2022-04-18 16:20:16 PDT
Created
attachment 457834
[details]
Patch
Chris Dumez
Comment 5
2022-04-18 16:42:12 PDT
Created
attachment 457839
[details]
Patch
Chris Dumez
Comment 6
2022-04-18 16:57:41 PDT
Created
attachment 457842
[details]
Patch
Chris Dumez
Comment 7
2022-04-18 19:51:49 PDT
Created
attachment 457848
[details]
Patch
Chris Dumez
Comment 8
2022-04-18 20:00:36 PDT
Created
attachment 457849
[details]
Patch
Chris Dumez
Comment 9
2022-04-18 20:25:50 PDT
Created
attachment 457850
[details]
Patch
Chris Dumez
Comment 10
2022-04-18 21:45:18 PDT
Created
attachment 457854
[details]
Patch
Darin Adler
Comment 11
2022-04-19 09:43:51 PDT
Comment on
attachment 457854
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457854&action=review
> Source/WebCore/dom/Element.h:318 > + ShadowRoot* shadowRoot() const;
If we add the inline keyword to the declaration of shadowRoot (like replace WEBCORE_EXPORT with inline) then, I seem to recall, we get compiler errors rather than linker errors when we call it without remembering to include ElementRareData.h. So I suggest including that keyword. We should use that technique more! I think Jer Noble is the one who pointed this out to me.
> Source/WebCore/editing/cocoa/DataDetection.mm:694 > +std::optional<std::pair<Ref<HTMLElement>, IntRect>> DataDetection::findDataDetectionResultElementInImageOverlay(const FloatPoint& location, const HTMLElement& imageOverlayHost)
This seems like a really good change, but not mentioned in change log.
Chris Dumez
Comment 12
2022-04-19 09:55:22 PDT
(In reply to Darin Adler from
comment #11
)
> Comment on
attachment 457854
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=457854&action=review
> > > Source/WebCore/dom/Element.h:318 > > + ShadowRoot* shadowRoot() const; > > If we add the inline keyword to the declaration of shadowRoot (like replace > WEBCORE_EXPORT with inline) then, I seem to recall, we get compiler errors > rather than linker errors when we call it without remembering to include > ElementRareData.h. So I suggest including that keyword. We should use that > technique more! I think Jer Noble is the one who pointed this out to me. > > > Source/WebCore/editing/cocoa/DataDetection.mm:694 > > +std::optional<std::pair<Ref<HTMLElement>, IntRect>> DataDetection::findDataDetectionResultElementInImageOverlay(const FloatPoint& location, const HTMLElement& imageOverlayHost) > > This seems like a really good change, but not mentioned in change log.
Ok, I'll mention in the changelog. The issue is that we'd need to include ElementRareData.h from the WebKit layer otherwise. And this is currently not possible because this header is not exported.
Chris Dumez
Comment 13
2022-04-19 10:13:49 PDT
(In reply to Darin Adler from
comment #11
)
> Comment on
attachment 457854
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=457854&action=review
> > > Source/WebCore/dom/Element.h:318 > > + ShadowRoot* shadowRoot() const; > > If we add the inline keyword to the declaration of shadowRoot (like replace > WEBCORE_EXPORT with inline) then, I seem to recall, we get compiler errors > rather than linker errors when we call it without remembering to include > ElementRareData.h. So I suggest including that keyword. We should use that > technique more! I think Jer Noble is the one who pointed this out to me.
Nice trick. This is good to know, thanks. I'll adopt in this patch.
Chris Dumez
Comment 14
2022-04-19 10:16:46 PDT
Created
attachment 457913
[details]
Patch
Chris Dumez
Comment 15
2022-04-19 11:44:53 PDT
Created
attachment 457921
[details]
Patch
EWS
Comment 16
2022-04-19 16:14:56 PDT
Committed
r293042
(
249781@main
): <
https://commits.webkit.org/249781@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 457921
[details]
.
Radar WebKit Bug Importer
Comment 17
2022-04-19 16:15:15 PDT
<
rdar://problem/91992406
>
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