229 Commits

Autor SHA1 Mensagem Data
avi@chromium.org 34aae555c2 Draw the image at the origin rather than one pixel to the right.
BUG=none
TEST=favicons, images shouldn't be shifted, left edge shouldn't be broken

Review URL: http://codereview.chromium.org/149473

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20405 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-10 20:08:04 +00:00
agl@chromium.org 997dddebf6 Linux: don't crash when performing font fallback to a non-scalable font.
Previously we were filtering out non-scalable fonts /after/ the fact.
This patch changes it so that we specify to fontconfig that it
shouldn't return non-scalable fonts to us.

We also duplicate this code into WebFontInfo so that we don't get
these issues when performing glyph-fallback.

http://codereview.chromium.org/149437
BUG=16403


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20351 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-10 01:22:39 +00:00
thestig@chromium.org 05fe2add74 Remove svn:executable property from files that don't need it.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/155199

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20161 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 17:39:27 +00:00
thestig@chromium.org b586ca4fa5 Make font fallback case insensitive.
BUG=16047
TEST=Go to a site that has css with font-family: sans on Debian Lenny.
Review URL: http://codereview.chromium.org/149292

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20123 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-08 02:35:08 +00:00
chrome-bot 28cd9de2a8 A null CGImageRef should be treated as a "null" SkBitmap,
one in which isNull() returns true.

This assertion was being tripped as a result of some
recent changes I made to expose a CGImageRef as the basis
or a WebKit::WebImage.  I think it makes sense to put
this null check in CGImageToSkBitmap instead of at each
callsite.

TEST=covered by mac ui tests
BUG=none
TBR=mark

Review URL: http://codereview.chromium.org/149173

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19900 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-03 06:40:02 +00:00
deanm@chromium.org 4ef364e09e Include gdk.h in canvas_paint_linux.h, it uses gdk_cairo_create.
Review URL: http://codereview.chromium.org/151147


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19732 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-01 15:37:55 +00:00
tc@google.com ea64444719 Enable some skia unittests on linux and mac.
This enables the ImageOperations.* and SkiaUtils.* test_shell_tests
on linux and mac.

Review URL: http://codereview.chromium.org/151097


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19701 0039d316-1c4b-4281-b951-d872f2087c98
2009-07-01 01:33:52 +00:00
avi@chromium.org bf97b87ddd Add favicons to tabs on the Mac. Also moved SkBitmapToNSImage() to
skia/ext/skia_utils_mac.h and removed chrome/browser/cocoa/cocoa_utils.h.

Patch by rsesek.

BUG=13565

http://codereview.chromium.org/131018


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19266 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-25 18:16:39 +00:00
avi@chromium.org 9b014bb8fd Reverting r19244 as it unintentionally broke ui tests: OtherRedirectsDontForkProcess InEmptyFrame TestLifetimeOfDomAutomationController
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19245 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-25 14:23:41 +00:00
avi@chromium.org ffd874d61e Add favicons to tabs on the Mac. Also moved SkBitmapToNSImage() to
skia/ext/skia_utils_mac.h and removed chrome/browser/cocoa/cocoa_utils.h.

Patch by rsesek.

BUG=13565

Review URL: http://codereview.chromium.org/131018



git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19244 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-25 13:58:34 +00:00
amanda@chromium.org 04e7f19dfc Update Skia transfer modes for Skia r239
Review URL: http://codereview.chromium.org/146134

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19217 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-25 01:34:12 +00:00
amanda@chromium.org 6cf3210f3a Update WebKit to 45111 and Skia to 239
Review URL: http://codereview.chromium.org/147121

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19211 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-25 01:01:52 +00:00
agl@chromium.org d2083b750e Linux: fix double italic on some fonts.
If we ask fontconfig for an italic font, it might take a roman font
and set the undocumented property FC_MATRIX to a skew matrix. It'll
then say that the font is italic or oblique. So, if we see a matrix,
we don't believe that it's italic.

BUG=15212

http://codereview.chromium.org/147108


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19184 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-24 22:19:11 +00:00
agl@chromium.org 612a4c0b3d Linux: fix fake italics for fonts without italic variants.
Before this patch we assumed that the style which we got from
fontconfig was the one that we asked for. Rather than do this we need
to query the resulting style and plumb that back into WebKit. Once
WebKit knows that there's a mismatch between the request and actual
styles it can trigger faking.

BUG=14810

