Changeset 98598 in webkit
- Timestamp:
- Oct 27, 2011, 10:24:49 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r98556 r98598 1 2011-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 1 12 2011-10-27 Shinya Kawanaka <shinyak@google.com> 2 13 -
trunk/LayoutTests/ChangeLog
r98597 r98598 1 2011-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 1 13 2011-10-27 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r98596 r98598 1 2011-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 1 16 2011-10-27 Mike Reed <reed@google.com> 2 17 -
trunk/Source/WebCore/editing/TextCheckingHelper.cpp
r98556 r98598 33 33 #include "Range.h" 34 34 #include "Settings.h" 35 #include "TextBreakIterator.h"36 35 #include "TextCheckerClient.h" 37 36 #include "TextIterator.h" … … 40 39 41 40 namespace 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 #endif101 41 102 42 static PassRefPtr<Range> expandToParagraphBoundary(PassRefPtr<Range> range) … … 660 600 client->checkTextOfParagraph(text, length, checkingTypes, results); 661 601 #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); 687 610 #endif 688 611 } -
trunk/Source/WebCore/testing/Internals.cpp
r98556 r98598 475 475 } 476 476 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 99 99 unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&); 100 100 101 void setUnifiedTextCheckingEnabled(Document*, bool, ExceptionCode&);102 bool unifiedTextCheckingEnabled(Document*, ExceptionCode&);103 104 101 static const char* internalsId; 105 102 -
trunk/Source/WebCore/testing/Internals.idl
r98556 r98598 72 72 unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException); 73 73 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);77 74 }; 78 75 } -
trunk/Source/WebKit2/ChangeLog
r98593 r98598 1 2011-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 1 13 2011-10-27 Mark Hahnenberg <mhahnenberg@apple.com> 2 14 -
trunk/Source/WebKit2/win/WebKit2.def
r98556 r98598 173 173 ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z 174 174 ?settings@Document@WebCore@@QBEPAVSettings@2@XZ 175 ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ176 175 ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ 177 176 ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r98556 r98598 166 166 ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z 167 167 ?settings@Document@WebCore@@QBEPAVSettings@2@XZ 168 ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ169 168 ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ 170 169 ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ -
trunk/Source/autotools/symbols.filter
r98556 r98598 71 71 _ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE; 72 72 _ZNK7WebCore26HTMLTextFormControlElement21lastChangeWasUserEditEv; 73 _ZNK7WebCore5Frame8settingsEv;74 73 _ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE; 75 74 _ZNK7WebCore7Element10shadowRootEv;
Note:
See TracChangeset
for help on using the changeset viewer.