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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 | 1927 |
1928 updateFillImages(oldStyle ? oldStyle->backgroundLayers() : 0, m_style ? m_st
yle->backgroundLayers() : 0); | 1928 updateFillImages(oldStyle ? oldStyle->backgroundLayers() : 0, m_style ? m_st
yle->backgroundLayers() : 0); |
1929 updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->m
askLayers() : 0); | 1929 updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->m
askLayers() : 0); |
1930 | 1930 |
1931 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_styl
e->borderImage().image() : 0); | 1931 updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_styl
e->borderImage().image() : 0); |
1932 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_sty
le->maskBoxImage().image() : 0); | 1932 updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_sty
le->maskBoxImage().image() : 0); |
1933 | 1933 |
1934 updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->
shapeInside() : 0); | 1934 updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->
shapeInside() : 0); |
1935 updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style ? m_style-
>shapeOutside() : 0); | 1935 updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style ? m_style-
>shapeOutside() : 0); |
1936 | 1936 |
1937 // We need to ensure that view->maximalOutlineSize() is valid for any repain
ts that happen | |
1938 // during styleDidChange (it's used by clippedOverflowRectForRepaint()). | |
1939 // FIXME: Do this more cleanly. http://crbug.com/273904 | |
1940 if (m_style->outlineWidth() > 0 && m_style->outlineSize() > view()->maximalO
utlineSize()) | |
1941 view()->setMaximalOutlineSize(m_style->outlineSize()); | |
1942 | |
1943 bool doesNotNeedLayout = !m_parent || isText(); | 1937 bool doesNotNeedLayout = !m_parent || isText(); |
1944 | 1938 |
1945 styleDidChange(diff, oldStyle.get()); | 1939 styleDidChange(diff, oldStyle.get()); |
1946 | 1940 |
1947 // FIXME: |this| might be destroyed here. This can currently happen for a Re
nderTextFragment when | 1941 // FIXME: |this| might be destroyed here. This can currently happen for a Re
nderTextFragment when |
1948 // its first-letter block gets an update in RenderTextFragment::styleDidChan
ge. For RenderTextFragment(s), | 1942 // its first-letter block gets an update in RenderTextFragment::styleDidChan
ge. For RenderTextFragment(s), |
1949 // we will safely bail out with the doesNotNeedLayout flag. We might want to
broaden this condition | 1943 // we will safely bail out with the doesNotNeedLayout flag. We might want to
broaden this condition |
1950 // in the future as we move renderer changes out of layout and into style ch
anges. | 1944 // in the future as we move renderer changes out of layout and into style ch
anges. |
1951 if (doesNotNeedLayout) | 1945 if (doesNotNeedLayout) |
1952 return; | 1946 return; |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 | 3086 |
3093 // We will not render a new image when Active DOM is suspended | 3087 // We will not render a new image when Active DOM is suspended |
3094 if (document().activeDOMObjectsAreSuspended()) | 3088 if (document().activeDOMObjectsAreSuspended()) |
3095 return false; | 3089 return false; |
3096 | 3090 |
3097 // If we're not in a window (i.e., we're dormant from being in a background
tab) | 3091 // If we're not in a window (i.e., we're dormant from being in a background
tab) |
3098 // then we don't want to render either. | 3092 // then we don't want to render either. |
3099 return document().view()->isVisible(); | 3093 return document().view()->isVisible(); |
3100 } | 3094 } |
3101 | 3095 |
3102 int RenderObject::maximalOutlineSize(PaintPhase p) const | |
3103 { | |
3104 if (p != PaintPhaseOutline && p != PaintPhaseSelfOutline && p != PaintPhaseC
hildOutlines) | |
3105 return 0; | |
3106 return view()->maximalOutlineSize(); | |
3107 } | |
3108 | |
3109 int RenderObject::caretMinOffset() const | 3096 int RenderObject::caretMinOffset() const |
3110 { | 3097 { |
3111 return 0; | 3098 return 0; |
3112 } | 3099 } |
3113 | 3100 |
3114 int RenderObject::caretMaxOffset() const | 3101 int RenderObject::caretMaxOffset() const |
3115 { | 3102 { |
3116 if (isReplaced()) | 3103 if (isReplaced()) |
3117 return node() ? max(1U, node()->countChildren()) : 1; | 3104 return node() ? max(1U, node()->countChildren()) : 1; |
3118 if (isHR()) | 3105 if (isHR()) |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3352 { | 3339 { |
3353 if (object1) { | 3340 if (object1) { |
3354 const WebCore::RenderObject* root = object1; | 3341 const WebCore::RenderObject* root = object1; |
3355 while (root->parent()) | 3342 while (root->parent()) |
3356 root = root->parent(); | 3343 root = root->parent(); |
3357 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3344 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3358 } | 3345 } |
3359 } | 3346 } |
3360 | 3347 |
3361 #endif | 3348 #endif |
OLD | NEW |