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

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

Issue 688443003: Remove a bit more position:fixed plumbing. (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/rendering/RenderObject.h ('k') | no next file » | 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) 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 if (!isText() && m_style->position() == AbsolutePosition) { 628 if (!isText() && m_style->position() == AbsolutePosition) {
629 while (o) { 629 while (o) {
630 // For relpositioned inlines, we return the nearest non-anonymous en closing block. We don't try 630 // For relpositioned inlines, we return the nearest non-anonymous en closing block. We don't try
631 // to return the inline itself. This allows us to avoid having a po sitioned objects 631 // to return the inline itself. This allows us to avoid having a po sitioned objects
632 // list in all RenderInlines and lets us return a strongly-typed Ren derBlock* result 632 // list in all RenderInlines and lets us return a strongly-typed Ren derBlock* result
633 // from this method. The container() method can actually be used to obtain the 633 // from this method. The container() method can actually be used to obtain the
634 // inline directly. 634 // inline directly.
635 if (o->style()->position() != StaticPosition && (!o->isInline() || o ->isReplaced())) 635 if (o->style()->position() != StaticPosition && (!o->isInline() || o ->isReplaced()))
636 break; 636 break;
637 637
638 if (o->canContainFixedPositionObjects()) 638 if (o->canContainAbsolutePositionObjects())
639 break; 639 break;
640 640
641 if (o->style()->hasInFlowPosition() && o->isInline() && !o->isReplac ed()) { 641 if (o->style()->hasInFlowPosition() && o->isInline() && !o->isReplac ed()) {
642 o = o->containingBlock(); 642 o = o->containingBlock();
643 break; 643 break;
644 } 644 }
645 645
646 o = o->parent(); 646 o = o->parent();
647 } 647 }
648 648
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 2283
2284 EPosition pos = m_style->position(); 2284 EPosition pos = m_style->position();
2285 if (pos == AbsolutePosition) { 2285 if (pos == AbsolutePosition) {
2286 // We technically just want our containing block, but 2286 // We technically just want our containing block, but
2287 // we may not have one if we're part of an uninstalled 2287 // we may not have one if we're part of an uninstalled
2288 // subtree. We'll climb as high as we can though. 2288 // subtree. We'll climb as high as we can though.
2289 while (o) { 2289 while (o) {
2290 if (o->style()->position() != StaticPosition) 2290 if (o->style()->position() != StaticPosition)
2291 break; 2291 break;
2292 2292
2293 if (o->canContainFixedPositionObjects()) 2293 if (o->canContainAbsolutePositionObjects())
2294 break; 2294 break;
2295 2295
2296 if (paintInvalidationContainerSkipped && o == paintInvalidationConta iner) 2296 if (paintInvalidationContainerSkipped && o == paintInvalidationConta iner)
2297 *paintInvalidationContainerSkipped = true; 2297 *paintInvalidationContainerSkipped = true;
2298 2298
2299 o = o->parent(); 2299 o = o->parent();
2300 } 2300 }
2301 } 2301 }
2302 2302
2303 return o; 2303 return o;
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2888 { 2888 {
2889 if (object1) { 2889 if (object1) {
2890 const blink::RenderObject* root = object1; 2890 const blink::RenderObject* root = object1;
2891 while (root->parent()) 2891 while (root->parent())
2892 root = root->parent(); 2892 root = root->parent();
2893 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2893 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2894 } 2894 }
2895 } 2895 }
2896 2896
2897 #endif 2897 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698