Currently this will always "swap" the value with NULL since it gets reset,
and the element's SetAttrAndNotify uses the swapped value as the oldValue for
mutation observer notifications, so it's always NULL, which does not match IE.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Based on patch by Chad Austin (bug 480220).
Fixes a rare infinite loop in FFXIV Launcher when changing layout (which
restarts it).
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
With changes by: Jacek Caban <jacek@codeweavers.com>
IE7 and below parse unescaped chars (such as whitespace) of urls without
string as part of the url, unlike IE8+ which are spec compliant. So
url(file:///C:/a b/blah.jpg) and url(C:\\c d\\foo.png) both work but only
in IE7 and below modes, without having to escape the space with backslash
or enclosing the url in quotes. The launcher for Imperiums: Greek Wars
depends on this.
Note that on native it's not spaces that are special, but rather it looks
up until the closing parenthesis (unless it is escaped via backslash). For
example, even unescaped newline is processed as part of url:
background:url(
); background-color: black;
...sets it to black, but:
background:url(
; background-color: black;
...does not since it's invalid.
For some reason escaping a space via backslash `\ ` does not function as it
should, but others do (such as parentheses). The game's launcher actually
uses Regex.Escape(text).Replace("\ ", " "), so this is probably something
special there.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
As we only use in-process plugins, so this is not needed.
Fixes issues with InSendMessageEx, which merely tells us if there is an
inter-thread message waiting anywhere, but it can be sent to any other
window or even be a different message sent to the current window. It's
possible to SendMessage during processing of an inter-thread message without
impacting InSendMessageEx's results (because it's badly designed), so Gecko
would call ReplyMessage on an intra-thread message, messing up a totally
unrelated message.
FFXIV Launcher does something like this when it has not enough disk space
and displays a message box for it. The thread that calculates the disk space
sends a user message to the main thread, and ends up blocking. Immediately
after sending it, it posts a WM_CLOSE, but since it's blocked, it should wait
until the main thread finishes processing the message (when the message box
is closed). However, creating the message box results in a WM_KILLFOCUS being
sent to the Gecko window. This is an intra-thread message, but since there's
the prior user message that blocks the other thread, InSendMessageEx returns
that it is indeed waiting, causing ReplyMessage to be called in response to
this intra-thread WM_KILLFOCUS, which is wrong and instantly quits the app
(because of the WM_CLOSE).
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Internet Explorer allows loading file:// URIs when the schemas don't match
(for example, from a https website), and some applications, such as the
launcher for Imperiums: Greek Wars, depends on this as it loads the news
feed via http and then puts CSS with the background from the game directory
via file://
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Add a new method to nsIXMLHttpRequest that transfers the buffer contents
of gecko's ArrayBuffer response into an arbitrary buffer for wine. If
buffer is NULL, it only returns the size without transferring anything,
which allows wine to allocate the buffer. This will allow wine to implement
the response prop.
Calling it frees gecko's buffer, but of course it has to be cached on
wine side anyway because it must return reference to the same object on
subsequent calls.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Except for AddListener and RemoveListener as they would add unnecessary
complications not needed by wine.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
DocAccessible inherits from nsIDocumentObserver, which inherits from
nsIDocument. Wine-gecko adds two more methods to this class, which we
need to stub.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
This comparison is confused, as aNRanges is an out argument; we only
care about non-nullness of the pointer. Additionally, recent versions
of clang consider non-equality comparisons with pointer types an
error.
MozReview-Commit-ID: 8lXeCwP6Lz6