Fix border parsing to work again

I accidentally broke border parsing when
removing CSS color keyword hacks.

While debugging this I also ran into a
race condition in the debugger, which
is fixed here.

Add --gdb argument to skydb

Makes it trivial to drop into gdb having launched
mojo_shell/sky with the right arguments.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/673073002
This commit is contained in:
Eric Seidel 2014-10-23 16:54:21 -07:00
parent ccca233ad5
commit b0ea9ac245

View File

@ -70,6 +70,9 @@ class SkyDebugger : public mojo::ApplicationDelegate,
window_manager_app_->InitFocus(
new FocusRules(window_manager_app_.get(), content_));
if (!pending_url_.empty())
NavigateToURL(pending_url_);
}
virtual void OnViewManagerDisconnected(
@ -98,7 +101,13 @@ class SkyDebugger : public mojo::ApplicationDelegate,
// Overridden from Debugger
virtual void NavigateToURL(const mojo::String& url) override {
content_->Embed(url);
// We can get Navigate commands before we've actually been
// embedded into the view and content_ created.
// Just save the last one.
if (content_)
content_->Embed(url);
else
pending_url_ = url;
}
scoped_ptr<mojo::WindowManagerApp> window_manager_app_;
@ -106,6 +115,7 @@ class SkyDebugger : public mojo::ApplicationDelegate,
mojo::ViewManager* view_manager_;
mojo::View* root_;
mojo::View* content_;
std::string pending_url_;
DISALLOW_COPY_AND_ASSIGN(SkyDebugger);
};