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

Side by Side Diff: sky/engine/core/dom/Range.cpp

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/engine/core/dom/ElementRareData.cpp ('k') | sky/engine/core/editing/Editor.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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. 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 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 if (node->isElementNode()) 1465 if (node->isElementNode())
1466 nodeSet.add(node); 1466 nodeSet.add(node);
1467 } 1467 }
1468 1468
1469 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next( *node)) { 1469 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next( *node)) {
1470 if (node->isElementNode()) { 1470 if (node->isElementNode()) {
1471 if (!nodeSet.contains(node->parentNode())) { 1471 if (!nodeSet.contains(node->parentNode())) {
1472 if (RenderBoxModelObject* renderBoxModelObject = toElement(node) ->renderBoxModelObject()) { 1472 if (RenderBoxModelObject* renderBoxModelObject = toElement(node) ->renderBoxModelObject()) {
1473 Vector<FloatQuad> elementQuads; 1473 Vector<FloatQuad> elementQuads;
1474 renderBoxModelObject->absoluteQuads(elementQuads); 1474 renderBoxModelObject->absoluteQuads(elementQuads);
1475 m_ownerDocument->adjustFloatQuadsForScroll(elementQuads);
1476 1475
1477 quads.appendVector(elementQuads); 1476 quads.appendVector(elementQuads);
1478 } 1477 }
1479 } 1478 }
1480 } else if (node->isTextNode()) { 1479 } else if (node->isTextNode()) {
1481 if (RenderText* renderText = toText(node)->renderer()) { 1480 if (RenderText* renderText = toText(node)->renderer()) {
1482 int startOffset = (node == startContainer) ? m_start.offset() : 0; 1481 int startOffset = (node == startContainer) ? m_start.offset() : 0;
1483 int endOffset = (node == endContainer) ? m_end.offset() : INT_MA X; 1482 int endOffset = (node == endContainer) ? m_end.offset() : INT_MA X;
1484 1483
1485 Vector<FloatQuad> textQuads; 1484 Vector<FloatQuad> textQuads;
1486 renderText->absoluteQuadsForRange(textQuads, startOffset, endOff set); 1485 renderText->absoluteQuadsForRange(textQuads, startOffset, endOff set);
1487 m_ownerDocument->adjustFloatQuadsForScroll(textQuads);
1488 1486
1489 quads.appendVector(textQuads); 1487 quads.appendVector(textQuads);
1490 } 1488 }
1491 } 1489 }
1492 } 1490 }
1493 } 1491 }
1494 1492
1495 FloatRect Range::boundingRect() const 1493 FloatRect Range::boundingRect() const
1496 { 1494 {
1497 m_ownerDocument->updateLayout(); 1495 m_ownerDocument->updateLayout();
(...skipping 16 matching lines...) Expand all
1514 1512
1515 void showTree(const blink::Range* range) 1513 void showTree(const blink::Range* range)
1516 { 1514 {
1517 if (range && range->boundaryPointsValid()) { 1515 if (range && range->boundaryPointsValid()) {
1518 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); 1516 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E");
1519 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); 1517 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset());
1520 } 1518 }
1521 } 1519 }
1522 1520
1523 #endif 1521 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ElementRareData.cpp ('k') | sky/engine/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698