Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cretz/doogie
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.1
Choose a base ref
...
head repository: cretz/doogie
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Sep 19, 2017

  1. Fix import for getpid

    cretz committed Sep 19, 2017
    Copy the full SHA
    7911697 View commit details
  2. Copy the full SHA
    8c53a26 View commit details

Commits on Sep 20, 2017

  1. Copy the full SHA
    0cf35ed View commit details
  2. Copy the full SHA
    47bd199 View commit details

Commits on Oct 2, 2017

  1. Focus the browser regardless of page click and have callback to check…

    … whether focus allowed.
    
    Fixes #42 and relates to #52
    cretz committed Oct 2, 2017
    Copy the full SHA
    322e954 View commit details
  2. Copy the full SHA
    cf3e213 View commit details
  3. HTTP basic auth support. Fixes #26

    cretz committed Oct 2, 2017
    Copy the full SHA
    c870baf View commit details
  4. Copy the full SHA
    30c73c6 View commit details

Commits on Oct 3, 2017

  1. Copy the full SHA
    288610e View commit details
  2. Copy the full SHA
    004099e View commit details

Commits on Nov 6, 2017

  1. fix unused param warning

    cretz committed Nov 6, 2017
    Copy the full SHA
    8351529 View commit details

Commits on Jan 3, 2018

  1. Copy the full SHA
    5a65a3f View commit details

Commits on Jan 4, 2018

  1. Copy the full SHA
    54154c1 View commit details
  2. Copy the full SHA
    dfeedde View commit details
  3. Copy the full SHA
    9781b97 View commit details
  4. Copy the full SHA
    0f2ac94 View commit details
  5. Copy the full SHA
    1142b27 View commit details
  6. Copy the full SHA
    fa4d460 View commit details

Commits on Mar 30, 2018

  1. Copy the full SHA
    fa16b26 View commit details
  2. Copy the full SHA
    20008c2 View commit details

Commits on Jun 13, 2018

  1. Copy the full SHA
    517f0aa View commit details

Commits on Sep 24, 2018

  1. Copy the full SHA
    1b4ed74 View commit details

Commits on Nov 2, 2019

  1. Copy the full SHA
    2e3097b View commit details

Commits on Apr 15, 2020

  1. Copy the full SHA
    0d8e581 View commit details
20 changes: 15 additions & 5 deletions docs/guide/develop.md
Original file line number Diff line number Diff line change
@@ -14,6 +14,10 @@ Any bugs or enhancement requests can be filed in via [GitHub issues](https://git
filing a bug, please try to be as descriptive as possible on the issue. Ideally, provide a page or set of pages that
trigger the error.

If there is a crash, the crash file will be dumped on the user's computer. This can be found at
`C:\Users\USER_NAME\AppData\Local\Doogie\User Data\Crashpad\reports` on Windows (TODO: where on Linux). Please upload
this file to the issue tracker for bugs about crashes.

If you are a developer, one of the easiest ways to do this is to add the pages to `src/tests/integration/resources`.
Then by running `npm run resource-server` from `src/tests/integration` the resources can be browsed via
http://127.0.0.1:1993 (e.g. [http://127.0.0.1:1993/hello-world.html](http://127.0.0.1:1993/hello-world.html)).
@@ -29,13 +33,17 @@ All instructions below assume the user is in the `src` folder.

Before running the build script on Windows, you must have the prerequisites:

* Latest Qt (5.x) installed w/ `qmake.exe` on the `PATH`
* Latest CMake installed w/ `cmake.exe` on the `PATH`
* Latest Python (2.x) installed w/ `python.exe` on the `PATH`
* Latest Go installed w/ `go.exe` on the `PATH`
* [MSVC 2015 Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) installed w/ the following
executed to put 64-bit VC compiler on the `PATH`:
`"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64`
* [MSVC 2015 or 2017 Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) installed w/ the following
executed to put 64-bit VC compiler on the `PATH` for MSVC 2015:
`"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64`. Or the following executed for MSVC
2017: `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64`.
* Latest Qt (5.x) installed w/ `qmake.exe` on the `PATH` corresponding to the chosen MSVC version (e.g. with
`"C:\Qt\<version>\msvc2017_64\bin"` on the `PATH`)
* Optionally, [jom.exe](https://wiki.qt.io/Jom) on the `PATH` to speed up builds (e.g. with
`"C:\Qt\Tools\QtCreator\bin"` on the `PATH`)
* Latest [Windows 64-bit standard dist of CEF](http://opensource.spotify.com/cefbuilds/index.html#windows64_builds)
extracted w/ `CEF_DIR` environment variable set to the base CEF extracted dir
* This repo cloned w/ the shell at the `src` folder
@@ -52,7 +60,9 @@ Before running the build script on Linux, you must have the prerequisites:
* Latest Make installed w/ `make` on the `PATH`
* Latest [Linux 64-bit standard dist of CEF](http://opensource.spotify.com/cefbuilds/index.html#linux64_builds)
extracted w/ `CEF_DIR` environment variable set to the base CEF extracted dir
* Latest GTK 2.x installed and on the library path
* Latest GTK 2.x installed and on the library path (e.g. on Ubuntu `sudo apt-get install libgtk2.0-dev`)
* Latest Mesa 3D headers installed and on the include path (e.g. on Ubuntu `sudo apt-get install mesa-common-dev`)
* Latest `libGL` installed and on the library path (e.g. on Ubuntu `sudo apt-get install libgl1-mesa-dev`)
* The `chrpath` utility on the `PATH`
* This repo cloned w/ the shell at the `src` folder

5 changes: 5 additions & 0 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
@@ -24,6 +24,11 @@ C++, so surely there are mistakes there. They just have to be ironed out as time

Please report any [issue](develop#issues).

### How does Doogie track usage?

It doesn't. There is no way for Doogie to know how popular it is, what features are used more than others, etc. Features
and bugs will be prioritized by the author, not telemetry analytics (because they don't exist).

### How do I create an "incognito" or "private mode" bubble?

Simply create a bubble that has no cache. However, right now there is not a setting to prevent it from saving
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@

<h2>Overview</h2>
<p>
Doogie is a <a href="https://www.chromium.org">Chromium</a>-based web browser with tree-style pages. It is built using <a href="https://bitbucket.org/chromiumembedded/cef">CEF</a> and <a href="https://www.qt.io/">Qt</a>. The primary goal is to make a browser that functions more like an <a href="https://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>. In an era where web browsers continually remove or hide UI, Doogie aims to make it more visible and allow easier cross-contextual browsing. <a href="guide">Read the user guide</a>
Doogie is a <a href="https://www.chromium.org">Chromium</a>-based web browser with tree-style pages. It is built using <a href="https://bitbucket.org/chromiumembedded/cef">CEF</a> and <a href="https://www.qt.io/">Qt</a>. The primary goal is to make a browser that functions more like an <a href="https://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>. In an era where web browsers continually remove or hide UI, Doogie aims to make it more visible and allow easier cross-contextual browsing. Read <a href="guide">the user guide</a> or the <a href="guide/faq">FAQ</a>.
</p>

<h2>Screenshot</h2>
@@ -161,7 +161,7 @@ <h4>Autocomplete and Search</h4>
<hr />
<h4>Request Blocker</h4>
<div class="feature-item">
<img src="img/screenshot-request-blocker-simple.png" style="height: 100%;">
<img src="img/screenshot-request-blocker-simple.png" style="height: 100%; max-width: 100%">
<div>
<div>
Doogie supports the <a href="https://adblockplus.org/filters">Adblock Plus filter syntax</a> for URLs. This means you can add <a href="https://filterlists.com/">filter lists</a> and Doogie will prevent the URL from being loaded.
22 changes: 22 additions & 0 deletions src/blocker_dock.cc
Original file line number Diff line number Diff line change
@@ -113,6 +113,20 @@ BlockerDock::BlockerDock(const Cef& cef,
[=](BrowserWidget* browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) -> bool {
// If the URL is an abp:subscribe URL, add it
auto url_str = QString::fromStdString(request->GetURL().ToString());
if (url_str.startsWith("abp:subscribe")) {
QUrl url(url_str);
QUrlQuery url_query(url);
auto location = url_query.queryItemValue("location", QUrl::FullyDecoded);
if (!location.isEmpty()) {
// Defer the subscription so we can cancel the load right now
Util::RunOnMainThread([=]() {
QTimer::singleShot(0, [=]() { SubscribeRuleList(location); });
});
return false;
}
}
return IsAllowedToLoad(browser, frame, request);
});

@@ -403,4 +417,12 @@ BlockerRules::StaticRule::RequestType BlockerDock::TypeFromRequest(
return BlockerRules::StaticRule::Other;
}

void BlockerDock::SubscribeRuleList(const QString& url) {
// We show the settings dialog, and attempt to add the URL
MainWindow::EditProfileSettings([=](ProfileSettingsDialog* dialog) {
dialog->SetCurrentTab(3);
dialog->TryAddBlockerListUrl(url);
});
}

} // namespace doogie
2 changes: 2 additions & 0 deletions src/blocker_dock.h
Original file line number Diff line number Diff line change
@@ -55,6 +55,8 @@ class BlockerDock : public QDockWidget {
const QUrl& target_url,
CefRefPtr<CefRequest> request);

void SubscribeRuleList(const QString& url);

const Cef& cef_;
QTableWidget* table_;
QCheckBox* current_only_;
4 changes: 2 additions & 2 deletions src/blocker_list.cc
Original file line number Diff line number Diff line change
@@ -139,7 +139,7 @@ bool BlockerList::Delete() {
"DELETE FROM blocker_list WHERE id = ?",
{ id_ });
if (!ok) return false;
// Try to delete the local file if it had a url
// Try to delete the local cache file if it had a url
if (!url_.isEmpty()) {
QFile(local_path_).remove();
}
@@ -318,7 +318,7 @@ void BlockerList::ApplySqlRecord(const QSqlRecord& record) {
}

void BlockerList::UpdateFromMeta(BlockerRules::ListMetadata meta) {
if (!meta.title.isEmpty()) name_ = meta.title;
name_ = meta.title.isEmpty() ? "" : meta.title;
if (!meta.homepage.isEmpty()) homepage_ = meta.homepage;
// We have decided not to support redirect
// if (!meta.redirect.isEmpty()) url_ = meta.redirect;
1 change: 1 addition & 0 deletions src/blocker_rules.cc
Original file line number Diff line number Diff line change
@@ -326,6 +326,7 @@ BlockerRules::StaticRule* BlockerRules::StaticRule::ParseRule(
} else {
// TODO(cretz): sitekey, donottrack
qDebug() << "Line" << line_num << "unrecognized option:" << option;
return nullptr;
}
}
rule_bytes = rule_bytes.left(dollar);
7 changes: 1 addition & 6 deletions src/browser_setting.cc
Original file line number Diff line number Diff line change
@@ -14,12 +14,7 @@ const QList<BrowserSetting> BrowserSetting::kSettings = {
BrowserSetting(
BrowserSetting::EnableNetSecurityExpiration,
"Enable Net Security Expiration?",
"Enable date-based expiration of built in network security information "
"(i.e. certificate transparency logs, HSTS preloading and pinning "
"information). Enabling this option improves network security but may "
"cause HTTPS load failures when using CEF binaries built more than 10 "
"weeks in the past. See https://www.certificate-transparency.org/ and "
"https://www.chromium.org/hsts for details."),
"DEPRECATED: No longer takes effect."),
BrowserSetting(
BrowserSetting::FileAccessFromFileUrls,
"File Access From File URLs?",
26 changes: 19 additions & 7 deletions src/browser_widget.cc
Original file line number Diff line number Diff line change
@@ -127,7 +127,10 @@ BrowserWidget::BrowserWidget(const Cef& cef,
}

void BrowserWidget::LoadUrl(const QString &url) {
url_edit_->setText(url);
// If this starts with a data URI for text/html, we are going to be lazy
// and assume it's for an error page for now and not change the URL.
// TODO: Stop being lazy (and opening security holes) and show errors better
if (!url.startsWith("data:text/html;base64,")) url_edit_->setText(url);
cef_widg_->LoadUrl(url);
}

@@ -155,6 +158,10 @@ void BrowserWidget::FocusUrlEdit() {
}

void BrowserWidget::FocusBrowser() {
// We clear the focus here first because sometimes this is called
// when it already has focus, but we need to trigger a "change"
// so the underlying piece gets focus.
cef_widg_->clearFocus();
cef_widg_->setFocus();
}

@@ -180,7 +187,7 @@ QString BrowserWidget::CurrentUrl() const {
// As a special case, if this URL is invalid, we use
// what's in the URL edit box
auto url = cef_widg_->CurrentUrl();
if (url == "data:text/html,chromewebdata") {
if (url.startsWith("data:text/html")) {
url = url_edit_->text();
}
return url;
@@ -391,7 +398,8 @@ void BrowserWidget::RecreateCefWidget(const QString& url,
// as much about the transition type.
// TODO(cretz): Test when title/favicon is not changed or not present
if (!is_loading) {
PageIndex::MarkVisit(CurrentUrl(), current_title_,
auto title = current_title_.isNull() ? "" : current_title_;
PageIndex::MarkVisit(CurrentUrl(), title,
current_favicon_url_, current_favicon_);
}

@@ -524,7 +532,10 @@ void BrowserWidget::RecreateCefWidget(const QString& url,
}
});
connect(cef_widg_, &CefWidget::UrlChanged, [=](const QString& url) {
url_edit_->setText(url);
// If this starts with a data URI for text/html, we are going to be lazy
// and assume it's for an error page for now and not change the URL.
// TODO: Stop being lazy (and opening security holes) and show errors better
if (!url.startsWith("data:text/html;base64,")) url_edit_->setText(url);
});

if (widg_to_replace) {
@@ -679,18 +690,19 @@ void BrowserWidget::HandleContextMenuCommand(
}
}

void BrowserWidget::ShowError(const QString& failed_url,
void BrowserWidget::ShowError(const QString& /*failed_url*/,
const QString& error_text,
CefRefPtr<CefFrame> frame) {
if (!frame || frame->IsMain()) {
url_edit_->setStyleSheet("QLineEdit { background-color: pink; }");
number_of_load_completes_are_error_ = 2;
}
auto new_html =
QString("<html><body style=\"background-color: pink;\">"
QString("<html><head><title>(error)</title></head>"
"<body style=\"background-color: pink;\">"
"Error loading page: <strong>%1</strong>"
"</body></html>").arg(error_text);
cef_widg_->ShowStringPage(failed_url, new_html, frame);
cef_widg_->ShowStringPage(new_html, "text/html", frame);
}

void BrowserWidget::UpdateSslStatus(bool check_errored) {
6 changes: 0 additions & 6 deletions src/bubble.cc
Original file line number Diff line number Diff line change
@@ -306,9 +306,6 @@ void Bubble::ApplyBrowserSettings(
void Bubble::ApplyBrowserSettings(
const QHash<BrowserSetting::SettingKey, bool>& source,
CefRequestContextSettings* target) {
if (source.value(BrowserSetting::EnableNetSecurityExpiration, false)) {
target->enable_net_security_expiration = 1;
}
if (source.value(BrowserSetting::PersistUserPreferences, false)) {
target->persist_user_preferences = 1;
}
@@ -317,9 +314,6 @@ void Bubble::ApplyBrowserSettings(
void Bubble::ApplyBrowserSettings(
const QHash<BrowserSetting::SettingKey, bool>& source,
CefSettings* target) {
if (source.value(BrowserSetting::EnableNetSecurityExpiration, false)) {
target->enable_net_security_expiration = 1;
}
if (source.value(BrowserSetting::PersistUserPreferences, false)) {
target->persist_user_preferences = 1;
}
Loading