WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-90017-20121015154936.patch (text/plain), 5.44 KB, created by
Takashi Sakamoto
on 2012-10-14 23:50:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Takashi Sakamoto
Created:
2012-10-14 23:50:45 PDT
Size:
5.44 KB
patch
obsolete
>Subversion Revision: 131283 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8535836b9d8743ad0b05318acb7972a8d47d7496..55ccd9122d4370240e59efce2cb4628ed33383a6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2012-08-29 Takashi Sakamoto <tasak@google.com> >+ >+ [Meta] [Shadow] contenteditable attribute for distributed nodes. >+ https://bugs.webkit.org/show_bug.cgi?id=90017 >+ >+ Reviewed by Dimitri Glazkov. >+ >+ If an element is distributed to an insertion point, the element's >+ webkit-user-modify is inherited from its shadow host. >+ >+ No new tests, because the existing test: user-modify-inheritance.html >+ covers this change. >+ >+ * css/StyleResolver.cpp: >+ (WebCore::StyleResolver::styleForElement): >+ After an element inherits a style from its parent, override user-modify >+ by using the shadow host's style if the element is distributed. >+ > 2012-10-14 Sam Weinig <sam@webkit.org> > > Simplify user content in WebKit2 by using WebCore::UserStyleSheet and WebCore::UserScript directly >diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp >index 00ed250e352184cd50002c687ee4329ee1a9a812..f0ab297fa4daf352e8b34ad04782255f9dabd998 100644 >--- a/Source/WebCore/css/StyleResolver.cpp >+++ b/Source/WebCore/css/StyleResolver.cpp >@@ -1540,6 +1540,13 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS > cloneForParent = RenderStyle::clone(style()); > m_parentStyle = cloneForParent.get(); > } >+ // contenteditable attribute (implemented by -webkit-user-modify) should >+ // be propagated from shadow host to distributed node. >+ if (m_distributedToInsertionPoint) { >+ ASSERT(element->parentElement()); >+ ASSERT(element->parentElement()->renderStyle()); >+ m_style->setUserModify(element->parentElement()->renderStyle()->userModify()); >+ } > > if (element->isLink()) { > m_style->setIsLink(true); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f3106c5bb97b166ba659b818a2e6450284c008e0..1630f0dc40258aaee10a1f3f678cd5ec0f368a62 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2012-08-29 Takashi Sakamoto <tasak@google.com> >+ >+ [Meta] [Shadow] contenteditable attribute for distributed nodes. >+ https://bugs.webkit.org/show_bug.cgi?id=90017 >+ >+ Reviewed by Dimitri Glazkov. >+ >+ * fast/dom/shadow/user-modify-inheritance-expected.txt: >+ * fast/dom/shadow/user-modify-inheritance.html: >+ > 2012-10-14 Jon Lee <jonlee@apple.com> > > Allow notification origin permission request when no js callback is provided >diff --git a/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt b/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt >index 7af24c9db5002726da844ba7cfc163dce728bdc4..8b83372af619124ef2b03e8dfa9ceb551ebae93e 100644 >--- a/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt >+++ b/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt >@@ -10,7 +10,9 @@ PASS computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contente > PASS computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host2"), "false"), userModifyPropertyName) is "read-only" > PASS computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host3"), "true"), userModifyPropertyName) is "read-write" > PASS getUserModifyProperty("child-a") is "read-write" >-FAIL getUserModifyProperty("child-b") should be read-write. Was read-only. >+PASS getUserModifyProperty("child-b") is "read-write" >+PASS getUserModifyProperty("child-c") is "read-only" >+PASS getUserModifyProperty("child-d") is "read-only" > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/shadow/user-modify-inheritance.html b/LayoutTests/fast/dom/shadow/user-modify-inheritance.html >index b449335fec004e4095da31b75147cc1877f64906..c49637384f21e773306d484d8ab7b1cb37385b6f 100644 >--- a/LayoutTests/fast/dom/shadow/user-modify-inheritance.html >+++ b/LayoutTests/fast/dom/shadow/user-modify-inheritance.html >@@ -13,6 +13,7 @@ > <div id="non-contenteditable-host2"></div> > <div id="non-contenteditable-host3"></div> > <div id="sandbox"></div> >+<div id="sandbox2"></div> > <pre id="console"></pre> > <script> > description("Tests to ensure that a '-webkit-user-modify' CSS porperty is not inherited across shadow boundaries."); >@@ -62,9 +63,19 @@ document.getElementById('sandbox').appendChild( > document.body.offsetLeft; > > shouldBeEqualToString('getUserModifyProperty("child-a")', 'read-write'); >-/* FIXME(90017): css property: -user-modify should be inherited from parent.*/ > shouldBeEqualToString('getUserModifyProperty("child-b")', 'read-write'); > >+document.getElementById('sandbox2').appendChild( >+ createDOM('div', {'id': 'host', 'contenteditable': 'false'}, >+ createShadowRoot(createDOM('content', {'select': '#child-c'}), >+ createDOM('div', {'contenteditable' : 'true'}, >+ createDOM('content', {'select': '#child-d'}))), >+ createDOM('div', {'id': 'child-c'}), >+ createDOM('div', {'id': 'child-d'}))); >+ >+shouldBeEqualToString('getUserModifyProperty("child-c")', 'read-only'); >+shouldBeEqualToString('getUserModifyProperty("child-d")', 'read-only'); >+ > </script> > <script src="../../js/resources/js-test-post.js"></script> > </body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 90017
:
161419
|
161609
| 168633