37534 Commits

Author SHA1 Message Date
Adam Barth
86650b9310 Add beginnings of an inspector backend for Sky
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/687673003
2014-10-28 10:46:47 -07:00
Adam Barth
e162dd0eef Fix services/network.sky test
mojo_shell can't handle loading the same DLL from two different URLs.  The
extra trailing slash was causing us to load the network_service DLL twice.

R=ojan@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/687703002
2014-10-28 09:55:58 -07:00
Adam Barth
226c7bd269 Move imports-can-load-404s.html to .sky so that it runs 2014-10-28 09:12:36 -07:00
Adam Barth
f0e6387fb6 Update tokenizer to match spec
This CL is a rough pass over the HTMLTokenizer to align it with parsing.md.
We'll need to do another pass more carefully in the future, but this CL gets us
roughly in the right ballpark.

We're not handling EOF properly. The parsing.md spec doesn't push the EOF
though the parser, which breaks our current way of handling EOF. We do ok if we
get EOF in the DataState, and that's enough to pass the tests for now.

Also, update camel-case.sky to reflect the fact that the parser doesn't
lower-case tag names anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678263002
2014-10-27 20:38:29 -07:00
Hixie
5dd15fe8d3 Move the tests from .html to .sky
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/685623002
2014-10-27 17:35:15 -07:00
Adam Barth
065437b16c Don't crash when importing a 404
Now we have a test for this case.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/682913002
2014-10-27 17:22:55 -07:00
Adam Barth
c4836daaaf Parse comments according to parsing.md
Now we don't even generate comment tokens. The new tokenizer for comments is
much easier.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/682893002
2014-10-27 17:04:52 -07:00
Adam Barth
735761cfc3 Parse Sky entities according to the spec
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678073002
2014-10-27 13:05:31 -07:00
Hixie
5981995300 Enter a description of the change.
Docs: Fix the script in the example to actually clone the template contents, not the template element itself.

Review URL: https://codereview.chromium.org/680673002
2014-10-24 16:23:03 -07:00
Eric Seidel
93d67ce41c Fix sky to pass 'gn check'
I also deleted the sky_common and sky_minimal targets
as those were only for the windows build
(which sky does not support).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/663483006
2014-10-24 15:00:55 -07:00
Hixie
6d1044e8a6 Docs: fix markdown in various files, update the README mildly
Review URL: https://codereview.chromium.org/678693003
2014-10-24 14:14:34 -07:00
Eric Seidel
44d30c6fa6 Remove a bunch of dead files found by missing_from_gn
I also fixed several errors in our BUILD.gn files
including bad script dependencies found by
missing_from_gn and gn check.

Still need to figure out how best to handle
:libraries deps being private to :core, etc.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/678703004
2014-10-24 13:50:21 -07:00
Eric Seidel
87fb3c9d19 Teach missing_from_gn about gn 'inputs'
Turns out gn has 3 types of sources:
inputs (non-source files)
sources (source files)
public (source files for APIs)

I've now taught missing_from_gn about inputs
brettw says I can ignore public for now as it's unlikely
anyone is using that.

R=brettw@chromium.org

Review URL: https://codereview.chromium.org/675283002
2014-10-24 13:44:44 -07:00
Eric Seidel
e7178210c5 Add a script for finding files missing from gn
Most of the files listed here can just be removed
from the repository.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/679783002
2014-10-24 11:36:40 -07:00
Eric Seidel
5a3423ff3d Test for border parsing I failed to include in my last change.
https://codereview.chromium.org/673073002/

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/654393004
2014-10-24 10:16:36 -07:00
Adam Barth
1a25166c33 Remove redundant LICENSE
This LICENSE file is redundant with the one in the top-level directory.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/674013003
2014-10-24 10:15:36 -07:00
Raph Levien
c74b7505c1 am 92e8cc70: Silently ignore invalid rangeOffset values
* commit '92e8cc7071364e58b3d5642649f7032a63f389f7':
  Silently ignore invalid rangeOffset values
2014-10-24 06:31:13 +00:00
Adam Barth
a6d358ef47 Fill in some missing sections in the Sky README.md
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/679583002
2014-10-23 20:32:07 -07:00
Ojan Vafai
52e4bc9c93 Get rid of ScrollView.
We only allow overflow scrolling. The frame isn't special.
This is a first step in making that happen. There's a lot of
code to remove after this patch, but this gets rid of
ScrollView and a bunch of frame-level scrolling code.

Had to add in a FrameWidget class so that Scrollbar.cpp had
a way of getting to FrameView::removeChild without pulling
a core class into platform. This might go away when we rip
out the Widget tree if we made it so that FrameView didn't
keep a list of Scrollbar instances.

Modified scrollbar.html to use overflow scrolling instead of
frame level scrolling. Once we get rid of the split between
Document and documentElement, we'll be able to make the root
element in the page scrollable as well (i.e. any child of the
Document).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/646273006
2014-10-23 20:20:25 -07:00
Eric Seidel
b0ea9ac245 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
2014-10-23 16:54:21 -07:00
Raph Levien
92e8cc7071 Silently ignore invalid rangeOffset values
Some fonts contain a cmap segment for char 0xffff that contains an
invalid rangeOffset. This was rejected by the existing code, which
means the font is considered to have empty Unicode coverage. This patch
just discards the invalid segment (consistent with OpenType Sanitizer),
making the custom font display.

Bug: 18106256
Change-Id: Icc8616a3030f80e62db906332be64d434ae72ea2
2014-10-23 23:31:42 +00:00
Rafael Weinstein
ccca233ad5 Update HACKING.md 2014-10-23 16:10:08 -07:00
Eric Seidel
0c525575cb Add --gdb argument to skydb
Makes it trivial to drop into gdb having launched
mojo_shell/sky with the right arguments.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/672383002
2014-10-23 16:02:39 -07:00
Rafael Weinstein
b6c1140c8e Fixing the fix 2014-10-23 16:02:04 -07:00
Eric Seidel
dd992e5f2f Teach tools/skydb how to handle paths
This makes it much easier to hack on test cases.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/654543004
2014-10-23 16:00:10 -07:00
Rafael Weinstein
b061da457e Added build instructions 2014-10-23 15:54:51 -07:00
Eric Seidel
d79cb9d734 Make skydb load examples/home.sky by default.
I had to also register for the text/plain mime-type
which turned out to be harder than expected.
Mostly due to my confusion with mojo_shell
using last-argument-wins argument parsing.

R=ianh@google.com

Review URL: https://codereview.chromium.org/672363002
2014-10-23 14:56:44 -07:00
John Abd-El-Malek
3c84485f2a Fix build.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/659043004
2014-10-23 14:54:07 -07:00
James Robinson
63a8a02db2 Fix sky build on android
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/678533002
2014-10-23 14:50:37 -07:00
Hixie
e6903a0867 Placeholder Sky start page.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/677513002
2014-10-23 13:42:24 -07:00
Eric Seidel
9f5a253a9e Teach tools/skydb how to take a URL as a parameter.
Turns out our shut-down code in debugger.cc is never
called.  Need to talk to Ben to figure out how
to listen for the CloseWindow.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/658113004
2014-10-23 13:40:48 -07:00
Adam Barth
4a2c99c0ec Update TestExpectations to match reality
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/671633005
2014-10-23 12:19:02 -07:00
Adam Barth
546708872d Add another missing dependency 2014-10-23 12:02:07 -07:00
Adam Barth
a3ca0e52d6 Add Sky to the build system
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/657863003
2014-10-23 11:29:54 -07:00
Adam Barth
b3df23f7c1 Open the Sky 2014-10-23 11:17:19 -07:00
Adam Barth
3c8baa179f Add a README.md for Sky
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/672963002
2014-10-23 11:05:40 -07:00
Raph Levien
5f94c59c2e am 6cba4a1d: Fine-tune fake-bolding condition
* commit '6cba4a1dcae7ce1a359638405c3703b3cbb91277':
  Fine-tune fake-bolding condition
2014-09-23 16:17:41 +00:00
Raph Levien
6cba4a1dca Fine-tune fake-bolding condition
The old logic for fake bolding results in no fake bolding for a bold
span on a light weight (300) because the target weight (600 in this
case) didn't meet the condition. This patch fine-tunes the threshold
to enable fake bolding for this.

Bug: 17587185

Change-Id: I04abd00a74240cbed79c417f81486aa2158b2806
2014-09-22 18:21:34 +00:00
Raph Levien
5a3a896405 am ff55a581: Snap advance widths to integers
* commit 'ff55a581fa07b52f3cffcf3fc825d297cf955ffe':
  Snap advance widths to integers
