Changeset 38816 in webkit
- Timestamp:
- Nov 26, 2008 9:07:45 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r38815 r38816 1 2008-11-26 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> 2 3 Reviewed by George Staikos. 4 5 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22522 6 7 Catch WML errors (invalid variable name/reference, multiple access elements, etc) 8 while parsing the document, and stop parsing immediately and wrap the document 9 fragment in a XHTML error document, just like it's done from XML parsing errors. 10 11 Update affected layout tests (all fixed). 12 13 * platform/mac/fast/wml/do-shadow-expected.txt: 14 * platform/mac/fast/wml/do-template-expected.txt: 15 * platform/mac/fast/wml/err-event-binding-conflict-expected.checksum: 16 * platform/mac/fast/wml/err-event-binding-conflict-expected.png: 17 * platform/mac/fast/wml/err-event-binding-conflict-expected.txt: 18 * platform/mac/fast/wml/err-invalid-variable-name-expected.checksum: 19 * platform/mac/fast/wml/err-invalid-variable-name-expected.png: 20 * platform/mac/fast/wml/err-invalid-variable-name-expected.txt: 21 * platform/mac/fast/wml/err-multi-access-expected.checksum: 22 * platform/mac/fast/wml/err-multi-access-expected.png: 23 * platform/mac/fast/wml/err-multi-access-expected.txt: 24 * platform/mac/fast/wml/err-unallowed-task-in-anchor-expected.checksum: 25 * platform/mac/fast/wml/err-unallowed-task-in-anchor-expected.png: 26 * platform/mac/fast/wml/err-unallowed-task-in-anchor-expected.txt: 27 1 28 2008-11-26 Nikolas Zimmermann <zimmermann@kde.org> 2 29 -
trunk/LayoutTests/platform/mac/fast/wml/do-shadow-expected.txt
r38736 r38816 27 27 RenderText {#text} at (0,0) size 0x0 28 28 RenderText {#text} at (0,0) size 0x0 29 RenderBlock (anonymous) at (0,110) size 800x030 RenderText {#text} at (0,0) size 0x031 RenderText {#text} at (0,0) size 0x032 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/wml/do-template-expected.txt
r38736 r38816 27 27 RenderText {#text} at (0,0) size 75x18 28 28 text run at (0,0) width 75: "Go to card2" 29 RenderBlock (anonymous) at (0,152) size 800x030 RenderText {#text} at (0,0) size 0x031 RenderText {#text} at (0,0) size 0x032 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/wml/err-event-binding-conflict-expected.checksum
r38577 r38816 1 6f780541d5c1d3eb12cf50cf3a519ebc 1 2618d52c86b6b9544a6bfc0e1dc3deaa -
trunk/LayoutTests/platform/mac/fast/wml/err-event-binding-conflict-expected.txt
r38577 r38816 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x76 4 RenderBlock {wml} at (0,0) size 800x76 5 RenderBlock {card} at (8,16) size 784x52 6 RenderBlock (anonymous) at (0,0) size 784x0 7 RenderInline {onevent} at (0,0) size 0x0 3 layer at (0,0) size 800x166 4 RenderBlock {html} at (0,0) size 800x166 5 RenderBody {body} at (8,16) size 784x134 6 RenderBlock {parsererror} at (16,0) size 752x134 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)] 7 RenderBlock {h3} at (18,20) size 716x22 8 RenderText {#text} at (0,0) size 324x22 9 text run at (0,0) width 324: "This page contains the following errors:" 10 RenderBlock {div} at (18,60) size 716x14 11 RenderText {#text} at (0,0) size 525x14 12 text run at (0,0) width 525: "error on line 9 at column 61: Conflicting event bindings within an element." 13 RenderBlock {h3} at (18,92) size 716x22 14 RenderText {#text} at (0,0) size 429x22 15 text run at (0,0) width 429: "Below is a rendering of the page up to the first error." 16 RenderBlock (anonymous) at (0,150) size 784x0 17 RenderInline {wml} at (0,0) size 0x0 8 18 RenderText {#text} at (0,0) size 0x0 9 RenderInline {refresh} at (0,0) size 0x0 19 RenderBlock (anonymous) at (0,150) size 784x0 20 RenderBlock {card} at (8,0) size 768x0 21 RenderInline {onevent} at (0,0) size 0x0 22 RenderText {#text} at (0,0) size 0x0 23 RenderInline {refresh} at (0,0) size 0x0 24 RenderText {#text} at (0,0) size 0x0 10 25 RenderText {#text} at (0,0) size 0x0 11 RenderText {#text} at (0,0) size 0x0 12 RenderInline {onevent} at (0,0) size 0x0 13 RenderText {#text} at (0,0) size 0x0 14 RenderInline {prev} at (0,0) size 0x0 15 RenderText {#text} at (0,0) size 0x0 16 RenderText {#text} at (0,0) size 0x0 17 RenderBlock {p} at (0,0) size 784x18 18 RenderText {#text} at (0,0) size 248x18 19 text run at (0,0) width 248: "Test for the error event-binding conflict" 20 RenderBlock (anonymous) at (0,34) size 784x18 21 RenderText {#text} at (0,0) size 563x18 22 text run at (0,0) width 563: "You should NOT see this text, because of the error of event-binding error in card element" 26 RenderInline {onevent} at (0,0) size 0x0 27 RenderText {#text} at (0,0) size 0x0 28 RenderInline {prev} at (0,0) size 0x0 29 RenderBlock (anonymous) at (0,150) size 784x0 30 RenderInline {wml} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/wml/err-invalid-variable-name-expected.checksum
r38577 r38816 1 131183d1b978afcf6c978cd9465251d8 1 c82466655925da8da5243041ef093570 -
trunk/LayoutTests/platform/mac/fast/wml/err-invalid-variable-name-expected.txt
r38577 r38816 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x50 4 RenderBlock {wml} at (0,0) size 800x50 5 RenderBlock {card} at (8,16) size 784x18 6 RenderBlock {p} at (0,0) size 784x18 7 RenderText {#text} at (0,0) size 207x18 8 text run at (0,0) width 207: "Test for variable name validation" 9 RenderBlock (anonymous) at (0,34) size 784x0 10 RenderInline {do} at (0,0) size 0x0 [bgcolor=#D3D3D3] 3 layer at (0,0) size 800x200 4 RenderBlock {html} at (0,0) size 800x200 5 RenderBody {body} at (8,16) size 784x168 6 RenderBlock {parsererror} at (16,0) size 752x134 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)] 7 RenderBlock {h3} at (18,20) size 716x22 8 RenderText {#text} at (0,0) size 324x22 9 text run at (0,0) width 324: "This page contains the following errors:" 10 RenderBlock {div} at (18,60) size 716x14 11 RenderText {#text} at (0,0) size 525x14 12 text run at (0,0) width 525: "error on line 10 at column 68: A variable name contains invalid characters." 13 RenderBlock {h3} at (18,92) size 716x22 14 RenderText {#text} at (0,0) size 429x22 15 text run at (0,0) width 429: "Below is a rendering of the page up to the first error." 16 RenderBlock (anonymous) at (0,150) size 784x0 17 RenderInline {wml} at (0,0) size 0x0 11 18 RenderText {#text} at (0,0) size 0x0 12 RenderInline {refresh} at (0,0) size 0x0 13 RenderText {#text} at (0,0) size 0x0 14 RenderInline {setvar} at (0,0) size 0x0 15 RenderText {#text} at (0,0) size 0x0 16 RenderText {#text} at (0,0) size 0x0 17 RenderText {#text} at (0,0) size 0x0 19 RenderBlock (anonymous) at (0,150) size 784x18 20 RenderBlock {card} at (8,0) size 768x18 21 RenderBlock {p} at (0,0) size 768x18 22 RenderText {#text} at (0,0) size 207x18 23 text run at (0,0) width 207: "Test for variable name validation" 24 RenderBlock (anonymous) at (0,34) size 768x0 25 RenderInline {do} at (0,0) size 0x0 [bgcolor=#D3D3D3] 26 RenderText {#text} at (0,0) size 0x0 27 RenderInline {refresh} at (0,0) size 0x0 28 RenderText {#text} at (0,0) size 0x0 29 RenderInline {setvar} at (0,0) size 0x0 30 RenderBlock (anonymous) at (0,184) size 784x0 31 RenderInline {wml} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/wml/err-multi-access-expected.checksum
r38577 r38816 1 977525a2b91990cd4954ff442f8e862d 1 dd59cde7038b906d636611d411cc3616 -
trunk/LayoutTests/platform/mac/fast/wml/err-multi-access-expected.txt
r38577 r38816 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x76 4 RenderBlock {wml} at (0,0) size 800x76 5 RenderBlock {card} at (8,16) size 784x52 6 RenderBlock {p} at (0,0) size 784x18 7 RenderText {#text} at (0,0) size 164x18 8 text run at (0,0) width 164: "Test for multi-access error" 9 RenderBlock (anonymous) at (0,34) size 784x18 10 RenderText {#text} at (0,0) size 508x18 11 text run at (0,0) width 508: "You should not see this text, because of the error of multi-access in head element" 3 layer at (0,0) size 800x166 4 RenderBlock {html} at (0,0) size 800x166 5 RenderBody {body} at (8,16) size 784x134 6 RenderBlock {parsererror} at (16,0) size 752x134 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)] 7 RenderBlock {h3} at (18,20) size 716x22 8 RenderText {#text} at (0,0) size 324x22 9 text run at (0,0) width 324: "This page contains the following errors:" 10 RenderBlock {div} at (18,60) size 716x14 11 RenderText {#text} at (0,0) size 525x14 12 text run at (0,0) width 525: "error on line 6 at column 52: Only one access element is allowed in a deck." 13 RenderBlock {h3} at (18,92) size 716x22 14 RenderText {#text} at (0,0) size 429x22 15 text run at (0,0) width 429: "Below is a rendering of the page up to the first error." 16 RenderBlock (anonymous) at (0,150) size 784x0 17 RenderInline {wml} at (0,0) size 0x0 18 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/wml/err-unallowed-task-in-anchor-expected.checksum
r38577 r38816 1 7fb8b89b45160c5aa01ae5e48d8a9cbe 1 aa8d9127eb80040dcb92e8d29ffc1973 -
trunk/LayoutTests/platform/mac/fast/wml/err-unallowed-task-in-anchor-expected.txt
r38736 r38816 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x76 4 RenderBlock {wml} at (0,0) size 800x76 5 RenderBlock {card} at (8,16) size 784x52 6 RenderBlock (anonymous) at (0,0) size 784x0 7 RenderInline {anchor} at (0,0) size 0x0 [color=#0000EE] 3 layer at (0,0) size 800x166 4 RenderBlock {html} at (0,0) size 800x166 5 RenderBody {body} at (8,16) size 784x134 6 RenderBlock {parsererror} at (16,0) size 752x134 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)] 7 RenderBlock {h3} at (18,20) size 716x22 8 RenderText {#text} at (0,0) size 324x22 9 text run at (0,0) width 324: "This page contains the following errors:" 10 RenderBlock {div} at (18,60) size 716x14 11 RenderText {#text} at (0,0) size 511x14 12 text run at (0,0) width 511: "error on line 6 at column 28: Forbidden task contained in anchor element." 13 RenderBlock {h3} at (18,92) size 716x22 14 RenderText {#text} at (0,0) size 429x22 15 text run at (0,0) width 429: "Below is a rendering of the page up to the first error." 16 RenderBlock (anonymous) at (0,150) size 784x0 17 RenderInline {wml} at (0,0) size 0x0 8 18 RenderText {#text} at (0,0) size 0x0 9 RenderInline {noop} at (0,0) size 0x0 10 RenderText {#text} at (0,0) size 0x0 11 RenderText {#text} at (0,0) size 0x0 12 RenderBlock {p} at (0,0) size 784x18 13 RenderText {#text} at (0,0) size 383x18 14 text run at (0,0) width 383: "Test for the error that specifying noop task to anchor element" 15 RenderBlock (anonymous) at (0,34) size 784x18 16 RenderText {#text} at (0,0) size 632x18 17 text run at (0,0) width 632: "You should NOT see this text, because of the error that specifying unallowed task to anchor element" 19 RenderBlock (anonymous) at (0,150) size 784x0 20 RenderBlock {card} at (8,0) size 768x0 21 RenderInline {anchor} at (0,0) size 0x0 [color=#0000EE] 22 RenderText {#text} at (0,0) size 0x0 23 RenderInline {noop} at (0,0) size 0x0 24 RenderBlock (anonymous) at (0,150) size 784x0 25 RenderInline {wml} at (0,0) size 0x0 -
trunk/WebCore/ChangeLog
r38806 r38816 1 2008-11-26 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> 2 3 Reviewed by George Staikos. 4 5 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22522 6 7 Catch WML errors (invalid variable name/reference, multiple access elements, etc) 8 while parsing the document, and stop parsing immediately and wrap the document 9 fragment in a XHTML error document, just like it's done from XML parsing errors. 10 11 Until now all card elements were hidden by default (no renderer created), and 12 WMLDocument::finishedParsing() took care of showing the right card (either the first, 13 or any named card in the document, specified by document URL reference). Change this 14 behaviour to support displaying partially parsed WML document fragments: Mark the first 15 WMLCardElement inserted into the document as visible. If the document parsing finishes 16 without problems, WMLDocument::finishedParsing() will be called, which takes care of 17 showing the desired card (common case: first card in the document, which is already 18 visible, so nothing actually has to be done). If an error occours, the document is 19 correctly rendered until the error happened - wrapped in a XHTML document. 20 21 Fixes: fast/wml/err-event-binding-conflict.wml 22 fast/wml/err-invalid-variable-name.wml 23 fast/wml/err-multi-access.wml 24 fast/wml/err-unallowed-task-in-anchor.wml 25 26 * WebCore.xcodeproj/project.pbxproj: 27 * wml/WMLAccessElement.cpp: 28 (WebCore::WMLAccessElement::parseMappedAttribute): 29 (WebCore::WMLAccessElement::insertedIntoDocument): 30 * wml/WMLAccessElement.h: 31 * wml/WMLCardElement.cpp: 32 (WebCore::WMLCardElement::insertedIntoDocument): 33 (WebCore::WMLCardElement::setActiveCardInDocument): 34 * wml/WMLCardElement.h: 35 * wml/WMLDocument.cpp: 36 (WebCore::WMLDocument::finishedParsing): 37 * wml/WMLErrorHandling.cpp: Added. 38 (WebCore::reportWMLError): 39 * wml/WMLErrorHandling.h: Added. 40 (WebCore::): 41 * wml/WMLIntrinsicEventHandler.cpp: 42 (WebCore::WMLIntrinsicEventHandler::registerIntrinsicEvent): 43 * wml/WMLIntrinsicEventHandler.h: 44 * wml/WMLNoopElement.cpp: 45 (WebCore::WMLNoopElement::insertedIntoDocument): 46 * wml/WMLOnEventElement.cpp: 47 (WebCore::WMLOnEventElement::parseMappedAttribute): 48 (WebCore::WMLOnEventElement::registerTask): 49 * wml/WMLPageState.cpp: 50 (WebCore::WMLPageState::setNeedCheckDeckAccess): 51 * wml/WMLPageState.h: 52 * wml/WMLSetvarElement.cpp: 53 (WebCore::WMLSetvarElement::parseMappedAttribute): 54 1 55 2008-11-10 Glenn Wilson <gwilson@chromium.org> 2 56 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r38792 r38816 87 87 08CD61BC0ED3929C002DDF51 /* WMLTaskElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */; }; 88 88 08CD61BD0ED3929C002DDF51 /* WMLTaskElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */; }; 89 08E192530EDE0C3A0087B780 /* WMLErrorHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E192510EDE0C390087B780 /* WMLErrorHandling.cpp */; }; 90 08E192540EDE0C3A0087B780 /* WMLErrorHandling.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */; }; 89 91 08E4FE460E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */; }; 90 92 0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 4845 4847 08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLTaskElement.cpp; sourceTree = "<group>"; }; 4846 4848 08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLTaskElement.h; sourceTree = "<group>"; }; 4849 08E192510EDE0C390087B780 /* WMLErrorHandling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLErrorHandling.cpp; sourceTree = "<group>"; }; 4850 08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLErrorHandling.h; sourceTree = "<group>"; }; 4847 4851 08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGLengthCustom.cpp; sourceTree = "<group>"; }; 4848 4852 08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLElementFactory.cpp; sourceTree = "<group>"; }; … … 9522 9526 4C6B99250E52E37300487BB7 /* WMLElement.cpp */, 9523 9527 4C6B99260E52E37300487BB7 /* WMLElement.h */, 9528 08E192510EDE0C390087B780 /* WMLErrorHandling.cpp */, 9529 08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */, 9524 9530 0818AEE00EDB86BC00647B66 /* WMLEventHandlingElement.cpp */, 9525 9531 0818AEE10EDB86BC00647B66 /* WMLEventHandlingElement.h */, … … 16439 16445 0818AEE30EDB86BC00647B66 /* WMLEventHandlingElement.h in Headers */, 16440 16446 0865CCE70EDDF51B00DF9EC3 /* WMLNoopElement.h in Headers */, 16447 08E192540EDE0C3A0087B780 /* WMLErrorHandling.h in Headers */, 16441 16448 ); 16442 16449 runOnlyForDeploymentPostprocessing = 0; … … 18375 18382 0818AEE20EDB86BC00647B66 /* WMLEventHandlingElement.cpp in Sources */, 18376 18383 0865CCE60EDDF51B00DF9EC3 /* WMLNoopElement.cpp in Sources */, 18384 08E192530EDE0C3A0087B780 /* WMLErrorHandling.cpp in Sources */, 18377 18385 ); 18378 18386 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/wml/WMLAccessElement.cpp
r38743 r38816 25 25 #include "WMLAccessElement.h" 26 26 27 #include "WMLErrorHandling.h" 27 28 #include "WMLDocument.h" 28 29 #include "WMLNames.h" … … 44 45 const AtomicString& value = attr->value(); 45 46 if (containsVariableReference(value)) { 46 // FIXME: Error rerporting 47 // WMLHelper::tokenizer()->reportError(InvalidVariableReferenceError); 47 reportWMLError(document(), WMLErrorInvalidVariableReference); 48 48 return; 49 49 } … … 54 54 const AtomicString& value = attr->value(); 55 55 if (containsVariableReference(value)) { 56 // FIXME: Error reporting 57 // WMLHelper::tokenizer()->reportError(InvalidVariableReferenceError); 56 reportWMLError(document(), WMLErrorInvalidVariableReference); 58 57 return; 59 58 } … … 65 64 } 66 65 66 void WMLAccessElement::insertedIntoDocument() 67 { 68 WMLElement::insertedIntoDocument(); 69 70 WMLPageState* pageState = wmlPageStateForDocument(document()); 71 if (pageState && !pageState->setNeedCheckDeckAccess(true)) 72 reportWMLError(document(), WMLErrorMultipleAccessElements); 73 } 74 67 75 } 68 76 -
trunk/WebCore/wml/WMLAccessElement.h
r38733 r38816 33 33 34 34 virtual void parseMappedAttribute(MappedAttribute*); 35 virtual void insertedIntoDocument(); 35 36 }; 36 37 -
trunk/WebCore/wml/WMLCardElement.cpp
r38773 r38816 45 45 } 46 46 47 void WMLCardElement::insertedIntoDocument() 48 { 49 WMLEventHandlingElement::insertedIntoDocument(); 50 51 // The first card inserted into a document, is visible by default. 52 if (!m_isVisible) { 53 RefPtr<NodeList> nodeList = document()->getElementsByTagName("card"); 54 if (nodeList && nodeList->length() == 1 && nodeList->item(0) == this) 55 m_isVisible = true; 56 } 57 } 58 47 59 RenderObject* WMLCardElement::createRenderer(RenderArena* arena, RenderStyle* style) 48 60 { … … 69 81 return 0; 70 82 71 // Hide all cards in document72 for (unsigned i = 0; i < length; ++i) {73 WMLCardElement* card = static_cast<WMLCardElement*>(nodeList->item(i));74 75 // Only need to recalculate the card style if the card was visible76 // before otherwhise we have no associated RenderObject anyway77 if (card->isVisible())78 card->setChanged();79 80 card->setVisible(false);81 }82 83 83 // Figure out the new target card 84 84 WMLCardElement* activeCard = 0; … … 103 103 } 104 104 105 // Show active card 106 if (!activeCard) 105 if (activeCard) { 106 // Hide all cards - except the destination card - in document 107 for (unsigned i = 0; i < length; ++i) { 108 WMLCardElement* card = static_cast<WMLCardElement*>(nodeList->item(i)); 109 bool cardShouldBeVisible = (card == activeCard); 110 111 if (cardShouldBeVisible && !card->isVisible()) { 112 card->setChanged(); 113 card->setVisible(true); 114 } else if (!cardShouldBeVisible && card->isVisible()) { 115 card->setChanged(); 116 card->setVisible(false); 117 } 118 } 119 } else { 120 // The first card should already be visible. 107 121 activeCard = static_cast<WMLCardElement*>(nodeList->item(0)); 108 109 activeCard->setChanged(); 110 activeCard->setVisible(true); 122 ASSERT(activeCard->isVisible()); 123 } 111 124 112 125 // Update the document title -
trunk/WebCore/wml/WMLCardElement.h
r38773 r38816 33 33 virtual ~WMLCardElement(); 34 34 35 virtual void insertedIntoDocument(); 35 36 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 36 37 -
trunk/WebCore/wml/WMLDocument.cpp
r38743 r38816 27 27 #include "Page.h" 28 28 #include "WMLCardElement.h" 29 #include "WMLErrorHandling.h" 29 30 #include "WMLPageState.h" 30 31 … … 53 54 WMLPageState* wmlPageState = wmlPageStateForDocument(document()); 54 55 if (!wmlPageState || !wmlPageState->isDeckAccessible()) { 55 // FIXME: Error reporting56 reportWMLError(document(), WMLErrorDeckNotAccessible); 56 57 Document::finishedParsing(); 57 58 return; … … 64 65 WMLCardElement* card = WMLCardElement::setActiveCardInDocument(document(), KURL()); 65 66 if (!card) { 66 // FIXME: Error reporting67 reportWMLError(document(), WMLErrorNoCardInDocument); 67 68 Document::finishedParsing(); 68 69 return; -
trunk/WebCore/wml/WMLIntrinsicEventHandler.cpp
r38744 r38816 31 31 } 32 32 33 voidWMLIntrinsicEventHandler::registerIntrinsicEvent(WMLIntrinsicEventType type, PassRefPtr<WMLIntrinsicEvent> event)33 bool WMLIntrinsicEventHandler::registerIntrinsicEvent(WMLIntrinsicEventType type, PassRefPtr<WMLIntrinsicEvent> event) 34 34 { 35 if (m_events.contains(type)) { 36 // FIXME: error reporting 37 // WMLHelper::tokenizer()->reportError(ConflictingEventBindingError); 38 return; 39 } 35 if (m_events.contains(type)) 36 return false; 40 37 41 38 m_events.set(type, event); 39 return true; 42 40 } 43 41 -
trunk/WebCore/wml/WMLIntrinsicEventHandler.h
r38744 r38816 45 45 WMLIntrinsicEventHandler(); 46 46 47 voidregisterIntrinsicEvent(WMLIntrinsicEventType, PassRefPtr<WMLIntrinsicEvent>);47 bool registerIntrinsicEvent(WMLIntrinsicEventType, PassRefPtr<WMLIntrinsicEvent>); 48 48 void triggerIntrinsicEvent(WMLIntrinsicEventType) const; 49 49 bool hasIntrinsicEvent(WMLIntrinsicEventType) const; -
trunk/WebCore/wml/WMLNoopElement.cpp
r38792 r38816 25 25 #include "WMLNoopElement.h" 26 26 27 #include "WMLErrorHandling.h" 27 28 #include "WMLNames.h" 28 29 … … 54 55 */ 55 56 56 if (parent->hasTagName(anchorTag)) { 57 // FIXME: Error reporting 58 // WMLHelper::tokenizer()->reportError(WrongTaskInAnchorElementError); 59 } 57 if (parent->hasTagName(anchorTag)) 58 reportWMLError(document(), WMLErrorForbiddenTaskInAnchorElement); 60 59 } 61 60 -
trunk/WebCore/wml/WMLOnEventElement.cpp
r38775 r38816 26 26 27 27 #include "HTMLNames.h" 28 #include "WMLErrorHandling.h" 28 29 #include "WMLEventHandlingElement.h" 29 30 #include "WMLIntrinsicEventHandler.h" … … 46 47 const AtomicString& value = attr->value(); 47 48 if (containsVariableReference(value)) { 48 // FIXME: error reporting 49 // WMLHelper::tokenizer()->reportError(InvalidVariableReferenceError); 49 reportWMLError(document(), WMLErrorInvalidVariableReference); 50 50 return; 51 51 } … … 83 83 84 84 RefPtr<WMLIntrinsicEvent> event = WMLIntrinsicEvent::createWithTask(task); 85 eventHandlingElement->eventHandler()->registerIntrinsicEvent(m_type, event); 85 if (!eventHandlingElement->eventHandler()->registerIntrinsicEvent(m_type, event)) 86 reportWMLError(document(), WMLErrorConflictingEventBinding); 86 87 } 87 88 -
trunk/WebCore/wml/WMLPageState.cpp
r38790 r38816 59 59 } 60 60 61 voidWMLPageState::setNeedCheckDeckAccess(bool need)61 bool WMLPageState::setNeedCheckDeckAccess(bool need) 62 62 { 63 if (m_hasDeckAccess && need) {64 // FIXME: Report MultiAccessElementsError65 } else { 66 67 68 69 }63 if (m_hasDeckAccess && need) 64 return false; 65 66 m_hasDeckAccess = need; 67 m_accessPath = String(); 68 m_accessDomain = String(); 69 return true; 70 70 } 71 71 -
trunk/WebCore/wml/WMLPageState.h
r38734 r38816 64 64 bool hasDeckAccess() const { return m_hasDeckAccess; } 65 65 66 voidsetNeedCheckDeckAccess(bool);66 bool setNeedCheckDeckAccess(bool); 67 67 bool isDeckAccessible(); 68 68 -
trunk/WebCore/wml/WMLSetvarElement.cpp
r38773 r38816 26 26 27 27 #include "HTMLNames.h" 28 #include "WMLErrorHandling.h" 28 29 #include "WMLTaskElement.h" 29 30 #include "WMLVariables.h" … … 54 55 if (isValid) 55 56 m_name = name; 56 else { 57 // FIXME: Error reporting 58 // WMLHelper::tokenizer()->reportError(InvalidVariableNameError); 59 } 57 else 58 reportWMLError(document(), WMLErrorInvalidVariableName); 60 59 } else if (attr->name() == HTMLNames::valueAttr) 61 60 m_value = substituteVariableReferences(attr->value(), document());
Note: See TracChangeset
for help on using the changeset viewer.