WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
219314
[LFC Display] Use a vector to maintain state during display tree building
https://bugs.webkit.org/show_bug.cgi?id=219314
Summary
[LFC Display] Use a vector to maintain state during display tree building
Simon Fraser (smfr)
Reported
2020-11-27 10:36:56 PST
[LFC Display] Use a vector to maintain state during display tree building
Attachments
Patch
(9.72 KB, patch)
2020-11-27 10:37 PST
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2020-11-27 10:37:17 PST
Created
attachment 414958
[details]
Patch
Sam Weinig
Comment 2
2020-11-28 11:30:30 PST
Comment on
attachment 414958
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=414958&action=review
> Source/WebCore/display/DisplayTreeBuilder.cpp:107 > + m_stateStack->reserveInitialCapacity(32);
An inline capacity on m_stateStack's vector probably makes sense if you are going to do this unconditionally.
Simon Fraser (smfr)
Comment 3
2020-11-28 21:01:44 PST
I tried that and makeUnique<Vector, 32> didn't compile.
EWS
Comment 4
2020-11-28 21:11:12 PST
Committed
r270224
: <
https://trac.webkit.org/changeset/270224
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 414958
[details]
.
Radar WebKit Bug Importer
Comment 5
2020-11-28 21:12:17 PST
<
rdar://problem/71779000
>
Don Olmstead
Comment 6
2020-11-29 08:45:33 PST
This breaks the non-unified build and the BuildingState struct is defined in DisplayTreeBuilder.cpp so there's no header that can be included to fix it. Not sure how you all would like to resolve this as the BuildingState has a PositioningContext which is also defined in that .cpp file. Here's the build log for reference. In file included from ..\..\Source\WebCore\display\DisplayView.cpp:27: In file included from ..\..\Source\WebCore\display/DisplayView.h:30: In file included from ..\..\Source\WebCore\display/DisplayLayerController.h:30: In file included from ..\..\Source\WebCore\platform\graphics\GraphicsLayer.h:29: In file included from ..\..\Source\WebCore\rendering\EventRegion.h:29: In file included from ..\..\Source\WebCore\platform\graphics\Region.h:29: In file included from ..\..\Source\WebCore\platform\graphics\IntRect.h:28: In file included from ..\..\Source\WebCore\platform\graphics\IntPoint.h:28: In file included from ..\..\Source\WebCore\platform\graphics\IntSize.h:29: In file included from WTF\Headers\wtf/JSONValues.h:36: In file included from WTF\Headers\wtf/text/StringHash.h:25: In file included from WTF\Headers\wtf/text/AtomString.h:25: In file included from WTF\Headers\wtf/text/AtomStringImpl.h:23: In file included from WTF\Headers\wtf/text/UniquedStringImpl.h:28: In file included from WTF\Headers\wtf/text/StringImpl.h:34: WTF\Headers\wtf/Vector.h(731,37): error: arithmetic on a pointer to an incomplete type 'WebCore::Display::BuildingState' iterator end() { return begin() + m_size; } ~~~~~~~ ^ WTF\Headers\wtf/Vector.h(676,47): note: in instantiation of member function 'WTF::Vector<WebCore::Display::BuildingState, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>::end' requested here TypeOperations::destruct(begin(), end()); ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory(2537,9): note: in instantiation of member function 'WTF::Vector<WebCore::Display::BuildingState, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>::~Vector' requested here delete _Ptr; ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory(2647,13): note: in instantiation of member function 'std::default_delete<WTF::Vector<WebCore::Display::BuildingState, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>>::operator()' requested here _Mypair._Get_first()(_Mypair._Myval2); ^ ..\..\Source\WebCore\display/DisplayTreeBuilder.h(56,7): note: in instantiation of member function 'std::unique_ptr<WTF::Vector<WebCore::Display::BuildingState, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, std::default_delete<WTF::Vector<WebCore::Display::BuildingState, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>>>::~unique_ptr' requested here class TreeBuilder { ^ ..\..\Source\WebCore\display/DisplayTreeBuilder.h(54,8): note: forward declaration of 'WebCore::Display::BuildingState' struct BuildingState; ^
Simon Fraser (smfr)
Comment 7
2020-11-30 10:45:45 PST
Fixed in
r270251
.
Sam Weinig
Comment 8
2020-11-30 19:19:58 PST
(In reply to Simon Fraser (smfr) from
comment #3
)
> I tried that and makeUnique<Vector, 32> didn't compile.
You would do, makeUnique<Vector<BuildingState, 32>>.
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