summaryrefslogtreecommitdiffstats
path: root/ui/gfx
Commit message (Collapse)AuthorAgeFilesLines
* setConfig is deprecated, use setInfo or allocPixels insteadreed@google.com2014-07-0116-127/+74
| | | | | | | | | | kPMColor_SkColorType -> kN32_SkColorType BUG= Review URL: https://codereview.chromium.org/361643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280863 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Copy and offset glyph positions instead of ↵ckocagil@chromium.org2014-06-303-15/+15
| | | | | | | | | | | Canvas::Translate() BUG=381933 R=msw Review URL: https://codereview.chromium.org/359043004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280574 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Move RenderText tests into gfx_unittests target.tfarina@chromium.org2014-06-291-0/+7
| | | | | | | | | | | | | | This is pretty straightforward, just moving the render_text_unittest.cc entries from ui_unittests.gyp to gfx_tests.gyp, since now everything needed for it to run is already provided by the gfx_unittests framework. BUG=331829 TEST=ui_unittests, gfx_unittests TBR=ben@chromium.org,danakj@chromium.org Review URL: https://codereview.chromium.org/354323002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280551 0039d316-1c4b-4281-b951-d872f2087c98
* Remove palmer from some OWNERS files for IPC security review.palmer@chromium.org2014-06-271-1/+0
| | | | | | Review URL: https://codereview.chromium.org/361513002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280382 0039d316-1c4b-4281-b951-d872f2087c98
* Put GN version of gfx_unittests target more in sync with the GYP version.tfarina@chromium.org2014-06-271-2/+3
| | | | | | | | | | | | | This makes it run its custom test suite, GfxTestSuite, instead of running the one from base. BUG=None TEST=gn gen out/Debug_gn && ninja -C out/Debug_gn/gfx_unittests R=sky@chromium.org Review URL: https://codereview.chromium.org/359493003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280266 0039d316-1c4b-4281-b951-d872f2087c98
* gfx: ipc: Remove deprecated calls from SkBitmap IPC traitsspang@chromium.org2014-06-261-15/+19
| | | | | | | | | BUG=377497 TEST=chrome --ozone-platform=gbm Review URL: https://codereview.chromium.org/354483006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280155 0039d316-1c4b-4281-b951-d872f2087c98
* Export PlatformFontWin::HFontRefhans@chromium.org2014-06-261-1/+1
| | | | | | | | | | | | | | | | The inner class needs to be exported in case any uses in inline methods or vtable of the outer class causes it to potentially be referenced across a shared library boundary. On non-Windows, the visibility attribute is already inherited by nested classes, but on Windows, they must be marked explicitly. BUG=82385 TEST=use Clang to do component release build of chrome on Windows Review URL: https://codereview.chromium.org/349443005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280111 0039d316-1c4b-4281-b951-d872f2087c98
* Set id and rotation for gfx::Display on Mac.mlamouri@chromium.org2014-06-261-2/+7
| | | | | | | | | | | It will allow getting the correct screen orientation reading and the id will permit using DisplayObservers. BUG=122863,16282 Review URL: https://codereview.chromium.org/356523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280036 0039d316-1c4b-4281-b951-d872f2087c98
* MacViews: Implement Set/Get*Bounds for NativeWidgetMac.tapted@chromium.org2014-06-263-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | In toolkit-views, "Bounds" corresponds to the NSWindow frame (including titlebar and borders). This CL maps that onto NSWindow in InitNativeWidget, GetWindowBoundsInScreen, GetClientAreaBoundsInScreen, SetBounds and SetSize, performing the required coordinate system conversions. 5 more views_unittests pass after this: BubbleDelegateTest.NonClientHitTest CustomFrameViewTest.{CannotMaximizeHidesButton, DefaultButtonLayout, LeadingButtonLayout}, ViewTest.ConversionsToFromScreen. The CL also adds a cross-platform WidgetTest.GetWindowBoundsInScreen to ensure the behavior is consistent across platforms, and because there wasn't really anything to cover just bounds setting (e.g. to verify the coordinate flipping Cocoa needs to do). BUG=378134 TEST=views_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279975 Review URL: https://codereview.chromium.org/353643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280005 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of MacViews: Implement Set/Get*Bounds for NativeWidgetMac ↵tapted@chromium.org2014-06-263-65/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/353643002/) Reason for revert: Breaks on 64-bit mac (doh). NSRect is declared differently, so a forward declare won't work. Original issue's description: > MacViews: Implement Set/Get*Bounds for NativeWidgetMac. > > In toolkit-views, "Bounds" corresponds to the NSWindow frame (including > titlebar and borders). This CL maps that onto NSWindow in > InitNativeWidget, GetWindowBoundsInScreen, GetClientAreaBoundsInScreen, > SetBounds and SetSize, performing the required coordinate system > conversions. > > 5 more views_unittests pass after this: > BubbleDelegateTest.NonClientHitTest > CustomFrameViewTest.{CannotMaximizeHidesButton, DefaultButtonLayout, > LeadingButtonLayout}, ViewTest.ConversionsToFromScreen. > > The CL also adds a cross-platform WidgetTest.GetWindowBoundsInScreen to > ensure the behavior is consistent across platforms, and because there > wasn't really anything to cover just bounds setting (e.g. to verify the > coordinate flipping Cocoa needs to do). > > BUG=378134 > TEST=views_unittests > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279975 TBR=rsesek@chromium.org,sky@chromium.org,andresantoso@chromium.org NOTREECHECKS=true NOTRY=true BUG=378134 Review URL: https://codereview.chromium.org/351603004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279976 0039d316-1c4b-4281-b951-d872f2087c98
* MacViews: Implement Set/Get*Bounds for NativeWidgetMac.tapted@chromium.org2014-06-263-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | In toolkit-views, "Bounds" corresponds to the NSWindow frame (including titlebar and borders). This CL maps that onto NSWindow in InitNativeWidget, GetWindowBoundsInScreen, GetClientAreaBoundsInScreen, SetBounds and SetSize, performing the required coordinate system conversions. 5 more views_unittests pass after this: BubbleDelegateTest.NonClientHitTest CustomFrameViewTest.{CannotMaximizeHidesButton, DefaultButtonLayout, LeadingButtonLayout}, ViewTest.ConversionsToFromScreen. The CL also adds a cross-platform WidgetTest.GetWindowBoundsInScreen to ensure the behavior is consistent across platforms, and because there wasn't really anything to cover just bounds setting (e.g. to verify the coordinate flipping Cocoa needs to do). BUG=378134 TEST=views_unittests Review URL: https://codereview.chromium.org/353643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279975 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "linux: Use subpixel positioning for forced scale factor."oshima@chromium.org2014-06-261-11/+3
| | | | | | | | | | | | Font looks reasonable now at 2.0, so this is no longer necessary. BUG=361598 R=derat@chromium.org TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/347223007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279945 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bookmark button text directionality and eliding.msw@chromium.org2014-06-251-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | r278156 changed these buttons to LabelButton instances. Make these buttons respect their text directionality. Add LabelButton::SetDirectionalityMode to fix the Label. Respect forced directionality in Canvas::DrawFadedString. (still need to align with UI for text/icon placement) (I might change this pattern in the future) Use fade eliding on Linux, but ellipsis eliding on Win. (the text looks bad faded on Win due to Issue 388084) See bookmark_fading_and_alignment_fix_PS2b[_linux].png at http://crbug.com/388086#c3 and http://crbug.com/388086#c4 BUG=388086,388084 TEST=Long RTL bookmarks elide correctly, look good. R=sky@chromium.org Review URL: https://codereview.chromium.org/350813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279863 0039d316-1c4b-4281-b951-d872f2087c98
* Move IPC traits for SkBitmap, gfx_geometry into ui/gfx/ipcspang@chromium.org2014-06-255-0/+445
| | | | | | | | | | | | We need these outside of content (under ui/ozone), so move them. No functional change. BUG=377497 TEST=chrome --ozone-platform=gbm Review URL: https://codereview.chromium.org/343003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279825 0039d316-1c4b-4281-b951-d872f2087c98
* Fix creating platform font on Windowstmoniuszko@opera.com2014-06-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | fdwCharSet param changed from 0 to DEFAULT_CHARSET (which is defined to 1). ScriptShape fails to generate glyphs on Windows XP for some complex scripts (Hindi text for instance) if font is created with fdwCharSet=0. Other paramaters are unchanged because they still expand to 0. BUG=361994 TEST=On Windows XP, go to Control Panel and Regional and Language Options. Under Languages tab check Install files for Complex Script and right-to-left languages (including Thai) and Install files for East Asian languages. Click Details and install Hindi language. Launch Chromium. Go to advanced settings and go to Languages. Add Hindi language and click Display Chromium in this language button. Restart Chromium. Expected result: Hindi font glyphs should be properly generated for all UI elements (tabs, menus, notification panels). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263001 Review URL: https://codereview.chromium.org/230793003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279719 0039d316-1c4b-4281-b951-d872f2087c98
* PlatformFontWin::DeriveFontWithHeight insensitive to base font's heighttmoniuszko@opera.com2014-06-253-3/+69
| | | | | | | | | | As a side effect this commit fixes also bug 149151 and allows https://codereview.chromium.org/230793003/ patch to be applied without breaking tests. BUG=367092 Review URL: https://codereview.chromium.org/251773002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279657 0039d316-1c4b-4281-b951-d872f2087c98
* GN: Only have one gfx_x11 targetjamesr@chromium.org2014-06-233-26/+3
| | | | | | | | | I don't think we need two of these and in the component build since they both attempt to produce libgfx_x11.so this produces ninja warnings. Review URL: https://codereview.chromium.org/334633010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279159 0039d316-1c4b-4281-b951-d872f2087c98
* Extract touchscreen device management into a generic managerdnicoara@chromium.org2014-06-231-0/+1
| | | | | | | | | | DeviceDataManager is currently X11 specific, so CrOS code that is responsible for touchscreen management would only work under X11. This CL starts extracting device state as generic state that X11 and Ozone implementations can share. BUG=375848 Review URL: https://codereview.chromium.org/289283015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279126 0039d316-1c4b-4281-b951-d872f2087c98
* Use ImageSkiaSource to create ImageSkia from ImagePNGRepsoshima@chromium.org2014-06-203-35/+111
| | | | | | | | | | | | | | gfx::ImageKia will fetch the ImageSkiaRep based on resource scale factor (supported one) and scale accordingly. BUG=381601 TEST=covered by test. R=ananta@chromium.org, pkotwicz@chromium.org, rsesek@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278589 Review URL: https://codereview.chromium.org/340613004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278783 0039d316-1c4b-4281-b951-d872f2087c98
* ozone: Move the factory interfaces into a common target.sadrul@chromium.org2014-06-2011-618/+0
| | | | | | | | | | | | | | | | | | | | This patch moves: * CursorFactoryOzone out of ui/base/cursor/ into ui/ozone/public * EventFactoryOzone out of ui/events/ into ui/ozone/public * SurfaceFactoryOzone, OverlayCandidatesOzone, SurfaceOzoneCanvas, and SurfaceOzoneEGL out of ui/gfx/ into ui/ozone/public * FileSurfaceFactory out of ui/gfx/ into ui/ozone/platform/test, since the test platform is the only one that uses it. This patch also builds a separate ozone_base target that includes just the factories. BUG=361137 R=bsalomon@google.com, piman@chromium.org, rjkroege@chromium.org, sky@chromium.org, spang@chromium.org Review URL: https://codereview.chromium.org/312393002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278699 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 278589 "Use ImageSkiaSource to create ImageSkia from Imag..."ricow@chromium.org2014-06-203-109/+35
| | | | | | | | | | | | | | | | | | | | | | | This seems to be the cause for gfs failures on ios simulator dbg See: http://build.chromium.org/p/chromium.mac/builders/iOS%20Simulator%20%28dbg%29/builds/16784 > Use ImageSkiaSource to create ImageSkia from ImagePNGReps > gfx::ImageKia will fetch the ImageSkiaRep based on resource scale factor (supported one) and scale accordingly. > > BUG=381601 > TEST=covered by test. > R=ananta@chromium.org, pkotwicz@chromium.org, rsesek@chromium.org > > Review URL: https://codereview.chromium.org/340613004 TBR=oshima@chromium.org Review URL: https://codereview.chromium.org/347983004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278651 0039d316-1c4b-4281-b951-d872f2087c98
* Use ImageSkiaSource to create ImageSkia from ImagePNGRepsoshima@chromium.org2014-06-203-35/+109
| | | | | | | | | | | | gfx::ImageKia will fetch the ImageSkiaRep based on resource scale factor (supported one) and scale accordingly. BUG=381601 TEST=covered by test. R=ananta@chromium.org, pkotwicz@chromium.org, rsesek@chromium.org Review URL: https://codereview.chromium.org/340613004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278589 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that mouse events on Windows reposted by the menu_controller are ↵ananta@chromium.org2014-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | converted to pixel. On HiDPI windows these coordinates are in DIPs. While posting them via the PostMessage API we need to convert them back to pixel using the correct scale factor. This caused bookmarks to get incorrectly saved at times. Changes in this patch are as below:- 1. menu_controller.cc. Convert screen_loc to pixels before invoking Win32 API's as they expect values in pixels. 2. screen_win.cc. Fix the GetWindowAtScreenPoint function to convert the point to pixels before invoking the WindowFromPoint API. BUG=381605 R=sky Review URL: https://codereview.chromium.org/341763002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278559 0039d316-1c4b-4281-b951-d872f2087c98
* Repairs crash in RTreeBase::Node::LeastAreaEnlargementluken@chromium.org2014-06-196-1514/+1766
| | | | | | | | | | | | | | | | | | | | This CL was originally uploaded at https://codereview.chromium.org/269513002 but was reverted due to a high number of crash reports on Windows. The issue was that RTree::Insert() would remove duplicate nodes before re-inserting them, but didn't handle the corner case where the root node would end up as a non-leaf node with only one child. RTree::Remove() did the right thing in this case, which is to remove the root and replace it with its solitary child, but RTree::Insert() did not. This lead to a situation with invalid trees being created that would ultimately lead to a crash on a subsequent call to RTree::Insert(). A short unit test that reproduced the crash is included. BUG=384736 Review URL: https://codereview.chromium.org/342723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278227 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor views::Label and gfx::RenderText shadow functions.msw@chromium.org2014-06-183-12/+7
| | | | | | | | | | | | | | This is mechanical cleanup in preparation for a Label rewrite. Use simple gfx::ShadowValues setter functions everywhere. Remove a forbidden static FontList instance. BUG=240037 TEST=No appearance changes for views text shadows. R=sky@chromium.org Review URL: https://codereview.chromium.org/343513002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278101 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Move canvas tests into gfx_unittests target.tfarina@chromium.org2014-06-181-0/+2
| | | | | | | | | | | | | Pretty straightforward, nothing really blocks it, so we can move it easily from ui_unittests target to gfx_unittests now. BUG=331829 TEST=ui_unittests, gfx_unittests with/out --test-launcher-bot-mode TBR=danakj@chromium.org,ben@chromium.org Review URL: https://codereview.chromium.org/332353004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277978 0039d316-1c4b-4281-b951-d872f2087c98
* Make BoundsAnimator always own its animation delegate.pkasting@chromium.org2014-06-171-3/+2
| | | | | | | | | | | All non-unittest code wanted this behavior. BUG=none TEST=none Review URL: https://codereview.chromium.org/331323005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277707 0039d316-1c4b-4281-b951-d872f2087c98
* Removing the GetUndocumentedDPIScale and GetUndocumentedDPITouchScale ↵ananta@chromium.org2014-06-172-40/+0
| | | | | | | | | | | | | methods from ui/gfx/win/dpi.cc/.h as these are no longer needed given that Chrome is now HiDPI aware. On the same lines removed some code from the GetMinimizeButtonOffsetForWindow function for window which attempts to workaround some issues with Surface Pro. This is also not needed given that we are HiDPI aware. BUG=338172 Review URL: https://codereview.chromium.org/336873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277696 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 276827 "readability review for luken"cpu@chromium.org2014-06-166-1753/+1514
| | | | | | | | | | | | | | | | | | | This is crashing for our canary users on Windows BUG=384736 > readability review for luken > > original code review at: > https://codereview.chromium.org/245763002/ > > Review URL: https://codereview.chromium.org/269513002 TBR=luken@chromium.org Review URL: https://codereview.chromium.org/338833004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277532 0039d316-1c4b-4281-b951-d872f2087c98
* Add unittests for X11TopmostWindowFinderpkotwicz@chromium.org2014-06-132-3/+4
| | | | | | | | | | | | | | | | A couple of additional changes: - Moves X11PropertyChangeWaiter to its own class so that it can be shared among several tests - Moves the dependency on Xlib.h out of path_x11.h and uses forward declaration instead. This is necessary because the definitions of "None" and "Bool" in Xlib.h conflict with those in gtest. - Moves X11WindowEventFilter::SetUseHostWindowBorders() into x11_util.cc so that it can be used in tests on X windows which are not associated with a views::Widget BUG=None TEST=X11TopmostWindowFinderTest.* R=sadrul TBR=sky (For trivial change to the includes in ui/gfx/path_x11.*) Review URL: https://codereview.chromium.org/264713007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277116 0039d316-1c4b-4281-b951-d872f2087c98
* Fix and simplify RTHB GetGlyphXBoundary logicckocagil@chromium.org2014-06-133-10/+42
| | | | | | | | | | BUG=382692 R=msw NOTRY=true Review URL: https://codereview.chromium.org/328683003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277069 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Replace bare static pointer with base::LazyInstance<>::Leakyckocagil@chromium.org2014-06-131-21/+26
| | | | | | | | | | BUG=383956 R=msw NOTRY=true Review URL: https://codereview.chromium.org/334743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276956 0039d316-1c4b-4281-b951-d872f2087c98
* readability review for lukenluken@chromium.org2014-06-126-1514/+1753
| | | | | | | | | original code review at: https://codereview.chromium.org/245763002/ Review URL: https://codereview.chromium.org/269513002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276827 0039d316-1c4b-4281-b951-d872f2087c98
* Move unusual character block logic to a helper functionckocagil@chromium.org2014-06-124-32/+64
| | | | | | | | | | BUG= NOTRY=true R=msw Review URL: https://codereview.chromium.org/324983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276776 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb GpuMemoryBuffer allocation to GPU process.alexst@chromium.org2014-06-122-14/+27
| | | | | | | | BUG=368716 Review URL: https://codereview.chromium.org/302603004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276738 0039d316-1c4b-4281-b951-d872f2087c98
* [Memory Sheriff] Force a well-defined path for system leak.groby@chromium.org2014-06-121-0/+15
| | | | | | | | BUG=379331 Review URL: https://codereview.chromium.org/308713007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276609 0039d316-1c4b-4281-b951-d872f2087c98
* gfx/ui/color_profile: implement GetDisplayColorProfile on winnoel@chromium.org2014-06-122-3/+71
| | | | | | | | | | | | Add a global device color profile cache and use it to extract the color profile associated with screen display devices. TEST=ui_unittests.exe --gtest_filter="ColorProfileTest*" BUG=368694 Review URL: https://codereview.chromium.org/312723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276589 0039d316-1c4b-4281-b951-d872f2087c98
* Reland: Use labels to display views tab titles.msw@chromium.org2014-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original r276450 was reverted in r276476 for leaks: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%283%29/builds/3954 Fixed here by calling AddChildView(title_) on Tab (duh). Add a Label view to Tab for displaying the title. Remove Tab::PaintTitle, bounds and font members. Remove unnecessary Tab::Get[Title|Icon]Bounds helpers. Update the text on Tab::SetData, not during paint. Use gfx::DirectionalityMode, remove the Label enum. Add gfx::ALIGN_TO_HEAD to gfx::HorizontalAlignment. Add Label::GetHorizontalAlignment for ALIGN_TO_HEAD. Always flip left/right in Label::SetHorizontalAlignment. Have Tab and MessageBoxView use ALIGN_TO_HEAD. Update comments and tests, related minor cleanup. TODO: Make Label cache RenderText objects. TODO: Make RenderText support ALIGN_TO_HEAD. BUG=240037 TEST=No visible Views tab title changes. R=sky@chromium.org Review URL: https://codereview.chromium.org/329813003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276566 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land RenderTextHarfBuzz: Decide run direction by BiDi embedding levelckocagil@chromium.org2014-06-123-42/+59
| | | | | | | | | | | | Original CL: https://codereview.chromium.org/326123003/ BUG=382178 NOTRY=true R=msw Review URL: https://codereview.chromium.org/323403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276525 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Use labels to display views tab titles. ↵rouslan@chromium.org2014-06-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/323993002/) Reason for revert: Appears to have a memory leak. See: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%283%29/builds/3954 Original issue's description: > Use labels to display views tab titles. > > Add a Label view to Tab for displaying the title. > Remove Tab::PaintTitle, bounds and font members. > Remove unnecessary Tab::Get[Title|Icon]Bounds helpers. > Update the text on Tab::SetData, not during paint. > Use gfx::DirectionalityMode, remove the Label enum. > > Add gfx::ALIGN_TO_HEAD to gfx::HorizontalAlignment. > Add Label::GetHorizontalAlignment for ALIGN_TO_HEAD. > Always flip left/right in Label::SetHorizontalAlignment. > Have Tab and MessageBoxView use ALIGN_TO_HEAD. > > Update comments and tests, related minor cleanup. > > TODO: Make Label cache RenderText objects. > TODO: Make RenderText support ALIGN_TO_HEAD. > > BUG=240037 > TEST=No visible Views tab title changes. > R=sky@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276450 TBR=sky@chromium.org,msw@chromium.org NOTREECHECKS=true NOTRY=true BUG=240037 Review URL: https://codereview.chromium.org/327273005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276476 0039d316-1c4b-4281-b951-d872f2087c98
* Use labels to display views tab titles.msw@chromium.org2014-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a Label view to Tab for displaying the title. Remove Tab::PaintTitle, bounds and font members. Remove unnecessary Tab::Get[Title|Icon]Bounds helpers. Update the text on Tab::SetData, not during paint. Use gfx::DirectionalityMode, remove the Label enum. Add gfx::ALIGN_TO_HEAD to gfx::HorizontalAlignment. Add Label::GetHorizontalAlignment for ALIGN_TO_HEAD. Always flip left/right in Label::SetHorizontalAlignment. Have Tab and MessageBoxView use ALIGN_TO_HEAD. Update comments and tests, related minor cleanup. TODO: Make Label cache RenderText objects. TODO: Make RenderText support ALIGN_TO_HEAD. BUG=240037 TEST=No visible Views tab title changes. R=sky@chromium.org Review URL: https://codereview.chromium.org/323993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276450 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of RenderTextHarfBuzz: Decide run direction by BiDi embedding level ↵ckocagil@chromium.org2014-06-113-55/+42
| | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/326123003/) Reason for revert: Memory leak: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%282%29/builds/3570/steps/ui_unittests/logs/HarfBuzz_RunDirection Original issue's description: > RenderTextHarfBuzz: Decide run direction by BiDi embedding level > > BUG=382178 > NOTRY=true > R=msw > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276379 TBR=msw@chromium.org NOTREECHECKS=true NOTRY=true BUG=382178 Review URL: https://codereview.chromium.org/324413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276387 0039d316-1c4b-4281-b951-d872f2087c98
* RenderTextHarfBuzz: Decide run direction by BiDi embedding levelckocagil@chromium.org2014-06-113-42/+55
| | | | | | | | | | BUG=382178 NOTRY=true R=msw Review URL: https://codereview.chromium.org/326123003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276379 0039d316-1c4b-4281-b951-d872f2087c98
* Enable arbitrary scale factoroshima@chromium.org2014-06-114-26/+7
| | | | | | | | | | BUG=372212 R=mukai@chromium.org TBR=sky@chromium.org Review URL: https://codereview.chromium.org/326073005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276354 0039d316-1c4b-4281-b951-d872f2087c98
* MacViews: Enable RenderTextHarfBuzz to get Textfields to work.andresantoso@chromium.org2014-06-111-0/+5
| | | | | | | | | | | | | | | Textfields require RenderTextHarfBuzz to work properly on the Mac because RenderTextMac's implementation is not complete. But RenderTextMac is used by the Cocoa UI to perform string sizing and elliding, HarfBuzz will not give the same answers. So for now we turn on HarfBuzz conditionally on OS_MACOSX and TOOLKIT_VIEWS. TextFieldModel and StyledLabel unit tests now pass without failures. BUG=378134 Review URL: https://codereview.chromium.org/326093004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276341 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scrollbar painting problems at 125/150% scales with HiDPI Chrome.ananta@chromium.org2014-06-101-19/+28
| | | | | | | | | | | | | | | | | | | | | | | The scrollbar down arrow would not show up randomly with the above scales. Reason being our old friend fractional scales and due to inconsistent scale factors applied in the NineImagePainter class. This class passes in the location and width/height in pixels to the Draw functions in the canvas to ensure that scaling does not occur. However the bounds rectangle was being scaled using the canvas image scale which can be different from the scale in the translation matrix in the canvas. For e.g. there is code in the compositor which scales the scrollbar rectangle using the device scale factor and calculates the real scale factor by dividing the scaled rectangle by the original rectangle. Fix is to scale the bounds passed into the NineImagePainter class with the transform in the canvas. Tested this with different scales and verified that the problem goes away and also does not regress the other bugs for which the change to draw in pixels in the NineImagePainter class was made. BUG=380256 R=sky@chromium.org, sky Review URL: https://codereview.chromium.org/325523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276157 0039d316-1c4b-4281-b951-d872f2087c98
* sets/clears highdpi registry settings on switch to/from metroluken@chromium.org2014-06-102-5/+9
| | | | | | | | | | | | | | There are some highdpi bugs in Chrome M35 and M36 that make it not particularly usable in desktop context, but on highdpi devices we require that highdpi mode be enabled when in Metro mode. This CL adds code to delegate_execute to force enable highdpi when entering Metro mode, and to disable it when exiting. BUG=362756 Review URL: https://codereview.chromium.org/323643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276133 0039d316-1c4b-4281-b951-d872f2087c98
* Add GN Build file for ui/events/ozone.tfarina@chromium.org2014-06-101-17/+0
| | | | | | | | | | | | | | | | | This was tested with: $ gn gen out/Debug_gn --args='use_ozone=true' $ ninja -C out/Debug_gn events_ozone events_ozone_evdev BUG=None TEST=see above R=brettw@chromium.org TBR=ben@chromium # for ui/ changes NOTRY=true Review URL: https://codereview.chromium.org/322983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276044 0039d316-1c4b-4281-b951-d872f2087c98
* [Ozone] Fixed Skia calldnicoara@chromium.org2014-06-101-1/+1
| | | | | | | | | | | | Fixes compiling of content_shell with Ozone TBR=spang@chromium.org NOTRY=true BUG=none Review URL: https://codereview.chromium.org/328763002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276042 0039d316-1c4b-4281-b951-d872f2087c98
* use setInfo instead of (deprecated) setConfigreed@chromium.org2014-06-091-10/+8
| | | | | | | | | | | | needed to unblock skia roll TBR= mac_chromium_rel is taking forever, and its run is clean w.r.t. this CL NOTRY=True Review URL: https://codereview.chromium.org/326583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275825 0039d316-1c4b-4281-b951-d872f2087c98