Bug 85733 - (mathml-href) Add support for @href attribute in MathML
(mathml-href)
: Add support for @href attribute in MathML
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: MathML
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Frédéric Wang (:fredw)
http://www.w3.org/TR/MathML/chapter6....
:
Depends on:
Blocks: 3251 mathml-in-mathjax 115583 131033 159662 161081
  Show dependency treegraph
 
Reported: 2012-05-06 07:53 PDT by Frédéric Wang (:fredw)
Modified: 2016-08-23 07:57 PDT (History)
10 users (show)

See Also:


Attachments
testcase (1.00 KB, text/html)
2016-03-23 10:16 PDT, Frédéric Wang (:fredw)
no flags Details
WIP Patch (6.26 KB, patch)
2016-03-23 10:18 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (22.11 KB, patch)
2016-03-24 03:30 PDT, Frédéric Wang (:fredw)
buildbot: commit‑queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (796.94 KB, application/zip)
2016-03-24 04:23 PDT, Build Bot
no flags Details
Patch (25.11 KB, patch)
2016-04-26 09:07 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (786.58 KB, application/zip)
2016-04-26 09:59 PDT, Build Bot
no flags Details
Patch (24.75 KB, patch)
2016-05-16 00:54 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (790.18 KB, application/zip)
2016-05-16 01:58 PDT, Build Bot
no flags Details
Patch (24.86 KB, patch)
2016-05-16 02:07 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (24.15 KB, patch)
2016-06-25 00:41 PDT, Frédéric Wang (:fredw)
buildbot: commit‑queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-yosemite (978.46 KB, application/zip)
2016-06-25 01:28 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (844.68 KB, application/zip)
2016-06-25 01:30 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (818.29 KB, application/zip)
2016-06-25 01:37 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-yosemite (1.47 MB, application/zip)
2016-06-25 01:40 PDT, Build Bot
no flags Details
Patch (24.15 KB, patch)
2016-07-07 15:02 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-yosemite (830.61 KB, application/zip)
2016-07-07 15:51 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (967.66 KB, application/zip)
2016-07-07 15:55 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-yosemite (1.47 MB, application/zip)
2016-07-07 16:01 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (647.09 KB, application/zip)
2016-07-07 16:14 PDT, Build Bot
no flags Details
Patch (24.79 KB, patch)
2016-07-10 23:56 PDT, Frédéric Wang (:fredw)
bfulgham: review+
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) 2012-05-06 07:53:01 PDT
"In MathML 3, an element is designated as a link by the presence of the href attribute."

MathJax uses this to implement references to labeled equations.

testcase:
http://www.w3.org/Math/testsuite/build/main/General/GenAttribs/href1-simple.xhtml
Comment 1 Frédéric Wang (:fredw) 2016-03-23 10:16:44 PDT
Created attachment 274756 [details]
testcase

Here is another testcase.
Comment 2 Frédéric Wang (:fredw) 2016-03-23 10:18:44 PDT
Created attachment 274758 [details]
WIP Patch
Comment 3 Frédéric Wang (:fredw) 2016-03-23 10:26:27 PDT
Another test:
http://tests.mathml-association.org/mathml/relations/html5-tree/href-manual.html
Comment 4 Frédéric Wang (:fredw) 2016-03-24 03:30:28 PDT
Created attachment 274827 [details]
Patch
Comment 5 Build Bot 2016-03-24 04:23:09 PDT
Comment on attachment 274827 [details]
Patch

Attachment 274827 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1031043

New failing tests:
mathml/mathml-in-html5/href-click-2.html
mathml/presentation/href-enter.html
mathml/presentation/semantics-href.html
mathml/mathml-in-html5/href-click-1.html
Comment 6 Build Bot 2016-03-24 04:23:14 PDT
Created attachment 274828 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.10.5
Comment 7 Frédéric Wang (:fredw) 2016-04-26 09:07:05 PDT
Created attachment 277387 [details]
Patch
Comment 8 Build Bot 2016-04-26 09:59:53 PDT
Comment on attachment 277387 [details]
Patch

Attachment 277387 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1224254

New failing tests:
imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html
mathml/presentation/href-enter.html
mathml/presentation/semantics-href.html
imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html
Comment 9 Build Bot 2016-04-26 09:59:55 PDT
Created attachment 277392 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 10 Frédéric Wang (:fredw) 2016-05-16 00:54:31 PDT
Created attachment 279005 [details]
Patch
Comment 11 Build Bot 2016-05-16 01:58:38 PDT
Comment on attachment 279005 [details]
Patch

Attachment 279005 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1329435

New failing tests:
imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html
mathml/presentation/semantics-href.html
imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html
Comment 12 Build Bot 2016-05-16 01:58:40 PDT
Created attachment 279010 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 13 Frédéric Wang (:fredw) 2016-05-16 02:07:54 PDT
Created attachment 279013 [details]
Patch
Comment 14 Frédéric Wang (:fredw) 2016-06-25 00:41:57 PDT
Created attachment 282061 [details]
Patch
Comment 15 Build Bot 2016-06-25 01:28:28 PDT
Comment on attachment 282061 [details]
Patch

Attachment 282061 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1567033

New failing tests:
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
Comment 16 Build Bot 2016-06-25 01:28:31 PDT
Created attachment 282062 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 17 Build Bot 2016-06-25 01:30:50 PDT
Comment on attachment 282061 [details]
Patch

