Exemplo n.º 1
0
double CompositorProxy::scrollTop(ExceptionState& exceptionState) const {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return 0.0;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kScrollTop,
                                 exceptionState))
    return 0.0;
  return m_state->scrollTop();
}
Exemplo n.º 2
0
DOMMatrix* CompositorProxy::transform(ExceptionState& exceptionState) const {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return nullptr;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kTransform,
                                 exceptionState))
    return nullptr;
  return DOMMatrix::create(m_state->transform(), exceptionState);
}
Exemplo n.º 3
0
DOMMatrix* CompositorProxy::transform(ExceptionState& exceptionState) const
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return nullptr;
    if (raiseExceptionIfNotMutable(Attributes::TRANSFORM, exceptionState))
        return nullptr;
    return m_transform;
}
Exemplo n.º 4
0
double CompositorProxy::opacity(ExceptionState& exceptionState) const {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return 0.0;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kOpacity,
                                 exceptionState))
    return 0.0;
  return m_state->opacity();
}
Exemplo n.º 5
0
double CompositorProxy::scrollTop(ExceptionState& exceptionState) const
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return 0.0;
    if (raiseExceptionIfNotMutable(Attributes::SCROLL_TOP, exceptionState))
        return 0.0;
    return m_scrollTop;
}
Exemplo n.º 6
0
double CompositorProxy::opacity(ExceptionState& exceptionState) const
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return 0.0;
    if (raiseExceptionIfNotMutable(Attributes::OPACITY, exceptionState))
        return 0.0;
    return m_opacity;
}
Exemplo n.º 7
0
void CompositorProxy::setScrollTop(double scrollTop,
                                   ExceptionState& exceptionState) {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kScrollTop,
                                 exceptionState))
    return;
  m_state->setScrollTop(scrollTop);
}
Exemplo n.º 8
0
void CompositorProxy::setOpacity(double opacity,
                                 ExceptionState& exceptionState) {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kOpacity,
                                 exceptionState))
    return;
  m_state->setOpacity(std::min(1., std::max(0., opacity)));
}
Exemplo n.º 9
0
void CompositorProxy::setTransform(DOMMatrix* transform, ExceptionState& exceptionState)
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return;
    if (raiseExceptionIfNotMutable(Attributes::TRANSFORM, exceptionState))
        return;
    m_transform = transform;
    m_mutatedAttributes |= static_cast<uint32_t>(Attributes::TRANSFORM);
}
Exemplo n.º 10
0
void CompositorProxy::setScrollTop(double scrollTop, ExceptionState& exceptionState)
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return;
    if (raiseExceptionIfNotMutable(Attributes::SCROLL_TOP, exceptionState))
        return;
    m_scrollTop = scrollTop;
    m_mutatedAttributes |= static_cast<uint32_t>(Attributes::SCROLL_TOP);
}
Exemplo n.º 11
0
void CompositorProxy::setOpacity(double opacity, ExceptionState& exceptionState)
{
    if (raiseExceptionIfMutationNotAllowed(exceptionState))
        return;
    if (raiseExceptionIfNotMutable(Attributes::OPACITY, exceptionState))
        return;
    m_opacity = std::min(1., std::max(0., opacity));
    m_mutatedAttributes |= static_cast<uint32_t>(Attributes::OPACITY);
}
Exemplo n.º 12
0
void CompositorProxy::setTransform(DOMMatrix* transform,
                                   ExceptionState& exceptionState) {
  if (raiseExceptionIfMutationNotAllowed(exceptionState))
    return;
  if (raiseExceptionIfNotMutable(CompositorMutableProperty::kTransform,
                                 exceptionState))
    return;
  m_state->setTransform(
      TransformationMatrix::toSkMatrix44(transform->matrix()));
}