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

Side by Side Diff: Source/core/css/resolver/StyleAdjuster.cpp

Issue 328553004: Get rid of scheduleSVGFilterLayerUpdateHack call for plugins. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 19 matching lines...) Expand all
30 #include "core/css/resolver/StyleAdjuster.h" 30 #include "core/css/resolver/StyleAdjuster.h"
31 31
32 #include "HTMLNames.h" 32 #include "HTMLNames.h"
33 #include "SVGNames.h" 33 #include "SVGNames.h"
34 #include "core/dom/ContainerNode.h" 34 #include "core/dom/ContainerNode.h"
35 #include "core/dom/Document.h" 35 #include "core/dom/Document.h"
36 #include "core/dom/Element.h" 36 #include "core/dom/Element.h"
37 #include "core/dom/NodeRenderStyle.h" 37 #include "core/dom/NodeRenderStyle.h"
38 #include "core/html/HTMLIFrameElement.h" 38 #include "core/html/HTMLIFrameElement.h"
39 #include "core/html/HTMLInputElement.h" 39 #include "core/html/HTMLInputElement.h"
40 #include "core/html/HTMLPlugInElement.h"
40 #include "core/html/HTMLTableCellElement.h" 41 #include "core/html/HTMLTableCellElement.h"
41 #include "core/html/HTMLTextAreaElement.h" 42 #include "core/html/HTMLTextAreaElement.h"
42 #include "core/frame/FrameView.h" 43 #include "core/frame/FrameView.h"
43 #include "core/frame/Settings.h" 44 #include "core/frame/Settings.h"
44 #include "core/rendering/RenderTheme.h" 45 #include "core/rendering/RenderTheme.h"
45 #include "core/rendering/style/GridPosition.h" 46 #include "core/rendering/style/GridPosition.h"
46 #include "core/rendering/style/RenderStyle.h" 47 #include "core/rendering/style/RenderStyle.h"
47 #include "core/rendering/style/RenderStyleConstants.h" 48 #include "core/rendering/style/RenderStyleConstants.h"
48 #include "core/svg/SVGSVGElement.h" 49 #include "core/svg/SVGSVGElement.h"
49 #include "platform/Length.h" 50 #include "platform/Length.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 365
365 // Important: Intrinsic margins get added to controls before the theme h as adjusted the style, 366 // Important: Intrinsic margins get added to controls before the theme h as adjusted the style,
366 // since the theme will alter fonts and heights/widths. 367 // since the theme will alter fonts and heights/widths.
367 // 368 //
368 // Don't apply intrinsic margins to image buttons. The designer knows ho w big the images are, 369 // Don't apply intrinsic margins to image buttons. The designer knows ho w big the images are,
369 // so we have to treat all image buttons as though they were explicitly sized. 370 // so we have to treat all image buttons as though they were explicitly sized.
370 if (style->fontSize() >= 11 && (!isHTMLInputElement(element) || !toHTMLI nputElement(element).isImageButton())) 371 if (style->fontSize() >= 11 && (!isHTMLInputElement(element) || !toHTMLI nputElement(element).isImageButton()))
371 addIntrinsicMargins(style); 372 addIntrinsicMargins(style);
372 return; 373 return;
373 } 374 }
375
376 if (isHTMLPlugInElement(element))
esprehn 2014/06/10 02:19:09 Can you add braces and an early return? I know it'
377 style->setRequiresAcceleratedCompositingForExternalReasons(toHTMLPlugInE lement(element).shouldAccelerate());
374 } 378 }
375 379
376 void StyleAdjuster::adjustOverflow(RenderStyle* style) 380 void StyleAdjuster::adjustOverflow(RenderStyle* style)
377 { 381 {
378 ASSERT(style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE); 382 ASSERT(style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE);
379 383
380 // If either overflow value is not visible, change to auto. 384 // If either overflow value is not visible, change to auto.
381 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { 385 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) {
382 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden 386 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden
383 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it 387 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX)) 445 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX))
442 style->setWritingMode(TopToBottomWritingMode); 446 style->setWritingMode(TopToBottomWritingMode);
443 447
444 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) { 448 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) {
445 style->setFloating(NoFloat); 449 style->setFloating(NoFloat);
446 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles)); 450 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles));
447 } 451 }
448 } 452 }
449 453
450 } 454 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLPlugInElement.h » ('j') | Source/core/html/HTMLPlugInElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698