Bug 28057 - deprecatedCopyInheritableProperties must be replaced by two different functions
Summary: deprecatedCopyInheritableProperties must be replaced by two different functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 20348
  Show dependency treegraph
 
Reported: 2009-08-06 15:35 PDT by Ryosuke Niwa
Modified: 2009-09-08 09:08 PDT (History)
2 users (show)

See Also:


Attachments
adds new functions to ApplyStyleCommand.* and removes deprecatedCopyInheritableProperties (26.15 KB, patch)
2009-08-06 17:07 PDT, Ryosuke Niwa
justin.garcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2009-08-06 15:35:38 PDT
As a follow up to https://bugs.webkit.org/show_bug.cgi?id=27325, deprecatedCopyInheritableProperties must be replaced by two separate functions:

1. Preparing style to apply - Delete CSS properties that are already present at the specified position from a mutable style.
2. Typing styles - Retrieve mutable style merged with the typing style
Comment 1 Ryosuke Niwa 2009-08-06 17:07:56 PDT
Created attachment 34235 [details]
adds new functions to ApplyStyleCommand.* and removes deprecatedCopyInheritableProperties
Comment 2 Eric Seidel (no email) 2009-08-06 17:12:22 PDT
Comment on attachment 34235 [details]
adds new functions to ApplyStyleCommand.* and removes deprecatedCopyInheritableProperties

I don't believe you that this doens't change behavior.

A bunch of the editingStyleAtPosition calls now use IncludeTypingStyle which didn't before.
Comment 3 Ryosuke Niwa 2009-08-06 17:47:50 PDT
This patch follows the rules below:

1. styleAtPosition merges the computed style at the position and the typing style. So every instance of styleAtPosition MUST be replaced by editingStyleAtPosition(selection.start(), IncludeTypingStyle);

2. computedStyle(<node>)->deprecatedCopyInheritableProperties()->diff(<style>) or any two-line codes that does a similar thing MUST be replaced by prepareEditingStyleToApplyAt(<style>, Position(<node>, 0)).  Note that prepareEditingStyleToApplyAt uses IgnoreTypingStyle implicitly.

3. All other instances of computedStyle(<node>)->deprecatedCopyInheritableProperties must be replaced by editingStyleAtPosition(positionBeforeTabSpan(Position(<node>,0));
Comment 4 Ryosuke Niwa 2009-08-07 14:46:22 PDT
Landed in http://trac.webkit.org/changeset/46914.
Comment 5 Eric Seidel (no email) 2009-09-08 08:59:17 PDT
This is believed to have caused http://code.google.com/p/chromium/issues/detail?id=21203.  I'm not sure if that has a WebKit bug yet, it certainly needs one.
Comment 6 Ryosuke Niwa 2009-09-08 09:08:39 PDT
(In reply to comment #5)
> This is believed to have caused
> http://code.google.com/p/chromium/issues/detail?id=21203.  I'm not sure if that
> has a WebKit bug yet, it certainly needs one.

https://bugs.webkit.org/show_bug.cgi?id=28710 is the corresponding WebKit bug.