Commit 04196014 authored by Nico Weber's avatar Nico Weber

Remaining tricky bits to build webkit_unit_tests with -Wimplicit-fallthrough.

Follow-up to https://chromium-review.googlesource.com/c/889942/

Also update a very old comment that I believe tries to say that the fallthrough
is intentional: In https://websvn.kde.org/trunk/kdelibs/khtml/rendering/bidi.cpp?r1=56133&r2=56134&pathrev=65933
the code and comment looked like so:

    switch(dirCurrent) {
      ...
      case QChar::DirEN:
        if(status.lastStrong != QChar::DirAL) {
          // if last strong was AL change EN to AN
          ...
        }
      case QChar::DirAN:
        dirCurrent = QChar::DirAN;
        ...

All the constants have been renamed several times, but the comment was touched just once
after being added in https://websvn.kde.org/trunk/kdelibs/khtml/rendering/bidi.cpp?limit_changes=0&view=markup&pathrev=42417
in Mar 2000 (in a commit saying "merge of the new_rendering branch." -- I couldn't find
where the new_rendering branch is. Probably in some CVS repo, but I didn't manage to find it)
and that's in 56134 linked above, which changed it from

    // if last strong was AL change EN to AL

to

    // if last strong was AL change EN to AN

which looks like a typo fix.

This CL was uploaded by git cl split.

R=fmalita@chromium.org

Bug: 177475
Change-Id: I55de0202f9a67436a4abb630291d1280ee489d4d
Reviewed-on: https://chromium-review.googlesource.com/890430
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532979}
parent 58ab87ff
...@@ -1002,8 +1002,9 @@ void BidiResolver<Iterator, Run, IsolatedRun>::CreateBidiRunsForLine( ...@@ -1002,8 +1002,9 @@ void BidiResolver<Iterator, Run, IsolatedRun>::CreateBidiRunsForLine(
// weak types: // weak types:
case WTF::Unicode::kEuropeanNumber: case WTF::Unicode::kEuropeanNumber:
// If last_strong is kRightToLeftArabic, change kEuropeanNumber to
// kArabicNumber by falling through after this if.
if (status_.last_strong != WTF::Unicode::kRightToLeftArabic) { if (status_.last_strong != WTF::Unicode::kRightToLeftArabic) {
// if last strong was AL change EN to AN
switch (status_.last) { switch (status_.last) {
case WTF::Unicode::kEuropeanNumber: case WTF::Unicode::kEuropeanNumber:
case WTF::Unicode::kLeftToRight: case WTF::Unicode::kLeftToRight:
...@@ -1074,6 +1075,7 @@ void BidiResolver<Iterator, Run, IsolatedRun>::CreateBidiRunsForLine( ...@@ -1074,6 +1075,7 @@ void BidiResolver<Iterator, Run, IsolatedRun>::CreateBidiRunsForLine(
direction_ = WTF::Unicode::kLeftToRight; direction_ = WTF::Unicode::kLeftToRight;
break; break;
} }
FALLTHROUGH;
case WTF::Unicode::kArabicNumber: case WTF::Unicode::kArabicNumber:
dir_current = WTF::Unicode::kArabicNumber; dir_current = WTF::Unicode::kArabicNumber;
switch (status_.last) { switch (status_.last) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment