Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: sky/specs/style.md

Issue 731863006: Specs: Fix even more markdown errors (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Sky Style Language 1 Sky Style Language
2 ================== 2 ==================
3 3
4 Planed changes 4 Planed changes
5 -------------- 5 --------------
6 6
7 Add //-to-end-of-line comments to be consistent with the script 7 Add //-to-end-of-line comments to be consistent with the script
8 language. 8 language.
9 9
10 10
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 return false; 313 return false;
314 ``` 314 ```
315 315
316 If that code returns false, then that node an all its descendants must 316 If that code returns false, then that node an all its descendants must
317 be dropped from the render tree. 317 be dropped from the render tree.
318 318
319 If any node is removed in this pass relative to the previous pass, and 319 If any node is removed in this pass relative to the previous pass, and
320 it has an ownerLayoutManager, then call 320 it has an ownerLayoutManager, then call
321 321
322 ```node.ownerLayoutManager.release(node)``` 322 ```javascript
323 node.ownerLayoutManager.release(node)
324 ```
323 325
324 ...to notify the layout manager that the node went away, then set the 326 ...to notify the layout manager that the node went away, then set the
325 node's layoutManager and ownerLayoutManager attributes to null. 327 node's layoutManager and ownerLayoutManager attributes to null.
326 328
327 ```javascript 329 ```javascript
328 callback any ValueResolver (any value, String propertyName, StyleNode node, Floa t containerWidth, Float containerHeight); 330 callback any ValueResolver (any value, String propertyName, StyleNode node, Floa t containerWidth, Float containerHeight);
329 331
330 class StyleNode { 332 class StyleNode {
331 // this is generated before layout 333 // this is generated before layout
332 readonly attribute String text; 334 readonly attribute String text;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 sky:core by default registers: 402 sky:core by default registers:
401 403
402 - 'block': sky.BlockLayoutManager 404 - 'block': sky.BlockLayoutManager
403 - 'paragraph': sky.ParagraphLayoutManager 405 - 'paragraph': sky.ParagraphLayoutManager
404 - 'inline': sky.InlineLayoutManager 406 - 'inline': sky.InlineLayoutManager
405 - 'none': null 407 - 'none': null
406 408
407 409
408 Layout managers inherit from the following API: 410 Layout managers inherit from the following API:
409 411
410 ``` 412 ```javascript
411 class LayoutManager { 413 class LayoutManager {
412 readonly attribute StyleNode node; 414 readonly attribute StyleNode node;
413 constructor LayoutManager(StyleNode node); 415 constructor LayoutManager(StyleNode node);
414 416
415 void take(StyleNode victim); // sets victim.ownerLayoutManager = this; 417 void take(StyleNode victim); // sets victim.ownerLayoutManager = this;
416 // assert: victim hasn't been take()n yet during this layout 418 // assert: victim hasn't been take()n yet during this layout
417 // assert: victim.needsLayout == true 419 // assert: victim.needsLayout == true
418 // assert: an ancestor of victim has needsLayout == this (aka, victim is a d escendant of this.node) 420 // assert: an ancestor of victim has needsLayout == this (aka, victim is a d escendant of this.node)
419 421
420 virtual void release(StyleNode victim); 422 virtual void release(StyleNode victim);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 In the constructors for the default elements, they add to themselves 529 In the constructors for the default elements, they add to themselves
528 StyleDeclaration objects as follows: 530 StyleDeclaration objects as follows:
529 531
530 * ``import`` 532 * ``import``
531 * ``template`` 533 * ``template``
532 * ``style`` 534 * ``style``
533 * ``script`` 535 * ``script``
534 * ``content`` 536 * ``content``
535 * ``title`` 537 * ``title``
536 These all add to themselves the same declaration with value: 538 These all add to themselves the same declaration with value:
537 ```{ display: { value: null } }``` 539 ```css
540 { display: { value: null } }
541 ```
538 542
539 * ``img`` 543 * ``img``
540 This adds to itself the declaration with value: 544 This adds to itself the declaration with value:
541 ```{ display: { value: sky.ImageElementLayoutManager } }``` 545 ```css
546 { display: { value: sky.ImageElementLayoutManager } }
547 ```
542 548
543 * ``span`` 549 * ``span``
544 * ``a`` 550 * ``a``
545 These all add to themselves the same declaration with value: 551 These all add to themselves the same declaration with value:
546 ```{ display: { value: sky.InlineLayoutManager } }``` 552 ```css
553 { display: { value: sky.InlineLayoutManager } }
554 ```
547 555
548 * ``iframe`` 556 * ``iframe``
549 This adds to itself the declaration with value: 557 This adds to itself the declaration with value:
550 ```{ display: { value: sky.IFrameElementLayoutManager } }``` 558 ```css
559 { display: { value: sky.IFrameElementLayoutManager } }
560 ```
551 561
552 * ``t`` 562 * ``t``
553 This adds to itself the declaration with value: 563 This adds to itself the declaration with value:
554 ```{ display: { value: sky.ParagraphLayoutManager } }``` 564 ```css
565 { display: { value: sky.ParagraphLayoutManager } }
566 ```
555 567
556 * ``error`` 568 * ``error``
557 This adds to itself the declaration with value: 569 This adds to itself the declaration with value:
558 ```{ display: { value: sky.ErrorLayoutManager } }``` 570 ```css
571 { display: { value: sky.ErrorLayoutManager } }
572 ```
559 573
560 The ``div`` element doesn't have any default styles. 574 The ``div`` element doesn't have any default styles.
561 575
562 These declarations are all shared between all the elements (so e.g. if 576 These declarations are all shared between all the elements (so e.g. if
563 you reach in and change the declaration that was added to a ``title`` 577 you reach in and change the declaration that was added to a ``title``
564 element, you're going to change the styles of all the other 578 element, you're going to change the styles of all the other
565 default-hidden elements). 579 default-hidden elements).
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698