| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 return; | 1020 return; |
| 1021 | 1021 |
| 1022 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 1022 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
| 1023 | 1023 |
| 1024 // We can skip matching the style if the selection is plain text. | 1024 // We can skip matching the style if the selection is plain text. |
| 1025 if ((selection.Start().AnchorNode()->GetLayoutObject() && | 1025 if ((selection.Start().AnchorNode()->GetLayoutObject() && |
| 1026 selection.Start() | 1026 selection.Start() |
| 1027 .AnchorNode() | 1027 .AnchorNode() |
| 1028 ->GetLayoutObject() | 1028 ->GetLayoutObject() |
| 1029 ->Style() | 1029 ->Style() |
| 1030 ->UserModify() == READ_WRITE_PLAINTEXT_ONLY) && | 1030 ->UserModify() == EUserModify::kReadWritePlaintextOnly) && |
| 1031 (selection.end().AnchorNode()->GetLayoutObject() && | 1031 (selection.end().AnchorNode()->GetLayoutObject() && |
| 1032 selection.end().AnchorNode()->GetLayoutObject()->Style()->UserModify() == | 1032 selection.end().AnchorNode()->GetLayoutObject()->Style()->UserModify() == |
| 1033 READ_WRITE_PLAINTEXT_ONLY)) | 1033 EUserModify::kReadWritePlaintextOnly)) |
| 1034 match_style_ = false; | 1034 match_style_ = false; |
| 1035 | 1035 |
| 1036 if (match_style_) { | 1036 if (match_style_) { |
| 1037 insertion_style_ = EditingStyle::Create(selection.Start()); | 1037 insertion_style_ = EditingStyle::Create(selection.Start()); |
| 1038 insertion_style_->MergeTypingStyle(&GetDocument()); | 1038 insertion_style_->MergeTypingStyle(&GetDocument()); |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 const VisiblePosition visible_start = selection.VisibleStart(); | 1041 const VisiblePosition visible_start = selection.VisibleStart(); |
| 1042 const VisiblePosition visible_end = selection.VisibleEnd(); | 1042 const VisiblePosition visible_end = selection.VisibleEnd(); |
| 1043 | 1043 |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 visitor->Trace(start_of_inserted_content_); | 2009 visitor->Trace(start_of_inserted_content_); |
| 2010 visitor->Trace(end_of_inserted_content_); | 2010 visitor->Trace(end_of_inserted_content_); |
| 2011 visitor->Trace(insertion_style_); | 2011 visitor->Trace(insertion_style_); |
| 2012 visitor->Trace(document_fragment_); | 2012 visitor->Trace(document_fragment_); |
| 2013 visitor->Trace(start_of_inserted_range_); | 2013 visitor->Trace(start_of_inserted_range_); |
| 2014 visitor->Trace(end_of_inserted_range_); | 2014 visitor->Trace(end_of_inserted_range_); |
| 2015 CompositeEditCommand::Trace(visitor); | 2015 CompositeEditCommand::Trace(visitor); |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 } // namespace blink | 2018 } // namespace blink |
| OLD | NEW |