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