| 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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). | 66 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). |
| 67 LayoutSize m_previousBorderBoxSize; | 67 LayoutSize m_previousBorderBoxSize; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class RenderBox : public RenderBoxModelObject { | 70 class RenderBox : public RenderBoxModelObject { |
| 71 public: | 71 public: |
| 72 explicit RenderBox(ContainerNode*); | 72 explicit RenderBox(ContainerNode*); |
| 73 | 73 |
| 74 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since | 74 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since |
| 75 // position:static elements that are not flex-items get their z-index coerce
d to auto. | 75 // position:static elements that are not flex-items get their z-index coerce
d to auto. |
| 76 virtual LayerType layerTypeRequired() const OVERRIDE | 76 virtual LayerType layerTypeRequired() const override |
| 77 { | 77 { |
| 78 if (isPositioned() || createsGroup() || hasClipPath() || hasTransform()
|| hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !sty
le()->hasAutoZIndex() || style()->shouldCompositeForCurrentAnimations()) | 78 if (isPositioned() || createsGroup() || hasClipPath() || hasTransform()
|| hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !sty
le()->hasAutoZIndex() || style()->shouldCompositeForCurrentAnimations()) |
| 79 return NormalLayer; | 79 return NormalLayer; |
| 80 if (hasOverflowClip()) | 80 if (hasOverflowClip()) |
| 81 return OverflowClipLayer; | 81 return OverflowClipLayer; |
| 82 | 82 |
| 83 return NoLayer; | 83 return NoLayer; |
| 84 } | 84 } |
| 85 | 85 |
| 86 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const OVERRIDE; | 86 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; |
| 87 | 87 |
| 88 // Use this with caution! No type checking is done! | 88 // Use this with caution! No type checking is done! |
| 89 RenderBox* firstChildBox() const; | 89 RenderBox* firstChildBox() const; |
| 90 RenderBox* lastChildBox() const; | 90 RenderBox* lastChildBox() const; |
| 91 | 91 |
| 92 LayoutUnit x() const { return m_frameRect.x(); } | 92 LayoutUnit x() const { return m_frameRect.x(); } |
| 93 LayoutUnit y() const { return m_frameRect.y(); } | 93 LayoutUnit y() const { return m_frameRect.y(); } |
| 94 LayoutUnit width() const { return m_frameRect.width(); } | 94 LayoutUnit width() const { return m_frameRect.width(); } |
| 95 LayoutUnit height() const { return m_frameRect.height(); } | 95 LayoutUnit height() const { return m_frameRect.height(); } |
| 96 | 96 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 void setSize(const LayoutSize& size) { m_frameRect.setSize(size); } | 162 void setSize(const LayoutSize& size) { m_frameRect.setSize(size); } |
| 163 void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); } | 163 void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); } |
| 164 | 164 |
| 165 LayoutRect frameRect() const { return m_frameRect; } | 165 LayoutRect frameRect() const { return m_frameRect; } |
| 166 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } | 166 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } |
| 167 | 167 |
| 168 LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size());
} | 168 LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size());
} |
| 169 LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTo
p(), contentWidth() + paddingLeft() + paddingRight(), contentHeight() + paddingT
op() + paddingBottom()); } | 169 LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTo
p(), contentWidth() + paddingLeft() + paddingRight(), contentHeight() + paddingT
op() + paddingBottom()); } |
| 170 IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_fra
meRect.pixelSnappedSize()); } | 170 IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_fra
meRect.pixelSnappedSize()); } |
| 171 virtual IntRect borderBoundingBox() const OVERRIDE FINAL { return pixelSnapp
edBorderBoxRect(); } | 171 virtual IntRect borderBoundingBox() const override final { return pixelSnapp
edBorderBoxRect(); } |
| 172 | 172 |
| 173 // The content area of the box (excludes padding - and intrinsic padding for
table cells, etc... - and border). | 173 // The content area of the box (excludes padding - and intrinsic padding for
table cells, etc... - and border). |
| 174 LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + padding
Left(), borderTop() + paddingTop(), contentWidth(), contentHeight()); } | 174 LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + padding
Left(), borderTop() + paddingTop(), contentWidth(), contentHeight()); } |
| 175 // The content box in absolute coords. Ignores transforms. | 175 // The content box in absolute coords. Ignores transforms. |
| 176 IntRect absoluteContentBox() const; | 176 IntRect absoluteContentBox() const; |
| 177 // The content box converted to absolute coords (taking transforms into acco
unt). | 177 // The content box converted to absolute coords (taking transforms into acco
unt). |
| 178 FloatQuad absoluteContentQuad() const; | 178 FloatQuad absoluteContentQuad() const; |
| 179 | 179 |
| 180 // This returns the content area of the box (excluding padding and border).
The only difference with contentBoxRect is that computedCSSContentBoxRect | 180 // This returns the content area of the box (excluding padding and border).
The only difference with contentBoxRect is that computedCSSContentBoxRect |
| 181 // does include the intrinsic padding in the content box as this is what som
e callers expect (like getComputedStyle). | 181 // does include the intrinsic padding in the content box as this is what som
e callers expect (like getComputedStyle). |
| 182 LayoutRect computedCSSContentBoxRect() const { return LayoutRect(borderLeft(
) + computedCSSPaddingLeft(), borderTop() + computedCSSPaddingTop(), clientWidth
() - computedCSSPaddingLeft() - computedCSSPaddingRight(), clientHeight() - comp
utedCSSPaddingTop() - computedCSSPaddingBottom()); } | 182 LayoutRect computedCSSContentBoxRect() const { return LayoutRect(borderLeft(
) + computedCSSPaddingLeft(), borderTop() + computedCSSPaddingTop(), clientWidth
() - computedCSSPaddingLeft() - computedCSSPaddingRight(), clientHeight() - comp
utedCSSPaddingTop() - computedCSSPaddingBottom()); } |
| 183 | 183 |
| 184 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE; | 184 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset, const RenderLayerModelObject* paintContainer) const override; |
| 185 | 185 |
| 186 // Use this with caution! No type checking is done! | 186 // Use this with caution! No type checking is done! |
| 187 RenderBox* previousSiblingBox() const; | 187 RenderBox* previousSiblingBox() const; |
| 188 RenderBox* nextSiblingBox() const; | 188 RenderBox* nextSiblingBox() const; |
| 189 RenderBox* parentBox() const; | 189 RenderBox* parentBox() const; |
| 190 | 190 |
| 191 bool canResize() const; | 191 bool canResize() const; |
| 192 | 192 |
| 193 // Visual and layout overflow are in the coordinate space of the box. This
means that they aren't purely physical directions. | 193 // Visual and layout overflow are in the coordinate space of the box. This
means that they aren't purely physical directions. |
| 194 // For horizontal-tb and vertical-lr they will match physical directions, bu
t for horizontal-bt and vertical-rl, the top/bottom and left/right | 194 // For horizontal-tb and vertical-lr they will match physical directions, bu
t for horizontal-bt and vertical-rl, the top/bottom and left/right |
| (...skipping 27 matching lines...) Expand all Loading... |
| 222 | 222 |
| 223 void updateLayerTransformAfterLayout(); | 223 void updateLayerTransformAfterLayout(); |
| 224 | 224 |
| 225 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } | 225 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } |
| 226 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } | 226 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } |
| 227 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } | 227 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } |
| 228 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin
gMode() ? contentHeight() : contentWidth(); } | 228 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin
gMode() ? contentHeight() : contentWidth(); } |
| 229 | 229 |
| 230 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (RenderFlow) | 230 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (RenderFlow) |
| 231 // to return the remaining width on a given line (and the height of a single
line). | 231 // to return the remaining width on a given line (and the height of a single
line). |
| 232 virtual LayoutUnit offsetWidth() const OVERRIDE { return width(); } | 232 virtual LayoutUnit offsetWidth() const override { return width(); } |
| 233 virtual LayoutUnit offsetHeight() const OVERRIDE { return height(); } | 233 virtual LayoutUnit offsetHeight() const override { return height(); } |
| 234 | 234 |
| 235 virtual int pixelSnappedOffsetWidth() const OVERRIDE FINAL; | 235 virtual int pixelSnappedOffsetWidth() const override final; |
| 236 virtual int pixelSnappedOffsetHeight() const OVERRIDE FINAL; | 236 virtual int pixelSnappedOffsetHeight() const override final; |
| 237 | 237 |
| 238 // More IE extensions. clientWidth and clientHeight represent the interior
of an object | 238 // More IE extensions. clientWidth and clientHeight represent the interior
of an object |
| 239 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. | 239 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. |
| 240 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB
lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } | 240 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB
lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } |
| 241 LayoutUnit clientTop() const { return borderTop(); } | 241 LayoutUnit clientTop() const { return borderTop(); } |
| 242 LayoutUnit clientWidth() const; | 242 LayoutUnit clientWidth() const; |
| 243 LayoutUnit clientHeight() const; | 243 LayoutUnit clientHeight() const; |
| 244 LayoutUnit clientLogicalWidth() const { return style()->isHorizontalWritingM
ode() ? clientWidth() : clientHeight(); } | 244 LayoutUnit clientLogicalWidth() const { return style()->isHorizontalWritingM
ode() ? clientWidth() : clientHeight(); } |
| 245 LayoutUnit clientLogicalHeight() const { return style()->isHorizontalWriting
Mode() ? clientHeight() : clientWidth(); } | 245 LayoutUnit clientLogicalHeight() const { return style()->isHorizontalWriting
Mode() ? clientHeight() : clientWidth(); } |
| 246 LayoutUnit clientLogicalBottom() const { return borderBefore() + clientLogic
alHeight(); } | 246 LayoutUnit clientLogicalBottom() const { return borderBefore() + clientLogic
alHeight(); } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 260 virtual LayoutUnit scrollHeight() const; | 260 virtual LayoutUnit scrollHeight() const; |
| 261 int pixelSnappedScrollWidth() const; | 261 int pixelSnappedScrollWidth() const; |
| 262 int pixelSnappedScrollHeight() const; | 262 int pixelSnappedScrollHeight() const; |
| 263 virtual void setScrollLeft(LayoutUnit); | 263 virtual void setScrollLeft(LayoutUnit); |
| 264 virtual void setScrollTop(LayoutUnit); | 264 virtual void setScrollTop(LayoutUnit); |
| 265 | 265 |
| 266 void scrollToOffset(const IntSize&); | 266 void scrollToOffset(const IntSize&); |
| 267 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll
OffsetUnclamped); | 267 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll
OffsetUnclamped); |
| 268 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c
onst ScrollAlignment& alignY); | 268 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c
onst ScrollAlignment& alignY); |
| 269 | 269 |
| 270 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); } | 270 virtual LayoutUnit marginTop() const override { return m_marginBox.top(); } |
| 271 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom
(); } | 271 virtual LayoutUnit marginBottom() const override { return m_marginBox.bottom
(); } |
| 272 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left();
} | 272 virtual LayoutUnit marginLeft() const override { return m_marginBox.left();
} |
| 273 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right()
; } | 273 virtual LayoutUnit marginRight() const override { return m_marginBox.right()
; } |
| 274 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); } | 274 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); } |
| 275 void setMarginBottom(LayoutUnit margin) { m_marginBox.setBottom(margin); } | 275 void setMarginBottom(LayoutUnit margin) { m_marginBox.setBottom(margin); } |
| 276 void setMarginLeft(LayoutUnit margin) { m_marginBox.setLeft(margin); } | 276 void setMarginLeft(LayoutUnit margin) { m_marginBox.setLeft(margin); } |
| 277 void setMarginRight(LayoutUnit margin) { m_marginBox.setRight(margin); } | 277 void setMarginRight(LayoutUnit margin) { m_marginBox.setRight(margin); } |
| 278 | 278 |
| 279 LayoutUnit marginLogicalLeft() const { return m_marginBox.logicalLeft(style(
)->writingMode()); } | 279 LayoutUnit marginLogicalLeft() const { return m_marginBox.logicalLeft(style(
)->writingMode()); } |
| 280 LayoutUnit marginLogicalRight() const { return m_marginBox.logicalRight(styl
e()->writingMode()); } | 280 LayoutUnit marginLogicalRight() const { return m_marginBox.logicalRight(styl
e()->writingMode()); } |
| 281 | 281 |
| 282 virtual LayoutUnit marginBefore(const RenderStyle* overrideStyle = 0) const
OVERRIDE FINAL { return m_marginBox.before((overrideStyle ? overrideStyle : styl
e())->writingMode()); } | 282 virtual LayoutUnit marginBefore(const RenderStyle* overrideStyle = 0) const
override final { return m_marginBox.before((overrideStyle ? overrideStyle : styl
e())->writingMode()); } |
| 283 virtual LayoutUnit marginAfter(const RenderStyle* overrideStyle = 0) const O
VERRIDE FINAL { return m_marginBox.after((overrideStyle ? overrideStyle : style(
))->writingMode()); } | 283 virtual LayoutUnit marginAfter(const RenderStyle* overrideStyle = 0) const o
verride final { return m_marginBox.after((overrideStyle ? overrideStyle : style(
))->writingMode()); } |
| 284 virtual LayoutUnit marginStart(const RenderStyle* overrideStyle = 0) const O
VERRIDE FINAL | 284 virtual LayoutUnit marginStart(const RenderStyle* overrideStyle = 0) const o
verride final |
| 285 { | 285 { |
| 286 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); | 286 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); |
| 287 return m_marginBox.start(styleToUse->writingMode(), styleToUse->directio
n()); | 287 return m_marginBox.start(styleToUse->writingMode(), styleToUse->directio
n()); |
| 288 } | 288 } |
| 289 virtual LayoutUnit marginEnd(const RenderStyle* overrideStyle = 0) const OVE
RRIDE FINAL | 289 virtual LayoutUnit marginEnd(const RenderStyle* overrideStyle = 0) const ove
rride final |
| 290 { | 290 { |
| 291 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); | 291 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); |
| 292 return m_marginBox.end(styleToUse->writingMode(), styleToUse->direction(
)); | 292 return m_marginBox.end(styleToUse->writingMode(), styleToUse->direction(
)); |
| 293 } | 293 } |
| 294 void setMarginBefore(LayoutUnit value, const RenderStyle* overrideStyle = 0)
{ m_marginBox.setBefore((overrideStyle ? overrideStyle : style())->writingMode(
), value); } | 294 void setMarginBefore(LayoutUnit value, const RenderStyle* overrideStyle = 0)
{ m_marginBox.setBefore((overrideStyle ? overrideStyle : style())->writingMode(
), value); } |
| 295 void setMarginAfter(LayoutUnit value, const RenderStyle* overrideStyle = 0)
{ m_marginBox.setAfter((overrideStyle ? overrideStyle : style())->writingMode(),
value); } | 295 void setMarginAfter(LayoutUnit value, const RenderStyle* overrideStyle = 0)
{ m_marginBox.setAfter((overrideStyle ? overrideStyle : style())->writingMode(),
value); } |
| 296 void setMarginStart(LayoutUnit value, const RenderStyle* overrideStyle = 0) | 296 void setMarginStart(LayoutUnit value, const RenderStyle* overrideStyle = 0) |
| 297 { | 297 { |
| 298 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); | 298 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); |
| 299 m_marginBox.setStart(styleToUse->writingMode(), styleToUse->direction(),
value); | 299 m_marginBox.setStart(styleToUse->writingMode(), styleToUse->direction(),
value); |
| 300 } | 300 } |
| 301 void setMarginEnd(LayoutUnit value, const RenderStyle* overrideStyle = 0) | 301 void setMarginEnd(LayoutUnit value, const RenderStyle* overrideStyle = 0) |
| 302 { | 302 { |
| 303 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); | 303 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); |
| 304 m_marginBox.setEnd(styleToUse->writingMode(), styleToUse->direction(), v
alue); | 304 m_marginBox.setEnd(styleToUse->writingMode(), styleToUse->direction(), v
alue); |
| 305 } | 305 } |
| 306 | 306 |
| 307 // The following functions are used to implement collapsing margins. | 307 // The following functions are used to implement collapsing margins. |
| 308 // All objects know their maximal positive and negative margins. The | 308 // All objects know their maximal positive and negative margins. The |
| 309 // formula for computing a collapsed margin is |maxPosMargin| - |maxNegmargi
n|. | 309 // formula for computing a collapsed margin is |maxPosMargin| - |maxNegmargi
n|. |
| 310 // For a non-collapsing box, such as a leaf element, this formula will simpl
y return | 310 // For a non-collapsing box, such as a leaf element, this formula will simpl
y return |
| 311 // the margin of the element. Blocks override the maxMarginBefore and maxMa
rginAfter | 311 // the margin of the element. Blocks override the maxMarginBefore and maxMa
rginAfter |
| 312 // methods. | 312 // methods. |
| 313 virtual bool isSelfCollapsingBlock() const { return false; } | 313 virtual bool isSelfCollapsingBlock() const { return false; } |
| 314 virtual LayoutUnit collapsedMarginBefore() const { return marginBefore(); } | 314 virtual LayoutUnit collapsedMarginBefore() const { return marginBefore(); } |
| 315 virtual LayoutUnit collapsedMarginAfter() const { return marginAfter(); } | 315 virtual LayoutUnit collapsedMarginAfter() const { return marginAfter(); } |
| 316 | 316 |
| 317 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE; | 317 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const override; |
| 318 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; | 318 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid
e; |
| 319 | 319 |
| 320 int reflectionOffset() const; | 320 int reflectionOffset() const; |
| 321 // Given a rect in the object's coordinate space, returns the corresponding
rect in the reflection. | 321 // Given a rect in the object's coordinate space, returns the corresponding
rect in the reflection. |
| 322 LayoutRect reflectedRect(const LayoutRect&) const; | 322 LayoutRect reflectedRect(const LayoutRect&) const; |
| 323 | 323 |
| 324 virtual void layout() OVERRIDE; | 324 virtual void layout() override; |
| 325 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 325 virtual void paint(PaintInfo&, const LayoutPoint&) override; |
| 326 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; | 326 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; |
| 327 | 327 |
| 328 virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE; | 328 virtual LayoutUnit minPreferredLogicalWidth() const override; |
| 329 virtual LayoutUnit maxPreferredLogicalWidth() const OVERRIDE; | 329 virtual LayoutUnit maxPreferredLogicalWidth() const override; |
| 330 | 330 |
| 331 // FIXME: We should rename these back to overrideLogicalHeight/Width and hav
e them store | 331 // FIXME: We should rename these back to overrideLogicalHeight/Width and hav
e them store |
| 332 // the border-box height/width like the regular height/width accessors on Re
nderBox. | 332 // the border-box height/width like the regular height/width accessors on Re
nderBox. |
| 333 // Right now, these are different than contentHeight/contentWidth because th
ey still | 333 // Right now, these are different than contentHeight/contentWidth because th
ey still |
| 334 // include the scrollbar height/width. | 334 // include the scrollbar height/width. |
| 335 LayoutUnit overrideLogicalContentWidth() const; | 335 LayoutUnit overrideLogicalContentWidth() const; |
| 336 LayoutUnit overrideLogicalContentHeight() const; | 336 LayoutUnit overrideLogicalContentHeight() const; |
| 337 bool hasOverrideHeight() const; | 337 bool hasOverrideHeight() const; |
| 338 bool hasOverrideWidth() const; | 338 bool hasOverrideWidth() const; |
| 339 void setOverrideLogicalContentHeight(LayoutUnit); | 339 void setOverrideLogicalContentHeight(LayoutUnit); |
| 340 void setOverrideLogicalContentWidth(LayoutUnit); | 340 void setOverrideLogicalContentWidth(LayoutUnit); |
| 341 void clearOverrideSize(); | 341 void clearOverrideSize(); |
| 342 void clearOverrideLogicalContentHeight(); | 342 void clearOverrideLogicalContentHeight(); |
| 343 void clearOverrideLogicalContentWidth(); | 343 void clearOverrideLogicalContentWidth(); |
| 344 | 344 |
| 345 LayoutUnit overrideContainingBlockContentLogicalWidth() const; | 345 LayoutUnit overrideContainingBlockContentLogicalWidth() const; |
| 346 LayoutUnit overrideContainingBlockContentLogicalHeight() const; | 346 LayoutUnit overrideContainingBlockContentLogicalHeight() const; |
| 347 bool hasOverrideContainingBlockLogicalWidth() const; | 347 bool hasOverrideContainingBlockLogicalWidth() const; |
| 348 bool hasOverrideContainingBlockLogicalHeight() const; | 348 bool hasOverrideContainingBlockLogicalHeight() const; |
| 349 void setOverrideContainingBlockContentLogicalWidth(LayoutUnit); | 349 void setOverrideContainingBlockContentLogicalWidth(LayoutUnit); |
| 350 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); | 350 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); |
| 351 void clearContainingBlockOverrideSize(); | 351 void clearContainingBlockOverrideSize(); |
| 352 void clearOverrideContainingBlockContentLogicalHeight(); | 352 void clearOverrideContainingBlockContentLogicalHeight(); |
| 353 | 353 |
| 354 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const OVERRIDE; | 354 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const override; |
| 355 | 355 |
| 356 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; | 356 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; |
| 357 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
; | 357 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
; |
| 358 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; | 358 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; |
| 359 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons
t; | 359 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons
t; |
| 360 | 360 |
| 361 struct ComputedMarginValues { | 361 struct ComputedMarginValues { |
| 362 ComputedMarginValues() { } | 362 ComputedMarginValues() { } |
| 363 | 363 |
| 364 LayoutUnit m_before; | 364 LayoutUnit m_before; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 388 virtual InlineBox* createInlineBox(); | 388 virtual InlineBox* createInlineBox(); |
| 389 void dirtyLineBoxes(bool fullLayout); | 389 void dirtyLineBoxes(bool fullLayout); |
| 390 | 390 |
| 391 // For inline replaced elements, this function returns the inline box that o
wns us. Enables | 391 // For inline replaced elements, this function returns the inline box that o
wns us. Enables |
| 392 // the replaced RenderObject to quickly determine what line it is contained
on and to easily | 392 // the replaced RenderObject to quickly determine what line it is contained
on and to easily |
| 393 // iterate over structures on the line. | 393 // iterate over structures on the line. |
| 394 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } | 394 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } |
| 395 void setInlineBoxWrapper(InlineBox*); | 395 void setInlineBoxWrapper(InlineBox*); |
| 396 void deleteLineBoxWrapper(); | 396 void deleteLineBoxWrapper(); |
| 397 | 397 |
| 398 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE; | 398 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t override; |
| 399 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const O
VERRIDE; | 399 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o
verride; |
| 400 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants); | 400 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants); |
| 401 | 401 |
| 402 virtual LayoutUnit containingBlockLogicalWidthForContent() const OVERRIDE; | 402 virtual LayoutUnit containingBlockLogicalWidthForContent() const override; |
| 403 LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType
) const; | 403 LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType
) const; |
| 404 | 404 |
| 405 LayoutUnit containingBlockAvailableLineWidth() const; | 405 LayoutUnit containingBlockAvailableLineWidth() const; |
| 406 LayoutUnit perpendicularContainingBlockLogicalHeight() const; | 406 LayoutUnit perpendicularContainingBlockLogicalHeight() const; |
| 407 | 407 |
| 408 virtual void updateLogicalWidth(); | 408 virtual void updateLogicalWidth(); |
| 409 virtual void updateLogicalHeight(); | 409 virtual void updateLogicalHeight(); |
| 410 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const; | 410 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const; |
| 411 | 411 |
| 412 void computeLogicalWidth(LogicalExtentComputedValues&) const; | 412 void computeLogicalWidth(LogicalExtentComputedValues&) const; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 virtual bool scrollsOverflowY() const { return hasOverflowClip() && (style()
->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); } | 476 virtual bool scrollsOverflowY() const { return hasOverflowClip() && (style()
->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); } |
| 477 bool usesCompositedScrolling() const; | 477 bool usesCompositedScrolling() const; |
| 478 | 478 |
| 479 // Elements such as the <input> field override this to specify that they are
scrollable | 479 // Elements such as the <input> field override this to specify that they are
scrollable |
| 480 // outside the context of the CSS overflow style | 480 // outside the context of the CSS overflow style |
| 481 virtual bool isIntristicallyScrollable(ScrollbarOrientation orientation) con
st { return false; } | 481 virtual bool isIntristicallyScrollable(ScrollbarOrientation orientation) con
st { return false; } |
| 482 | 482 |
| 483 bool hasUnsplittableScrollingOverflow() const; | 483 bool hasUnsplittableScrollingOverflow() const; |
| 484 bool isUnsplittableForPagination() const; | 484 bool isUnsplittableForPagination() const; |
| 485 | 485 |
| 486 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) OVERRIDE; | 486 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) override; |
| 487 | 487 |
| 488 virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScro
llbarSizeRelevancy = IgnoreOverlayScrollbarSize); | 488 virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScro
llbarSizeRelevancy = IgnoreOverlayScrollbarSize); |
| 489 LayoutRect clipRect(const LayoutPoint& location); | 489 LayoutRect clipRect(const LayoutPoint& location); |
| 490 virtual bool hasControlClip() const { return false; } | 490 virtual bool hasControlClip() const { return false; } |
| 491 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout
Rect(); } | 491 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout
Rect(); } |
| 492 bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset, Cont
entsClipBehavior); | 492 bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset, Cont
entsClipBehavior); |
| 493 void popContentsClip(PaintInfo&, PaintPhase originalPhase, const LayoutPoint
& accumulatedOffset); | 493 void popContentsClip(PaintInfo&, PaintPhase originalPhase, const LayoutPoint
& accumulatedOffset); |
| 494 | 494 |
| 495 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE
D(); } | 495 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE
D(); } |
| 496 virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&); | 496 virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&); |
| 497 virtual void paintMask(PaintInfo&, const LayoutPoint&); | 497 virtual void paintMask(PaintInfo&, const LayoutPoint&); |
| 498 virtual void paintClippingMask(PaintInfo&, const LayoutPoint&); | 498 virtual void paintClippingMask(PaintInfo&, const LayoutPoint&); |
| 499 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 499 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; |
| 500 | 500 |
| 501 // Called when a positioned object moves but doesn't necessarily change size
. A simplified layout is attempted | 501 // Called when a positioned object moves but doesn't necessarily change size
. A simplified layout is attempted |
| 502 // that just updates the object's position. If the size does change, the obj
ect remains dirty. | 502 // that just updates the object's position. If the size does change, the obj
ect remains dirty. |
| 503 bool tryLayoutDoingPositionedMovementOnly() | 503 bool tryLayoutDoingPositionedMovementOnly() |
| 504 { | 504 { |
| 505 LayoutUnit oldWidth = width(); | 505 LayoutUnit oldWidth = width(); |
| 506 updateLogicalWidth(); | 506 updateLogicalWidth(); |
| 507 // If we shrink to fit our width may have changed, so we still need full
layout. | 507 // If we shrink to fit our width may have changed, so we still need full
layout. |
| 508 if (oldWidth != width()) | 508 if (oldWidth != width()) |
| 509 return false; | 509 return false; |
| 510 updateLogicalHeight(); | 510 updateLogicalHeight(); |
| 511 return true; | 511 return true; |
| 512 } | 512 } |
| 513 | 513 |
| 514 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE; | 514 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
| 515 | 515 |
| 516 void removeFloatingOrPositionedChildFromBlockLists(); | 516 void removeFloatingOrPositionedChildFromBlockLists(); |
| 517 | 517 |
| 518 RenderLayer* enclosingFloatPaintingLayer() const; | 518 RenderLayer* enclosingFloatPaintingLayer() const; |
| 519 | 519 |
| 520 virtual int firstLineBoxBaseline() const { return -1; } | 520 virtual int firstLineBoxBaseline() const { return -1; } |
| 521 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R
eturns -1 if we should skip this box when computing the baseline of an inline-bl
ock. | 521 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R
eturns -1 if we should skip this box when computing the baseline of an inline-bl
ock. |
| 522 | 522 |
| 523 bool shrinkToAvoidFloats() const; | 523 bool shrinkToAvoidFloats() const; |
| 524 virtual bool avoidsFloats() const; | 524 virtual bool avoidsFloats() const; |
| 525 | 525 |
| 526 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&); | 526 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&); |
| 527 | 527 |
| 528 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ
ingMode() != style()->writingMode(); } | 528 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ
ingMode() != style()->writingMode(); } |
| 529 | 529 |
| 530 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } | 530 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } |
| 531 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } | 531 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } |
| 532 | 532 |
| 533 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const OVERRIDE; | 533 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override; |
| 534 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const OVERRIDE; | 534 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; |
| 535 | 535 |
| 536 virtual LayoutUnit offsetLeft() const OVERRIDE; | 536 virtual LayoutUnit offsetLeft() const override; |
| 537 virtual LayoutUnit offsetTop() const OVERRIDE; | 537 virtual LayoutUnit offsetTop() const override; |
| 538 | 538 |
| 539 LayoutPoint flipForWritingModeForChild(const RenderBox* child, const LayoutP
oint&) const; | 539 LayoutPoint flipForWritingModeForChild(const RenderBox* child, const LayoutP
oint&) const; |
| 540 LayoutUnit flipForWritingMode(LayoutUnit position) const; // The offset is i
n the block direction (y for horizontal writing modes, x for vertical writing mo
des). | 540 LayoutUnit flipForWritingMode(LayoutUnit position) const; // The offset is i
n the block direction (y for horizontal writing modes, x for vertical writing mo
des). |
| 541 LayoutPoint flipForWritingMode(const LayoutPoint&) const; | 541 LayoutPoint flipForWritingMode(const LayoutPoint&) const; |
| 542 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 542 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
| 543 LayoutSize flipForWritingMode(const LayoutSize&) const; | 543 LayoutSize flipForWritingMode(const LayoutSize&) const; |
| 544 void flipForWritingMode(LayoutRect&) const; | 544 void flipForWritingMode(LayoutRect&) const; |
| 545 FloatPoint flipForWritingMode(const FloatPoint&) const; | 545 FloatPoint flipForWritingMode(const FloatPoint&) const; |
| 546 void flipForWritingMode(FloatRect&) const; | 546 void flipForWritingMode(FloatRect&) const; |
| 547 // These represent your location relative to your container as a physical of
fset. | 547 // These represent your location relative to your container as a physical of
fset. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 600 |
| 601 void markShapeOutsideDependentsForLayout() | 601 void markShapeOutsideDependentsForLayout() |
| 602 { | 602 { |
| 603 if (isFloating()) | 603 if (isFloating()) |
| 604 removeFloatingOrPositionedChildFromBlockLists(); | 604 removeFloatingOrPositionedChildFromBlockLists(); |
| 605 } | 605 } |
| 606 | 606 |
| 607 bool backgroundHasOpaqueTopLayer() const; | 607 bool backgroundHasOpaqueTopLayer() const; |
| 608 | 608 |
| 609 protected: | 609 protected: |
| 610 virtual void willBeDestroyed() OVERRIDE; | 610 virtual void willBeDestroyed() override; |
| 611 | 611 |
| 612 | 612 |
| 613 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O
VERRIDE; | 613 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o
verride; |
| 614 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 614 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
| 615 virtual void updateFromStyle() OVERRIDE; | 615 virtual void updateFromStyle() override; |
| 616 | 616 |
| 617 // Returns false if it could not cheaply compute the extent (e.g. fixed back
ground), in which case the returned rect may be incorrect. | 617 // Returns false if it could not cheaply compute the extent (e.g. fixed back
ground), in which case the returned rect may be incorrect. |
| 618 // FIXME: make this a const method once the RenderBox reference in BoxPainte
r is const. | 618 // FIXME: make this a const method once the RenderBox reference in BoxPainte
r is const. |
| 619 bool getBackgroundPaintedExtent(LayoutRect&); | 619 bool getBackgroundPaintedExtent(LayoutRect&); |
| 620 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const; | 620 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const; |
| 621 virtual bool computeBackgroundIsKnownToBeObscured() OVERRIDE; | 621 virtual bool computeBackgroundIsKnownToBeObscured() override; |
| 622 | 622 |
| 623 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; | 623 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; |
| 624 | 624 |
| 625 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt
h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; | 625 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt
h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; |
| 626 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe
ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons
t; | 626 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe
ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons
t; |
| 627 | 627 |
| 628 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i
sInlineBlockOrInlineTable(); } | 628 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i
sInlineBlockOrInlineTable(); } |
| 629 | 629 |
| 630 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const OVERRIDE; | 630 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const override; |
| 631 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; | 631 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; |
| 632 | 632 |
| 633 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); | 633 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); |
| 634 | 634 |
| 635 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& container
Rect) const OVERRIDE; | 635 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& container
Rect) const override; |
| 636 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; | 636 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; |
| 637 | 637 |
| 638 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH
eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight;
} | 638 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH
eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight;
} |
| 639 | 639 |
| 640 virtual InvalidationReason paintInvalidationReason(const RenderLayerModelObj
ect& paintInvalidationContainer, | 640 virtual InvalidationReason paintInvalidationReason(const RenderLayerModelObj
ect& paintInvalidationContainer, |
| 641 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, | 641 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, |
| 642 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva
lidationContainer) const OVERRIDE; | 642 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva
lidationContainer) const override; |
| 643 virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& pain
tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds
, const LayoutPoint& positionFromPaintInvalidationContainer) OVERRIDE; | 643 virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& pain
tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds
, const LayoutPoint& positionFromPaintInvalidationContainer) override; |
| 644 | 644 |
| 645 virtual void clearPaintInvalidationState(const PaintInvalidationState&) OVER
RIDE; | 645 virtual void clearPaintInvalidationState(const PaintInvalidationState&) over
ride; |
| 646 #if ENABLE(ASSERT) | 646 #if ENABLE(ASSERT) |
| 647 virtual bool paintInvalidationStateIsDirty() const OVERRIDE; | 647 virtual bool paintInvalidationStateIsDirty() const override; |
| 648 #endif | 648 #endif |
| 649 | 649 |
| 650 private: | 650 private: |
| 651 void invalidatePaintRectClippedByOldAndNewBounds(const RenderLayerModelObjec
t& paintInvalidationContainer, const LayoutRect&, const LayoutRect& oldBounds, c
onst LayoutRect& newBounds); | 651 void invalidatePaintRectClippedByOldAndNewBounds(const RenderLayerModelObjec
t& paintInvalidationContainer, const LayoutRect&, const LayoutRect& oldBounds, c
onst LayoutRect& newBounds); |
| 652 | 652 |
| 653 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render
Style* oldStyle); | 653 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render
Style* oldStyle); |
| 654 void updateGridPositionAfterStyleChange(const RenderStyle*); | 654 void updateGridPositionAfterStyleChange(const RenderStyle*); |
| 655 | 655 |
| 656 bool autoWidthShouldFitContent() const; | 656 bool autoWidthShouldFitContent() const; |
| 657 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi
calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&)
const; | 657 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi
calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&)
const; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 if (!m_rareData) | 692 if (!m_rareData) |
| 693 m_rareData = adoptPtr(new RenderBoxRareData()); | 693 m_rareData = adoptPtr(new RenderBoxRareData()); |
| 694 return *m_rareData.get(); | 694 return *m_rareData.get(); |
| 695 } | 695 } |
| 696 | 696 |
| 697 void savePreviousBorderBoxSizeIfNeeded(); | 697 void savePreviousBorderBoxSizeIfNeeded(); |
| 698 LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize
) const; | 698 LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize
) const; |
| 699 | 699 |
| 700 bool logicalHeightComputesAsNone(SizeType) const; | 700 bool logicalHeightComputesAsNone(SizeType) const; |
| 701 | 701 |
| 702 virtual InvalidationReason invalidatePaintIfNeeded(const PaintInvalidationSt
ate&, const RenderLayerModelObject& newPaintInvalidationContainer) OVERRIDE FINA
L; | 702 virtual InvalidationReason invalidatePaintIfNeeded(const PaintInvalidationSt
ate&, const RenderLayerModelObject& newPaintInvalidationContainer) override fina
l; |
| 703 | 703 |
| 704 bool isBox() const WTF_DELETED_FUNCTION; // This will catch anyone doing an
unnecessary check. | 704 bool isBox() const WTF_DELETED_FUNCTION; // This will catch anyone doing an
unnecessary check. |
| 705 | 705 |
| 706 // The width/height of the contents + borders + padding. The x/y location i
s relative to our container (which is not always our parent). | 706 // The width/height of the contents + borders + padding. The x/y location i
s relative to our container (which is not always our parent). |
| 707 LayoutRect m_frameRect; | 707 LayoutRect m_frameRect; |
| 708 | 708 |
| 709 // Our intrinsic height, used for min-height: min-content etc. Maintained by | 709 // Our intrinsic height, used for min-height: min-content etc. Maintained by |
| 710 // updateLogicalHeight. This is logicalHeight() before it is clamped to | 710 // updateLogicalHeight. This is logicalHeight() before it is clamped to |
| 711 // min/max. | 711 // min/max. |
| 712 mutable LayoutUnit m_intrinsicContentLogicalHeight; | 712 mutable LayoutUnit m_intrinsicContentLogicalHeight; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 if (UNLIKELY(inlineBoxWrapper() != 0)) | 767 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 768 deleteLineBoxWrapper(); | 768 deleteLineBoxWrapper(); |
| 769 } | 769 } |
| 770 | 770 |
| 771 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 771 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace blink | 774 } // namespace blink |
| 775 | 775 |
| 776 #endif // RenderBox_h | 776 #endif // RenderBox_h |
| OLD | NEW |