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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2501833002: Fix bug of animated table col/section/row background (Closed)
Patch Set: - Created 4 years, 1 month 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 1884
1885 if (oldStyle && !areCursorsEqual(oldStyle, style())) { 1885 if (oldStyle && !areCursorsEqual(oldStyle, style())) {
1886 if (LocalFrame* frame = this->frame()) { 1886 if (LocalFrame* frame = this->frame()) {
1887 // Cursor update scheduling is done by the local root, which is the main 1887 // Cursor update scheduling is done by the local root, which is the main
1888 // frame if there are no RemoteFrame ancestors in the frame tree. Use of 1888 // frame if there are no RemoteFrame ancestors in the frame tree. Use of
1889 // localFrameRoot() is discouraged but will change when cursor update 1889 // localFrameRoot() is discouraged but will change when cursor update
1890 // scheduling is moved from EventHandler to PageEventHandler. 1890 // scheduling is moved from EventHandler to PageEventHandler.
1891 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate(); 1891 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate();
1892 } 1892 }
1893 } 1893 }
1894
1895 if (diff.needsPaintInvalidation() && oldStyle) {
1896 if (resolveColor(*oldStyle, CSSPropertyBackgroundColor) !=
1897 resolveColor(CSSPropertyBackgroundColor) ||
1898 oldStyle->backgroundLayers() != styleRef().backgroundLayers())
1899 setBackgroundChangedSinceLastPaintInvalidation();
1900 }
1894 } 1901 }
1895 1902
1896 void LayoutObject::propagateStyleToAnonymousChildren() { 1903 void LayoutObject::propagateStyleToAnonymousChildren() {
1897 // FIXME: We could save this call when the change only affected non-inherited 1904 // FIXME: We could save this call when the change only affected non-inherited
1898 // properties. 1905 // properties.
1899 for (LayoutObject* child = slowFirstChild(); child; 1906 for (LayoutObject* child = slowFirstChild(); child;
1900 child = child->nextSibling()) { 1907 child = child->nextSibling()) {
1901 if (!child->isAnonymous() || child->style()->styleType() != PseudoIdNone) 1908 if (!child->isAnonymous() || child->style()->styleType() != PseudoIdNone)
1902 continue; 1909 continue;
1903 1910
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3444 // paintInvalidationStateIsDirty should be kept in sync with the 3451 // paintInvalidationStateIsDirty should be kept in sync with the
3445 // booleans that are cleared below. 3452 // booleans that are cleared below.
3446 ASSERT(!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() || 3453 ASSERT(!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() ||
3447 paintInvalidationStateIsDirty()); 3454 paintInvalidationStateIsDirty());
3448 clearShouldDoFullPaintInvalidation(); 3455 clearShouldDoFullPaintInvalidation();
3449 m_bitfields.setChildShouldCheckForPaintInvalidation(false); 3456 m_bitfields.setChildShouldCheckForPaintInvalidation(false);
3450 m_bitfields.setMayNeedPaintInvalidation(false); 3457 m_bitfields.setMayNeedPaintInvalidation(false);
3451 m_bitfields.setMayNeedPaintInvalidationSubtree(false); 3458 m_bitfields.setMayNeedPaintInvalidationSubtree(false);
3452 m_bitfields.setMayNeedPaintInvalidationAnimatedBackgroundImage(false); 3459 m_bitfields.setMayNeedPaintInvalidationAnimatedBackgroundImage(false);
3453 m_bitfields.setShouldInvalidateSelection(false); 3460 m_bitfields.setShouldInvalidateSelection(false);
3461 m_bitfields.setBackgroundChangedSinceLastPaintInvalidation(false);
3454 } 3462 }
3455 3463
3456 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) { 3464 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) {
3457 return DeprecatedDisableModifyLayoutTreeStructureAsserts:: 3465 return DeprecatedDisableModifyLayoutTreeStructureAsserts::
3458 canModifyLayoutTreeStateInAnyState() || 3466 canModifyLayoutTreeStateInAnyState() ||
3459 document.lifecycle().stateAllowsLayoutTreeMutations(); 3467 document.lifecycle().stateAllowsLayoutTreeMutations();
3460 } 3468 }
3461 3469
3462 DeprecatedDisableModifyLayoutTreeStructureAsserts:: 3470 DeprecatedDisableModifyLayoutTreeStructureAsserts::
3463 DeprecatedDisableModifyLayoutTreeStructureAsserts() 3471 DeprecatedDisableModifyLayoutTreeStructureAsserts()
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
3539 const blink::LayoutObject* root = object1; 3547 const blink::LayoutObject* root = object1;
3540 while (root->parent()) 3548 while (root->parent())
3541 root = root->parent(); 3549 root = root->parent();
3542 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3550 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3543 } else { 3551 } else {
3544 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3552 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3545 } 3553 }
3546 } 3554 }
3547 3555
3548 #endif 3556 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698