053bccf3c9513d279a4396685ee65aa690040703
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-12  Nate Chapin  <japhet@chromium.org>
2
3         REGRESSION: Reloading a local file doesn't pick up changes
4         https://bugs.webkit.org/show_bug.cgi?id=109344
5
6         Reviewed by Alexey Proskuryakov.
7
8         Test: http/tests/cache/reload-main-resource.php
9
10         * loader/cache/CachedResource.cpp:
11         (WebCore::CachedResource::load):
12         * loader/cache/CachedResourceLoader.cpp:
13         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
14         (WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy()
15             for main resources.
16         * loader/cache/CachedResourceLoader.h:
17         (CachedResourceLoader):
18
19 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
20
21         Turn avoidIntersectionWithNode into Editor member functions to encapsulate delete button controller
22         https://bugs.webkit.org/show_bug.cgi?id=109549
23
24         Reviewed by Tony Chang.
25
26         Renamed avoidIntersectionWithNode to Editor::avoidIntersectionWithDeleteButtonController and added trivial
27         implementations when delete button controllers are disabled (ENABLE_DELETION_UI is 0).
28
29         * editing/DeleteButtonController.cpp:
30         * editing/EditCommand.cpp:
31         (WebCore::EditCommand::EditCommand):
32         * editing/Editor.cpp:
33         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Moved from htmlediting.cpp and renamed.
34         The version that takes VisibleSelection has been updated to use updatePositionForNodeRemoval to share
35         mode code with that function.
36         (WebCore::Editor::rangeForPoint):
37         * editing/Editor.h:
38         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Added; trivial implementations.
39         * editing/htmlediting.cpp:
40         * editing/htmlediting.h:
41         * editing/markup.cpp:
42         (WebCore::createMarkupInternal): Extracted from createMarkup.
43         (WebCore::createMarkup):
44
45 2013-02-12  Joseph Pecoraro  <pecoraro@apple.com>
46
47         [iOS] Enable PAGE_VISIBILITY_API
48         https://bugs.webkit.org/show_bug.cgi?id=109399
49
50         Reviewed by David Kilzer.
51
52         * Configurations/FeatureDefines.xcconfig:
53
54 2013-02-12  Andreas Kling  <akling@apple.com>
55
56         Move ElementAttributeData into Element.cpp/h
57         <http://webkit.org/b/109610>
58
59         Reviewed by Anders Carlsson.
60
61         Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
62         In the near future, Element should be the only client of this class, and thus it won't
63         be necessary for other classes to know anything about it.
64
65         * dom/ElementAttributeData.cpp: Removed.
66         * dom/ElementAttributeData.h: Removed.
67         * CMakeLists.txt:
68         * GNUmakefile.list.am:
69         * Target.pri:
70         * WebCore.gypi:
71         * WebCore.xcodeproj/project.pbxproj:
72         * dom/DOMAllInOne.cpp:
73         * dom/DocumentSharedObjectPool.cpp:
74         * dom/Element.cpp:
75         * dom/Element.h:
76         * workers/SharedWorker.cpp:
77         * Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.
78
79 2013-02-12  Simon Fraser  <simon.fraser@apple.com>
80
81         Crash when scrolling soon after page starts loading
82         https://bugs.webkit.org/show_bug.cgi?id=109631
83         <rdar://problem/13157533&13159627&13196727>
84         
85         Reviewed by Anders Carlsson.
86         
87         Make the scrolling tree more robust when the root state node,
88         and/or scrolling node are null. This can happen if we try to
89         handle a wheel event before we've done the first scrolling
90         tree commit.
91
92         * page/scrolling/ScrollingStateTree.cpp:
93         (WebCore::ScrollingStateTree::commit): Handle the case where
94         m_rootStateNode is null. We'll still commit, but the state tree
95         will have no state nodes.
96         * page/scrolling/ScrollingTree.cpp:
97         (WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
98         (WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
99         (WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
100         is null, just clear the map and null out the root scrolling node.
101         * page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
102         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
103         (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
104         to get here before we've registered the root scroll layer, in which case scrollLayerID()
105         will be 0. Assert to see if this can ever happen.
106         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
107         being null.
108
109 2013-02-12  Raymond Toy  <rtoy@google.com>
110
111         Synchronize setting of panner node model and processing
112         https://bugs.webkit.org/show_bug.cgi?id=109599
113
114         Reviewed by Chris Rogers.
115
116         No new tests.
117
118         * Modules/webaudio/PannerNode.cpp:
119         (WebCore::PannerNode::process):
120         (WebCore::PannerNode::setPanningModel):
121         * Modules/webaudio/PannerNode.h:
122
123 2013-02-12  Dean Jackson  <dino@apple.com>
124
125         Add class name for snapshotted plugin based on dimensions
126         https://bugs.webkit.org/show_bug.cgi?id=108369
127
128         Reviewed by Simon Fraser.
129
130         As the size of the plugin changes, the Shadow Root for the snapshot
131         might want to toggle different interfaces. Expose "tiny", "small",
132         "medium" and "large" classes on the Shadow. (The dimensions are
133         currently chosen fairly arbitrarily).
134
135         Because we only know the dimensions after layout, we set up
136         a post layout task to add the class. Luckily there already was
137         a post layout task for plugins - I just updated it to handle
138         both real and snapshotted plugins. This involved modifying
139         the list of RenderEmbeddedObjects in FrameView to take generic
140         RenderObjects, and decide which type they are when calling
141         the update method.
142
143         * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
144         (WebCore::classNameForShadowRootSize): New static function that returns a class name
145             after examining the size of the object.
146         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
147             the shadow root. This is called in the post layout task.
148         (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
149         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
150         * html/HTMLPlugInImageElement.h:
151         (HTMLPlugInImageElement): New method updateSnapshotInfo.
152
153         * page/FrameView.cpp:
154         (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
155         (WebCore::FrameView::removeWidgetToUpdate): Ditto
156         (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
157             plugin snapshot update if necessary.
158         (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
159         * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
160
161         * rendering/RenderSnapshottedPlugIn.cpp:
162         (WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
163             FrameView to recalculate size after layout.
164         * rendering/RenderSnapshottedPlugIn.h: New layout() method.
165
166 2013-02-12  Mike West  <mkwst@chromium.org>
167
168         Implement script MIME restrictions for X-Content-Type-Options: nosniff
169         https://bugs.webkit.org/show_bug.cgi?id=71851
170
171         Reviewed by Adam Barth.
172
173         This patch adds support for 'X-Content-Type-Options: nosniff' when
174         deciding whether or not to execute a given chunk of JavaScript. If the
175         header is present, script will only execute if it matches a predefined
176         set of MIME types[1] that are deemed "executable". Scripts served with
177         types that don't match the list will not execute.
178
179         IE introduced this feature, and Gecko is working on an implementation[2]
180         now. There's been some discussion on the WHATWG list about formalizing
181         the specification for this feature[3], but nothing significant has been
182         decided.
183
184         This implementation's list of acceptible MIME types differs from IE's:
185         it matches the list of supported JavaScript MIME types defined in
186         MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
187         particular, the VBScript types are not accepted, and
188         'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.
189
190         This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
191         currently only enabled on the Chromium port.
192
193         [1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
194         [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
195         [3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
196         [4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307
197
198         Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
199                http/tests/security/contentTypeOptions/nosniff-script-allowed.html
200                http/tests/security/contentTypeOptions/nosniff-script-blocked.html
201                http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html
202
203         * dom/ScriptElement.cpp:
204         (WebCore::ScriptElement::executeScript):
205             Before executing script, ensure that it shouldn't be blocked due to
206             its MIME type. If it is blocked, write an error message to the
207             console.
208         * loader/cache/CachedScript.cpp:
209         (WebCore::CachedScript::mimeType):
210             Make scripts' MIME type available outside the context of
211             CachedScript in order to correctly populate error messages we write
212             to the console in ScriptElement::executeScript
213         (WebCore):
214         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
215         * loader/cache/CachedScript.h:
216         (CachedScript):
217             A new method which checks the resource's HTTP headers to set the
218             'nosniff' disposition, and compares the resource's MIME type against
219             the list of allowed executable types. Returns true iff the script
220             is allowed.
221         * platform/network/HTTPParsers.cpp:
222         (WebCore):
223         (WebCore::parseContentTypeOptionsHeader):
224         * platform/network/HTTPParsers.h:
225             Adds a new enum which relates the sniffable status of the resource,
226             and a method to parse the HTTP header.
227
228 2013-02-12  Adam Barth  <abarth@webkit.org>
229
230         Threaded HTML parser should pass the remaining fast/tokenizer tests
231         https://bugs.webkit.org/show_bug.cgi?id=109607
232
233         Reviewed by Eric Seidel.
234
235         This patch fixes some edge cases involving document.write. Previously,
236         we would drop input characters on the floor if the tokenizer wasn't
237         able to consume them synchronously. In this patch, we send the unparsed
238         characters to the background thread for consumption after rewinding the
239         input stream.
240
241         * html/parser/BackgroundHTMLInputStream.cpp:
242         (WebCore::BackgroundHTMLInputStream::rewindTo):
243         * html/parser/BackgroundHTMLInputStream.h:
244         (BackgroundHTMLInputStream):
245         * html/parser/BackgroundHTMLParser.cpp:
246         (WebCore::BackgroundHTMLParser::resumeFrom):
247         * html/parser/BackgroundHTMLParser.h:
248         (Checkpoint):
249         * html/parser/HTMLDocumentParser.cpp:
250         (WebCore::HTMLDocumentParser::canTakeNextToken):
251         (WebCore::HTMLDocumentParser::didFailSpeculation):
252         (WebCore::HTMLDocumentParser::pumpTokenizer):
253         (WebCore::HTMLDocumentParser::finish):
254         * html/parser/HTMLInputStream.h:
255         (WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
256         (HTMLInputStream):
257
258 2013-02-12  Csaba Osztrogon√°c  <ossy@webkit.org>
259
260         Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
261
262         * inspector/InspectorInstrumentation.h:
263         (WebCore::InspectorInstrumentation::scriptsEnabled):
264
265 2013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
266
267         Remove remaining traces of Web Intents
268         https://bugs.webkit.org/show_bug.cgi?id=109586
269
270         Reviewed by Eric Seidel.
271
272         Remove remaining traces of Web Intents as the functionality was
273         removed in r142549.
274
275         No new tests, no behavior change for layout tests.
276
277         * GNUmakefile.features.am.in:
278         * html/HTMLTagNames.in:
279
280 2013-02-12  Robert Hogan  <robert@webkit.org>
281
282         REGRESSION(r136967): Combination of float and clear yields to bad layout
283         https://bugs.webkit.org/show_bug.cgi?id=109476
284
285         Reviewed by Levi Weintraub.
286
287         Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html
288
289         The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
290         child of a self-collapsing block. The ones that follow are not affected by its margins.
291
292         * rendering/RenderBlockLineLayout.cpp:
293         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
294
295 2013-02-12  Levi Weintraub  <leviw@chromium.org>
296
297         ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
298         https://bugs.webkit.org/show_bug.cgi?id=108699
299
300         Reviewed by Abhishek Arya.
301
302         RenderListItems performs special management of its children to maintain list markers. Splitting a flow
303         through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
304         flows when inside one.
305
306         Test: fast/multicol/span/list-multi-column-crash.html
307
308         * rendering/RenderBlock.cpp:
309         (WebCore::RenderBlock::containingColumnsBlock):
310
311 2013-02-12  Roger Fong  <roger_fong@apple.com>
312
313         Unreviewed Windows build fix.
314
315         * testing/Internals.cpp:
316         (WebCore::Internals::resetToConsistentState):
317         (WebCore::Internals::Internals):
318
319 2013-02-12  Vivek Galatage  <vivek.vg@samsung.com>
320
321         Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
322         https://bugs.webkit.org/show_bug.cgi?id=109402
323
324         Reviewed by Yury Semikhatsky.
325
326         Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
327         inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
328         to achieve this. Also the state change triggered by the inspector should be ignored to avoid
329         infinite loop.
330
331         Test: inspector/script-execution-state-change-notification.html
332
333         * inspector/Inspector.json:
334         * inspector/InspectorInstrumentation.cpp:
335         (WebCore):
336         (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
337         * inspector/InspectorInstrumentation.h:
338         (InspectorInstrumentation):
339         (WebCore::InspectorInstrumentation::scriptsEnabled):
340         (WebCore):
341         * inspector/InspectorPageAgent.cpp:
342         (WebCore::InspectorPageAgent::InspectorPageAgent):
343         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
344         (WebCore::InspectorPageAgent::scriptsEnabled):
345         (WebCore):
346         * inspector/InspectorPageAgent.h:
347         (InspectorPageAgent):
348         * inspector/front-end/ResourceTreeModel.js:
349         (WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
350         (WebInspector.PageDispatcher.prototype.scriptsEnabled):
351         * page/Settings.cpp:
352         (WebCore::Settings::setScriptEnabled):
353
354 2013-02-12  Antti Koivisto  <antti@apple.com>
355
356         Cache timer heap pointer to timers
357         https://bugs.webkit.org/show_bug.cgi?id=109597
358
359         Reviewed by Andreas Kling.
360
361         Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
362         each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.
363
364         * platform/Timer.cpp:
365         (WebCore::threadGlobalTimerHeap):
366         (WebCore::TimerHeapReference::operator=):
367         (WebCore::TimerHeapIterator::checkConsistency):
368         (WebCore::TimerBase::TimerBase):
369         (WebCore::TimerBase::checkHeapIndex):
370         (WebCore::TimerBase::setNextFireTime):
371         * platform/Timer.h:
372         (WebCore::TimerBase::timerHeap):
373         (TimerBase):
374
375 2013-02-12  Adam Barth  <abarth@webkit.org>
376
377         BackgroundHTMLParser::resumeFrom should take a struct
378         https://bugs.webkit.org/show_bug.cgi?id=109598
379
380         Reviewed by Eric Seidel.
381
382         This patch is purely a syntatic change that paves the way for fixing
383         the partial-entity document.write tests. To fix those tests, we'll need
384         to pass more information to resumeFrom, but we're hitting the argument
385         limits in Functional.h. Rather than adding yet more arguments, this
386         patch moves to a single argument that's a struct.
387
388         * html/parser/BackgroundHTMLParser.cpp:
389         (WebCore::BackgroundHTMLParser::resumeFrom):
390         * html/parser/BackgroundHTMLParser.h:
391         (Checkpoint):
392         (BackgroundHTMLParser):
393         * html/parser/HTMLDocumentParser.cpp:
394         (WebCore::HTMLDocumentParser::didFailSpeculation):
395
396 2013-02-12  Elliott Sprehn  <esprehn@chromium.org>
397
398         rootRenderer in FrameView is really RenderView
399         https://bugs.webkit.org/show_bug.cgi?id=109510
400
401         Reviewed by Eric Seidel.
402
403         The global function rootRenderer(FrameView*) is really just a way
404         to get the RenderView from the Frame so replace it with a renderView()
405         method and replace usage of the word "root" with renderView so it's
406         obvious the root we're talking about is the renderView. This is an
407         important distinction to make since we also have rootRenderer in the code
408         for the documentElement()'s renderer and we also have a "layout root" which
409         is entirely different.
410
411         No new tests, just refactoring.
412
413         * page/FrameView.cpp:
414         (WebCore::FrameView::rootRenderer): Removed.
415         (WebCore::FrameView::setFrameRect):
416         (WebCore::FrameView::adjustViewSize):
417         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
418         (WebCore::FrameView::updateCompositingLayersAfterLayout):
419         (WebCore::FrameView::clearBackingStores):
420         (WebCore::FrameView::restoreBackingStores):
421         (WebCore::FrameView::usesCompositedScrolling):
422         (WebCore::FrameView::layerForHorizontalScrollbar):
423         (WebCore::FrameView::layerForVerticalScrollbar):
424         (WebCore::FrameView::layerForScrollCorner):
425         (WebCore::FrameView::tiledBacking):
426         (WebCore::FrameView::scrollLayerID):
427         (WebCore::FrameView::layerForOverhangAreas):
428         (WebCore::FrameView::flushCompositingStateForThisFrame):
429         (WebCore::FrameView::hasCompositedContent):
430         (WebCore::FrameView::enterCompositingMode):
431         (WebCore::FrameView::isSoftwareRenderable):
432         (WebCore::FrameView::didMoveOnscreen):
433         (WebCore::FrameView::willMoveOffscreen):
434         (WebCore::FrameView::layout):
435         (WebCore::FrameView::embeddedContentBox):
436         (WebCore::FrameView::contentsInCompositedLayer):
437         (WebCore::FrameView::scrollContentsFastPath):
438         (WebCore::FrameView::scrollContentsSlowPath):
439         (WebCore::FrameView::maintainScrollPositionAtAnchor):
440         (WebCore::FrameView::scrollPositionChanged):
441         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
442         (WebCore::FrameView::updateFixedElementsAfterScrolling):
443         (WebCore::FrameView::visibleContentsResized):
444         (WebCore::FrameView::scheduleRelayoutOfSubtree):
445         (WebCore::FrameView::needsLayout):
446         (WebCore::FrameView::setNeedsLayout):
447         (WebCore::FrameView::performPostLayoutTasks):
448         (WebCore::FrameView::updateControlTints):
449         (WebCore::FrameView::paintContents):
450         (WebCore::FrameView::forceLayoutForPagination):
451         (WebCore::FrameView::adjustPageHeightDeprecated):
452         (WebCore::FrameView::resetTrackedRepaints):
453         (WebCore::FrameView::isVerticalDocument):
454         (WebCore::FrameView::isFlippedDocument):
455         * page/FrameView.h:
456         (WebCore::FrameView::renderView): Added.
457
458 2013-02-12  Tomas Popela  <tpopela@redhat.com>
459
460         [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
461         https://bugs.webkit.org/show_bug.cgi?id=109180
462
463         Reviewed by Xan Lopez.
464
465         When compiling WebKit with --enable-introspection and generating GObject bindings
466         for DataTransferItemList we must disable one add() method, because GObject is
467         based on C and C does not allow two functions with the same name.
468
469         No tests needed.
470
471         * bindings/scripts/CodeGeneratorGObject.pm:
472
473 2013-02-12  Uday Kiran  <udaykiran@motorola.com>
474
475         Background size width specified in viewport percentage units not working
476         https://bugs.webkit.org/show_bug.cgi?id=109536
477
478         Reviewed by Antti Koivisto.
479
480         Corrected the check for viewport percentage unit while calculating
481         background image width.
482
483         Test: fast/backgrounds/size/backgroundSize-viewportPercentage-width.html
484
485         * rendering/RenderBoxModelObject.cpp:
486         (WebCore::RenderBoxModelObject::calculateFillTileSize):
487
488 2013-02-12  Abhishek Arya  <inferno@chromium.org>
489
490         Heap-use-after-free in WebCore::DeleteButtonController::enable
491         https://bugs.webkit.org/show_bug.cgi?id=109447
492
493         Reviewed by Ryosuke Niwa.
494
495         RefPtr frame pointer since it can get deleted due to mutation events
496         fired inside AppendNodeCommand::doUnapply.
497
498         No new tests. Testcase is hard to minimize due to recursive
499         calls with DOMNodeRemovedFromDocument mutation event.
500
501         * editing/CompositeEditCommand.cpp:
502         (WebCore::EditCommandComposition::unapply):
503         (WebCore::EditCommandComposition::reapply):
504
505 2013-02-12  Eric Seidel  <eric@webkit.org>
506
507         Remove HTMLTokenTypes header (and split out AtomicHTMLToken.h from HTMLToken.h)
508         https://bugs.webkit.org/show_bug.cgi?id=109525
509
510         Reviewed by Adam Barth.
511
512         We no longer need a separate HTMLTokenTypes class now that NEW_XML is gone.
513         However, to remove HTMLTokenTypes, I had to split AtomicHTMLToken.h from
514         HTMLToken.h (to fix a circular dependancy).
515
516         * GNUmakefile.list.am:
517         * Target.pri:
518         * WebCore.gypi:
519         * WebCore.vcproj/WebCore.vcproj:
520         * WebCore.vcxproj/WebCore.vcxproj:
521         * WebCore.vcxproj/WebCore.vcxproj.filters:
522         * WebCore.xcodeproj/project.pbxproj:
523         * html/HTMLViewSourceDocument.cpp:
524         (WebCore::HTMLViewSourceDocument::addSource):
525         * html/parser/AtomicHTMLToken.h: Added.
526         (WebCore):
527         (AtomicHTMLToken):
528         (WebCore::AtomicHTMLToken::create):
529         (WebCore::AtomicHTMLToken::forceQuirks):
530         (WebCore::AtomicHTMLToken::type):
531         (WebCore::AtomicHTMLToken::name):
532         (WebCore::AtomicHTMLToken::setName):
533         (WebCore::AtomicHTMLToken::selfClosing):
534         (WebCore::AtomicHTMLToken::getAttributeItem):
535         (WebCore::AtomicHTMLToken::attributes):
536         (WebCore::AtomicHTMLToken::characters):
537         (WebCore::AtomicHTMLToken::charactersLength):
538         (WebCore::AtomicHTMLToken::isAll8BitData):
539         (WebCore::AtomicHTMLToken::comment):
540         (WebCore::AtomicHTMLToken::publicIdentifier):
541         (WebCore::AtomicHTMLToken::systemIdentifier):
542         (WebCore::AtomicHTMLToken::clearExternalCharacters):
543         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
544         (WebCore::AtomicHTMLToken::initializeAttributes):
545         * html/parser/BackgroundHTMLParser.cpp:
546         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
547         * html/parser/CompactHTMLToken.cpp:
548         (WebCore::CompactHTMLToken::CompactHTMLToken):
549         * html/parser/CompactHTMLToken.h:
550         (WebCore::CompactHTMLToken::type):
551         * html/parser/HTMLConstructionSite.cpp:
552         (WebCore::HTMLConstructionSite::insertDoctype):
553         (WebCore::HTMLConstructionSite::insertComment):
554         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
555         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
556         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
557         (WebCore::HTMLConstructionSite::insertForeignElement):
558         * html/parser/HTMLDocumentParser.cpp:
559         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
560         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
561         * html/parser/HTMLDocumentParser.h:
562         * html/parser/HTMLMetaCharsetParser.cpp:
563         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
564         * html/parser/HTMLPreloadScanner.cpp:
565         (WebCore::isStartTag):
566         (WebCore::isStartOrEndTag):
567         (WebCore::HTMLPreloadScanner::processToken):
568         * html/parser/HTMLSourceTracker.cpp:
569         (WebCore::HTMLSourceTracker::start):
570         (WebCore::HTMLSourceTracker::sourceForToken):
571         * html/parser/HTMLStackItem.h:
572         (WebCore::HTMLStackItem::HTMLStackItem):
573         * html/parser/HTMLToken.h:
574         (WebCore::HTMLToken::clear):
575         (WebCore::HTMLToken::isUninitialized):
576         (WebCore::HTMLToken::type):
577         (WebCore::HTMLToken::makeEndOfFile):
578         (WebCore::HTMLToken::data):
579         (WebCore::HTMLToken::name):
580         (WebCore::HTMLToken::appendToName):
581         (WebCore::HTMLToken::forceQuirks):
582         (WebCore::HTMLToken::setForceQuirks):
583         (WebCore::HTMLToken::beginDOCTYPE):
584         (WebCore::HTMLToken::publicIdentifier):
585         (WebCore::HTMLToken::systemIdentifier):
586         (WebCore::HTMLToken::setPublicIdentifierToEmptyString):
587         (WebCore::HTMLToken::setSystemIdentifierToEmptyString):
588         (WebCore::HTMLToken::appendToPublicIdentifier):
589         (WebCore::HTMLToken::appendToSystemIdentifier):
590         (WebCore::HTMLToken::selfClosing):
591         (WebCore::HTMLToken::setSelfClosing):
592         (WebCore::HTMLToken::beginStartTag):
593         (WebCore::HTMLToken::beginEndTag):
594         (WebCore::HTMLToken::addNewAttribute):
595         (WebCore::HTMLToken::appendToAttributeName):
596         (WebCore::HTMLToken::appendToAttributeValue):
597         (WebCore::HTMLToken::attributes):
598         (WebCore::HTMLToken::eraseValueOfAttribute):
599         (WebCore::HTMLToken::ensureIsCharacterToken):
600         (WebCore::HTMLToken::characters):
601         (WebCore::HTMLToken::appendToCharacter):
602         (WebCore::HTMLToken::comment):
603         (WebCore::HTMLToken::beginComment):
604         (WebCore::HTMLToken::appendToComment):
605         (WebCore::HTMLToken::eraseCharacters):
606         (HTMLToken):
607         * html/parser/HTMLTokenTypes.h: Removed.
608         * html/parser/HTMLTokenizer.cpp:
609         (WebCore::AtomicHTMLToken::usesName):
610         (WebCore::AtomicHTMLToken::usesAttributes):
611         (WebCore::HTMLTokenizer::flushBufferedEndTag):
612         (WebCore::HTMLTokenizer::nextToken):
613         * html/parser/HTMLTokenizer.h:
614         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded):
615         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
616         * html/parser/HTMLTreeBuilder.cpp:
617         (WebCore::HTMLTreeBuilder::processToken):
618         (WebCore::HTMLTreeBuilder::processDoctypeToken):
619         (WebCore::HTMLTreeBuilder::processFakeStartTag):
620         (WebCore::HTMLTreeBuilder::processFakeEndTag):
621         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
622         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
623         (WebCore):
624         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
625         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
626         (WebCore::HTMLTreeBuilder::processStartTag):
627         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
628         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
629         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
630         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
631         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
632         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
633         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
634         (WebCore::HTMLTreeBuilder::processEndTag):
635         (WebCore::HTMLTreeBuilder::processComment):
636         (WebCore::HTMLTreeBuilder::processCharacter):
637         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
638         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
639         (WebCore::HTMLTreeBuilder::defaultForInHead):
640         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
641         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
642         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
643         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
644         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
645         (WebCore::HTMLTreeBuilder::processScriptStartTag):
646         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
647         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
648         * html/parser/HTMLViewSourceParser.cpp:
649         (WebCore::HTMLViewSourceParser::updateTokenizerState):
650         * html/parser/TextDocumentParser.cpp:
651         (WebCore::TextDocumentParser::insertFakePreElement):
652         * html/parser/XSSAuditor.cpp:
653         (WebCore::XSSAuditor::filterToken):
654         (WebCore::XSSAuditor::filterScriptToken):
655         (WebCore::XSSAuditor::filterObjectToken):
656         (WebCore::XSSAuditor::filterParamToken):
657         (WebCore::XSSAuditor::filterEmbedToken):
658         (WebCore::XSSAuditor::filterAppletToken):
659         (WebCore::XSSAuditor::filterIframeToken):
660         (WebCore::XSSAuditor::filterMetaToken):
661         (WebCore::XSSAuditor::filterBaseToken):
662         (WebCore::XSSAuditor::filterFormToken):
663
664 2013-02-12  Pablo Flouret  <pablof@motorola.com>
665
666         Handle error recovery in @supports
667         https://bugs.webkit.org/show_bug.cgi?id=103934
668
669         Reviewed by Antti Koivisto.
670
671         Tests 021, 024, 031, and 033 in
672         http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional
673         fail because there's no explicit error recovery in @support's grammar.
674         Opera and Firefox pass the tests.
675
676         No new tests, modified css3/supports{,-cssom}.html
677
678         * css/CSSGrammar.y.in:
679         * css/CSSParser.cpp:
680         (WebCore::CSSParser::createSupportsRule):
681         (WebCore::CSSParser::markSupportsRuleHeaderEnd):
682         (WebCore::CSSParser::popSupportsRuleData):
683         * css/CSSParser.h:
684
685 2013-02-12  Eric Carlson  <eric.carlson@apple.com>
686
687         [Mac] guard against NULL languages array
688         https://bugs.webkit.org/show_bug.cgi?id=109595
689
690         Reviewed by Dean Jackson.
691
692         No new tests, existing tests won't crash if this is correct.
693
694         * page/CaptionUserPreferencesMac.mm:
695         (WebCore::CaptionUserPreferencesMac::preferredLanguages):
696
697 2013-02-12  Emil A Eklund  <eae@chromium.org>
698
699         TransformState::move should not round offset to int
700         https://bugs.webkit.org/show_bug.cgi?id=108266
701
702         Reviewed by Simon Fraser.
703         
704         Currently TransformState::move rounds the offset to the nearest
705         integer values, this results in operations using TransformState
706         to compute a position to misreport the location, specifically
707         Element:getBoundingClientRect and repaint rects. Sizes are
708         handled correctly and do not have the same problem.
709
710         Tests: fast/sub-pixel/boundingclientrect-subpixel-margin.html
711                fast/sub-pixel/clip-rect-box-consistent-rounding.html
712
713         * page/FrameView.cpp:
714         (WebCore::FrameView::convertFromRenderer):
715         Change to use pixel snapping instead of enclosing box. All other
716         code paths use pixelSnappedIntRect to align the rects to device
717         pixels however this used enclosingIntRect (indirectly through
718         the FloatQuad::enclosingBoundingBox call).
719         Without the rounding in TransformState this causes repaint rects
720         for elements on subpixel bounds to be too large by up to one
721         pixel on each axis. For normal repaints this isn't really a
722         problem but in scrollContentsSlowPath it can result in moving
723         too large a rect.
724
725         * platform/graphics/transforms/TransformState.cpp:
726         (WebCore::TransformState::translateTransform):
727         (WebCore::TransformState::translateMappedCoordinates):
728         Change to take a LayoutSize instead of an IntSize.
729
730         (WebCore::TransformState::move):
731         (WebCore::TransformState::applyAccumulatedOffset):
732         * platform/graphics/transforms/TransformState.h:
733         Remove rounding logic and use original, more precise, value.
734
735         * rendering/RenderGeometryMap.cpp:
736         (WebCore::RenderGeometryMap::mapToContainer):
737         Remove rounding logic and use original, more precise, value.
738
739 2013-02-12  Jessie Berlin  <jberlin@apple.com>
740
741         Rollout r142618, it broke all the Mac builds.
742
743         * inspector/HeapGraphSerializer.cpp:
744         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
745         (WebCore::HeapGraphSerializer::pushUpdate):
746         (WebCore::HeapGraphSerializer::reportNode):
747         (WebCore::HeapGraphSerializer::toNodeId):
748         (WebCore::HeapGraphSerializer::addRootNode):
749         * inspector/HeapGraphSerializer.h:
750         (WebCore):
751         (HeapGraphSerializer):
752         * inspector/InspectorMemoryAgent.cpp:
753         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
754
755 2013-02-12  Rafael Weinstein  <rafaelw@chromium.org>
756
757         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
758         https://bugs.webkit.org/show_bug.cgi?id=109338
759
760         Reviewed by Adam Barth.
761
762         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
763         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
764
765         Tests added to html5lib.
766
767         * html/parser/HTMLTreeBuilder.cpp:
768         (WebCore):
769         (WebCore::HTMLTreeBuilder::popAllTemplates):
770         (WebCore::HTMLTreeBuilder::processEndTag):
771         (WebCore::HTMLTreeBuilder::processEndOfFile):
772         * html/parser/HTMLTreeBuilder.h:
773         (HTMLTreeBuilder):
774
775 2013-02-12  Dominic Mazzoni  <dmazzoni@google.com>
776
777         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::AccessibilityMenuListPopup::didUpdateActiveOption
778         https://bugs.webkit.org/show_bug.cgi?id=109452
779
780         Reviewed by Chris Fleizach.
781
782         Send the accessibility childrenChanged notification in
783         HTMLSelectElement::setRecalcListItems instead of in childrenChanged
784         so that all possible codepaths are caught.
785
786         Test: accessibility/insert-selected-option-into-select-causes-crash.html
787
788         * html/HTMLSelectElement.cpp:
789         (WebCore::HTMLSelectElement::childrenChanged):
790         (WebCore::HTMLSelectElement::setRecalcListItems):
791
792 2013-02-12  Peter Rybin  <prybin@chromium.org>
793
794         Web Inspector: for event listener provide handler function value in protocol and in UI
795         https://bugs.webkit.org/show_bug.cgi?id=109284
796
797         Reviewed by Yury Semikhatsky.
798
799         The feature implies that we include a real handler function value into event listener description.
800         Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.
801
802         * bindings/js/ScriptEventListener.cpp:
803         (WebCore::eventListenerHandler):
804         (WebCore):
805         (WebCore::eventListenerHandlerScriptState):
806         * bindings/js/ScriptEventListener.h:
807         (WebCore):
808         * bindings/v8/ScriptEventListener.cpp:
809         (WebCore::eventListenerHandler):
810         (WebCore):
811         (WebCore::eventListenerHandlerScriptState):
812         * bindings/v8/ScriptEventListener.h:
813         (WebCore):
814         * inspector/Inspector.json:
815         * inspector/InspectorDOMAgent.cpp:
816         (WebCore::InspectorDOMAgent::getEventListenersForNode):
817         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
818         * inspector/InspectorDOMAgent.h:
819         (InspectorDOMAgent):
820         * inspector/front-end/DOMAgent.js:
821         (WebInspector.DOMNode.prototype.eventListeners):
822         * inspector/front-end/EventListenersSidebarPane.js:
823         (WebInspector.EventListenersSidebarPane.prototype.update):
824         (.):
825
826 2013-02-12  Yury Semikhatsky  <yurys@chromium.org>
827
828         Web Inspector: add initial implementation of native memory graph to Timeline
829         https://bugs.webkit.org/show_bug.cgi?id=109578
830
831         Reviewed by Alexander Pavlov.
832
833         This change adds inital implementation of native memory graph UI. The graph
834         will be shown in the same place as DOM counters graph on the Timeline panel.
835
836         Added NativeMemoryGraph.js that reuses parts of DOM counters graph
837         implementation. MemoryStatistics.js was refactor to allow sharing
838         more code between DOM counters and native memory graph.
839
840         * WebCore.gypi:
841         * WebCore.vcproj/WebCore.vcproj:
842         * inspector/compile-front-end.py:
843         * inspector/front-end/MemoryStatistics.js:
844         (WebInspector.MemoryStatistics):
845         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
846         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
847         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
848         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
849         (WebInspector.MemoryStatistics.prototype._canvasHeight):
850         (WebInspector.MemoryStatistics.prototype._updateSize):
851         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
852         (WebInspector.MemoryStatistics.prototype._drawMarker):
853         * inspector/front-end/NativeMemoryGraph.js: Added.
854         (WebInspector.NativeMemoryGraph):
855         (WebInspector.NativeMemoryCounterUI):
856         (WebInspector.NativeMemoryCounterUI.prototype._hslToString):
857         (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
858         (WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
859         (WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
860         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
861         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
862         (WebInspector.NativeMemoryGraph.prototype._canvasHeight):
863         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
864         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
865         (WebInspector.NativeMemoryGraph.prototype._draw):
866         (WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
867         (WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
868         (WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
869         (WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
870         (WebInspector.NativeMemoryGraph.prototype._drawMarker):
871         (WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
872         (WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
873         (WebInspector.NativeMemoryGraph.prototype.valueGetter):
874         (WebInspector.NativeMemoryGraph.prototype._drawGraph):
875         (WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
876         * inspector/front-end/TimelinePanel.js:
877         * inspector/front-end/WebKit.qrc:
878         * inspector/front-end/timelinePanel.css:
879         (#memory-graphs-canvas-container.dom-counters .resources-dividers):
880         (.memory-category-value):
881
882 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
883
884         Web Inspector: refactor some reusable functionality from BraceHighlighter
885         https://bugs.webkit.org/show_bug.cgi?id=109574
886
887         Reviewed by Pavel Feldman.
888
889         New test: inspector/editor/text-editor-brace-highlighter.html
890
891         Extract functionality which, for given line and cursor position, will
892         return position for a brace that should be highlighted. Add a layout
893         test to verify brace highlighter funcionality.
894
895         * inspector/front-end/DefaultTextEditor.js:
896         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
897         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
898         * inspector/front-end/TextUtils.js:
899         (WebInspector.TextUtils.isOpeningBraceChar):
900         (WebInspector.TextUtils.isClosingBraceChar):
901         (WebInspector.TextUtils.isBraceChar):
902
903 2013-02-12  Ilya Tikhonovsky  <loislo@chromium.org>
904
905         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
906         https://bugs.webkit.org/show_bug.cgi?id=109554
907
908         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
909         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
910
911         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
912         It helps me to do the tests for the serializer.
913
914         Reviewed by Yury Semikhatsky.
915
916         It is covered by newly added tests in TestWebKitAPI.
917
918         * inspector/HeapGraphSerializer.cpp:
919         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
920         (WebCore::HeapGraphSerializer::pushUpdate):
921         (WebCore::HeapGraphSerializer::reportNode):
922         (WebCore::HeapGraphSerializer::toNodeId):
923         (WebCore::HeapGraphSerializer::addRootNode):
924         * inspector/HeapGraphSerializer.h:
925         (HeapGraphSerializerClient):
926         (WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
927         (HeapGraphSerializer):
928         * inspector/InspectorMemoryAgent.cpp:
929         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
930
931 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
932
933         Web Inspector: Introduce version controller to migrate settings versions.
934         https://bugs.webkit.org/show_bug.cgi?id=109553
935
936         Reviewed by Yury Semikhatsky.
937
938         This patch introduces version controller that could be used to migrate inspector settings.
939
940         Test: inspector/version-controller.html
941
942         * inspector/front-end/Settings.js:
943         (WebInspector.Settings):
944         (WebInspector.VersionController):
945         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
946         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
947         * inspector/front-end/inspector.js:
948
949 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
950
951         Web Inspector: File system should produce more verbose error messages and recover from errors
952         https://bugs.webkit.org/show_bug.cgi?id=109571
953
954         Reviewed by Alexander Pavlov.
955
956         Error handler prints original file system call params now.
957         Added callbacks to error handler to recover from errors.
958
959         * inspector/front-end/FileSystemProjectDelegate.js:
960         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
961         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
962         (WebInspector.FileSystemUtils.errorMessage):
963         (.fileSystemLoaded):
964         (.fileEntryLoaded):
965         (.errorHandler):
966         (WebInspector.FileSystemUtils.requestFileContent):
967         (WebInspector.FileSystemUtils.setFileContent):
968         (WebInspector.FileSystemUtils._readDirectory):
969         (.innerCallback):
970         (WebInspector.FileSystemUtils._requestEntries):
971
972 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
973
974         Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
975         https://bugs.webkit.org/show_bug.cgi?id=109567
976
977         Reviewed by Alexander Pavlov.
978
979         The code in this method was redundant as the same result could be achieved by using File System API directly.
980
981         * inspector/front-end/FileSystemProjectDelegate.js:
982
983 2013-02-12  Alexander Pavlov  <apavlov@chromium.org>
984
985         Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
986         https://bugs.webkit.org/show_bug.cgi?id=109568
987
988         Reviewed by Vsevolod Vlasov.
989
990         The suggestbox would get hidden in the case of empty input, yet it should get hidden
991         in the case of empty user-entered prefix (which is a wider notion.)
992
993         * inspector/front-end/TextPrompt.js:
994         (WebInspector.TextPrompt.prototype.complete):
995
996 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
997
998         Web Inspector: separate SuggestBox from TextPrompt
999         https://bugs.webkit.org/show_bug.cgi?id=109430
1000
1001         Reviewed by Alexander Pavlov.
1002
1003         Create WebInspector.SuggestBoxDelegate interface and
1004         refactor TextPrompt to use this interface. Separate SuggestBox into
1005         WebInspector.SuggestBox namespace and put it into its own file.
1006
1007         No new tests: no change in behaviour.
1008
1009         * WebCore.gypi:
1010         * WebCore.vcproj/WebCore.vcproj:
1011         * inspector/compile-front-end.py:
1012         * inspector/front-end/SuggestBox.js: Added.
1013         (WebInspector.SuggestBoxDelegate):
1014         (WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
1015         (WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
1016         (WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
1017         (WebInspector.SuggestBox):
1018         (WebInspector.SuggestBox.prototype.get visible):
1019         (WebInspector.SuggestBox.prototype.get hasSelection):
1020         (WebInspector.SuggestBox.prototype._onscrollresize):
1021         (WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
1022         (WebInspector.SuggestBox.prototype._updateBoxPosition):
1023         (WebInspector.SuggestBox.prototype._onboxmousedown):
1024         (WebInspector.SuggestBox.prototype.hide):
1025         (WebInspector.SuggestBox.prototype.removeFromElement):
1026         (WebInspector.SuggestBox.prototype._applySuggestion):
1027         (WebInspector.SuggestBox.prototype.acceptSuggestion):
1028         (WebInspector.SuggestBox.prototype._selectClosest):
1029         (WebInspector.SuggestBox.prototype.updateSuggestions):
1030         (WebInspector.SuggestBox.prototype._onItemMouseDown):
1031         (WebInspector.SuggestBox.prototype._createItemElement):
1032         (WebInspector.SuggestBox.prototype._updateItems):
1033         (WebInspector.SuggestBox.prototype._selectItem):
1034         (WebInspector.SuggestBox.prototype._canShowBox):
1035         (WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
1036         (WebInspector.SuggestBox.prototype._completionsReady):
1037         (WebInspector.SuggestBox.prototype.upKeyPressed):
1038         (WebInspector.SuggestBox.prototype.downKeyPressed):
1039         (WebInspector.SuggestBox.prototype.pageUpKeyPressed):
1040         (WebInspector.SuggestBox.prototype.pageDownKeyPressed):
1041         (WebInspector.SuggestBox.prototype.enterKeyPressed):
1042         (WebInspector.SuggestBox.prototype.tabKeyPressed):
1043         * inspector/front-end/TextPrompt.js:
1044         (WebInspector.TextPrompt.prototype.userEnteredText):
1045         (WebInspector.TextPrompt.prototype._attachInternal):
1046         (WebInspector.TextPrompt.prototype._completionsReady):
1047         (WebInspector.TextPrompt.prototype.applySuggestion):
1048         (WebInspector.TextPrompt.prototype._applySuggestion):
1049         (WebInspector.TextPrompt.prototype.enterKeyPressed):
1050         (WebInspector.TextPrompt.prototype.upKeyPressed):
1051         (WebInspector.TextPrompt.prototype.downKeyPressed):
1052         (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
1053         (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
1054         * inspector/front-end/WebKit.qrc:
1055         * inspector/front-end/inspector.html:
1056
1057 2013-02-12  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1058
1059         [TexMap] Apply frames-per-second debug counter to WK1.
1060         https://bugs.webkit.org/show_bug.cgi?id=109540
1061
1062         Reviewed by Noam Rosenthal.
1063
1064         Adds basysKom copyright info to TextureMapperFPSCounter header.
1065
1066         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
1067         * platform/graphics/texmap/TextureMapperFPSCounter.h:
1068
1069 2013-02-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1070
1071         Unreviewed, rolling out r142531.
1072         http://trac.webkit.org/changeset/142531
1073         https://bugs.webkit.org/show_bug.cgi?id=109569
1074
1075         Causes html5lib/run-template layout test to crash. (Requested
1076         by atwilson_ on #webkit).
1077
1078         * html/parser/HTMLTreeBuilder.cpp:
1079         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
1080         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
1081         (WebCore::HTMLTreeBuilder::processEndOfFile):
1082         * html/parser/HTMLTreeBuilder.h:
1083         (HTMLTreeBuilder):
1084
1085 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
1086
1087         [GTK] Enable CSS image-set support in development builds
1088         https://bugs.webkit.org/show_bug.cgi?id=109475
1089
1090         Reviewed by Martin Robinson.
1091
1092         No new tests - majority of the related tests now passes.
1093
1094         * GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
1095         with the define value defaulting to 0. The value gets overridden with 1 in development
1096         builds, meaning the feature is enabled under that configuration.
1097
1098 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
1099
1100         [GTK] Enable DOM4 events constructors in development builds
1101         https://bugs.webkit.org/show_bug.cgi?id=109471
1102
1103         Reviewed by Martin Robinson.
1104
1105         No new tests - the related tests now pass.
1106
1107         * GNUmakefile.features.am.in: Add the feature define for the DOM4 events
1108         constructors feature, its value defaulting to 0. This value is overridden
1109         with 1 in development builds, effectively enabling the feature.
1110
1111 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
1112
1113         Unreviewed build fix for the GTK port after r142595.
1114         Adding the TextureMapperFPSCounter files to the list of build targets
1115         in case of using the OpenGL texture mapper.
1116
1117         * GNUmakefile.list.am:
1118
1119 2013-02-12  Andrey Kosyakov  <caseq@chromium.org>
1120
1121         Web Inspector: fix closure compiler warnings in extension server and API
1122         https://bugs.webkit.org/show_bug.cgi?id=109563
1123
1124         Reviewed by Vsevolod Vlasov.
1125
1126         * inspector/front-end/ExtensionAPI.js: drive-by: make sure we fail if extensionServer is not defined in outer scope.
1127         * inspector/front-end/ExtensionServer.js:
1128         (WebInspector.ExtensionServer.prototype.):
1129         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1130         * inspector/front-end/externs.js: add extensionServer
1131
1132 2013-02-12  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1133
1134         Unreviewed. Fix !ENABLE(INSPECTOR) builds after r142575
1135
1136         * inspector/InspectorInstrumentation.h:
1137         (WebCore::InspectorInstrumentation::willDispatchEvent):
1138
1139 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
1140
1141         Web Inspector: move showWhitespace option into experiments
1142         https://bugs.webkit.org/show_bug.cgi?id=109552
1143
1144         Reviewed by Vsevolod Vlasov.
1145
1146         Remove "show whitespace" setting and add it to experiments.
1147
1148         No new tests: fixed an existing test to verify changes.
1149
1150         * English.lproj/localizedStrings.js:
1151         * inspector/front-end/DefaultTextEditor.js:
1152         (WebInspector.TextEditorMainPanel):
1153         (WebInspector.TextEditorMainPanel.prototype.wasShown):
1154         (WebInspector.TextEditorMainPanel.prototype.willHide):
1155         * inspector/front-end/Settings.js:
1156         (WebInspector.ExperimentsSettings):
1157         * inspector/front-end/SettingsScreen.js:
1158         (WebInspector.GenericSettingsTab):
1159
1160 2013-02-12  Tamas Czene  <tczene@inf.u-szeged.hu>
1161
1162         Add error checking into OpenCL version of SVG filters.
1163         https://bugs.webkit.org/show_bug.cgi?id=107444
1164
1165         Reviewed by Zoltan Herczeg.
1166
1167         In case of an error the program runs through all the remaining filters by doing nothing. 
1168         After that deletes the results of every filter and starts software rendering.
1169
1170         * platform/graphics/filters/FilterEffect.cpp:
1171         (WebCore):
1172         (WebCore::FilterEffect::applyAll): At software rendering this is a simple inline methode, but at OpenCL rendering it releases OpenCL things. If we have an error remove filter's results and start software rendering.
1173         (WebCore::FilterEffect::clearResultsRecursive):
1174         (WebCore::FilterEffect::openCLImageToImageBuffer):
1175         (WebCore::FilterEffect::createOpenCLImageResult):
1176         (WebCore::FilterEffect::transformResultColorSpace):
1177         * platform/graphics/filters/FilterEffect.h:
1178         (FilterEffect):
1179         (WebCore::FilterEffect::applyAll):
1180         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
1181         (WebCore::FilterContextOpenCL::isFailed):
1182         (WebCore):
1183         (WebCore::FilterContextOpenCL::freeResources):
1184         (WebCore::FilterContextOpenCL::destroyContext):
1185         (WebCore::FilterContextOpenCL::compileTransformColorSpaceProgram):
1186         (WebCore::FilterContextOpenCL::openCLTransformColorSpace):
1187         (WebCore::FilterContextOpenCL::compileProgram):
1188         (WebCore::FilterContextOpenCL::freeResource):
1189         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
1190         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
1191         (WebCore::FilterContextOpenCL::setInError):
1192         (WebCore::FilterContextOpenCL::inError):
1193         (FilterContextOpenCL):
1194         (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
1195         (WebCore::FilterContextOpenCL::RunKernel::addArgument):
1196         (WebCore::FilterContextOpenCL::RunKernel::run):
1197         (RunKernel):
1198         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
1199         (WebCore::FilterContextOpenCL::compileFEColorMatrix):
1200         (WebCore::FEColorMatrix::platformApplyOpenCL):
1201         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
1202         (WebCore::FilterContextOpenCL::compileFETurbulence):
1203         (WebCore::FETurbulence::platformApplyOpenCL):
1204         * rendering/svg/RenderSVGResourceFilter.cpp:
1205         (WebCore::RenderSVGResourceFilter::postApplyResource):
1206
1207 2013-02-12  Huang Dongsung  <luxtella@company100.net>
1208
1209         [TexMap] Apply frames-per-second debug counter to WK1.
1210         https://bugs.webkit.org/show_bug.cgi?id=109540
1211
1212         Reviewed by Noam Rosenthal.
1213
1214         r142524 implemented frames-per-second debug counter on WK2. This patch
1215         applies frames-per-second debug counter to WK1 also.
1216
1217         Visual debugging feature, no need for new tests.
1218
1219         * CMakeLists.txt:
1220         * GNUmakefile.list.am:
1221         * Target.pri:
1222         * platform/graphics/texmap/TextureMapper.h:
1223         * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added.
1224         (WebCore):
1225         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
1226         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
1227         * platform/graphics/texmap/TextureMapperFPSCounter.h: Added.
1228         (WebCore):
1229         (TextureMapperFPSCounter):
1230         * platform/graphics/texmap/TextureMapperGL.cpp:
1231         (WebCore):
1232         (WebCore::TextureMapperGL::drawNumber):
1233           Rename from drawRepaintCounter to drawNumber.
1234         * platform/graphics/texmap/TextureMapperGL.h:
1235         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1236         (WebCore::TextureMapperImageBuffer::drawNumber):
1237         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1238         (TextureMapperImageBuffer):
1239         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1240         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1241         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1242         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
1243         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1244           Move frames-per-second debug counter code to TextureMapperFPSCounter.
1245         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
1246         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1247         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1248         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1249
1250 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
1251
1252         Web Inspector: stack trace is cut at native bind if inspector is closed
1253         https://bugs.webkit.org/show_bug.cgi?id=109427
1254
1255         Reviewed by Pavel Feldman.
1256
1257         Only top frame is collected instead of full stack trace when inspector
1258         front-end is closed to avoid expensive operations when exceptions are
1259         thrown.
1260
1261         Test: http/tests/inspector-enabled/console-exception-while-no-inspector.html
1262
1263         * inspector/InspectorConsoleAgent.cpp:
1264         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1265
1266 2013-02-12  Kent Tamura  <tkent@chromium.org>
1267
1268         INPUT_MULTIPLE_FIELDS_UI: Mouse click not on sub-fields in multiple fields input  should not move focus
1269         https://bugs.webkit.org/show_bug.cgi?id=109544
1270
1271         Reviewed by Kentaro Hara.
1272
1273         This is similar to Bug 108914, "Should not move focus if the element
1274         already has focus." We fixed a focus() case in Bug 108914. However we
1275         still have the problem in a case of focusing by mouse click.
1276
1277         The fix for Bug 108914 intercepted focus() function to change the
1278         behavior. However focus-by-click doesn't call focus(), but calls
1279         FocusController::setFocusedNode. To fix this problem, we introduce
1280         oldFocusedNode argument to handleFocusEvent, and
1281         BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent restores the
1282         focus to oldFocusedNode if oldFocusedNode is one of sub-fields.
1283         handleFocusEvent is called whenever the focused node is changed.
1284
1285         We don't need InputType::willCancelFocus any more because the new code
1286         in handleFocusEvent covers it.
1287
1288         Tests: Update fast/forms/time-multiple-fields/time-multiple-fields-focus.html.
1289
1290         * html/HTMLTextFormControlElement.h:
1291         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
1292         Add oldFocusedNode argument.
1293         * html/HTMLTextFormControlElement.cpp:
1294         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1295         Pass oldFocusedNode to handleFocusEvent.
1296
1297         * html/HTMLInputElement.h:
1298         (HTMLInputElement):
1299          - Add oldFocusedNode argument to handleFocusEvent.
1300          - Remove focus() override.
1301         * html/HTMLInputElement.cpp: Remove focus() override.
1302         (WebCore::HTMLInputElement::handleFocusEvent):
1303         Pass oldFocusedNode to InputType::handleFocusEvent.
1304         * html/InputType.cpp: Remove willCancelFocus.
1305         (WebCore::InputType::handleFocusEvent):
1306         Add oldFocusedNode argument.
1307         * html/InputType.h:
1308         (InputType): Ditto.
1309         * html/PasswordInputType.cpp:
1310         (WebCore::PasswordInputType::handleFocusEvent): Ditto.
1311         * html/PasswordInputType.h:
1312         (PasswordInputType): Ditto.
1313
1314         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1315         (BaseMultipleFieldsDateAndTimeInputType):
1316         Remove willCancelFocus, and add oldFocusedNode argument to handleFocusEvent.
1317         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1318         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
1319         Pass oldFocusedNode to DateTimeEditElement::focusByOwner if the
1320         direction is FocusDirectionNone.
1321
1322         * html/shadow/DateTimeEditElement.h:
1323         (DateTimeEditElement): Add oldFocusedNode argument to focusByOwner.
1324         * html/shadow/DateTimeEditElement.cpp:
1325         (WebCore::DateTimeEditElement::focusByOwner):
1326         If oldFocusedNode is one of sub-fields, focus on it again.
1327
1328 2013-02-12  Takashi Sakamoto  <tasak@google.com>
1329
1330         [Refactoring] Make m_selectorChecker in StyleResolver an on-stack object.
1331         https://bugs.webkit.org/show_bug.cgi?id=108595
1332
1333         Reviewed by Eric Seidel.
1334
1335         StyleResolver uses SelectorChecker's mode to change its resolving mode.
1336         However it is a state of StyleResolver. StyleResolver should have the
1337         mode and make SelectorChecker instance on a stack while required.
1338
1339         No new tests, just refactoring.
1340
1341         * css/SelectorChecker.cpp:
1342         (WebCore::SelectorChecker::fastCheckRightmostSelector):
1343         (WebCore::SelectorChecker::fastCheck):
1344         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
1345         (WebCore::SelectorChecker::matchesFocusPseudoClass):
1346         Changed to static class function, because these methods never use
1347         "this".
1348         (WebCore):
1349         * css/SelectorChecker.h:
1350         (SelectorChecker):
1351         * css/StyleResolver.cpp:
1352         (WebCore::StyleResolver::StyleResolver):
1353         (WebCore::StyleResolver::collectMatchingRules):
1354         Now, matchesFocusPseudoClass is not a static method of
1355         SelectorChecker, so replaced "m_selectorChecker." with
1356         "SelectorChecker::".
1357         (WebCore::StyleResolver::sortAndTransferMatchedRules):
1358         (WebCore::StyleResolver::collectMatchingRulesForList):
1359         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1360         (WebCore::StyleResolver::matchUARules):
1361         (WebCore::StyleResolver::adjustRenderStyle):
1362         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1363         Use m_mode instead of m_selectorChecker.mode().
1364         Also use document()->inQuirksMode() instead of
1365         m_selectoChecker.strictParsing().
1366         (WebCore::StyleResolver::ruleMatches):
1367         (WebCore::StyleResolver::checkRegionSelector):
1368         Created an on-stack SelectorChecker object and used it to check
1369         selectors.
1370         * css/StyleResolver.h:
1371         (WebCore::StyleResolver::State::State):
1372         Added m_mode, this keeps m_selectorChecker's mode.
1373         (State):
1374         (StyleResolver):
1375         Removed m_selectorChecker.
1376
1377 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
1378
1379         [Qt][EFL][WebGL] Minor refactoring of GraphicsSurface/GraphicsSurfaceGLX
1380         https://bugs.webkit.org/show_bug.cgi?id=108686
1381
1382         Reviewed by Noam Rosenthal.
1383
1384         Remove unused platformSurface()/m_platformSurface from GraphicsSurface.
1385         Move m_texture from GraphicsSurface to GLX GraphicsSurfacePrivate to match
1386         Win and Mac implementations.
1387
1388         No new tests, refactoring only.
1389
1390         * platform/graphics/surfaces/GraphicsSurface.cpp:
1391         (WebCore::GraphicsSurface::GraphicsSurface):
1392         * platform/graphics/surfaces/GraphicsSurface.h:
1393         (GraphicsSurface):
1394         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1395         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1396         (WebCore::GraphicsSurfacePrivate::swapBuffers):
1397         (WebCore::GraphicsSurfacePrivate::surface):
1398         (GraphicsSurfacePrivate):
1399         (WebCore::GraphicsSurfacePrivate::textureID):
1400         (WebCore::GraphicsSurfacePrivate::clear):
1401         (WebCore::GraphicsSurface::platformExport):
1402         (WebCore::GraphicsSurface::platformGetTextureID):
1403         (WebCore::GraphicsSurface::platformSwapBuffers):
1404         (WebCore::GraphicsSurface::platformCreate):
1405         (WebCore::GraphicsSurface::platformImport):
1406         (WebCore::GraphicsSurface::platformDestroy):
1407
1408 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
1409
1410         [EFL][WebGL] WebGL content is not painted after resizing the viewport.
1411         https://bugs.webkit.org/show_bug.cgi?id=106358
1412
1413         Reviewed by Noam Rosenthal.
1414
1415         When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
1416         clears the layer backing store and detaches the canvas surface from the layer. If the layer
1417         size is not changed then the canvas is not recreated. This leaves the canvas detached from
1418         the layer, but still referenced from m_surfaceBackingStores.
1419         Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
1420         surface already attached to the layer.
1421
1422         Test: fast/canvas/webgl/webgl-layer-update.html
1423
1424         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1425         (WebCore::CoordinatedGraphicsScene::setLayerState):
1426         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
1427         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1428
1429 2013-02-11  Eric Carlson  <eric.carlson@apple.com>
1430
1431         [Mac] Track language selection should be sticky
1432         https://bugs.webkit.org/show_bug.cgi?id=109466
1433
1434         Reviewed by Dean Jackson.
1435
1436         Choosing a text track from the caption menu should make that track's language the
1437         preferred caption language. Turning captions off from the menu should disable captions
1438         in videos loaded subsequently.
1439
1440         OS X has system support for these settings, so changes made by DRT should not change the
1441         settings on the user's system. Add support for all other ports in DRT only.
1442
1443         Test: media/track/track-user-preferences.html
1444
1445         * WebCore.exp.in: Export PageGroup::captionPreferences().
1446
1447         * html/HTMLMediaElement.cpp:
1448         (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
1449         (WebCore::HTMLMediaElement::attach): Ditto.
1450         (WebCore::HTMLMediaElement::detach): Ditto.
1451         (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
1452         (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
1453             preferredLanguageFromList change.
1454         (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
1455             caption language as appropriate.
1456
1457         * html/shadow/MediaControlElements.cpp:
1458         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
1459         (WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().
1460
1461         * html/shadow/MediaControlsApple.cpp:
1462         (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
1463
1464         * page/CaptionUserPreferences.h:
1465         (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
1466         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
1467         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
1468         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
1469         (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
1470         (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
1471         (WebCore::CaptionUserPreferences::testingMode): Ditto.
1472         (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
1473         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
1474
1475         * page/CaptionUserPreferencesMac.h:
1476         * page/CaptionUserPreferencesMac.mm:
1477         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
1478         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
1479         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
1480         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
1481             registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
1482         (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
1483             unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
1484         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
1485         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
1486         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
1487         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
1488
1489         * page/PageGroup.cpp:
1490         (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
1491             available from the caption preference object.
1492         (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
1493         (WebCore::PageGroup::userPrefersCaptions): Ditto.
1494         (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
1495         (WebCore::PageGroup::captionFontSizeScale): Ditto.
1496         * page/PageGroup.h:
1497
1498         * platform/Language.cpp:
1499         (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
1500             the system list.
1501         * platform/Language.h:
1502
1503         * testing/Internals.cpp:
1504         (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
1505         (WebCore::Internals::Internals): Enable caption testing mode so the user's system
1506             preferences are not modified.
1507
1508 2013-02-11  Huang Dongsung  <luxtella@company100.net>
1509
1510         Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
1511         https://bugs.webkit.org/show_bug.cgi?id=108922
1512
1513         Reviewed by Noam Rosenthal.
1514
1515         Currently, CoordinatedGraphicsScene has two methods to know contents
1516         size: setContentsSize() and setVisibleContentsRect(). Contents size is
1517         used when adjusting a scroll position, but adjustment is not needed
1518         because EFL and Qt platform code (currently PageViewportController)
1519         already adjusts a scroll position, and it is natural for each platform
1520         to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
1521         not know contents size.
1522
1523         In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
1524         to get CoordinatedGraphicsScene.
1525
1526         This patch can only be tested manually since there is no automated
1527         testing facilities for in-motion touch.
1528         Test: ManualTests/fixed-position.html
1529               ManualTests/nested-fixed-position.html
1530
1531         * platform/graphics/texmap/TextureMapperLayer.cpp:
1532         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
1533         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1534         (WebCore::CoordinatedGraphicsScene::setScrollPosition):
1535         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1536         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1537         (CoordinatedGraphicsScene):
1538
1539 2013-02-11  Huang Dongsung  <luxtella@company100.net>
1540
1541         Coordinated Graphics: remove the DidChangeScrollPosition message.
1542         https://bugs.webkit.org/show_bug.cgi?id=108051
1543
1544         Reviewed by Noam Rosenthal.
1545         Signed off for WebKit2 by Benjamin Poulain.
1546
1547         Currently, we use the DidChangeScrollPosition message to send the scroll
1548         position that WebCore used in this frame to UI Process. We had to have
1549         some member variables for the DidChangeScrollPosition message.
1550         However, we can send a scroll position via the DidRenderFrame message,
1551         because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
1552         updated at the moment of flushing. So we can remove the
1553         DidChangeScrollPosition message and some redundant member variables.
1554
1555         No tests. No change in behavior.
1556
1557         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1558         (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
1559         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1560         (CoordinatedGraphicsScene):
1561
1562 2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
1563
1564         Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
1565         https://bugs.webkit.org/show_bug.cgi?id=109534
1566
1567         Reviewed by Anders Carlsson.
1568
1569         * editing/DeleteButtonController.cpp:
1570         (WebCore::DeleteButtonController::show):
1571         * editing/Editor.cpp:
1572         (WebCore):
1573         * editing/Editor.h:
1574         (Editor):
1575         * loader/EmptyClients.h:
1576         (WebCore::EmptyEditorClient::shouldDeleteRange):
1577         (EmptyEditorClient):
1578         (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
1579         * page/EditorClient.h:
1580         (EditorClient):
1581
1582 2013-02-11  Hayato Ito  <hayato@chromium.org>
1583
1584         Factor EventContext and introduces MouseOrFocusEventContext.
1585         https://bugs.webkit.org/show_bug.cgi?id=109278
1586
1587         Reviewed by Dimitri Glazkov.
1588
1589         To supoort Touch event retargeting (bug 107800), we have to factor
1590         event retargeting code so that it can support not only MouseEvent or FocusEvent,
1591         but also other events.
1592
1593         This is the first attempt to refactor event retargeting code, a
1594         separated patch from bug 109156.  EventContext is now factored and
1595         MouseOrFocusEventContext was introduced to support MouseEvent or
1596         FocusEvent separately.
1597
1598         In following patches, I'll introduce TouchEventContext and
1599         TouchEventDispatchMediator to support Touch event retargeting.
1600
1601         No new tests. No change in functionality.
1602
1603         * dom/EventContext.cpp:
1604         (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
1605         (WebCore::EventContext::~EventContext):
1606         (WebCore):
1607         (WebCore::EventContext::handleLocalEvents):
1608         (WebCore::EventContext::isMouseOrFocusEventContext):
1609         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):  New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
1610         (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
1611         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
1612         (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
1613         * dom/EventContext.h:
1614         (EventContext):
1615         (WebCore::EventContext::node):
1616         (WebCore::EventContext::target):
1617         (WebCore::EventContext::currentTargetSameAsTarget):
1618         (WebCore):
1619         (MouseOrFocusEventContext):
1620         (WebCore::MouseOrFocusEventContext::relatedTarget):
1621         (WebCore::MouseOrFocusEventContext::setRelatedTarget):
1622         * dom/EventDispatcher.cpp:
1623         (WebCore::EventRelatedTargetAdjuster::adjust):
1624         (WebCore::EventDispatcher::adjustRelatedTarget):
1625         (WebCore::EventDispatcher::ensureEventPath):  Renamad from ensureEventAncestors. Use the DOM Core terminology.
1626         (WebCore::EventDispatcher::dispatchEvent):
1627         (WebCore::EventDispatcher::dispatchEventAtCapturing):
1628         (WebCore::EventDispatcher::dispatchEventAtTarget):
1629         (WebCore::EventDispatcher::dispatchEventAtBubbling):
1630         (WebCore::EventDispatcher::dispatchEventPostProcess):
1631         (WebCore::EventDispatcher::topEventContext):
1632         * dom/EventDispatcher.h:
1633         (EventRelatedTargetAdjuster):
1634         (EventDispatcher):
1635         * inspector/InspectorInstrumentation.cpp:
1636         (WebCore):
1637         (WebCore::eventHasListeners):
1638         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1639         * inspector/InspectorInstrumentation.h:
1640         (InspectorInstrumentation):
1641         (WebCore::InspectorInstrumentation::willDispatchEvent):
1642
1643 2013-02-11  peavo@outlook.com  <peavo@outlook.com>
1644
1645         [Curl] setCookiesFromDOM function does not save cookies to disk.
1646         https://bugs.webkit.org/show_bug.cgi?id=109285
1647
1648         Reviewed by Brent Fulgham.
1649
1650         Write cookies to disk by using the Curl easy api.
1651
1652         * platform/network/curl/CookieJarCurl.cpp:
1653         (WebCore::setCookiesFromDOM):Write cookie to disk.
1654         * platform/network/curl/ResourceHandleManager.cpp:
1655         (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
1656         (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
1657         * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
1658
1659 2013-02-11  Hayato Ito  <hayato@chromium.org>
1660
1661         Split each RuleSet and feature out from StyleResolver into its own class.
1662         https://bugs.webkit.org/show_bug.cgi?id=107777
1663
1664         Reviewed by Dimitri Glazkov.
1665
1666         Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
1667
1668         No tests. No change in behavior.
1669
1670         * CMakeLists.txt:
1671         * GNUmakefile.list.am:
1672         * Target.pri:
1673         * WebCore.gypi:
1674         * WebCore.xcodeproj/project.pbxproj:
1675         * css/CSSAllInOne.cpp:
1676         * css/DocumentRuleSets.cpp: Added.
1677         (WebCore):
1678         (WebCore::DocumentRuleSets::DocumentRuleSets):
1679         (WebCore::DocumentRuleSets::~DocumentRuleSets):
1680         (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
1681         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
1682         (WebCore::makeRuleSet): Ditto.
1683         (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
1684         (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
1685         (WebCore::DocumentRuleSets::collectFeatures): Ditto.
1686         (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
1687         * css/DocumentRuleSets.h: Added.
1688         (WebCore):
1689         (DocumentRuleSets):
1690         (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
1691         (WebCore::DocumentRuleSets::userStyle): Ditto.
1692         (WebCore::DocumentRuleSets::features): Ditto.
1693         (WebCore::DocumentRuleSets::sibling): Ditto.
1694         (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
1695         * css/StyleResolver.cpp:
1696         (WebCore::StyleResolver::StyleResolver):
1697         (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
1698         (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
1699         (WebCore::StyleResolver::matchUserRules): Ditto.
1700         (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
1701         (WebCore::StyleResolver::locateCousinList): Ditto.
1702         (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
1703         (WebCore::StyleResolver::locateSharedStyle): Ditto.
1704         (WebCore::StyleResolver::styleForPage): Ditto.
1705         (WebCore::StyleResolver::checkRegionStyle): Ditto.
1706         (WebCore::StyleResolver::applyProperty): Ditto.
1707         (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
1708         * css/StyleResolver.h:
1709         (WebCore::StyleResolver::scopeResolver):
1710         (StyleResolver):
1711         (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
1712         (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
1713         (WebCore::StyleResolver::usesFirstLineRules): Ditto.
1714         (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
1715         (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
1716         (WebCore::StyleResolver::hasSelectorForClass): Ditto.
1717         (WebCore::StyleResolver::hasSelectorForId): Ditto.
1718         * dom/DocumentStyleSheetCollection.cpp:
1719         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1720
1721 2013-02-11  Keishi Hattori  <keishi@webkit.org>
1722
1723         REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
1724         https://bugs.webkit.org/show_bug.cgi?id=109158
1725
1726         Reviewed by Kent Tamura.
1727
1728         The calendar picker button's icon and position where wrong when rtl.
1729
1730
1731         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
1732
1733         * Resources/pagepopups/calendarPicker.css:
1734         (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
1735         (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
1736         (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
1737         * Resources/pagepopups/calendarPicker.js:
1738         (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
1739         (YearMonthController.prototype._attachRightButtonsTo): Ditto.
1740
1741 2013-02-11  KwangYong Choi  <ky0.choi@samsung.com>
1742
1743         REGRESSION (r142549): Remove web intents code
1744         https://bugs.webkit.org/show_bug.cgi?id=109532
1745
1746         Reviewed by Nico Weber.
1747
1748         Remove remaning code related to web intents.
1749
1750         No new tests, no change on behavior.
1751
1752         * UseJSC.cmake:
1753         * bindings/js/JSIntentConstructor.cpp: Removed.
1754
1755 2013-02-11  Kenneth Russell  <kbr@google.com>
1756
1757         Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
1758         https://bugs.webkit.org/show_bug.cgi?id=109127
1759
1760         Reviewed by Dean Jackson.
1761
1762         No new tests. Built and tested WebKit and Chromium with this change.
1763
1764         * platform/graphics/ANGLEWebKitBridge.cpp:
1765         (WebCore):
1766             Define temporary typedef spanning int -> size_t change.
1767         (WebCore::getValidationResultValue):
1768         (WebCore::getSymbolInfo):
1769             Use temporary typedef.
1770
1771 2013-02-11  Kentaro Hara  <haraken@chromium.org>
1772
1773         [V8] ScheduledAction::m_context can be empty, so we shouldn't
1774         retrieve an Isolate by using m_context->GetIsolate()
1775         https://bugs.webkit.org/show_bug.cgi?id=109523
1776
1777         Reviewed by Adam Barth.
1778
1779         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
1780
1781         Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
1782         This can crash because ScheduledAction::m_context can be empty. Specifically,
1783         ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
1784         which can return an empty handle when a frame does not exist. In addition,
1785         'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
1786
1787         Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
1788
1789         No tests. The Chromium crash report doesn't provide enough information
1790         to reproduce the bug.
1791
1792         * bindings/v8/ScheduledAction.cpp:
1793         (WebCore::ScheduledAction::ScheduledAction):
1794         (WebCore):
1795         (WebCore::ScheduledAction::~ScheduledAction):
1796         * bindings/v8/ScheduledAction.h:
1797         (ScheduledAction):
1798         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1799         (WebCore::WindowSetTimeoutImpl):
1800         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1801         (WebCore::SetTimeoutOrInterval):
1802
1803 2013-02-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1804
1805         Build fix: r142549 broke EFL build
1806         https://bugs.webkit.org/show_bug.cgi?id=109527
1807
1808         Reviewed by Kentaro Hara.
1809
1810         No new tests, no change on behavior.
1811
1812         * CMakeLists.txt:
1813
1814 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1815
1816         REGRESSION (r142520?): Space no longer scrolls the page
1817         https://bugs.webkit.org/show_bug.cgi?id=109526
1818
1819         Reviewed by Tim Horton.
1820
1821         ScrollingTree::updateTreeFromStateNode() used to bail early when it had
1822         no children (no fixed or sticky elements), but that left updateAfterChildren()
1823         uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
1824         position.
1825
1826         * page/scrolling/ScrollingTree.cpp:
1827         (WebCore::ScrollingTree::updateTreeFromStateNode):
1828
1829 2013-02-11  Tim Horton  <timothy_horton@apple.com>
1830
1831         Remove extra early-return in FrameView::setScrollPosition
1832
1833         Rubber-stamped by Simon Fraser.
1834
1835         * page/FrameView.cpp:
1836         (WebCore::FrameView::setScrollPosition):
1837
1838 2013-02-11  Arko Saha  <arko@motorola.com>
1839
1840         [Microdata] Fix crash after r141034 in chromuim port
1841         https://bugs.webkit.org/show_bug.cgi?id=109514
1842
1843         Reviewed by Ryosuke Niwa.
1844
1845         Added V8SkipVTableValidation extended attribute to skip
1846         VTable validation check for DOMSettableTokenList interface.
1847
1848         This patch fixes below test failures:
1849         Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
1850                fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
1851                fast/dom/MicroData/element-with-empty-itemprop.html
1852                fast/dom/MicroData/itemprop-add-remove-tokens.html
1853                fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
1854                fast/dom/MicroData/itemprop-must-be-read-only.html
1855                fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
1856                fast/dom/MicroData/itemref-add-remove-tokens.html
1857                fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
1858                fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
1859                fast/dom/MicroData/itemref-must-be-read-only.html
1860                fast/dom/MicroData/itemtype-add-remove-tokens.html
1861                fast/dom/MicroData/itemtype-attribute-test.html
1862                fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
1863                fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
1864                fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
1865                fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
1866
1867         * html/DOMSettableTokenList.idl:
1868
1869 2013-02-11  Adam Barth  <abarth@webkit.org>
1870
1871         Load event fires too early with threaded HTML parser (take 2)
1872         https://bugs.webkit.org/show_bug.cgi?id=109485
1873
1874         Reviewed by Eric Seidel.
1875
1876         This patch restores the code that was removed in
1877         http://trac.webkit.org/changeset/142492 and adds code to
1878         DocumentLoader.cpp to avoid the regression.
1879
1880         * dom/Document.cpp:
1881         (WebCore::Document::hasActiveParser):
1882         (WebCore::Document::decrementActiveParserCount):
1883         * loader/DocumentLoader.cpp:
1884         (WebCore::DocumentLoader::isLoadingInAPISense):
1885
1886 2013-02-11  Eric Seidel  <eric@webkit.org>
1887
1888         Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
1889         https://bugs.webkit.org/show_bug.cgi?id=109502
1890
1891         Reviewed by Tony Gentilcore.
1892
1893         Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
1894         This restores us to the peacefull world pre-NEW_XML.
1895
1896         * html/parser/BackgroundHTMLParser.cpp:
1897         (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
1898         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1899         * html/parser/HTMLDocumentParser.cpp:
1900         (WebCore::tokenizerStateForContextElement):
1901         (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
1902         (WebCore::HTMLDocumentParser::pumpTokenizer):
1903         * html/parser/HTMLTokenizer.cpp:
1904         (WebCore::isEndTagBufferingState):
1905         (WebCore):
1906         (WebCore::HTMLTokenizer::reset):
1907         (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
1908         (WebCore::HTMLTokenizer::nextToken):
1909         (WebCore::HTMLTokenizer::updateStateFor):
1910         * html/parser/HTMLTokenizer.h:
1911         (HTMLTokenizer):
1912         (WebCore::HTMLTokenizer::create):
1913         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
1914         (WebCore::HTMLTokenizer::emitEndOfFile):
1915         * html/parser/HTMLTreeBuilder.cpp:
1916         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1917         (WebCore::HTMLTreeBuilder::processEndTag):
1918         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1919         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1920         (WebCore::HTMLTreeBuilder::processScriptStartTag):
1921         * html/parser/TextViewSourceParser.cpp:
1922         (WebCore::TextViewSourceParser::TextViewSourceParser):
1923
1924 2013-02-11  Kentaro Hara  <haraken@chromium.org>
1925
1926         Build fix after r142528
1927         https://bugs.webkit.org/show_bug.cgi?id=109520
1928
1929         Reviewed by Eric Seidel.
1930
1931         r142528 changed GIFImageReader from a struct to a class.
1932         We also need to fix a forward declaration.
1933
1934         No tests.
1935
1936         * platform/image-decoders/gif/GIFImageDecoder.h:
1937
1938 2013-02-11  Nico Weber  <thakis@chromium.org>
1939
1940         Remove web intents code
1941         https://bugs.webkit.org/show_bug.cgi?id=109501
1942
1943         Reviewed by Eric Seidel.
1944
1945         See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
1946
1947         * DerivedSources.make:
1948         * Modules/intents/DOMWindowIntents.cpp: Removed.
1949         * Modules/intents/DOMWindowIntents.h: Removed.
1950         * Modules/intents/DOMWindowIntents.idl: Removed.
1951         * Modules/intents/DeliveredIntent.cpp: Removed.
1952         * Modules/intents/DeliveredIntent.h: Removed.
1953         * Modules/intents/DeliveredIntent.idl: Removed.
1954         * Modules/intents/Intent.cpp: Removed.
1955         * Modules/intents/Intent.h: Removed.
1956         * Modules/intents/Intent.idl: Removed.
1957         * Modules/intents/IntentRequest.cpp: Removed.
1958         * Modules/intents/IntentRequest.h: Removed.
1959         * Modules/intents/IntentResultCallback.h: Removed.
1960         * Modules/intents/IntentResultCallback.idl: Removed.
1961         * Modules/intents/NavigatorIntents.cpp: Removed.
1962         * Modules/intents/NavigatorIntents.h: Removed.
1963         * Modules/intents/NavigatorIntents.idl: Removed.
1964         * WebCore.gyp/WebCore.gyp:
1965         * WebCore.gypi:
1966         * bindings/generic/RuntimeEnabledFeatures.cpp:
1967         (WebCore):
1968         * bindings/generic/RuntimeEnabledFeatures.h:
1969         (RuntimeEnabledFeatures):
1970         * bindings/v8/custom/V8IntentCustom.cpp: Removed.
1971         * html/HTMLElementsAllInOne.cpp:
1972         * html/HTMLIntentElement.cpp: Removed.
1973         * html/HTMLIntentElement.h: Removed.
1974         * html/HTMLIntentElement.idl: Removed.
1975         * loader/EmptyClients.cpp:
1976         * loader/EmptyClients.h:
1977         (EmptyFrameLoaderClient):
1978         * loader/FrameLoaderClient.h:
1979         (WebCore):
1980         * page/DOMWindow.idl:
1981
1982 2013-02-11  Eric Seidel  <eric@webkit.org>
1983
1984         Fix Mac build after http://trac.webkit.org/changeset/142535.
1985
1986         Unreviewed build fix.
1987
1988         * html/parser/HTMLTokenizer.h:
1989         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1990
1991 2013-02-11  David Farler  <dfarler@apple.com>
1992
1993         Make WebCore Derived Sources work with SDK identifiers too
1994         https://bugs.webkit.org/show_bug.cgi?id=109324
1995
1996         Reviewed by Sam Weinig.
1997
1998         * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
1999
2000 2013-02-11  Zhenyao Mo  <zmo@google.com>
2001
2002         WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
2003         https://bugs.webkit.org/show_bug.cgi?id=109508
2004
2005         Reviewed by Kenneth Russell.
2006
2007         * html/canvas/WebGLRenderingContext.cpp:
2008         (WebCore):
2009         (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
2010
2011 2013-02-11  Emil A Eklund  <eae@chromium.org>
2012
2013         Change RenderFrameSet::paint to use m-rows/m_cols directly.
2014         https://bugs.webkit.org/show_bug.cgi?id=108503
2015
2016         Reviewed by Eric Seidel.
2017
2018         Test: fast/frames/invalid-frameset.html
2019
2020         * rendering/RenderFrameSet.cpp:
2021         (WebCore::RenderFrameSet::paint):
2022
2023 2013-02-11  Yong Li  <yoli@rim.com>
2024
2025         XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
2026         https://bugs.webkit.org/show_bug.cgi?id=105348
2027
2028         Reviewed by Alexey Proskuryakov.
2029
2030         Let resume() clear the defer flag and return if there is deferred events to dispatch.
2031
2032         No new tests as this should not affect existing cross-platform behavior. It should be
2033         OK as long as it doesn't break anything.
2034
2035         * xml/XMLHttpRequestProgressEventThrottle.cpp:
2036         (WebCore::XMLHttpRequestProgressEventThrottle::resume):
2037
2038 2013-02-11  Eric Seidel  <eric@webkit.org>
2039
2040         Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
2041         https://bugs.webkit.org/show_bug.cgi?id=109499
2042
2043         Reviewed by Adam Barth.
2044
2045         For great justice.  And sanity.
2046         Epic amount of template code deleted.
2047
2048         * GNUmakefile.list.am:
2049         * Target.pri:
2050         * WebCore.gypi:
2051         * WebCore.vcproj/WebCore.vcproj:
2052         * WebCore.vcxproj/WebCore.vcxproj:
2053         * WebCore.vcxproj/WebCore.vcxproj.filters:
2054         * WebCore.xcodeproj/project.pbxproj:
2055         * html/parser/HTMLTokenizer.cpp:
2056         (WebCore::HTMLTokenizer::HTMLTokenizer):
2057         * html/parser/HTMLTokenizer.h:
2058         (HTMLTokenizer):
2059         (Checkpoint):
2060         (WebCore::HTMLTokenizer::state):
2061         (WebCore::HTMLTokenizer::setState):
2062         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
2063         (WebCore::HTMLTokenizer::bufferCharacter):
2064         (WebCore::HTMLTokenizer::emitAndResumeIn):
2065         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
2066         (WebCore::HTMLTokenizer::emitEndOfFile):
2067         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
2068         * xml/parser/MarkupTokenizerBase.h: Removed.
2069
2070 2013-02-11  Anton Vayvod  <avayvod@chromium.org>
2071
2072         [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
2073         a change to follow.
2074         https://bugs.webkit.org/show_bug.cgi?id=109054
2075
2076         Preparational change to combine narrow descendants of the same autosizing cluster into
2077         groups by the width difference between the descendant and the block containing all text of
2078         the parent autosizing cluster. The groups will be autosized with the same multiplier.
2079
2080         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
2081         a large margin individually applied (via a CSS selector), causing them all to individually
2082         appear narrower than their enclosing blockContainingAllText. Rather than making each of
2083         these paragraphs into a separate cluster, we eventually want to be able to merge them back
2084         together into one (or a few) descendant clusters.
2085
2086         Reviewed by Julien Chaffraix.
2087
2088         No behavioral changes thus no new tests or test changes.
2089
2090         * rendering/TextAutosizer.cpp:
2091         (TextAutosizingClusterInfo): Vector of narrow descendants.
2092         (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
2093         (WebCore::TextAutosizer::processContainer):
2094
2095             Remember narrow descendants of the parent cluster for later processing.
2096
2097 2013-02-11  Enrica Casucci  <enrica@apple.com>
2098
2099         Add ENABLE_DELETION_UI to control the use of the deletion UI.
2100         https://bugs.webkit.org/show_bug.cgi?id=109463.
2101
2102         Reviewed by Ryosuke Niwa.
2103         
2104         This patch adds #if ENABLE(DELETION_UI) in every spot where
2105         DeleteButtonController is used. This class is now only instantiated
2106         if the feature is enabled. I've also done some cleanup in the
2107         DeleteButtonController class, removing unused methods and making
2108         private some methods only used internally to the class.
2109         Both DeleteButtonController and DeleteButton classes are now excluded
2110         from the compilation if the feature is not enabled.
2111
2112         No new tests, no change of functionality.
2113
2114         * dom/ContainerNode.cpp:
2115         (WebCore::ContainerNode::cloneChildNodes):
2116         * editing/CompositeEditCommand.cpp:
2117         (WebCore::EditCommandComposition::unapply):
2118         (WebCore::EditCommandComposition::reapply):
2119         (WebCore::CompositeEditCommand::apply):
2120         * editing/DeleteButton.cpp:
2121         * editing/DeleteButtonController.cpp:
2122         * editing/DeleteButtonController.h: Some cleanup.
2123         (WebCore::DeleteButtonController::enabled): Made private.
2124         * editing/EditCommand.cpp:
2125         (WebCore::EditCommand::EditCommand):
2126         * editing/Editor.cpp:
2127         (WebCore::Editor::notifyComponentsOnChangedSelection):
2128         (WebCore::Editor::Editor):
2129         (WebCore::Editor::rangeForPoint):
2130         (WebCore::Editor::deviceScaleFactorChanged):
2131         * editing/Editor.h:
2132         * editing/htmlediting.cpp: avoidIntersectionWithNode is
2133         used only if the feature is enabled.
2134         * editing/htmlediting.h:
2135         * editing/markup.cpp:
2136         (WebCore::createMarkup):
2137         (WebCore::createFragmentFromNodes):
2138         * rendering/RenderTable.cpp: Removed unnecessary include
2139         fo DeleteButtonController.h
2140
2141 2013-02-11  Rafael Weinstein  <rafaelw@chromium.org>
2142
2143         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
2144         https://bugs.webkit.org/show_bug.cgi?id=109338
2145
2146         Reviewed by Adam Barth.
2147
2148         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
2149         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
2150
2151         Tests added to html5lib.
2152
2153         * html/parser/HTMLTreeBuilder.cpp:
2154         (WebCore):
2155         (WebCore::HTMLTreeBuilder::popAllTemplates):
2156         (WebCore::HTMLTreeBuilder::processEndTag):
2157         (WebCore::HTMLTreeBuilder::processEndOfFile):
2158         * html/parser/HTMLTreeBuilder.h:
2159         (HTMLTreeBuilder):
2160
2161 2013-02-11  Andreas Kling  <akling@apple.com>
2162
2163         RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
2164         <http://webkit.org/b/109354>
2165
2166         Reviewed by Eric Seidel.
2167
2168         254 KB progression on Membuster3.
2169
2170         * rendering/RenderText.cpp:
2171         (WebCore::RenderText::isAllCollapsibleWhitespace):
2172
2173 2013-02-11  Alpha Lam  <hclam@chromium.org>
2174
2175         Fix code style violations in GIFImageReader.{cc|h}
2176         https://bugs.webkit.org/show_bug.cgi?id=109007
2177
2178         Reviewed by Stephen White.
2179
2180         This is just a style clean up for GIFImageReader.{cc|h}.
2181
2182         There's going to be a lot changes in these two files and style check
2183         will add a lot of noise in later reviews. Fix style problems first.
2184
2185         There is no change in logic at all. Just style fixes.
2186
2187         No new tests.
2188
2189         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2190         (WebCore::GIFImageDecoder::frameCount):
2191         (WebCore::GIFImageDecoder::repetitionCount):
2192         (WebCore::GIFImageDecoder::haveDecodedRow):
2193         (WebCore::GIFImageDecoder::initFrameBuffer):
2194         * platform/image-decoders/gif/GIFImageReader.cpp:
2195         (GIFImageReader::outputRow):
2196         (GIFImageReader::doLZW):
2197         (GIFImageReader::read):
2198         * platform/image-decoders/gif/GIFImageReader.h:
2199         (GIFFrameContext):
2200         (GIFFrameContext::GIFFrameContext):
2201         (GIFFrameContext::~GIFFrameContext):
2202         (GIFImageReader::GIFImageReader):
2203         (GIFImageReader::~GIFImageReader):
2204         (GIFImageReader):
2205         (GIFImageReader::imagesCount):
2206         (GIFImageReader::loopCount):
2207         (GIFImageReader::globalColormap):
2208         (GIFImageReader::globalColormapSize):
2209         (GIFImageReader::frameContext):
2210
2211 2013-02-11  Bem Jones-Bey  <bjonesbe@adobe.com>
2212
2213         [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
2214         https://bugs.webkit.org/show_bug.cgi?id=106927
2215
2216         Reviewed by Julien Chaffraix.
2217
2218         When the position on a shape outside causes a float to spill out into
2219         another block than it's container, it was not being drawn correctly. It
2220         became apparent that in order to fix this properly, the approach to
2221         positioning shape outsides and floats needed to be changed. The new
2222         approach also fixes some other outstanding issues, like hit detection.
2223
2224         When a float has a shape outside, inline and float layout happens
2225         using the exclusion shape bounds instead of the float's box.  The
2226         effect of this is that the float itself no longer has any effect on
2227         layout, both with respect to positioning of the float's siblings as
2228         well as positioning the float's box. This means that when the float is
2229         positioned, it is the shape's box that must obey the positioning rules
2230         for floats. When the shape is given a position relative to the float's
2231         box, the rules for float positioning determine where the shape sits
2232         in the parent, causing the float's box to be offset by the position of
2233         the shape. Since the float's box does not affect layout (due to the
2234         shape), this is similar to relative positioning in that the offset is
2235         a paint time occurrence.
2236
2237         So the new approach is to implement positioning of shape outside on
2238         floats similar to how relative positioning is implemented, using a
2239         RenderLayer.
2240
2241         This is also tested by the existing tests for shape outside on floats positioning.
2242
2243         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
2244
2245         * rendering/ExclusionShapeOutsideInfo.h:
2246         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
2247         (ExclusionShapeOutsideInfo):
2248         * rendering/LayoutState.cpp:
2249         (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
2250         * rendering/RenderBlock.cpp:
2251         (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
2252         (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
2253         (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
2254         (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
2255         (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
2256         (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
2257         * rendering/RenderBlock.h:
2258         (RenderBlock): Remove old positioning implementation.
2259         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
2260         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
2261         * rendering/RenderBox.cpp:
2262         (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
2263         (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
2264         (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2265         (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
2266         * rendering/RenderBox.h: Make floats with shape outside get a layer.
2267         * rendering/RenderBoxModelObject.cpp:
2268         (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
2269             positioning offset + offset from shape outside on floats.
2270         * rendering/RenderBoxModelObject.h:
2271         (RenderBoxModelObject): Add paintOffset method.
2272         * rendering/RenderInline.cpp:
2273         (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2274         (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2275         (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
2276         * rendering/RenderLayer.cpp:
2277         (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
2278         (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
2279         * rendering/RenderLayer.h:
2280         (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
2281             in flow positioning, it also reflects shape outside position on floats.
2282         (RenderLayer):
2283         * rendering/RenderObject.h:
2284         (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
2285         * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
2286
2287 2013-02-11  Tim Horton  <timothy_horton@apple.com>
2288
2289         FrameView::setScrollPosition should clamp scroll position before handing it to
2290         ScrollingCoordinator instead of depending on ScrollView to do this
2291         https://bugs.webkit.org/show_bug.cgi?id=109497
2292         <rdar://problem/12631789>
2293
2294         Reviewed by Simon Fraser.
2295
2296         Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
2297         bail out if we've already scrolled to the clamped scroll position.
2298
2299         Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
2300
2301         * page/FrameView.cpp:
2302         (WebCore::FrameView::setScrollPosition):
2303
2304 2013-02-11  Adam Barth  <abarth@webkit.org>
2305
2306         The threaded HTML parser should pass all the fast/parser tests
2307         https://bugs.webkit.org/show_bug.cgi?id=109486
2308
2309         Reviewed by Tony Gentilcore.
2310
2311         This patch fixes the last two test failures in fast/parser, which were
2312         crashes caused by not having a tokenizer when document.close() was
2313         called. (The tokenizer is created lazily by calls to document.write,
2314         which might not happen before document.close).
2315
2316         fast/parser/document-close-iframe-load.html
2317         fast/parser/document-close-nested-iframe-load.html
2318
2319         In addition, I've added a new test to make sure we flush the tokenizer
2320         properly in these cases.
2321
2322         Test: fast/parser/document-close-iframe-load-partial-entity.html
2323
2324         * html/parser/HTMLDocumentParser.cpp:
2325         (WebCore::HTMLDocumentParser::prepareToStopParsing):
2326         (WebCore::HTMLDocumentParser::pumpTokenizer):
2327
2328 2013-02-11  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2329
2330         [texmap] Implement frames-per-second debug counter
2331         https://bugs.webkit.org/show_bug.cgi?id=107942
2332
2333         Reviewed by Noam Rosenthal.
2334
2335         Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
2336         where <interval> is the period in seconds (i.e. =1.5) between FPS
2337         updates on screen. It is measured by counting
2338         CoordinatedGraphicsScene::paintTo* calls and is painted using
2339         drawRepaintCounter() after TextureMapperLayer has finished painting its
2340         contents.
2341
2342         Visual debugging feature, no need for new tests.
2343
2344         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2345         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2346         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2347         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
2348         (WebCore::CoordinatedGraphicsScene::updateFPS):
2349         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2350
2351 2013-02-11  Eric Seidel  <eric@webkit.org>
2352
2353         Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
2354         https://bugs.webkit.org/show_bug.cgi?id=109483
2355
2356         Reviewed by Adam Barth.
2357
2358         This deletes an epic amount of template yuck, as well as removes
2359         a vtable !?! from HTMLToken.
2360
2361         This paves the way for further cleanup of HTMLToken now that we
2362         can see the whole object at once.
2363         We'll also probably re-create an HTMLToken.cpp again, now that we're
2364         free from the chains of template nonsense.
2365
2366         * GNUmakefile.list.am:
2367         * Target.pri:
2368         * WebCore.gypi:
2369         * WebCore.vcproj/WebCore.vcproj:
2370         * WebCore.vcxproj/WebCore.vcxproj:
2371         * WebCore.vcxproj/WebCore.vcxproj.filters:
2372         * WebCore.xcodeproj/project.pbxproj:
2373         * html/parser/HTMLToken.h:
2374         (WebCore::findAttributeInVector):
2375         (WebCore):
2376         (HTMLToken):
2377         (Attribute):
2378         (Range):
2379         (WebCore::HTMLToken::HTMLToken):
2380         (WebCore::HTMLToken::clear):
2381         (WebCore::HTMLToken::isUninitialized):
2382         (WebCore::HTMLToken::type):
2383         (WebCore::HTMLToken::makeEndOfFile):
2384         (WebCore::HTMLToken::startIndex):
2385         (WebCore::HTMLToken::endIndex):
2386         (WebCore::HTMLToken::setBaseOffset):
2387         (WebCore::HTMLToken::end):
2388         (WebCore::HTMLToken::data):
2389         (WebCore::HTMLToken::isAll8BitData):
2390         (WebCore::HTMLToken::name):
2391         (WebCore::HTMLToken::appendToName):
2392         (WebCore::HTMLToken::nameString):
2393         (WebCore::HTMLToken::selfClosing):
2394         (WebCore::HTMLToken::setSelfClosing):
2395         (WebCore::HTMLToken::beginStartTag):
2396         (WebCore::HTMLToken::beginEndTag):
2397         (WebCore::HTMLToken::addNewAttribute):
2398         (WebCore::HTMLToken::beginAttributeName):
2399         (WebCore::HTMLToken::endAttributeName):
2400         (WebCore::HTMLToken::beginAttributeValue):
2401         (WebCore::HTMLToken::endAttributeValue):
2402         (WebCore::HTMLToken::appendToAttributeName):
2403         (WebCore::HTMLToken::appendToAttributeValue):
2404         (WebCore::HTMLToken::attributes):
2405         (WebCore::HTMLToken::eraseValueOfAttribute):
2406         (WebCore::HTMLToken::ensureIsCharacterToken):
2407         (WebCore::HTMLToken::characters):
2408         (WebCore::HTMLToken::appendToCharacter):
2409         (WebCore::HTMLToken::comment):
2410         (WebCore::HTMLToken::beginComment):
2411         (WebCore::HTMLToken::appendToComment):
2412         (WebCore::HTMLToken::eraseCharacters):
2413         * html/parser/HTMLTokenTypes.h:
2414         * html/parser/XSSAuditor.h:
2415         * xml/parser/MarkupTokenBase.h: Removed.
2416
2417 2013-02-11  Gavin Barraclough  <barraclough@apple.com>
2418
2419         PluginProcess should quit immediately if idle in response to low-memory notifications
2420         https://bugs.webkit.org/show_bug.cgi?id=109103
2421         <rdar://problem/12679827>
2422
2423         Reviewed by Brady Eidson.
2424
2425         This patch allows a process to set a custom callback for low memory warnings
2426         (defaulting to the current behaviour, as implemented in releaseMemory).
2427
2428         * platform/MemoryPressureHandler.cpp:
2429         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2430             - Initialize m_lowMemoryHandler to releaseMemory.
2431         (WebCore::MemoryPressureHandler::install):
2432         (WebCore::MemoryPressureHandler::uninstall):
2433         (WebCore::MemoryPressureHandler::holdOff):
2434             - Cleaned up spacing.
2435         (WebCore::MemoryPressureHandler::releaseMemory):
2436             - Added null implementation for non-Mac builds.
2437         * platform/MemoryPressureHandler.h:
2438         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
2439             - Added method to set m_lowMemoryHandler.
2440         * platform/mac/MemoryPressureHandlerMac.mm:
2441         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2442             - Changed to call releaseMemory via m_lowMemoryHandler.
2443
2444 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
2445
2446         REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
2447         https://bugs.webkit.org/show_bug.cgi?id=104276
2448         <rdar://problem/12827187>
2449
2450         Reviewed by Tim Horton.
2451
2452         When committing new scrolling tree state, if the root node has a scroll
2453         position update, we would handle that before updating the state of child
2454         nodes (with possibly new viewport constraints). That would cause incorrect
2455         child layer updates.
2456         
2457         Fix by adding a second 'update' phase that happens after child nodes,
2458         and moving the scroll position update into that.
2459
2460         Scrolling tests only dump the state tree, so cannot test the bug.
2461
2462         * page/FrameView.cpp:
2463         (WebCore::FrameView::setScrollPosition): If the scroll position didn't
2464         actually change, don't request a scroll position update from the ScrollingCoordinator.
2465         * page/scrolling/ScrollingTree.cpp:
2466         (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
2467         that we can call updateAfterChildren() on it.
2468         * page/scrolling/ScrollingTreeNode.h:
2469         (ScrollingTreeNode):
2470         (WebCore::ScrollingTreeNode::updateAfterChildren):
2471         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2472         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2473         * page/scrolling/ScrollingTreeScrollingNode.h:
2474         (ScrollingTreeScrollingNode):
2475         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2476         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2477         In the current bug the scrolling tree was scheduled for commit because of a
2478         scroll position request, but if only the viewport constraints change, we also need
2479         to commit the tree.
2480         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2481         (ScrollingTreeFixedNode):
2482         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2483         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
2484         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2485         (ScrollingTreeScrollingNodeMac):
2486         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2487         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2488         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
2489         that updates things that have to happen after children.
2490         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2491         (ScrollingTreeStickyNode):
2492         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2493         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
2494
2495 2013-02-11  Roger Fong  <roger_fong@apple.com>
2496
2497         Unreviewed. Build fix for Win7 Release.
2498         Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
2499         This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
2500         InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
2501
2502         * inspector/InspectorHeapProfilerAgent.cpp:
2503         (WebCore):
2504         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
2505
2506 2013-02-11  Tony Gentilcore  <tonyg@chromium.org>
2507
2508         SegmentedString's copy ctor should copy all fields
2509         https://bugs.webkit.org/show_bug.cgi?id=109477
2510
2511         Reviewed by Adam Barth.
2512
2513         This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
2514
2515         No new tests because covered by existing tests.
2516
2517         * platform/text/SegmentedString.cpp:
2518         (WebCore::SegmentedString::SegmentedString):
2519
2520 2013-02-11  Joshua Bell  <jsbell@chromium.org>
2521
2522         IndexedDB: database connections don't close after versionchange transaction aborts
2523         https://bugs.webkit.org/show_bug.cgi?id=102298
2524
2525         Reviewed by Tony Chang.
2526
2527         Per spec, close the database if the "versionchange" transaction aborts.
2528
2529         Tests: storage/indexeddb/aborted-versionchange-closes.html
2530                storage/indexeddb/lazy-index-population.html
2531                storage/objectstore-basics.html
2532
2533         * Modules/indexeddb/IDBTransaction.cpp:
2534         (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
2535         this was a "versionchange" transaction.
2536
2537 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2538
2539         [EFL] fast/forms/number/number-l10n-input.html is failing
2540         https://bugs.webkit.org/show_bug.cgi?id=109440
2541
2542         Reviewed by Laszlo Gombos.
2543
2544         Use LocaleICU instead of LocaleNone on EFL port. The EFL
2545         port already depends on ICU library and we get additional
2546         functionality this way.
2547
2548         No new tests, already covered by existing tests.
2549
2550         * CMakeLists.txt:
2551         * PlatformBlackBerry.cmake:
2552         * PlatformEfl.cmake:
2553         * PlatformWinCE.cmake:
2554
2555 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
2556
2557         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
2558         https://bugs.webkit.org/show_bug.cgi?id=109349
2559
2560         Reviewed by Sam Weinig.
2561
2562         Expose setMinimumTimerInterval() and implement the backup/restore to keep
2563         a consistent state between tests.
2564
2565         * testing/InternalSettings.cpp:
2566         (WebCore::InternalSettings::Backup::Backup):
2567         (WebCore::InternalSettings::Backup::restoreTo):
2568         (WebCore::InternalSettings::setMinimumTimerInterval):
2569         (WebCore):
2570         * testing/InternalSettings.h:
2571         (Backup):
2572         (InternalSettings):
2573         * testing/InternalSettings.idl:
2574
2575 2013-02-11  Dean Jackson  <dino@apple.com>
2576
2577         Source/WebCore: Snapshotted plug-in should use shadow root
2578         https://bugs.webkit.org/show_bug.cgi?id=108284
2579
2580         Reviewed by Simon Fraser.
2581
2582         Take three - relanding after rollout in r142400 that was caused by a global
2583         selector interfering with CSS Instrumentation in the Inspector.
2584
2585         A snapshotted plugin needs to indicate to the user that it can be clicked
2586         to be restarted. Previously this was done with an image that had embedded
2587         text. Instead, we now use an internal shadow root to embed some markup that
2588         will display instructions that can be localised.
2589
2590         The UA stylesheet for plug-ins provides a default styling for the label, which
2591         can be overridden by ports.
2592
2593         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
2594         since it is only responsible for drawing a paused plug-in. The snapshot creation
2595         can work with the default renderer, but a shadow root requires something like
2596         RenderBlock in order to draw its children. We swap from one renderer to another when
2597         necessary either by creating the shadow root or by explicitly detaching and attaching
2598         the plugin element.
2599
2600         Unfortunately this is difficult to test, because the snapshotting requires
2601         time to execute, and also a PluginView to be instantiated.
2602
2603         * css/plugIns.css:
2604         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
2605
2606         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
2607         * platform/LocalizedStrings.h:
2608         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2609         * platform/chromium/LocalizedStringsChromium.cpp:
2610         * platform/efl/LocalizedStringsEfl.cpp:
2611         * platform/gtk/LocalizedStringsGtk.cpp:
2612         * platform/qt/LocalizedStringsQt.cpp:
2613
2614         * html/HTMLPlugInElement.cpp:
2615         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
2616         that RenderSnapshottedPlugIn no longer is an embedded object.
2617
2618         * html/HTMLPlugInImageElement.cpp:
2619         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
2620         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
2621         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
2622         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
2623             a renderer, otherwise use the typical plug-in path.
2624         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
2625             need to give it to the renderer.
2626         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
2627         * html/HTMLPlugInImageElement.h:
2628         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
2629             should show immediately.
2630         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
2631             to swap to the Shadow Root.
2632         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
2633             in being recreated. Make sure we reattach so that a plugin renderer will be created.
2634         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
2635             displayState for snapshots.
2636         * html/HTMLPlugInImageElement.h:
2637         (HTMLPlugInImageElement): The new methods listed above.
2638         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
2639             a snapshot should be immediately labeled.
2640
2641         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
2642
2643         * rendering/RenderSnapshottedPlugIn.cpp:
2644         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
2645         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
2646         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
2647         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
2648         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
2649         (WebCore::RenderSnapshottedPlugIn::getCursor):
2650         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
2651         * rendering/RenderSnapshottedPlugIn.h:
2652         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
2653
2654 2013-02-11  Mike West  <mkwst@chromium.org>
2655
2656         CSP reports for blocked 'data:' URLs should report the scheme only.
2657         https://bugs.webkit.org/show_bug.cgi?id=109429
2658
2659         Reviewed by Adam Barth.
2660
2661         https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
2662         the CSP 1.1 spec to require that blocked URLs that don't refer to
2663         generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
2664         stripped down to their scheme in violation reports.
2665
2666         Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
2667
2668         * page/ContentSecurityPolicy.cpp:
2669         (WebCore::ContentSecurityPolicy::reportViolation):
2670             If the blocked URL is a web-resolvable scheme, apply the current
2671             stripping logic to it, otherwise, strip it to the scheme only.
2672         * platform/KURL.h:
2673         (KURL):
2674             Move KURL::isHierarchical() out into KURL's public API.
2675
2676 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
2677
2678         ScrollingTree node maps keep getting larger
2679         https://bugs.webkit.org/show_bug.cgi?id=109348
2680
2681         Reviewed by Sam Weinig.
2682
2683         When navigating between pages, nodes would get left in the ScrollingTree's
2684         node map, and the ScrollingStateTree's node map, so these would get larger
2685         and larger as you browse.
2686         
2687         Simplify map maintenance by clearing the map when setting a new root node
2688         (which happens on the first commit of a new page). Also, don't keep root nodes
2689         around, but create them afresh for each page, which simplifies their ID
2690         management.
2691         
2692         This is closer to the original behavior; keeping the root nodes around was
2693         a fix for bug 99668, but we avoid regressing that fix by bailing early
2694         from frameViewLayoutUpdated() if there is no root state node (we'll get
2695         called again anyway).
2696         
2697         This now allows state nodeIDs to be purely read-only.
2698
2699         * page/scrolling/ScrollingStateNode.h:
2700         * page/scrolling/ScrollingStateTree.cpp:
2701         (WebCore::ScrollingStateTree::ScrollingStateTree):
2702         (WebCore::ScrollingStateTree::attachNode):
2703         (WebCore::ScrollingStateTree::clear):
2704         (WebCore::ScrollingStateTree::removeNode):
2705         * page/scrolling/ScrollingTree.cpp:
2706         (WebCore::ScrollingTree::updateTreeFromStateNode):
2707         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2708         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2709
2710 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
2711
2712         Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
2713         https://bugs.webkit.org/show_bug.cgi?id=109361
2714
2715         Reviewed by Sam Weinig.
2716         
2717         The map of scrolling node IDs to ScollingStateNodes was maintained by
2718         ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
2719         from the ScrollingTree (which owns its node map), and added some amount
2720         of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
2721         
2722         Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
2723         simplifies things.
2724
2725         No behavior change.
2726
2727         * page/scrolling/ScrollingStateTree.cpp:
2728         (WebCore::ScrollingStateTree::attachNode):
2729         (WebCore::ScrollingStateTree::detachNode):
2730         (WebCore::ScrollingStateTree::clear):
2731         (WebCore::ScrollingStateTree::removeNode):
2732         (WebCore::ScrollingStateTree::stateNodeForID):
2733         * page/scrolling/ScrollingStateTree.h:
2734         (ScrollingStateTree): Remove some stale comments.
2735         (WebCore::ScrollingStateTree::removedNodes):
2736         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2737         (ScrollingCoordinatorMac):
2738         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2739         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2740         (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
2741         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
2742         (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
2743         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
2744         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
2745         (WebCore::ScrollingCoordinatorMac::clearStateTree):
2746         (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
2747         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2748
2749 2013-02-11  Mark Rowe  <mrowe@apple.com>
2750
2751         Build fix.
2752
2753         * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
2754
2755 2013-02-11  Julien Chaffraix  <jchaffraix@webkit.org>
2756
2757         Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
2758         https://bugs.webkit.org/show_bug.cgi?id=107189
2759
2760         Reviewed by Abhishek Arya.
2761
2762         Test: fast/dynamic/continuation-detach-crash.html
2763
2764         This patch reverts r131539 and the following changes (r132591 and r139664).
2765         This means we redo detaching from the bottom-up which solves the regression.
2766         It fixes the attached test case as we re-attach child nodes before detaching
2767         the parent. It seems wrong to do but this avoid a stale continuation.
2768
2769         * dom/ContainerNode.cpp:
2770         (WebCore::ContainerNode::detach): Detach the children first, then ourself.
2771         * dom/Node.cpp:
2772         (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
2773         * rendering/RenderObject.cpp:
2774         (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
2775         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2776         * rendering/RenderObjectChildList.cpp:
2777         (WebCore::RenderObjectChildList::removeChildNode):
2778         Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
2779         (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
2780         renderer.
2781         * rendering/RenderTextFragment.cpp:
2782         (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
2783
2784         * dom/ContainerNode.cpp:
2785         (WebCore::ContainerNode::detach):
2786         * dom/Node.cpp:
2787         (WebCore::Node::detach):
2788         * rendering/RenderObject.cpp:
2789         (WebCore::RenderObject::willBeDestroyed):
2790         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2791         * rendering/RenderObjectChildList.cpp:
2792         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
2793         (WebCore::RenderObjectChildList::removeChildNode):
2794         * rendering/RenderTextFragment.cpp:
2795         (WebCore::RenderTextFragment::setText):
2796
2797 2013-02-11  Eric Seidel  <eric@webkit.org>
2798
2799         Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
2800         https://bugs.webkit.org/show_bug.cgi?id=109411
2801
2802         Reviewed by Adam Barth.
2803
2804         Moved InputStreamPreprocessor into its own header file so it can be
2805         used by both WebVTTTokenizer and HTMLTokenizer.
2806
2807         Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
2808         it can be used w/o a specific instantiation of the template class.
2809         This also made it possible to fix three old fixmes about wanting to share
2810         that constant.
2811
2812         Again, separating WebVTT code from Markup* base classes made it simpler
2813         at the cost of a little copy/paste code.  WebVTT tokenization is remarkably
2814         simple compared to HTML.
2815
2816         This will make it immediately possible to pull MarkupTokenizerBase up into
2817         HTMLTokenizer and further simplify the code.
2818
2819         * GNUmakefile.list.am:
2820         * Target.pri:
2821         * WebCore.gypi:
2822         * WebCore.vcproj/WebCore.vcproj:
2823         * WebCore.vcxproj/WebCore.vcxproj:
2824         * WebCore.vcxproj/WebCore.vcxproj.filters:
2825         * WebCore.xcodeproj/project.pbxproj:
2826         * html/parser/BackgroundHTMLParser.cpp:
2827         (WebCore::BackgroundHTMLParser::markEndOfFile):
2828         * html/parser/HTMLInputStream.h:
2829         (WebCore::HTMLInputStream::markEndOfFile):
2830         * html/parser/HTMLTokenizer.cpp:
2831         (WebCore::HTMLTokenizer::nextToken):
2832         * html/parser/InputStreamPreprocessor.h: Added.
2833         (WebCore):
2834         (InputStreamPreprocessor):
2835         (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
2836         (WebCore::InputStreamPreprocessor::nextInputCharacter):
2837         (WebCore::InputStreamPreprocessor::peek):
2838         (WebCore::InputStreamPreprocessor::advance):
2839         (WebCore::InputStreamPreprocessor::skipNextNewLine):
2840         (WebCore::InputStreamPreprocessor::reset):
2841         (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
2842         * html/track/WebVTTTokenizer.cpp:
2843         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
2844         (WebCore::WebVTTTokenizer::nextToken):
2845         * html/track/WebVTTTokenizer.h:
2846         (WebVTTTokenizer):
2847         (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
2848         (WebCore::WebVTTTokenizer::bufferCharacter):
2849         (WebCore::WebVTTTokenizer::emitAndResumeIn):
2850         (WebCore::WebVTTTokenizer::emitEndOfFile):
2851         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
2852         * xml/parser/MarkupTokenizerBase.h:
2853         (MarkupTokenizerBase):
2854         (WebCore::MarkupTokenizerBase::bufferCharacter):
2855
2856 2013-02-11  Adam Barth  <abarth@webkit.org>
2857
2858         document.write during window.onload can trigger DumpRenderTree to dump the render tree
2859         https://bugs.webkit.org/show_bug.cgi?id=109465
2860
2861         Reviewed by Eric Seidel.
2862
2863         This patch is a partial revert of
2864         http://trac.webkit.org/changeset/142378. It's not safe to call
2865         checkComplete during the load event. We'll need to find another way of
2866         calling checkComplete at the right time.
2867
2868         Test: fast/parser/document-write-during-load.html
2869
2870         * dom/Document.cpp:
2871         (WebCore::Document::decrementActiveParserCount):
2872
2873 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
2874
2875         Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
2876         https://bugs.webkit.org/show_bug.cgi?id=109294
2877
2878         Reviewed by Pavel Feldman.
2879
2880         Use the stack that caused style recalculation as a cause for relayout performed due to
2881         layout invalidation caused by style recalculation.
2882
2883         * inspector/front-end/TimelinePresentationModel.js:
2884         (WebInspector.TimelinePresentationModel.prototype.reset):
2885         (WebInspector.TimelinePresentationModel.Record):
2886
2887 2013-02-01  Andrey Kosyakov  <caseq@chromium.org>
2888
2889         Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
2890         https://bugs.webkit.org/show_bug.cgi?id=108640
2891
2892         Reviewed by Vsevolod Vlasov.
2893
2894         - only set first parameter to eval() callback iff expression successfully evaluates;
2895         - use object, not bool as second parameter;
2896         - pass exceptions and extension errors as second parameter if evaluate failed;
2897         - minor drive-by changes in ExtensionAPI utilities.
2898
2899         * inspector/front-end/ExtensionAPI.js:
2900         (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
2901         (injectedExtensionAPI.InspectedWindow.prototype.):
2902         (injectedExtensionAPI.InspectedWindow.prototype.eval):
2903         (injectedExtensionAPI.extractCallbackArgument):
2904         * inspector/front-end/ExtensionServer.js:
2905         (WebInspector.ExtensionServer.prototype.):
2906         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2907         (WebInspector.ExtensionStatus):
2908
2909 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
2910
2911         Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
2912         https://bugs.webkit.org/show_bug.cgi?id=109443
2913
2914         Reviewed by Vsevolod Vlasov.
2915
2916         Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
2917
2918         * inspector/front-end/ExtensionAPI.js:
2919         (buildExtensionAPIInjectedScript):
2920
2921 2013-02-11  Eric Seidel  <eric@webkit.org>
2922
2923         Move WebVTTToken off of MarkupTokenBase
2924         https://bugs.webkit.org/show_bug.cgi?id=109410
2925
2926         Reviewed by Tony Gentilcore.
2927
2928         This introduces a small amount of "copy/paste" code
2929         but actually makes WebVTTToken much smaller and simpler!
2930         This also frees the HTMLParser to have its Token class
2931         back to itself so we can tune it to make HTML faster.
2932
2933         * html/track/WebVTTToken.h:
2934         (WebVTTToken):
2935         (WebCore::WebVTTToken::WebVTTToken):
2936         (WebCore::WebVTTToken::appendToName):
2937         (WebCore::WebVTTToken::type):
2938         (WebCore::WebVTTToken::name):
2939         (WebCore::WebVTTToken::ensureIsCharacterToken):
2940         (WebCore::WebVTTToken::appendToCharacter):
2941         (WebCore::WebVTTToken::beginEmptyStartTag):
2942         (WebCore::WebVTTToken::beginStartTag):
2943         (WebCore::WebVTTToken::beginEndTag):
2944         (WebCore::WebVTTToken::beginTimestampTag):
2945         (WebCore::WebVTTToken::makeEndOfFile):
2946         (WebCore::WebVTTToken::clear):
2947
2948 2013-02-11  Joshua Bell  <jsbell@chromium.org>
2949
2950         [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
2951         https://bugs.webkit.org/show_bug.cgi?id=108670
2952
2953         Reviewed by Kentaro Hara.
2954
2955         Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
2956         listeners, as those listeners may close the database in response to events.
2957
2958         Also, removed extraneous super-calls from hasPendingActivity() overrides.
2959
2960         Test: storage/indexeddb/database-wrapper.html
2961
2962         * Modules/indexeddb/IDBDatabase.cpp:
2963         (WebCore::IDBDatabase::hasPendingActivity): Implemented.
2964         * Modules/indexeddb/IDBDatabase.h: Declared.
2965         * Modules/indexeddb/IDBRequest.cpp:
2966         (WebCore::IDBRequest::hasPendingActivity): Simplified.
2967         * Modules/indexeddb/IDBTransaction.cpp:
2968         (WebCore::IDBTransaction::hasPendingActivity): Simplified.
2969
2970 2013-02-11  Eric Seidel  <eric@webkit.org>
2971
2972         Remove AttributeBase now that NEW_XML is gone
2973         https://bugs.webkit.org/show_bug.cgi?id=109408
2974
2975         Reviewed by Adam Barth.
2976
2977         Just deleting code.  HTMLToken::Attribute is now just
2978         the real class and not a typedef.
2979
2980         * html/parser/CompactHTMLToken.cpp:
2981         (WebCore::CompactHTMLToken::CompactHTMLToken):
2982         * html/parser/HTMLTokenizer.cpp:
2983         (WebCore::AtomicHTMLToken::nameForAttribute):
2984         * xml/parser/MarkupTokenBase.h:
2985         (WebCore):
2986         (MarkupTokenBase):
2987         (Attribute):
2988         (Range):
2989
2990 2013-02-11  Eric Seidel  <eric@webkit.org>
2991
2992         Rename PreloadTask to StartTagScanner to match its purpose
2993         https://bugs.webkit.org/show_bug.cgi?id=109406
2994
2995         Reviewed by Sam Weinig.
2996
2997         As discussed in bug 107807.
2998
2999         * html/parser/HTMLPreloadScanner.cpp:
3000         (WebCore::StartTagScanner::StartTagScanner):
3001         (WebCore::StartTagScanner::processAttributes):
3002         (WebCore::HTMLPreloadScanner::processToken):
3003
3004 2013-02-11  Vsevolod Vlasov  <vsevik@chromium.org>
3005
3006         Web Inspector: WebInspector.Project refactorings.
3007         https://bugs.webkit.org/show_bug.cgi?id=109433
3008
3009         Reviewed by Alexander Pavlov.
3010
3011         This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
3012         Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
3013         Renamed Project.name() to Project.id() and delegated it to project delegate.
3014         Added Project.displayName() method that is delegated to project delegate.
3015         SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
3016         isolates various mappings from Project/ProjectDelegate concept.
3017         UISourceCode is now created based on path in the project.
3018         UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
3019
3020         * WebCore.gypi:
3021         * WebCore.vcproj/WebCore.vcproj:
3022         * inspector/compile-front-end.py:
3023         * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
3024         (WebInspector.FileSystemProjectDelegate):
3025         (WebInspector.FileSystemProjectDelegate.prototype.id):
3026         (WebInspector.FileSystemProjectDelegate.prototype.type):
3027         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
3028         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
3029         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
3030         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
3031         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
3032         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
3033         (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
3034         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
3035         (WebInspector.FileSystemProjectDelegate.prototype._populate):
3036         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
3037         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
3038         (WebInspector.FileSystemProjectDelegate.prototype.reset):
3039         (WebInspector.FileSystemUtils):
3040         (WebInspector.FileSystemUtils.errorHandler):
3041         (WebInspector.FileSystemUtils.requestFileSystem):
3042         (.fileSystemLoaded):
3043         (.innerCallback):
3044         (WebInspector.FileSystemUtils.requestFilesRecursive):
3045         (.fileEntryLoaded):
3046         (.fileLoaded):
3047         (.readerLoadEnd):
3048         (WebInspector.FileSystemUtils.requestFileContent):
3049         (.fileWriterCreated.fileTruncated):
3050         (.fileWriterCreated):
3051         (.writerEnd):
3052         (WebInspector.FileSystemUtils.setFileContent):
3053         (WebInspector.FileSystemUtils._getDirectory):
3054         (.toArray):
3055         (WebInspector.FileSystemUtils._readDirectory):
3056         (WebInspector.FileSystemUtils._requestEntries):
3057         * inspector/front-end/IsolatedFileSystemModel.js:
3058         (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
3059         * inspector/front-end/SimpleWorkspaceProvider.js:
3060         (WebInspector.SimpleProjectDelegate):
3061         (WebInspector.SimpleProjectDelegate.prototype.id):
3062         (WebInspector.SimpleProjectDelegate.prototype.displayName):
3063         (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
3064         (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
3065         (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
3066         (WebInspector.SimpleProjectDelegate.prototype.addFile):
3067         (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
3068         (WebInspector.SimpleProjectDelegate.prototype.removeFile):
3069         (WebInspector.SimpleProjectDelegate.prototype.reset):
3070         (WebInspector.SimpleWorkspaceProvider):
3071         (WebInspector.SimpleWorkspaceProvider.uriForURL):
3072         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
3073         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
3074         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
3075         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
3076         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
3077         * inspector/front-end/UISourceCode.js:
3078         (WebInspector.UISourceCode):
3079         (WebInspector.UISourceCode.prototype.path):
3080         (WebInspector.UISourceCode.prototype.uri):
3081         * inspector/front-end/WebKit.qrc:
3082         * inspector/front-end/Workspace.js:
3083         (WebInspector.FileDescriptor):
3084         (WebInspector.ProjectDelegate):
3085         (WebInspector.ProjectDelegate.prototype.id):
3086         (WebInspector.ProjectDelegate.prototype.displayName):
3087         (WebInspector.ProjectDelegate.prototype.requestFileContent):
3088         (WebInspector.ProjectDelegate.prototype.setFileContent):
3089         (WebInspector.ProjectDelegate.prototype.searchInFileContent):
3090         (WebInspector.Project):
3091         (WebInspector.Project.prototype.id):
3092         (WebInspector.Project.prototype.type):
3093         (WebInspector.Project.prototype.displayName):
3094         (WebInspector.Project.prototype.isServiceProject):
3095         (WebInspector.Project.prototype._fileAdded):
3096         (WebInspector.Project.prototype._fileRemoved):
3097         (WebInspector.Project.prototype._reset):
3098         (WebInspector.Project.prototype.uiSourceCode):
3099         (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
3100         (WebInspector.Project.prototype.uiSourceCodeForURI):
3101         (WebInspector.Project.prototype.uiSourceCodes):
3102         (WebInspector.Project.prototype.requestFileContent):
3103         (WebInspector.Project.prototype.setFileContent):
3104         (WebInspector.Project.prototype.searchInFileContent):
3105         (WebInspector.Project.prototype.dispose):
3106         (WebInspector.Workspace.prototype.uiSourceCode):
3107         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
3108         (WebInspector.Workspace.prototype.addProject):
3109         (WebInspector.Workspace.prototype.removeProject):
3110         (WebInspector.Workspace.prototype.project):
3111         (WebInspector.Workspace.prototype.uiSourceCodes):
3112         (WebInspector.Workspace.prototype.projectForUISourceCode):
3113         * inspector/front-end/inspector.html:
3114
3115 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
3116
3117         Web Inspector: fix closure compiler warnings in the profiler code
3118         https://bugs.webkit.org/show_bug.cgi?id=109432
3119
3120         Reviewed by Pavel Feldman.
3121
3122         Updated type annotations to match the code.
3123
3124         * inspector/front-end/NativeMemorySnapshotView.js:
3125         * inspector/front-end/ProfilesPanel.js:
3126
3127 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
3128
3129         [QT] Regression (r142444): Broke qt linux minimal build
3130         https://bugs.webkit.org/show_bug.cgi?id=109423
3131
3132         Reviewed by Kenneth Rohde Christiansen.
3133
3134         Test: cssom/cssvalue-comparison.html
3135
3136         * css/CSSValue.cpp:
3137         (WebCore::CSSValue::equals):
3138
3139 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
3140
3141         Web Inspector: introduce WebInspector.TextUtils
3142         https://bugs.webkit.org/show_bug.cgi?id=109289
3143
3144         Reviewed by Pavel Feldman.
3145
3146         Add new WebInspector.TextUtils file and extract commonly used
3147         text-operation subroutines from DefaultTextEditor into it.
3148
3149         No new tests: no change in behaviour.
3150
3151         * WebCore.gypi:
3152         * WebCore.vcproj/WebCore.vcproj:
3153         * inspector/compile-front-end.py:
3154         * inspector/front-end/DefaultTextEditor.js:
3155         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
3156         (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
3157         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
3158         * inspector/front-end/TextUtils.js: Added.
3159         (WebInspector.TextUtils.isStopChar):
3160         (WebInspector.TextUtils.isWordChar):
3161         (WebInspector.TextUtils.isSpaceChar):
3162         (WebInspector.TextUtils.isWord):
3163         (WebInspector.TextUtils.isBraceChar):
3164         * inspector/front-end/WebKit.qrc:
3165         * inspector/front-end/inspector.html:
3166
3167 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
3168
3169         [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
3170         https://bugs.webkit.org/show_bug.cgi?id=109418
3171
3172         Reviewed by Philippe Normand.
3173
3174         Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
3175         methods by including the WTF MathExtras.h header. Use a static cast to
3176         an integer type on the float return value of the abs(float) method call
3177         instead of the C-style cast.
3178
3179         No new tests - no new functiolnality.
3180
3181         * platform/gtk/LocalizedStringsGtk.cpp:
3182         (WebCore::localizedMediaTimeDescription):
3183
3184 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
3185
3186         Unreviewed build fix for the WTFURL backend of KURL.
3187
3188         * platform/KURL.cpp:
3189         (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
3190         the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
3191
3192 2013-02-11  Mike West  <mkwst@chromium.org>
3193
3194         Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
3195         https://bugs.webkit.org/show_bug.cgi?id=108921
3196
3197         Reviewed by Jochen Eisinger.
3198
3199         For clarity and consistency, this patch adjusts Range::collapsed() to
3200         drop the default value of the ExceptionCode parameter it accepts. The
3201         three call sites that called the method with no arguments (all part of
3202         Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
3203
3204         * dom/Range.h:
3205         (Range):
3206         * editing/Editor.cpp:
3207         (WebCore::Editor::rangeOfString):
3208
3209 2013-02-11  Alexei Filippov  <alph@chromium.org>
3210
3211         Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
3212         https://bugs.webkit.org/show_bug.cgi?id=108653
3213
3214         Reviewed by Yury Semikhatsky.
3215
3216         Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
3217         In fact these two profile types have not too much in common. So put each into its own domain.
3218         It should also help when Profiles panel gets split into several tools.
3219         This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
3220         change the original InspectorProfilerAgent.
3221
3222         * CMakeLists.txt:
3223         * GNUmakefile.list.am:
3224         * Target.pri:
3225         * WebCore.gypi:
3226         * WebCore.vcproj/WebCore.vcproj:
3227         * WebCore.vcxproj/WebCore.vcxproj:
3228         * WebCore.vcxproj/WebCore.vcxproj.filters:
3229         * WebCore.xcodeproj/project.pbxproj:
3230         * inspector/Inspector.json:
3231         * inspector/InspectorAllInOne.cpp:
3232         * inspector/InspectorController.cpp:
3233         (WebCore::InspectorController::InspectorController):
3234         * inspector/InspectorHeapProfilerAgent.cpp: Added.
3235         (WebCore):
3236         (WebCore::InspectorHeapProfilerAgent::create):
3237         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
3238         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
3239         (WebCore::InspectorHeapProfilerAgent::resetState):
3240         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
3241         (WebCore::InspectorHeapProfilerAgent::setFrontend):
3242         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
3243         (WebCore::InspectorHeapProfilerAgent::restore):
3244         (WebCore::InspectorHeapProfilerAgent::collectGarbage):
3245         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
3246         (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
3247         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
3248         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
3249         (WebCore::InspectorHeapProfilerAgent::removeProfile):
3250         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
3251         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
3252         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
3253         (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
3254         * inspector/InspectorHeapProfilerAgent.h: Added.
3255         (WebCore):
3256         (InspectorHeapProfilerAgent):
3257         (WebCore::InspectorHeapProfilerAgent::clearProfiles):
3258         * inspector/InspectorInstrumentation.cpp:
3259         (WebCore):
3260         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3261         * inspector/InstrumentingAgents.h:
3262         (WebCore):
3263         (InstrumentingAgents):
3264         (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
3265         (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
3266         * inspector/WorkerInspectorController.cpp:
3267         (WebCore::WorkerInspectorController::WorkerInspectorController):
3268         * inspector/front-end/HeapSnapshotDataGrids.js:
3269         * inspector/front-end/HeapSnapshotGridNodes.js:
3270         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
3271         * inspector/front-end/HeapSnapshotView.js:
3272         (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
3273         (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
3274         (WebInspector.HeapProfileHeader.prototype.saveToFile):
3275         * inspector/front-end/ProfilesPanel.js:
3276         (WebInspector.ProfilesPanel):
3277         (WebInspector.ProfilesPanel.prototype._clearProfiles):
3278         (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
3279         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
3280         (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
3281         (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
3282         (WebInspector.ProfilesPanel.prototype._populateProfiles):
3283         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
3284         (WebInspector.ProfilesPanel.prototype.revealInView):
3285         (WebInspector.HeapProfilerDispatcher):
3286         (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
3287         (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
3288         (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
3289         (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
3290         (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
3291         * inspector/front-end/TimelinePanel.js:
3292         (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
3293         * inspector/front-end/inspector.js:
3294         (WebInspector.doLoadedDone):
3295
3296 2013-02-11  Mike West  <mkwst@chromium.org>
3297
3298         Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
3299         https://bugs.webkit.org/show_bug.cgi?id=109372
3300
3301         Reviewed by Jochen Eisinger.
3302
3303         Rather than implicitly ignoring exceptions, we should use the
3304         IGNORE_EXCEPTION macro for clarity.
3305
3306         * editing/Editor.cpp:
3307         (WebCore::Editor::countMatchesForText):
3308
3309 2013-02-11  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3310
3311         [Qt] Unreviewed. Fix minimal build after r142444.
3312
3313         * css/CSSValue.cpp:
3314         (WebCore::CSSValue::equals):
3315
3316 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3317
3318         [EFL] Stop using smart pointers for Ecore_Timer
3319         https://bugs.webkit.org/show_bug.cgi?id=109409
3320
3321         Reviewed by Kenneth Rohde Christiansen.
3322
3323         Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
3324         is a bad idea because the timer handle becomes invalid as soon as the
3325         timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
3326         on destruction because OwnPtr calls ecore_timer_del() on an invalid
3327         handle.
3328
3329         No new tests, already covered by exiting tests.
3330
3331         * platform/RunLoop.h:
3332         (TimerBase):
3333         * platform/efl/RunLoopEfl.cpp:
3334         (WebCore::RunLoop::TimerBase::timerFired):
3335         (WebCore::RunLoop::TimerBase::start):
3336         (WebCore::RunLoop::TimerBase::stop):
3337
3338 2013-02-11  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3339
3340         Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
3341         https://bugs.webkit.org/show_bug.cgi?id=109414
3342
3343         Reviewed by Vsevolod Vlasov.
3344
3345         SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
3346         fractions of the total container size. The sidebar then will grow or shrink along with the container.
3347         When the sidebar is resized manually the updated ratio is stored in the settings.
3348
3349         * inspector/front-end/SplitView.js:
3350         (WebInspector.SplitView):
3351         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
3352         (WebInspector.SplitView.prototype._updateTotalSize):
3353         (WebInspector.SplitView.prototype._innerSetSidebarSize):
3354         (WebInspector.SplitView.prototype._saveSidebarSize):
3355
3356 2013-02-11  Pavel Feldman  <pfeldman@chromium.org>
3357
3358         Web Inspector: highlight DOM nodes on hover while debugging
3359         https://bugs.webkit.org/show_bug.cgi?id=109355
3360
3361         Reviewed by Vsevolod Vlasov.
3362
3363         Along with showing the popover, highlight the remote object as node.
3364
3365         * inspector/front-end/ObjectPopoverHelper.js:
3366         (WebInspector.ObjectPopoverHelper.prototype.):
3367         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
3368         (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
3369
3370 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
3371
3372         Web Inspector: displaying whitespace characters is broken
3373         https://bugs.webkit.org/show_bug.cgi?id=109412
3374
3375         Reviewed by Vsevolod Vlasov.
3376
3377         Add "pointer-events: none" rule for pseudo-class "before", which
3378         maintains rendering of whitespace characters.
3379
3380         No new tests.
3381
3382         * inspector/front-end/inspectorSyntaxHighlight.css:
3383         (.webkit-whitespace::before):
3384
3385 2013-02-11  Alexander Pavlov  <apavlov@chromium.org>
3386
3387         Web Inspector: Implement position-based sourcemapping for stylesheets
3388         https://bugs.webkit.org/show_bug.cgi?id=109168
3389
3390         Reviewed by Vsevolod Vlasov.
3391
3392         This change introduces support for position-based source maps for CSS stylesheets.
3393         Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
3394         upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
3395
3396         Test: http/tests/inspector/stylesheet-source-mapping.html
3397
3398         * inspector/front-end/CSSStyleModel.js:
3399         (WebInspector.CSSStyleModel):
3400         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
3401         (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
3402         (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
3403         (WebInspector.CSSLocation):
3404         (WebInspector.CSSProperty):
3405         (WebInspector.CSSProperty.parsePayload):
3406         * inspector/front-end/CompilerScriptMapping.js:
3407         (WebInspector.CompilerScriptMapping):
3408         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
3409         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
3410         * inspector/front-end/SASSSourceMapping.js:
3411         (WebInspector.SASSSourceMapping):
3412         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
3413         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
3414         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
3415         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
3416         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
3417         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
3418         (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
3419         (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
3420         (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
3421         (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
3422         (WebInspector.SASSSourceMapping.prototype._reset):
3423         * inspector/front-end/SourceMap.js:
3424         (WebInspector.SourceMap):
3425         (WebInspector.SourceMap.load):
3426         (WebInspector.SourceMap.prototype.findEntry):
3427         (WebInspector.SourceMap.prototype.findEntryReversed):
3428         (WebInspector.SourceMap.prototype._parseMap):
3429         * inspector/front-end/StylesSourceMapping.js:
3430         (WebInspector.StylesSourceMapping):
3431         (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
3432         * inspector/front-end/inspector.js:
3433
3434 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
3435
3436         Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
3437         https://bugs.webkit.org/show_bug.cgi?id=102901
3438
3439         Reviewed by Antti Koivisto.
3440
3441         Added comparison method to CSSValue and its children, so that the
3442         css values could be compared efficiently. Before this patch, CSSValue
3443         objects were compared using strings that were generated by the cssText() method.
3444
3445         Test: cssom/cssvalue-comparison.html
3446
3447         * css/CSSAspectRatioValue.cpp:
3448         (WebCore::CSSAspectRatioValue::equals):
3449         (WebCore):
3450         * css/CSSAspectRatioValue.h:
3451         (CSSAspectRatioValue):
3452         * css/CSSBasicShapes.cpp:
3453         (WebCore::CSSBasicShapeRectangle::equals):
3454         (WebCore):
3455         (WebCore::CSSBasicShapeCircle::equals):
3456         (WebCore::CSSBasicShapeEllipse::equals):
3457         (WebCore::CSSBasicShapePolygon::equals):
3458         * css/CSSBasicShapes.h:
3459         (CSSBasicShapeRectangle):
3460         (CSSBasicShapeCircle):
3461         (CSSBasicShapeEllipse):
3462         (CSSBasicShapePolygon):
3463         * css/CSSBorderImageSliceValue.cpp:
3464         (WebCore::CSSBorderImageSliceValue::equals):
3465         (WebCore):
3466         * css/CSSBorderImageSliceValue.h:
3467         (CSSBorderImageSliceValue):
3468         * css/CSSCalculationValue.cpp:
3469         (WebCore::CSSCalcValue::equals):
3470         (WebCore):
3471         (WebCore::CSSCalcPrimitiveValue::equals):
3472         (CSSCalcPrimitiveValue):
3473         (WebCore::CSSCalcPrimitiveValue::type):
3474         (WebCore::CSSCalcBinaryOperation::equals):
3475         (CSSCalcBinaryOperation):
3476         (WebCore::CSSCalcBinaryOperation::type):
3477         * css/CSSCalculationValue.h:
3478         (WebCore::CSSCalcExpressionNode::equals):
3479         (CSSCalcExpressionNode):
3480         (CSSCalcValue):
3481         * css/CSSCanvasValue.cpp:
3482         (WebCore::CSSCanvasValue::equals):
3483         (WebCore):
3484         * css/CSSCanvasValue.h:
3485         (CSSCanvasValue):
3486         * css/CSSComputedStyleDeclaration.cpp:
3487         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3488         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
3489         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
3490         * css/CSSCrossfadeValue.cpp:
3491         (WebCore::CSSCrossfadeValue::equals):
3492         (WebCore):
3493         * css/CSSCrossfadeValue.h:
3494         (CSSCrossfadeValue):
3495         * css/CSSCursorImageValue.cpp:
3496         (WebCore::CSSCursorImageValue::equals):
3497         (WebCore):
3498         * css/CSSCursorImageValue.h:
3499         (CSSCursorImageValue):
3500         * css/CSSFontFaceSrcValue.cpp:
3501         (WebCore::CSSFontFaceSrcValue::equals):
3502         (WebCore):
3503         * css/CSSFontFaceSrcValue.h:
3504         (CSSFontFaceSrcValue):
3505         * css/CSSFunctionValue.cpp:
3506         (WebCore::CSSFunctionValue::equals):
3507         (WebCore):
3508         * css/CSSFunctionValue.h:
3509         (CSSFunctionValue):
3510         * css/CSSGradientValue.cpp:
3511         (WebCore::CSSLinearGradientValue::equals):
3512         (WebCore):
3513         (WebCore::CSSRadialGradientValue::equals):
3514         * css/CSSGradientValue.h:
3515         (WebCore::CSSGradientColorStop::operator==):
3516         (CSSLinearGradientValue):
3517         (CSSRadialGradientValue):
3518         * css/CSSImageValue.cpp:
3519         (WebCore::CSSImageValue::equals):
3520         (WebCore):
3521         * css/CSSImageValue.h:
3522         (CSSImageValue):
3523         * css/CSSInheritedValue.h:
3524         (WebCore::CSSInheritedValue::equals):
3525         (CSSInheritedValue):
3526         * css/CSSInitialValue.h:
3527         (WebCore::CSSInitialValue::equals):
3528         (CSSInitialValue):
3529         * css/CSSLineBoxContainValue.h:
3530         (WebCore::CSSLineBoxContainValue::equals):
3531         * css/CSSPrimitiveValue.cpp:
3532         (WebCore::CSSPrimitiveValue::equals):
3533         (WebCore):
3534         * css/CSSPrimitiveValue.h:
3535         (CSSPrimitiveValue):
3536         * css/CSSReflectValue.cpp:
3537         (WebCore::CSSReflectValue::equals):
3538         (WebCore):
3539         * css/CSSReflectValue.h:
3540         (CSSReflectValue):
3541         * css/CSSTimingFunctionValue.cpp:
3542         (WebCore::CSSCubicBezierTimingFunctionValue::equals):
3543         (WebCore):
3544         (WebCore::CSSStepsTimingFunctionValue::equals):
3545         * css/CSSTimingFunctionValue.h:
3546         (WebCore::CSSLinearTimingFunctionValue::equals):
3547         (CSSLinearTimingFunctionValue):
3548         (CSSCubicBezierTimingFunctionValue):
3549         (CSSStepsTimingFunctionValue):
3550         * css/CSSUnicodeRangeValue.cpp:
3551         (WebCore::CSSUnicodeRangeValue::equals):
3552         (WebCore):
3553         * css/CSSUnicodeRangeValue.h:
3554         (CSSUnicodeRangeValue):
3555         * css/CSSValue.cpp:
3556         (WebCore):
3557         (WebCore::compareCSSValues):
3558         (WebCore::CSSValue::equals):
3559         * css/CSSValue.h:
3560         (CSSValue):
3561         (WebCore):
3562         (WebCore::compareCSSValueVector):
3563         (WebCore::compareCSSValuePtr):
3564         * css/CSSValueList.cpp:
3565         (WebCore::CSSValueList::removeAll):
3566         (WebCore::CSSValueList::hasValue):
3567         (WebCore::CSSValueList::equals):
3568         (WebCore):
3569         * css/CSSValueList.h:
3570         (CSSValueList):
3571         * css/CSSVariableValue.h:
3572         (WebCore::CSSVariableValue::equals):
3573         (CSSVariableValue):
3574         * css/Counter.h:
3575         (Counter):
3576         (WebCore::Counter::equals):
3577         * css/DashboardRegion.h:
3578         (WebCore::DashboardRegion::equals):
3579         * css/FontFeatureValue.cpp:
3580         (WebCore::FontFeatureValue::equals):
3581         (WebCore):
3582         * css/FontFeatureValue.h:
3583         (FontFeatureValue):
3584         * css/FontValue.cpp:
3585         (WebCore::FontValue::equals):
3586         (WebCore):
3587         * css/FontValue.h:
3588         (FontValue):
3589         * css/MediaQueryExp.h:
3590         (WebCore::MediaQueryExp::operator==):
3591         * css/Pair.h:
3592         (WebCore::Pair::equals):
3593         (Pair):
3594         * css/Rect.h:
3595         (WebCore::RectBase::equals):
3596         (RectBase):
3597         * css/ShadowValue.cpp:
3598         (WebCore::ShadowValue::equals):
3599         (WebCore):
3600         * css/ShadowValue.h:
3601         (ShadowValue):
3602         * css/StylePropertySet.cpp:
3603         (WebCore::StylePropertySet::get4Values):
3604         (WebCore::StylePropertySet::propertyMatches):
3605         * css/WebKitCSSArrayFunctionValue.cpp:
3606         (WebCore::WebKitCSSArrayFunctionValue::equals):
3607         (WebCore):
3608         * css/WebKitCSSArrayFunctionValue.h:
3609         (WebKitCSSArrayFunctionValue):
3610         * css/WebKitCSSFilterValue.cpp:
3611         (WebCore::WebKitCSSFilterValue::equals):
3612         (WebCore):
3613         * css/WebKitCSSFilterValue.h:
3614         (WebKitCSSFilterValue):
3615         * css/WebKitCSSMixFunctionValue.cpp:
3616         (WebCore::WebKitCSSMixFunctionValue::equals):
3617         (WebCore):
3618         * css/WebKitCSSMixFunctionValue.h:
3619         (WebKitCSSMixFunctionValue):
3620         * css/WebKitCSSSVGDocumentValue.cpp:
3621         (WebCore::WebKitCSSSVGDocumentValue::equals):
3622         (WebCore):
3623         * css/WebKitCSSSVGDocumentValue.h:
3624         (WebKitCSSSVGDocumentValue):
3625         * css/WebKitCSSShaderValue.cpp:
3626         (WebCore::WebKitCSSShaderValue::equals):
3627         (WebCore):
3628         * css/WebKitCSSShaderValue.h:
3629         (WebKitCSSShaderValue):
3630         * css/WebKitCSSTransformValue.h:
3631         (WebCore::WebKitCSSTransformValue::equals):
3632         * editing/EditingStyle.cpp:
3633         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
3634         * svg/SVGColor.cpp:
3635         (WebCore::SVGColor::equals):
3636         (WebCore):
3637         * svg/SVGColor.h:
3638         (SVGColor):
3639         * svg/SVGPaint.cpp:
3640         (WebCore::SVGPaint::equals):
3641         (WebCore):
3642         * svg/SVGPaint.h:
3643         (SVGPaint):
3644
3645 2013-02-11  Pan Deng  <pan.deng@intel.com>
3646
3647         [Web Inspector] Network panel, sort by "transferSize" instead of "resourceSize".
3648         https://bugs.webkit.org/show_bug.cgi?id=109142.
3649
3650         Reviewed by Vsevolod Vlasov.
3651
3652         Sort by "transferSize" as it is the primary rather than "resoureSize".
3653
3654         No new tests.
3655
3656         * inspector/front-end/NetworkPanel.js:
3657         (WebInspector.NetworkDataGridNode.SizeComparator):
3658
3659 2013-02-11  Eugene Klyuchnikov  <eustas@chromium.org>
3660
3661         Web Inspector: [Resources] Prefactorings in DataGrid and CookieTable
3662         https://bugs.webkit.org/show_bug.cgi?id=109141
3663
3664         Reviewed by Vsevolod Vlasov.
3665
3666         1) Make deleteCookie method static and move to WebInspector.Cookie
3667         2) Replace resfreshCallback getter/setter in DataGrid with
3668         constructor parameter
3669
3670         * inspector/front-end/CookieItemsView.js: Adopt changes.
3671         * inspector/front-end/CookieParser.js:
3672         (WebInspector.Cookie.prototype.remove): Moved from CookiesTable.
3673         * inspector/front-end/CookiesTable.js: Adopt changes.
3674         * inspector/front-end/DataGrid.js:
3675         Replace setter with constructor parameter.
3676
3677 2013-02-11  John J. Barton  <johnjbarton@chromium.org>
3678
3679         Web Inspector: Don't throw exceptions in WebInspector.Color
3680         https://bugs.webkit.org/show_bug.cgi?id=104835
3681
3682         Reviewed by Vsevolod Vlasov.
3683
3684         WebInspector.Color.parse() returns a Color from a string, or null;
3685         Ctor calls now call parse();
3686         In the StylesSideBarPane, test null rather than catch(e).
3687
3688         Added case to inspector/styles/styles-invalid-color-values.html
3689
3690         * inspector/front-end/Color.js:
3691         (WebInspector.Color):
3692         (WebInspector.Color.parse):
3693         (WebInspector.Color.fromRGBA):
3694         (WebInspector.Color.fromRGB):
3695         (WebInspector.Color.prototype.toString):
3696         (WebInspector.Color.prototype._parse.this.alpha.set 0):
3697         (WebInspector.Color.prototype._parse.this.nickname.set 2):
3698         (WebInspector.Color.prototype._parse.this.hsla.set 1):
3699         (WebInspector.Color.prototype._parse.this.rgba.set 0):
3700         (WebInspector.Color.prototype._parse.set WebInspector):
3701         (WebInspector.Color.prototype._parse):
3702         * inspector/front-end/Spectrum.js:
3703         (WebInspector.Spectrum.prototype.get color):
3704         * inspector/front-end/StylesSidebarPane.js:
3705
3706 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
3707
3708         Web Inspector: home button behaviour is wrong in DTE
3709         https://bugs.webkit.org/show_bug.cgi?id=109154
3710
3711         Reviewed by Vsevolod Vlasov.
3712
3713         Handle home key shortcut explicitly in TextEditorMainPanel.
3714
3715         New test: inspector/editor/text-editor-home-button.html
3716
3717         * inspector/front-end/DefaultTextEditor.js:
3718         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
3719         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
3720
3721 2013-02-11  Abhishek Arya  <inferno@chromium.org>
3722
3723         Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
3724         https://bugs.webkit.org/show_bug.cgi?id=108981
3725
3726         Reviewed by Eric Seidel.
3727
3728         * Modules/mediastream/RTCStatsResponse.cpp:
3729         (WebCore::RTCStatsResponse::addElement):
3730         (WebCore::RTCStatsResponse::addStatistic):
3731         * Modules/websockets/WebSocketChannel.cpp:
3732         (WebCore::WebSocketChannel::skipBuffer):
3733         * css/CSSCalculationValue.cpp:
3734         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
3735         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
3736         * css/WebKitCSSTransformValue.cpp:
3737         (WebCore::transformValueToCssString):
3738         * editing/TextIterator.cpp:
3739         (WebCore::SearchBuffer::search):
3740         * html/HTMLElement.cpp:
3741         (WebCore::parseColorStringWithCrazyLegacyRules):
3742         * html/ImageData.cpp:
3743         (WebCore::ImageData::ImageData):
3744         * html/shadow/DateTimeSymbolicFieldElement.cpp:
3745         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
3746         * html/track/TextTrackCueList.cpp:
3747         (WebCore::TextTrackCueList::add):
3748         * platform/SharedBuffer.cpp:
3749         (WebCore::SharedBuffer::getSomeData):
3750         * platform/SharedBufferChunkReader.cpp:
3751         (WebCore::SharedBufferChunkReader::nextChunk):
3752         * platform/audio/HRTFDatabase.cpp:
3753         (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
3754         * platform/graphics/GlyphPageTreeNode.cpp:
3755         (WebCore::GlyphPageTreeNode::initializePage):
3756         * platform/graphics/Region.cpp:
3757         (WebCore::Region::Shape::segments_end):
3758         * platform/graphics/filters/FEComponentTransfer.cpp:
3759         (WebCore::FEComponentTransfer::getValues):
3760         * platform/graphics/filters/FilterEffect.cpp:
3761         (WebCore::FilterEffect::inputEffect):
3762         * platform/text/TextCodecUTF8.cpp:
3763         (WebCore::TextCodecUTF8::decode):
3764         * platform/text/mac/TextCodecMac.cpp:
3765         (WebCore::TextCodecMac::decode):
3766         * rendering/RenderBlockLineLayout.cpp:
3767         (WebCore::RenderBlock::checkFloatsInCleanLine):
3768         * svg/SVGAnimatedTypeAnimator.h:
3769         (WebCore::SVGAnimatedTypeAnimator::executeAction):
3770         * svg/SVGAnimationElement.cpp:
3771         (WebCore::SVGAnimationElement::calculatePercentForSpline):
3772         * svg/animation/SVGSMILElement.cpp:
3773         (WebCore::SVGSMILElement::findInstanceTime):
3774
3775 2013-02-10  Chris Fleizach  <cfleizach@apple.com>
3776
3777         WebSpeech: Implement basic speaking/finished speaking behavior
3778         https://bugs.webkit.org/show_bug.cgi?id=107135
3779
3780         Reviewed by Sam Weinig.
3781
3782         Implements the basic functionality of speaking utterances.
3783
3784         In the WebCore side, it manages the speech queue the way the spec defines
3785         (that is, new jobs are appended to a queue and wait for other jobs to finish).
3786
3787         On the Mac side, it instantiates a synthesizer and handles the callbacks for when
3788         jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
3789
3790         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
3791
3792         * Modules/speech/SpeechSynthesis.cpp:
3793         (WebCore::SpeechSynthesis::SpeechSynthesis):
3794         (WebCore::SpeechSynthesis::paused):
3795         (WebCore::SpeechSynthesis::startSpeakingImmediately):
3796         (WebCore::SpeechSynthesis::speak):
3797         (WebCore):
3798         (WebCore::SpeechSynthesis::fireEvent):
3799         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
3800         (WebCore::SpeechSynthesis::didStartSpeaking):
3801         (WebCore::SpeechSynthesis::didFinishSpeaking):
3802         (WebCore::SpeechSynthesis::speakingErrorOccurred):
3803         * Modules/speech/SpeechSynthesis.h:
3804         (WebCore):
3805         (WebCore::SpeechSynthesis::speaking):
3806         (SpeechSynthesis):
3807         * Modules/speech/SpeechSynthesisEvent.cpp:
3808         (WebCore::SpeechSynthesisEvent::create):
3809         (WebCore):
3810         (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
3811         * Modules/speech/SpeechSynthesisEvent.h:
3812         (SpeechSynthesisEvent):
3813         (WebCore::SpeechSynthesisEvent::interfaceName):
3814         * Modules/speech/SpeechSynthesisUtterance.h:
3815         (WebCore::SpeechSynthesisUtterance::startTime):
3816         (WebCore::SpeechSynthesisUtterance::setStartTime):
3817         (SpeechSynthesisUtterance):
3818         * platform/PlatformSpeechSynthesisUtterance.cpp:
3819         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
3820         * platform/PlatformSpeechSynthesisUtterance.h:
3821         (PlatformSpeechSynthesisUtterance):
3822         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
3823         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
3824         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
3825         (WebCore::PlatformSpeechSynthesisUtterance::startTime):
3826         (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
3827         (WebCore::PlatformSpeechSynthesisUtterance::client):
3828         * platform/PlatformSpeechSynthesizer.cpp:
3829         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3830         * platform/PlatformSpeechSynthesizer.h:
3831         (PlatformSpeechSynthesizerClient):
3832         (WebCore::PlatformSpeechSynthesizer::client):
3833         (PlatformSpeechSynthesizer):
3834         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3835         (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
3836         (-[WebSpeechSynthesisWrapper dealloc]):
3837         (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
3838         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3839         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
3840         (WebCore::PlatformSpeechSynthesizer::speak):
3841
3842 2013-02-10  Eric Seidel  <eric@webkit.org>
3843
3844         Make the existing HTMLPreloadScanner threading-aware
3845         https://bugs.webkit.org/show_bug.cgi?id=107807
3846
3847         Reviewed by Adam Barth.
3848
3849         The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
3850         CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
3851         HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
3852         HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
3853         to get a realistic stream of tokens.  It does some additional TreeBuilder
3854         emulation, including tracking template tags and base tags, but mostly
3855         just scans the token stream for start-tags and looks for URLs in them.
3856         It tracks when it has seen a <style> tag and starts sending all character tokens
3857         to the CSSPreloadScanner until a </style> tag is seen.
3858         It also (unfortunately) knows some about the loader guts and how to construct
3859         a proper CachedResourcRequest and issue a preload.
3860
3861         This patch changes the model so that the preload scanners only know how to produce
3862         PreloadRequest objects and append them to a passed-in vector.
3863
3864         This changes the preload-scanner behavior so that preloads are now all issued in one large
3865         batch at the end of scanning, instead of as we hit each resource.  It's possible that
3866         we'll wait to instead check for preload requests more often, at a possible tradeoff
3867         to tokenizing speed.
3868
3869         An alternate approach might be to pass in a preload-delegate of sorts which knew how
3870         to either build a vector, or send requests immediately.  For now the build-a-vector-always
3871         approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
3872
3873         This patch has 2 main pieces:
3874         - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
3875           This is done through introduction of a new HTMLResourcePreloader class which holds
3876           a Document* and knows how to talk to the CachedResourceLoader.
3877         - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
3878           (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
3879            be passed in tokens and expected to issue loads if necessary.)
3880
3881         This passes all of the LayoutTests using the main thread parser.
3882
3883         This patch does not make the HTMLPreloadScanner 100% ready for threading
3884         (it still uses AtomicString which is currently not-OK on the parser thread)
3885         but it's very close.  Two further (already written) patches will complete this.
3886
3887         * CMakeLists.txt:
3888         * GNUmakefile.list.am:
3889         * Target.pri:
3890         * WebCore.gypi:
3891         * WebCore.vcproj/WebCore.vcproj:
3892         * WebCore.vcxproj/WebCore.vcxproj:
3893         * WebCore.xcodeproj/project.pbxproj:
3894         * html/parser/CSSPreloadScanner.cpp:
3895         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
3896         (WebCore::CSSPreloadScanner::scan):
3897         (WebCore::CSSPreloadScanner::emitRule):
3898         * html/parser/CSSPreloadScanner.h:
3899         (CSSPreloadScanner):
3900         * html/parser/HTMLDocumentParser.cpp:
3901         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3902         (WebCore::HTMLDocumentParser::pumpTokenizer):
3903         (WebCore::HTMLDocumentParser::insert):
3904         (WebCore::HTMLDocumentParser::append):
3905         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
3906         * html/parser/HTMLDocumentParser.h:
3907         (HTMLDocumentParser):
3908         * html/parser/HTMLPreloadScanner.cpp:
3909         (WebCore::isStartTag):
3910         (WebCore):
3911         (WebCore::isStartOrEndTag):
3912         (WebCore::PreloadTask::processAttributes):
3913         (WebCore::PreloadTask::charset):
3914         (PreloadTask):
3915         (WebCore::PreloadTask::resourceType):
3916         (WebCore::PreloadTask::shouldPreload):
3917         (WebCore::PreloadTask::createPreloadRequest):
3918         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
3919         (WebCore::HTMLPreloadScanner::scan):
3920         (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
3921         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
3922         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
3923         (WebCore::HTMLPreloadScanner::processToken):
3924         * html/parser/HTMLPreloadScanner.h:
3925         (HTMLPreloadScanner):
3926         * html/parser/HTMLResourcePreloader.cpp: Added.
3927         (WebCore):
3928         (WebCore::isStringSafeToSendToAnotherThread):
3929         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
3930         (WebCore::PreloadRequest::completeURL):
3931         (WebCore::PreloadRequest::resourceRequest):
3932         (WebCore::HTMLResourcePreloader::preload):
3933         * html/parser/HTMLResourcePreloader.h: Added.
3934         (WebCore):
3935         (PreloadRequest):
3936         (WebCore::PreloadRequest::create):
3937         (WebCore::PreloadRequest::PreloadRequest):
3938         (HTMLResourcePreloader):
3939         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
3940         (WebCore::HTMLResourcePreloader::createWeakPtr):
3941         * loader/cache/CachedResourceRequest.h:
3942
3943 2013-02-06  Kentaro Hara  <haraken@chromium.org>
3944
3945         [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
3946         https://bugs.webkit.org/show_bug.cgi?id=109039
3947
3948         Reviewed by Adam Barth.
3949
3950         This is a follow-up patch for r141983.
3951         Rename methods for consistency.
3952
3953         No tests. No change in behavior.
3954
3955         * bindings/v8/DOMDataStore.cpp:
3956         (WebCore::DOMDataStore::current):
3957         * bindings/v8/DOMWrapperWorld.h:
3958         (WebCore::DOMWrapperWorld::getWorld):
3959         * bindings/v8/ScriptController.cpp:
3960         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
3961         (WebCore::ScriptController::currentWorldContext):
3962         * bindings/v8/V8Binding.h:
3963         (WebCore::worldForEnteredContext):
3964         * bindings/v8/WorldContextHandle.cpp:
3965         (WebCore::WorldContextHandle::WorldContextHandle):
3966         * bindings/v8/custom/V8DocumentCustom.cpp:
3967         (WebCore::wrap):
3968         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
3969         (WebCore::wrap):
3970         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
3971         (WebCore::wrap):
3972         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3973         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
3974
3975 2013-02-10  Alexandre Elias  <aelias@chromium.org>
3976
3977         [chromium] Fix Android scrollbar size
3978         https://bugs.webkit.org/show_bug.cgi?id=109374
3979
3980         Reviewed by James Robinson.
3981
3982         This shrinks scrollbars to 3 device-independent pixels (usually 6
3983         physical pixels) and deletes the edge fade. Although the Android
3984         system theme does have an edge fade, it's a much sharper cliff
3985         than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
3986         and I can't perceive any difference compared with no fade at all.
3987
3988         No new tests (due for rewrite in a week anyway).
3989
3990         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3991         (WebCore):
3992         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
3993
3994 2013-02-04  Kentaro Hara  <haraken@chromium.org>
3995
3996         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
3997         https://bugs.webkit.org/show_bug.cgi?id=108579
3998
3999         Reviewed by Adam Barth.
4000
4001         Currently V8GCController::m_edenNodes stores a list of nodes whose
4002         wrappers have been created since the latest GC. The reason why we
4003         needed m_edenNodes is that there was no way to know a list of wrappers
4004         in the new space of V8. By using m_edenNodes, we had been approximating
4005         'wrappers in the new space' by 'wrappers that have been created since
4006         the latest GC'.
4007
4008         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
4009         can know a list of wrappers in the new space. By using the API, we can
4010         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
4011         need to keep m_edenNodes and that (2) it enables more precise minor
4012         DOM GC (Remember that m_edenNodes was just an approximation).
4013
4014         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
4015         The benchmark runs 300 iterations, each of which creates 100000 elements.
4016         The benchmark measures average, min, median, max and stdev of execution times
4017         of the 300 iterations. This will tell us the worst-case overhead of this change.
4018
4019         Before:
4020           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
4021
4022         After:
4023           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
4024
4025         As shown above, I couldn't observe any performance regression.
4026
4027         No tests. No change in behavior.
4028
4029         * bindings/v8/DOMDataStore.h:
4030         (WebCore::DOMDataStore::setWrapperInObject):