http://codereview.chromium.org/147005


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19095 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-24 02:32:32 +00:00
thakis@chromium.org 2efa108ef9 Reverting 19043.
Review URL: http://codereview.chromium.org/146058

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19081 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-23 23:40:03 +00:00
thakis@chromium.org 67a87e991e Bring in a patch to skia that's required for
http://codereview.chromium.org/141037 .

BUG=http://crbug.com/14020
TEST=none

Review URL: http://codereview.chromium.org/146003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19043 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-23 19:35:25 +00:00
thestig@chromium.org 17666ed5ba Only select scalable fonts. Fixed-size fonts don't work with FT_Set_Char_Size in SkFontHost_FreeType.cpp.
BUG=13007
TEST=On Linux, visit url with { font-family: fixed; } on a computer with pcf fonts.
Review URL: http://codereview.chromium.org/131096

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18832 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-19 18:16:04 +00:00
avi@google.com 2049fa0793 Reverting r18743.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18755 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 21:41:58 +00:00
avi@google.com 1ece0a75b1 Add favicons to tabs on the Mac. Also moved SkBitmapToNSImage() to
skia/ext/skia_utils_mac.h and removed chrome/browser/cocoa/cocoa_utils.h.

Patch by rsesek.

BUG=13565

Review URL: http://codereview.chromium.org/131018



git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18743 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 20:23:44 +00:00
craig.schlenter@chromium.org d9bd585c28 Fix a skia valgrind error.
Review URL: http://codereview.chromium.org/134001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18710 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 16:19:56 +00:00
agl@chromium.org 028b1921fe Linux: move SyncIPC function from Skia to base.
I'll be needing in some pending WebKit changes.

http://codereview.chromium.org/131006


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18676 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-18 00:44:42 +00:00
mark@chromium.org b6aa3fdd8c Review URL: http://codereview.chromium.org/125205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18519 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-16 20:06:59 +00:00
mark@chromium.org cb07a308be Add file icons to chrome://downloads/ on the Mac. Add Skia helper
CGImageToSkBitmap().

Patch by Robert Sesek <rsesek@bluestatic.org>

Review URL: http://codereview.chromium.org/118488

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18517 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-16 19:57:22 +00:00
mark@chromium.org 23308d4bd3 Stop leaking CGBitmapContextRefs. Regression from r18363.
BUG=14105
TEST=sh tools/valgrind/chrome_tests.sh --build_dir xcodebuild/Debug --test unit --gtest_filter=RenderWidgetHostTest.Resize
Review URL: http://codereview.chromium.org/126159

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18452 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 23:49:18 +00:00
agl@chromium.org 97d0408a33 Linux: fix memory leak in new SkFontHost code.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18424 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 20:16:13 +00:00
mark@chromium.org dd0060b0e6 Rename CreateWithContext to Create
Review URL: http://codereview.chromium.org/126150

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18420 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 20:04:03 +00:00
mark@chromium.org 9b3f752ac9 Properly use data when creating a bitmap platform canvas. Gets things painting
on the screen again.  Regressed in r18363.
Review URL: http://codereview.chromium.org/126140

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18415 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 19:05:44 +00:00
agl@chromium.org b21a8103c9 Linux: remove some unused structures from SkFontHost_fontconfig_ipc.h
(These were a merge artifact from r18405 which additionally broke the build on
GCC 4.4).


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18413 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 18:57:26 +00:00
agl@chromium.org 62f818c8bc Linux: fix layout tests with italic text.
I had a typo in r18405 which meant that italic text wasn't actually
italic. This broke, ah, 'several' layout tests.


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18411 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 18:39:32 +00:00
agl@chromium.org f901349e99 Linux: Add support for chrooted renderers.
http://code.google.com/p/chromium/wiki/LinuxSandboxIPC

Without filesystem access from the renderers, we need another way of
dealing with fontconfig and font loading.

This add support for:
  * An "SBX_D" environment variable in the renderers which is used to
    signal the end of dynamic linking so that the chroot can be
    enforced.
  * A sandbox_host process, running outside the sandbox, to deal with
    fontconfig requests from the renderers. See the wiki page for
    the reasoning behind making it a separate process.
  * A new, custom SkFontHost for Skia. Because this is Chrome
    specific, it will live outside the upstream Skia tree. This
    FontHost can be configured either to drive fontconfig directly
    (for the browser process and for any unsandboxed renderers) or to
    use an IPC system. Since the same SkFontHost has to be linked into
    both the browser and renderer (they are the same binary), this
    switch has to be made at run time.

