Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e2e91f349dc761b144e46485520a9f42e61442f7 https://github.com/WebKit/WebKit/commit/e2e91f349dc761b144e46485520a9f42e61442f7 Author: Ahmad Saleem <ahmad.saleem792+git...@gmail.com> Date: 2023-01-24 (Tue, 24 Jan 2023)
Changed paths: M Source/WebCore/editing/VisibleUnits.cpp Log Message: ----------- Code refactoring to avoid several calls to hasEditableStyle() in loop Code refactoring to avoid several calls to hasEditableStyle() in loop https://bugs.webkit.org/show_bug.cgi?id=251042 Reviewed by Ryosuke Niwa. Merge - https://chromium.googlesource.com/chromium/blink/+/85355b065acfc6ffbf960afa2d8e175104c556fa In findStartOfParagraph() and findEndOfParagraph(), hasEditableStyle() is called repeatedly in loop for a node that remains unchanged throughout the function. With this refactoring, this is avoided by using a local variable. * Source/WebCore/editing/VisibleUnits.cpp: (findStartOfParagraph): Introduce 'startNodeIsEditable' to reduce calls to hasEditableStyle() (findEndOfParagraph): Ditto Canonical link: https://commits.webkit.org/259267@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes