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

Side by Side Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 681023002: Remove a bunch of frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/page/ChromeClient.h ('k') | sky/engine/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 } 1787 }
1788 1788
1789 if (containerSkipped) { 1789 if (containerSkipped) {
1790 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates. 1790 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates.
1791 LayoutSize containerOffset = paintInvalidationContainer->offsetFromAnces torContainer(o); 1791 LayoutSize containerOffset = paintInvalidationContainer->offsetFromAnces torContainer(o);
1792 rect.move(-containerOffset); 1792 rect.move(-containerOffset);
1793 return; 1793 return;
1794 } 1794 }
1795 1795
1796 if (o->isRenderView()) 1796 if (o->isRenderView())
1797 toRenderView(o)->mapRectToPaintInvalidationBacking(paintInvalidationCont ainer, rect, position == FixedPosition ? RenderView::IsFixedPosition : RenderVie w::IsNotFixedPosition, paintInvalidationState); 1797 toRenderView(o)->mapRectToPaintInvalidationBacking(paintInvalidationCont ainer, rect, paintInvalidationState);
1798 else 1798 else
1799 o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, p aintInvalidationState); 1799 o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, p aintInvalidationState);
1800 } 1800 }
1801 1801
1802 void RenderBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p aintInvalidationRect) const 1802 void RenderBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p aintInvalidationRect) const
1803 { 1803 {
1804 if (style()->hasFilter()) 1804 if (style()->hasFilter())
1805 style()->filterOutsets().expandRect(paintInvalidationRect); 1805 style()->filterOutsets().expandRect(paintInvalidationRect);
1806 } 1806 }
1807 1807
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 2452
2453 LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo delObject* containingBlock, bool checkForPerpendicularWritingMode) const 2453 LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo delObject* containingBlock, bool checkForPerpendicularWritingMode) const
2454 { 2454 {
2455 if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWriting Mode() != isHorizontalWritingMode()) 2455 if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWriting Mode() != isHorizontalWritingMode())
2456 return containingBlockLogicalHeightForPositioned(containingBlock, false) ; 2456 return containingBlockLogicalHeightForPositioned(containingBlock, false) ;
2457 2457
2458 // Use viewport as container for top-level fixed-position elements. 2458 // Use viewport as container for top-level fixed-position elements.
2459 if (style()->position() == FixedPosition && containingBlock->isRenderView()) { 2459 if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
2460 const RenderView* view = toRenderView(containingBlock); 2460 const RenderView* view = toRenderView(containingBlock);
2461 if (FrameView* frameView = view->frameView()) { 2461 if (FrameView* frameView = view->frameView()) {
2462 LayoutRect viewportRect = frameView->viewportConstrainedVisibleConte ntRect(); 2462 LayoutRect viewportRect = frameView->visibleContentRect();
2463 return containingBlock->isHorizontalWritingMode() ? viewportRect.wid th() : viewportRect.height(); 2463 return containingBlock->isHorizontalWritingMode() ? viewportRect.wid th() : viewportRect.height();
2464 } 2464 }
2465 } 2465 }
2466 2466
2467 if (containingBlock->isBox()) 2467 if (containingBlock->isBox())
2468 return toRenderBox(containingBlock)->clientLogicalWidth(); 2468 return toRenderBox(containingBlock)->clientLogicalWidth();
2469 2469
2470 ASSERT(containingBlock->isRenderInline() && containingBlock->isRelPositioned ()); 2470 ASSERT(containingBlock->isRenderInline() && containingBlock->isRelPositioned ());
2471 2471
2472 const RenderInline* flow = toRenderInline(containingBlock); 2472 const RenderInline* flow = toRenderInline(containingBlock);
(...skipping 19 matching lines...) Expand all
2492 2492
2493 LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxM odelObject* containingBlock, bool checkForPerpendicularWritingMode) const 2493 LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxM odelObject* containingBlock, bool checkForPerpendicularWritingMode) const
2494 { 2494 {
2495 if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWriting Mode() != isHorizontalWritingMode()) 2495 if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWriting Mode() != isHorizontalWritingMode())
2496 return containingBlockLogicalWidthForPositioned(containingBlock, false); 2496 return containingBlockLogicalWidthForPositioned(containingBlock, false);
2497 2497
2498 // Use viewport as container for top-level fixed-position elements. 2498 // Use viewport as container for top-level fixed-position elements.
2499 if (style()->position() == FixedPosition && containingBlock->isRenderView()) { 2499 if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
2500 const RenderView* view = toRenderView(containingBlock); 2500 const RenderView* view = toRenderView(containingBlock);
2501 if (FrameView* frameView = view->frameView()) { 2501 if (FrameView* frameView = view->frameView()) {
2502 LayoutRect viewportRect = frameView->viewportConstrainedVisibleConte ntRect(); 2502 LayoutRect viewportRect = frameView->visibleContentRect();
2503 return containingBlock->isHorizontalWritingMode() ? viewportRect.hei ght() : viewportRect.width(); 2503 return containingBlock->isHorizontalWritingMode() ? viewportRect.hei ght() : viewportRect.width();
2504 } 2504 }
2505 } 2505 }
2506 2506
2507 if (containingBlock->isBox()) { 2507 if (containingBlock->isBox()) {
2508 const RenderBlock* cb = containingBlock->isRenderBlock() ? 2508 const RenderBlock* cb = containingBlock->isRenderBlock() ?
2509 toRenderBlock(containingBlock) : containingBlock->containingBlock(); 2509 toRenderBlock(containingBlock) : containingBlock->containingBlock();
2510 return cb->clientLogicalHeight(); 2510 return cb->clientLogicalHeight();
2511 } 2511 }
2512 2512
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
4208 4208
4209 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) 4209 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style)
4210 { 4210 {
4211 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); 4211 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor);
4212 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); 4212 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage();
4213 ASSERT(hasBackground == style.hasBackground()); 4213 ASSERT(hasBackground == style.hasBackground());
4214 hasBorder = style.hasBorder(); 4214 hasBorder = style.hasBorder();
4215 } 4215 }
4216 4216
4217 } // namespace blink 4217 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/page/ChromeClient.h ('k') | sky/engine/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698