Sandbox IPC calls are rare (a couple of dozen at page load time) and
add about 50us of overhead for each call.

(Reland of r17575 which was reverted in r17577)

http://codereview.chromium.org/112074
BUG=8081


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18405 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-15 18:15:08 +00:00
brettw@chromium.org c40e89248c Refactor the PlatformContext layer to have only one class.
Previously we had three classes of PlatformCanvas*, one for each platform. Then
we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the
specific platform.

This means that it was almost impossible to forward-declare PlatformCanvas and
there were a bunch of unnecessary includes of platform_canvas.h in header
files.

This change makes there be only one platform_canvas.h header with ifdefs, which
removes a decent amount of duplicated code. There is a platform-independent
file, and one platform-dependent file of platform_canvas for each platform.

I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in
this case I kept the separate headers since there was much less overlap.

I also broke out CanvasPaint into separate headers so this template doesn't
need to be included all over the project (only a couple of files actually need
it).

Review URL: http://codereview.chromium.org/125109

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-14 15:14:53 +00:00
jrg@chromium.org 7c159999aa Add favicons to Mac bookmark bar.
BUG=8381

TEST=Open bookmark bar (Cmd-B).  Add some bookmarks with sites that
have favicons (cnn.com).  See icons in bookmark buttons.  Make sure
color is correct.

Review URL: http://codereview.chromium.org/125061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18340 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-13 00:53:18 +00:00
brettw@google.com f854d00f01 Remove misleading comment - we no longer crash when CreateDIBSection() fails,
just return null

Also remove unused GetLastError() call; no error is being returned anyway.

