Convert position:sticky to position:static upon copy and paste
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Feb 2014 19:32:54 +0000 (19:32 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Feb 2014 19:32:54 +0000 (19:32 +0000)
commit8abe1c3214784e989a11f3bba9913982b916c362
tree335f027ca56a494a51208afcf917bb5011735782
parent4a420ee47acf324a7d88f5222fe6e8d422ac8987
Convert position:sticky to position:static upon copy and paste
https://bugs.webkit.org/show_bug.cgi?id=128982

Reviewed by NOBODY (OOPS!).

Source/WebCore:

This patch has two parts:

1. Make sure that position:absolute elements trigger the position:relative wrapping (as
well as position:fixed)
2. Now that we copy position:sticky, convert that to position:fixed

Tests: editing/pasteboard/copy-paste-converts-fixed.html
       editing/pasteboard/copy-paste-converts-sticky.html
       editing/pasteboard/copy-paste-wraps-position-absolute.html

* editing/EditingStyle.cpp:
(WebCore::EditingStyle::convertFixedAndStickyPosition):

LayoutTests:

* editing/pasteboard/copy-paste-converts-fixed-expected.txt: Copied from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed-expected.txt.
* editing/pasteboard/copy-paste-converts-fixed.html: Copied from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed.html.
* editing/pasteboard/copy-paste-converts-sticky-expected.txt: Copied from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed-expected.txt.
* editing/pasteboard/copy-paste-converts-sticky.html: Copied from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed.html.
* editing/pasteboard/copy-paste-wraps-position-absolute-expected.txt: Renamed from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed-expected.txt.
* editing/pasteboard/copy-paste-wraps-position-absolute.html: Renamed from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/copy-paste-converts-fixed-expected.txt [moved from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed-expected.txt with 78% similarity]
LayoutTests/editing/pasteboard/copy-paste-converts-fixed.html [moved from LayoutTests/editing/pasteboard/copy-paste-converts-sticky-and-fixed.html with 80% similarity]
LayoutTests/editing/pasteboard/copy-paste-converts-sticky-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/copy-paste-converts-sticky.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/copy-paste-wraps-position-absolute-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/copy-paste-wraps-position-absolute.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/EditingStyle.cpp