Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp

Issue 1679743006: Expand IntrinsicSizingInfo for SVG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propagate-whether-svg-has
Patch Set: Zero means zero Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 15 matching lines...) Expand all
26 #include "core/editing/PositionWithAffinity.h" 26 #include "core/editing/PositionWithAffinity.h"
27 #include "core/layout/LayoutAnalyzer.h" 27 #include "core/layout/LayoutAnalyzer.h"
28 #include "core/layout/LayoutBlock.h" 28 #include "core/layout/LayoutBlock.h"
29 #include "core/layout/LayoutImage.h" 29 #include "core/layout/LayoutImage.h"
30 #include "core/layout/LayoutInline.h" 30 #include "core/layout/LayoutInline.h"
31 #include "core/layout/LayoutView.h" 31 #include "core/layout/LayoutView.h"
32 #include "core/layout/api/LineLayoutBlockFlow.h" 32 #include "core/layout/api/LineLayoutBlockFlow.h"
33 #include "core/paint/PaintInfo.h" 33 #include "core/paint/PaintInfo.h"
34 #include "core/paint/PaintLayer.h" 34 #include "core/paint/PaintLayer.h"
35 #include "core/paint/ReplacedPainter.h" 35 #include "core/paint/ReplacedPainter.h"
36 #include "core/svg/SVGSVGElement.h"
37 #include "platform/LengthFunctions.h" 36 #include "platform/LengthFunctions.h"
38 37
39 namespace blink { 38 namespace blink {
40 39
41 const int LayoutReplaced::defaultWidth = 300; 40 const int LayoutReplaced::defaultWidth = 300;
42 const int LayoutReplaced::defaultHeight = 150; 41 const int LayoutReplaced::defaultHeight = 150;
43 42
44 LayoutReplaced::LayoutReplaced(Element* element) 43 LayoutReplaced::LayoutReplaced(Element* element)
45 : LayoutBox(element) 44 : LayoutBox(element)
46 , m_intrinsicSize(defaultWidth, defaultHeight) 45 , m_intrinsicSize(defaultWidth, defaultHeight)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 intrinsicSizingInfo.size.scale(style()->effectiveZoom()); 155 intrinsicSizingInfo.size.scale(style()->effectiveZoom());
157 if (isLayoutImage()) 156 if (isLayoutImage())
158 intrinsicSizingInfo.size.scale(toLayoutImage(this)->imageDevicePixel Ratio()); 157 intrinsicSizingInfo.size.scale(toLayoutImage(this)->imageDevicePixel Ratio());
159 158
160 // Update our intrinsic size to match what the content layoutObject has computed, so that when we 159 // Update our intrinsic size to match what the content layoutObject has computed, so that when we
161 // constrain the size below, the correct intrinsic size will be obtained for comparison against 160 // constrain the size below, the correct intrinsic size will be obtained for comparison against
162 // min and max widths. 161 // min and max widths.
163 if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty ()) 162 if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty ())
164 m_intrinsicSize = LayoutSize(intrinsicSizingInfo.size); 163 m_intrinsicSize = LayoutSize(intrinsicSizingInfo.size);
165 164
166 if (!isHorizontalWritingMode()) { 165 if (!isHorizontalWritingMode())
167 if (intrinsicSizingInfo.aspectRatio) 166 intrinsicSizingInfo.transpose();
168 intrinsicSizingInfo.aspectRatio = 1 / intrinsicSizingInfo.aspect Ratio;
169 intrinsicSizingInfo.size = intrinsicSizingInfo.size.transposedSize() ;
170 }
171 } else { 167 } else {
172 computeIntrinsicSizingInfo(intrinsicSizingInfo); 168 computeIntrinsicSizingInfo(intrinsicSizingInfo);
173 if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty ()) 169 if (intrinsicSizingInfo.aspectRatio && !intrinsicSizingInfo.size.isEmpty ())
174 m_intrinsicSize = LayoutSize(isHorizontalWritingMode() ? intrinsicSi zingInfo.size : intrinsicSizingInfo.size.transposedSize()); 170 m_intrinsicSize = LayoutSize(isHorizontalWritingMode() ? intrinsicSi zingInfo.size : intrinsicSizingInfo.size.transposedSize());
175 } 171 }
176 } 172 }
177 173
178 FloatSize LayoutReplaced::constrainIntrinsicSizeToMinMax(const IntrinsicSizingIn fo& intrinsicSizingInfo) const 174 FloatSize LayoutReplaced::constrainIntrinsicSizeToMinMax(const IntrinsicSizingIn fo& intrinsicSizingInfo) const
179 { 175 {
180 // Constrain the intrinsic size along each axis according to minimum and max imum width/heights along the opposite 176 // Constrain the intrinsic size along each axis according to minimum and max imum width/heights along the opposite
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 ASSERT(!embeddedContentBox()); 533 ASSERT(!embeddedContentBox());
538 intrinsicSizingInfo.size = FloatSize(intrinsicLogicalWidth().toFloat(), intr insicLogicalHeight().toFloat()); 534 intrinsicSizingInfo.size = FloatSize(intrinsicLogicalWidth().toFloat(), intr insicLogicalHeight().toFloat());
539 535
540 // Figure out if we need to compute an intrinsic ratio. 536 // Figure out if we need to compute an intrinsic ratio.
541 if (intrinsicSizingInfo.size.isEmpty() || !layoutObjectHasAspectRatio(this)) 537 if (intrinsicSizingInfo.size.isEmpty() || !layoutObjectHasAspectRatio(this))
542 return; 538 return;
543 539
544 intrinsicSizingInfo.aspectRatio = intrinsicSizingInfo.size.width() / intrins icSizingInfo.size.height(); 540 intrinsicSizingInfo.aspectRatio = intrinsicSizingInfo.size.width() / intrins icSizingInfo.size.height();
545 } 541 }
546 542
547 static bool hasIntrinsicWidthForLayoutBox(LayoutBox* layoutObject)
548 {
549 if (layoutObject && layoutObject->isSVGRoot()) {
550 SVGSVGElement* svg = toSVGSVGElement(layoutObject->node());
551 ASSERT(svg);
552 return svg->hasIntrinsicWidth();
553 }
554
555 return false;
556 }
557
558 static bool hasIntrinsicHeightForLayoutBox(LayoutBox* layoutObject)
559 {
560 if (layoutObject && layoutObject->isSVGRoot()) {
561 SVGSVGElement* svg = toSVGSVGElement(layoutObject->node());
562 ASSERT(svg);
563 return svg->hasIntrinsicHeight();
564 }
565
566 return false;
567 }
568
569 LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh ouldComputePreferred) const 543 LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh ouldComputePreferred) const
570 { 544 {
571 if (style()->logicalWidth().isSpecified() || style()->logicalWidth().isIntri nsic()) 545 if (style()->logicalWidth().isSpecified() || style()->logicalWidth().isIntri nsic())
572 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedL ogicalWidthUsing(MainOrPreferredSize, style()->logicalWidth()), shouldComputePre ferred); 546 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedL ogicalWidthUsing(MainOrPreferredSize, style()->logicalWidth()), shouldComputePre ferred);
573 547
574 LayoutBox* contentLayoutObject = embeddedContentBox(); 548 LayoutBox* contentLayoutObject = embeddedContentBox();
575 549
576 // 10.3.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html #inline-replaced-width 550 // 10.3.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html #inline-replaced-width
577 IntrinsicSizingInfo intrinsicSizingInfo; 551 IntrinsicSizingInfo intrinsicSizingInfo;
578 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI nfo); 552 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI nfo);
579 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn fo); 553 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn fo);
580 554
581 if (style()->logicalWidth().isAuto()) { 555 if (style()->logicalWidth().isAuto()) {
582 bool computedHeightIsAuto = hasAutoHeightOrContainingBlockWithAutoHeight (); 556 bool computedHeightIsAuto = hasAutoHeightOrContainingBlockWithAutoHeight ();
583 // TODO(shanmuga.m@samsung.com): hasIntrinsicWidth/Height information sh ould be obtained
584 // from LayoutBox::computeIntrinsicSizingInfo().
585 bool hasIntrinsicWidth = constrainedSize.width() > 0 || hasIntrinsicWidt hForLayoutBox(contentLayoutObject);
586 557
587 // If 'height' and 'width' both have computed values of 'auto' and the e lement also has an intrinsic width, then that intrinsic width is the used value of 'width'. 558 // If 'height' and 'width' both have computed values of 'auto' and the e lement also has an intrinsic width, then that intrinsic width is the used value of 'width'.
588 if (computedHeightIsAuto && hasIntrinsicWidth) 559 if (computedHeightIsAuto && intrinsicSizingInfo.hasWidth)
589 return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit(c onstrainedSize.width()), shouldComputePreferred); 560 return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit(c onstrainedSize.width()), shouldComputePreferred);
590 561
591 bool hasIntrinsicHeight = constrainedSize.height() > 0 || hasIntrinsicHe ightForLayoutBox(contentLayoutObject);
592
593 if (intrinsicSizingInfo.aspectRatio) { 562 if (intrinsicSizingInfo.aspectRatio) {
594 // If 'height' and 'width' both have computed values of 'auto' and t he element has no intrinsic width, but does have an intrinsic height and intrins ic ratio; 563 // If 'height' and 'width' both have computed values of 'auto' and t he element has no intrinsic width, but does have an intrinsic height and intrins ic ratio;
595 // or if 'width' has a computed value of 'auto', 'height' has some o ther computed value, and the element does have an intrinsic ratio; then the used value 564 // or if 'width' has a computed value of 'auto', 'height' has some o ther computed value, and the element does have an intrinsic ratio; then the used value
596 // of 'width' is: (used height) * (intrinsic ratio) 565 // of 'width' is: (used height) * (intrinsic ratio)
597 if (intrinsicSizingInfo.aspectRatio && ((computedHeightIsAuto && !ha sIntrinsicWidth && hasIntrinsicHeight) || !computedHeightIsAuto)) { 566 if ((computedHeightIsAuto && !intrinsicSizingInfo.hasWidth && intrin sicSizingInfo.hasHeight) || !computedHeightIsAuto) {
598 LayoutUnit logicalHeight = computeReplacedLogicalHeight(); 567 LayoutUnit logicalHeight = computeReplacedLogicalHeight();
599 return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUn it(logicalHeight * intrinsicSizingInfo.aspectRatio), shouldComputePreferred); 568 return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUn it(logicalHeight * intrinsicSizingInfo.aspectRatio), shouldComputePreferred);
600 } 569 }
601 570
602 // If 'height' and 'width' both have computed values of 'auto' and t he element has an intrinsic ratio but no intrinsic height or width, then the use d value of 571 // If 'height' and 'width' both have computed values of 'auto' and t he element has an intrinsic ratio but no intrinsic height or width, then the use d value of
603 // 'width' is undefined in CSS 2.1. However, it is suggested that, i f the containing block's width does not itself depend on the replaced element's width, then 572 // 'width' is undefined in CSS 2.1. However, it is suggested that, i f the containing block's width does not itself depend on the replaced element's width, then
604 // the used value of 'width' is calculated from the constraint equat ion used for block-level, non-replaced elements in normal flow. 573 // the used value of 'width' is calculated from the constraint equat ion used for block-level, non-replaced elements in normal flow.
605 if (computedHeightIsAuto && !hasIntrinsicWidth && !hasIntrinsicHeigh t) { 574 if (computedHeightIsAuto && !intrinsicSizingInfo.hasWidth && !intrin sicSizingInfo.hasHeight) {
606 if (shouldComputePreferred == ComputePreferred) 575 if (shouldComputePreferred == ComputePreferred)
607 return computeReplacedLogicalWidthRespectingMinMaxWidth(Layo utUnit(), ComputePreferred); 576 return computeReplacedLogicalWidthRespectingMinMaxWidth(Layo utUnit(), ComputePreferred);
608 // The aforementioned 'constraint equation' used for block-level , non-replaced elements in normal flow: 577 // The aforementioned 'constraint equation' used for block-level , non-replaced elements in normal flow:
609 // 'margin-left' + 'border-left-width' + 'padding-left' + 'width ' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containin g block 578 // 'margin-left' + 'border-left-width' + 'padding-left' + 'width ' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containin g block
610 LayoutUnit logicalWidth = containingBlock()->availableLogicalWid th(); 579 LayoutUnit logicalWidth = containingBlock()->availableLogicalWid th();
611 580
612 // This solves above equation for 'width' (== logicalWidth). 581 // This solves above equation for 'width' (== logicalWidth).
613 LayoutUnit marginStart = minimumValueForLength(style()->marginSt art(), logicalWidth); 582 LayoutUnit marginStart = minimumValueForLength(style()->marginSt art(), logicalWidth);
614 LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd( ), logicalWidth); 583 LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd( ), logicalWidth);
615 logicalWidth = (logicalWidth - (marginStart + marginEnd + (size( ).width() - clientWidth()))).clampNegativeToZero(); 584 logicalWidth = (logicalWidth - (marginStart + marginEnd + (size( ).width() - clientWidth()))).clampNegativeToZero();
616 return computeReplacedLogicalWidthRespectingMinMaxWidth(logicalW idth, shouldComputePreferred); 585 return computeReplacedLogicalWidthRespectingMinMaxWidth(logicalW idth, shouldComputePreferred);
617 } 586 }
618 } 587 }
619 588
620 // Otherwise, if 'width' has a computed value of 'auto', and the element has an intrinsic width, then that intrinsic width is the used value of 'width'. 589 // Otherwise, if 'width' has a computed value of 'auto', and the element has an intrinsic width, then that intrinsic width is the used value of 'width'.
621 if (hasIntrinsicWidth) 590 if (intrinsicSizingInfo.hasWidth)
622 return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit(c onstrainedSize.width()), shouldComputePreferred); 591 return computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit(c onstrainedSize.width()), shouldComputePreferred);
623 592
624 // Otherwise, if 'width' has a computed value of 'auto', but none of the conditions above are met, then the used value of 'width' becomes 300px. If 300p x is too 593 // Otherwise, if 'width' has a computed value of 'auto', but none of the conditions above are met, then the used value of 'width' becomes 300px. If 300p x is too
625 // wide to fit the device, UAs should use the width of the largest recta ngle that has a 2:1 ratio and fits the device instead. 594 // wide to fit the device, UAs should use the width of the largest recta ngle that has a 2:1 ratio and fits the device instead.
626 // Note: We fall through and instead return intrinsicLogicalWidth() here - to preserve existing WebKit behavior, which might or might not be correct, or desired. 595 // Note: We fall through and instead return intrinsicLogicalWidth() here - to preserve existing WebKit behavior, which might or might not be correct, or desired.
627 // Changing this to return cDefaultWidth, will affect lots of test resul ts. Eg. some tests assume that a blank <img> tag (which implies width/height=aut o) 596 // Changing this to return cDefaultWidth, will affect lots of test resul ts. Eg. some tests assume that a blank <img> tag (which implies width/height=aut o)
628 // has no intrinsic size, which is wrong per CSS 2.1, but matches our be havior since a long time. 597 // has no intrinsic size, which is wrong per CSS 2.1, but matches our be havior since a long time.
629 } 598 }
630 599
631 return computeReplacedLogicalWidthRespectingMinMaxWidth(intrinsicLogicalWidt h(), shouldComputePreferred); 600 return computeReplacedLogicalWidthRespectingMinMaxWidth(intrinsicLogicalWidt h(), shouldComputePreferred);
632 } 601 }
633 602
634 LayoutUnit LayoutReplaced::computeReplacedLogicalHeight() const 603 LayoutUnit LayoutReplaced::computeReplacedLogicalHeight() const
635 { 604 {
636 // 10.5 Content height: the 'height' property: http://www.w3.org/TR/CSS21/vi sudet.html#propdef-height 605 // 10.5 Content height: the 'height' property: http://www.w3.org/TR/CSS21/vi sudet.html#propdef-height
637 if (hasReplacedLogicalHeight()) 606 if (hasReplacedLogicalHeight())
638 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplace dLogicalHeightUsing(MainOrPreferredSize, style()->logicalHeight())); 607 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplace dLogicalHeightUsing(MainOrPreferredSize, style()->logicalHeight()));
639 608
640 LayoutBox* contentLayoutObject = embeddedContentBox(); 609 LayoutBox* contentLayoutObject = embeddedContentBox();
641 610
642 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html #inline-replaced-height 611 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html #inline-replaced-height
643 IntrinsicSizingInfo intrinsicSizingInfo; 612 IntrinsicSizingInfo intrinsicSizingInfo;
644 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI nfo); 613 computeIntrinsicSizingInfoForLayoutBox(contentLayoutObject, intrinsicSizingI nfo);
645 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn fo); 614 FloatSize constrainedSize = constrainIntrinsicSizeToMinMax(intrinsicSizingIn fo);
646 615
647 bool widthIsAuto = style()->logicalWidth().isAuto(); 616 bool widthIsAuto = style()->logicalWidth().isAuto();
648 // TODO(shanmuga.m@samsung.com): hasIntrinsicWidth/Height information should be obtained
649 // from LayoutBox::computeIntrinsicSizingInfo().
650 bool hasIntrinsicHeight = constrainedSize.height() > 0 || hasIntrinsicHeight ForLayoutBox(contentLayoutObject);
651 617
652 // If 'height' and 'width' both have computed values of 'auto' and the eleme nt also has an intrinsic height, then that intrinsic height is the used value of 'height'. 618 // If 'height' and 'width' both have computed values of 'auto' and the eleme nt also has an intrinsic height, then that intrinsic height is the used value of 'height'.
653 if (widthIsAuto && hasIntrinsicHeight) 619 if (widthIsAuto && intrinsicSizingInfo.hasHeight)
654 return computeReplacedLogicalHeightRespectingMinMaxHeight(constrainedSiz e.height()); 620 return computeReplacedLogicalHeightRespectingMinMaxHeight(constrainedSiz e.height());
655 621
656 // Otherwise, if 'height' has a computed value of 'auto', and the element ha s an intrinsic ratio then the used value of 'height' is: 622 // Otherwise, if 'height' has a computed value of 'auto', and the element ha s an intrinsic ratio then the used value of 'height' is:
657 // (used width) / (intrinsic ratio) 623 // (used width) / (intrinsic ratio)
658 if (intrinsicSizingInfo.aspectRatio) 624 if (intrinsicSizingInfo.aspectRatio)
659 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(ava ilableLogicalWidth() / intrinsicSizingInfo.aspectRatio)); 625 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(ava ilableLogicalWidth() / intrinsicSizingInfo.aspectRatio));
660 626
661 // Otherwise, if 'height' has a computed value of 'auto', and the element ha s an intrinsic height, then that intrinsic height is the used value of 'height'. 627 // Otherwise, if 'height' has a computed value of 'auto', and the element ha s an intrinsic height, then that intrinsic height is the used value of 'height'.
662 if (hasIntrinsicHeight) 628 if (intrinsicSizingInfo.hasHeight)
663 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con strainedSize.height())); 629 return computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit(con strainedSize.height()));
664 630
665 // Otherwise, if 'height' has a computed value of 'auto', but none of the co nditions above are met, then the used value of 'height' must be set to the heigh t 631 // Otherwise, if 'height' has a computed value of 'auto', but none of the co nditions above are met, then the used value of 'height' must be set to the heigh t
666 // of the largest rectangle that has a 2:1 ratio, has a height not greater t han 150px, and has a width not greater than the device width. 632 // of the largest rectangle that has a 2:1 ratio, has a height not greater t han 150px, and has a width not greater than the device width.
667 return computeReplacedLogicalHeightRespectingMinMaxHeight(intrinsicLogicalHe ight()); 633 return computeReplacedLogicalHeightRespectingMinMaxHeight(intrinsicLogicalHe ight());
668 } 634 }
669 635
670 void LayoutReplaced::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const 636 void LayoutReplaced::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const
671 { 637 {
672 minLogicalWidth = maxLogicalWidth = intrinsicLogicalWidth(); 638 minLogicalWidth = maxLogicalWidth = intrinsicLogicalWidth();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // We only include the space below the baseline in our layer's cached paint invalidation rect if the 741 // We only include the space below the baseline in our layer's cached paint invalidation rect if the
776 // image is selected. Since the selection state has changed update the rect. 742 // image is selected. Since the selection state has changed update the rect.
777 if (hasLayer()) 743 if (hasLayer())
778 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe rForPaintInvalidation())); 744 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe rForPaintInvalidation()));
779 745
780 if (canUpdateSelectionOnRootLineBoxes()) 746 if (canUpdateSelectionOnRootLineBoxes())
781 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone ); 747 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone );
782 } 748 }
783 749
784 } // namespace blink 750 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698