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

Side by Side Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 667003003: Remove most of visited link support. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderTreeAsText.h » ('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 * (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. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 { 2566 {
2567 RenderObject* curr = this; 2567 RenderObject* curr = this;
2568 RenderStyle* styleToUse = 0; 2568 RenderStyle* styleToUse = 0;
2569 unsigned currDecs = TextDecorationNone; 2569 unsigned currDecs = TextDecorationNone;
2570 Color resultColor; 2570 Color resultColor;
2571 TextDecorationStyle resultStyle; 2571 TextDecorationStyle resultStyle;
2572 do { 2572 do {
2573 styleToUse = curr->style(firstlineStyle); 2573 styleToUse = curr->style(firstlineStyle);
2574 currDecs = styleToUse->textDecoration(); 2574 currDecs = styleToUse->textDecoration();
2575 currDecs &= decorations; 2575 currDecs &= decorations;
2576 resultColor = styleToUse->visitedDependentDecorationColor(); 2576 resultColor = styleToUse->decorationColor();
2577 resultStyle = styleToUse->textDecorationStyle(); 2577 resultStyle = styleToUse->textDecorationStyle();
2578 // Parameter 'decorations' is cast as an int to enable the bitwise opera tions below. 2578 // Parameter 'decorations' is cast as an int to enable the bitwise opera tions below.
2579 if (currDecs) { 2579 if (currDecs) {
2580 if (currDecs & TextDecorationUnderline) { 2580 if (currDecs & TextDecorationUnderline) {
2581 decorations &= ~TextDecorationUnderline; 2581 decorations &= ~TextDecorationUnderline;
2582 underline.color = resultColor; 2582 underline.color = resultColor;
2583 underline.style = resultStyle; 2583 underline.style = resultStyle;
2584 } 2584 }
2585 if (currDecs & TextDecorationOverline) { 2585 if (currDecs & TextDecorationOverline) {
2586 decorations &= ~TextDecorationOverline; 2586 decorations &= ~TextDecorationOverline;
2587 overline.color = resultColor; 2587 overline.color = resultColor;
2588 overline.style = resultStyle; 2588 overline.style = resultStyle;
2589 } 2589 }
2590 if (currDecs & TextDecorationLineThrough) { 2590 if (currDecs & TextDecorationLineThrough) {
2591 decorations &= ~TextDecorationLineThrough; 2591 decorations &= ~TextDecorationLineThrough;
2592 linethrough.color = resultColor; 2592 linethrough.color = resultColor;
2593 linethrough.style = resultStyle; 2593 linethrough.style = resultStyle;
2594 } 2594 }
2595 } 2595 }
2596 curr = curr->parent(); 2596 curr = curr->parent();
2597 if (curr && curr->isAnonymousBlock() && toRenderBlock(curr)->continuatio n()) 2597 if (curr && curr->isAnonymousBlock() && toRenderBlock(curr)->continuatio n())
2598 curr = toRenderBlock(curr)->continuation(); 2598 curr = toRenderBlock(curr)->continuation();
2599 } while (curr && decorations && (!quirksMode || !curr->node() || (!isHTMLAnc horElement(*curr->node())))); 2599 } while (curr && decorations && (!quirksMode || !curr->node() || (!isHTMLAnc horElement(*curr->node()))));
2600 2600
2601 // If we bailed out, use the element we bailed out at (typically a <font> or <a> element). 2601 // If we bailed out, use the element we bailed out at (typically a <font> or <a> element).
2602 if (decorations && curr) { 2602 if (decorations && curr) {
2603 styleToUse = curr->style(firstlineStyle); 2603 styleToUse = curr->style(firstlineStyle);
2604 resultColor = styleToUse->visitedDependentDecorationColor(); 2604 resultColor = styleToUse->decorationColor();
2605 if (decorations & TextDecorationUnderline) { 2605 if (decorations & TextDecorationUnderline) {
2606 underline.color = resultColor; 2606 underline.color = resultColor;
2607 underline.style = resultStyle; 2607 underline.style = resultStyle;
2608 } 2608 }
2609 if (decorations & TextDecorationOverline) { 2609 if (decorations & TextDecorationOverline) {
2610 overline.color = resultColor; 2610 overline.color = resultColor;
2611 overline.style = resultStyle; 2611 overline.style = resultStyle;
2612 } 2612 }
2613 if (decorations & TextDecorationLineThrough) { 2613 if (decorations & TextDecorationLineThrough) {
2614 linethrough.color = resultColor; 2614 linethrough.color = resultColor;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 { 2911 {
2912 if (object1) { 2912 if (object1) {
2913 const blink::RenderObject* root = object1; 2913 const blink::RenderObject* root = object1;
2914 while (root->parent()) 2914 while (root->parent())
2915 root = root->parent(); 2915 root = root->parent();
2916 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2916 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2917 } 2917 }
2918 } 2918 }
2919 2919
2920 #endif 2920 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderTreeAsText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698