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

Side by Side Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 1986563002: Apply vertical-align style of <sub> and <sup> to child elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify the test case Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 void Editor::applyParagraphStyleToSelection(StylePropertySet* style, EditAction editingAction) 634 void Editor::applyParagraphStyleToSelection(StylePropertySet* style, EditAction editingAction)
635 { 635 {
636 if (!style || style->isEmpty() || !canEditRichly()) 636 if (!style || style->isEmpty() || !canEditRichly())
637 return; 637 return;
638 638
639 applyParagraphStyle(style, editingAction); 639 applyParagraphStyle(style, editingAction);
640 } 640 }
641 641
642 bool Editor::selectionStartHasStyle(CSSPropertyID propertyID, const String& valu e) const 642 bool Editor::selectionStartHasStyle(CSSPropertyID propertyID, const String& valu e) const
643 { 643 {
644 return EditingStyle::create(propertyID, value)->triStateOfStyle( 644 EditingStyle* styleToCheck = EditingStyle::create(propertyID, value);
645 EditingStyle::styleAtSelectionStart(frame().selection().selection(), pro pertyID == CSSPropertyBackgroundColor)); 645 EditingStyle* styleAtStart = EditingStyle::styleAtSelectionStart(frame().sel ection().selection(),
646 propertyID == CSSPropertyBackgroundColor, styleToCheck->style());
647 return styleToCheck->triStateOfStyle(styleAtStart);
646 } 648 }
647 649
648 TriState Editor::selectionHasStyle(CSSPropertyID propertyID, const String& value ) const 650 TriState Editor::selectionHasStyle(CSSPropertyID propertyID, const String& value ) const
649 { 651 {
650 return EditingStyle::create(propertyID, value)->triStateOfStyle(frame().sele ction().selection()); 652 return EditingStyle::create(propertyID, value)->triStateOfStyle(frame().sele ction().selection());
651 } 653 }
652 654
653 String Editor::selectionStartCSSPropertyValue(CSSPropertyID propertyID) 655 String Editor::selectionStartCSSPropertyValue(CSSPropertyID propertyID)
654 { 656 {
655 EditingStyle* selectionStyle = EditingStyle::styleAtSelectionStart(frame().s election().selection(), 657 EditingStyle* selectionStyle = EditingStyle::styleAtSelectionStart(frame().s election().selection(),
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 } 1369 }
1368 1370
1369 DEFINE_TRACE(Editor) 1371 DEFINE_TRACE(Editor)
1370 { 1372 {
1371 visitor->trace(m_frame); 1373 visitor->trace(m_frame);
1372 visitor->trace(m_lastEditCommand); 1374 visitor->trace(m_lastEditCommand);
1373 visitor->trace(m_mark); 1375 visitor->trace(m_mark);
1374 } 1376 }
1375 1377
1376 } // namespace blink 1378 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698