RESOLVED FIXED Bug 128688
During a copy, position:fixed gets converted to position:absolute even if only part of the document is selected
https://bugs.webkit.org/show_bug.cgi?id=128688
Summary During a copy, position:fixed gets converted to position:absolute even if onl...
Myles C. Maxfield
Reported 2014-02-12 14:05:30 PST
During a copy, position:fixed gets converted to position:absolute even if only part of the document is selected
Attachments
Patch (24.19 KB, patch)
2014-02-12 14:13 PST, Myles C. Maxfield
rniwa: review+
Myles C. Maxfield
Comment 1 2014-02-12 14:13:29 PST
Ryosuke Niwa
Comment 2 2014-02-12 14:16:36 PST
Comment on attachment 224005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224005&action=review > Source/WebCore/editing/markup.cpp:627 > - if (accumulator.needRelativeStyleWrapper() && body && fullySelectedRoot == body) { > + if (accumulator.needRelativeStyleWrapper() && needsPositionStyleConversion) { I don't think we should do this. This would result in another round of Apple-style-span nightmare.
Ryosuke Niwa
Comment 3 2014-02-12 14:55:06 PST
Comment on attachment 224005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224005&action=review > Source/WebCore/editing/markup.cpp:328 > + if (m_needsPositionStyleConversion && element.document().settings() && element.document().settings()->shouldConvertPositionStyleOnCopy()) > m_needRelativeStyleWrapper |= newInlineStyle->convertFixedAndStickyPosition(); This is actually broken because convertFixedAndStickyPosition doesn't adjust coordinates with respect to the wrapping div's. r-.
Ryosuke Niwa
Comment 4 2014-02-12 15:52:10 PST
Comment on attachment 224005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224005&action=review >> Source/WebCore/editing/markup.cpp:328 >> m_needRelativeStyleWrapper |= newInlineStyle->convertFixedAndStickyPosition(); > > This is actually broken because convertFixedAndStickyPosition doesn't adjust coordinates with respect to the wrapping div's. r-. Oh oops, I completely misunderstood this patch :( I think we should check settings in createMarkupInternal though. > Source/WebCore/editing/markup.cpp:570 > + bool needsPositionStyleConversion = body && fullySelectedRoot == body; We don't need this separate boolean because fullySelectedRoot can only ever set to body. >> Source/WebCore/editing/markup.cpp:627 >> + if (accumulator.needRelativeStyleWrapper() && needsPositionStyleConversion) { > > I don't think we should do this. This would result in another round of Apple-style-span nightmare. Ignore this comment.
Myles C. Maxfield
Comment 5 2014-02-13 12:31:24 PST
Comment on attachment 224005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224005&action=review >> Source/WebCore/editing/markup.cpp:570 >> + bool needsPositionStyleConversion = body && fullySelectedRoot == body; > > We don't need this separate boolean because fullySelectedRoot can only ever set to body. I'm going to keep the separate boolean because it gets read twice, and it is conceptually different than the comparison that it gets set to
Myles C. Maxfield
Comment 6 2014-02-13 13:48:34 PST
Comment on attachment 224005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224005&action=review >>> Source/WebCore/editing/markup.cpp:328 >>> m_needRelativeStyleWrapper |= newInlineStyle->convertFixedAndStickyPosition(); >> >> This is actually broken because convertFixedAndStickyPosition doesn't adjust coordinates with respect to the wrapping div's. r-. > > Oh oops, I completely misunderstood this patch :( > > I think we should check settings in createMarkupInternal though. Done.
Myles C. Maxfield
Comment 7 2014-02-13 13:52:29 PST
Radar WebKit Bug Importer
Comment 8 2014-02-24 18:42:26 PST
Note You need to log in before you can comment on or make changes to this bug.