addOneTab uses the existence of a referrer URI to determine where to
position the newly opened tab. Bug 1031264 changed callsites so that a
referrer URI was no longer passed in if the opening link had
rel=noreferrer set on it. This change, then, broke placement of newly
opened tabs if their opening link had rel=noreferrer on it.
Instead of not passing in the referrer URI if rel=noreferrer, let's
instead explicitly tell addOneTab whether rel=noreferrer was present on
the opening link. Then addOneTab can hide the referrer URI from the
actual network request, while still using the referrer URI to determine
tab placement.
The patch for bug 1031264 factored out an _openLinkInParameters
function. But this new function grabbed the referrerURI from
|document|, rather from the passed in |doc|, whereas all the callers had
obtained |referrerURI| from the (to-be-passed-in) |doc| object. Let's
fix this mix-up before going any further.
Change the PuppetWidget from defining screen coordinates from
tab-content-relative to being based on actual screen geometry.
PuppetWidgets can have position. In the parent process, the
widget has a position and a separate client position (that
includes OS window chrome... on Linux and Windows as others have no
chrome). In the child process, the widget (non-origin) position,
whose calculation compensates for the OS window decoration.
TabParents now register for the MozUpdateWindowPos event on the chrome
TopWindowRoot. When the window is moved, the OS widget calls WindowMoved on
its listener (the nsWebShellWindow), which sends a MozUpdateWindowPos
event.
PuppetWidget::WidgetToScreenOffset now reports proper widget screen location. Previously, in the content process, all widgets were defined to be located at the screen origin. This also repairs mac e10s OOP plugin coordinate calculations that would be broken by this change.
Starting with bug 391583 we detect whether a png image has any transparency
during decode. I don't think this is worth doing anymore. We choose the format
of image based on the png header, that should be sufficient for the performance
improvement we desire from opaque images. This gets us faster image decoding.
A filter is a callable that accepts an iterable of tests and a dictionary of values (e.g mozinfo.info) and returns an iterable of tests. Note filtering can mean modifying tests in addition to removing them. For example, this implements a "timeout-if" tag in the manifest:
from manifestparser import expression
import mozinfo
def timeout_if(tests, values):
for test in tests:
if 'timeout-if' in test:
timeout, condition = test['timeout-if'].split(',', 1)
if expression.parse(condition, **values):
test['timeout'] = timeout
yield test
tests = mp.active_tests(filters=[timeout_if], **mozinfo.info)
This code needs to move out of PrepareResizeReflow() (and things that
trigger code in it) because PrepareResizeReflow is conditioned on the
block itself resizing.
The reftest is based on a test by Jesse Ruderman <jruderman@gmail.com>.
The reftest fails without the patch and passes with the patch.