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