| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 | 1905 |
| 1906 updateFillImages(oldStyle ? oldStyle->backgroundLayers() : 0, m_style ? m_st
yle->backgroundLayers() : 0); | 1906 updateFillImages(oldStyle ? oldStyle->backgroundLayers() : 0, m_style ? m_st
yle->backgroundLayers() : 0); |
| 1907 updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->m
askLayers() : 0); | 1907 updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->m
askLayers() : 0); |
| 1908 | 1908 |
| 1909 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_styl
e->borderImage().image() : 0); | 1909 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_styl
e->borderImage().image() : 0); |
| 1910 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_sty
le->maskBoxImage().image() : 0); | 1910 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_sty
le->maskBoxImage().image() : 0); |
| 1911 | 1911 |
| 1912 updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->
shapeInside() : 0); | 1912 updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->
shapeInside() : 0); |
| 1913 updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style ? m_style-
>shapeOutside() : 0); | 1913 updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style ? m_style-
>shapeOutside() : 0); |
| 1914 | 1914 |
| 1915 // We need to ensure that view->maximalOutlineSize() is valid for any repain
ts that happen | |
| 1916 // during styleDidChange (it's used by clippedOverflowRectForRepaint()). | |
| 1917 // FIXME: Do this more cleanly. http://crbug.com/273904 | |
| 1918 if (m_style->outlineWidth() > 0 && m_style->outlineSize() > view()->maximalO
utlineSize()) | |
| 1919 view()->setMaximalOutlineSize(m_style->outlineSize()); | |
| 1920 | |
| 1921 bool doesNotNeedLayout = !m_parent || isText(); | 1915 bool doesNotNeedLayout = !m_parent || isText(); |
| 1922 | 1916 |
| 1923 styleDidChange(diff, oldStyle.get()); | 1917 styleDidChange(diff, oldStyle.get()); |
| 1924 | 1918 |
| 1925 // FIXME: |this| might be destroyed here. This can currently happen for a Re
nderTextFragment when | 1919 // FIXME: |this| might be destroyed here. This can currently happen for a Re
nderTextFragment when |
| 1926 // its first-letter block gets an update in RenderTextFragment::styleDidChan
ge. For RenderTextFragment(s), | 1920 // its first-letter block gets an update in RenderTextFragment::styleDidChan
ge. For RenderTextFragment(s), |
| 1927 // we will safely bail out with the doesNotNeedLayout flag. We might want to
broaden this condition | 1921 // we will safely bail out with the doesNotNeedLayout flag. We might want to
broaden this condition |
| 1928 // in the future as we move renderer changes out of layout and into style ch
anges. | 1922 // in the future as we move renderer changes out of layout and into style ch
anges. |
| 1929 if (doesNotNeedLayout) | 1923 if (doesNotNeedLayout) |
| 1930 return; | 1924 return; |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 | 3034 |
| 3041 // We will not render a new image when Active DOM is suspended | 3035 // We will not render a new image when Active DOM is suspended |
| 3042 if (document().activeDOMObjectsAreSuspended()) | 3036 if (document().activeDOMObjectsAreSuspended()) |
| 3043 return false; | 3037 return false; |
| 3044 | 3038 |
| 3045 // If we're not in a window (i.e., we're dormant from being in a background
tab) | 3039 // If we're not in a window (i.e., we're dormant from being in a background
tab) |
| 3046 // then we don't want to render either. | 3040 // then we don't want to render either. |
| 3047 return document().view()->isVisible(); | 3041 return document().view()->isVisible(); |
| 3048 } | 3042 } |
| 3049 | 3043 |
| 3050 int RenderObject::maximalOutlineSize(PaintPhase p) const | |
| 3051 { | |
| 3052 if (p != PaintPhaseOutline && p != PaintPhaseSelfOutline && p != PaintPhaseC
hildOutlines) | |
| 3053 return 0; | |
| 3054 return view()->maximalOutlineSize(); | |
| 3055 } | |
| 3056 | |
| 3057 int RenderObject::caretMinOffset() const | 3044 int RenderObject::caretMinOffset() const |
| 3058 { | 3045 { |
| 3059 return 0; | 3046 return 0; |
| 3060 } | 3047 } |
| 3061 | 3048 |
| 3062 int RenderObject::caretMaxOffset() const | 3049 int RenderObject::caretMaxOffset() const |
| 3063 { | 3050 { |
| 3064 if (isReplaced()) | 3051 if (isReplaced()) |
| 3065 return node() ? max(1U, node()->countChildren()) : 1; | 3052 return node() ? max(1U, node()->countChildren()) : 1; |
| 3066 if (isHR()) | 3053 if (isHR()) |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3339 { | 3326 { |
| 3340 if (object1) { | 3327 if (object1) { |
| 3341 const WebCore::RenderObject* root = object1; | 3328 const WebCore::RenderObject* root = object1; |
| 3342 while (root->parent()) | 3329 while (root->parent()) |
| 3343 root = root->parent(); | 3330 root = root->parent(); |
| 3344 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3331 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3345 } | 3332 } |
| 3346 } | 3333 } |
| 3347 | 3334 |
| 3348 #endif | 3335 #endif |
| OLD | NEW |