Changeset 98598 in webkit


Ignore:
Timestamp:
Oct 27, 2011, 10:24:49 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r98556.
http://trac.webkit.org/changeset/98556
https://bugs.webkit.org/show_bug.cgi?id=71031

The test added by the patch doesn't pass on Snow Leopard
(Requested by rniwa on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-10-27

.:

  • Source/autotools/symbols.filter:

Source/WebCore:

  • editing/TextCheckingHelper.cpp:

(WebCore::checkTextOfParagraph):

  • testing/Internals.cpp:
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

  • win/WebKit2.def:
  • win/WebKit2CFLite.def:

LayoutTests:

  • editing/spelling/spelling-unified-emulation-expected.txt: Removed.
  • editing/spelling/spelling-unified-emulation.html: Removed.
Location:
trunk
Files:
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r98556 r98598  
     12011-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r98556.
     4        http://trac.webkit.org/changeset/98556
     5        https://bugs.webkit.org/show_bug.cgi?id=71031
     6
     7        The test added by the patch doesn't pass on Snow Leopard
     8        (Requested by rniwa on #webkit).
     9
     10        * Source/autotools/symbols.filter:
     11
    1122011-10-27  Shinya Kawanaka  <shinyak@google.com>
    213
  • trunk/LayoutTests/ChangeLog

    r98597 r98598  
     12011-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r98556.
     4        http://trac.webkit.org/changeset/98556
     5        https://bugs.webkit.org/show_bug.cgi?id=71031
     6
     7        The test added by the patch doesn't pass on Snow Leopard
     8        (Requested by rniwa on #webkit).
     9
     10        * editing/spelling/spelling-unified-emulation-expected.txt: Removed.
     11        * editing/spelling/spelling-unified-emulation.html: Removed.
     12
    1132011-10-27  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r98596 r98598  
     12011-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r98556.
     4        http://trac.webkit.org/changeset/98556
     5        https://bugs.webkit.org/show_bug.cgi?id=71031
     6
     7        The test added by the patch doesn't pass on Snow Leopard
     8        (Requested by rniwa on #webkit).
     9
     10        * editing/TextCheckingHelper.cpp:
     11        (WebCore::checkTextOfParagraph):
     12        * testing/Internals.cpp:
     13        * testing/Internals.h:
     14        * testing/Internals.idl:
     15
    1162011-10-27  Mike Reed  <reed@google.com>
    217
  • trunk/Source/WebCore/editing/TextCheckingHelper.cpp

    r98556 r98598  
    3333#include "Range.h"
    3434#include "Settings.h"
    35 #include "TextBreakIterator.h"
    3635#include "TextCheckerClient.h"
    3736#include "TextIterator.h"
     
    4039
    4140namespace WebCore {
    42 
    43 #if !USE(UNIFIED_TEXT_CHECKING)
    44 static void findBadGrammars(TextCheckerClient* client, const UChar* text, int start, int length, Vector<TextCheckingResult>& results)
    45 {
    46     ASSERT(WTF_USE_GRAMMAR_CHECKING);
    47 
    48     int checkLocation = start;
    49     int checkLength = length;
    50 
    51     while (0 < checkLength) {
    52         int badGrammarLocation = -1;
    53         int badGrammarLength = 0;
    54         Vector<GrammarDetail> badGrammarDetails;
    55         client->checkGrammarOfString(text + checkLocation, checkLength, badGrammarDetails, &badGrammarLocation, &badGrammarLength);
    56         if (!badGrammarLength)
    57             break;
    58         ASSERT(0 <= badGrammarLocation && badGrammarLocation <= checkLength);
    59         ASSERT(0 < badGrammarLength && badGrammarLocation + badGrammarLength <= checkLength);
    60         TextCheckingResult badGrammar;
    61         badGrammar.type = TextCheckingTypeGrammar;
    62         badGrammar.location = checkLocation + badGrammarLocation;
    63         badGrammar.length = badGrammarLength;
    64         badGrammar.details.swap(badGrammarDetails);
    65         results.append(badGrammar);
    66 
    67         checkLocation += (badGrammarLocation + badGrammarLength);
    68         checkLength -= (badGrammarLocation + badGrammarLength);
    69     }
    70 }
    71 
    72 static void findMisspellings(TextCheckerClient* client, const UChar* text, int start, int length, Vector<TextCheckingResult>& results)
    73 {
    74     TextBreakIterator* iterator = wordBreakIterator(text + start, length);
    75     if (!iterator)
    76         return;
    77     int wordStart = textBreakCurrent(iterator);
    78     while (0 <= wordStart) {
    79         int wordEnd = textBreakNext(iterator);
    80         if (wordEnd < 0)
    81             break;
    82         int wordLength = wordEnd - wordStart;
    83         int misspellingLocation = -1;
    84         int misspellingLength = 0;
    85         client->checkSpellingOfString(text + start + wordStart, wordLength, &misspellingLocation, &misspellingLength);
    86         if (0 < misspellingLength) {
    87             ASSERT(0 <= misspellingLocation && misspellingLocation <= wordLength);
    88             ASSERT(0 < misspellingLength && misspellingLocation + misspellingLength <= wordLength);
    89             TextCheckingResult misspelling;
    90             misspelling.type = TextCheckingTypeSpelling;
    91             misspelling.location = start + wordStart + misspellingLocation;
    92             misspelling.length = misspellingLength;
    93             misspelling.replacement = client->getAutoCorrectSuggestionForMisspelledWord(String(text + misspelling.location, misspelling.length));
    94             results.append(misspelling);
    95         }
    96 
    97         wordStart = wordEnd;
    98     }
    99 }
    100 #endif
    10141
    10242static PassRefPtr<Range> expandToParagraphBoundary(PassRefPtr<Range> range)
     
    660600    client->checkTextOfParagraph(text, length, checkingTypes, results);
    661601#else
    662     Vector<TextCheckingResult> spellingResult;
    663     if (checkingTypes & TextCheckingTypeSpelling)
    664         findMisspellings(client, text, 0, length, spellingResult);
    665 
    666     Vector<TextCheckingResult> grammarResult;
    667     if (checkingTypes & TextCheckingTypeGrammar) {
    668         // Only checks grammartical error before the first misspellings
    669         int grammarCheckLength = length;
    670         for (size_t i = 0; i < spellingResult.size(); ++i) {
    671             if (spellingResult[i].location < grammarCheckLength)
    672                 grammarCheckLength = spellingResult[i].location;
    673         }
    674 
    675         findBadGrammars(client, text, 0, grammarCheckLength, grammarResult);
    676     }
    677 
    678     if (grammarResult.size())
    679         results.swap(grammarResult);
    680 
    681     if (spellingResult.size()) {
    682         if (results.isEmpty())
    683             results.swap(spellingResult);
    684         else
    685             results.append(spellingResult);
    686     }
     602    // Should implement later to unify unified spell-checking code path and
     603    // legacy spell-checking code path.
     604    ASSERT_NOT_REACHED();
     605    UNUSED_PARAM(client);
     606    UNUSED_PARAM(text);
     607    UNUSED_PARAM(length);
     608    UNUSED_PARAM(checkingTypes);
     609    UNUSED_PARAM(results);
    687610#endif
    688611}
  • trunk/Source/WebCore/testing/Internals.cpp

    r98556 r98598  
    475475}
    476476
    477 void Internals::setUnifiedTextCheckingEnabled(Document* document, bool enabled, ExceptionCode& ec)
    478 {
    479     if (!document || !document->frame() || !document->frame()->settings()) {
    480         ec = INVALID_ACCESS_ERR;
    481         return;
    482     }
    483 
    484     document->frame()->settings()->setUnifiedTextCheckerEnabled(enabled);
    485 }
    486 
    487 bool Internals::unifiedTextCheckingEnabled(Document* document, ExceptionCode& ec)
    488 {
    489     if (!document || !document->frame() || !document->frame()->settings()) {
    490         ec = INVALID_ACCESS_ERR;
    491         return false;
    492     }
    493 
    494     return document->frame()->settings()->unifiedTextCheckerEnabled();
    495 }
    496 
    497 }
     477}
  • trunk/Source/WebCore/testing/Internals.h

    r98556 r98598  
    9999    unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
    100100
    101     void setUnifiedTextCheckingEnabled(Document*, bool, ExceptionCode&);
    102     bool unifiedTextCheckingEnabled(Document*, ExceptionCode&);
    103 
    104101    static const char* internalsId;
    105102
  • trunk/Source/WebCore/testing/Internals.idl

    r98556 r98598  
    7272        unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException);
    7373        unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
    74 
    75         void setUnifiedTextCheckingEnabled(in Document document, in boolean enabled) raises (DOMException);
    76         boolean unifiedTextCheckingEnabled(in Document document) raises (DOMException);
    7774    };
    7875}
  • trunk/Source/WebKit2/ChangeLog

    r98593 r98598  
     12011-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r98556.
     4        http://trac.webkit.org/changeset/98556
     5        https://bugs.webkit.org/show_bug.cgi?id=71031
     6
     7        The test added by the patch doesn't pass on Snow Leopard
     8        (Requested by rniwa on #webkit).
     9
     10        * win/WebKit2.def:
     11        * win/WebKit2CFLite.def:
     12
    1132011-10-27  Mark Hahnenberg  <mhahnenberg@apple.com>
    214
  • trunk/Source/WebKit2/win/WebKit2.def

    r98556 r98598  
    173173        ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
    174174        ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
    175         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
    176175        ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
    177176        ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
  • trunk/Source/WebKit2/win/WebKit2CFLite.def

    r98556 r98598  
    166166        ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
    167167        ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
    168         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
    169168        ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
    170169        ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
  • trunk/Source/autotools/symbols.filter

    r98556 r98598  
    7171_ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE;
    7272_ZNK7WebCore26HTMLTextFormControlElement21lastChangeWasUserEditEv;
    73 _ZNK7WebCore5Frame8settingsEv;
    7473_ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
    7574_ZNK7WebCore7Element10shadowRootEv;
Note: See TracChangeset for help on using the changeset viewer.