Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 186900 Details for
Bug 334509
[GC] GCOperationWriter escapes newline with invalid HTML element
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix
clipboard.txt (text/plain), 3.24 KB, created by
RĂ¼diger Herrmann
on 2011-01-17 07:04:11 EST
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2011-01-17 07:04:11 EST
Size:
3.24 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter.java,v >retrieving revision 1.3 >diff -u -r1.3 GCOperationWriter.java >--- src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter.java 10 Nov 2010 14:59:49 -0000 1.3 >+++ src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter.java 17 Jan 2011 12:03:53 -0000 >@@ -185,7 +185,7 @@ > String result = WidgetLCAUtil.escapeText( text, drawMnemonic ); > String replacement = ""; > if( ( flags & SWT.DRAW_DELIMITER ) != 0 ) { >- replacement = "</br>"; >+ replacement = "<br/>"; > } > result = EncodingUtil.replaceNewLines( result, replacement ); > replacement = ""; >@@ -198,7 +198,7 @@ > > private void setProperty( final SetProperty operation ) throws IOException { > JSWriter writer = JSWriter.getWriterFor( control ); >- String jsProperty = null; >+ String jsProperty; > switch( operation.id ) { > case SetProperty.FOREGROUND: > jsProperty = "foreground"; >@@ -218,11 +218,12 @@ > case SetProperty.LINE_JOIN: > jsProperty = "lineJoin"; > break; >+ default: >+ String msg = "Unsupported operation id: " + operation.id; >+ throw new RuntimeException( msg ); > } >- if( jsProperty != null ) { >- Object[] args = new Object[] { jsProperty, operation.value }; >- writer.call( GC_VAR, "setProperty", args ); >- } >+ Object[] args = new Object[] { jsProperty, operation.value }; >+ writer.call( GC_VAR, "setProperty", args ); > } > > private void setFont( final SetFont operation ) throws IOException { >#P org.eclipse.rap.rwt.q07.test >Index: src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter_Test.java,v >retrieving revision 1.1 >diff -u -r1.1 GCOperationWriter_Test.java >--- src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter_Test.java 10 Nov 2010 14:59:44 -0000 1.1 >+++ src/org/eclipse/swt/internal/widgets/canvaskit/GCOperationWriter_Test.java 17 Jan 2011 12:03:54 -0000 >@@ -19,13 +19,13 @@ > String text = "text with \ttab, \nnew line and &mnemonic"; > int flags = SWT.DRAW_TAB | SWT.DRAW_DELIMITER | SWT.DRAW_MNEMONIC; > String expected >- = "text with tab, </br>new line and mnemonic"; >+ = "text with tab, <br/>new line and mnemonic"; > String result = GCOperationWriter.processText( text, flags ); > assertEquals( expected, result ); > > flags = SWT.DRAW_TAB | SWT.DRAW_DELIMITER; > expected >- = "text with tab, </br>new line and &mnemonic"; >+ = "text with tab, <br/>new line and &mnemonic"; > result = GCOperationWriter.processText( text, flags ); > assertEquals( expected, result ); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 334509
: 186900