2014-09-04 00:16:27 +00:00
Raph Levien
ff55a581fa Snap advance widths to integers
Fractional advance widths were causing subtle problems with text
positioning when the same text was drawn with different spans in the
hwui renderer. Quantizing the coordinates on layout (as opposed to
waiting until the renderer draws the glyphs) solves the problem.

This patch also fixes a discrepancy between x position and advance
widths when letterspacing.

Bug: 17347779
Change-Id: Ia705944047408c2839d5ad078eefd6bbec446872
2014-09-03 10:42:52 -07:00
Raph Levien
604053e564 am 543c65c8: Try Unicode decomposition for selecting fallback font
* commit '543c65c80b71e3111314bf429004a10d004e861b':
  Try Unicode decomposition for selecting fallback font
2014-08-27 17:07:48 +00:00
Raph Levien
543c65c80b Try Unicode decomposition for selecting fallback font
This patch finds an appropriate fallback font in the case where no font
directly maps the requested character, but a font does exist for the
character's canonical decomposition. This yields correct rendering of
compatibility characters such as U+FA70.

Bug: 15816880
Bug: 16856221
Change-Id: Idff8ed6b942fec992a0815a32028b95af091d0ee
2014-08-26 22:20:16 -07:00
Behdad Esfahbod
ddd99662c1 am 11c8920a: Allocate font vector on stack
* commit '11c8920a3fc1c5895e777f71c822501367eef69c':
  Allocate font vector on stack
2014-08-22 18:36:40 +00:00
Behdad Esfahbod
11c8920a3f Allocate font vector on stack
This reduces another allocation (last one?) we were doing when
fulfilling shaping requests from the cache.

Bug: 17111260
Change-Id: Ieb8ae1ccfcaacedb257e1e9263777f10623aaf98
2014-08-21 19:25:06 -04:00
Behdad Esfahbod
55f6f0cd86 am df03550a: Fix Layout initialization in the skipCache path
* commit 'df03550a40706a55ca1bfcb67da62765194cf98f':
  Fix Layout initialization in the skipCache path
2014-08-21 22:09:56 +00:00
Behdad Esfahbod
df03550a40 Fix Layout initialization in the skipCache path
C++ local var initialization always tricks me.  Previously, Layout
didn't have a constructor, which meant that defining it on the stack
left mAdvance uninitialized.  This was not an issue when we were doing
"new Layout()", since that invokes zero-initialization, but was an
issue for the skipCache path that was allocating layout on stack by
just "Layout l" instead of "Layout l = Layout()".  To avoid surprises,
add a constructors that clears everything.

Also adds reset() method to reset the layout for reuse.

Change-Id: I3e02f00da9dd7d360abe13f63c310f6882292d0a
2014-08-21 17:26:04 -04:00
Behdad Esfahbod
2f65c78209 am a33151e9: Speed up cache lookup
* commit 'a33151e9c78c5547eeadbaaa9168dad361df05e4':
  Speed up cache lookup
2014-08-21 20:39:33 +00:00
Behdad Esfahbod
a33151e9c7 Speed up cache lookup
Avoid copying the string for cache lookup.

Bug: 17111260
Change-Id: Ic220bfc991fc6b3dada197304aabdf72a8941bd7
2014-08-21 14:00:25 -04:00
Behdad Esfahbod
a50cc8616c am 2f24599f: Choose same font for Emoji keycap and its base character
* commit '2f24599f4a258160854d18096b302ec2c3aa66c9':
  Choose same font for Emoji keycap and its base character
2014-08-08 19:56:55 +00:00
Behdad Esfahbod
2f24599f4a Choose same font for Emoji keycap and its base character
The U+20E3 COMBINING KEYCAP is used in our fonts to generate an emoji
rendering of ASCII numbers and letters through GSUB.  For that to work
we need to choose the same (Emoji) font for the character coming
*before* the COMBINING KEYCAP character.

This is a special-case of a broader need to choose fonts per grapheme
cluster as opposed to per character, but for now, special-case U+20E3.

Bug: 7557244
Change-Id: I958e5a01068df8495bbb9bc3b9ed871cea1838b6
2014-08-08 15:37:28 -04:00