WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 83497
Replace numeric_limits<LayoutUnit>::min/max with constants
https://bugs.webkit.org/show_bug.cgi?id=83497
Summary
Replace numeric_limits<LayoutUnit>::min/max with constants
Emil A Eklund
Reported
2012-04-09 12:28:42 PDT
As came up in the original review of the FractionalLayoutUnit code we should not register numeric_limits for the FractionalLayoutUnit in the std namespace and instead use constants for the min/max value.
Attachments
Patch
(57.57 KB, patch)
2012-04-09 13:43 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Emil A Eklund
Comment 1
2012-04-09 13:43:45 PDT
Created
attachment 136298
[details]
Patch
Eric Seidel (no email)
Comment 2
2012-04-09 13:55:32 PDT
Comment on
attachment 136298
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=136298&action=review
> Source/WebCore/ChangeLog:10 > + Replace all uses of numeric_limits<LayoutUnit>::min/max with > + MIN_LAYOUT_UNIT and MAX_LAYOUT_UNIT respectively in preparation for the > + switch to subpixel layout.
Why does this make the switch easier?
Emil A Eklund
Comment 3
2012-04-09 14:01:18 PDT
(In reply to
comment #2
)
> (From update of
attachment 136298
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=136298&action=review
> > > Source/WebCore/ChangeLog:10 > > + Replace all uses of numeric_limits<LayoutUnit>::min/max with > > + MIN_LAYOUT_UNIT and MAX_LAYOUT_UNIT respectively in preparation for the > > + switch to subpixel layout. > > Why does this make the switch easier?
It allows us to use an abstraction to represent the min/max values for ints (for now) and FractionalLayoutUnits (after the switch). We originally planed to just leave it as is and define numeric_limits for FractionalLayoutUnit but that was shoot down during the initial review of FractionalLayoutUnit.h as it would involve declaring it in the std namespace.
Eric Seidel (no email)
Comment 4
2012-04-09 14:41:03 PDT
Comment on
attachment 136298
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=136298&action=review
>>> Source/WebCore/ChangeLog:10 >>> + switch to subpixel layout. >> >> Why does this make the switch easier? > > It allows us to use an abstraction to represent the min/max values for ints (for now) and FractionalLayoutUnits (after the switch). We originally planed to just leave it as is and define numeric_limits for FractionalLayoutUnit but that was shoot down during the initial review of FractionalLayoutUnit.h as it would involve declaring it in the std namespace.
OK. I think I might prefer LayoutUnit::maxValue and LayoutUnit::zeroValue, etc. But I understand that's impractical at this juncture.
Levi Weintraub
Comment 5
2012-04-09 14:43:01 PDT
(In reply to
comment #4
)
> (From update of
attachment 136298
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=136298&action=review
> > >>> Source/WebCore/ChangeLog:10 > >>> + switch to subpixel layout. > >> > >> Why does this make the switch easier? > > > > It allows us to use an abstraction to represent the min/max values for ints (for now) and FractionalLayoutUnits (after the switch). We originally planed to just leave it as is and define numeric_limits for FractionalLayoutUnit but that was shoot down during the initial review of FractionalLayoutUnit.h as it would involve declaring it in the std namespace. > > OK. > > I think I might prefer LayoutUnit::maxValue and LayoutUnit::zeroValue, etc. But I understand that's impractical at this juncture.
We have FractionalLayoutUnit::max and min, and would be happy to add a ::zero. That'll definitely be part of our cleanup pass once we've flipped the switch.
Emil A Eklund
Comment 6
2012-04-09 19:02:53 PDT
Comment on
attachment 136298
[details]
Patch Will do a cleanup pass once we've made the switch to make it LayoutUnit::max/min/zero as suggested.
WebKit Review Bot
Comment 7
2012-04-09 19:54:46 PDT
Comment on
attachment 136298
[details]
Patch Clearing flags on attachment: 136298 Committed
r113665
: <
http://trac.webkit.org/changeset/113665
>
WebKit Review Bot
Comment 8
2012-04-09 19:54:51 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug