Count usage of min/max/clamp in <length-percentage> values
This patch plumbs CSSParserContext into ConsumeLengthOrPercent(), so that we can count usage of CSS comparison functions min/max/clamp when they are used in <length-percentage> values. There are three types of code paths, which are handled differently: 1. A caller takes the CSSParserMode from a CSSParserContext, and passes it through. We change it to pass the CSSParserContext directly. 2. A caller has a CSSParserContext, but passes a possibly different CSSParserMode. We change it to temporarily override the CSSParserMode of the current context. 3. A caller doesn't necessarily has a CSSParserContext, and passes a CSSParserMode. We change it to pass a newly created CSSParserContext with the underlying document and the CSSParserMode. Bug: 1047784 Change-Id: Iabc5bff859ff2dc302ee2eb9f0b3398f5a1952be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033892Reviewed-by:Rune Lillesveen <futhark@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#739408}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment