Git Product home page Git Product logo

core's Introduction

CircleCI Snap Status FlatHub Telegram Twitter Donate BountySource Patreon

Midori a lightweight, fast and free web browser

Midori Screenshot

Midori is a lightweight yet powerful web browser which runs just as well on little embedded computers named for delicious pastries as it does on beefy machines with a core temperature exceeding that of planet earth. And it looks good doing that, too. Oh, and of course it's free software.

Privacy out of the box

  • Adblock filter list support
  • Private browsing
  • Manage cookies and scripts

Productivity features

  • Open a 1000 tabs instantly
  • Easy web apps creation
  • Customizable side panels
  • User scripts and styles a la Greasemonkey
  • Web developer tools powered by WebKit
  • Cross-browser extensions compatible with Chrome, Firefox, Opera and Vivaldi

Please report comments, suggestions and bugs to: https://github.com/midori-browser/core/issues

Join the #midori IRC channel on Freenode or the Telegram group!

Installing Midori on Linux

If your distro supports snaps you can install the latest stable version of Midori from the snap store with a single command:

snap install midori

Spoilers: For those more adventurous types out there, trying out the preview of the next version is only the switch of a channel away.

You can also install Midori from FlatHub.

flatpak install flathub org.midori_browser.Midori

Installing Midori on Android

You can opt-in for the beta release on the Play Store.

Building from source

Requirements

Install dependencies on Astian OS, Ubuntu, Debian or other Debian-based distros:

sudo apt install cmake valac libwebkit2gtk-4.0-dev libgcr-3-dev libpeas-dev libsqlite3-dev libjson-glib-dev libarchive-dev intltool libxml2-utils

Install dependencies on openSUSE:

sudo zypper in cmake vala gcc webkit2gtk3-devel libgcr-devel libpeas-devel sqlite3-devel json-glib-devel libarchive-devel fdupes gettext-tools intltool libxml2-devel

Install dependencies on Fedora:

sudo dnf install gcc cmake intltool vala libsoup-devel sqlite-devel webkit2gtk3-devel gcr-devel json-glib-devel libpeas-devel libarchive-devel libxml2-devel

Use CMake to build Midori:

mkdir _build
cd _build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install

Spoilers: Pass -G Ninja to CMake to use Ninja instead of make (install ninja-build on Ubuntu/ Debian).

Midori can be run without being installed.

_build/midori

Testing

Unit tests

You'll want to unit test the code if you're testing a new version or contributed your own changes:

xvfb-run make check

Manual checklist

  • Browser window starts up normally, with optional URL(s) on the command line
  • Tabs have icons, a close button if there's more than one and can be switched
  • Urlbar suggests from typed search or URL, completes from history and highlights key
  • Private data can be cleared
  • Shortcuts window shows most important hotkeys
  • Download button lists on-going and finished downloads
  • javascript:alert("test"), javascript:confirm("test") and javascript:input("test") work
  • Websites can (un)toggle fullscreen mode
  • Shrinking the window moves browser and page actions into the respective menus

Release process

We're on a 8/4 cycle which means 8 weeks of features and 4 weeks of stabilization capped at a release once every 3 months ie. at the last of the third month.

Update CORE_VERSION in CMakeLists.txt to 10.0. Add a section to CHANGELOG.md. Add release to data/org.midori_browser.Midori.appdata.xml.in.

git commit -p -v -m "Release Midori 10.0"
git checkout -B release-10.0
git push origin HEAD
git archive --prefix=midori-v10.0/ -o midori-v10.0.tar.gz -9 HEAD

Propose a PR for the release. Publish the release on https://github.com/midori-browser/core/releases Promote snap on https://snapcraft.io/midori/release to the stable channel

Troubleshooting

Testing an installed release may reveal crashers or memory corruption which require investigating from a local build and obtaining a stacktrace (backtrace, crash log).

gdb _build/midori
run
…
bt

If the problem is a warning, not a crash GLib has a handy feature

env G_MESSAGES_DEBUG=all gdb _build/midori

On Windows you can open the folder where Midori is installed and double-click gdb.exe which opens a command window:

file midori.exe
run
…
bt

To verify a regression you might need to revert a particular change:

# Revert only d54c7e45
git revert d54c7e45

Contributing code

Coding style and quality

Midori code should in general have:

  • 4 space indentation, no tabs
  • Between 80 to 120 columns
  • Use // or /* */ style comments
  • Call variables animal and animal_shelter instead of camelCase
  • Keep a space between functions/ keywords and round parentheses
  • Prefer new Gtk.Widget () over using Gtk; new Widget ()
  • Midori and GLib namespaces should be omitted
  • Don't use private specifiers (which is the default)
  • Stick to standard Vala-style curly parentheses on the same line
  • Cuddled } else { and } catch (Error error) {

Working with Git

If you haven't yet, check that GitHub has your SSH key.

Spoilers: You can create an SSH key with Passwords and Keys aka Seahorse or ssh-keygen -t rsa and specify Host github.com with User git in your SSH config. See GitHub docs for further details.

Fork the project on GitHub.

# USERNAME is your GitHub username
git clone [email protected]:USERNAME/core.git

Prepare to pull in updates from upstream:

git remote add upstream https://github.com/midori-browser/core.git

Spoilers: The code used to be hosted at lp:midori and git.xfce.org/apps/midori respectively.

The development master (trunk, tip) is the latest iteration of the next release.

git checkout upstream/master

Pick a name for your feature branch:

git checkout -B myfeature

Remember to keep your branch updated:

git pull -r upstream master

Tell git your name if you haven't yet:

git config user.email "<email@address>"
git config user.name "Real Name"

See what you did so far

git diff

Get an overview of changed and new files:

git status -u

Add new files, move/ rename or delete:

git add FILENAME
mv OLDFILE NEWFILE
rm FILENAME

Commit all current changes, selected interactively:

git commit -p -v

If you have one or more related bug reports you should mention them in the commit message. Once these commits are merged the bug will automatically be closed and the commit log shows clickable links to the reports:

Fixes: #123

If you've made several commits:

git log

In the case you committed something wrong or want to amend it:

git reset --soft HEAD^

If you end up with unrelated debugging code or other patches in the current changes it's sometimes handy to temporarily clean up. This may be seen as git's version of bzr shelve:

git stash save
git commit -p -v
git stash apply

As a general rule of thumb, git COMMAND --help gives you an explanation of any command and git --help -a lists all available commands.

Push your branch and propose it for merging into master.

git push origin HEAD

This will automatically request a review from other developers who can then comment on it and provide feedback.

Extensions

Cross-browser web extensions

The following API specification is supported by Midori:

manifest.json
  name
  version
  description
  background:
    page: *.html
    scripts:
    - *.js
  browser_action:
    default_popup: *.html
    default_icon: *.png
    default_title
  sidebar_action:
    default_panel: *.html
    default_icon: *.png
    default_title
  content_scripts:
    js:
    - *.js
    css:
    - *.css
  manifest_version: 2

*.js
  browser (chrome)
    tabs
      create
      - url: uri
      executeScript
      - code: string
    notifications
      create
      - title: string
        message: string

Jargon

  • freeze: a period of bug fixes eg. 4/2 cycle means 4 weeks of features and 2 weeks of stabilization
  • PR: pull request, a branch proposed for review, analogous to MR (merge request) with Bazaar
  • ninja: an internal tab, usually empty label, used for taking screenshots
  • fortress: user of an ancient release like 0.4.3 as found on Raspberry Pie, Debian, Ubuntu
  • katze, sokoke, tabby: legacy API names and coincidentally cat breeds
  • web extension: a cross-browser extension (plugin) - or in a webkit context, the multi-process api

Midori for Android

The easiest way to build, develop and test Midori on Android is with Android Studio (snap).

When working with the command line, setting JAVA_HOME is paramount:

export JAVA_HOME=/snap/android-studio/current/android-studio/jre/

Afterwards you can run commands like so:

./gradlew lint test

Midori for Windows

For Linux developers

Dependencies

Midori for Windows is compiled on a Linux host and MinGW stack. For the current build Fedora 18 packages are used. Packages needed are listed below:

yum install gcc vala intltool

For a native build

yum install libsoup-devel webkitgtk3-devel sqlite-devel

For cross-compilation

yum install mingw{32,64}-webkitgtk3 mingw{32,64}-glib-networking mingw{32,64}-gdb mingw{32,64}-gstreamer-plugins-good

Packages needed when assembling the archive

yum install faenza-icon-theme p7zip mingw32-nsis greybird-gtk3-theme

Installing those should get you the packages needed to successfully build and develop Midori for Win32.

Building

For 32-bit builds:

mkdir _mingw32
cd _mingw32
mingw32-cmake .. -DCMAKE_INSTALL_PREFIX=/usr/i686-w64-mingw32/sys-root/mingw -DCMAKE_VERBOSE_MAKEFILE=0
make
sudo make install

For 64-bit builds:

mkdir _mingw64
cd _mingw64
mingw64-cmake .. -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw -DCMAKE_VERBOSE_MAKEFILE=0
make
sudo make install

Once built and tested you can assemble the Midori archive with a helper script

32-bit build:

env MINGW_PREFIX="/usr/i686-w64-mingw32/sys-root/mingw" ./win32/makedist/makedist.midori

64-bit build:

env MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw/" ./win32/makedist/makedist.midori x64

Testing

For testing your changes a real system is recommended because WebKitGTK+ doesn't work properly under Wine. Mounting your MinGW directories as a network drive or shared folder in a Windows VM is a good option.

For Windows developers

Prerequisites

Spoilers: 32-bit versions are known to be more stable at the time of this writing.

Using download-mingw-rpm.py

  • Launch cmd.exe and navigate to the folder where the script was saved.
  • Make sure that Python can access 7z.exe.
  • Run the following command and wait for it to extract the packages into your current directory:
  • c:\Python33\python.exe download-mingw-rpm.py -u http://ftp.wsisiz.edu.pl/pub/linux/fedora/linux/updates/18/i386/ --deps mingw32-webkitgtk mingw32-glib-networking mingw32-gdb mingw32-gstreamer-plugins-good

See Fedora 18 packages.

Spoilers: Use msys.bat to launch a shell

core's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

Add preference to Make Midori the default browser

There should be an easily discoverable option to make Midori the default web browser.

And, too, it'd be nice to show an infobar suggesting to do this automatically if Midori isn't already the default (which could be closed and won't show again).

Customization Tab Bar

This is a small idea to give more flexibility and customization to the browser and for the end user to decide where he wants to position the tab bar, up, down, right, left, etc.

Expose closed tabs in the UI

Currently the list of closed tabs is stored in the browser and accessible via Control-Shift+T. This functionality should be exposed in the UI.

Need help with packaging Midori on a system with the latest version of GTK+ and Vala

Hi,

I'm maintaining Midori for Arch Linux. After GTK+ was updated beyond 3.10, the latest release of Midori no longer builds.

midori: 0.5.11
gtk3: 3.24.1
webkit2gtk: 2.22.2

I have tried to patch Midori heavily with the following shell commands:

sed 's/protected Tally/public Tally/g' -i midori/midori-notebook.vala
sed 's/%d other files/%u other files/g' -i extensions/transfers.vala
for f in transfers adblock/widgets apps history-list notes; do
  sed 's,.remove (iter,.remove (ref iter,g' -i "extensions/$f.vala"
done
find . -type f -regex '.*\.\(c\|vala\)' -exec sed -i \
    's/Gtk.STOCK_FILE/"text-x-generic"/g;s/Gtk.STOCK_CLOSE/"window-close"/g;s/Gtk.STOCK_ADD/"list-add"/g;s/Gtk.STOCK_HELP/"help-browser"/g;s/Gtk.STOCK_APPLY/""/g;s/Gtk.STOCK_CANCEL/""/g;s/Gtk.STOCK_COPY/"edit-copy"/g;s/Gtk.STOCK_DELETE/"edit-delete"/g;s/Gtk.STOCK_EDIT/""/g;s/Gtk.STOCK_OPEN/"document-open"/g;s/Gtk.STOCK_PREFERENCES/"preferences-system"/g;s/Gtk.STOCK_PROPERTIES/"document-properties"/g;s/Gtk.STOCK_SAVE/"document-save"/g;s/Gtk.STOCK_CLEAR/"edit-clear"/g;s/Gtk.STOCK_DIRECTORY/"folder"/g' \
    "{}" +;
find . -type f -regex '.*\.\(c\|vala\)' -exec sed -i \
    's/g_dbus_generate_guid/GLib.DBus.generate_guid/g' "{}" +;

This makes Midori build again, and it works fine for many webpages, but fails when first opening a webpage in a tab, then closing midori and then opening midori again. For instance with https://news.ycombinator.com/.

The error in the console is:

** (midori4:18219): CRITICAL **: 11:19:31.096: gboolean webkit_web_view_get_tls_info(WebKitWebView*, GTlsCertificate**, GTlsCertificateFlags*): assertion 'wkCertificateInfo' failed

I am building with -DHALF_BRO_INCOM_WEBKIT2=ON.

My goal is to package Midori so that it works together with the latest version of GTK+ and is as stable as possible.

Do you have any upcoming patches that could help me out here?

Best regards,
Alexander F. Rødseth

Reframe the future Midore

Possibly this is the characteristic that could most impact the whole community but as the title says it is to refocus the future, the proposal although it is very ambitious is viable and can be executed,

The proposal is to migrate the project to Qt, although I know that it is a somewhat complex task at the technical level, it is viable without ever thinking about changing WebKit.

Pros

  1. We gain more customization.
  2. Midori could reach mobile devices.
  3. Creation of new UI and UX with much more easy.
  4. Possibility of greater contribution by the community.
  5. Integration with new technologies for user interfaces.
  6. Separation of the programming layer and the interface layer.
  7. Complete restructuring.

Contra

  1. Greater effort when using webkit.
  2. Greater slowness at the time of development and adaptation to new languages.
  3. Delay with the roadmap.
  4. Others.

Energy saving mode

This is a great feature that can be offered to all users both experts and beginners as it will help the battery life by decreasing the electronic consumption.

Re-implement single-website "app" mode

  • The CLI switch -a/ --app initiates "app" mode.
  • Browser contains basically a single "pinned" tab.
  • New tabs or windows can't be opened (except via -e/ --execute).
  • Keyboard shortcuts aren't available.
  • Context menus aren't available.
  • Fullscreen mode is unavailable (except via -e/ --execute Fullscreen).

Implement Location and Orientation API

to improve the experience and functional features for the end user it is possible to implement the location and orientation API added to this this feature also helps the development of WebApps

Re-implement bookmarks as a Peas plugin

Bookmarks as a complete feature used to be scattered all over the codebase. The new core must remain clean, so only Activatables shall be used to implement these components:

  • Bookmarks completion
  • Add a bookmark via the 🔖 popover

Credentials Management

One of the biggest utilities in all scenarios is a credential administrator, this must be implemented in a secure way in the database encrypting everything stored here using a strong algorithm.

if browser remembers URLs visited before shutdown even during Never Remember History

I understand Midori is based on Firefox. I haven't had Midori recently, but that was my impression when I did use it. If it is and if you don't read all of the Firefox Bugzilla bugs implicating security, please look at https://bugzilla.mozilla.org/show_bug.cgi?id=1476152 and consider weighing in as appropriate.

It's about the Never Remember History setting remembering old history, meaning URLs visited. Some of us think that undermines security while some people think remembering visited URLs even after a reboot is what it should do. As an alternative, I proposed amending the wording "Never Remember History" to reflect what the program does, maybe "Never Remember Future History (Keep Old History)", but even rewording seems to be in dispute. That's in discussion at https://bugzilla.mozilla.org/show_bug.cgi?id=513421 but that's years old and still hasn't been implemented. If I were to try to patch it myself, patching might take hours and there's substantial risk it would be rolled back by another programmer. This is a security leak.

If it could affect Midori, please consider participating or patching.

Implement Firefox Sync support

The SyncStorage API allows syncing:

  • bookmarks
  • history
  • forms
  • preferences
  • tabs
  • passwords

Ideally this can be implemented as an extension so it can be easily enabled and disabled as necessary, although making it part of the core may be necessary.

This should be considered a meta issue to track implementation of the above items, some of which depend on features that aren't in the new core yet.

See ANDROID-13 for the Android epic

Save Image As doesn't ask where to save

The context menu item "Save Image As" is currently misleading. The image is directly saved to the default download folder while the description suggests it would show a dialog to select the destination.

Font size always scaled up ?

Hello

Back to midori since a long time, I have a strange problem. Whatever the page I open, it is zoomed. I need to hit CTRL+0 to scale down to "normal" font size.

In paramteters, I've got the normal size option for font activated... Any idea ?

Setup new translation service (weblate)

Due to the move off Launchpad the translation service needs re-visiting. That includes documenting the workflow.

WebLate is a nice free software solution, and they also offer free hosting for free software projects

Implement Telemetry system

The telemetry system is a service that not only helps to know which are the falls that the system has but also that allows us to collect information to know the behavior of it. Returns, conflicting components etc.

Existing web process activatables should pick up changes in settings

If a Midori.Settings instance is used in a web process changes to values made in the GUI won't automatically be propagated. This needs support for (automatically) reloading external changes.

  • This affects the Adblock extension when toggling the global enabled state and adding or removing filters.
  • Manual modifications to the core config file are currently silently lost.
  • A fix for #118 that relies on CoreSettings would be affected by this.

Re-implement Paste and Proceed

"Paste and Proceed" inserts the URL from the clipboard and opens the page.

  • There should be a menu item Paste and p_roceed when right-clicking the urlbar.
  • The keyboard shortcut ^Shift+V should do the same.

Search for words in the navigation history

This is a very interesting and important feature since it will give users the possibility to search for a specific word in the history by minimizing the time required to find what they want to find.

Cycle through recently used tabs (history list)

Optionally switching tabs should go by most recent activity rather than the order within the window. Bonus points for a shortcut that allows the regular behavior whilst remapping default hotkeys.

Re-implement adblock as a Peas plugin

  • Toolbar icon to toggle blocker globally
  • Ability to choose what filters to use
  • Automatic fetching and updating of filter lists
  • Hook into WebPage.send_request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.