Summary: | [css-grid] Grid placement conflict handling | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sergio Villar Senin <svillar> | ||||
Component: | Layout and Rendering | Assignee: | Sergio Villar Senin <svillar> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, commit-queue, darin, esprehn+autocc, glenn, jfernandez, kling, kondapallykalyan, rego, svillar | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 60731 | ||||||
Attachments: |
|
Description
Sergio Villar Senin
2015-11-04 04:31:39 PST
Created attachment 264865 [details]
Patch
Comment on attachment 264865 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264865&action=review > Source/WebCore/rendering/style/GridResolvedPosition.cpp:300 > + m_integerPosition = isStartSide(side) ? integerPosition : std::max<int>(0, integerPosition - 1); This conversion to int and back to unsigned is not a clean way to clamp at zero? I suggest instead we write: if (!isStartSide(side) && integerPosition) --integerPosition; m_integerPosition = integerPosition; > Source/WebCore/rendering/style/GridResolvedPosition.h:138 > + return std::max<int>(m_integerPosition - 1, 0); Same issue here with converting to and from int. I would instead write: return m_integerPosition ? m_integerPosition - 1 : 0; Committed r192153: <http://trac.webkit.org/changeset/192153> |