Bug 160301 - Move parsing of operator length attributes to MathMLOperatorElement
Summary: Move parsing of operator length attributes to MathMLOperatorElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords:
Depends on: 160190
Blocks: 156537 160336
  Show dependency treegraph
 
Reported: 2016-07-28 10:36 PDT by Frédéric Wang (:fredw)
Modified: 2016-08-02 12:55 PDT (History)
9 users (show)

See Also:


Attachments
Patch (WIP) (6.89 KB, patch)
2016-07-28 10:36 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (applies after bugs 160241, 160245, 160239 and 160190) (12.46 KB, patch)
2016-07-29 01:42 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (applies after bug 160190) (12.44 KB, patch)
2016-08-02 06:26 PDT, Frédéric Wang (:fredw)
darin: review+
Details | Formatted Diff | Diff
Patch (12.41 KB, patch)
2016-08-02 11:56 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2016-07-28 10:36:33 PDT
Created attachment 284787 [details]
Patch (WIP)

Yet another step toward bug 156537. This covers:

- lspace
- rspace
- minsize
- maxsize
Comment 1 Frédéric Wang (:fredw) 2016-07-29 01:42:21 PDT
Created attachment 284854 [details]
Patch (applies after bugs 160241, 160245, 160239 and 160190)
Comment 2 Darin Adler 2016-07-31 21:42:59 PDT
Comment on attachment 284854 [details]
Patch (applies after bugs 160241, 160245, 160239 and 160190)

This pattern of having a "dirty" flag in various values is not a good one. Because it means we have an incorrect value that we could read and we have to be careful not to write code that looks at it without looking at the dirty flag first. A much better pattern is to use Optional and set to null when the value needs to be recomputed. This ties together the dirty flag with the value it guards in a more explicit way.
Comment 3 Frédéric Wang (:fredw) 2016-08-01 08:10:21 PDT
(In reply to comment #2)
> This pattern of having a "dirty" flag in various values is not a good one.
> Because it means we have an incorrect value that we could read and we have
> to be careful not to write code that looks at it without looking at the
> dirty flag first. A much better pattern is to use Optional and set to null
> when the value needs to be recomputed. This ties together the dirty flag
> with the value it guards in a more explicit way.

OK, I've opened bug 160400 and also updated the first patch in the series (bug 160239) to use Optional<T>. So let's consider these patches first and I'll rebase all the patches afterwards.
Comment 4 Frédéric Wang (:fredw) 2016-08-02 06:26:48 PDT
Created attachment 285104 [details]
Patch (applies after bug 160190)
Comment 5 Frédéric Wang (:fredw) 2016-08-02 11:56:44 PDT
Created attachment 285122 [details]
Patch
Comment 6 Frédéric Wang (:fredw) 2016-08-02 12:55:22 PDT
Committed r204037: <http://trac.webkit.org/changeset/204037>