WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
89075
[Shadow][Editing] Selection will break editing boundaries in Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=89075
Summary
[Shadow][Editing] Selection will break editing boundaries in Shadow DOM.
Shinya Kawanaka
Reported
2012-06-14 01:42:18 PDT
Created
attachment 147515
[details]
Repro Select from inside of <span contenteditable>hoge</span> to table.
Attachments
Repro
(335 bytes, text/html)
2012-06-14 01:42 PDT
,
Shinya Kawanaka
no flags
Details
Patch
(9.23 KB, patch)
2012-06-20 14:02 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Shinya Kawanaka
Comment 1
2012-06-14 01:44:02 PDT
Try selection twice. The first selection won't break the boundary... I don't know why.
Shinya Kawanaka
Comment 2
2012-06-19 17:43:25 PDT
I and rniwa investigated this issue. The problem will be m_style->inheritFrom() in StyleResolver::applyMatchedProperty(). Actually inheritFrom() does not copy "-webkit-user-modify" (i.e. contenteditable) if the element is on the shadow boundary (element's host is ShadowRoot). Maybe inheritFrom() is abused in various places to copy inherit values... We should create another function copyFrom() for the purpose.
Shinya Kawanaka
Comment 3
2012-06-19 18:30:39 PDT
Actually this bug seems caused by the patch for
Bug 88514
.
Bug 88514
test case will be failed if I made a patch like the last comment... I should investigate this more..., but it seems I'm moving forward.
Shinya Kawanaka
Comment 4
2012-06-20 14:02:45 PDT
Created
attachment 148650
[details]
Patch
Ryosuke Niwa
Comment 5
2012-06-20 14:33:12 PDT
Comment on
attachment 148650
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148650&action=review
> Source/WebCore/css/StyleResolver.cpp:2952 > - if (m_parentStyle->inheritedDataShared(cacheItem->parentRenderStyle.get())) { > + if (m_parentStyle->inheritedDataShared(cacheItem->parentRenderStyle.get()) && !isAtShadowBoundary(element)) {
I see. The problem is that the parent renderer is the shadow host so we're tricked to think that this element's style matches that of a "light" child of the shadow host (outside of the shadow DOM). This patch looks right but probably needs kling or antti's blessing.
WebKit Review Bot
Comment 6
2012-06-20 17:11:01 PDT
Comment on
attachment 148650
[details]
Patch Clearing flags on attachment: 148650 Committed
r120887
: <
http://trac.webkit.org/changeset/120887
>
WebKit Review Bot
Comment 7
2012-06-20 17:11:08 PDT
All reviewed patches have been landed. Closing bug.
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