Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H/V_LINE_TO commands can have two coordinates #42

Open
kreichgauer opened this issue Sep 15, 2022 · 1 comment
Open

H/V_LINE_TO commands can have two coordinates #42

kreichgauer opened this issue Sep 15, 2022 · 1 comment

Comments

@kreichgauer
Copy link

kreichgauer commented Sep 15, 2022

SVG's horizontal/vertical lineto commands may have multiple coordinates (although the spec caveats that "usually this doesn't make sense"). Skiafy will convert those to V/H_LINE_TO commands with up to two coordinates. But Chromium thinks they may have only one: https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/paint_vector_icon.cc;l=114-119;drc=3e1a26c44c024d97dc9a4c09bbc6a2365398ca2c

@kreichgauer kreichgauer changed the title Relative H/V_LINE_TO commands can have two coordinates H/V_LINE_TO commands can have two coordinates Sep 15, 2022
@jamescookmd
Copy link

Specifically, some SVGs generate commands in .icon files like "R_V_LINE_TO, -9, 9,". This causes a NOTREACHED() in paint_vector_icon.cc:

#0 0x7f1eaf424a4c base::debug::CollectStackTrace()
#1 0x7f1eaf3de43a base::debug::StackTrace::StackTrace()
#2 0x7f1eaf3de3f5 base::debug::StackTrace::StackTrace()
#3 0x7f1eaf12658e logging::LogMessage::~LogMessage()
#4 0x7f1eaf0dc7fc logging::(anonymous namespace)::NotReachedLogMessage::~NotReachedLogMessage()
#5 0x7f1eaf0dc829 logging::(anonymous namespace)::NotReachedLogMessage::~NotReachedLogMessage()
#6 0x7f1eaf0dc0cd logging::CheckError::~CheckError()
#7 0x7f1eaf0dc225 logging::NotReachedError::~NotReachedError()
#8 0x7f1eadb59aca gfx::(anonymous namespace)::PathParser::GetArgumentCount()
#9 0x7f1eadb59879 gfx::(anonymous namespace)::PathParser::Advance()
#10 0x7f1eadb58ec7 gfx::(anonymous namespace)::PaintPath()
#11 0x7f1eadb57c39 gfx::PaintVectorIcon()
#12 0x7f1eadb5a24a gfx::(anonymous namespace)::VectorIconSource::Draw()
#13 0x7f1eadb3b47a gfx::CanvasImageSource::GetImageForScale()
#14 0x7f1eadaf4062 gfx::internal::ImageSkiaStorage::FindRepresentation()
#15 0x7f1eadaf5604 gfx::ImageSkia::GetRepresentation()
#16 0x7f1e9beeac70 views::ImageView::GetPaintImage()
#17 0x7f1e9beea821 views::ImageView::OnPaintImage()
#18 0x7f1e9beea784 views::ImageView::OnPaint()
#19 0x7f1e9c0b3c0a views::View::Paint()
#20 0x7f1e9c0b86e0 views::View::RecursivePaintHelper()
#21 0x7f1e9c0b84de views::View::PaintChildren()
#22 0x7f1e9c0b3cd1 views::View::Paint()
#23 0x7f1e9c0b86e0 views::View::RecursivePaintHelper()
#24 0x7f1e9c0b84de views::View::PaintChildren()
#25 0x7f1e9c0b3cd1 views::View::Paint()
#26 0x7f1e9c0b86e0 views::View::RecursivePaintHelper()
#27 0x7f1e9c0b84de views::View::PaintChildren()
#28 0x7f1e9c0b3cd1 views::View::Paint()
#29 0x7f1e9c0b86e0 views::View::RecursivePaintHelper()
#30 0x7f1e9c0b84de views::View::PaintChildren()
#31 0x7f1e9c0b3cd1 views::View::Paint()
#32 0x7f1e9c0b959b views::View::PaintFromPaintRoot()
#33 0x7f1e9c0b94dd views::View::OnPaintLayer()
#34 0x7f1e9c931a5e ui::Layer::PaintContentsToDisplayList()
#35 0x7f1e9c931b99 ui::Layer::PaintContentsToDisplayList()
#36 0x7f1e9e1fcfc1 cc::PictureLayer::Update()
#37 0x7f1e9e48149d cc::LayerTreeHost::PaintContent()
#38 0x7f1e9e4806d0 cc::LayerTreeHost::DoUpdateLayers()
#39 0x7f1e9e47fa54 cc::LayerTreeHost::UpdateLayers()
#40 0x7f1e9e5be479 cc::SingleThreadProxy::DoPainting()
#41 0x7f1e9e5bf91d cc::SingleThreadProxy::BeginMainFrame()
#42 0x7f1e9e5c2127 base::internal::FunctorTraits<>::Invoke<>()
#43 0x7f1e9e5c2073 base::internal::InvokeHelper<>::MakeItSo<>()
#44 0x7f1e9e5c1fcd _ZN4base8internal7InvokerINS0_9BindStateIMN2cc17SingleThreadProxyEFvRKN3viz14BeginFrameArgsEEJNS_7WeakPtrIS4_EES6_EEEFvvEE7RunImplISA_NSt2Cr5tupleIJSC_S6_EEEJLm0ELm1EEEEvOT_OT0_NSH_16integer_sequenceImJXspT1_EEEE
#45 0x7f1e9e5c1f41 base::internal::Invoker<>::RunOnce()
#46 0x7f1eaf0d23b8 _ZNO4base12OnceCallbackIFvvEE3RunEv
#47 0x7f1eaf28d25a base::TaskAnnotator::RunTaskImpl()
#48 0x7f1eaf2e682b base::TaskAnnotator::RunTask<>()
#49 0x7f1eaf2e64d7 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#50 0x7f1eaf2e58d1 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#51 0x7f1eaf2e67a3 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#52 0x7f1eaf439567 base::MessagePumpLibevent::Run()
#53 0x7f1eaf2e6ea5 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#54 0x7f1eaf2025f2 base::RunLoop::Run()
#55 0x7f1e8cdd9e9c content::BrowserMainLoop::RunMainMessageLoop()
#56 0x7f1e8cde657b content::BrowserMainRunnerImpl::Run()
#57 0x7f1e8cdd5f62 content::BrowserMain()
#58 0x7f1e90421ffa content::RunBrowserProcessMain()
#59 0x7f1e90423d8e content::ContentMainRunnerImpl::RunBrowser()
#60 0x7f1e904235b6 content::ContentMainRunnerImpl::Run()
#61 0x7f1e904202ef content::RunContentProcess()
#62 0x7f1e904208eb content::ContentMain()
#63 0x561771bec8bb ChromeMain
#64 0x561771bec632 main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants