mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-05-31 09:41:37 +00:00
#431: M1377257 M1372602
This commit is contained in:
parent
1c7323d765
commit
8524974786
|
@ -267,6 +267,7 @@
|
||||||
#define cairo_scaled_font_get_font_face _moz_cairo_scaled_font_get_font_face
|
#define cairo_scaled_font_get_font_face _moz_cairo_scaled_font_get_font_face
|
||||||
#define cairo_scaled_font_get_font_matrix _moz_cairo_scaled_font_get_font_matrix
|
#define cairo_scaled_font_get_font_matrix _moz_cairo_scaled_font_get_font_matrix
|
||||||
#define cairo_scaled_font_get_font_options _moz_cairo_scaled_font_get_font_options
|
#define cairo_scaled_font_get_font_options _moz_cairo_scaled_font_get_font_options
|
||||||
|
#define cairo_scaled_font_get_hint_metrics _moz_cairo_scaled_font_get_hint_metrics
|
||||||
#define cairo_scaled_font_get_reference_count _moz_cairo_scaled_font_get_reference_count
|
#define cairo_scaled_font_get_reference_count _moz_cairo_scaled_font_get_reference_count
|
||||||
#define cairo_scaled_font_get_scale_matrix _moz_cairo_scaled_font_get_scale_matrix
|
#define cairo_scaled_font_get_scale_matrix _moz_cairo_scaled_font_get_scale_matrix
|
||||||
#define cairo_scaled_font_get_type _moz_cairo_scaled_font_get_type
|
#define cairo_scaled_font_get_type _moz_cairo_scaled_font_get_type
|
||||||
|
|
|
@ -2986,3 +2986,23 @@ cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
|
||||||
_cairo_font_options_init_copy (options, &scaled_font->options);
|
_cairo_font_options_init_copy (options, &scaled_font->options);
|
||||||
}
|
}
|
||||||
slim_hidden_def (cairo_scaled_font_get_font_options);
|
slim_hidden_def (cairo_scaled_font_get_font_options);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cairo_scaled_font_get_hint_metrics:
|
||||||
|
* @scaled_font: a #cairo_scaled_font_t
|
||||||
|
*
|
||||||
|
* Mozilla extension since the required malloc/free to use
|
||||||
|
* cairo_scaled_font_get_font_options() above is too slow.
|
||||||
|
**/
|
||||||
|
cairo_public cairo_hint_metrics_t
|
||||||
|
cairo_scaled_font_get_hint_metrics (cairo_scaled_font_t *scaled_font)
|
||||||
|
{
|
||||||
|
cairo_font_options_t options;
|
||||||
|
if (scaled_font->status) {
|
||||||
|
_cairo_font_options_init_default (&options);
|
||||||
|
} else {
|
||||||
|
_cairo_font_options_init_copy (&options, &scaled_font->options);
|
||||||
|
}
|
||||||
|
return options.hint_metrics;
|
||||||
|
}
|
||||||
|
slim_hidden_def (cairo_scaled_font_get_hint_metrics);
|
||||||
|
|
|
@ -1498,6 +1498,9 @@ cairo_public void
|
||||||
cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
|
cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
|
||||||
cairo_font_options_t *options);
|
cairo_font_options_t *options);
|
||||||
|
|
||||||
|
/* mozilla extension, see https://bugzilla.mozilla.org/show_bug.cgi?id=1377257 */
|
||||||
|
cairo_public cairo_hint_metrics_t
|
||||||
|
cairo_scaled_font_get_hint_metrics (cairo_scaled_font_t *scaled_font);
|
||||||
|
|
||||||
/* Toy fonts */
|
/* Toy fonts */
|
||||||
|
|
||||||
|
|
|
@ -2473,6 +2473,7 @@ slim_hidden_proto (cairo_scaled_font_get_ctm);
|
||||||
slim_hidden_proto (cairo_scaled_font_get_font_face);
|
slim_hidden_proto (cairo_scaled_font_get_font_face);
|
||||||
slim_hidden_proto (cairo_scaled_font_get_font_matrix);
|
slim_hidden_proto (cairo_scaled_font_get_font_matrix);
|
||||||
slim_hidden_proto (cairo_scaled_font_get_font_options);
|
slim_hidden_proto (cairo_scaled_font_get_font_options);
|
||||||
|
slim_hidden_proto (cairo_scaled_font_get_hint_metrics);
|
||||||
slim_hidden_proto (cairo_scaled_font_glyph_extents);
|
slim_hidden_proto (cairo_scaled_font_glyph_extents);
|
||||||
slim_hidden_proto_no_warn (cairo_scaled_font_reference);
|
slim_hidden_proto_no_warn (cairo_scaled_font_reference);
|
||||||
slim_hidden_proto (cairo_scaled_font_status);
|
slim_hidden_proto (cairo_scaled_font_status);
|
||||||
|
|
|
@ -1326,11 +1326,8 @@ gfxContext::GetRoundOffsetsToPixels(bool *aRoundX, bool *aRoundY)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sometimes hint metrics gets set for us, most notably for printing.
|
// Sometimes hint metrics gets set for us, most notably for printing.
|
||||||
cairo_font_options_t *font_options = cairo_font_options_create();
|
|
||||||
cairo_scaled_font_get_font_options(scaled_font, font_options);
|
|
||||||
cairo_hint_metrics_t hint_metrics =
|
cairo_hint_metrics_t hint_metrics =
|
||||||
cairo_font_options_get_hint_metrics(font_options);
|
cairo_scaled_font_get_hint_metrics(scaled_font);
|
||||||
cairo_font_options_destroy(font_options);
|
|
||||||
|
|
||||||
switch (hint_metrics) {
|
switch (hint_metrics) {
|
||||||
case CAIRO_HINT_METRICS_OFF:
|
case CAIRO_HINT_METRICS_OFF:
|
||||||
|
|
|
@ -588,7 +588,7 @@ public:
|
||||||
NSView<mozView>* GetEditorView();
|
NSView<mozView>* GetEditorView();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nsCocoaWindow* GetXULWindowWidget();
|
nsCocoaWindow* GetXULWindowWidget() const;
|
||||||
|
|
||||||
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) override;
|
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) override;
|
||||||
|
|
||||||
|
|
|
@ -906,7 +906,7 @@ void nsChildView::TearDownView()
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCocoaWindow*
|
nsCocoaWindow*
|
||||||
nsChildView::GetXULWindowWidget()
|
nsChildView::GetXULWindowWidget() const
|
||||||
{
|
{
|
||||||
id windowDelegate = [[mView window] delegate];
|
id windowDelegate = [[mView window] delegate];
|
||||||
if (windowDelegate && [windowDelegate isKindOfClass:[WindowDelegate class]]) {
|
if (windowDelegate && [windowDelegate isKindOfClass:[WindowDelegate class]]) {
|
||||||
|
@ -1033,8 +1033,8 @@ bool nsChildView::IsVisible() const
|
||||||
{
|
{
|
||||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||||
|
|
||||||
if (!mVisible) {
|
if (MOZ_UNLIKELY(!mVisible || !GetXULWindowWidget()->IsVisible())) {
|
||||||
return mVisible;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mVisible does not accurately reflect the state of a hidden tabbed view
|
// mVisible does not accurately reflect the state of a hidden tabbed view
|
||||||
|
|
Loading…
Reference in New Issue
Block a user