⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268774 in webkit


Ignore:
Timestamp:
Oct 20, 2020, 4:58:03 PM (6 years ago)
Author:
Megan Gardner
Message:

Rename HighlightMap to HighlightRegister and HighlightRangeGroup to Highlight to match current spec
https://bugs.webkit.org/show_bug.cgi?id=217919

Reviewed by Ryosuke Niwa.

No new tests, no new behavior, rename only.
https://drafts.csswg.org/css-highlight-api-1/

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/highlight/Highlight.cpp: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.cpp.

(WebCore::Highlight::Highlight):
(WebCore::Highlight::create):
(WebCore::Highlight::initializeSetLike):
(WebCore::Highlight::removeFromSetLike):
(WebCore::Highlight::clearFromSetLike):
(WebCore::Highlight::addToSetLike):

  • Modules/highlight/Highlight.h: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.h.
  • Modules/highlight/Highlight.idl: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.idl.
  • Modules/highlight/HighlightRegister.cpp: Renamed from Source/WebCore/Modules/highlight/HighlightMap.cpp.

(WebCore::HighlightRegister::initializeMapLike):
(WebCore::HighlightRegister::setFromMapLike):
(WebCore::HighlightRegister::clear):
(WebCore::HighlightRegister::remove):

  • Modules/highlight/HighlightRegister.h: Renamed from Source/WebCore/Modules/highlight/HighlightMap.h.

(WebCore::HighlightRegister::create):
(WebCore::HighlightRegister::map const):

  • Modules/highlight/HighlightRegister.idl: Renamed from Source/WebCore/Modules/highlight/HighlightMap.idl.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • css/DOMCSSNamespace.cpp:

(WebCore::DOMCSSNamespace::highlights):

  • css/DOMCSSNamespace.h:
  • css/DOMCSSNamespace.idl:
  • dom/Document.cpp:

(WebCore::Document::commonTeardown):
(WebCore::Document::highlightRegister):
(WebCore::Document::updateHighlightPositions):
(WebCore::Document::highlightMap): Deleted.

  • dom/Document.h:
  • rendering/HighlightData.cpp:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::calculateHighlightColor const):

  • rendering/SelectionRangeData.cpp:
