Eric Seidel 922ea790b8 Make it possible to draw Text in the new window/document-less world
I had to add back document.createText() since new Text()
does not work in the new world yet.

LayoutRoot is a new Dart-exposed class which holds the Frame and
all associated machinery, sufficient to trigger a restyle
and layout of the subtree.

This is all kinda hacky and I'm sure likely to cause many
crashes if folks call random methods on these disconnected
trees.

But this makes it at least possible to paint text for now
and we can improve this in the coming days.

This really should have Adam's review.  It's hugely hacky
but I'd like to negotiate out with him the timeline on
which we should fix some of these hacks.

R=ianh@google.com
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1148253003
2015-05-27 11:05:42 -07:00

56 lines
1.8 KiB
Plaintext

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
CustomConstructor,
] interface Element : ParentNode {
readonly attribute DOMString tagName;
boolean hasAttribute(DOMString name);
[TreatReturnedNullStringAs=Null] DOMString getAttribute(DOMString name);
[CustomElementCallbacks, RaisesException] void setAttribute(DOMString name, optional DOMString? value);
[CustomElementCallbacks] void removeAttribute(DOMString name);
sequence<Attr> getAttributes();
readonly attribute ShadowRoot shadowRoot;
void requestPaint(PaintingCallback callback);
void setNeedsLayout();
void layout();
void setLayoutManager(LayoutCallback layout, LayoutCallback computeIntrinsicWidths);
// TODO(abarth): Move to Node.
readonly attribute CSSStyleDeclaration style;
// TODO(abarth): Remove these when we implement more of the system.
[RaisesException] boolean matches(DOMString selectors);
void focus();
void blur();
attribute long tabIndex;
readonly attribute DOMTokenList classList;
[RaisesException] ShadowRoot ensureShadowRoot();
ClientRect getBoundingClientRect();
readonly attribute long offsetLeft;
readonly attribute long offsetTop;
readonly attribute long offsetWidth;
readonly attribute long offsetHeight;
readonly attribute Element offsetParent;
readonly attribute long clientLeft;
readonly attribute long clientTop;
readonly attribute long clientWidth;
readonly attribute long clientHeight;
attribute double x;
attribute double y;
attribute double width;
attribute double height;
attribute double minContentWidth; // Intrinsic width if all wrappable points wrap.
attribute double maxContentWidth; // Intrinsic width if no wrappable points wrap.
void paint(Canvas canvas);
};