Skip to content

refactor(core): use flags in Renderer2.setStye instead of booleans - #15045

Merged
chuckjaz merged 1 commit into
angular:masterfrom
tbosch:fix_renderer_style
Mar 13, 2017
Merged

chuckjaz merged 1 commit into
angular:masterfrom
tbosch:fix_renderer_style

Conversation

@tbosch

@tbosch tbosch commented Mar 9, 2017

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: (since v4 rc.1)

  • Renderer2.setStyle no longer takes booleans but rather a
    bit mask of flags.

@tbosch
tbosch requested a review from vicb March 9, 2017 19:13

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is flags & RendererStyleFlags2.DashCase much faster than hasVendorPrefix || hasImportant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. But it's simpler to just have one argument than 2, especially if they are booleans (the call site reads much nicer...). Also its simpler to add more of these flags, as we don't need to change Renderer classes that just delegate (e.g. the AnimationRenderer, ...)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the clarification

@tbosch
tbosch requested a review from IgorMinar March 9, 2017 19:55

@IgorMinar IgorMinar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for api changes

@tbosch
tbosch force-pushed the fix_renderer_style branch from 250a930 to 5a0f55e Compare March 10, 2017 21:43
BREAKING CHANGE: (since v4 rc.1)
- `Renderer2.setStyle` no longer takes booleans but rather a
  bit mask of flags.
@tbosch
tbosch force-pushed the fix_renderer_style branch from 5a0f55e to fd026a5 Compare March 10, 2017 22:59
@chuckjaz
chuckjaz merged commit ff71eff into angular:master Mar 13, 2017
@tbosch
tbosch deleted the fix_renderer_style branch March 17, 2017 15:28
sis0k0 added a commit to NativeScript/nativescript-angular that referenced this pull request Mar 20, 2017
sis0k0 added a commit to NativeScript/nativescript-angular that referenced this pull request Mar 20, 2017
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
…angular#15045)

BREAKING CHANGE: (since v4 rc.1)
- `Renderer2.setStyle` no longer takes booleans but rather a
  bit mask of flags.
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
…angular#15045)

BREAKING CHANGE: (since v4 rc.1)
- `Renderer2.setStyle` no longer takes booleans but rather a
  bit mask of flags.
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants