Bug 37023 - [Qt] Expose HTMLTokenizer yielding parameters
Summary: [Qt] Expose HTMLTokenizer yielding parameters
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Laszlo Gombos
URL:
Keywords: Qt
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-04-02 07:06 PDT by Laszlo Gombos
Modified: 2010-05-07 16:02 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (1.51 KB, patch)
2010-04-02 07:10 PDT, Laszlo Gombos
no flags Details | Formatted Diff | Diff
2nd try, using DynamicProperties (1.45 KB, patch)
2010-04-28 20:40 PDT, Laszlo Gombos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Gombos 2010-04-02 07:06:38 PDT
These interfaces are useful in CPU-contained environments. Similar interface is exposed in Safari.
Comment 1 Laszlo Gombos 2010-04-02 07:10:00 PDT
Created attachment 52415 [details]
proposed patch
Comment 2 Kenneth Rohde Christiansen 2010-04-02 11:47:46 PDT
Laszlo should this patch be integrated in our 2.0 release branch after landing on trunk? if so, please add it as blocker.
Comment 3 Laszlo Gombos 2010-04-14 17:08:51 PDT
Comment on attachment 52415 [details]
proposed patch

Changed mind, let's use DynamicProperties instead.
Comment 4 Laszlo Gombos 2010-04-28 20:40:14 PDT
Created attachment 54667 [details]
2nd try, using DynamicProperties
Comment 5 Simon Hausmann 2010-04-29 00:36:18 PDT
Comment on attachment 54667 [details]
2nd try, using DynamicProperties

> Index: WebKit/qt/ChangeLog
> ===================================================================
> --- WebKit/qt/ChangeLog	(revision 58467)
> +++ WebKit/qt/ChangeLog	(working copy)
> @@ -1,3 +1,16 @@
> +2010-04-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [Qt] Expose HTMLTokenizer yielding parameters
> +        https://bugs.webkit.org/show_bug.cgi?id=37023
> +
> +        Enables to set TimeDelay and ChunkSize for 
> +        HTMLTokenizer.
> +
> +        * Api/qwebpage.cpp:
> +        (QWebPagePrivate::dynamicPropertyChangeEvent):
> +
>  2010-04-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
>  
>          Unreviewed, Qt build fix.
> Index: WebKit/qt/Api/qwebpage.cpp
> ===================================================================
> --- WebKit/qt/Api/qwebpage.cpp	(revision 58462)
> +++ WebKit/qt/Api/qwebpage.cpp	(working copy)
> @@ -1219,6 +1219,14 @@ void QWebPagePrivate::dynamicPropertyCha
>              view->forceLayout();
>          }
>      }
> +    else if (event->propertyName() == "HTMLTokenizerChunkSize") {
> +        int chunkSize = q->property("HTMLTokenizerChunkSize").toInt();
> +        q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize);
> +    }
> +    else if (event->propertyName() == "HTMLTokenizerTimeDelay") {
> +        double timeDelay = q->property("HTMLTokenizerTimeDelay").toDouble();
> +        q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
> +    }
>  }
>  
>  void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
WebKit/qt/Api/qwebpage.cpp:1222
 +      else if (event->propertyName() == "HTMLTokenizerChunkSize") {
Shouldn't the else be merged with the previous line? :)

WebKit/qt/Api/qwebpage.cpp:1230
 +  }
It would be nice to call the base implementation here, just for future proofing.
Comment 6 Simon Hausmann 2010-04-29 00:36:34 PDT
Do you want this patch in the 2.0 release?
Comment 7 Eric Seidel (no email) 2010-05-02 19:30:48 PDT
Attachment 54667 [details] was posted by a committer and has review+, assigning to Laszlo Gombos for commit.
Comment 8 Laszlo Gombos 2010-05-03 18:59:17 PDT
Comment on attachment 54667 [details]
2nd try, using DynamicProperties

Committed as http://trac.webkit.org/changeset/58727 with the style change pointed out by Simon. In addition prefixed the property names with _q_ as discussed in bug 38119.
Comment 9 Laszlo Gombos 2010-05-03 19:01:12 PDT
(In reply to comment #6)
> Do you want this patch in the 2.0 release?

Yes, please.
Comment 10 Simon Hausmann 2010-05-05 08:21:45 PDT
<cherry-pick-for-backport: r58727>
Comment 11 Simon Hausmann 2010-05-07 16:02:46 PDT
Revision r58727 cherry-picked into qtwebkit-2.0 with commit af21ac4af5aee469e8ea1334b0dc56f26d7aa180