[Webkit-unassigned] [Bug 248432] Remove non-standard: overflow: -webkit-paged-* (x|y)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jul 22 04:35:59 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=248432
--- Comment #8 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
Local Page:
>> Source/WebCore/rendering/style/RenderStyleConstants.h
Line 273 & 274: enum class Overflow : uint8_t
Remove 'PagedX' and 'PagedY'
>> Source/WebCore/style/StyleAdjuster.cpp:
Remove following FIXME:
// FIXME: Once we implement pagination controls, overflow-x should default to hidden
// if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, we'll let it
// default to auto so we can at least scroll through the pages.
and following:
// Call setStylesForPaginationMode() if a pagination mode is set for any non-root elements. If these
// styles are specified on a root element, then they will be incorporated in
// Style::createForm_document.
if ((style.overflowY() == Overflow::PagedX || style.overflowY() == Overflow::PagedY) && !(m_element && (m_element->hasTagName(htmlTag) || m_element->hasTagName(bodyTag))))
style.setColumnStylesFromPaginationMode(WebCore::paginationModeForRenderStyle(style));
>> Source/WebCore/rendering/style/RenderStyleConstants.cpp:
In 'TextStream& operator<<(TextStream& ts, Overflow overflow)'
Remove case Overflow::PagedX: and case Overflow::PagedY:
>> Source/WebCore/rendering/RenderBlockFlow.cpp
In 'RenderBlockFlow::willCreateColumns', delete following:
// If overflow-y is set to paged-x or paged-y on the body or html element, we'll handle the paginating in the RenderView instead.
if ((style().overflowY() == Overflow::PagedX || style().overflowY() == Overflow::PagedY) && !(isDocumentElementRenderer() || isBody()))
return true;
>> Source/WebCore/page/LocalFrameView.h:
Delete 'Pagination::Mode paginationModeForRenderStyle'
>> Source/WebCore/page/LocalFrameView.cpp:
Delete 'Pagination::Mode paginationModeForRenderStyle'
and following comment:
'Don't set it at all. Values of Overflow::PagedX and Overflow::PagedY are handled by applyPaginationToViewPort().'
and in LocalFrameView::applyPaginationToViewport(), change it to this (* Not sure on this one *):
void LocalFrameView::applyPaginationToViewport()
{
auto* document = m_frame->document();
auto* documentElement = document ? document->documentElement() : nullptr;
if (!documentElement || !documentElement->renderer()) {
setPagination(Pagination());
return;
}
Pagination pagination;
setPagination(pagination);
}
>> Source/WebCore/css/parser/CSSPropertyParser.cpp:
In 'CSSPropertyParser::consumeOverflowShorthand': Delete following:
// FIXME: -webkit-paged-x or -webkit-paged-y only apply to overflow-y. If this value has been
// set using the shorthand, then for now overflow-x will default to auto, but once we implement
// pagination controls, it should default to hidden. If the overflow-y value is anything but
// paged-x or paged-y, then overflow-x and overflow-y should have the same value.
if (xValueID == CSSValueWebkitPagedX || xValueID == CSSValueWebkitPagedY)
xValueID = CSSValueAuto;
>> Source/WebCore/css/CSSValueKeywords.in:
Delete following:
// overflow
-webkit-paged-x
-webkit-paged-y
>> Source/WebCore/css/CSSProperties.json:
Delete following:
},
{
"value": "-webkit-paged-x",
"status": "non-standard"
},
{
"value": "-webkit-paged-y",
"status": "non-standard"
>> Source/WebCore/css/CSSPrimitiveValueMappings.h:
In 'constexpr CSSValueID toCSSValueID(Overflow e)': Delete following cases: 'case Overflow::PagedX:' and 'case Overflow::PagedY:'
In 'template<> constexpr Overflow fromCSSValueID(CSSValueID valueID)': Delete following cases: 'case CSSValueWebkitPagedX:' and 'case CSSValueWebkitPagedY:'
_____________
Just wanted to document for someone else to try locally.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230722/6b9a80fe/attachment-0001.htm>
More information about the webkit-unassigned
mailing list