Chromium Code Reviews| 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 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2115 if (LocalFrame* frame = this->frame()) { | 2115 if (LocalFrame* frame = this->frame()) { |
| 2116 // Cursor update scheduling is done by the local root, which is the main frame if there | 2116 // Cursor update scheduling is done by the local root, which is the main frame if there |
| 2117 // are no RemoteFrame ancestors in the frame tree. Use of localFrame Root() is | 2117 // are no RemoteFrame ancestors in the frame tree. Use of localFrame Root() is |
| 2118 // discouraged but will change when cursor update scheduling is move d from EventHandler | 2118 // discouraged but will change when cursor update scheduling is move d from EventHandler |
| 2119 // to PageEventHandler. | 2119 // to PageEventHandler. |
| 2120 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate(); | 2120 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate(); |
| 2121 } | 2121 } |
| 2122 } | 2122 } |
| 2123 } | 2123 } |
| 2124 | 2124 |
| 2125 void LayoutObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly) | 2125 void LayoutObject::propagateStyleToAnonymousChildren() |
| 2126 { | 2126 { |
| 2127 // FIXME: We could save this call when the change only affected non-inherite d properties. | 2127 // FIXME: We could save this call when the change only affected non-inherite d properties. |
| 2128 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { | 2128 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { |
| 2129 if (!child->isAnonymous() || child->style()->styleType() != PseudoIdNone ) | 2129 if (!child->isAnonymous() || child->style()->styleType() != PseudoIdNone ) |
| 2130 continue; | 2130 continue; |
| 2131 | 2131 |
| 2132 if (blockChildrenOnly && !child->isLayoutBlock()) | 2132 if (child->anonymousHasStylePropagationOverride()) |
|
mstensho (USE GERRIT)
2016/05/20 16:39:09
Does anyone have a fancier name than this? :)
eae
2016/05/20 17:02:04
While it doesn't exactly roll of the tongue it get
| |
| 2133 continue; | |
| 2134 | |
| 2135 if (child->isLayoutFullScreen() || child->isLayoutFullScreenPlaceholder( )) | |
| 2136 continue; | 2133 continue; |
| 2137 | 2134 |
| 2138 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith Display(styleRef(), child->style()->display()); | 2135 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith Display(styleRef(), child->style()->display()); |
| 2139 | 2136 |
| 2140 // Preserve the position style of anonymous block continuations as they can have relative position when | 2137 // Preserve the position style of anonymous block continuations as they can have relative position when |
| 2141 // they contain block descendants of relative positioned inlines. | 2138 // they contain block descendants of relative positioned inlines. |
| 2142 if (child->isInFlowPositioned() && toLayoutBlock(child)->isAnonymousBloc kContinuation()) | 2139 if (child->isInFlowPositioned() && child->isLayoutBlock() && toLayoutBlo ck(child)->isAnonymousBlockContinuation()) |
|
mstensho (USE GERRIT)
2016/05/20 16:39:09
It only seems right to type-check here. Now more t
eae
2016/05/20 17:02:04
Acknowledged.
| |
| 2143 newStyle->setPosition(child->style()->position()); | 2140 newStyle->setPosition(child->style()->position()); |
| 2144 | 2141 |
| 2145 updateAnonymousChildStyle(*child, *newStyle); | 2142 updateAnonymousChildStyle(*child, *newStyle); |
| 2146 | 2143 |
| 2147 child->setStyle(newStyle.release()); | 2144 child->setStyle(newStyle.release()); |
| 2148 } | 2145 } |
| 2149 } | 2146 } |
| 2150 | 2147 |
| 2151 void LayoutObject::setStyleWithWritingModeOfParent(PassRefPtr<ComputedStyle> sty le) | 2148 void LayoutObject::setStyleWithWritingModeOfParent(PassRefPtr<ComputedStyle> sty le) |
| 2152 { | 2149 { |
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3689 const blink::LayoutObject* root = object1; | 3686 const blink::LayoutObject* root = object1; |
| 3690 while (root->parent()) | 3687 while (root->parent()) |
| 3691 root = root->parent(); | 3688 root = root->parent(); |
| 3692 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3689 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3693 } else { | 3690 } else { |
| 3694 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3691 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3695 } | 3692 } |
| 3696 } | 3693 } |
| 3697 | 3694 |
| 3698 #endif | 3695 #endif |
| OLD | NEW |