Location:
trunk
Files:
29 edited
6 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/highlight/highlight-interfaces-expected.txt

    r253153 r268774  
    1 Tests the interfaces of the highlight API, which include HighlightRangeGroup, HighlightMap, and extensions to the CSS namespace.
     1Tests the interfaces of the highlight API, which include Highlight, HighlightRegister, and extensions to the CSS namespace.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    55
    66Testing Highlight:
    7 PASS HighlightRangeGroup instanceof Function is true
    8 PASS typeof HighlightRangeGroup is "function"
    9 PASS new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})) instanceof HighlightRangeGroup is true
    10 PASS HighlightMap instanceof Function is true
    11 PASS typeof HighlightMap is "function"
    12 PASS new HighlightMap() instanceof HighlightMap is true
    13 PASS new HighlightMap().set("foo-styling",new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is defined.
     7PASS Highlight instanceof Function is true
     8PASS typeof Highlight is "function"
     9PASS new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})) instanceof Highlight is true
     10PASS HighlightRegister instanceof Function is true
     11PASS typeof HighlightRegister is "function"
     12PASS new HighlightRegister() instanceof HighlightRegister is true
     13PASS new HighlightRegister().set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is defined.
    1414PASS CSS.highlights is defined.
    15 PASS CSS.highlights.set("foo-styling",new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is CSS.highlights
     15PASS CSS.highlights.set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is CSS.highlights
    1616PASS successfullyParsed is true
    1717
  • trunk/LayoutTests/highlight/highlight-interfaces.html

    r253153 r268774  
    55<script>
    66
    7 description("Tests the interfaces of the highlight API, which include HighlightRangeGroup, HighlightMap, and extensions to the CSS namespace.");
     7description("Tests the interfaces of the highlight API, which include Highlight, HighlightRegister, and extensions to the CSS namespace.");
    88
    99debug("Testing Highlight:");
    10 shouldBeTrue("HighlightRangeGroup instanceof Function");
    11 shouldBeEqualToString("typeof HighlightRangeGroup", "function");
    12 shouldBeTrue("new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})) instanceof HighlightRangeGroup");
    13 shouldBeTrue("HighlightMap instanceof Function");
    14 shouldBeEqualToString("typeof HighlightMap", "function");
    15 shouldBeTrue("new HighlightMap() instanceof HighlightMap");
    16 shouldBeDefined('new HighlightMap().set("foo-styling",new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})))');
     10shouldBeTrue("Highlight instanceof Function");
     11shouldBeEqualToString("typeof Highlight", "function");
     12shouldBeTrue("new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})) instanceof Highlight");
     13shouldBeTrue("HighlightRegister instanceof Function");
     14shouldBeEqualToString("typeof HighlightRegister", "function");
     15shouldBeTrue("new HighlightRegister() instanceof HighlightRegister");
     16shouldBeDefined('new HighlightRegister().set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})))');
    1717shouldBeDefined('CSS.highlights');
    18 shouldBe('CSS.highlights.set("foo-styling",new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})))', 'CSS.highlights');
     18shouldBe('CSS.highlights.set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})))', 'CSS.highlights');
    1919
    2020</script>
  • trunk/LayoutTests/highlight/highlight-map-and-group-expected.txt

    r253309 r268774  
    1 PASS highlightRangeGroup1.size is 1
    2 PASS highlightRangeGroup2.size is 2
    3 PASS highlightRangeGroup3.size is 3
     1PASS highlight1.size is 1
     2PASS highlight2.size is 2
     3PASS highlight3.size is 3
    44PASS CSS.highlights.size is 3
    55PASS CSS.highlights.has("example-highlight1") is true
  • trunk/LayoutTests/highlight/highlight-map-and-group.html

    r253309 r268774  
    2121
    2222    <script>
    23         let highlightRangeGroup1 = new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}));
     23        let highlight1 = new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}));
    2424
    25         let highlightRangeGroup2 = new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 2, endContainer: document.body, endOffset: 3}));
    26         highlightRangeGroup2.add(new StaticRange({startContainer: document.body, startOffset: 4, endContainer: document.body, endOffset: 5}));
     25        let highlight2 = new Highlight(new StaticRange({startContainer: document.body, startOffset: 2, endContainer: document.body, endOffset: 3}));
     26        highlight2.add(new StaticRange({startContainer: document.body, startOffset: 4, endContainer: document.body, endOffset: 5}));
    2727
    28         let highlightRangeGroup3 = new HighlightRangeGroup(new StaticRange({startContainer: document.body, startOffset: 4, endContainer: document.body, endOffset: 8}));
    29         highlightRangeGroup3.add(new StaticRange({startContainer: document.body, startOffset: 10, endContainer: document.body, endOffset: 12}));
    30         highlightRangeGroup3.add(new StaticRange({startContainer: document.body, startOffset: 5, endContainer: document.body, endOffset: 6}));
     28        let highlight3 = new Highlight(new StaticRange({startContainer: document.body, startOffset: 4, endContainer: document.body, endOffset: 8}));
     29        highlight3.add(new StaticRange({startContainer: document.body, startOffset: 10, endContainer: document.body, endOffset: 12}));
     30        highlight3.add(new StaticRange({startContainer: document.body, startOffset: 5, endContainer: document.body, endOffset: 6}));
    3131       
    3232
    33         CSS.highlights.set("example-highlight1", highlightRangeGroup1);
    34         CSS.highlights.set("example-highlight2", highlightRangeGroup2);
    35         CSS.highlights.set("example-highlight3", highlightRangeGroup3);
     33        CSS.highlights.set("example-highlight1", highlight1);
     34        CSS.highlights.set("example-highlight2", highlight2);
     35        CSS.highlights.set("example-highlight3", highlight3);
    3636
    37         shouldBe("highlightRangeGroup1.size","1");
    38         shouldBe("highlightRangeGroup2.size","2");
    39         shouldBe("highlightRangeGroup3.size","3");
     37        shouldBe("highlight1.size","1");
     38        shouldBe("highlight2.size","2");
     39        shouldBe("highlight3.size","3");
    4040
    4141        shouldBe("CSS.highlights.size","3");
  • trunk/LayoutTests/highlight/resources/highlight-frame.html

    r254785 r268774  
    1414<script>
    1515let highlight = document.getElementById('highlight');
    16 let highlightRangeGroup = new HighlightRangeGroup(new StaticRange({startContainer: highlight.childNodes[0], startOffset: 0, endContainer: highlight.childNodes[0], endOffset: 4}));
    17 CSS.highlights.set("example", highlightRangeGroup);
     16let highlight1 = new Highlight(new StaticRange({startContainer: highlight.childNodes[0], startOffset: 0, endContainer: highlight.childNodes[0], endOffset: 4}));
     17CSS.highlights.set("example", highlight1);
    1818</script>
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-image.html

    r268436 r268774  
    1919    <script>
    2020        let imageElement1 = document.getElementById('img1');
    21         let highlightRangeGroup1 = new HighlightRangeGroup(new StaticRange({startContainer: imageElement1.childNodes[0], startOffset: 0, endContainer: imageElement1.childNodes[0], endOffset: 1}));
     21        let highlight1 = new Highlight(new StaticRange({startContainer: imageElement1.childNodes[0], startOffset: 0, endContainer: imageElement1.childNodes[0], endOffset: 1}));
    2222
    2323
    24         CSS.highlights.set("example-highlight1", highlightRangeGroup1);
     24        CSS.highlights.set("example-highlight1", highlight1);
    2525
    2626    </script>
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-text-across-elements.html

    r254785 r268774  
    3535        let textElement4 = document.getElementById('text4');
    3636        let textElement5 = document.getElementById('text5');
    37         let highlightRangeGroup1 = new HighlightRangeGroup(new StaticRange({startContainer: textElement1.childNodes[0], startOffset: 4, endContainer: textElement1.childNodes[0], endOffset: 7}));
     37        let highlight1 = new Highlight(new StaticRange({startContainer: textElement1.childNodes[0], startOffset: 4, endContainer: textElement1.childNodes[0], endOffset: 7}));
    3838
    39         let highlightRangeGroup2 = new HighlightRangeGroup(new StaticRange({startContainer: textElement1.childNodes[0], startOffset: 10, endContainer: textElement2.childNodes[0], endOffset: 4}));
    40         highlightRangeGroup2.add(new StaticRange({startContainer: textElement2.childNodes[0], startOffset: 10, endContainer: textElement3.childNodes[0], endOffset: 5}));
     39        let highlight2 = new Highlight(new StaticRange({startContainer: textElement1.childNodes[0], startOffset: 10, endContainer: textElement2.childNodes[0], endOffset: 4}));
     40        highlight2.add(new StaticRange({startContainer: textElement2.childNodes[0], startOffset: 10, endContainer: textElement3.childNodes[0], endOffset: 5}));
    4141
    42         let highlightRangeGroup3 = new HighlightRangeGroup(new StaticRange({startContainer: textElement3.childNodes[0], startOffset: 10, endContainer: textElement5.childNodes[0], endOffset: 12}));
     42        let highlight3 = new Highlight(new StaticRange({startContainer: textElement3.childNodes[0], startOffset: 10, endContainer: textElement5.childNodes[0], endOffset: 12}));
    4343
    44         CSS.highlights.set("example-highlight1", highlightRangeGroup1);
    45         CSS.highlights.set("example-highlight2", highlightRangeGroup2);
    46         CSS.highlights.set("example-highlight3", highlightRangeGroup3);
     44        CSS.highlights.set("example-highlight1", highlight1);
     45        CSS.highlights.set("example-highlight2", highlight2);
     46        CSS.highlights.set("example-highlight3", highlight3);
    4747    </script>
    4848</body>
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-text-cascade.html

    r254785 r268774  
    2727        let textElement2 = document.getElementById('text2');
    2828        let textElement3 = document.getElementById('text3');
    29         let highlightRangeGroup = new HighlightRangeGroup(new StaticRange({startContainer: textElement1.childNodes[0], startOffset: 0, endContainer: textElement1.childNodes[0], endOffset: 3}));
    30         highlightRangeGroup.add(new StaticRange({startContainer: textElement2.childNodes[0], startOffset: 5, endContainer: textElement2.childNodes[0], endOffset: 9}));
     29        let highlight = new Highlight(new StaticRange({startContainer: textElement1.childNodes[0], startOffset: 0, endContainer: textElement1.childNodes[0], endOffset: 3}));
     30        highlight.add(new StaticRange({startContainer: textElement2.childNodes[0], startOffset: 5, endContainer: textElement2.childNodes[0], endOffset: 9}));
    3131
    32         CSS.highlights.set("example-highlight", highlightRangeGroup);
     32        CSS.highlights.set("example-highlight", highlight);
    3333    </script>
    3434</body>
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-text-decorations.html

    r256451 r268774  
    5252    <script>
    5353        let textElement = document.getElementById('text1');
    54         let highlightRangeGroup1 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 1, endContainer: textElement.childNodes[0], endOffset: 2}));
    55         let highlightRangeGroup2 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 5, endContainer: textElement.childNodes[0], endOffset: 6}));
    56         let highlightRangeGroup3 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 10, endContainer: textElement.childNodes[0], endOffset: 13}));
     54        let highlight1 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 1, endContainer: textElement.childNodes[0], endOffset: 2}));
     55        let highlight2 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 5, endContainer: textElement.childNodes[0], endOffset: 6}));
     56        let highlight3 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 10, endContainer: textElement.childNodes[0], endOffset: 13}));
    5757
    58         CSS.highlights.set("example-highlight1", highlightRangeGroup1);
    59         CSS.highlights.set("example-highlight2", highlightRangeGroup2);
    60         CSS.highlights.set("example-highlight3", highlightRangeGroup3);
     58        CSS.highlights.set("example-highlight1", highlight1);
     59        CSS.highlights.set("example-highlight2", highlight2);
     60        CSS.highlights.set("example-highlight3", highlight3);
    6161    </script>
    6262</body>
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-text-repaint.html

    r267863 r268774  
    66    <link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/#creating-highlights">
    77    <link rel="match" href="highlight-text-expected.html">
    8     <meta name="assert" content="Highlight Ranges should be able to be added and removed from the HighlightRangeGroup.">
     8    <meta name="assert" content="Highlight Ranges should be able to be added and removed from the Highlight.">
    99    <style>
    1010        ::highlight(example-highlight) {
     
    4343            let range3 = new StaticRange({startContainer: textElement.childNodes[0], startOffset: 8, endContainer: textElement.childNodes[0], endOffset: 12});
    4444
    45             let highlightRangeGroup1 = new HighlightRangeGroup(range1);
    46             CSS.highlights.set("example-highlight", highlightRangeGroup1);
     45            let highlight1 = new Highlight(range1);
     46            CSS.highlights.set("example-highlight", highlight1);
    4747
    48             highlightRangeGroup1.add(range2);
    49             highlightRangeGroup1.delete(range1);
    50             highlightRangeGroup1.add(range3);
     48            highlight1.add(range2);
     49            highlight1.delete(range1);
     50            highlight1.add(range3);
    5151
    5252            var repaintRects = window.internals.repaintRectsAsText();
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-text-replace.html

    r254785 r268774  
    1919    <script>
    2020        let textElement = document.getElementById('text1');
    21         let highlightRangeGroup1 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 1, endContainer: textElement.childNodes[0], endOffset: 2}));
     21        let highlight1 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 1, endContainer: textElement.childNodes[0], endOffset: 2}));
    2222
    23         let highlightRangeGroup2 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 3, endContainer: textElement.childNodes[0], endOffset: 4}));
    24         highlightRangeGroup2.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 5, endContainer: textElement.childNodes[0], endOffset: 6}));       
     23        let highlight2 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 3, endContainer: textElement.childNodes[0], endOffset: 4}));
     24        highlight2.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 5, endContainer: textElement.childNodes[0], endOffset: 6}));       
    2525
    26         CSS.highlights.set("example-highlight", highlightRangeGroup1);
    27         CSS.highlights.set("example-highlight", highlightRangeGroup2);
     26        CSS.highlights.set("example-highlight", highlight1);
     27        CSS.highlights.set("example-highlight", highlight2);
    2828    </script>
    2929</body>
  • trunk/LayoutTests/http/wpt/css/css-highlight-api/highlight-text.html

    r254785 r268774  
    2727    <script>
    2828        let textElement = document.getElementById('text1');
    29         let highlightRangeGroup1 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 1, endContainer: textElement.childNodes[0], endOffset: 2}));
     29        let highlight1 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 1, endContainer: textElement.childNodes[0], endOffset: 2}));
    3030
    31         let highlightRangeGroup2 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 3, endContainer: textElement.childNodes[0], endOffset: 4}));
    32         highlightRangeGroup2.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 5, endContainer: textElement.childNodes[0], endOffset: 6}));
     31        let highlight2 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 3, endContainer: textElement.childNodes[0], endOffset: 4}));
     32        highlight2.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 5, endContainer: textElement.childNodes[0], endOffset: 6}));
    3333
    34         let highlightRangeGroup3 = new HighlightRangeGroup(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 7, endContainer: textElement.childNodes[0], endOffset: 8}));
    35         highlightRangeGroup3.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 9, endContainer: textElement.childNodes[0], endOffset: 10}));
    36         highlightRangeGroup3.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 12, endContainer: textElement.childNodes[0], endOffset: 13}));
     34        let highlight3 = new Highlight(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 7, endContainer: textElement.childNodes[0], endOffset: 8}));
     35        highlight3.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 9, endContainer: textElement.childNodes[0], endOffset: 10}));
     36        highlight3.add(new StaticRange({startContainer: textElement.childNodes[0], startOffset: 12, endContainer: textElement.childNodes[0], endOffset: 13}));
    3737       
    3838
    39         CSS.highlights.set("example-highlight1", highlightRangeGroup1);
    40         CSS.highlights.set("example-highlight2", highlightRangeGroup2);
    41         CSS.highlights.set("example-highlight3", highlightRangeGroup3);
     39        CSS.highlights.set("example-highlight1", highlight1);
     40        CSS.highlights.set("example-highlight2", highlight2);
     41        CSS.highlights.set("example-highlight3", highlight3);
    4242    </script>
    4343</body>
  • trunk/Source/WebCore/CMakeLists.txt

    r268762 r268774  
    291291    Modules/geolocation/PositionOptions.idl
    292292
    293     Modules/highlight/HighlightMap.idl
    294     Modules/highlight/HighlightRangeGroup.idl
     293    Modules/highlight/Highlight.idl
     294    Modules/highlight/HighlightRegister.idl
    295295
    296296    Modules/indexeddb/DOMWindow+IndexedDatabase.idl
  • trunk/Source/WebCore/ChangeLog

    r268771 r268774  
     12020-10-20  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Rename HighlightMap to HighlightRegister and HighlightRangeGroup to Highlight to match current spec
     4        https://bugs.webkit.org/show_bug.cgi?id=217919
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        No new tests, no new behavior, rename only.
     9        https://drafts.csswg.org/css-highlight-api-1/
     10
     11        * DerivedSources-input.xcfilelist:
     12        * DerivedSources-output.xcfilelist:
     13        * DerivedSources.make:
     14        * Modules/highlight/Highlight.cpp: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.cpp.
     15        (WebCore::Highlight::Highlight):
     16        (WebCore::Highlight::create):
     17        (WebCore::Highlight::initializeSetLike):
     18        (WebCore::Highlight::removeFromSetLike):
     19        (WebCore::Highlight::clearFromSetLike):
     20        (WebCore::Highlight::addToSetLike):
     21        * Modules/highlight/Highlight.h: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.h.
     22        * Modules/highlight/Highlight.idl: Renamed from Source/WebCore/Modules/highlight/HighlightRangeGroup.idl.
     23        * Modules/highlight/HighlightRegister.cpp: Renamed from Source/WebCore/Modules/highlight/HighlightMap.cpp.
     24        (WebCore::HighlightRegister::initializeMapLike):
     25        (WebCore::HighlightRegister::setFromMapLike):
     26        (WebCore::HighlightRegister::clear):
     27        (WebCore::HighlightRegister::remove):
     28        * Modules/highlight/HighlightRegister.h: Renamed from Source/WebCore/Modules/highlight/HighlightMap.h.
     29        (WebCore::HighlightRegister::create):
     30        (WebCore::HighlightRegister::map const):
     31        * Modules/highlight/HighlightRegister.idl: Renamed from Source/WebCore/Modules/highlight/HighlightMap.idl.
     32        * Sources.txt:
     33        * WebCore.xcodeproj/project.pbxproj:
     34        * bindings/js/WebCoreBuiltinNames.h:
     35        * css/DOMCSSNamespace.cpp:
     36        (WebCore::DOMCSSNamespace::highlights):
     37        * css/DOMCSSNamespace.h:
     38        * css/DOMCSSNamespace.idl:
     39        * dom/Document.cpp:
     40        (WebCore::Document::commonTeardown):
     41        (WebCore::Document::highlightRegister):
     42        (WebCore::Document::updateHighlightPositions):
     43        (WebCore::Document::highlightMap): Deleted.
     44        * dom/Document.h:
     45        * rendering/HighlightData.cpp:
     46        * rendering/InlineTextBox.cpp:
     47        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):
     48        * rendering/RenderReplaced.cpp:
     49        (WebCore::RenderReplaced::calculateHighlightColor const):
     50        * rendering/SelectionRangeData.cpp:
     51
    1522020-10-20  Antoine Quint  <graouts@webkit.org>
    253
  • trunk/Source/WebCore/DerivedSources-input.xcfilelist

    r268762 r268774  
    130130$(PROJECT_DIR)/Modules/geolocation/PositionErrorCallback.idl
    131131$(PROJECT_DIR)/Modules/geolocation/PositionOptions.idl
    132 $(PROJECT_DIR)/Modules/highlight/HighlightMap.idl
    133 $(PROJECT_DIR)/Modules/highlight/HighlightRangeGroup.idl
     132$(PROJECT_DIR)/Modules/highlight/HighlightRegister.idl
     133$(PROJECT_DIR)/Modules/highlight/Highlight.idl
    134134$(PROJECT_DIR)/Modules/indexeddb/DOMWindow+IndexedDatabase.idl
    135135$(PROJECT_DIR)/Modules/indexeddb/IDBCursor.idl
  • trunk/Source/WebCore/DerivedSources-output.xcfilelist

    r268762 r268774  
    11111111$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHdrMetadataType.cpp
    11121112$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHdrMetadataType.h
    1113 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlightMap.cpp
    1114 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlightMap.h
    1115 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlightRangeGroup.cpp
    1116 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlightRangeGroup.h
     1113$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlightRegister.cpp
     1114$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlightRegister.h
     1115$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlight.cpp
     1116$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHighlight.h
    11171117$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHistory.cpp
    11181118$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHistory.h
  • trunk/Source/WebCore/DerivedSources.make

    r268762 r268774  
    156156    $(WebCore)/Modules/geolocation/PositionErrorCallback.idl \
    157157    $(WebCore)/Modules/geolocation/PositionOptions.idl \
    158     $(WebCore)/Modules/highlight/HighlightMap.idl \
    159     $(WebCore)/Modules/highlight/HighlightRangeGroup.idl \
     158    $(WebCore)/Modules/highlight/HighlightRegister.idl \
     159    $(WebCore)/Modules/highlight/Highlight.idl \
    160160    $(WebCore)/Modules/indexeddb/DOMWindow+IndexedDatabase.idl \
    161161    $(WebCore)/Modules/indexeddb/IDBCursor.idl \
  • trunk/Source/WebCore/Modules/highlight/Highlight.cpp

    r268773 r268774  
    11/*
    2  * Copyright (C) 2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2525
    2626#include "config.h"
    27 #include "HighlightRangeGroup.h"
     27#include "Highlight.h"
    2828
    2929#include "IDLTypes.h"
     
    3939namespace WebCore {
    4040
    41 HighlightRangeGroup::HighlightRangeGroup(Ref<StaticRange>&& range)
     41Highlight::Highlight(Ref<StaticRange>&& range)
    4242{
    4343    auto myRange = WTFMove(range);
     
    4545}
    4646
    47 Ref<HighlightRangeGroup> HighlightRangeGroup::create(StaticRange& range)
     47Ref<Highlight> Highlight::create(StaticRange& range)
    4848{
    49     return adoptRef(*new HighlightRangeGroup(range));
     49    return adoptRef(*new Highlight(range));
    5050}
    5151
    52 void HighlightRangeGroup::initializeSetLike(DOMSetAdapter& set)
     52void Highlight::initializeSetLike(DOMSetAdapter& set)
    5353{
    5454    for (auto& rangeData : m_rangesData)
     
    5858static void repaintRange(const StaticRange& range)
    5959{
    60     auto* startNode = &range.startContainer();
    61     auto* endNode = &range.endContainer();
    62     auto ordering = documentOrder(*startNode, *endNode);
     60    auto startNode = makeRefPtr(&range.startContainer());
     61    auto endNode = makeRefPtr(&range.endContainer());
     62    auto ordering = documentOrder(*startNode.get(), *endNode.get());
    6363    if (is_eq(ordering)) {
    6464        if (auto renderer = startNode->renderer())
     
    7070        endNode = &range.startContainer();
    7171    }
    72 
    73     auto node = startNode;
    74     while (node != endNode) {
    75         if (auto renderer = node->renderer())
    76             renderer->repaint();
    77         node = NodeTraversal::next(*node);
     72    auto simpleRange = makeSimpleRange(makeBoundaryPointBeforeNode(*startNode.get()), makeBoundaryPointAfterNode(*endNode.get()));
     73    if (simpleRange) {
     74        for (auto& node : intersectingNodes(simpleRange.value())) {
     75            if (auto renderer = node.renderer())
     76                renderer->repaint();
     77        }
    7878    }
    7979}
    8080
    81 bool HighlightRangeGroup::removeFromSetLike(const StaticRange& range)
     81bool Highlight::removeFromSetLike(const StaticRange& range)
    8282{
    8383    return m_rangesData.removeFirstMatching([&range](const Ref<HighlightRangeData>& current) {
     
    8787}
    8888
    89 void HighlightRangeGroup::clearFromSetLike()
     89void Highlight::clearFromSetLike()
    9090{
    9191    for (auto& data : m_rangesData)
     
    9595}
    9696
    97 bool HighlightRangeGroup::addToSetLike(StaticRange& range)
     97bool Highlight::addToSetLike(StaticRange& range)
    9898{
    9999    if (notFound != m_rangesData.findMatching([&range](const Ref<HighlightRangeData>& current) { return current.get().range.get() == range; }))
  • trunk/Source/WebCore/Modules/highlight/Highlight.h

    r268773 r268774  
    11/*
    2  * Copyright (C) 2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3535class CSSStyleDeclaration;
    3636class DOMSetAdapter;
     37class PropertySetCSSStyleDeclaration;
    3738class StaticRange;
    38 class PropertySetCSSStyleDeclaration;
     39
    3940
    4041struct HighlightRangeData : RefCounted<HighlightRangeData>, public CanMakeWeakPtr<HighlightRangeData> {
    41    
    4242    HighlightRangeData(Ref<StaticRange>&& range)
    4343        : range(WTFMove(range))
    4444    {
    4545    }
    46    
    4746    static Ref<HighlightRangeData> create(Ref<StaticRange>&& range)
    4847    {
    4948        return adoptRef(*new HighlightRangeData(WTFMove(range)));
    5049    }
    51    
    5250    Ref<StaticRange> range;
    5351    Optional<Position> startPosition;
     
    5553};
    5654
    57 class HighlightRangeGroup : public RefCounted<HighlightRangeGroup> {
     55class Highlight : public RefCounted<Highlight> {
    5856public:
    59     static Ref<HighlightRangeGroup> create(StaticRange&);
    60    
     57    static Ref<Highlight> create(StaticRange&);
    6158    void clearFromSetLike();
    6259    bool addToSetLike(StaticRange&);
    6360    bool removeFromSetLike(const StaticRange&);
    6461    void initializeSetLike(DOMSetAdapter&);
    65    
    6662    const Vector<Ref<HighlightRangeData>>& rangesData() const { return m_rangesData; }
    6763
    6864    // FIXME: Add WEBCORE_EXPORT CSSStyleDeclaration& style();
    69    
    7065private:
    7166    Vector<Ref<HighlightRangeData>> m_rangesData; // FIXME: use a HashSet instead of a Vector <rdar://problem/57760614>
    72     explicit HighlightRangeGroup(Ref<StaticRange>&&);
     67    explicit Highlight(Ref<StaticRange>&&);
    7368};
    7469
  • trunk/Source/WebCore/Modules/highlight/Highlight.idl

    r268773 r268774  
    2828    ImplementationLacksVTable,
    2929    Exposed=Window
    30 ] interface HighlightRangeGroup {
     30] interface Highlight {
    3131    constructor(StaticRange range);
    3232
  • trunk/Source/WebCore/Modules/highlight/HighlightRegister.cpp

    r268773 r268774  
    11/*
    2  * Copyright (C) 2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2525
    2626#include "config.h"
    27 #include "HighlightMap.h"
     27#include "HighlightRegister.h"
    2828
    2929#include "IDLTypes.h"
    3030#include "JSDOMMapLike.h"
    31 #include "JSHighlightRangeGroup.h"
     31#include "JSHighlight.h"
    3232
    3333namespace WebCore {
    3434   
    35 void HighlightMap::initializeMapLike(DOMMapAdapter& map)
     35void HighlightRegister::initializeMapLike(DOMMapAdapter& map)
    3636{
    3737    for (auto& keyValue : m_map)
    38         map.set<IDLDOMString, IDLInterface<HighlightRangeGroup>>(keyValue.key, keyValue.value);
     38        map.set<IDLDOMString, IDLInterface<Highlight>>(keyValue.key, keyValue.value);
    3939}
    4040
    41 void HighlightMap::setFromMapLike(String&& key, Ref<HighlightRangeGroup>&& value)
     41void HighlightRegister::setFromMapLike(String&& key, Ref<Highlight>&& value)
    4242{
    4343    m_map.set(WTFMove(key), WTFMove(value));
    4444}
    4545
    46 void HighlightMap::clear()
     46void HighlightRegister::clear()
    4747{
    4848    m_map.clear();
    4949}
    5050
    51 bool HighlightMap::remove(const String& key)
     51bool HighlightRegister::remove(const String& key)
    5252{
    5353    return m_map.remove(key);
  • trunk/Source/WebCore/Modules/highlight/HighlightRegister.h

    r268773 r268774  
    11/*
    2  * Copyright (C) 2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2626#pragma once
    2727
    28 #include "HighlightRangeGroup.h"
     28#include "Highlight.h"
    2929#include <wtf/HashMap.h>
    3030#include <wtf/RefCounted.h>
     
    3434class DOMMapAdapter;
    3535class DOMString;
    36 class HighlightRangeGroup;
     36class Highlight;
    3737
    38 class HighlightMap : public RefCounted<HighlightMap> {
     38class HighlightRegister : public RefCounted<HighlightRegister> {
    3939public:
    40     static Ref<HighlightMap> create() { return adoptRef(*new HighlightMap); }
     40    static Ref<HighlightRegister> create() { return adoptRef(*new HighlightRegister); }
    4141
    4242    void initializeMapLike(DOMMapAdapter&);
    43     void setFromMapLike(String&&, Ref<HighlightRangeGroup>&&);
     43    void setFromMapLike(String&&, Ref<Highlight>&&);
    4444    void clear();
    4545    bool remove(const String&);
    4646   
    47     const HashMap<String, Ref<HighlightRangeGroup>>& map() const { return m_map; }
     47    const HashMap<String, Ref<Highlight>>& map() const { return m_map; }
    4848   
    4949private:
    50     HighlightMap() = default;
    51     HashMap<String, Ref<HighlightRangeGroup>> m_map;
     50    HighlightRegister() = default;
     51    HashMap<String, Ref<Highlight>> m_map;
    5252};
    5353
  • trunk/Source/WebCore/Modules/highlight/HighlightRegister.idl

    r268773 r268774  
    2828    ImplementationLacksVTable,
    2929    Exposed=Window
    30 ] interface HighlightMap {
     30] interface HighlightRegister {
    3131    constructor();
    3232
    33     maplike<DOMString, HighlightRangeGroup>;
     33    maplike<DOMString, Highlight>;
    3434};
  • trunk/Source/WebCore/Sources.txt

    r268762 r268774  
    6565Modules/geolocation/GeolocationCoordinates.cpp
    6666Modules/geolocation/NavigatorGeolocation.cpp
    67 Modules/highlight/HighlightMap.cpp
    68 Modules/highlight/HighlightRangeGroup.cpp
     67Modules/highlight/HighlightRegister.cpp
     68Modules/highlight/Highlight.cpp
    6969Modules/indexeddb/DOMWindowIndexedDatabase.cpp
    7070Modules/indexeddb/IDBCursor.cpp
     
    30623062JSHashChangeEvent.cpp
    30633063JSHdrMetadataType.cpp
    3064 JSHighlightMap.cpp
    3065 JSHighlightRangeGroup.cpp
     3064JSHighlightRegister.cpp
     3065JSHighlight.cpp
    30663066JSHistory.cpp
    30673067JSHkdfParams.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r268762 r268774  
    79527952                44D8DA9A139545CD00337B75 /* SVGAnimateMotionElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAnimateMotionElement.idl; sourceTree = "<group>"; };
    79537953                44E349F7246F4DC70068479C /* LibWebRTCEnumTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCEnumTraits.h; path = libwebrtc/LibWebRTCEnumTraits.h; sourceTree = "<group>"; };
    7954                 44E88E4C2369128A009B4847 /* HighlightMap.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HighlightMap.idl; sourceTree = "<group>"; };
    7955                 44E88E4D2369128B009B4847 /* HighlightRangeGroup.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HighlightRangeGroup.idl; sourceTree = "<group>"; };
    7956                 44E88E50236A56AC009B4847 /* HighlightMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HighlightMap.h; sourceTree = "<group>"; };
    7957                 44E88E51236A5C8D009B4847 /* HighlightRangeGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HighlightRangeGroup.h; sourceTree = "<group>"; };
    7958                 44E88E52236A667F009B4847 /* HighlightMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HighlightMap.cpp; sourceTree = "<group>"; };
    7959                 44E88E54236A66A1009B4847 /* HighlightRangeGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HighlightRangeGroup.cpp; sourceTree = "<group>"; };
     7954                44E88E4C2369128A009B4847 /* HighlightRegister.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HighlightRegister.idl; sourceTree = "<group>"; };
     7955                44E88E4D2369128B009B4847 /* Highlight.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Highlight.idl; sourceTree = "<group>"; };
     7956                44E88E50236A56AC009B4847 /* HighlightRegister.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HighlightRegister.h; sourceTree = "<group>"; };
     7957                44E88E51236A5C8D009B4847 /* Highlight.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Highlight.h; sourceTree = "<group>"; };
     7958                44E88E52236A667F009B4847 /* HighlightRegister.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HighlightRegister.cpp; sourceTree = "<group>"; };
     7959                44E88E54236A66A1009B4847 /* Highlight.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Highlight.cpp; sourceTree = "<group>"; };
    79607960                450CEBEE15073BBE002BB149 /* LabelableElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LabelableElement.cpp; sourceTree = "<group>"; };
    79617961                450CEBEF15073BBE002BB149 /* LabelableElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelableElement.h; sourceTree = "<group>"; };
     
    1944019440                        isa = PBXGroup;
    1944119441                        children = (
    19442                                 44E88E52236A667F009B4847 /* HighlightMap.cpp */,
    19443                                 44E88E50236A56AC009B4847 /* HighlightMap.h */,
    19444                                 44E88E4C2369128A009B4847 /* HighlightMap.idl */,
    19445                                 44E88E54236A66A1009B4847 /* HighlightRangeGroup.cpp */,
    19446                                 44E88E51236A5C8D009B4847 /* HighlightRangeGroup.h */,
    19447                                 44E88E4D2369128B009B4847 /* HighlightRangeGroup.idl */,
     19442                                44E88E54236A66A1009B4847 /* Highlight.cpp */,
     19443                                44E88E51236A5C8D009B4847 /* Highlight.h */,
     19444                                44E88E4D2369128B009B4847 /* Highlight.idl */,
     19445                                44E88E52236A667F009B4847 /* HighlightRegister.cpp */,
     19446                                44E88E50236A56AC009B4847 /* HighlightRegister.h */,
     19447                                44E88E4C2369128A009B4847 /* HighlightRegister.idl */,
    1944819448                        );
    1944919449                        path = highlight;
  • trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h

    r268762 r268774  
    130130    macro(GPUUncapturedErrorEvent) \
    131131    macro(GPUValidationError) \
    132     macro(HighlightMap) \
    133     macro(HighlightRangeGroup) \
     132    macro(HighlightRegister) \
     133    macro(Highlight) \
    134134    macro(HTMLAttachmentElement) \
    135135    macro(HTMLAudioElement) \
  • trunk/Source/WebCore/css/DOMCSSNamespace.cpp

    r253538 r268774  
    3535#include "CSSPropertyParser.h"
    3636#include "Document.h"
    37 #include "HighlightMap.h"
     37#include "HighlightRegister.h"
    3838#include "StyleProperties.h"
    3939#include <wtf/text/StringBuilder.h>
     
    9090}
    9191
    92 HighlightMap& DOMCSSNamespace::highlights(Document& document)
     92HighlightRegister& DOMCSSNamespace::highlights(Document& document)
    9393{
    94     return document.highlightMap();
     94    return document.highlightRegister();
    9595}
    9696
  • trunk/Source/WebCore/css/DOMCSSNamespace.h

    r253093 r268774  
    3838
    3939class Document;
    40 class HighlightMap;
    41 class HighlightRangeGroup;
     40class HighlightRegister;
     41class Highlight;
    4242
    4343class DOMCSSNamespace final : public RefCounted<DOMCSSNamespace>, public Supplementable<DOMCSSNamespace> {
     
    4646    static bool supports(Document&, const String& conditionText);
    4747    static String escape(const String& ident);
    48     static HighlightMap& highlights(Document&);
     48    static HighlightRegister& highlights(Document&);
    4949};
    5050
  • trunk/Source/WebCore/css/DOMCSSNamespace.idl

    r267813 r268774  
    3636    [CallWith=Document] static boolean supports(DOMString conditionText);
    3737    static DOMString escape(DOMString ident);
    38     [EnabledAtRuntime=HighlightAPI, CallWith=Document] static readonly attribute HighlightMap highlights;
     38    [EnabledAtRuntime=HighlightAPI, CallWith=Document] static readonly attribute HighlightRegister highlights;
    3939};
  • trunk/Source/WebCore/dom/Document.cpp

    r268268 r268774  
    112112#include "HTTPParsers.h"
    113113#include "HashChangeEvent.h"
    114 #include "HighlightMap.h"
     114#include "HighlightRegister.h"
    115115#include "History.h"
    116116#include "HitTestResult.h"
     
    793793    clearScriptedAnimationController();
    794794   
    795     if (m_highlightMap)
    796         m_highlightMap->clear();
     795    if (m_highlightRegister)
     796        m_highlightRegister->clear();
    797797
    798798    m_pendingScrollEventTargetList = nullptr;
     
    27682768}
    27692769
    2770 HighlightMap& Document::highlightMap()
    2771 {
    2772     if (!m_highlightMap)
    2773         m_highlightMap = HighlightMap::create();
    2774     return *m_highlightMap;
     2770HighlightRegister& Document::highlightRegister()
     2771{
     2772    if (!m_highlightRegister)
     2773        m_highlightRegister = HighlightRegister::create();
     2774    return *m_highlightRegister;
    27752775}
    27762776
     
    27782778{
    27792779    Vector<WeakPtr<HighlightRangeData>> rangesData;
    2780     if (m_highlightMap) {
    2781         for (auto& highlight : m_highlightMap->map()) {
     2780    if (m_highlightRegister) {
     2781        for (auto& highlight : m_highlightRegister->map()) {
    27822782            for (auto& rangeData : highlight.value->rangesData()) {
    27832783                if (rangeData->startPosition && rangeData->endPosition)
  • trunk/Source/WebCore/dom/Document.h

    r268268 r268774  
    157157class HTMLMediaElement;
    158158class HTMLVideoElement;
    159 class HighlightMap;
     159class HighlightRegister;
    160160class HitTestLocation;
    161161class HitTestRequest;
     
    15701570    TextManipulationController* textManipulationControllerIfExists() { return m_textManipulationController.get(); }
    15711571       
    1572     HighlightMap& highlightMap();
     1572    HighlightRegister& highlightRegister();
    15731573    void updateHighlightPositions();
    15741574
     
    19251925#endif
    19261926       
    1927     RefPtr<HighlightMap> m_highlightMap;
     1927    RefPtr<HighlightRegister> m_highlightRegister;
    19281928
    19291929    Timer m_visualUpdatesSuppressionTimer;
  • trunk/Source/WebCore/rendering/HighlightData.cpp

    r268484 r268774  
    3434#include "Document.h"
    3535#include "FrameSelection.h"
    36 #include "HighlightRangeGroup.h"
     36#include "Highlight.h"
    3737#include "Logging.h"
    3838#include "Position.h"
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r268484 r268774  
    3737#include "GraphicsContext.h"
    3838#include "HighlightData.h"
    39 #include "HighlightMap.h"
     39#include "HighlightRegister.h"
    4040#include "HitTestResult.h"
    4141#include "ImageBuffer.h"
     
    10521052    auto& parentStyle = parentRenderer.style();
    10531053    HighlightData highlightData;
    1054     for (auto& highlight : renderer().document().highlightMap().map()) {
     1054    for (auto& highlight : renderer().document().highlightRegister().map()) {
    10551055        auto renderStyle = parentRenderer.getUncachedPseudoStyle({ PseudoId::Highlight, highlight.key }, &parentStyle);
    10561056        if (!renderStyle)
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r268485 r268774  
    3434#include "HTMLParserIdioms.h"
    3535#include "HighlightData.h"
    36 #include "HighlightMap.h"
     36#include "HighlightRegister.h"
    3737#include "InlineElementBox.h"
    3838#include "LayoutIntegrationLineIterator.h"
     
    155155{
    156156    HighlightData highlightData;
    157     for (auto& highlight : document().highlightMap().map()) {
     157    for (auto& highlight : document().highlightRegister().map()) {
    158158        for (auto& rangeData : highlight.value->rangesData()) {
    159159            if (!highlightData.setRenderRange(rangeData))
  • trunk/Source/WebCore/rendering/SelectionRangeData.cpp

    r268484 r268774  
    3333#include "Document.h"
    3434#include "FrameSelection.h"
    35 #include "HighlightRangeGroup.h"
     35#include "Highlight.h"
    3636#include "Logging.h"
    3737#include "Position.h"
Note: See TracChangeset for help on using the changeset viewer.