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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)

Created:
4 years ago by sashab
Modified:
4 years ago
CC:
aboxhall+watch_chromium.org, aboxhall, ajuma+watch_chromium.org, ajuma+watch-canvas_chromium.org, darktears, apavlov+blink_chromium.org, atotic+reviews_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-css, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, Rik, cbiesinger, chromium-reviews, danakj+watch_chromium.org, dcheng, dglazkov+blink, dmazzoni, dmazzoni+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, dtseng+watch_chromium.org, eae+blinkwatch, eric.carlson_apple.com, f(malita), fs, glebl+reviews_chromium.org, gasubic, gyuyoung2, jbroman, jchaffraix+rendering, je_julie, Justin Novosad, kinuko+watch, kouhei+svg_chromium.org, leviw+bidiwatch_chromium.org, leviw+renderwatch, napper, nektar+watch_chromium.org, nektarios, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, pdr+graphicswatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, nessy, szager+layoutwatch_chromium.org, vcarbune.chromium, yuzo+watch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Changed TextDirection to an enum class and renamed its members Changed TextDirection to an enum class and gave it an unsigned underlying type. Also renamed its members to use proper CamelCase instead of all-caps. Changing it to an enum class enforces better namespacing and code practices. Adding the unsigned underlying type is pre-work for when the class is eventually stored as an enum bitfield (it would be done in this patch, except a presubmit warning already exists that prevents that. The presubmit warning needs to be updated before that change can occur.) Unlike the other enums in ComputedStyleBase, TextDirection will not be generated. Instead, the enum from platform/ will be included and used. This patch has no logic changes -- only renames, braces added to long if-statements, static_casts to unsigned where the old enum type was implicitly converted, and ASSERTs changed to DCHECKs. BUG=628043 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/6ed7bd96eb762abd8c2ea7821ee5ec9d5948a592 Cr-Commit-Position: refs/heads/master@{#440043}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 2

Patch Set 3 : Small rebase fixes #

Total comments: 6

Patch Set 4 : Review feedback #

Patch Set 5 : Added 2 changes in mac files #

Total comments: 2

Patch Set 6 : Rebase #

Patch Set 7 : One more tiny fix #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase after reopen #

Unified diffs Side-by-side diffs Delta from patch set Stats (+493 lines, -407 lines) Patch
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperty.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionModifier.cpp View 11 chunks +21 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnits.cpp View 16 chunks +33 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp View 1 chunk +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/TextControlElement.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/RadioInputType.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/RangeInputType.cpp View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/HitTestResult.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp View 1 2 3 4 5 6 7 4 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutReplaced.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutText.cpp View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextTest.cpp View 1 2 3 3 chunks +11 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutThemeMac.mm View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/TextAutosizer.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/TextRunConstructor.cpp View 1 2 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp View 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineBox.h View 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineIterator.h View 1 2 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 1 2 3 4 5 6 7 8 16 chunks +19 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc View 6 chunks +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc View 1 2 3 4 5 6 7 8 8 chunks +29 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder_test.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_units.cc View 1 2 3 4 5 6 7 4 chunks +12 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_units_test.cc View 1 2 3 4 5 6 7 2 chunks +27 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.cpp View 1 2 3 4 5 6 7 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp View 3 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ThemePainterMac.mm View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/DragImage.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebTextRun.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp View 8 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h View 2 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp View 1 2 11 chunks +29 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/platform/text/BidiCharacterRun.h View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/text/BidiResolver.h View 7 chunks +16 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/text/BidiResolverTest.cpp View 3 chunks +32 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/platform/text/BidiTextRun.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/text/Character.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/text/TextDirection.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/text/TextRun.h View 7 chunks +11 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/web/ExternalPopupMenu.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/PopupMenuImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebTextDirection.h View 1 chunk +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 59 (43 generated)
sashab
Hi haraken, Sorry this is a huge patch -- as discussed, this changes TextDirection to ...
4 years ago (2016-12-07 01:59:43 UTC) #9
haraken
LGTM
4 years ago (2016-12-07 02:08:41 UTC) #10
sashab
9 minutes to review an 800 line patch, I like it! :D napper@ for follow-up ...
4 years ago (2016-12-07 02:11:08 UTC) #12
napper
lgtm https://codereview.chromium.org/2555923002/diff/40001/third_party/WebKit/Source/core/layout/LayoutText.cpp File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): https://codereview.chromium.org/2555923002/diff/40001/third_party/WebKit/Source/core/layout/LayoutText.cpp#newcode1200 third_party/WebKit/Source/core/layout/LayoutText.cpp:1200: unsigned textDirectionIndex = static_cast<unsigned>(textDirection); const unsigned textDirectionIndex = ...
4 years ago (2016-12-07 05:27:13 UTC) #19
sashab
Thanks napper :) The mac bots were failing so I added 2 more files to ...
4 years ago (2016-12-07 05:40:26 UTC) #22
napper
lgtm
4 years ago (2016-12-07 05:45:26 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2555923002/120001
4 years ago (2016-12-07 23:12:24 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/81653)
4 years ago (2016-12-08 00:56:28 UTC) #34
sashab
Napper/haraken: Decided not to land this, since I'd rather move towards a ComputedStyle object that ...
4 years ago (2016-12-08 23:59:05 UTC) #39
sashab
Re-opening this - decided to support using platform/ enums without mapping methods after all :) ...
4 years ago (2016-12-21 03:28:34 UTC) #40
sashab
Alancutter@ - I rebased the previous patch and fixed a few minor conflicts. PTAQL and ...
4 years ago (2016-12-21 03:42:36 UTC) #42
alancutter (OOO until 2018)
lgtm
4 years ago (2016-12-21 04:23:06 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2555923002/160001
4 years ago (2016-12-21 04:27:51 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2555923002/160001
4 years ago (2016-12-21 05:30:46 UTC) #54
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-12-21 06:25:23 UTC) #57
commit-bot: I haz the power
4 years ago (2016-12-21 06:27:30 UTC) #59
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/6ed7bd96eb762abd8c2ea7821ee5ec9d5948a592
Cr-Commit-Position: refs/heads/master@{#440043}

Powered by Google App Engine
This is Rietveld 408576698