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: Source/core/dom/ContainerNode.cpp

Issue 182413005: Return refererence from InlineBox::root() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: re-upload because previous patch didn't upload correctly. Created 6 years, 9 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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 if (!o->isInline() || o->isReplaced()) { 704 if (!o->isInline() || o->isReplaced()) {
705 point = o->localToAbsolute(FloatPoint(), UseTransforms); 705 point = o->localToAbsolute(FloatPoint(), UseTransforms);
706 return true; 706 return true;
707 } 707 }
708 708
709 if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toRe nderText(o)->firstTextBox()) { 709 if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toRe nderText(o)->firstTextBox()) {
710 // do nothing - skip unrendered whitespace that is a child or next s ibling of the anchor 710 // do nothing - skip unrendered whitespace that is a child or next s ibling of the anchor
711 } else if ((o->isText() && !o->isBR()) || o->isReplaced()) { 711 } else if ((o->isText() && !o->isBR()) || o->isReplaced()) {
712 point = FloatPoint(); 712 point = FloatPoint();
713 if (o->isText() && toRenderText(o)->firstTextBox()) { 713 if (o->isText() && toRenderText(o)->firstTextBox()) {
714 point.move(toRenderText(o)->linesBoundingBox().x(), toRenderText (o)->firstTextBox()->root()->lineTop()); 714 point.move(toRenderText(o)->linesBoundingBox().x(), toRenderText (o)->firstTextBox()->root().lineTop());
715 } else if (o->isBox()) { 715 } else if (o->isBox()) {
716 RenderBox* box = toRenderBox(o); 716 RenderBox* box = toRenderBox(o);
717 point.moveBy(box->location()); 717 point.moveBy(box->location());
718 } 718 }
719 point = o->container()->localToAbsolute(point, UseTransforms); 719 point = o->container()->localToAbsolute(point, UseTransforms);
720 return true; 720 return true;
721 } 721 }
722 } 722 }
723 723
724 // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be 724 // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 return true; 1046 return true;
1047 1047
1048 if (node->isElementNode() && toElement(node)->shadow()) 1048 if (node->isElementNode() && toElement(node)->shadow())
1049 return true; 1049 return true;
1050 1050
1051 return false; 1051 return false;
1052 } 1052 }
1053 #endif 1053 #endif
1054 1054
1055 } // namespace WebCore 1055 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/RenderedPosition.h » ('j') | Source/core/rendering/InlineBox.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698