R=brettw
BUG=http://crbug.com/10977
TEST=none
Original review: http://codereview.chromium.org/120006
Patch by dpranke@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18195 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-11 20:55:38 +00:00
pkasting@chromium.org f95b3ae9e3 Update DEPS to pull in upstream changes that remove RGBA32Buffer::bitmap(), and rewrite local tests to compile. Also pulls in a change that upstreamed V8CustomBinding, since that got bracketed between my upstream changes; this includes the Chromium side of that too.
This change exposed a deficiency in the XBM testing where we were erroneously using a zero-length set of image data to calculate the MD5 sum (because we were using the buffer rect instead of the image size, and the XBM decoder wasn't correctly setting the rect).  Fixed the test to use the image size (which is more correct for this application), will fix the XBM decoder upstream to set the rect correctly.

This in turn required generating new MD5 sums, which required patching the generation code (which is normally #ifdefed away) to also work with the past couple years of changes.

This commit will need to land at the same time as one that updates the expected sums; during the period where either commit is in place without the other, the XBM decoding tests will fail.

BUG=13633
TEST=Covered by unittests
Review URL: http://codereview.chromium.org/121001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18131 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-11 01:08:37 +00:00
mad@google.com 2b23411e5d To help resolve the performance issue introduced when enabling the resize corner, we now keep all non-intersecting rects separately and send an array of invalidation bitmaps via IPC as opposed to a single unionized rect :-)
Review URL: http://codereview.chromium.org/108040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18090 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-10 21:41:54 +00:00
darin@chromium.org 957e0dbac2 Update webkit to r44571
BUG=none
TEST=none
R=pkasting

Review URL: http://codereview.chromium.org/119430

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18073 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-10 17:51:58 +00:00
brettw@chromium.org 42b128f512 Fix a unit test failure. One of the tests sends an empty bitmap through this
function, which has no config, and the assertion fails. I just removed the
assretion, we assume ARGB8888 everywhere.
Review URL: http://codereview.chromium.org/118456

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17976 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-09 21:06:14 +00:00
brettw@chromium.org 4ff6ea4061 Add a mipmap-like divide-by-two image scaling algorithm. I am going to use this
for on-the-fly generated thumbnails.
Review URL: http://codereview.chromium.org/118341

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17957 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-09 17:45:03 +00:00
sky@chromium.org b68be71d6c Adds ability to change compositing operator used by CanvasPaint.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/119226

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17744 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-05 18:23:47 +00:00
glen@chromium.org 23a237eec2 Add ability to theme our buttons.
BUG=12762
TEST=Verify that buttons can be themed.

Review URL: http://codereview.chromium.org/119025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17586 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-04 02:31:02 +00:00
agl@chromium.org 92fc42b357 Revert r17575 and r17576. They are causing layout test errors.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17577 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-04 00:29:15 +00:00
agl@chromium.org 6e6eddc8d2 Linux: Add support for chrooted renderers.
http://code.google.com/p/chromium/wiki/LinuxSandboxIPC

Without filesystem access from the renderers, we need another way of
dealing with fontconfig and font loading.

This add support for:
  * An "SBX_D" environment variable in the renderers which is used to
    signal the end of dynamic linking so that the chroot can be
    enforced.
  * A sandbox_host process, running outside the sandbox, to deal with
    fontconfig requests from the renderers. See the wiki page for
    the reasoning behind making it a separate process.
  * A new, custom SkFontHost for Skia. Because this is Chrome
    specific, it will live outside the upstream Skia tree. This
    FontHost can be configured either to drive fontconfig directly
    (for the browser process and for any unsandboxed renderers) or to
    use an IPC system. Since the same SkFontHost has to be linked into
    both the browser and renderer (they are the same binary), this
    switch has to be made at run time.

Sandbox IPC calls are rare (a couple of dozen at page load time) and
add about 50us of overhead for each call.

http://codereview.chromium.org/112074
BUG=8081


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17575 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-04 00:04:07 +00:00
senorblanco@chromium.org da452451e7 Roll DEPS to skia r198. This picks up a number of bugfixes for layout tests,
and font stuff for Linux.  Rebaselines affected tests, adjusts
test_expectations, and removes an extraneous include dir.  (Also sets the
svn:mime-type prop on some of the linux PNG files; they still diff as text
in rietveld this time, but I think they should be happier for next time.)

BUG=http://crbug.com/12002
TEST=If it builds, and layout tests pass, you're happy.

Review URL: http://codereview.chromium.org/118128

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17434 0039d316-1c4b-4281-b951-d872f2087c98
2009-06-02 22:02:18 +00:00
senorblanco@chromium.org 22041c3961 Remove the remainder of the skia source code from the Chromium repo. It now lives over in third_party/skia (I only removed the headers in the first CL, since it was too unwieldy with all these deletes).
BUG=none
TEST=If it builds, you're happy.
R=dglazkov

Review URL: http://codereview.chromium.org/113827

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16893 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-26 20:03:03 +00:00
brettw@chromium.org d6470b2294 Histogram the time we spend resampling images. We suspect this may be causing
performance problems, so it would be nice to see what average users are seeing.
Review URL: http://codereview.chromium.org/113604

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16486 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-20 16:49:47 +00:00
chrome-bot 7554bf4a70 Fix Skia includes to use the whole path name.
Review URL: http://codereview.chromium.org/115412

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16374 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-19 14:55:05 +00:00
senorblanco@chromium.org ae16cc1c08 Add some missing copyright headers.
R=brettw

Review URL: http://codereview.chromium.org/115414

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16185 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-15 21:29:20 +00:00
senorblanco@chromium.org 4f6954e695 Fix the shared build on linux after the skia move.
Committed on behalf of craig.schlenter@gmail.com.
Original review URL=http://codereview.chromium.org/115303

Review URL: http://codereview.chromium.org/115310

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15979 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-13 18:42:36 +00:00
senorblanco@chromium.org 1f435d10b5 More green please: Vector canvas matrix test disable, mac fix, mark layout
tests failing.

TBR=brettw

Review URL: http://codereview.chromium.org/113342

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15952 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-13 14:30:00 +00:00
senorblanco@chromium.org 0431c42f63 This CL updates chrome to the latest version of skia, retrieved via DEPS, and
placed in third_party.  All relevant skia changes (for all 3 platforms) have
been upstreamed.

Most of this CL is mind-numbingly repetitive.  Things of interest are:  skia.gyp
(now points at third_party versions), DEPS, and SkUserConfig.h.  stdint.h:  Skia
now requires C99 integer types, which MSVC doesn't support natively.  I have put
typedefs in config/win/stdint.h.

Note that the new version of skia appears to render rects whose coordinates
are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled.  There
were a couple obvious instances of this in the code which I fixed, but there may
be more.

There were ~35 layout test failures due to minor pixel differences which I
rebaselined on Windows and Linux, and 8 genuine failures related to masks and
stroked text, which I have put in text_expectations.txt and assigned to
myself.  (There was another change which broke ~1700 tests on each platform,
but I put that change behind an #ifdef for now).

R=brettw

Review URL: http://codereview.chromium.org/65012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
2009-05-13 13:16:52 +00:00