mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 03:54:35 +00:00
7c34e38876
Previously we snapped the results of nsDisplayItem::GetBounds and nsDisplayItem::GetOpaqueRegion internally. By tracking which display items were inside transforms, we disabled snapping quite conservatively whenever an ancestor had a transform, which is undesirable. With this patch, we don't snap inside GetBounds or GetOpaqueRegion, but just return a boolean flag indicating whether the item will draw with snapping or not. This flag is conservative so that "true" means we will snap (if the graphics context has a transform that allows snapping), but "false" means we might or might not snap (so it's always safe to return false). FrameLayerBuilder takes over responsibility for snapping item bounds. When it converts display item bounds to layer pixel coordinates, it checks the snap flag returned from the display item and checks whether the transform when we draw into the layer will be a known scale (the ContainerParameters scale factors) plus integer translation. If both are true, we snap the item bounds when converting to layer pixel coordinates. With this approach, we can snap item bounds even when the items have ancestors with active transforms. |
||
---|---|---|
.. | ||
crashtests | ||
test | ||
Makefile.in | ||
nsButtonFrameRenderer.cpp | ||
nsButtonFrameRenderer.h | ||
nsComboboxControlFrame.cpp | ||
nsComboboxControlFrame.h | ||
nsFieldSetFrame.cpp | ||
nsFileControlFrame.cpp | ||
nsFileControlFrame.h | ||
nsFormControlFrame.cpp | ||
nsFormControlFrame.h | ||
nsGfxButtonControlFrame.cpp | ||
nsGfxButtonControlFrame.h | ||
nsGfxCheckboxControlFrame.cpp | ||
nsGfxCheckboxControlFrame.h | ||
nsGfxRadioControlFrame.cpp | ||
nsGfxRadioControlFrame.h | ||
nsHTMLButtonControlFrame.cpp | ||
nsHTMLButtonControlFrame.h | ||
nsICapturePicker.idl | ||
nsIComboboxControlFrame.h | ||
nsIFormControlFrame.h | ||
nsIListControlFrame.h | ||
nsImageControlFrame.cpp | ||
nsISelectControlFrame.h | ||
nsITextControlFrame.h | ||
nsLegendFrame.cpp | ||
nsLegendFrame.h | ||
nsListControlFrame.cpp | ||
nsListControlFrame.h | ||
nsProgressFrame.cpp | ||
nsProgressFrame.h | ||
nsSelectsAreaFrame.cpp | ||
nsSelectsAreaFrame.h | ||
nsTextControlFrame.cpp | ||
nsTextControlFrame.h |