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

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

Issue 689853003: Remove CSS Grid Layout and grid media queries. (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
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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 24 matching lines...) Expand all
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/page/Page.h" 36 #include "core/page/Page.h"
37 #include "core/frame/Settings.h" 37 #include "core/frame/Settings.h"
38 #include "core/rendering/GraphicsContextAnnotator.h" 38 #include "core/rendering/GraphicsContextAnnotator.h"
39 #include "core/rendering/HitTestLocation.h" 39 #include "core/rendering/HitTestLocation.h"
40 #include "core/rendering/HitTestResult.h" 40 #include "core/rendering/HitTestResult.h"
41 #include "core/rendering/InlineIterator.h" 41 #include "core/rendering/InlineIterator.h"
42 #include "core/rendering/InlineTextBox.h" 42 #include "core/rendering/InlineTextBox.h"
43 #include "core/rendering/PaintInfo.h" 43 #include "core/rendering/PaintInfo.h"
44 #include "core/rendering/RenderFlexibleBox.h" 44 #include "core/rendering/RenderFlexibleBox.h"
45 #include "core/rendering/RenderGrid.h"
46 #include "core/rendering/RenderInline.h" 45 #include "core/rendering/RenderInline.h"
47 #include "core/rendering/RenderLayer.h" 46 #include "core/rendering/RenderLayer.h"
48 #include "core/rendering/RenderObjectInlines.h" 47 #include "core/rendering/RenderObjectInlines.h"
49 #include "core/rendering/RenderView.h" 48 #include "core/rendering/RenderView.h"
50 #include "core/rendering/shapes/ShapeOutsideInfo.h" 49 #include "core/rendering/shapes/ShapeOutsideInfo.h"
51 #include "core/rendering/style/ContentData.h" 50 #include "core/rendering/style/ContentData.h"
52 #include "core/rendering/style/RenderStyle.h" 51 #include "core/rendering/style/RenderStyle.h"
53 #include "platform/geometry/FloatQuad.h" 52 #include "platform/geometry/FloatQuad.h"
54 #include "platform/geometry/TransformState.h" 53 #include "platform/geometry/TransformState.h"
55 #include "platform/graphics/GraphicsContextCullSaver.h" 54 #include "platform/graphics/GraphicsContextCullSaver.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 693
695 if (child->previousSibling()) 694 if (child->previousSibling())
696 child->previousSibling()->setNextSibling(child->nextSibling()); 695 child->previousSibling()->setNextSibling(child->nextSibling());
697 if (child->nextSibling()) 696 if (child->nextSibling())
698 child->nextSibling()->setPreviousSibling(child->previousSibling()); 697 child->nextSibling()->setPreviousSibling(child->previousSibling());
699 } 698 }
700 699
701 child->children()->setFirstChild(0); 700 child->children()->setFirstChild(0);
702 child->m_next = nullptr; 701 child->m_next = nullptr;
703 702
704 // RenderGrid keeps track of its children, we must notify it about changes i n the tree.
705 if (child->parent()->isRenderGrid())
706 toRenderGrid(child->parent())->dirtyGrid();
707
708 child->setParent(0); 703 child->setParent(0);
709 child->setPreviousSibling(0); 704 child->setPreviousSibling(0);
710 child->setNextSibling(0); 705 child->setNextSibling(0);
711 706
712 child->destroy(); 707 child->destroy();
713 } 708 }
714 709
715 static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ct* prev, RenderObject* next) 710 static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ct* prev, RenderObject* next)
716 { 711 {
717 if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild-> virtualContinuation()) 712 if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild-> virtualContinuation())
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 } 1313 }
1319 1314
1320 void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInf o, const LayoutPoint& childPoint) 1315 void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInf o, const LayoutPoint& childPoint)
1321 { 1316 {
1322 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection) 1317 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection)
1323 return; 1318 return;
1324 1319
1325 // Paint all phases atomically, as though the element established its own 1320 // Paint all phases atomically, as though the element established its own
1326 // stacking context. (See Appendix E.2, section 7.2.1.4 on 1321 // stacking context. (See Appendix E.2, section 7.2.1.4 on
1327 // inline block/table/replaced elements in the CSS2.1 specification.) 1322 // inline block/table/replaced elements in the CSS2.1 specification.)
1328 // This is also used by other elements (e.g. flex items and grid items). 1323 // This is also used by other elements (e.g. flex items).
1329 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.pha se == PaintPhaseTextClip; 1324 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.pha se == PaintPhaseTextClip;
1330 PaintInfo info(paintInfo); 1325 PaintInfo info(paintInfo);
1331 info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; 1326 info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
1332 renderer->paint(info, childPoint); 1327 renderer->paint(info, childPoint);
1333 if (!preservePhase) { 1328 if (!preservePhase) {
1334 info.phase = PaintPhaseChildBlockBackgrounds; 1329 info.phase = PaintPhaseChildBlockBackgrounds;
1335 renderer->paint(info, childPoint); 1330 renderer->paint(info, childPoint);
1336 info.phase = PaintPhaseFloat; 1331 info.phase = PaintPhaseFloat;
1337 renderer->paint(info, childPoint); 1332 renderer->paint(info, childPoint);
1338 info.phase = PaintPhaseForeground; 1333 info.phase = PaintPhaseForeground;
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 3083 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
3089 { 3084 {
3090 showRenderObject(); 3085 showRenderObject();
3091 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3086 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3092 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3087 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3093 } 3088 }
3094 3089
3095 #endif 3090 #endif
3096 3091
3097 } // namespace blink 3092 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698