Source/WebCore:
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2016 16:08:04 +0000 (16:08 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2016 16:08:04 +0000 (16:08 +0000)
commit7ab2f51cec62ad1c09510b5f66da0a4956774d72
treefe3885d51a8dab27285bc943a90eb368197dad20
parent30528340cd622bcf20e35e9817e8677e10636e68
Source/WebCore:
REGRESSION (r198990): Cannot edit content inside <details> in wysiwyg editor
https://bugs.webkit.org/show_bug.cgi?id=165757

Reviewed by Andreas Kling.

Test: fast/html/details-edit.html

-webkit-user-modify is reset on shadow boundary so it doesn't go through <details> shadow tree.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
* dom/Node.cpp:
(WebCore::computeEditabilityFromComputedStyle):
(WebCore::Node::computeEditability):

    Make -webkit-user-modify (which we would want to get rid of completely eventually) have no effect in shadow trees.
    Check for contenteditable directly instead.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createInnerTextStyle):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::createInnerTextStyle):
* html/shadow/TextControlInnerElements.cpp:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::createFlowThreadStyle):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::styleDidChange):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::createAnonymousStyleWithDisplay):
(WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
(WebCore::RenderStyle::inheritFrom):

    Let -webkit-user-modify inherit through shadow boundary as normal.

* rendering/style/RenderStyle.h:

LayoutTests:
REGRESSION (r198990): Safari - Cannot edit content inside <details> in wysiwyg editor
https://bugs.webkit.org/show_bug.cgi?id=165757

Reviewed by Andreas Kling.

* editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt:
* fast/html/details-edit-expected.txt: Added.
* fast/html/details-edit.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt
LayoutTests/fast/html/details-edit-expected.txt [new file with mode: 0644]
LayoutTests/fast/html/details-edit.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h