Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1211)

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed)

Created:
6 years, 6 months ago by davve
Modified:
5 years, 6 months ago
Reviewers:
esprehn
CC:
aandrey+blink_chromium.org, apavlov+blink_chromium.org, blink-reviews, blink-reviews-rendering, caseq+blink_chromium.org, cbiesinger, devtools-reviews_chromium.org, eae+blinkwatch, eustas+blink_chromium.org, jchaffraix+rendering, leviw+renderwatch, loislo+blink_chromium.org, lushnikov+blink_chromium.org, malch+blink_chromium.org, paulirish+reviews_chromium.org, pdr., pfeldman+blink_chromium.org, rune+blink, sergeyv+blink_chromium.org, vsevik+blink_chromium.org, yurys+blink_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Change RenderObject::style(bool) to accept an enum instead The rationale is that passing an enum is clearer in intent.

Patch Set 1 #

Patch Set 2 : Make type name explicit and try to reduce code churn #

Patch Set 3 : Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -95 lines) Patch
M Source/core/rendering/InlineBox.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/InlineBox.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/InlineFlowBox.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBR.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBR.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 7 chunks +10 lines, -11 lines 0 comments Download
M Source/core/rendering/RenderBlockLineLayout.cpp View 1 2 7 chunks +7 lines, -7 lines 0 comments Download
M Source/core/rendering/RenderBox.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderButton.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderButton.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderDeprecatedFlexibleBox.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderFileUploadControl.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderFlexibleBox.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderFlexibleBox.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderInline.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderInline.cpp View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderListBox.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderListBox.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderListMarker.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderListMarker.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderMenuList.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderObjectInlines.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderRubyRun.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/rendering/RenderSlider.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderSlider.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTable.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTable.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderText.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderText.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTextControl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTextControl.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTextControlMultiLine.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTextControlMultiLine.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTextControlSingleLine.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RootInlineBox.cpp View 1 2 3 chunks +11 lines, -11 lines 0 comments Download
M Source/core/rendering/line/BreakingContextInlineHeaders.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/line/LineWidth.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
davve
Here's the POC of using a enum instead of style(bool). Take a look when you ...
6 years, 6 months ago (2014-06-26 15:24:11 UTC) #1
esprehn
This lgtm, the names are a little silly, but at least it's clear now. :)
6 years, 6 months ago (2014-06-27 08:12:54 UTC) #2
davve
On 2014/06/27 08:12:54, esprehn wrote: > This lgtm, the names are a little silly, but ...
6 years, 5 months ago (2014-06-30 10:13:40 UTC) #3
davve
6 years, 5 months ago (2014-07-04 08:17:58 UTC) #4
I've now tried to decrease name silliness with one by renaming
OwnStyleOrFirstLineStyle to OwnOrFirstLineStyle. I also removed the double state
on the stack in RootInlineBox::verticalPositionForBox(). Still lots of code
churn for relatively little gain, so I'm not very confident about landing it.

Powered by Google App Engine
This is Rietveld 408576698