Bug 117692

Summary: REGRESSION(r151632) : Build error on ASSERT(WTF_USE_GRAMMAR_CHECKING)
Product: WebKit Reporter: KyungTae Kim <ktf.kim>
Component: New BugsAssignee: KyungTae Kim <ktf.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, andersca, benjamin, cdumez, cmarcelo, commit-queue, eflews.bot, g.czajkowski, gyuyoung.kim, gyuyoung.kim, jturcotte, svillar, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 117585    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description KyungTae Kim 2013-06-17 02:12:04 PDT
Because of the ASSERT(WTF_USE_GRAMMAR_CHECKING) codes on Editor.cpp,
build error occured on debug build after r151632.

Fixing temporary the Platform.h part of r151632.

Source/WebCore/editing/Editor.cpp: In member function ‘void WebCore::Editor::advanceToNextMisspelling(bool)’:
Source/WebCore/editing/Editor.cpp:1771:9: error: ‘WTF_USE_GRAMMAR_CHECKING’ was not declared in this scope
Source/WebCore/editing/Editor.cpp: In member function ‘void WebCore::Editor::markMisspellingsOrBadGrammar(const WebCore::VisibleSelection&, bool, WTF::RefPtr<WebCore::Range>&)’:
Source/WebCore/editing/Editor.cpp:2067:9: error: ‘WTF_USE_GRAMMAR_CHECKING’ was not declared in this scope
Source/WebCore/editing/Editor.cpp: In member function ‘void WebCore::Editor::markBadGrammar(const WebCore::VisibleSelection&)’:
Source/WebCore/editing/Editor.cpp:2095:5: error: ‘WTF_USE_GRAMMAR_CHECKING’ was not declared in this scope
Comment 1 KyungTae Kim 2013-06-17 02:14:49 PDT
Created attachment 204801 [details]
Patch
Comment 2 Allan Sandfeld Jensen 2013-06-17 02:40:35 PDT
Could you fix the assert instead?
Comment 3 Allan Sandfeld Jensen 2013-06-17 02:47:05 PDT
Created attachment 204803 [details]
Patch
Comment 4 EFL EWS Bot 2013-06-17 02:51:08 PDT
Comment on attachment 204803 [details]
Patch

Attachment 204803 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/858391
Comment 5 Early Warning System Bot 2013-06-17 02:51:25 PDT
Comment on attachment 204803 [details]
Patch

Attachment 204803 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/849318
Comment 6 EFL EWS Bot 2013-06-17 02:52:17 PDT
Comment on attachment 204803 [details]
Patch

Attachment 204803 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/907336
Comment 7 Early Warning System Bot 2013-06-17 02:52:45 PDT
Comment on attachment 204803 [details]
Patch

Attachment 204803 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/939006
Comment 8 Allan Sandfeld Jensen 2013-06-17 03:07:00 PDT
Created attachment 204804 [details]
Patch
Comment 9 KyungTae Kim 2013-06-17 04:22:43 PDT
(In reply to comment #8)
> Created an attachment (id=204804) [details]
> Patch

Your approach seems better than mine, 
please check the ASSERT codes in the below, too:

Source/WebCore/editing/Editor.cpp: In member function ‘void WebCore::Editor::markMisspellingsOrBadGrammar(const WebCore::VisibleSelection&, bool, WTF::RefPtr<WebCore::Range>&)’:
Source/WebCore/editing/Editor.cpp:2067:9: error: ‘WTF_USE_GRAMMAR_CHECKING’ was not declared in this scope
Source/WebCore/editing/Editor.cpp: In member function ‘void WebCore::Editor::markBadGrammar(const WebCore::VisibleSelection&)’:
Source/WebCore/editing/Editor.cpp:2095:5: error: ‘WTF_USE_GRAMMAR_CHECKING’ was not declared in this scope
Comment 10 Sergio Villar Senin 2013-06-17 04:35:54 PDT
I'm also getting errors in TextCheckingHelper.cpp
Comment 11 Grzegorz Czajkowski 2013-06-17 05:04:49 PDT
I am sorry for the debug break :/ It seems that grammar checking needs more guards in WebCore.
Do you mind if I revert the problematic patch?
Thanks
Comment 12 Allan Sandfeld Jensen 2013-06-17 05:11:51 PDT
Created attachment 204809 [details]
Patch
Comment 13 Jocelyn Turcotte 2013-06-17 06:39:05 PDT
Comment on attachment 204809 [details]
Patch

r=me

I wonder if a runtime check for the context menu would have been enough though.
Comment 14 Allan Sandfeld Jensen 2013-06-17 06:58:03 PDT
Comment on attachment 204809 [details]
Patch

Clearing flags on attachment: 204809

Committed r151640: <http://trac.webkit.org/changeset/151640>
Comment 15 Allan Sandfeld Jensen 2013-06-17 06:58:11 PDT
All reviewed patches have been landed.  Closing bug.