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

Side by Side Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 1363913004: [Reland] Invalidate whitespace text on text color changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 if (!o) 931 if (!o)
932 break; 932 break;
933 } 933 }
934 ASSERT(o); 934 ASSERT(o);
935 935
936 if (!o->isInline() || o->isReplaced()) { 936 if (!o->isInline() || o->isReplaced()) {
937 point = o->localToAbsolute(FloatPoint(), UseTransforms); 937 point = o->localToAbsolute(FloatPoint(), UseTransforms);
938 return true; 938 return true;
939 } 939 }
940 940
941 if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toLa youtText(o)->firstTextBox()) { 941 if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toLa youtText(o)->hasTextBoxes()) {
942 // Do nothing - skip unrendered whitespace that is a child or next s ibling of the anchor. 942 // Do nothing - skip unrendered whitespace that is a child or next s ibling of the anchor.
943 } else if ((o->isText() && !o->isBR()) || o->isReplaced()) { 943 } else if ((o->isText() && !o->isBR()) || o->isReplaced()) {
944 point = FloatPoint(); 944 point = FloatPoint();
945 if (o->isText() && toLayoutText(o)->firstTextBox()) { 945 if (o->isText() && toLayoutText(o)->firstTextBox()) {
946 point.move(toLayoutText(o)->linesBoundingBox().x(), toLayoutText (o)->firstTextBox()->root().lineTop().toFloat()); 946 point.move(toLayoutText(o)->linesBoundingBox().x(), toLayoutText (o)->firstTextBox()->root().lineTop().toFloat());
947 point = o->localToAbsolute(point, UseTransforms); 947 point = o->localToAbsolute(point, UseTransforms);
948 } else if (o->isBox()) { 948 } else if (o->isBox()) {
949 LayoutBox* box = toLayoutBox(o); 949 LayoutBox* box = toLayoutBox(o);
950 point.moveBy(box->location()); 950 point.moveBy(box->location());
951 point = o->container()->localToAbsolute(point, UseTransforms); 951 point = o->container()->localToAbsolute(point, UseTransforms);
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 return true; 1528 return true;
1529 1529
1530 if (node->isElementNode() && toElement(node)->shadow()) 1530 if (node->isElementNode() && toElement(node)->shadow())
1531 return true; 1531 return true;
1532 1532
1533 return false; 1533 return false;
1534 } 1534 }
1535 #endif 1535 #endif
1536 1536
1537 } // namespace blink 1537 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698