Attachment 282061 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1567036

New failing tests:
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
Comment 18 Build Bot 2016-06-25 01:30:54 PDT
Created attachment 282064 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 19 Build Bot 2016-06-25 01:37:34 PDT
Comment on attachment 282061 [details]
Patch

Attachment 282061 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1567038

New failing tests:
imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html
mathml/presentation/href-enter.html
mathml/presentation/semantics-href.html
imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html
Comment 20 Build Bot 2016-06-25 01:37:38 PDT
Created attachment 282066 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 21 Build Bot 2016-06-25 01:40:23 PDT
Comment on attachment 282061 [details]
Patch

Attachment 282061 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1567044

New failing tests:
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
Comment 22 Build Bot 2016-06-25 01:40:27 PDT
Created attachment 282068 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 23 Brent Fulgham 2016-07-07 11:58:48 PDT
This change doesn't seem to work. Does it depend on any of your other MathML changes to work properly?
Comment 24 Frédéric Wang (:fredw) 2016-07-07 15:02:55 PDT
Created attachment 283058 [details]
Patch
Comment 25 Frédéric Wang (:fredw) 2016-07-07 15:33:44 PDT
Mmh, it seems I'll have to check this again on Mac / iOS.
Comment 26 Build Bot 2016-07-07 15:51:14 PDT
Comment on attachment 283058 [details]
Patch

Attachment 283058 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1643217

New failing tests:
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
Comment 27 Build Bot 2016-07-07 15:51:20 PDT
Created attachment 283072 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 28 Build Bot 2016-07-07 15:55:26 PDT
Comment on attachment 283058 [details]
Patch

Attachment 283058 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1643228

New failing tests:
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
Comment 29 Build Bot 2016-07-07 15:55:32 PDT
Created attachment 283073 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 30 Build Bot 2016-07-07 16:01:51 PDT
Comment on attachment 283058 [details]
Patch

Attachment 283058 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1643233

New failing tests:
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
Comment 31 Build Bot 2016-07-07 16:01:56 PDT
Created attachment 283076 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 32 Build Bot 2016-07-07 16:14:31 PDT
Comment on attachment 283058 [details]
Patch

Attachment 283058 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1643239

New failing tests:
mathml/presentation/href-enter.html
Comment 33 Build Bot 2016-07-07 16:14:36 PDT
Created attachment 283081 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 34 Frédéric Wang (:fredw) 2016-07-10 23:56:30 PDT
Created attachment 283303 [details]
Patch
Comment 35 Frédéric Wang (:fredw) 2016-07-11 00:12:15 PDT
(In reply to comment #23)
> This change doesn't seem to work. Does it depend on any of your other MathML
> changes to work properly?

The change still works and the basic tests from the MathML in HTML5 test suite pass. The problem was with these two more advanced tests

mathml/presentation/href-enter.html
mathml/presentation/href-style.html

which use our test API to emulate keyboard navigation. They were skipped in the patch from mid May but it seems the change in TestExpectations were lost after later rebasing. Should be fixed now.
Comment 36 Brent Fulgham 2016-07-11 13:36:51 PDT
Comment on attachment 283303 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283303&action=review

r=me. I suggest you file bugzillas for the two skip cases so we don't forget to investigate them.

> Source/WebCore/mathml/MathMLElement.cpp:228
> +            setNeedsStyleRecalc();

Should you be doing the DNS prefetch logic here, just like we do for HTMLAnchorElement?

> Source/WebCore/mathml/MathMLElement.cpp:335
> +            Frame* frame = document().frame();

Maybe better as:

if (Frame* frame = document().frame())
    frame->loader()......
return;

> LayoutTests/platform/ios-simulator/TestExpectations:680
> +mathml/presentation/href-style.html [ Skip ]

Is there a bugzilla for this problem?

> LayoutTests/platform/mac/TestExpectations:810
> +mathml/presentation/href-style.html [ Skip ]

Ditto.
Comment 37 Frédéric Wang (:fredw) 2016-07-11 13:44:10 PDT
Comment on attachment 283303 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283303&action=review

>> Source/WebCore/mathml/MathMLElement.cpp:228
>> +            setNeedsStyleRecalc();
> 
> Should you be doing the DNS prefetch logic here, just like we do for HTMLAnchorElement?

Maybe someone who is more familiar with the code can comment but I believe we could land the patch without that, given that SVGAElement does not do that stuff either.
Comment 38 Brent Fulgham 2016-07-11 13:46:31 PDT
(In reply to comment #37)
> Comment on attachment 283303 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=283303&action=review
> 
> >> Source/WebCore/mathml/MathMLElement.cpp:228
> >> +            setNeedsStyleRecalc();
> > 
> > Should you be doing the DNS prefetch logic here, just like we do for HTMLAnchorElement?
> 
> Maybe someone who is more familiar with the code can comment but I believe
> we could land the patch without that, given that SVGAElement does not do
> that stuff either.

It looks like the prefetch code is pretty old, so I guess SVG would have been updated to include it if it was extremely important. Let's just proceed with the code as-is.
Comment 39 Frédéric Wang (:fredw) 2016-07-11 21:29:08 PDT
Committed r203104: <http://trac.webkit.org/changeset/203104>