Changeset 99814 in webkit
- Timestamp:
- Nov 9, 2011, 10:10:59 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 18 edited
-
ChangeLog (modified) (1 diff)
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/spelling/markers.html (added)
-
LayoutTests/editing/spelling/spelling-insert-html.html (modified) (1 diff)
-
LayoutTests/platform/chromium/test_expectations.txt (modified) (1 diff)
-
LayoutTests/platform/gtk/Skipped (modified) (1 diff)
-
LayoutTests/platform/qt/Skipped (modified) (1 diff)
-
LayoutTests/platform/win/Skipped (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/WebCore.exp.in (modified) (1 diff)
-
Source/WebCore/dom/DocumentMarkerController.cpp (modified) (2 diffs)
-
Source/WebCore/dom/DocumentMarkerController.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (5 diffs)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/win/WebKit2.def (modified) (2 diffs)
-
Source/WebKit2/win/WebKit2CFLite.def (modified) (2 diffs)
-
Source/autotools/symbols.filter (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r99811 r99814 1 2011-11-09 Shinya Kawanaka <shinyak@google.com> 2 3 Internals.markerRangeForNode should be able to take markers by specifying a marker type. 4 https://bugs.webkit.org/show_bug.cgi?id=71792 5 6 Reviewed by Hajime Morita. 7 8 * Source/autotools/symbols.filter: Exposed necessary symbols. 9 1 10 2011-11-09 Kevin Ollivier <kevino@theolliviers.com> 2 11 -
trunk/LayoutTests/ChangeLog
r99801 r99814 1 2011-11-09 Shinya Kawanaka <shinyak@google.com> 2 3 Internals.markerRangeForNode should be able to take markers by specifying a marker type. 4 https://bugs.webkit.org/show_bug.cgi?id=71792 5 6 Reviewed by Hajime Morita. 7 8 * editing/spelling/markers.html: Added. 9 * editing/spelling/spelling-insert-html.html: Fixed function usage. 10 * platform/chromium/test_expectations.txt: Skipped chromium test. 11 * platform/gtk/Skipped: Skipped gtk test. 12 * platform/qt/Skipped: Skipped qt test. 13 * platform/win/Skipped: Skeipped win test. 14 1 15 2011-11-09 Andrew Scherkus <scherkus@chromium.org> 2 16 -
trunk/LayoutTests/editing/spelling/spelling-insert-html.html
r99258 r99814 27 27 var markedText = ""; 28 28 for (var i = 0; i < texts.length; ++i) { 29 var marked = internals.markerRangeForNode(texts[i], 0);29 var marked = internals.markerRangeForNode(texts[i], "spelling", 0); 30 30 if (marked) 31 31 markedText += marked.toString() -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r99797 r99814 669 669 // New test added in r82159 670 670 BUGCR77706 : editing/spelling/grammar.html = FAIL 671 672 // Needs grammar checking. 673 BUGWK71792 : editing/spelling/markers.html = FAIL 671 674 672 675 // Flaky -
trunk/LayoutTests/platform/gtk/Skipped
r99737 r99814 297 297 # DataTransferItems is not yet implemented. 298 298 editing/pasteboard/data-transfer-items.html 299 300 # Needs grammar checking. 301 editing/spelling/markers.html 299 302 300 303 # Legacy full screen API tests are now obsolete. -
trunk/LayoutTests/platform/qt/Skipped
r99699 r99814 1008 1008 # textInputController.hasGrammarMarkers() is not implemented. 1009 1009 editing/spelling/grammar.html 1010 1011 # Needs grammar checking. 1012 editing/spelling/markers.html 1010 1013 1011 1014 # https://bugs.webkit.org/show_bug.cgi?id=45435 -
trunk/LayoutTests/platform/win/Skipped
r99517 r99814 1025 1025 editing/spelling/grammar.html 1026 1026 1027 # Needs grammar checking. 1028 editing/spelling/markers.html 1029 1027 1030 # EditorClient::requestCheckingOfString() is not implemented 1028 1031 editing/spelling/spellcheck-paste.html -
trunk/Source/WebCore/ChangeLog
r99813 r99814 1 2011-11-09 Shinya Kawanaka <shinyak@google.com> 2 3 Internals.markerRangeForNode should be able to take markers by specifying a marker type. 4 https://bugs.webkit.org/show_bug.cgi?id=71792 5 6 Reviewed by Hajime Morita. 7 8 Test: editing/spelling/markers.html 9 10 * WebCore.exp.in: 11 * dom/DocumentMarkerController.cpp: 12 (WebCore::DocumentMarkerController::markersFor): 13 Takes marker types to get only necessary markers. 14 * dom/DocumentMarkerController.h: 15 * testing/Internals.cpp: 16 (WebCore::markerTypesFrom): Added. 17 (WebCore::Internals::markerCountForNode): 18 Takes marker types to get only necessary markers. 19 (WebCore::Internals::markerRangeForNode): ditto. 20 * testing/Internals.h: 21 * testing/Internals.idl: 22 1 23 2011-11-09 David Reveman <reveman@chromium.org> 2 24 -
trunk/Source/WebCore/WebCore.exp.in
r99778 r99814 637 637 __ZN7WebCore24BinaryPropertyListWriter17writePropertyListEv 638 638 __ZN7WebCore24CachedResourceHandleBase11setResourceEPNS_14CachedResourceE 639 __ZN7WebCore24DocumentMarkerController10markersForEPNS_4NodeE 639 __ZN7WebCore24DocumentMarkerController10markersForEPNS_4NodeENS_14DocumentMarker11MarkerTypesE 640 640 __ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker11MarkerTypesE 641 641 __ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE -
trunk/Source/WebCore/dom/DocumentMarkerController.cpp
r95901 r99814 319 319 } 320 320 321 Vector<DocumentMarker*> DocumentMarkerController::markersFor(Node* node )321 Vector<DocumentMarker*> DocumentMarkerController::markersFor(Node* node, DocumentMarker::MarkerTypes markerTypes) 322 322 { 323 323 Vector<DocumentMarker*> result; … … 326 326 return result; 327 327 328 for (size_t i = 0; i < list->size(); ++i) 329 result.append(&(list->at(i))); 328 for (size_t i = 0; i < list->size(); ++i) { 329 if (markerTypes.contains(list->at(i).type())) 330 result.append(&(list->at(i))); 331 } 330 332 331 333 return result; -
trunk/Source/WebCore/dom/DocumentMarkerController.h
r95901 r99814 70 70 71 71 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::MarkerType); 72 Vector<DocumentMarker*> markersFor(Node* );72 Vector<DocumentMarker*> markersFor(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 73 73 Vector<DocumentMarker*> markersInRange(Range*, DocumentMarker::MarkerTypes); 74 74 Vector<DocumentMarker> markersForNode(Node*); -
trunk/Source/WebCore/testing/Internals.cpp
r99613 r99814 30 30 #include "ClientRect.h" 31 31 #include "Document.h" 32 #include "DocumentMarker.h" 32 33 #include "DocumentMarkerController.h" 33 34 #include "Element.h" … … 64 65 namespace WebCore { 65 66 67 static bool markerTypesFrom(const String& markerType, DocumentMarker::MarkerTypes& result) 68 { 69 if (markerType.isEmpty() || equalIgnoringCase(markerType, "all")) 70 result = DocumentMarker::AllMarkers(); 71 else if (equalIgnoringCase(markerType, "Spelling")) 72 result = DocumentMarker::Spelling; 73 else if (equalIgnoringCase(markerType, "Grammar")) 74 result = DocumentMarker::Grammar; 75 else if (equalIgnoringCase(markerType, "TextMatch")) 76 result = DocumentMarker::TextMatch; 77 else if (equalIgnoringCase(markerType, "Replacement")) 78 result = DocumentMarker::Replacement; 79 else if (equalIgnoringCase(markerType, "CorrectionIndicator")) 80 result = DocumentMarker::CorrectionIndicator; 81 else if (equalIgnoringCase(markerType, "RejectedCorrection")) 82 result = DocumentMarker::RejectedCorrection; 83 else if (equalIgnoringCase(markerType, "Autocorrected")) 84 result = DocumentMarker::Autocorrected; 85 else if (equalIgnoringCase(markerType, "SpellCheckingExemption")) 86 result = DocumentMarker::SpellCheckingExemption; 87 else if (equalIgnoringCase(markerType, "DeletedAutocorrection")) 88 result = DocumentMarker::DeletedAutocorrection; 89 else 90 return false; 91 92 return true; 93 } 94 66 95 const char* Internals::internalsId = "internals"; 67 96 … … 211 240 } 212 241 213 unsigned Internals::markerCountForNode(Node* node, ExceptionCode& ec)242 unsigned Internals::markerCountForNode(Node* node, const String& markerType, ExceptionCode& ec) 214 243 { 215 244 if (!node) { … … 218 247 } 219 248 220 return node->document()->markers()->markersFor(node).size(); 221 } 222 223 PassRefPtr<Range> Internals::markerRangeForNode(Node* node, unsigned index, ExceptionCode& ec) 249 DocumentMarker::MarkerTypes markerTypes = 0; 250 if (!markerTypesFrom(markerType, markerTypes)) { 251 ec = SYNTAX_ERR; 252 return 0; 253 } 254 255 return node->document()->markers()->markersFor(node, markerTypes).size(); 256 } 257 258 PassRefPtr<Range> Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) 224 259 { 225 260 if (!node) { … … 227 262 return 0; 228 263 } 229 230 Vector<DocumentMarker*> markers = node->document()->markers()->markersFor(node); 264 265 DocumentMarker::MarkerTypes markerTypes = 0; 266 if (!markerTypesFrom(markerType, markerTypes)) { 267 ec = SYNTAX_ERR; 268 return 0; 269 } 270 271 Vector<DocumentMarker*> markers = node->document()->markers()->markersFor(node, markerTypes); 231 272 if (markers.size() <= index) 232 273 return 0; -
trunk/Source/WebCore/testing/Internals.h
r99645 r99814 73 73 PassRefPtr<ClientRect> boundingBox(Element*, ExceptionCode&); 74 74 75 unsigned markerCountForNode(Node*, ExceptionCode&);76 PassRefPtr<Range> markerRangeForNode(Node*, unsigned, ExceptionCode&);75 unsigned markerCountForNode(Node*, const String&, ExceptionCode&); 76 PassRefPtr<Range> markerRangeForNode(Node*, const String&, unsigned, ExceptionCode&); 77 77 78 78 void setForceCompositingMode(Document*, bool enabled, ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r99613 r99814 46 46 47 47 ClientRect boundingBox(in Element element) raises(DOMException); 48 unsigned long markerCountForNode(in Node node ) raises(DOMException);49 Range markerRangeForNode(in Node node, in unsigned long index) raises(DOMException);48 unsigned long markerCountForNode(in Node node, in DOMString markerType) raises(DOMException); 49 Range markerRangeForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException); 50 50 51 51 void setForceCompositingMode(in Document document, in boolean enabled) raises(DOMException); -
trunk/Source/WebKit2/ChangeLog
r99802 r99814 1 2011-11-09 Shinya Kawanaka <shinyak@google.com> 2 3 Internals.markerRangeForNode should be able to take markers by specifying a marker type. 4 https://bugs.webkit.org/show_bug.cgi?id=71792 5 6 Reviewed by Hajime Morita. 7 8 * win/WebKit2.def: Exposed necessary references. 9 * win/WebKit2CFLite.def: ditto. 10 1 11 2011-10-26 Martin Robinson <mrobinson@igalia.com> 2 12 -
trunk/Source/WebKit2/win/WebKit2.def
r99613 r99814 155 155 ?ensureShadowRoot@Element@WebCore@@QAEPAVShadowRoot@2@XZ 156 156 ?equal@WTF@@YA_NPBVStringImpl@1@PBE@Z 157 ?equalIgnoringCase@WTF@@YA_NPAVStringImpl@1@PBE@Z 157 158 ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z 158 159 ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z … … 163 164 ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z 164 165 ?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ 165 ?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@ @Z166 ?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@VMarkerTypes@DocumentMarker@2@@Z 166 167 ?page@Document@WebCore@@QBEPAVPage@2@XZ 167 168 ?paintControlTints@FrameView@WebCore@@AAEXXZ -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r99625 r99814 148 148 ?ensureShadowRoot@Element@WebCore@@QAEPAVShadowRoot@2@XZ 149 149 ?equal@WTF@@YA_NPBVStringImpl@1@PBE@Z 150 ?equalIgnoringCase@WTF@@YA_NPAVStringImpl@1@PBE@Z 150 151 ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z 151 152 ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z … … 156 157 ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z 157 158 ?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ 158 ?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@ @Z159 ?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@VMarkerTypes@DocumentMarker@2@@Z 159 160 ?page@Document@WebCore@@QBEPAVPage@2@XZ 160 161 ?paintControlTints@FrameView@WebCore@@AAEXXZ -
trunk/Source/autotools/symbols.filter
r99748 r99814 57 57 _ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE; 58 58 _ZN7WebCore22externalRepresentationEPNS_7ElementEj; 59 _ZN7WebCore24DocumentMarkerController10markersForEPNS_4NodeE ;59 _ZN7WebCore24DocumentMarkerController10markersForEPNS_4NodeENS_14DocumentMarker11MarkerTypesE; 60 60 _ZN7WebCore6JSNode10putVirtualEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE; 61 61 _ZN7WebCore6JSNode20visitChildrenVirtualERN3JSC11SlotVisitorE;
Note:
See TracChangeset
for help on using the changeset viewer.