| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
BUG=444596
TEST=none
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/802473003
Cr-Commit-Position: refs/heads/master@{#309448}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
BUG=417463
R=derat@chromium.org
Review URL: https://codereview.chromium.org/680153002
Cr-Commit-Position: refs/heads/master@{#301490}
|
|
|
|
|
|
|
|
| |
BUG=417463
Review URL: https://codereview.chromium.org/621133002
Cr-Commit-Position: refs/heads/master@{#298040}
|
|
|
|
|
|
|
|
|
|
|
| |
See https://codereview.chromium.org/467193003/ for how.
BUG=none
Review URL: https://codereview.chromium.org/470663002
Cr-Commit-Position: refs/heads/master@{#289472}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289472 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some purely mechanical changes left over from r283694, now that
aura::test::EventGenerator has moved to ui::test in src/ui/events.
Moves aura/test/event_generator.* to event_generator_delegate_aura.*
Removes `using ui::test::EventGenerator;` declaration and redirects
includes that don't extend the delegate to include the ui/test
event_generator.h directly
BUG=378134
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285209
Review URL: https://codereview.chromium.org/406413004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285857 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Cleanups for aura/test/event_generator.h (resolve TODOs)
>
> Some purely mechanical changes left over from r283694, now that
> aura::test::EventGenerator has moved to ui::test in src/ui/events.
>
> Moves aura/test/event_generator.* to event_generator_delegate_aura.*
> Removes `using ui::test::EventGenerator;` declaration and redirects
> includes that don't extend the delegate to include the ui/test
> event_generator.h directly
>
> BUG=378134
>
> Review URL: https://codereview.chromium.org/406413004
TBR=tapted@chromium.org
Review URL: https://codereview.chromium.org/413983006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285222 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some purely mechanical changes left over from r283694, now that
aura::test::EventGenerator has moved to ui::test in src/ui/events.
Moves aura/test/event_generator.* to event_generator_delegate_aura.*
Removes `using ui::test::EventGenerator;` declaration and redirects
includes that don't extend the delegate to include the ui/test
event_generator.h directly
BUG=378134
Review URL: https://codereview.chromium.org/406413004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285209 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The revert broke Windows interactive_ui_tests. The world has probably
changed since this was first committed.
WidgetTestInteractive.CanActivateFlagIsHonored
http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%281%29/builds/29193/steps/interactive_ui_tests/logs/stdio
> Revert of [Refactor] Consolidate the logic for whether a widget can be activated. (https://codereview.chromium.org/286733002/)
>
> Reason for revert:
> This CL was causing problems when the value of views::Widget::CanActivate() changes crbug.com/374095
>
> I also need to audit the code to find out whether there are any 'non-activatable' widgets which were intended to be activatable
>
> Original issue's description:
> > [Refactor] Consolidate the logic for whether a widget can be activated.
> >
> > This is a first step towards giving tooltips their own WindowTreeHosts on Linux.
> >
> > BUG=353533
> > TEST=None
> >
> > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270597
>
> Review URL: https://codereview.chromium.org/297503003
TBR=pkotwicz@chromium.org
Review URL: https://codereview.chromium.org/291013003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271511 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
activated. (https://codereview.chromium.org/286733002/)
Reason for revert:
This CL was causing problems when the value of views::Widget::CanActivate() changes crbug.com/374095
I also need to audit the code to find out whether there are any 'non-activatable' widgets which were intended to be activatable
Original issue's description:
> [Refactor] Consolidate the logic for whether a widget can be activated.
>
> This is a first step towards giving tooltips their own WindowTreeHosts on Linux.
>
> BUG=353533
> TEST=None
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270597
Review URL: https://codereview.chromium.org/297503003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271468 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first step towards giving tooltips their own WindowTreeHosts on Linux.
BUG=353533
TEST=None
Review URL: https://codereview.chromium.org/286733002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270597 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Still building as part of the aura target, will fix that in a future step.
TBR=sky@chromium.org
http://crbug.com/308710
Review URL: https://codereview.chromium.org/206453005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258651 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
http://crbug.com/308843
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/174803002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252651 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
to use the base:: namespace.
BUG=330556
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/102443009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242444 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=315884, 78045
TBR=owners
Review URL: https://codereview.chromium.org/67923002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234373 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary as part of my plan to rework RootWindow, specifically making it not be a subclass of Window. (It will eventually be renamed WindowEventDispatcher). Code that expected to get the RootWindow interface from this type can still call GetDispatcher() on members of the returned vector of Windows.
R=oshima@chromium.org
http://crbug.com/308843
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233787
Review URL: https://codereview.chromium.org/64933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233970 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Eliminate Shell::RootWindowList in favor of aura::Window::Windows.
>
> This is necessary as part of my plan to rework RootWindow, specifically making it not be a subclass of Window. (It will eventually be renamed WindowEventDispatcher). Code that expected to get the RootWindow interface from this type can still call GetDispatcher() on members of the returned vector of Windows.
>
> R=oshima@chromium.org
> http://crbug.com/308843
>
> Review URL: https://codereview.chromium.org/64933002
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/59153004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233813 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary as part of my plan to rework RootWindow, specifically making it not be a subclass of Window. (It will eventually be renamed WindowEventDispatcher). Code that expected to get the RootWindow interface from this type can still call GetDispatcher() on members of the returned vector of Windows.
R=oshima@chromium.org
http://crbug.com/308843
Review URL: https://codereview.chromium.org/64933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233787 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clear existing hover effects in views when the cursor
becomes invisible by dispatching a mouse exit at
the cursor's location. Note we do not need to dispatch a
mouse enter when the cursor becomes visible because that
can only happen in response to a mouse event, which will
trigger its own mouse enter.
The early exit in Widget::OnMouseEvent() is no longer
needed since the issue it was originally meant to fix
(issue 239363) is also fixed by revision 208303. It is
being removed here since it blocks the dispatch of
mouse exit events.
BUG=244262,253317
R=oshima@chromium.org, sadrul@chromium.org
Review URL: https://codereview.chromium.org/23935007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224384 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unnecessary includes
BUG=253991
R=jamescook@chromium.org
Review URL: https://codereview.chromium.org/18080004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209143 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Re-enable tests that should pass on win7.
BUG=247427
Review URL: https://chromiumcodereview.appspot.com/16539005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205846 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
ash/, base/.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/15735027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204874 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Renames string16 -> base::string16 and
base/string_number_conversions.h -> base/strings/string_number_conversions.h
BUG=
Review URL: https://codereview.chromium.org/13856005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193561 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Desktop aura no longer spams the console with enable/disable mouse pointer messages.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/12263050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184798 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to the bounds of the Widget. We'll see how well that works.
BUG=175441
TEST=make sure tooltips work for win-aura.
R=varunjain@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12334017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184324 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type operations should cancel, such as menus. This is a precursor to
moving TooltipController to views.
BUG=175441
R=sadrul@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12294051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183693 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Automated clean up of style checker errors that were missed due to the plugin
not being executed on implementation files.
BUG=115047
Review URL: https://chromiumcodereview.appspot.com/12218027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181180 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a WidgetObserver event that is guaranteed to be invoked synchronously
when a Widget is requested to close. Rename the existing event, which
is invoked at Widget destruction time, typically via a task on the event
loop, to OnWidgetDestroying.
The new event will be used in Views-specific WebContentsModalDialogManager
functionality to get close events for Widgets, so that we don't risk
adverse interleaving of Widget close events with other relevant events
(e.g. IPC). This will allow us to avoids test flakiness observed
in https://codereview.chromium.org/12045037 due to event races in
PrintPreviewTest.PrintCommands
BUG=157161
Review URL: https://chromiumcodereview.appspot.com/12089061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180796 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Win/Metro.
This adds a test viewer process host to the ash unittests that starts and connects to the viewer process, using the provided hwnd as a backing surface for the tests.
This approach allows most of the ash unittests to pass except for two categories:
1) Tests that spin up more than one ash display. These don't work since each RootWindowHost thus created would require a remote connection and there is only one Metro viewer process.
2) Some number of tests seem to tickle a crash in shader.cc. These are short-circuited on Win8 with a TODO.
Some limitations:
1) The tests require chrome.exe to be registered as the default browser on Windows 8 to be used as a viewer process. This could be fixed in a future CL by creating a minimal viewer process for tests.
2) To register chrome.exe as the default browser, setup.exe needs to be built and run with
setup.exe --register-dev-chrome --register-dev-chrome-suffix=.test
This will be fixed in a future CL by extracting the registration code.
The interesting parts are in ash/test/test_metro_viewer_process_host.h
ash/test/test_metro_viewer_process_host.cc
Most of the rest is test disabling or calling the above.
BUG=154081
TEST=ash_unittests.exe on win8.
Review URL: https://chromiumcodereview.appspot.com/11830038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177946 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds the following APIs.
* CursorClient::DisableMouseEvents: Makes mouse events stop being sent
and hides the cursor if it is visible.
(For now, DisableMouseEvents just clears the hover state and doesn't
prevent mouse events from being generated, though).
* CursorClient::EnableMouseEvents: Makes mouse events start being sent
and shows the cursor if it was hidden with DisableMouseEvents.
* CursorClient::HideCursor: Makes the cursor invisible. This changes
only the cursor visibility and mouse events keep being sent even when
the cursor is invisible.
* CursorClient::ShowCursor: Makes the cursor visible. This does not take
effect When mouse events are disabled.
This CL just replaces the old usages of CursorClient::ShowCursor with
the new APIs to retain existing behavior.
I'll make another CL that uses these APIs in appropriate places.
BUG=153703
TEST=CursorManagerTest.EnableDisableMouseEvents, CursorManagerTest.ShowAndEnable
Review URL: https://chromiumcodereview.appspot.com/11412315
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173933 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This is the last step. Once this is done, we can possibly hide EventResult.
BUG=163618
Review URL: https://codereview.chromium.org/11592011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173653 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=163618
Review URL: https://codereview.chromium.org/11570012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173171 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=163618
Review URL: https://codereview.chromium.org/11568006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173166 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ash::internal::TooltipController was conditionally setting InitParams::parent,
which was putting tooltips in the wrong part of the ash hierarchy on some
platforms, while on others, there was no contextual information. Pass
InitParams::context on all platforms instead; this is what context is for.
BUG=151718, 161882
Review URL: https://chromiumcodereview.appspot.com/11516007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172402 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to Ben, parent_widget is a leftover from when we had
NativeViewGtk. It isn't needed now and everything should be handleable
by the normal parent.
BUG=161882
Review URL: https://chromiumcodereview.appspot.com/11299317
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171590 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=153703
Review URL: https://codereview.chromium.org/11419274
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170884 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, SetParent will query a global StackingClient object if NULL is
passed to it. Since we want different behavior on the desktop and on ash, we
need to break that. It has been replaced with two methods:
- SetParentTo(), which takes an aura window and does the parenting.
- SetDefaultParentByTargetRoot(), which takes a RootWindow as context and
asks the StackingClient on said RootWindow where it should parent the
window.
The problem is that people have relied for a long time on what amounts to a
global variable. This is the first of several patches that pass around a
context RootWindow. This patch focuses on ash/ unittests mostly. Later patches
will focus on threading context through Widget creation. The last patch in this
series will pull out the global stacking client interface and add DCHECKs so
NULL can't be passed to either of these methods on Window.
BUG=161882
Review URL: https://chromiumcodereview.appspot.com/11421006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170049 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use this in tooltip managers (158027 : Lockscreen leaks information via tooltip),
Use this in launcher animation on full lock in new animations (138171).
BUG=158027,138171
Review URL: https://chromiumcodereview.appspot.com/11416037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169033 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows getting rid of a whole bunch of noop implementations, and makes
it easier to add new event types to be dispatched through the EventDispatcher
to EventHandlers.
BUG=159632
Review URL: https://codereview.chromium.org/11348145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168817 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL converts the following list of aura::EventFilters into ui::EventHandlers:
* MouseCursorEventFilter
* DragDropController
* LauncherTooltipManager
* TooltipController
* EventRewriterEventFilter
* OverlayEventFilter
* PanelWindowEventFilter
* SystemModalContainerEventFilter
* UserActivityDetector
* WindowCycleEventFilter
* WindowModalityController
* FrameMaximizeButton::EscapeEventFilter
* TabScrubber
Also remove AddEnvEventFilter/RemoveEnvEventFilter from Shell functions since
all the filters for the shell have been converted.
BUG=159632
Review URL: https://codereview.chromium.org/11366214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167399 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
methods.
Replace use of these with operator +, +=, -, -=.
Covered by existing unit tests.
R=sky
BUG=158416,160158
Review URL: https://chromiumcodereview.appspot.com/11362173
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166933 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=none
Review URL: https://codereview.chromium.org/11364062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165877 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In windows ash mode, if a tooltip is going to be presented we end up
creating a desktop widget which is incorrect. The issue at hand
is the widget selection here:
views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget(
views::Widget::InitParams::Type type,
views::internal::NativeWidgetDelegate* delegate,
gfx::NativeView parent) {
if (parent && type != views::Widget::InitParams::TYPE_MENU)
return new views::NativeWidgetAura(delegate);
if (chrome::GetHostDesktopTypeForNativeView(parent) == chrome::HOST_DESKTOP_TYPE_NATIVE)
return new views::DesktopNativeWidgetAura(delegate);
return NULL;
}
For a tooltip the |parent| is null and that ends up returning a
views::DesktopNativeWidgetAura which is wrong and causes a crash. In ash
we need to return NativeWidgetAura
The alternative to this change is to have GetHostDesktopTypeForNativeView()
return not chrome::HOST_DESKTOP_TYPE_NATIVE.
BUG=151718
TEST= hover on the page tumbnails in the NTP and see the tooltips
Review URL: https://codereview.chromium.org/11344048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165709 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Point served two purposes, to be a position in 2d space, and also
an offset from the origin. This introduces a Vector2d class to represent an
offset, allowing typesafety checks for geometric operations.
The following are now the case:
Point +/- Vector = Point
- A point plus/minus an offset gives you a point at a position offset by the
vector.
Vector +/- Vector = Vector
- Two offsets can be added together to make a new offset.
Point - Point = Vector
- Subtracting one point from another gives you the offset between the two
points.
We add some new methods to perform these operations:
Rect::OffsetFromOrigin() gives the offset between the position of the rect
and the origin.
Point::OffsetFromOrigin() gives the offset between the point and the origin.
PointAtOffsetFromOrigin(Vector2d) converts a Vector2d to a Point at the given
offset away from the origin.
Rect::Offset(), Point::Add(), and Point::Subtract() now receive a Vector2d
instead of a point.
BUG=147395
R=sky
Review URL: https://codereview.chromium.org/11269022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165198 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
called on.
Currently some methods mutate the class, and some return a new value, requiring
API users to know what kind of method they are calling each time, and making
inconsistent code. For example:
gfx::Rect rect;
rect.Inset(1, 1, 1, 1);
rect = rect.Intersect(other_rect);
rect.Offset(1, 1);
Instead of:
gfx::Rect rect;
rect.Inset(1, 1, 1, 1);
rect.Intersect(other_rect);
rect.Offset(1, 1);
We could go either way - making the class immutable or all methods return a new
instance - but I believe it is better to instead make all methods mutate the
class. This allows for shorter lines of code by avoiding having to repeat the
object's name twice in order to change it.
This patch changes gfx::Rect classes and all the callsites that uses these
methods. It should make no change in behaviour, so no new tests added.
R=sky
BUG=147395
Review URL: https://codereview.chromium.org/11110004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163579 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is in support of supporting separate Screen implementations on Aura for desktop and metro on Windows.
Some callsites are not yet correct, and noted with a reference to the http://crbug.com/133312. As-is those sites will behave the same as before this patch, but may not be correct once desktop/metro can run simultaneously.
BUG=133312
Review URL: https://chromiumcodereview.appspot.com/11030017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161644 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a rect is (0, 0, 5, 5) the center should be 2.5, 2.5, not 2, 2.
Tests:
ui_unittests:RectTest.CenterPoint
ui_unittests:RectTest.CenterPointF
BUG=147395
Review URL: https://chromiumcodereview.appspot.com/11065050
TBR=danakj@chromium.org
Review URL: https://codereview.chromium.org/11086037
TBR=cpu@chromium.org
Review URL: https://codereview.chromium.org/11088048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160995 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a rect is (0, 0, 5, 5) the center should be 2.5, 2.5, not 2, 2.
Tests:
ui_unittests:RectTest.CenterPoint
ui_unittests:RectTest.CenterPointF
BUG=147395
Review URL: https://chromiumcodereview.appspot.com/11065050
TBR=danakj@chromium.org
Review URL: https://codereview.chromium.org/11086037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160993 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a rect is (0, 0, 5, 5) the center should be 2.5, 2.5, not 2, 2.
Tests:
ui_unittests:RectTest.CenterPoint
ui_unittests:RectTest.CenterPointF
BUG=147395
Review URL: https://chromiumcodereview.appspot.com/11065050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160976 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TBR=jam@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10917075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154817 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=none
Review URL: https://chromiumcodereview.appspot.com/10912063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154721 0039d316-1c4b-4281-b951-d872f2087c98
|