Hi,
It's time for the new Wine Gecko package release. I've prepared a new package based on Mozilla code a bit newer than Firefox 3.5 and my fixes (most of them are on their way to mainstream Mozilla repository). This release fixes a few known bugs. It's not as big change as 0.9.0 release was, so I don't expect that many problems. Last time we had a few serious regressions and I'd like to avoid them now. That's why I'd like to ask you for help in testing (last time I did too, but somehow we've missed serious problems). To use it, just apply the attached patch, download the build from:
http://gerwazy.lo3.wroc.pl/~jcaban/wine/wine_gecko-1.0.0.cab
and place it in correct location according to (note s/0.9.1/1.0.0/):
Everything that uses MSHTML is interesting for testing. Please let me know about any regression.
If everything goes well, I will do the release on Monday next week.
Thanks, Jacek
commit 63e1e5a530b27b2bbd1795a418e618b1d4692235 Author: Jacek Caban jacek@codeweavers.com Date: Wed Jul 29 18:00:53 2009 +0200
Wine Gecko 1.0.0 release.
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index 0cbfc06..d181458 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -44,6 +44,69 @@ typedef struct {
#define HTMLBODY(x) (&(x)->lpHTMLBodyElementVtbl)
+static const WCHAR aquaW[] = {'a','q','u','a',0}; +static const WCHAR blackW[] = {'b','l','a','c','k',0}; +static const WCHAR blueW[] = {'b','l','u','e',0}; +static const WCHAR fuchsiaW[] = {'f','u','s','h','s','i','a',0}; +static const WCHAR grayW[] = {'g','r','a','y',0}; +static const WCHAR greenW[] = {'g','r','e','e','n',0}; +static const WCHAR limeW[] = {'l','i','m','e',0}; +static const WCHAR maroonW[] = {'m','a','r','o','o','n',0}; +static const WCHAR navyW[] = {'n','a','v','y',0}; +static const WCHAR oliveW[] = {'o','l','i','v','e',0}; +static const WCHAR purpleW[] = {'p','u','r','p','l','e',0}; +static const WCHAR redW[] = {'r','e','d',0}; +static const WCHAR silverW[] = {'s','i','l','v','e','r',0}; +static const WCHAR tealW[] = {'t','e','a','l',0}; +static const WCHAR whiteW[] = {'w','h','i','t','e',0}; +static const WCHAR yellowW[] = {'y','e','l','l','o','w',0}; + +static const struct { + LPCWSTR keyword; + const WCHAR hexstr[8]; +} keyword_table[] = { + {aquaW, {'#','0','0','f','f','f','f',0}}, + {blackW, {'#','0','0','0','0','0','0',0}}, + {blueW, {'#','0','0','0','0','f','f',0}}, + {fuchsiaW, {'#','f','f','0','0','f','f',0}}, + {grayW, {'#','8','0','8','0','8','0',0}}, + {greenW, {'#','0','0','8','0','0','0',0}}, + {limeW, {'#','0','0','f','f','0','0',0}}, + {maroonW, {'#','8','0','0','0','0','0',0}}, + {navyW, {'#','0','0','0','0','8','0',0}}, + {oliveW, {'#','8','0','8','0','0','0',0}}, + {purpleW, {'#','8','0','0','0','8','0',0}}, + {redW, {'#','f','f','0','0','0','0',0}}, + {silverW, {'#','c','0','c','0','c','0',0}}, + {tealW, {'#','0','0','8','0','8','0',0}}, + {whiteW, {'#','f','f','f','f','f','f',0}}, + {yellowW, {'#','f','f','f','f','0','0',0}} +}; + +static BSTR nscolor_to_str(LPCWSTR color) +{ + int i, r, min = 0, max = sizeof(keyword_table)/sizeof(keyword_table[0])-1; + + if(!color || *color == '#') + return SysAllocString(color); + + while(min <= max) { + i = (min+max)/2; + + r = strcmpiW(color, keyword_table[i].keyword); + if(!r) + return SysAllocString(keyword_table[i].hexstr); + + if(r < 0) + max = i-1; + else + min = i+1; + } + + WARN("unknown color %s\n", debugstr_w(color)); + return SysAllocString(color); +} + static BOOL variant_to_nscolor(const VARIANT *v, nsAString *nsstr) { switch(V_VT(v)) { @@ -305,7 +368,7 @@ static HRESULT WINAPI HTMLBodyElement_get_bgColor(IHTMLBodyElement *iface, VARIA nsAString_GetData(&strColor, &color);
V_VT(p) = VT_BSTR; - V_BSTR(p) = SysAllocString(color); + V_BSTR(p) = nscolor_to_str(color);
nsAString_Finish(&strColor);
diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index ab9649c..6060a8d 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -412,6 +412,11 @@ static void NSAPI nsDocumentObserver_CharacterDataChanged(nsIDocumentObserver *i { }
+static void NSAPI nsDocumentObserver_AttributeWillChange(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType) +{ +} + static void NSAPI nsDocumentObserver_AttributeChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType, PRUint32 aStateMask) { @@ -563,6 +568,7 @@ static const nsIDocumentObserverVtbl nsDocumentObserverVtbl = { nsDocumentObserver_Release, nsDocumentObserver_CharacterDataWillChange, nsDocumentObserver_CharacterDataChanged, + nsDocumentObserver_AttributeWillChange, nsDocumentObserver_AttributeChanged, nsDocumentObserver_ContentAppended, nsDocumentObserver_ContentInserted, diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 894bb41..24c6214 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -23,7 +23,7 @@ * compatible with XPCOM, usable in C code. */
-cpp_quote("#define GECKO_VERSION "0.9.1"") +cpp_quote("#define GECKO_VERSION "1.0.0"") cpp_quote("#define GECKO_VERSION_STRING "Wine Gecko " GECKO_VERSION")
import "wtypes.idl"; @@ -855,7 +855,7 @@ interface nsIDOMDocument : nsIDOMNode
[ object, - uuid(533a8131-8d0c-4ebf-990b-7fad7cd51466), + uuid(09a439ad-4079-46d5-a050-4d7015d1a108), local /* NOT_FROZEN */ ] @@ -868,9 +868,9 @@ interface nsIDOMNSDocument : nsISupports nsresult GetTitle(nsAString *aTitle); nsresult SetTitle(const nsAString *aTitle); nsresult GetContentType(nsAString *aContentType); + nsresult GetReadyState(nsAString *aReadyState); nsresult GetLastModified(nsAString *aLastModified); nsresult GetReferrer(nsAString *aReferrer); - nsresult GetBoxObjectFor(nsIDOMElement *elt, nsIBoxObject **_retval); nsresult HasFocus(PRBool *_retval); nsresult GetActiveElement(nsIDOMElement **aActiveElement); nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval); @@ -1546,13 +1546,13 @@ interface nsIWebNavigation : nsISupports
[ object, - uuid(5af07661-6477-4235-8814-4a45215855b8), + uuid(343700dd-078b-42b6-a809-b9c1d7e951d0), local /* NOT_FROZEN */ ] interface nsIPrintSettings : nsISupports { - typedef struct { char dummy; } nsMargin; + typedef struct { char dummy; } nsIntMargin;
nsresult SetPrintOptions(PRInt32 aType, PRBool aTurnOnOff); nsresult GetPrintOptions(PRInt32 aType, PRBool *_retval); @@ -1672,13 +1672,13 @@ interface nsIPrintSettings : nsISupports nsresult SetIsInitializedFromPrinter(PRBool aIsInitializedFromPrinter); nsresult GetIsInitializedFromPrefs(PRBool *aIsInitializedFromPrefs); nsresult SetIsInitializedFromPrefs(PRBool aIsInitializedFromPrefs); - nsresult SetMarginInTwips(nsMargin *aMargin); - nsresult SetEdgeInTwips(nsMargin *aEdge); - nsresult GetMarginInTwips(nsMargin *aMargin); - nsresult GetEdgeInTwips(nsMargin *aEdge); + nsresult SetMarginInTwips(nsIntMargin *aMargin); + nsresult SetEdgeInTwips(nsIntMargin *aEdge); + nsresult GetMarginInTwips(nsIntMargin *aMargin); + nsresult GetEdgeInTwips(nsIntMargin *aEdge); nsresult SetupSilentPrinting(); - nsresult SetUnwriteableMarginInTwips(nsMargin *aEdge); - nsresult GetUnwriteableMarginInTwips(nsMargin *aEdge); + nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge); + nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge); }
[ @@ -1872,7 +1872,7 @@ interface nsIIOService : nsISupports
[ object, - uuid(57322c6f-f4ec-4e46-8253-b74be220de16), + uuid(a50d5516-5c0a-4f08-b427-703ca0c44ac3), local, /* NOT_FROZEN */ ] @@ -2485,7 +2485,7 @@ interface nsIHTMLEditor : nsISupports
[ object, - uuid(32e68316-67d4-44a5-8d35-0d390fa9df11), + uuid(365d600b-868a-452a-8de8-f46fad8fee53), local /* NOT_FROZEN */ ] @@ -2495,6 +2495,8 @@ interface nsIMutationObserver : nsISupports void /*CharacterDataChangeInfo*/ *aInfo); void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent, void /*CharacterDataChangeInfo*/ *aInfo); + void AttributeWillChange(nsIDocument *aDocument, nsIContent * aContent, PRInt32 aNameSpaceID, + nsIAtom *aAttribute, PRInt32 aModType); void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType, PRUint32 aStateMask); void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, PRInt32 aNewIndexInContainer); @@ -2531,7 +2533,7 @@ interface nsIDocumentObserver : nsIMutationObserver void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule); void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule); void BindToDocument(nsIDocument *aDocument, nsIContent *aContent); - void DoneAddingContent(nsIContent *aContent, PRBool aHaveNotified); + void DoneAddingChildren(nsIContent *aContent, PRBool aHaveNotified); }
/* diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c index a122e0c..3af8867 100644 --- a/dlls/mshtml/olecmd.c +++ b/dlls/mshtml/olecmd.c @@ -583,9 +583,6 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS)); }
- if(This->nscontainer) - set_ns_editmode(This->nscontainer); - update_doc(This, UPDATE_UI);
if(This->mon) { @@ -609,6 +606,9 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, if(FAILED(hres)) return hres;
+ if(This->nscontainer) + set_ns_editmode(This->nscontainer); + if(This->ui_active) { RECT rcBorderWidths;
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index a153a14..557a789 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2991,7 +2991,6 @@ static void test_default_style(IHTMLStyle *style)
hres = IHTMLStyle_get_margin(style, &str); ok(hres == S_OK, "get_margin failed: %08x\n", hres); - todo_wine ok(!strcmp_wa(str, "1px"), "margin = %s\n", dbgstr_w(str));
hres = IHTMLStyle_put_margin(style, NULL);