#include <nsIURI.h> // required before nsILink.h
#include <nsILink.h>
#include <nsIPrefBranch.h>
-#if MOZ_VERSION_MAJOR > 1 || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8)
-# include <nsPresContext.h>
-#else
-# include <nsIPresContext.h>
- typedef nsIPresContext nsPresContext; // ugh
-#endif
+#include <nsPresContext.h>
#include <nsIPrefService.h>
#include <nsIPresShell.h>
-#if MOZ_VERSION_MAJOR > 1 || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8)
-# include <nsServiceManagerUtils.h>
-#else
-# include <nsIServiceManagerUtils.h>
-#endif
+#include <nsServiceManagerUtils.h>
#include <nsIWebBrowser.h>
#include <nsString.h>
video::frame_params frame_params_;
std::string output_dir_;
browser_widget browser_widget_;
- agent_style_sheet_holder main_style_sheet_, frame_style_sheet_;
dvd_generator generator_;
typedef std::map<std::string, dvd_generator::pgc_ref>
dvd_generator::mpeg_encoder encoder)
: frame_params_(frame_params),
output_dir_(output_dir),
- main_style_sheet_(
- init_agent_style_sheet(
- "file://" VIDEOLINK_SHARE_DIR "/videolink.css")),
- frame_style_sheet_(
- init_agent_style_sheet(
- std::string("file://" VIDEOLINK_SHARE_DIR "/")
- .append(frame_params.common_name)
- .append(".css")
- .c_str())),
generator_(frame_params, encoder),
pending_window_update_(false),
pending_req_count_(0),
nsCOMPtr<nsIDOMWindow> dom_window;
check(browser->GetContentDOMWindow(getter_AddRefs(dom_window)));
- // If we haven't done so already, apply the stylesheet and
- // disable scrollbars.
+ // If we haven't done so already, disable scrollbars.
if (!have_tweaked_page_)
{
- apply_agent_style_sheet(main_style_sheet_, pres_shell);
- apply_agent_style_sheet(frame_style_sheet_, pres_shell);
-
// This actually only needs to be done once.
nsCOMPtr<nsIDOMBarProp> dom_bar_prop;
check(dom_window->GetScrollbars(getter_AddRefs(dom_bar_prop)));
check(event_state_man->SetContentState(content,
NS_EVENT_STATE_HOVER));
-# if MOZ_VERSION_MAJOR > 1 \
- || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8)
- pres_shell->FlushPendingNotifications(Flush_Display);
-# else
- pres_shell->FlushPendingNotifications(true);
-# endif
+ pres_shell->FlushPendingNotifications(Flush_Display);
// We may have to exit and wait for image loading
// to complete, at which point we will be called
nsCOMPtr<nsIPrefBranch> pref_branch;
check(pref_service->GetBranch("", getter_AddRefs(pref_branch)));
-# if MOZ_VERSION_MAJOR > 1 \
- || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8)
- // Disable IE-compatibility kluge that causes backgrounds to
- // sometimes/usually be missing from snapshots. This is only
- // effective from Mozilla 1.8 onward.
- check(pref_branch->SetBoolPref(
- "layout.fire_onload_after_image_background_loads",
- true));
-# endif
+ // Disable IE-compatibility kluge that causes backgrounds to
+ // sometimes/usually be missing from snapshots. This is only
+ // effective from Mozilla 1.8 onward.
+ check(pref_branch->SetBoolPref(
+ "layout.fire_onload_after_image_background_loads",
+ true));
// Set display resolution. With standard-definition video we
// will be fitting ~600 pixels across a screen typically
// separately, but don't know how yet. Setting one to 40
// but not the other is *bad*, so currently we set neither.
-# if MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR < 8
+# if 0
check(pref_branch->SetIntPref("browser.display.screen_resolution",
40));
# endif
// Initialise Mozilla
browser_widget::initialiser browser_init;
set_browser_preferences();
+ init_agent_style_sheet("file://" VIDEOLINK_SHARE_DIR "/videolink.css");
+ init_agent_style_sheet(std::string("file://" VIDEOLINK_SHARE_DIR "/")
+ .append(frame_params.common_name).append(".css")
+ .c_str());
if (!preview_mode)
null_prompt_service::install();