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