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

Side by Side Diff: Source/WebCore/rendering/RenderInline.cpp

Issue 12641003: Merge 144350 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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
« no previous file with comments | « Source/WebCore/rendering/RenderInline.h ('k') | Source/WebCore/rendering/RenderLayer.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 * 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 1358
1359 void RenderInline::imageChanged(WrappedImagePtr, const IntRect*) 1359 void RenderInline::imageChanged(WrappedImagePtr, const IntRect*)
1360 { 1360 {
1361 if (!parent()) 1361 if (!parent())
1362 return; 1362 return;
1363 1363
1364 // FIXME: We can do better. 1364 // FIXME: We can do better.
1365 repaint(); 1365 repaint();
1366 } 1366 }
1367 1367
1368 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset) 1368 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer)
1369 { 1369 {
1370 AbsoluteRectsGeneratorContext context(rects, additionalOffset); 1370 AbsoluteRectsGeneratorContext context(rects, additionalOffset);
1371 generateLineBoxRects(context); 1371 generateLineBoxRects(context);
1372 1372
1373 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) { 1373 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
1374 if (!curr->isText() && !curr->isListMarker()) { 1374 if (!curr->isText() && !curr->isListMarker()) {
1375 FloatPoint pos(additionalOffset); 1375 FloatPoint pos(additionalOffset);
1376 // FIXME: This doesn't work correctly with transforms. 1376 // FIXME: This doesn't work correctly with transforms.
1377 if (curr->hasLayer()) 1377 if (curr->hasLayer())
1378 pos = curr->localToAbsolute(); 1378 pos = curr->localToContainerPoint(FloatPoint(), paintContainer);
1379 else if (curr->isBox()) 1379 else if (curr->isBox())
1380 pos.move(toRenderBox(curr)->locationOffset()); 1380 pos.move(toRenderBox(curr)->locationOffset());
1381 curr->addFocusRingRects(rects, flooredIntPoint(pos)); 1381 curr->addFocusRingRects(rects, flooredIntPoint(pos), paintContainer) ;
1382 } 1382 }
1383 } 1383 }
1384 1384
1385 if (continuation()) { 1385 if (continuation()) {
1386 if (continuation()->isInline()) 1386 if (continuation()->isInline())
1387 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition alOffset + continuation()->containingBlock()->location() - containingBlock()->lo cation())); 1387 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition alOffset + continuation()->containingBlock()->location() - containingBlock()->lo cation()), paintContainer);
1388 else 1388 else
1389 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition alOffset + toRenderBox(continuation())->location() - containingBlock()->location ())); 1389 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition alOffset + toRenderBox(continuation())->location() - containingBlock()->location ()), paintContainer);
1390 } 1390 }
1391 } 1391 }
1392 1392
1393 void RenderInline::paintOutline(GraphicsContext* graphicsContext, const LayoutPo int& paintOffset) 1393 void RenderInline::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintOf fset)
1394 { 1394 {
1395 if (!hasOutline()) 1395 if (!hasOutline())
1396 return; 1396 return;
1397 1397
1398 RenderStyle* styleToUse = style(); 1398 RenderStyle* styleToUse = style();
1399 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) { 1399 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
1400 if (!theme()->supportsFocusRing(styleToUse)) { 1400 if (!theme()->supportsFocusRing(styleToUse)) {
1401 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring. 1401 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
1402 paintFocusRing(graphicsContext, paintOffset, styleToUse); 1402 paintFocusRing(paintInfo, paintOffset, styleToUse);
1403 } 1403 }
1404 } 1404 }
1405 1405
1406 GraphicsContext* graphicsContext = paintInfo.context;
1406 if (graphicsContext->paintingDisabled()) 1407 if (graphicsContext->paintingDisabled())
1407 return; 1408 return;
1408 1409
1409 if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE) 1410 if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE)
1410 return; 1411 return;
1411 1412
1412 Vector<LayoutRect> rects; 1413 Vector<LayoutRect> rects;
1413 1414
1414 rects.append(LayoutRect()); 1415 rects.append(LayoutRect());
1415 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) { 1416 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 1609
1609 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const 1610 void RenderInline::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1610 { 1611 {
1611 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; 1612 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ;
1612 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo); 1613 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo);
1613 info.addMember(m_children, "children"); 1614 info.addMember(m_children, "children");
1614 info.addMember(m_lineBoxes, "lineBoxes"); 1615 info.addMember(m_lineBoxes, "lineBoxes");
1615 } 1616 }
1616 1617
1617 } // namespace WebCore 1618 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderInline.h ('k') | Source/WebCore/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698