Initialize QualifiedName's strings from the read only data segment
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-25  Benjamin Poulain  <bpoulain@apple.com>
2
3         Initialize QualifiedName's strings from the read only data segment
4         https://bugs.webkit.org/show_bug.cgi?id=92226
5
6         Reviewed by Anders Carlsson.
7
8         Modify the initialization of static QualifiedName to initialize the AtomicString
9         with the data from the read only memory.
10
11         Overall, HTMLNames::init() gets 10% faster.
12
13         * dom/QualifiedName.cpp:
14         (WebCore::QualifiedName::QualifiedName):
15         * dom/QualifiedName.h:
16         (QualifiedName):
17         Remove the useless constructor taking a char* and get rid of the init() function.
18         The AtomicString representing the name should be constructed by the caller of QualifiedName.
19
20         Because the init() code is relatively large and is only executed once, it is important to
21         keep the AtomicString construction separate. The function createQualifiedName() was added
22         to improve the cache use. The short version let us reduce the code one more instruction per
23         call.
24
25         * dom/make_names.pl:
26         (printQualifiedNameMaker):
27         (printShortQualifiedNameMaker):
28         (printNamesCppFile):
29         (printDefinitions):
30
31 2012-07-25  Yoshifumi Inoue  <yosin@chromium.org>
32
33         [Forms] Move HTMLInputElement::updateInnerTextValue to InputType class
34         https://bugs.webkit.org/show_bug.cgi?id=92230
35
36         Reviewed by Kent Tamura.
37
38         This patch moves implementaion of HTMLInputElement::updateInnerTextValue()
39         into input type classes, removes updateInnerTextValue() from HTMLInputElement,
40         and updates call site of updateInnerTextValue().
41
42         No new tests. This patch doesn't change behavior.
43
44         * html/DateInputType.cpp:
45         (WebCore::DateInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
46         * html/HTMLInputElement.cpp:
47         (WebCore::HTMLInputElement::updateType): Updated call site of updateInnerTextValue().
48         (WebCore::HTMLInputElement::parseAttribute): Updated call site of updateInnerTextValue().
49         (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement): Updated call site of updateInnerTextValue().
50         (WebCore::HTMLInputElement::setSuggestedValue): Updated call site of updateInnerTextValue().
51         * html/HTMLInputElement.h:
52         (HTMLInputElement): Removed updateInnerTextValue().
53         * html/InputType.cpp:
54         (WebCore::InputType::updateInnerTextValue): Added default implementaion.
55         * html/InputType.h:
56         (InputType): Added declaration of updateInnerTextValue().
57         * html/NumberInputType.cpp:
58         (WebCore::NumberInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
59         * html/TextFieldInputType.cpp:
60         (WebCore::TextFieldInputType::setValue): Updated call site of updateInnerTextValue().
61         (WebCore::TextFieldInputType::updateInnerTextValue): Moved implementaion from HTMLInputElement.
62         * html/TextFieldInputType.h:
63         (TextFieldInputType): Added declaration of updateInnerTextValue().
64
65 2012-07-25  Dana Jansens  <danakj@chromium.org>
66
67         [chromium] Move ephemeral data for a single frame in LayerRendererChromium into a structure with a scoped lifetime equal to the frame
68         https://bugs.webkit.org/show_bug.cgi?id=92294
69
70         Reviewed by Adrienne Walker.
71
72         The LayerRendererChromium class has a number of member variables that are used
73         while drawing a single frame. Because they are member variables, their lifetimes
74         are not clear, and some are even updated between frames, which is not needed.
75
76         This change creates a LRC::DrawingFrame structure that holds the data used
77         while drawing the current frame, and an instance of this structure is held
78         and passed around to functions in LayerRendererChromium, moving all of the
79         data out from being member variables on the class to being function
80         arguments on the relevant methods.
81
82         The projection and window matrices are a part of this frame data, and are not
83         used externally, so they are removed from the CCRenderer interface and included
84         within the DrawingFrame structure.
85
86         Covered by existing tests, no change in behaviour intended.
87
88         * platform/graphics/chromium/LayerRendererChromium.cpp:
89         (WebCore::LayerRendererChromium::LayerRendererChromium):
90         (WebCore::LayerRendererChromium::viewportChanged):
91         (WebCore::LayerRendererChromium::clearFramebuffer):
92         (WebCore::LayerRendererChromium::drawFrame):
93         (WebCore::LayerRendererChromium::drawRenderPass):
94         (WebCore::LayerRendererChromium::drawQuad):
95         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
96         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
97         (WebCore::LayerRendererChromium::drawBackgroundFilters):
98         (WebCore::LayerRendererChromium::drawRenderPassQuad):
99         (WebCore::LayerRendererChromium::drawSolidColorQuad):
100         (WebCore::LayerRendererChromium::drawTileQuad):
101         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
102         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
103         (WebCore::LayerRendererChromium::drawTextureQuad):
104         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
105         (WebCore::LayerRendererChromium::finishDrawingFrame):
106         (WebCore::LayerRendererChromium::drawTexturedQuad):
107         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
108         (WebCore::LayerRendererChromium::isCurrentRenderPass):
109         (WebCore::LayerRendererChromium::useRenderPass):
110         (WebCore::LayerRendererChromium::useScopedTexture):
111         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
112         (WebCore::LayerRendererChromium::setScissorToRect):
113         (WebCore::LayerRendererChromium::setDrawFramebufferRect):
114         * platform/graphics/chromium/LayerRendererChromium.h:
115         (DrawingFrame):
116         (WebCore::LayerRendererChromium::DrawingFrame::DrawingFrame):
117         (LayerRendererChromium):
118         * platform/graphics/chromium/cc/CCRenderer.h:
119         (CCRenderer):
120
121 2012-07-19  Adrienne Walker  <enne@google.com>
122
123         [chromium] Make all compositor screen space transforms operate on content rects
124         https://bugs.webkit.org/show_bug.cgi?id=91807
125
126         Reviewed by Kenneth Russell.
127
128         Previously, surface screen space transforms operated on surface
129         content space but layer screen space transforms operated on layer
130         space. For the purpose of consistency, unify these two so that they
131         both operate on content space.
132
133         No tests, because no change in behavior expected. Just a refactoring.
134
135         * platform/graphics/chromium/LayerChromium.h:
136         (LayerChromium):
137         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
138         (WebCore::CCDebugRectHistory::savePaintRects):
139         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
140         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
141         (WebCore::calculateDrawTransformsInternal):
142         (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint):
143         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
144         (WebCore::::markOccludedBehindLayer):
145         (WebCore::::occluded):
146         (WebCore::::unoccludedContentRect):
147
148 2012-07-25  Dan Bernstein  <mitz@apple.com>
149
150         Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column
151         https://bugs.webkit.org/show_bug.cgi?id=92311
152
153         Reviewed by Anders Carlsson.
154
155         Tests: fast/multicol/hit-test-end-of-column.html
156                fast/multicol/hit-test-gap-block-axis.html
157
158         * rendering/RenderBlock.cpp:
159         (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last
160         line on a given column from returning the next line in the next column, added a check if
161         the hit occurred within the pagination strut of a line. Covered by the first test.
162         (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the
163         block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding
164         into the top of the next column. Covered by the second test.
165
166 2012-07-25  David Grogan  <dgrogan@chromium.org>
167
168         IndexedDB: Make db.version return an integer if appropriate
169         https://bugs.webkit.org/show_bug.cgi?id=92195
170
171         Reviewed by Tony Chang.
172
173         Make use of the existing IDBAny mechanism to return an integer if
174         integer versions have been used.
175
176         No new tests - no change in behavior expected.
177
178         * Modules/indexeddb/IDBDatabase.cpp:
179         (WebCore::IDBDatabase::version):
180         (WebCore):
181         * Modules/indexeddb/IDBDatabase.h:
182         (IDBDatabase):
183         * Modules/indexeddb/IDBDatabase.idl:
184
185 2012-07-25  Michael Saboff  <msaboff@apple.com>
186
187         Convert HTML parser to handle 8-bit resources without converting to UChar*
188         https://bugs.webkit.org/show_bug.cgi?id=90321
189
190         Reviewed by Geoffrey Garen.
191
192         No new tests, no new functionality therefore covered by existing tests.
193
194         Changed the parsing of HTML to handle 8-bit strings without converting the 
195         whole string to 16-bits.  Primary change was to use the appropriate 
196         character pointer type (LChar* or UChar*) depending on the source string.
197         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
198         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
199         and advanceAndUpdateLineNumber() methods have been refactored into a
200         state machine managed pair of function pointers.  The possible functions
201         have not only the 8 and 16 bitness factored out, they also have the 
202         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
203         This provides a net speed-up even with the 8/16 bit testing.
204         Other changes involve using String methods to access and compare with the
205         source data.
206
207         * html/FTPDirectoryDocument.cpp:
208         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
209         instead of SegmentedString '*' operator.
210         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
211         SegmentedString '*' operator.
212         * html/parser/HTMLParserIdioms.cpp:
213         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
214         * html/parser/HTMLSourceTracker.cpp:
215         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
216         SegmentedString '*' operator.
217         * loader/cache/CachedScript.cpp:
218         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
219         * platform/text/SegmentedString.cpp:
220         (WebCore::SegmentedString::SegmentedString):
221         (WebCore::SegmentedString::operator=):
222         (WebCore::SegmentedString::clear):
223         (WebCore::SegmentedString::append):
224         (WebCore::SegmentedString::prepend):
225         (WebCore::SegmentedString::advanceSubstring):
226         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
227         advance function.
228         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
229         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
230         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
231         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
232         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
233         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
234         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
235         8 and 16 bit advance.
236         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
237         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
238         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
239         * platform/text/SegmentedString.h:
240         (WebCore::SegmentedSubstring::SegmentedSubstring):
241         (WebCore::SegmentedSubstring::clear):
242         (SegmentedSubstring):
243         (WebCore::SegmentedSubstring::is8Bit): New getter.
244         (WebCore::SegmentedSubstring::appendTo):
245         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
246         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
247         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
248         that pre-increments the 8 bit pointer and returns the next character.
249         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
250         that pre-increments the 16 bit pointer and returns the next character.
251         (WebCore::SegmentedSubstring::currentSubString):
252         (WebCore::SegmentedSubstring::getCurrentChar):
253         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
254         (WebCore::SegmentedString::SegmentedString):
255         (WebCore::SegmentedString::push):
256         (WebCore::SegmentedString::isEmpty):
257         (WebCore::SegmentedString::lookAhead):
258         (WebCore::SegmentedString::lookAheadIgnoringCase):
259         (WebCore::SegmentedString::advance):
260         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
261         (WebCore::SegmentedString::advanceAndASSERT):
262         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
263         (WebCore::SegmentedString::advancePastNonNewline):
264         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
265         (WebCore::SegmentedString::currentChar):
266         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
267         functions.
268         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
269         change to slow case functions when only one character left.
270         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
271         functions based on current substring.
272         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
273         (WebCore::SegmentedString::lookAheadSlowCase):
274         * xml/parser/CharacterReferenceParserInlineMethods.h:
275         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
276         SegmentedString '*' operator.
277         * xml/parser/MarkupTokenizerBase.h:
278         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
279         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
280         currentChar() instead of SegmentedString '*' operator.
281         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
282
283 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
284
285         Unreviewed, rolling out r123625 and r123672.
286         http://trac.webkit.org/changeset/123625
287         http://trac.webkit.org/changeset/123672
288         https://bugs.webkit.org/show_bug.cgi?id=92315
289
290         Broke Windows and gcc builds (Requested by rniwa on #webkit).
291
292         * platform/AutodrainedPool.h:
293         (AutodrainedPool):
294         * platform/ContentType.h:
295         (ContentType):
296         * platform/ContextMenu.h:
297         (ContextMenu):
298         * platform/ContextMenuItem.h:
299         (ContextMenuItem):
300         * platform/Cursor.h:
301         (WebCore::SharedCursor::SharedCursor):
302         (Cursor):
303         * platform/KURL.h:
304         (WebCore::KURL::KURL):
305         (KURL):
306         * platform/KURLGooglePrivate.h:
307         (KURLGooglePrivate):
308         * platform/PODRedBlackTree.h:
309         (WebCore::PODRedBlackTree::PODRedBlackTree):
310         * platform/Pasteboard.h:
311         (Pasteboard):
312         * platform/PlatformEvent.h:
313         (WebCore::PlatformEvent::PlatformEvent):
314         * platform/PlatformKeyboardEvent.h:
315         (PlatformKeyboardEvent):
316         * platform/PlatformMouseEvent.h:
317         (PlatformMouseEvent):
318         * platform/PlatformPasteboard.h:
319         (PlatformPasteboard):
320         * platform/PlatformTouchEvent.h:
321         (PlatformTouchEvent):
322         * platform/PlatformWheelEvent.h:
323         (PlatformWheelEvent):
324         * platform/RunLoop.h:
325         (TimerBase):
326         * platform/ScrollAnimator.h:
327         (ScrollAnimator):
328         * platform/ScrollAnimatorNone.h:
329         (ScrollAnimatorNone):
330         * platform/SharedBuffer.h:
331         (SharedBuffer):
332         * platform/WheelFlingPlatformGestureCurve.h:
333         (WheelFlingPlatformGestureCurve):
334         * platform/Widget.h:
335         (Widget):
336         * platform/network/cf/ResourceRequestCFNet.cpp:
337         (WebCore::ResourceRequest::doUpdateResourceRequest):
338
339 2012-07-25  Ryosuke Niwa  <rniwa@webkit.org>
340
341         Windows build fix attempt after r123625.
342
343         * platform/network/cf/ResourceRequestCFNet.cpp:
344         (WebCore::ResourceRequest::doUpdateResourceRequest):
345
346 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
347
348         Read tag names and attributes from the saved tokens in HTMLTreeBuilder::resetInsertionModeAppropriately.
349         https://bugs.webkit.org/show_bug.cgi?id=92240
350
351         Reviewed by Adam Barth.
352
353         This is a follow-up patch for r123577. Added ItemType enum to HTMLStackItem to handle
354         the context element case.
355
356         No new tests, covered by existing tests.
357
358         * html/parser/HTMLStackItem.h:
359         (WebCore::HTMLStackItem::create):
360         (WebCore::HTMLStackItem::HTMLStackItem):
361         * html/parser/HTMLTreeBuilder.cpp:
362         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
363         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
364
365 2012-07-25  Nico Weber  <thakis@chromium.org>
366
367         [chromium/mac] Remove mac_bundle_resources section from WebCore.gyp
368         https://bugs.webkit.org/show_bug.cgi?id=92207
369
370         Reviewed by Tony Chang.
371
372         It's no longer needed after http://crrev.com/148290 and
373         http://crrev.com/148187.
374
375         * WebCore.gyp/WebCore.gyp:
376
377 2012-07-25  Dana Jansens  <danakj@chromium.org>
378
379         [chromium] Move WebFilterOperations from RenderPassDrawQuad to RenderPass
380         https://bugs.webkit.org/show_bug.cgi?id=91885
381
382         Reviewed by Adrienne Walker.
383
384         We move the filter operations to CCRenderPass to avoid having
385         variable-length data in a WebCompositorQuad in order to serialize,
386         and also to avoid requiring a virtual destructor for the quad
387         classes.
388
389         The drawFrame method now takes a CCRenderPassIdHashMap in order
390         to connect RenderPass quads to their source RenderPass.
391
392         Covered by existing tests.
393
394         * platform/graphics/chromium/LayerRendererChromium.cpp:
395         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
396         (WebCore::LayerRendererChromium::drawFrame):
397         (WebCore::LayerRendererChromium::beginDrawingFrame):
398         (WebCore::LayerRendererChromium::drawBackgroundFilters):
399         (WebCore::LayerRendererChromium::drawRenderPassQuad):
400         * platform/graphics/chromium/LayerRendererChromium.h:
401         (LayerRendererChromium):
402         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
403         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
404         (WebCore::CCLayerTreeHostImpl::drawLayers):
405         * platform/graphics/chromium/cc/CCRenderPass.h:
406         (WebCore::CCRenderPass::filters):
407         (WebCore::CCRenderPass::setFilters):
408         (CCRenderPass):
409         (WebCore::CCRenderPass::backgroundFilters):
410         (WebCore::CCRenderPass::setBackgroundFilters):
411         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
412         (WebCore::CCRenderPassDrawQuad::create):
413         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
414         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
415         (CCRenderPassDrawQuad):
416         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
417         (WebCore::CCRenderSurface::appendQuads):
418         * platform/graphics/chromium/cc/CCRenderer.h:
419         (CCRenderer):
420
421 2012-07-25  Mike Reed  <reed@google.com>
422
423         fix test in beginLayerClippedToImage to check for immutability if we're going to do a shallow-copy
424         https://bugs.webkit.org/show_bug.cgi?id=92276
425
426         Reviewed by Stephen White.
427
428         PlatformContextSkia::beginLayerClippedToImage
429
430         This function wants to apply the provided ImageBuffer as a clip. Skia does not support this natively yet,
431         so the code makes a "copy" of that imageBuffer, to be applied later. The old code, wanting to avoid a
432         deep copy if possible, checked for the presence of a SkPixelRef. If it found one, it made a shallow copy.
433         This is flawed, since the contents of a pixelref are not guaranteed to be immutable. The new code checks
434         against this attribute: if the bitmap is "immutable" then we can make a shallow-copy, else we make a
435         deep copy.
436
437         No new tests. Existing svg layouttests work w/ or w/out this change, but at the next Skia deps roll, we see
438         failures w/o this change. The change is more "correct", though the problem case does not exhibit itself until
439         Skia rev. 4722 or later lands.
440
441         * platform/graphics/skia/PlatformContextSkia.cpp:
442         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
443
444 2012-07-25  Li Yin  <li.yin@intel.com>
445
446         It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
447         https://bugs.webkit.org/show_bug.cgi?id=91364
448
449         Reviewed by Kenneth Russell.
450
451         Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section
452         It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
453
454         Test: webaudio/javascriptaudionode.html
455
456         * Modules/webaudio/JavaScriptAudioNode.cpp:
457         (WebCore::JavaScriptAudioNode::create):
458
459 2012-07-24  Shawn Singh  <shawnsingh@chromium.org>
460
461         [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code.
462         https://bugs.webkit.org/show_bug.cgi?id=88953
463
464         Reviewed by Adrienne Walker.
465
466         This is part 1 of trying to reduce the root layer special
467         case. This tries to reduce the special-ness of the root layer from
468         the perspective of outside code.
469
470         After this patch, code that uses calcDrawTransforms() no longer
471         needs to initialize the root layer's surface, and no longer needs
472         to manually append the root layer to the renderSurfaceLayerList.
473
474         Unit tests were also updated (much cleaner!) to account for this change.
475
476         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
477         (WebCore::CCLayerTreeHost::updateLayers):
478         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
479         (WebCore):
480         (WebCore::setupRootLayerAndSurfaceForRecursion):
481         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
482         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
483         (CCLayerTreeHostCommon):
484         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
485         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
486
487 2012-07-25  Taiju Tsuiki  <tzik@chromium.org>
488
489         FileSystem should provide a way to delete filesystem.
490         https://bugs.webkit.org/show_bug.cgi?id=91861
491
492         Reviewed by Adam Barth.
493
494         We will add a test when we wire-up the feature to Inspector.
495
496         * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
497         (WebCore::deleteFileSystem):
498         (WebCore):
499         (WebCore::LocalFileSystem::deleteFileSystem):
500         * Modules/filesystem/LocalFileSystem.h:
501         (LocalFileSystem):
502         * platform/AsyncFileSystem.cpp: Add deleteFileSystem
503         (WebCore):
504         (WebCore::AsyncFileSystem::deleteFileSystem):
505         * platform/AsyncFileSystem.h:
506         (AsyncFileSystem):
507         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
508         (WebCore::AsyncFileSystem::deleteFileSystem):
509         (WebCore):
510         * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
511         (WebCore::AsyncFileSystem::deleteFileSystem):
512         (WebCore):
513
514 2012-07-25  Andrey Adaikin  <aandrey@chromium.org>
515
516         Web Inspector: Add more jsdocs to InjectedScriptSource.js
517         https://bugs.webkit.org/show_bug.cgi?id=92255
518
519         Reviewed by Pavel Feldman.
520
521         * inspector/InjectedScriptSource.js:
522
523 2012-07-24  Dana Jansens  <danakj@chromium.org>
524
525         [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
526         https://bugs.webkit.org/show_bug.cgi?id=92182
527
528         Reviewed by Adrienne Walker.
529
530         By changing the HUD into a quad, we are able to create a HUD and pass
531         it to the host compositor, allowing the HUD to be used for renderers
532         under Ubercompositor.
533
534         This also removes the special drawing code for the HUD from
535         LayerRendererChromium, allowing us to move finishDrawingFrame
536         into LayerRendererChromium as a private method and remove it
537         from the CCRenderer interface.
538
539         Finally, we can remove the CCFontAtlas transport code from CCProxy
540         and its implementations as the atlas can be synced to impl thread
541         through the usual layer commit mechanism.
542
543         The debug HUD is not covered by tests.
544
545         * WebCore.gypi:
546         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
547         (WebCore):
548         (WebCore::HeadsUpDisplayLayerChromium::create):
549         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
550         (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
551         (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
552         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
553         (WebCore):
554         (HeadsUpDisplayLayerChromium):
555         * platform/graphics/chromium/LayerRendererChromium.cpp:
556         (WebCore::LayerRendererChromium::drawFrame):
557         (WebCore::LayerRendererChromium::cleanupSharedObjects):
558         * platform/graphics/chromium/LayerRendererChromium.h:
559         (LayerRendererChromium):
560         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
561         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
562         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
563         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
564         (WebCore):
565         (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
566         (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
567         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
568         (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
569         (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
570         (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
571         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
572         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
573         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
574         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
575         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
576         (WebCore):
577         (CCHeadsUpDisplayLayerImpl):
578         (WebCore::CCHeadsUpDisplayLayerImpl::create):
579         * platform/graphics/chromium/cc/CCLayerImpl.h:
580         (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
581         This flag is used to mark the HUD as always damaged, so that it is
582         continually drawn on the impl thread. It is also used as a hint by
583         the CCDebugRectHistory class to not include the layer in the display
584         of damage, since always damaged is not interesting damage.
585         (CCLayerImpl):
586         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
587         (WebCore::CCLayerTreeHost::create):
588         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
589         (WebCore::CCLayerTreeHost::initialize):
590         (WebCore::CCLayerTreeHost::willCommit):
591         (WebCore::CCLayerTreeHost::didCommit):
592         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
593         (CCLayerTreeSettings):
594         (WebCore::CCLayerTreeSettings::showDebugInfo):
595         (WebCore::CCLayerTreeSettings::showDebugRects):
596         (CCLayerTreeHost):
597         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
598         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
599         (WebCore::CCLayerTreeHostImpl::drawLayers):
600         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
601         (WebCore):
602         (CCLayerTreeHostImpl):
603         * platform/graphics/chromium/cc/CCProxy.h:
604         (CCProxy):
605         * platform/graphics/chromium/cc/CCRenderer.h:
606         (CCRenderer):
607         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
608         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
609         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
610         * platform/graphics/chromium/cc/CCThreadProxy.h:
611         (CCThreadProxy):
612
613 2012-07-25  'Pavel Feldman'  <pfeldman@chromium.org>
614
615         Web Inspector: follow up to r123612, fixing CSS value suggest.
616
617         Not reviewed, minor JS fix.
618
619         * inspector/front-end/CSSCompletions.js:
620         (WebInspector.CSSCompletions):
621         * inspector/front-end/StylesSidebarPane.js:
622         (WebInspector.StylePropertyTreeElement.prototype):
623
624 2012-07-25  Michael Saboff  <msaboff@apple.com>
625
626         Unreviewed build fix after r123624.
627
628         * inspector/InspectorPageAgent.cpp:
629         (WebCore::InspectorPageAgent::clearGeolocationOverride):
630         Changed ASSERT_UNUSED() to UNUSED_PARAM().
631
632 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
633
634         Web inspector auto-completes "optimizequality" but then complains
635         https://bugs.webkit.org/show_bug.cgi?id=92262
636
637         Reviewed by Timothy Hatcher.
638
639         Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
640
641         * inspector/front-end/CSSKeywordCompletions.js:
642
643 2012-07-25  Beth Dakin  <bdakin@apple.com>
644
645         https://bugs.webkit.org/show_bug.cgi?id=89114
646         REGRESSION (r112919): Setting scrollTop after setting display from none to block 
647         fails
648         -and corresponding-
649         <rdar://problem/11656050>
650
651         Reviewed by Simon Fraser.
652
653         ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() 
654         both have an optimization in place so that they do not call 
655         notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's 
656         cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with 
657         this optimization because it allowed RenderLayers to restore a scrollOffset from 
658         the Element if there is one cached there. This caused the RenderLayer to have a 
659         scrollOffset that is improperly out-of-synch with the ScrollAnimator's 
660         currentPosition (which will just be 0,0 since it is being re-created like the 
661         RenderLayer). This fix makes sure they are in synch by calling 
662         setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
663         * rendering/RenderLayer.cpp:
664         (WebCore::RenderLayer::RenderLayer):
665
666 2012-07-25  Andreas Kling  <kling@webkit.org>
667
668         Make ElementAttributeData a variable-sized object to reduce memory use.
669         <http://webkit.org/b/88240>
670
671         Reviewed by Ryosuke Niwa.
672
673         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
674         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
675         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
676         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
677
678         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
679         that nothing tries to mutate an element with a raw attribute array.
680
681         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
682         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
683
684         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
685         That is a ~35% reduction in DOM attribute memory use.
686
687         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
688         adding of "class" attributes. For more static pages, savings are even greater.
689
690         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
691         needed. Not a big deal but avoids double lookup of attributes when removing them.
692
693         * dom/Element.cpp:
694         (WebCore::Element::detachAttribute):
695         (WebCore::Element::removeAttribute):
696         (WebCore::Element::attributes):
697         (WebCore::Element::setAttributeInternal):
698         (WebCore::Element::parserSetAttributes):
699         (WebCore::Element::hasEquivalentAttributes):
700         (WebCore::Element::setAttributeNode):
701         (WebCore::Element::removeAttributeNode):
702         (WebCore::Element::getAttributeNode):
703         (WebCore::Element::getAttributeNodeNS):
704         (WebCore::Element::hasAttribute):
705         (WebCore::Element::hasAttributeNS):
706         (WebCore::Element::cloneAttributesFromElement):
707
708             Sprinkle const on ElementAttributeData* pointers.
709             Switch to using mutableAttributeData() in code paths that modify attributes.
710
711         (WebCore::Element::normalizeAttributes):
712
713             Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
714             was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
715             length() and attributeItem(index), use those to iterate directly over the attributes.
716
717         (WebCore::Element::createMutableAttributeData):
718
719             Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
720             ElementAttributeData (mutable and empty.)
721
722         * dom/Element.h:
723         (WebCore::Element::attributeData):
724         (WebCore::Element::updatedAttributeData):
725         (WebCore::Element::ensureAttributeData):
726         (WebCore::Element::ensureUpdatedAttributeData):
727
728             Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
729             attempts to modify an ElementAttributeData that may be immutable.
730
731             ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
732             The goal of having methods be const is to prevent conversion from one ElementAttributeData
733             object to another, so that pointers remain intact and no unnecessary work gets done.
734
735         (WebCore::Element::mutableAttributeData):
736
737             Added, returns a guaranteed mutable ElementAttributeData* pointer.
738
739         * dom/ElementAttributeData.cpp:
740         (WebCore::ElementAttributeData::createImmutable):
741
742             Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
743
744         (WebCore::ElementAttributeData::ElementAttributeData):
745
746             Moved constructors out-of-line, getting too complex for header files.
747
748             ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
749             containing the provided attributes in an array tacked onto the end of the object.
750
751         (WebCore::ElementAttributeData::~ElementAttributeData):
752
753             Free the attribute vector if mutable.
754             For immutable objects, manually invoke destructor on each Attribute object,
755             since these won't be destroyed automatically by ~ElementAttributeData.
756
757         (WebCore::ElementAttributeData::attrIfExists):
758
759         (WebCore::ElementAttributeData::ensureAttr):
760         (WebCore::ElementAttributeData::setAttr):
761         (WebCore::ElementAttributeData::removeAttr):
762
763             Make these const, as they should always have been- they don't affect the ElementAttributeData,
764             only the global DOM Attr <-> ElementAttributeData mappings.
765
766         (WebCore::ElementAttributeData::ensureInlineStyle):
767         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
768
769             Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
770             have mutable attribute data. There's still inlineStyle() for that, which may return null.
771             These are only for use where you need a valid StylePropertySet*, even if there is no inline style
772             attribute, e.g in editing code that wants to add style.
773
774         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
775         (WebCore::ElementAttributeData::destroyInlineStyle):
776
777             Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
778             contain a style attribute will have a valid inlineStyle() with that style data. This is just
779             an interface for ~StyledElement to destroy the style object.
780             It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
781             clean up properly and we don't store one in this class.
782
783         (WebCore::ElementAttributeData::addAttribute):
784         (WebCore::ElementAttributeData::removeAttribute):
785         (WebCore::ElementAttributeData::clearAttributes):
786         (WebCore::ElementAttributeData::replaceAttribute):
787
788             Sprinkle ASSERT(isMutable()).
789             Always go straight for m_mutableAttributeVector since we know that's the storage being used.
790
791         (WebCore::ElementAttributeData::isEquivalent):
792         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
793         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
794         (WebCore::ElementAttributeData::removeAttribute):
795         (WebCore::ElementAttributeData::getAttributeItem):
796         (WebCore::ElementAttributeData::getAttributeItemIndex):
797
798             Use length() and attributeItem(index) to iterate over the attributes.
799
800         (WebCore::ElementAttributeData::cloneDataFrom):
801
802             Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
803             attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
804             a semi-rare occurrence.
805
806             Updated code to handle both immutable and mutable source objects. This could 
807
808         (WebCore::ElementAttributeData::getAttributeNode):
809
810             Const correctness.
811
812         * dom/ElementAttributeData.h:
813         (ElementAttributeData):
814
815             Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
816             The new m_isMutable bit determines which union member should be used for access.
817
818         (WebCore::ElementAttributeData::create):
819         (WebCore::ElementAttributeData::createImmutable):
820
821             Added createImmutable(const Vector<Attribute>&) as a complement to create().
822
823         (WebCore::ElementAttributeData::setClass):
824         (WebCore::ElementAttributeData::setIdForStyleResolution):
825         (WebCore::ElementAttributeData::inlineStyle):
826         (WebCore::ElementAttributeData::setAttributeStyle):
827
828             Make these const, and their data member counterparts 'mutable'.
829             An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
830             m_inlineStyleDecl and m_attributeStyle.
831
832         (WebCore::ElementAttributeData::reportMemoryUsage):
833
834             Updated for isMutable().
835
836         (WebCore::ElementAttributeData::makeMutable):
837
838             Returns a mutable clone of itself.
839
840         (WebCore::ElementAttributeData::isEmpty):
841         (WebCore::ElementAttributeData::length):
842         (WebCore::ElementAttributeData::attributeItem):
843
844             Check isMutable() to know how to access attribute storage.
845
846         * dom/StyledElement.cpp:
847         (WebCore::StyledElement::style):
848         (WebCore::StyledElement::setInlineStyleProperty):
849
850             Simplify by using StyledElement::ensureInlineStyle().
851
852         (WebCore::StyledElement::classAttributeChanged):
853
854             Use mutableAttributeData() if the attribute is being removed completely.
855             In other cases, tiptoe around without causing the attribute data to go mutable.
856
857         (WebCore::StyledElement::removeInlineStyleProperty):
858
859             Use mutableAttributeData() if/when actually removing something.
860
861         (WebCore::StyledElement::addSubresourceAttributeURLs):
862
863             Const correctness.
864
865         * dom/StyledElement.h:
866         (WebCore::StyledElement::ensureInlineStyle):
867
868             This now implies conversion to mutable attribute data. Used by codepaths that add/remove
869             properties, so conversion is inevitable.
870
871         * html/parser/HTMLConstructionSite.cpp:
872         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
873         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
874         * svg/properties/SVGAnimatedPropertyMacros.h:
875         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
876
877             Use mutableAttributeData() as appropriate.
878
879         * xml/parser/XMLDocumentParserQt.cpp:
880         (WebCore::XMLDocumentParser::XMLDocumentParser):
881
882             Const correctness.
883
884 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
885
886         Unreviewed, rolling out r123560.
887         http://trac.webkit.org/changeset/123560
888         https://bugs.webkit.org/show_bug.cgi?id=90321
889
890         Breaks chromium valgrind tests.
891
892         * html/FTPDirectoryDocument.cpp:
893         (WebCore::FTPDirectoryDocumentParser::append):
894         * html/parser/HTMLEntityParser.cpp:
895         (WebCore::HTMLEntityParser::consumeNamedEntity):
896         * html/parser/HTMLParserIdioms.cpp:
897         (WebCore::stripLeadingAndTrailingHTMLSpaces):
898         * html/parser/HTMLSourceTracker.cpp:
899         (WebCore::HTMLSourceTracker::sourceForToken):
900         * loader/cache/CachedScript.cpp:
901         (WebCore::CachedScript::script):
902         * platform/text/SegmentedString.cpp:
903         (WebCore::SegmentedString::SegmentedString):
904         (WebCore::SegmentedString::operator=):
905         (WebCore::SegmentedString::clear):
906         (WebCore::SegmentedString::append):
907         (WebCore::SegmentedString::prepend):
908         (WebCore::SegmentedString::advanceSubstring):
909         (WebCore::SegmentedString::advance):
910         (WebCore::SegmentedString::advanceSlowCase):
911         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
912         * platform/text/SegmentedString.h:
913         (WebCore::SegmentedSubstring::SegmentedSubstring):
914         (WebCore::SegmentedSubstring::clear):
915         (WebCore::SegmentedSubstring::appendTo):
916         (SegmentedSubstring):
917         (WebCore::SegmentedString::SegmentedString):
918         (WebCore::SegmentedString::push):
919         (WebCore::SegmentedString::isEmpty):
920         (WebCore::SegmentedString::lookAhead):
921         (WebCore::SegmentedString::lookAheadIgnoringCase):
922         (WebCore::SegmentedString::advance):
923         (WebCore::SegmentedString::advanceAndASSERT):
924         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
925         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
926         (SegmentedString):
927         (WebCore::SegmentedString::advancePastNonNewline):
928         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
929         (WebCore::SegmentedString::operator*):
930         (WebCore::SegmentedString::operator->):
931         (WebCore::SegmentedString::current):
932         (WebCore::SegmentedString::equalsLiterally):
933         (WebCore::SegmentedString::equalsIgnoringCase):
934         (WebCore::SegmentedString::lookAheadInline):
935         (WebCore::SegmentedString::lookAheadSlowCase):
936         * xml/parser/CharacterReferenceParserInlineMethods.h:
937         (WebCore::consumeCharacterReference):
938         * xml/parser/MarkupTokenizerBase.h:
939         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
940         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
941         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
942
943 2012-07-25  Konrad Piascik  <kpiascik@rim.com>
944
945         Web Inspector: Geolocation override
946         https://bugs.webkit.org/show_bug.cgi?id=89365
947
948         Reviewed by Pavel Feldman.
949
950         Re-added the m_page member variable for GeolocationController since
951         it's now being used by InspectorInstrumentaiton.
952
953         Added a way to override the GeolocationPosition and GeolocationError
954         using Web Inspector. Curretnly only PositionError can be set.
955
956         This will be hidden behind the experiments flag for now.
957
958         Tests: inspector/geolocation-error.html
959                inspector/geolocation-success.html
960                inspector/geolocation-watchPosition.html
961
962         * English.lproj/localizedStrings.js:
963         * Modules/geolocation/GeolocationController.cpp:
964         (WebCore::GeolocationController::GeolocationController):
965         (WebCore::GeolocationController::positionChanged):
966         * Modules/geolocation/GeolocationController.h:
967         (GeolocationController):
968         * inspector/Inspector.json:
969         * inspector/InspectorInstrumentation.cpp:
970         (WebCore):
971         (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
972         * inspector/InspectorInstrumentation.h:
973         (WebCore):
974         (InspectorInstrumentation):
975         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
976         * inspector/InspectorPageAgent.cpp:
977         (WebCore::InspectorPageAgent::InspectorPageAgent):
978         (WebCore::InspectorPageAgent::setGeolocationOverride):
979         (WebCore):
980         (WebCore::InspectorPageAgent::clearGeolocationOverride):
981         (WebCore::InspectorPageAgent::canOverrideGeolocation):
982         (WebCore::InspectorPageAgent::overrideGeolocationPosition):
983         * inspector/InspectorPageAgent.h:
984         * inspector/front-end/Settings.js:
985         * inspector/front-end/SettingsScreen.js:
986         (WebInspector.UserAgentSettingsTab):
987         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
988         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
989         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
990         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
991         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
992         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
993         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
994         * inspector/front-end/UserAgentSupport.js:
995         (WebInspector.UserAgentSupport.GeolocationPosition):
996         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
997         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
998         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
999         (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
1000         * inspector/front-end/inspector.js:
1001         (WebInspector.doLoadedDone):
1002
1003 2012-07-25  Shawn Singh  <shawnsingh@chromium.org>
1004
1005         [chromium] Build fix for clang builds after r123628
1006         https://bugs.webkit.org/show_bug.cgi?id=92266
1007
1008         Reviewed by Adrienne Walker.
1009
1010         An un-used variable was causing build failures for clang builds
1011         after the refactoring in r123628.  It is correct to simply remove
1012         this value.
1013
1014         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1015         (WebCore::calculateDrawTransformsInternal):
1016
1017 2012-07-25  Hans Wennborg  <hans@chromium.org>
1018
1019         Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
1020         https://bugs.webkit.org/show_bug.cgi?id=92232
1021
1022         Reviewed by Adam Barth.
1023
1024         Extract code for creating emma-qualified names to a helper function.
1025
1026         Just a refactoring; covered by the existing test.
1027
1028         * Modules/speech/SpeechRecognitionResult.cpp:
1029         (WebCore::emmaQualifiedName):
1030         (WebCore):
1031         (WebCore::SpeechRecognitionResult::emma):
1032
1033 2012-07-25  Adrienne Walker  <enne@google.com>
1034
1035         [chromium] Unify compositor quadTransform/drawTransform/originTransform
1036         https://bugs.webkit.org/show_bug.cgi?id=91417
1037
1038         Reviewed by Kenneth Russell.
1039
1040         drawTransform used to operate on centered layer rects. To unify quad
1041         transforms, draw transforms, and origin transforms, make draw
1042         transforms operate on content rects with the origin in the top left.
1043
1044         This essentially eliminates the need for surface origin transforms,
1045         which will be eliminated in a future patch.
1046
1047         Also, remove the unused CCLayerImpl::getDrawRect function.
1048
1049         No-op refactoring. Tested by existing tests.
1050
1051         * platform/graphics/chromium/LayerRendererChromium.cpp:
1052         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1053         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1054         (WebCore::RenderSurfaceChromium::drawableContentRect):
1055         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1056         (WebCore::CCDamageTracker::extendDamageForLayer):
1057         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1058         (WebCore::CCLayerImpl::createSharedQuadState):
1059         * platform/graphics/chromium/cc/CCLayerImpl.h:
1060         (CCLayerImpl):
1061         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1062         (WebCore::CCLayerSorter::LayerShape::LayerShape):
1063         (WebCore::CCLayerSorter::createGraphNodes):
1064         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1065         (WebCore::calculateVisibleContentRect):
1066         (WebCore::calculateDrawTransformsInternal):
1067         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1068         (WebCore::::markOccludedBehindLayer):
1069         (WebCore::::occluded):
1070         (WebCore::::unoccludedContentRect):
1071         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1072         (WebCore::CCRenderPass::appendQuadsToFillScreen):
1073         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1074         (WebCore::CCRenderSurface::drawableContentRect):
1075
1076 2012-07-25  Tommy Widenflycht  <tommyw@google.com>
1077
1078         MediaStream API: Update MediaStreamTrack to match the specification
1079         https://bugs.webkit.org/show_bug.cgi?id=90180
1080
1081         Reviewed by Adam Barth.
1082
1083         MediaStreamTracks are now required to show the status of the underlying source,
1084         and trigger events when that status changes.
1085
1086         Test: fast/mediastream/MediaStreamTrack.html
1087
1088         * GNUmakefile.list.am:
1089         * Modules/mediastream/MediaStream.cpp:
1090         (WebCore::MediaStream::MediaStream):
1091         (WebCore::MediaStream::addTrack):
1092         * Modules/mediastream/MediaStreamTrack.cpp:
1093         (WebCore::MediaStreamTrack::create):
1094         (WebCore::MediaStreamTrack::MediaStreamTrack):
1095         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1096         (WebCore::MediaStreamTrack::setEnabled):
1097         (WebCore::MediaStreamTrack::readyState):
1098         (WebCore):
1099         (WebCore::MediaStreamTrack::sourceChangedState):
1100         (WebCore::MediaStreamTrack::stop):
1101         (WebCore::MediaStreamTrack::interfaceName):
1102         (WebCore::MediaStreamTrack::scriptExecutionContext):
1103         (WebCore::MediaStreamTrack::eventTargetData):
1104         (WebCore::MediaStreamTrack::ensureEventTargetData):
1105         * Modules/mediastream/MediaStreamTrack.h:
1106         * Modules/mediastream/MediaStreamTrack.idl:
1107         * WebCore.gypi:
1108         * dom/EventNames.h:
1109         (WebCore):
1110         * dom/EventTargetFactory.in:
1111         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1112         * platform/chromium/support/WebMediaStreamSource.cpp:
1113         (WebKit::WebMediaStreamSource::setReadyState):
1114         (WebKit):
1115         (WebKit::WebMediaStreamSource::readyState):
1116         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
1117         (WebCore):
1118         (WebCore::MediaStreamSource::create):
1119         (WebCore::MediaStreamSource::MediaStreamSource):
1120         (WebCore::MediaStreamSource::setReadyState):
1121         (WebCore::MediaStreamSource::addObserver):
1122         (WebCore::MediaStreamSource::removeObserver):
1123         * platform/mediastream/MediaStreamSource.h:
1124         (Observer):
1125         (WebCore::MediaStreamSource::Observer::~Observer):
1126         (MediaStreamSource):
1127         (WebCore::MediaStreamSource::readyState):
1128         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1129         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1130         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1131
1132 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1133
1134         Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
1135         https://bugs.webkit.org/show_bug.cgi?id=91061
1136
1137         Reviewed by Adam Barth.
1138
1139         The two functions are currently both returning the flooredLayoutUnit when subpixel
1140         layout is enabled. This patch changes them to return the correct fractional rounded
1141         value.
1142
1143         * platform/FractionalLayoutUnit.h:
1144         (WebCore::FractionalLayoutUnit::fromFloatCeil):
1145         (FractionalLayoutUnit):
1146         (WebCore::FractionalLayoutUnit::fromFloatRound):
1147         * rendering/LayoutTypes.h:
1148         (WebCore::roundedLayoutUnit):
1149         (WebCore::ceiledLayoutUnit):
1150         * rendering/RenderBlock.cpp:
1151         (WebCore::updatePreferredWidth):
1152
1153 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1154
1155         Add *explicit* keyword to constructors in WebCore/platform
1156         https://bugs.webkit.org/show_bug.cgi?id=92238
1157
1158         Reviewed by Kentaro Hara.
1159
1160         As a step to let *explicit* keyword add to constructors which have a parameter,
1161         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
1162         type conversion.
1163
1164         Some files in platform directory can't use explicit keyword because of build breaks.
1165
1166         No new tests. Covered by existing tests.
1167
1168         * platform/AutodrainedPool.h:
1169         (AutodrainedPool):
1170         * platform/ContentType.h:
1171         (ContentType):
1172         * platform/ContextMenu.h:
1173         (ContextMenu):
1174         * platform/ContextMenuItem.h:
1175         (ContextMenuItem):
1176         * platform/Cursor.h:
1177         (WebCore::SharedCursor::SharedCursor):
1178         (Cursor):
1179         * platform/KURL.h:
1180         (WebCore::KURL::KURL):
1181         (KURL):
1182         * platform/KURLGooglePrivate.h:
1183         (KURLGooglePrivate):
1184         * platform/PODRedBlackTree.h:
1185         (WebCore::PODRedBlackTree::PODRedBlackTree):
1186         * platform/Pasteboard.h:
1187         (Pasteboard):
1188         * platform/PlatformEvent.h:
1189         (WebCore::PlatformEvent::PlatformEvent):
1190         * platform/PlatformKeyboardEvent.h:
1191         (PlatformKeyboardEvent):
1192         * platform/PlatformMouseEvent.h:
1193         (PlatformMouseEvent):
1194         * platform/PlatformPasteboard.h:
1195         (PlatformPasteboard):
1196         * platform/PlatformTouchEvent.h:
1197         (PlatformTouchEvent):
1198         * platform/PlatformWheelEvent.h:
1199         (PlatformWheelEvent):
1200         * platform/RunLoop.h:
1201         (TimerBase):
1202         * platform/ScrollAnimator.h:
1203         (ScrollAnimator):
1204         * platform/ScrollAnimatorNone.h:
1205         (ScrollAnimatorNone):
1206         * platform/SharedBuffer.h:
1207         (SharedBuffer):
1208         * platform/WheelFlingPlatformGestureCurve.h:
1209         (WheelFlingPlatformGestureCurve):
1210         * platform/Widget.h:
1211         (Widget):
1212
1213 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1214
1215         NodesFromRect and area-based hit-testing can not handle CSS transforms.
1216         https://bugs.webkit.org/show_bug.cgi?id=85792
1217
1218         Reviewed by Eric Seidel.
1219
1220         To support the combination of CSS transforms and rect based hit testing,
1221         we need to test against the transformed rect, instead of the original rect.
1222
1223         This patch makes HitTestPoint store the exact transformed FloatPoint and 
1224         FloatQuad, and modifies the intersection methods so that they will use a 
1225         new FloatQuad based intersection when transforms requires it.
1226
1227         Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
1228                fast/dom/nodesFromRect/nodesFromRect-scale.html
1229
1230         * platform/graphics/FloatQuad.cpp:
1231         (WebCore::determinant):
1232         (WebCore::rightMostCornerToVector):
1233         (WebCore::FloatQuad::intersectsRect):
1234         (WebCore::FloatQuad::isCounterclockwise):
1235         * platform/graphics/FloatQuad.h:
1236         (FloatQuad):
1237         * rendering/HitTestResult.cpp:
1238         (WebCore::HitTestPoint::HitTestPoint):
1239         (WebCore::HitTestPoint::operator=):
1240         (WebCore::HitTestPoint::move):
1241         (WebCore::HitTestPoint::intersectsRect):
1242         (WebCore::HitTestPoint::intersects):
1243         * rendering/HitTestResult.h:
1244         (HitTestPoint):
1245         (WebCore::HitTestPoint::isRectilinear):
1246         (WebCore::HitTestPoint::transformedPoint):
1247         (WebCore::HitTestPoint::transformedRect):
1248         * rendering/HitTestingTransformState.cpp:
1249         (WebCore::HitTestingTransformState::flattenWithTransform):
1250         (WebCore::HitTestingTransformState::mappedArea):
1251         (WebCore::HitTestingTransformState::boundsOfMappedArea):
1252         * rendering/HitTestingTransformState.h:
1253         (WebCore::HitTestingTransformState::create):
1254         (WebCore::HitTestingTransformState::HitTestingTransformState):
1255         * rendering/RenderFlowThread.cpp:
1256         (WebCore::RenderFlowThread::hitTestRegion):
1257         * rendering/RenderLayer.cpp:
1258         (WebCore::RenderLayer::hitTest):
1259         (WebCore::RenderLayer::createLocalTransformState):
1260         (WebCore::RenderLayer::hitTestLayer):
1261         (WebCore::RenderLayer::hitTestChildLayerColumns):
1262         * rendering/RenderLayer.h:
1263         * rendering/svg/RenderSVGText.cpp:
1264         (WebCore::RenderSVGText::nodeAtFloatPoint):
1265
1266 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
1267
1268         Add HTMLStackItem.h to project files
1269         https://bugs.webkit.org/show_bug.cgi?id=92221
1270
1271         Reviewed by Adam Barth.
1272
1273         Added HTMLStackItem.h introduced in r123399 to project files.
1274
1275         Project file changes only, no change in behavior thus no new tests.
1276
1277         * GNUmakefile.list.am:
1278         * WebCore.gypi:
1279         * WebCore.vcproj/WebCore.vcproj:
1280         * WebCore.xcodeproj/project.pbxproj:
1281
1282 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1283
1284         Unreviewed, rolling out r123606.
1285         http://trac.webkit.org/changeset/123606
1286         https://bugs.webkit.org/show_bug.cgi?id=92247
1287
1288         broke Windows build of Chromium (Requested by tomhudson on
1289         #webkit).
1290
1291         * Resources/colorSuggestionPicker.css: Removed.
1292         * Resources/colorSuggestionPicker.js: Removed.
1293         * WebCore.gyp/WebCore.gyp:
1294
1295 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1296
1297         Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand.
1298         https://bugs.webkit.org/show_bug.cgi?id=92253
1299
1300         Reviewed by Vsevolod Vlasov.
1301
1302         Bug fix with a test and more compilation markup.
1303
1304         Test: inspector/styles/styles-disable-then-enable-overriden-ua.html
1305
1306         * inspector/front-end/StylesSidebarPane.js:
1307         (WebInspector.StylePropertiesSection.prototype.update):
1308         (WebInspector.StylePropertyTreeElement):
1309         (WebInspector.StylePropertyTreeElement.prototype):
1310
1311 2012-07-25  Vsevolod Vlasov  <vsevik@chromium.org>
1312
1313         Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value.
1314         https://bugs.webkit.org/show_bug.cgi?id=92225
1315
1316         Reviewed by Pavel Feldman.
1317
1318         Added tooltip with property value description on the property's valueElement.
1319
1320         * inspector/front-end/ObjectPropertiesSection.js:
1321         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1322
1323 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1324
1325         https://bugs.webkit.org/show_bug.cgi?id=91931
1326
1327         Reviewed by Vsevolod Vlasov.
1328
1329         - Synthetic shorthand values are now only returned for source-less styles
1330         - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
1331         - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
1332         - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
1333
1334         Test: inspector/styles/styles-overriden-properties.html
1335
1336         * inspector/Inspector.json:
1337         * inspector/InspectorCSSAgent.cpp:
1338         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1339         * inspector/InspectorCSSAgent.h:
1340         (InspectorCSSAgent):
1341         * inspector/InspectorStyleSheet.cpp:
1342         (WebCore::InspectorStyle::styleWithProperties):
1343         * inspector/front-end/CSSCompletions.js:
1344         (WebInspector.CSSCompletions):
1345         (WebInspector.CSSCompletions.requestCSSNameCompletions):
1346         (WebInspector.CSSCompletions.prototype._closest):
1347         (WebInspector.CSSCompletions.prototype.longhands):
1348         (WebInspector.CSSCompletions.prototype.shorthands):
1349         * inspector/front-end/CSSStyleModel.js:
1350         (WebInspector.CSSStyleDeclaration):
1351         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
1352         (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
1353         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
1354         (WebInspector.CSSProperty):
1355         (WebInspector.CSSProperty.parsePayload):
1356         * inspector/front-end/SourceCSSTokenizer.js:
1357         (WebInspector.SourceCSSTokenizer):
1358         * inspector/front-end/SourceCSSTokenizer.re2js:
1359         * inspector/front-end/StylesSidebarPane.js:
1360         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
1361         (WebInspector.StylePropertiesSection.prototype.update):
1362         (WebInspector.StylePropertiesSection.prototype.onpopulate):
1363         (WebInspector.StylePropertyTreeElement.prototype):
1364
1365 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1366
1367         Implement ColorSuggestionPicker page popup
1368         https://bugs.webkit.org/show_bug.cgi?id=92109
1369
1370         Reviewed by Kent Tamura.
1371
1372         Implements ColorSuggestionPicker page popup. This will be used in
1373         certain ports as the datalist UI for <input type=color>.
1374
1375         No new tests because there is no way to open the popup yet.
1376
1377         * Resources/colorSuggestionPicker.css: Added.
1378         (body):
1379         (#main):
1380         (.color-swatch):
1381         (.color-swatch:hover):
1382         (.color-swatch-container):
1383         (.other-color):
1384         * Resources/colorSuggestionPicker.js: Added.
1385         (getScrollbarWidth):When there are more than 20 colors we need to
1386         increase the window width to accommodate the scroll bar.
1387         (createElement):
1388         (handleMessage):
1389         (initialize):
1390         (handleArgumentsTimeout):
1391         (validateArguments):
1392         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
1393         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
1394         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
1395         (ColorPicker):
1396         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
1397         grid.
1398         (ColorPicker.prototype._handleSwatchClick):
1399         * WebCore.gyp/WebCore.gyp:
1400
1401 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1402
1403         Fix arithmetic composite filter for auto-vectorization
1404         https://bugs.webkit.org/show_bug.cgi?id=92123
1405
1406         Reviewed by Nikolas Zimmermann.
1407
1408         Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch 
1409         adds a faster version of the inner loop to handle cases where clamping is unnecessary, 
1410
1411         * platform/graphics/filters/FEComposite.cpp:
1412         (WebCore::computeArithmeticPixelsUnclamped):
1413         (WebCore::arithmeticSoftware):
1414
1415 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1416
1417         Fix blend filter for autovectorizing
1418         https://bugs.webkit.org/show_bug.cgi?id=91398
1419
1420         Reviewed by Nikolas Zimmermann.
1421
1422         Get rid of wrapper classes, and use functions directly as template argument.
1423
1424         * platform/graphics/filters/FEBlend.cpp:
1425         (WebCore::feBlendNormal):
1426         (WebCore::feBlendMultiply):
1427         (WebCore::feBlendScreen):
1428         (WebCore::feBlendDarken):
1429         (WebCore::feBlendLighten):
1430         (WebCore::feBlendUnknown):
1431         (WebCore::platformApply):
1432         (WebCore::FEBlend::platformApplyGeneric):
1433
1434 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1435
1436         Add methods to ColorChooserClient so the color chooser can show suggestions
1437         https://bugs.webkit.org/show_bug.cgi?id=92114
1438
1439         Reviewed by Kent Tamura.
1440
1441         Added methods to ColorChooserClient so the color chooser can ask the
1442         client for suggestions and current color.
1443
1444         No new tests. The methods are not used yet.
1445
1446         * html/ColorInputType.cpp:
1447         (WebCore::ColorInputType::currentColor): Returns what color the color
1448         chooser should display.
1449         (WebCore):
1450         (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
1451         suggestions should be shown.
1452         (WebCore::ColorInputType::suggestions): Returns a list of colors to be
1453         suggested to the user.
1454         * html/ColorInputType.h:
1455         (ColorInputType):
1456         * html/HTMLInputElement.h:
1457         (HTMLInputElement): Made dataList() public.
1458         * platform/ColorChooserClient.h:
1459         (ColorChooserClient):
1460
1461 2012-07-25  Kentaro Hara  <haraken@chromium.org>
1462
1463         Replace int with long in test IDL files
1464         https://bugs.webkit.org/show_bug.cgi?id=92181
1465
1466         Reviewed by Adam Barth.
1467
1468         int is not a valid type in WebIDL. It should be long.
1469         We should replace int with long in bindings/scripts/test/*.idl.
1470         This is a follow-up patch for r123550.
1471
1472         Test: bindings/scripts/test/TestObj.idl
1473
1474         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1475         (WebDOMTestObj::readOnlyLongAttr):
1476         (WebDOMTestObj::Attr):
1477         (WebDOMTestObj::setAttr):
1478         (WebDOMTestObj::voidMethodWithArgs):
1479         (WebDOMTestObj::Method):
1480         (WebDOMTestObj::MethodWithArgs):
1481         (WebDOMTestObj::objMethodWithArgs):
1482         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1483         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1484         (webkit_dom_test_obj_set_property):
1485         (webkit_dom_test_obj_get_property):
1486         (webkit_dom_test_obj_class_init):
1487         (webkit_dom_test_obj_void_method_with_args):
1488         (webkit_dom_test_obj_method):
1489         (webkit_dom_test_obj_method_with_args):
1490         (webkit_dom_test_obj_obj_method_with_args):
1491         (webkit_dom_test_obj_get_read_only_long_attr):
1492         (webkit_dom_test_obj_get_attr):
1493         (webkit_dom_test_obj_set_attr):
1494         (webkit_dom_test_obj_get_strawberry):
1495         (webkit_dom_test_obj_set_strawberry):
1496         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1497         * bindings/scripts/test/JS/JSTestObj.cpp:
1498         (WebCore):
1499         (WebCore::jsTestObjReadOnlyLongAttr):
1500         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
1501         (WebCore::jsTestObjAttr):
1502         (WebCore::setJSTestObjAttr):
1503         (WebCore::setJSTestObjStrawberry):
1504         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1505         (WebCore::jsTestObjPrototypeFunctionMethod):
1506         (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
1507         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1508         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1509         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1510         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1511         * bindings/scripts/test/JS/JSTestObj.h:
1512         (WebCore):
1513         * bindings/scripts/test/ObjC/DOMTestObj.h:
1514         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1515         (-[DOMTestObj readOnlyLongAttr]):
1516         (-[DOMTestObj Attr]):
1517         (-[DOMTestObj setAttr:]):
1518         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1519         (-[DOMTestObj Method]):
1520         (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
1521         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1522         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1523         * bindings/scripts/test/TestObj.idl:
1524         * bindings/scripts/test/V8/V8TestObj.cpp:
1525         (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
1526         (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
1527         (WebCore::TestObjV8Internal::AttrAttrGetter):
1528         (WebCore::TestObjV8Internal::AttrAttrSetter):
1529         (WebCore::TestObjV8Internal::strawberryAttrSetter):
1530         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1531         (WebCore::TestObjV8Internal::MethodCallback):
1532         (WebCore::TestObjV8Internal::MethodWithArgsCallback):
1533         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1534         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1535         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1536         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1537         (WebCore):
1538         (WebCore::ConfigureV8TestObjTemplate):
1539
1540 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
1541
1542         A validation bubble should not be modifiable.
1543         https://bugs.webkit.org/show_bug.cgi?id=92217
1544
1545         Reviewed by Kent Tamura.
1546
1547         A user can set -webkit-user-modify: read-write to validation message elements.
1548         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
1549
1550         Test: fast/forms/validation-user-modify.html
1551
1552         * css/html.css:
1553         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
1554         changed by a user.
1555         (::-webkit-validation-bubble):
1556         (::-webkit-validation-bubble-message):
1557         (::-webkit-validation-bubble-text-block):
1558         (::-webkit-validation-bubble-heading):
1559         (::-webkit-validation-bubble-arrow):
1560         (::-webkit-validation-bubble-arrow-clipper):
1561
1562 2012-07-25  Zeno Albisser  <zeno@webkit.org>
1563
1564         [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
1565         https://bugs.webkit.org/show_bug.cgi?id=92159
1566
1567         Disable CopyToTexture feature for GraphicsSurface on Mac.
1568         While this is actually working, it is currently used for Tiles
1569         that are single buffered, and therefore requires a call to glFlush.
1570         This call blocks the GPU for about 40ms which would make smooth animations impossible.
1571
1572         Reviewed by Noam Rosenthal.
1573
1574         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1575         (WebCore::GraphicsSurface::platformCreate):
1576         (WebCore::GraphicsSurface::platformImport):
1577
1578 2012-07-25  Kenichi Ishibashi  <bashi@chromium.org>
1579
1580         [Chromium] Fix up includes in HarfBuzzNGFace.h
1581         https://bugs.webkit.org/show_bug.cgi?id=92127
1582
1583         Reviewed by Hajime Morita.
1584
1585         Move constructors of FontPlatformData from headers to corresponding cpp files
1586         so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
1587         This way we can include hb.h in HarfBuzzNGFace.h.
1588
1589         No new tests. No changes in behavior.
1590
1591         * platform/graphics/FontPlatformData.cpp:
1592         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1593         (WebCore):
1594         * platform/graphics/FontPlatformData.h:
1595         (WebCore):
1596         (FontPlatformData): Moved to cpp file.
1597         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
1598         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1599         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1600         (WebCore):
1601         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1602         (WebCore):
1603         (FontPlatformData): Moved to cpp file.
1604         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
1605
1606 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
1607
1608         QualifiedName's HashSet should be big enough to hold at least all the static names
1609         https://bugs.webkit.org/show_bug.cgi?id=91891
1610
1611         Reviewed by Darin Adler.
1612
1613         QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
1614         we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
1615
1616         The small base size forces us to grow and rehash the table several time on startup.
1617
1618         This patch solves the issue by defining the initial table size to the minimum size that
1619         can hold all the static QualifiedName.
1620
1621         * dom/QualifiedName.cpp:
1622         (QualifiedNameHashTraits):
1623         * dom/make_names.pl:
1624         (printNamesHeaderFile):
1625
1626 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1627
1628         Remove anonymous namespace and make functions static.
1629         https://bugs.webkit.org/show_bug.cgi?id=92214
1630
1631         Reviewed by Adam Barth.
1632
1633         Mark functions as static instead of enclosing them in anonymous namespaces.
1634         One exception to this rule is when a function is passed as a template argument.
1635         In this case, the function must have an external linkage.
1636
1637         No functional change. Covered by existing tests.
1638
1639         * html/parser/HTMLConstructionSite.cpp:
1640         (WebCore::hasImpliedEndTag):
1641         (WebCore::causesFosterParenting):
1642         (WebCore::isAllWhitespace):
1643         * html/parser/HTMLDocumentParser.cpp:
1644         (WebCore):
1645         (WebCore::tokenizerStateForContextElement):
1646         * html/parser/HTMLElementStack.cpp:
1647         (WebCore::isNumberedHeaderElement):
1648         (WebCore::isRootNode):
1649         (WebCore):
1650         * html/parser/HTMLEntityParser.cpp:
1651         (WebCore::isAlphaNumeric):
1652         * html/parser/HTMLEntitySearch.cpp:
1653         (WebCore::halfway):
1654         * html/parser/HTMLPreloadScanner.cpp:
1655         (WebCore):
1656         * html/parser/HTMLTokenizer.cpp:
1657         (WebCore::toLowerCase):
1658         (WebCore::vectorEqualsString):
1659         (WebCore::isEndTagBufferingState):
1660         * html/parser/HTMLTreeBuilder.cpp:
1661         (WebCore):
1662         (WebCore::uninitializedPositionValue1):
1663         (WebCore::isAllWhitespace):
1664         (WebCore::isAllWhitespaceOrReplacementCharacters):
1665         (WebCore::isNumberedHeaderTag):
1666         (WebCore::isCaptionColOrColgroupTag):
1667         (WebCore::isTableCellContextTag):
1668         (WebCore::isTableBodyContextTag):
1669         (WebCore::isSpecialNode):
1670         (WebCore::isNonAnchorNonNobrFormattingTag):
1671         (WebCore::isNonAnchorFormattingTag):
1672         (WebCore::isFormattingTag):
1673         (WebCore::closestFormAncestor):
1674         (WebCore::mapLoweredLocalNameToName):
1675         (WebCore::adjustSVGTagNameCase):
1676         (WebCore::adjustAttributes):
1677         (WebCore::adjustSVGAttributes):
1678         (WebCore::adjustMathMLAttributes):
1679         (WebCore::addNamesWithPrefix):
1680         (WebCore::adjustForeignAttributes):
1681
1682 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
1683
1684         Unreviewed r123494 follow-up: fixed inspector undock icon.
1685
1686         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1687
1688 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1689
1690         Read tag names and attributes from the saved tokens where possible.
1691         https://bugs.webkit.org/show_bug.cgi?id=92079
1692
1693         Reviewed by Adam Barth.
1694
1695         Read tag names and attributes from the saved tokens, not from the DOM.
1696         Also added convenient methods such as hasLocalName, hasTagName, localName,
1697         isElementNode and isDocumentFragmentNode to HTMLStackItem class.
1698
1699         No new tests, covered by existing tests.
1700
1701         * html/parser/HTMLConstructionSite.cpp:
1702         (WebCore::HTMLNames::hasImpliedEndTag):
1703         (WebCore::HTMLNames::causesFosterParenting):
1704         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
1705         (WebCore::HTMLConstructionSite::generateImpliedEndTags):
1706         (WebCore::HTMLConstructionSite::shouldFosterParent):
1707         * html/parser/HTMLConstructionSite.h:
1708         (WebCore::HTMLConstructionSite::currentStackItem):
1709         * html/parser/HTMLElementStack.cpp:
1710         (WebCore::HTMLNames::isNumberedHeaderElement):
1711         (WebCore::HTMLNames::isRootNode):
1712         (WebCore::HTMLNames::isScopeMarker):
1713         (WebCore::HTMLNames::isListItemScopeMarker):
1714         (WebCore::HTMLNames::isTableScopeMarker):
1715         (WebCore::HTMLNames::isTableBodyScopeMarker):
1716         (WebCore::HTMLNames::isTableRowScopeMarker):
1717         (WebCore::HTMLNames::isForeignContentScopeMarker):
1718         (WebCore::HTMLNames::isButtonScopeMarker):
1719         (WebCore::HTMLNames::isSelectScopeMarker):
1720         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
1721         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
1722         (WebCore::HTMLElementStack::popUntilTableScopeMarker):
1723         (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
1724         (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
1725         (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
1726         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1727         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
1728         (WebCore::HTMLElementStack::pushRootNode):
1729         (WebCore::HTMLElementStack::oneBelowTop):
1730         (WebCore::HTMLElementStack::topmost):
1731         (WebCore):
1732         (WebCore::inScopeCommon):
1733         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
1734         (WebCore::HTMLElementStack::inScope):
1735         * html/parser/HTMLElementStack.h:
1736         (WebCore::HTMLElementStack::topStackItem):
1737         (HTMLElementStack):
1738         (WebCore::isInHTMLNamespace):
1739         * html/parser/HTMLStackItem.h:
1740         (WebCore::HTMLStackItem::isDocumentFragmentNode):
1741         (WebCore::HTMLStackItem::isElementNode):
1742         (HTMLStackItem):
1743         (WebCore::HTMLStackItem::hasLocalName):
1744         (WebCore::HTMLStackItem::hasTagName):
1745         (WebCore::HTMLStackItem::HTMLStackItem):
1746         * html/parser/HTMLTreeBuilder.cpp:
1747         (WebCore):
1748         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1749         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1750         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
1751         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1752         (WebCore::HTMLTreeBuilder::processStartTag):
1753         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1754         (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
1755         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1756         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1757         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1758         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1759         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
1760         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
1761         (WebCore::HTMLTreeBuilder::processEndTag):
1762         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1763         (WebCore::HTMLTreeBuilder::processEndOfFile):
1764         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1765         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1766         * html/parser/HTMLTreeBuilder.h:
1767
1768 2012-07-24  Hironori Bono  <hbono@chromium.org>
1769
1770         Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
1771         https://bugs.webkit.org/show_bug.cgi?id=91756
1772
1773         Reviewed by Tony Chang.
1774
1775         My r123067 moves the top-left origin of an RTL element right when its vertical
1776         scrollbar is shown at its left side. (That is, r123067 moves all child objects
1777         in the RTL element right.) This change also increases RenderBox::clientLeft()
1778         at the same time, i.e. it also moves child objects right. Furthermore, my r109512
1779         moves positioned objects in an RTL element right at the same time. This makes
1780         WebKit move objects in an RTL element up to three times by the scrollbar width.
1781         (Moving an absolute object right increases the scrollWidth value and it causes
1782         this bug.) This change removes unnecessary code that moves objects right in my
1783         r109512 and RenderBox::clientLeft().
1784
1785         Test: scrollbars/rtl/div-absolute.html
1786               fast/block/float/026.html
1787               fast/block/float/028.html
1788               fast/overflow/unreachable-overflow-rtl-bug.html
1789
1790         * dom/Element.cpp:
1791         (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
1792         * rendering/RenderBlock.cpp:
1793         (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
1794         (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
1795         * rendering/RenderBox.h:
1796         (WebCore::RenderBox::clientLeft): Removed unnecessary code.
1797
1798 2012-07-24  Dan Bernstein  <mitz@apple.com>
1799
1800         RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
1801         https://bugs.webkit.org/show_bug.cgi?id=92202
1802
1803         Reviewed by Beth Dakin.
1804
1805         Test: fast/writing-mode/positionForPoint.html
1806
1807         * rendering/RenderBlock.cpp:
1808         (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
1809         one of the sub-tests in the new regression test: (1) changed to compare children’s logical
1810         bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
1811         point’s horizontal component; and (2) changed to use logicalTopForChild and
1812         logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
1813         and logicalBottom, which are based on the child’s writing mode.
1814
1815 2012-07-24  MORITA Hajime  <morrita@google.com>
1816
1817         https://bugs.webkit.org/show_bug.cgi?id=89179
1818         Rendering LI having Shadow DOM seems weird
1819
1820         Reviewed by Dimitri Glazkov.
1821
1822         This incorrect rendering happend because HTMLLIElement::attach()
1823         wasn't aware of composed shadow subtree. This change makes it
1824         aware of that using ComposedShadowTreeParentWalker.
1825
1826         Test: fast/dom/shadow/shadow-and-list-elements.html
1827
1828         * html/HTMLLIElement.cpp:
1829         (WebCore::HTMLLIElement::attach):
1830
1831 2012-07-24  Alec Flett  <alecflett@chromium.org>
1832
1833         IndexedDB: fix #include dependencies so IDBRequest isn't an include root
1834         https://bugs.webkit.org/show_bug.cgi?id=92167
1835
1836         Reviewed by Tony Chang.
1837
1838         Remove implicit dependencies due to using IDBRequest.h, and fix all
1839         places that break as a result.
1840
1841         * Modules/indexeddb/IDBCallbacks.h:
1842         (WebCore):
1843         * Modules/indexeddb/IDBObjectStore.cpp:
1844         * Modules/indexeddb/IDBRequest.h:
1845         * inspector/InspectorIndexedDBAgent.cpp:
1846
1847 2012-07-24  Keishi Hattori  <keishi@webkit.org>
1848
1849         Move PagePopupClient helper functions so they can be shared
1850         https://bugs.webkit.org/show_bug.cgi?id=92096
1851
1852         Reviewed by Kent Tamura.
1853
1854         Move PagePopupClient helper functions to a separate file,
1855         so they can be shared with new PagePopupClients.
1856
1857         No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
1858
1859         * WebCore.gypi: Added PagePopupClient.cpp
1860         * html/shadow/CalendarPickerElement.cpp:
1861         (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
1862         * page/PagePopupClient.cpp: Added.
1863         (WebCore):
1864         (WebCore::PagePopupClient::addJavaScriptString):
1865         (WebCore::PagePopupClient::addProperty):
1866         * page/PagePopupClient.h:
1867         (WebCore::PagePopupClient::addString):
1868
1869 2012-07-24  Jer Noble  <jer.noble@apple.com>
1870
1871         setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
1872         https://bugs.webkit.org/show_bug.cgi?id=92035
1873
1874         Reviewed by Darin Adler.
1875
1876         Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a 
1877         current media controller.
1878
1879         Test: media/media-controller-playbackrate.html
1880
1881         * html/HTMLMediaElement.cpp:
1882         (WebCore::HTMLMediaElement::updatePlaybackRate):
1883
1884 2012-07-24  Hayato Ito  <hayato@chromium.org>
1885
1886         Rename FocusScope to FocusNavigationScope.
1887         https://bugs.webkit.org/show_bug.cgi?id=92062
1888
1889         Reviewed by Dimitri Glazkov.
1890
1891         FocusNavagationScope is better name than FocusScope since the
1892         class is only used for controlling focus navigation.
1893
1894         No new tests - no functional changes.
1895
1896         * page/FocusController.cpp:
1897         (WebCore::FocusNavigationScope::FocusNavigationScope):
1898         (WebCore::FocusNavigationScope::rootNode):
1899         (WebCore::FocusNavigationScope::owner):
1900         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
1901         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1902         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
1903         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1904         (WebCore::FocusController::advanceFocusInDocumentOrder):
1905         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1906         (WebCore::FocusController::findFocusableNodeRecursively):
1907         (WebCore::FocusController::findFocusableNode):
1908         (WebCore::FocusController::nextFocusableNode):
1909         (WebCore::FocusController::previousFocusableNode):
1910         * page/FocusController.h:
1911         (FocusNavigationScope):
1912         (FocusController):
1913
1914 2012-07-24  Michael Saboff  <msaboff@apple.com>
1915
1916         Convert HTML parser to handle 8-bit resources without converting to UChar*
1917         https://bugs.webkit.org/show_bug.cgi?id=90321
1918
1919         Reviewed by Geoffrey Garen.
1920
1921         No new tests, no new functionality therefore covered by existing tests.
1922
1923         Changed the parsing of HTML to handle 8-bit strings without converting the 
1924         whole string to 16-bits.  Primary change was to use the appropriate 
1925         character pointer type (LChar* or UChar*) depending on the source string.
1926         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
1927         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
1928         and advanceAndUpdateLineNumber() methods have been refactored into a
1929         state machine managed pair of function pointers.  The possible functions
1930         have not only the 8 and 16 bitness factored out, they also have the 
1931         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
1932         This provides a net speed-up even with the 8/16 bit testing.
1933         Other changes involve using String methods to access and compare with the
1934         source data.
1935
1936         * html/FTPDirectoryDocument.cpp:
1937         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
1938         instead of SegmentedString '*' operator.
1939         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
1940         SegmentedString '*' operator.
1941         * html/parser/HTMLParserIdioms.cpp:
1942         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
1943         * html/parser/HTMLSourceTracker.cpp:
1944         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
1945         SegmentedString '*' operator.
1946         * loader/cache/CachedScript.cpp:
1947         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
1948         * platform/text/SegmentedString.cpp:
1949         (WebCore::SegmentedString::SegmentedString):
1950         (WebCore::SegmentedString::operator=):
1951         (WebCore::SegmentedString::clear):
1952         (WebCore::SegmentedString::append):
1953         (WebCore::SegmentedString::prepend):
1954         (WebCore::SegmentedString::advanceSubstring):
1955         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
1956         advance function.
1957         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
1958         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
1959         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
1960         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
1961         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
1962         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
1963         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
1964         8 and 16 bit advance.
1965         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
1966         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
1967         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
1968         * platform/text/SegmentedString.h:
1969         (WebCore::SegmentedSubstring::SegmentedSubstring):
1970         (WebCore::SegmentedSubstring::clear):
1971         (SegmentedSubstring):
1972         (WebCore::SegmentedSubstring::is8Bit): New getter.
1973         (WebCore::SegmentedSubstring::appendTo):
1974         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
1975         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
1976         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
1977         that pre-increments the 8 bit pointer and returns the next character.
1978         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
1979         that pre-increments the 16 bit pointer and returns the next character.
1980         (WebCore::SegmentedSubstring::currentSubString):
1981         (WebCore::SegmentedSubstring::getCurrentChar):
1982         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
1983         (WebCore::SegmentedString::SegmentedString):
1984         (WebCore::SegmentedString::push):
1985         (WebCore::SegmentedString::isEmpty):
1986         (WebCore::SegmentedString::lookAhead):
1987         (WebCore::SegmentedString::lookAheadIgnoringCase):
1988         (WebCore::SegmentedString::advance):
1989         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1990         (WebCore::SegmentedString::advanceAndASSERT):
1991         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1992         (WebCore::SegmentedString::advancePastNonNewline):
1993         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1994         (WebCore::SegmentedString::currentChar):
1995         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
1996         functions.
1997         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
1998         change to slow case functions when only one character left.
1999         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
2000         functions based on current substring.
2001         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
2002         (WebCore::SegmentedString::lookAheadSlowCase):
2003         * xml/parser/CharacterReferenceParserInlineMethods.h:
2004         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
2005         SegmentedString '*' operator.
2006         * xml/parser/MarkupTokenizerBase.h:
2007         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
2008         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
2009         currentChar() instead of SegmentedString '*' operator.
2010         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
2011
2012 2012-07-24  Kenneth Russell  <kbr@google.com>
2013
2014         [chromium] Hint garbage collector to run if page uses Canvas contexts
2015         https://bugs.webkit.org/show_bug.cgi?id=76225
2016
2017         Reviewed by Kentaro Hara.
2018
2019         Upon creating a canvas context, set a hint in the current isolate
2020         indicating that a full GC should be done upon the next page
2021         navigation.
2022
2023         This improves Chrome's robustness on some WebGL stress tests which
2024         simulate real-world behavior by repeatedly navigating among
2025         several samples. More general measures are being investigated, but
2026         this change makes V8 behave the same as JSC on these stress tests.
2027         JSC doesn't currently use generational garbage collection, so it
2028         has more opportunities to discover unreferenced canvas contexts.
2029
2030         Test: fast/canvas/webgl/context-creation-and-destruction.html
2031
2032         * bindings/v8/V8Binding.cpp:
2033         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
2034             Initialize per-isolate low memory hint.
2035         * bindings/v8/V8Binding.h:
2036         (V8BindingPerIsolateData):
2037         (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
2038             Set a per-isolate hint to signal a low memory condition upon the next page navigation.
2039         (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
2040             Clear the previously set hint.
2041         (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
2042             Get the previously set hint.
2043         * bindings/v8/V8Proxy.cpp:
2044         (WebCore::V8Proxy::hintForGCIfNecessary):
2045             If necessary, send V8 a hint that it should GC.
2046         (WebCore):
2047         (WebCore::V8Proxy::clearForClose):
2048         (WebCore::V8Proxy::clearForNavigation):
2049             Call hintForGCIfNecessary.
2050         * bindings/v8/V8Proxy.h:
2051         (V8Proxy):
2052         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2053         (WebCore::V8HTMLCanvasElement::getContextCallback):
2054             Set a hint that we should GC upon the next page navigation.
2055
2056 2012-07-24  Dave Tu  <dtu@chromium.org>
2057
2058         [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
2059         https://bugs.webkit.org/show_bug.cgi?id=90019
2060
2061         Reviewed by Adrienne Walker.
2062
2063         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2064         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
2065         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2066         (BitmapCanvasLayerTextureUpdater):
2067         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2068         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
2069         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2070         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
2071         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2072         (Texture):
2073         (BitmapSkPictureCanvasLayerTextureUpdater):
2074         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
2075         (WebCore::CanvasLayerTextureUpdater::paintContents):
2076         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
2077         (CanvasLayerTextureUpdater):
2078         * platform/graphics/chromium/ContentLayerChromium.cpp:
2079         (WebCore::ContentLayerChromium::update):
2080         * platform/graphics/chromium/ContentLayerChromium.h:
2081         (ContentLayerChromium):
2082         * platform/graphics/chromium/ImageLayerChromium.cpp:
2083         (WebCore::ImageLayerChromium::update):
2084         * platform/graphics/chromium/ImageLayerChromium.h:
2085         (ImageLayerChromium):
2086         * platform/graphics/chromium/LayerChromium.h:
2087         (WebCore):
2088         (WebCore::LayerChromium::update):
2089         * platform/graphics/chromium/LayerTextureUpdater.h:
2090         (WebCore):
2091         (WebCore::LayerTextureUpdater::Texture::prepareRect):
2092         (WebCore::LayerTextureUpdater::prepareToUpdate):
2093         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2094         (WebCore::ScrollbarLayerChromium::updatePart):
2095         (WebCore::ScrollbarLayerChromium::update):
2096         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2097         (ScrollbarLayerChromium):
2098         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
2099         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2100         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
2101         (SkPictureCanvasLayerTextureUpdater):
2102         * platform/graphics/chromium/TiledLayerChromium.cpp:
2103         (WebCore::TiledLayerChromium::updateTiles):
2104         (WebCore::TiledLayerChromium::updateContentRect):
2105         * platform/graphics/chromium/TiledLayerChromium.h:
2106         (TiledLayerChromium):
2107         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2108         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2109         (WebCore::CCLayerTreeHost::updateAnimations):
2110         (WebCore::CCLayerTreeHost::renderingStats):
2111         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
2112         (WebCore::CCLayerTreeHost::paintLayerContents):
2113         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2114         (WebCore):
2115         (CCLayerTreeHost):
2116         * platform/graphics/chromium/cc/CCRenderingStats.h:
2117         (CCRenderingStats):
2118         (WebCore::CCRenderingStats::CCRenderingStats):
2119
2120 2012-07-24  Jian Li  <jianli@chromium.org>
2121
2122         [V8] Correct WebIDL type should be used in the testing IDL file 
2123         https://bugs.webkit.org/show_bug.cgi?id=92168
2124
2125         Reviewed by Kentaro Hara.
2126
2127         Updated bindings test.
2128
2129         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2130         (webkit_dom_test_obj_strict_function):
2131         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2132         * bindings/scripts/test/JS/JSTestObj.cpp:
2133         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2134         * bindings/scripts/test/TestObj.idl:
2135         * bindings/scripts/test/V8/V8TestObj.cpp:
2136         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2137         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2138         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
2139         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
2140         (WebCore::TestObjV8Internal::strictFunctionCallback):
2141
2142 2012-07-24  Kent Tamura  <tkent@chromium.org>
2143
2144         Unreviewed, rolling out r123191.
2145         http://trac.webkit.org/changeset/123191
2146         https://bugs.webkit.org/show_bug.cgi?id=91804
2147
2148         It might cause another performance regression.
2149         http://code.google.com/p/chromium/issues/detail?id=138410
2150
2151         * html/FormController.cpp:
2152         (FormKeyGenerator):
2153         (WebCore::createKey):
2154         (WebCore::FormKeyGenerator::formKey):
2155         (WebCore::FormKeyGenerator::willDeleteForm):
2156
2157 2012-07-24  Vineet Chaudhary  <rgf748@motorola.com>
2158
2159         [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
2160         https://bugs.webkit.org/show_bug.cgi?id=90381
2161
2162         Reviewed by Kentaro Hara.
2163
2164         We can remove jsUnsignedLongArrayToVector() implementaion
2165         merging it to current and toNativeArray() traits.
2166
2167         Tests: TestObj.idl
2168         There should be no behavoiral changes as just refactoring.
2169
2170         * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
2171         * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
2172         * bindings/js/JSDOMBinding.h:
2173         (WebCore::toJSSequence): Moved toJSSequence() to header file.
2174         (WebCore::jsArray): Renamed Traits to JSValueTraits
2175         (WebCore::toNativeArray): Using traits.
2176         * bindings/js/JSDictionary.cpp:
2177         (WebCore::JSDictionary::convertValue):
2178         * bindings/js/JSMessagePortCustom.cpp:
2179         (WebCore::fillMessagePortArray):
2180         * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
2181         (AddIncludesForType):
2182         (GenerateParametersCheckExpression):
2183         (JSValueToNative):
2184         (NativeToJSValue):
2185         * bindings/scripts/CodeGeneratorV8.pm:
2186         (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
2187         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
2188         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2189         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2190         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2191         * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
2192         * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
2193         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
2194         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
2195         (TestObjV8Internal):
2196         (WebCore::TestObjV8Internal::overloadedMethodCallback):
2197
2198 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2199
2200         Remove an invalid assertion introduced in r123536. Unreviewed.
2201
2202         * xml/parser/MarkupTokenBase.h:
2203         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2204
2205 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2206
2207         Unreviewed, rolling out r123504.
2208         http://trac.webkit.org/changeset/123504
2209         https://bugs.webkit.org/show_bug.cgi?id=92169
2210
2211         broke a bunch of text-related tests in chromium mac debug
2212         (Requested by zhenyao on #webkit).
2213
2214         * platform/text/cf/StringCF.cpp:
2215         (WTF::String::createCFString):
2216         * platform/text/cf/StringImplCF.cpp:
2217         (WTF::StringImpl::createCFString):
2218
2219 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2220
2221         Ensure Noah's ark without reading the DOM tree.
2222         https://bugs.webkit.org/show_bug.cgi?id=92065
2223
2224         Reviewed by Adam Barth.
2225
2226         Technically we shouldn't read attributes back from the DOM. If JavaScript changes
2227         the attributes values, we could get a slightly wrong output here.
2228
2229         Read attributes from tokens saved in the active formatting element list.
2230
2231         No new tests, covered by existing tests.
2232
2233         * html/parser/HTMLFormattingElementList.cpp:
2234         (WebCore::attributeCount):
2235         (WebCore::HTMLFormattingElementList::append):
2236         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2237         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
2238         * html/parser/HTMLFormattingElementList.h:
2239         (HTMLFormattingElementList):
2240         * html/parser/HTMLStackItem.h:
2241         (WebCore::HTMLStackItem::localName):
2242         (HTMLStackItem):
2243
2244 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2245
2246         Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
2247         https://bugs.webkit.org/show_bug.cgi?id=92056
2248
2249         Reviewed by Adam Barth.
2250
2251         AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
2252         characters for performance. Clear the external characters pointer before the raw token
2253         is cleared to make sure that we won't have a dangling pointer.
2254
2255         No new tests - no functional changes.
2256
2257         * html/parser/HTMLTreeBuilder.cpp:
2258         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2259         * xml/parser/MarkupTokenBase.h:
2260         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2261         (AtomicMarkupTokenBase):
2262
2263 2012-07-24  Jian Li  <jianli@chromium.org>
2264
2265         Add per-context setting for html notifications
2266         https://bugs.webkit.org/show_bug.cgi?id=91295
2267
2268         Reviewed by Adam Barth.
2269
2270         Added a new per-context setting to control the enabling of html notifications.
2271         For chromium port, we're going to disable html notifications for web
2272         pages, but still keep it enabled for extensions.
2273
2274         Also enhance V8 code generator to support V8EnabledPerContext attribute
2275         for methods.
2276
2277         Updated the binding tests.
2278
2279         * Modules/notifications/NotificationCenter.cpp:
2280         (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
2281         (WebCore):
2282         * Modules/notifications/NotificationCenter.h:
2283         (NotificationCenter):
2284         * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
2285         * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
2286         (GenerateHeader):
2287         (IsStandardFunction):
2288         (GenerateNonStandardFunction):
2289         (GenerateImplementation):
2290         (GenerateToV8Converters):
2291         (GetContextEnableFunction):
2292         * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
2293         * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
2294         (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
2295         (TestObjV8Internal):
2296         (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
2297         (WebCore::V8TestObj::installPerContextProperties):
2298         (WebCore::V8TestObj::wrapSlow):
2299         * dom/ContextFeatures.cpp: Add a new per-context feature.
2300         (WebCore::ContextFeatures::htmlNotificationsEnabled):
2301         (WebCore):
2302         * dom/ContextFeatures.h: Add a new per-context feature.
2303
2304 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2305
2306         Unreviewed, rolling out r123499.
2307         http://trac.webkit.org/changeset/123499
2308         https://bugs.webkit.org/show_bug.cgi?id=92161
2309
2310         Android fails to compile (Requested by zhenyao on #webkit).
2311
2312         * GNUmakefile.list.am:
2313         * Modules/mediastream/MediaStream.cpp:
2314         (WebCore::MediaStream::MediaStream):
2315         (WebCore::MediaStream::addTrack):
2316         * Modules/mediastream/MediaStreamTrack.cpp:
2317         (WebCore::MediaStreamTrack::create):
2318         (WebCore::MediaStreamTrack::MediaStreamTrack):
2319         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2320         (WebCore::MediaStreamTrack::setEnabled):
2321         * Modules/mediastream/MediaStreamTrack.h:
2322         (MediaStreamTrack):
2323         * Modules/mediastream/MediaStreamTrack.idl:
2324         * WebCore.gypi:
2325         * dom/EventNames.h:
2326         (WebCore):
2327         * dom/EventTargetFactory.in:
2328         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2329         (WebKit):
2330         (WebKit::WebMediaStreamDescriptor::sources):
2331         * platform/chromium/support/WebMediaStreamSource.cpp:
2332         * platform/mediastream/MediaStreamSource.cpp: Removed.
2333         * platform/mediastream/MediaStreamSource.h:
2334         (WebCore::MediaStreamSource::create):
2335         (WebCore::MediaStreamSource::muted):
2336         (WebCore::MediaStreamSource::setMuted):
2337         (WebCore::MediaStreamSource::MediaStreamSource):
2338         (MediaStreamSource):
2339         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2340         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2341         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2342
2343 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2344
2345         Crash in RenderTableSection::layoutRows
2346         https://bugs.webkit.org/show_bug.cgi?id=92145
2347
2348         Reviewed by Abhishek Arya.
2349
2350         The crash came from the insertChildNode logic being confused and choosing the wrong
2351         renderer for insertion. This is because after r123159, table anonymous wrappers can
2352         be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
2353
2354         This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
2355
2356         Test: fast/table/crash-table-section-layoutRows.html
2357
2358         * rendering/RenderObjectChildList.cpp:
2359         (WebCore::RenderObjectChildList::insertChildNode):
2360         Changed the code to always get the right child. There is no justification to not
2361         walking up to the |owner|'s direct child in all cases.
2362
2363 2012-07-24  Tony Chang  <tony@chromium.org>
2364
2365         Make RenderBlock::paintChildren virtual so sub classes can change the paint order
2366         https://bugs.webkit.org/show_bug.cgi?id=92042
2367
2368         Reviewed by Ojan Vafai.
2369
2370         The flexbox spec says that the order property should change the paint order of flex children.
2371         To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
2372
2373         No new tests, this is just a refactoring.
2374
2375         * rendering/RenderBlock.cpp:
2376         (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
2377         (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
2378         (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
2379         * rendering/RenderBlock.h:
2380         (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
2381
2382 2012-07-24  Anna Cavender  <annacc@chromium.org>
2383
2384         Create SourceBuffer and SourceBufferList objects
2385         https://bugs.webkit.org/show_bug.cgi?id=91771
2386
2387         Reviewed by Eric Carlson.
2388
2389         SourceBuffer and SourceBufferList objects are needed in order to
2390         implement the new object-oriented MediaSource API:
2391         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
2392
2393         No new tests - will be able to test after landing BUGWK91775
2394
2395         Adding new files to build files:
2396         * CMakeLists.txt:
2397         * DerivedSources.cpp:
2398         * DerivedSources.make:
2399         * DerivedSources.pri:
2400         * GNUmakefile.am:
2401         * GNUmakefile.list.am:
2402         * Target.pri:
2403         * WebCore.gyp/WebCore.gyp:
2404         * WebCore.gypi:
2405         * WebCore.vcproj/WebCore.vcproj:
2406         * WebCore.vcproj/WebCoreCommon.vsprops:
2407         * WebCore.vcproj/copyForwardingHeaders.cmd:
2408         * WebCore.xcodeproj/project.pbxproj:
2409
2410         New objects:
2411         * Modules/mediasource/SourceBuffer.cpp: Added.
2412         * Modules/mediasource/SourceBuffer.h: Added.
2413         * Modules/mediasource/SourceBuffer.idl: Added.
2414         * Modules/mediasource/SourceBufferList.cpp: Added.
2415         * Modules/mediasource/SourceBufferList.h: Added.
2416         * Modules/mediasource/SourceBufferList.idl: Added.
2417
2418         New events:
2419         * dom/EventNames.h:
2420         (WebCore):
2421         * dom/EventTarget.h:
2422         (WebCore):
2423         * dom/EventTargetFactory.in:
2424
2425         Object constructors:
2426         * page/DOMWindow.idl:
2427
2428 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
2429
2430         Store the full year in GregorianDateTime
2431         https://bugs.webkit.org/show_bug.cgi?id=92067
2432
2433         Reviewed by Geoffrey Garen.
2434
2435         Use the full year instead of the offset from year 1900 
2436         for the year member variable of GregorianDateTime.
2437
2438         * bridge/qt/qt_runtime.cpp:
2439         (JSC::Bindings::convertValueToQVariant):
2440         (JSC::Bindings::convertQVariantToValue):
2441         * bridge/qt/qt_runtime_qt4.cpp:
2442         (JSC::Bindings::convertValueToQVariant):
2443         (JSC::Bindings::convertQVariantToValue):
2444
2445 2012-07-24  Benjamin Poulain  <bpoulain@apple.com>
2446
2447         Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
2448         https://bugs.webkit.org/show_bug.cgi?id=90720
2449
2450         Reviewed by Geoffrey Garen.
2451
2452         In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
2453         a relatively cheap conversion from WTF::String to CFString.
2454
2455         When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
2456         to String::characters().
2457
2458         This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
2459
2460         This is covered by existing tests.
2461
2462         * platform/text/cf/StringCF.cpp:
2463         (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
2464         * platform/text/cf/StringImplCF.cpp:
2465         (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
2466         The allocator creation is now closer to where it is useful.
2467
2468 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2469
2470         [V8] String wrappers should be marked Independent
2471         https://bugs.webkit.org/show_bug.cgi?id=91251
2472
2473         Reviewed by Adam Barth.
2474
2475         Currently V8 String wrappers are not marked Independent.
2476         By marking them Independent, they can be reclaimed by the scavenger GC.
2477         Although I couldn't find a case where this change reduces memory usage,
2478         this change would be important for upcoming changes in string conversion
2479         between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
2480
2481         'm_lastStringImpl = 0' in StringCache::remove() is important.
2482         Look at the following code:
2483
2484             static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
2485             {
2486                 ...;
2487                 stringCache()->remove(stringImpl);
2488                 wrapper.Dispose();
2489             }
2490
2491             void StringCache::remove(StringImpl* stringImpl)
2492             {
2493                 ...
2494                 if (m_lastStringImpl.get() == stringImpl)
2495                     m_lastStringImpl = 0;
2496             }
2497
2498             v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
2499             {
2500                 if (m_lastStringImpl.get() == stringImpl) {
2501                     return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
2502                 }
2503                 return v8ExternalStringSlow(stringImpl, isolate);
2504             }
2505
2506         Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
2507         in v8ExternalString(). This was a cause of the crashes of r122614.
2508
2509         Tests: At the initial commit of this patch (r122614),
2510                the following tests had been broken due to missing 'm_lastStringImpl = 0'.
2511                fast/workers/worker-location.html
2512                Dromaeo/cssquery-jquery.html
2513                Dromaeo/jslib-event-jquery.html
2514                Dromaeo/jslib-style-jquery.html
2515                Dromaeo/jslib-style-prototype.html
2516
2517         * bindings/v8/V8Binding.cpp:
2518         (WebCore::StringCache::remove):
2519         (WebCore::StringCache::v8ExternalStringSlow):
2520
2521 2012-07-24  Tommy Widenflycht  <tommyw@google.com>
2522
2523         MediaStream API: Update MediaStreamTrack to match the specification
2524         https://bugs.webkit.org/show_bug.cgi?id=90180
2525
2526         Reviewed by Adam Barth.
2527
2528         MediaStreamTracks are now required to show the status of the underlying source,
2529         and trigger events when that status changes.
2530
2531         Test: fast/mediastream/MediaStreamTrack.html
2532
2533         * GNUmakefile.list.am:
2534         * Modules/mediastream/MediaStream.cpp:
2535         (WebCore::MediaStream::MediaStream):
2536         (WebCore::MediaStream::addTrack):
2537         * Modules/mediastream/MediaStreamTrack.cpp:
2538         (WebCore::MediaStreamTrack::create):
2539         (WebCore::MediaStreamTrack::MediaStreamTrack):
2540         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2541         (WebCore::MediaStreamTrack::setEnabled):
2542         (WebCore::MediaStreamTrack::readyState):
2543         (WebCore):
2544         (WebCore::MediaStreamTrack::sourceChangedState):
2545         (WebCore::MediaStreamTrack::stop):
2546         (WebCore::MediaStreamTrack::interfaceName):
2547         (WebCore::MediaStreamTrack::scriptExecutionContext):
2548         (WebCore::MediaStreamTrack::eventTargetData):
2549         (WebCore::MediaStreamTrack::ensureEventTargetData):
2550         * Modules/mediastream/MediaStreamTrack.h:
2551         * Modules/mediastream/MediaStreamTrack.idl:
2552         * WebCore.gypi:
2553         * dom/EventNames.h:
2554         (WebCore):
2555         * dom/EventTargetFactory.in:
2556         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2557         * platform/chromium/support/WebMediaStreamSource.cpp:
2558         (WebKit::WebMediaStreamSource::setReadyState):
2559         (WebKit):
2560         (WebKit::WebMediaStreamSource::readyState):
2561         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
2562         (WebCore):
2563         (WebCore::MediaStreamSource::create):
2564         (WebCore::MediaStreamSource::MediaStreamSource):
2565         (WebCore::MediaStreamSource::setReadyState):
2566         (WebCore::MediaStreamSource::addObserver):
2567         (WebCore::MediaStreamSource::removeObserver):
2568         * platform/mediastream/MediaStreamSource.h:
2569         (Observer):
2570         (WebCore::MediaStreamSource::Observer::~Observer):
2571         (MediaStreamSource):
2572         (WebCore::MediaStreamSource::readyState):
2573         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2574         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2575         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2576
2577 2012-07-24  Scott Graham  <scottmg@chromium.org>
2578
2579         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2580         https://bugs.webkit.org/show_bug.cgi?id=91667
2581
2582         Reviewed by Tony Chang.
2583
2584         Using native tools instead of cygwin version improves build time
2585         performance by roughly 50% (on top of previous cl-instead-of-gcc
2586         change).
2587
2588         Also, use - instead of / for cl flags, otherwise preprocessing fails
2589         very slowly (due to retry loop). And, replace \ with / in gperf
2590         command line. Without this, gperf emits the filename literally in
2591         #line directives which causes VS to error with "unescaped \ in
2592         string". Bizarrely, building ColorData.cpp with those \ in place
2593         causes the IDE to exit with no error message, which was the cause of
2594         the previous canary failures.
2595
2596         No new tests.
2597
2598         * WebCore.gyp/WebCore.gyp:
2599         * WebCore.gyp/scripts/rule_bison.py:
2600         * bindings/scripts/preprocessor.pm:
2601         (applyPreprocessor):
2602         * make-hash-tools.pl:
2603
2604 2012-07-24  Daniel Cheng  <dcheng@chromium.org>
2605
2606         Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
2607         https://bugs.webkit.org/show_bug.cgi?id=91702
2608
2609         Reviewed by Jian Li.
2610
2611         Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
2612         pages from being able to detect what applications a user has installed indirectly through
2613         the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
2614         that aren't in WebKit's internal list, so we relax the restriction for Files that originate
2615         from an user action.
2616
2617         * fileapi/File.cpp:
2618         (WebCore::getContentTypeFromFileName):
2619         (WebCore::createBlobDataForFile):
2620         (WebCore::createBlobDataForFileWithName):
2621         (WebCore::createBlobDataForFileWithMetadata):
2622         (WebCore::File::createWithRelativePath):
2623         (WebCore::File::File):
2624         * fileapi/File.h:
2625         (File):
2626         (WebCore::File::create):
2627         (WebCore::File::createWithName):
2628         * html/FileInputType.cpp:
2629         (WebCore::FileInputType::createFileList):
2630         * platform/chromium/ChromiumDataObject.cpp:
2631         (WebCore::ChromiumDataObject::addFilename):
2632         * platform/gtk/ClipboardGtk.cpp:
2633         (WebCore::ClipboardGtk::files):
2634         * platform/mac/ClipboardMac.mm:
2635         (WebCore::ClipboardMac::files):
2636         * platform/qt/ClipboardQt.cpp:
2637         (WebCore::ClipboardQt::files):
2638         * platform/win/ClipboardWin.cpp:
2639         (WebCore::ClipboardWin::files):
2640
2641 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
2642
2643         Web Inspector: Snippets UI polish
2644         https://bugs.webkit.org/show_bug.cgi?id=92142
2645
2646         Reviewed by Pavel Feldman.
2647
2648         Changed snippets context menu items.
2649         Added run snippet status bar button.
2650         Removed unused edit source button.
2651
2652         * English.lproj/localizedStrings.js:
2653         * inspector/front-end/Images/statusbarButtonGlyphs.png:
2654         * inspector/front-end/ScriptSnippetModel.js:
2655         (WebInspector.SnippetJavaScriptSourceFrame):
2656         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2657         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
2658         * inspector/front-end/ScriptsNavigator.js:
2659         (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
2660         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
2661         * inspector/front-end/ScriptsPanel.js:
2662         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2663         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2664         * inspector/front-end/SourceFrame.js:
2665         (WebInspector.SourceFrame.prototype.statusBarItems):
2666         * inspector/front-end/inspector.css:
2667         * inspector/front-end/scriptsPanel.css:
2668         (.evaluate-snippet-status-bar-item .glyph):
2669         (.evaluate-snippet-status-bar-item.toggled .glyph):
2670
2671 2012-07-24  Nico Weber  <thakis@chromium.org>
2672
2673         [chromium/mac] Remove webcore_resource_files from WebCore.gypi
2674         https://bugs.webkit.org/show_bug.cgi?id=92129
2675
2676         Reviewed by Adam Barth.
2677
2678         It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
2679         The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
2680         but this block was forgotten. Since it just confused me for a bit, remove it.
2681
2682         * WebCore.gyp/WebCore.gyp:
2683
2684 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2685
2686         inline-table wrapper should be generated for display: inline element only
2687         https://bugs.webkit.org/show_bug.cgi?id=92054
2688
2689         Reviewed by Abhishek Arya.
2690
2691         CSS 2.1 only takes into account the display when determining if we should generate
2692         an inline-table. My misreading of the spec would make us generate an inline-table
2693         wrapper for any inline formatting context.
2694
2695         Test: fast/table/inline-block-generates-table-wrapper.html
2696
2697         * rendering/RenderTable.cpp:
2698         (WebCore::RenderTable::createAnonymousWithParentRenderer):
2699         Changed to use display instead of isInline to properly match the spec.
2700
2701 2012-07-24  Alec Flett  <alecflett@chromium.org>
2702
2703         IndexedDB: Temporarily continue generating backend keys for empty key lists
2704         https://bugs.webkit.org/show_bug.cgi?id=92012
2705
2706         Reviewed by Tony Chang.
2707
2708         Temporarily change key behavior to allow chromium in_process_webkit
2709         to call putWithIndexKeys without inadvertently preventing index
2710         key generation. Note this is temporary until frontend key generation
2711         patch lands.
2712
2713         No new tests, this is part of a refactor that doesn't change behavior.
2714
2715         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2716         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2717
2718 2012-07-24  Pavel Feldman  <pfeldman@chromium.org>
2719
2720         Web Inspector: introduce UISourceCodeFrame.
2721         https://bugs.webkit.org/show_bug.cgi?id=92124
2722
2723         Reviewed by Vsevolod Vlasov.
2724
2725         Generic implementation of SourceFrame over UISourceCode added.
2726
2727         * WebCore.gypi:
2728         * WebCore.vcproj/WebCore.vcproj:
2729         * inspector/compile-front-end.py:
2730         * inspector/front-end/ScriptsPanel.js:
2731         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2732         * inspector/front-end/StylesPanel.js:
2733         * inspector/front-end/UISourceCodeFrame.js: Added.
2734         (WebInspector.UISourceCodeFrame):
2735         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2736         (WebInspector.UISourceCodeFrame.prototype.commitEditing):
2737         (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
2738         (WebInspector.UISourceCodeFrame.prototype._didEditContent):
2739         (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
2740         (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
2741         * inspector/front-end/WebKit.qrc:
2742         * inspector/front-end/inspector.html:
2743
2744 2012-07-24  Dan Bernstein  <mitz@apple.com>
2745
2746         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
2747         https://bugs.webkit.org/show_bug.cgi?id=92115
2748
2749         Reviewed by Mark Rowe.
2750
2751         * platform/Scrollbar.cpp:
2752         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
2753
2754 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2755
2756         Another prospective build fix for Chromium. Unreviewed.
2757
2758         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2759
2760 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2761
2762         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
2763
2764         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2765
2766 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
2767
2768         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
2769         https://bugs.webkit.org/show_bug.cgi?id=92103
2770
2771         Reviewed by Philippe Normand.
2772
2773         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
2774         here since the forward declarations are conflicting with the harfbuzz version
2775         we will use for EFL.
2776
2777         No new tests, no change in behavior.
2778
2779         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2780
2781 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2782
2783         Fix blend filter for autovectorizing
2784         https://bugs.webkit.org/show_bug.cgi?id=91398
2785
2786         Reviewed by Nikolas Zimmermann.
2787
2788         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
2789         did not do boundary-checks in the inner loop. Finally the integer division by 255
2790         was optimized not use integer division intrinsics.
2791
2792         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
2793
2794         * platform/graphics/filters/FEBlend.cpp:
2795         (WebCore::fastDivideBy255):
2796         (BlendNormal):
2797         (WebCore::BlendNormal::apply):
2798         (BlendMultiply):
2799         (WebCore::BlendMultiply::apply):
2800         (BlendScreen):
2801         (WebCore::BlendScreen::apply):
2802         (BlendDarken):
2803         (WebCore::BlendDarken::apply):
2804         (BlendLighten):
2805         (WebCore::BlendLighten::apply):
2806         (BlendUnknown):
2807         (WebCore::BlendUnknown::apply):
2808         (WebCore::platformApply):
2809         (WebCore::FEBlend::platformApplyGeneric):
2810         (WebCore::FEBlend::platformApplySoftware):
2811         * platform/graphics/filters/FEBlend.h:
2812         (FEBlend):
2813
2814 2012-07-23  Hans Wennborg  <hans@chromium.org>
2815
2816         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
2817         https://bugs.webkit.org/show_bug.cgi?id=91743
2818
2819         Reviewed by Adam Barth.
2820
2821         Implement the 'emma' attribute as described in the spec draft at
2822         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
2823
2824         Test: fast/speech/scripted/emma.html
2825
2826         * Modules/speech/SpeechRecognitionResult.cpp:
2827         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
2828         (WebCore):
2829         (WebCore::SpeechRecognitionResult::emma):
2830         * Modules/speech/SpeechRecognitionResult.h:
2831         (WebCore):
2832         (SpeechRecognitionResult):
2833         * Modules/speech/SpeechRecognitionResult.idl:
2834         * WebCore.gypi:
2835         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
2836         (WebCore):
2837         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
2838           We need to add an implicit reference from the result object to the
2839           emma object to keep the latters DOM tree alive across
2840           garbage-collection.
2841
2842 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
2843
2844         Web Inspector: Protocol Extension: add getFlowByName command
2845         https://bugs.webkit.org/show_bug.cgi?id=91855
2846
2847         Reviewed by Pavel Feldman.
2848
2849         The "getFlowByName" command should return a NamedFlow for a given document and name.
2850
2851         Test: inspector/styles/protocol-css-regions-commands.html
2852
2853         * inspector/Inspector.json:
2854         * inspector/InspectorCSSAgent.cpp:
2855         (WebCore::InspectorCSSAgent::getFlowByName):
2856         (WebCore):
2857         * inspector/InspectorCSSAgent.h:
2858         (InspectorCSSAgent):
2859         * inspector/front-end/CSSStyleModel.js:
2860         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
2861         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
2862         (WebInspector.NamedFlow):
2863         (WebInspector.NamedFlow.parsePayload):
2864
2865 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2866
2867         [Qt] Fix compilation against namespaced Qt
2868
2869         Reviewed by Simon Hausmann.
2870
2871         * platform/graphics/Font.h:
2872         * platform/network/ResourceHandleInternal.h:
2873         * platform/qt/ThirdPartyCookiesQt.h:
2874
2875 2012-07-24  Anthony Scian  <ascian@rim.com>
2876
2877         Web Inspector [JSC]: Enable initiator column in network panel.
2878         https://bugs.webkit.org/show_bug.cgi?id=65533
2879
2880         Reviewed by Vsevolod Vlasov.
2881
2882         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
2883         Removed references to it since the optionality is no longer required.
2884
2885         Test: http/tests/inspector/network/network-initiator.html
2886
2887         * inspector/front-end/NetworkPanel.js:
2888         (WebInspector.NetworkLogView.prototype._createTable):
2889         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
2890         (WebInspector.NetworkLogView.prototype.switchToBriefView):
2891         (WebInspector.NetworkDataGridNode.prototype.createCells):
2892         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
2893         * inspector/front-end/Settings.js:
2894
2895 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2896
2897         Missing *explicit* keyword in dom and page.
2898         https://bugs.webkit.org/show_bug.cgi?id=92074
2899
2900         Reviewed by Kentaro Hara.
2901
2902         Some constructors missed to use *explicit* keyword. They need to be added
2903         *explicit* keyword to contructor which has a parameter in order to avoid
2904         implicit type conversion.
2905
2906         Some files in dom directory can't use explicit keyword because of build breaks.
2907
2908         No new tests. Covered by existing tests.
2909
2910         * dom/BeforeLoadEvent.h:
2911         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
2912         * dom/BeforeTextInsertedEvent.h:
2913         (BeforeTextInsertedEvent):
2914         * dom/ChildListMutationScope.h:
2915         (WebCore::ChildListMutationScope::ChildListMutationScope):
2916         * dom/ChildNodeList.h:
2917         (ChildNodeList):
2918         * dom/ClientRect.h:
2919         (ClientRect):
2920         * dom/ClientRectList.h:
2921         (ClientRectList):
2922         * dom/ComposedShadowTreeWalker.h:
2923         (ComposedShadowTreeParentWalker):
2924         * dom/DOMCoreException.h:
2925         (WebCore::DOMCoreException::DOMCoreException):
2926         * dom/DOMImplementation.h:
2927         (DOMImplementation):
2928         * dom/DatasetDOMStringMap.h:
2929         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
2930         * dom/DeviceMotionController.h:
2931         (DeviceMotionController):
2932         * dom/DeviceOrientationController.h:
2933         (DeviceOrientationController):
2934         * dom/DocumentParser.h:
2935         (DocumentParser):
2936         * dom/EventException.h:
2937         (WebCore::EventException::EventException):
2938         * dom/EventListener.h:
2939         (WebCore::EventListener::EventListener):
2940         * dom/ExceptionBase.h:
2941         (ExceptionBase):
2942         * dom/GenericEventQueue.h:
2943         (GenericEventQueue):
2944         * dom/KeyboardEvent.h:
2945         (WebCore::KeypressCommand::KeypressCommand):
2946         * dom/MemoryInstrumentation.h:
2947         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2948         * dom/MessageChannel.h:
2949         (MessageChannel):
2950         * dom/MessagePort.h:
2951         (MessagePort):
2952         * dom/MessagePortChannel.h:
2953         (MessagePortChannel):
2954         * dom/MutationObserver.h:
2955         * dom/NamedNodeMap.h:
2956         (WebCore::NamedNodeMap::NamedNodeMap):
2957         * dom/NodeFilter.h:
2958         (WebCore::NodeFilter::NodeFilter):
2959         * dom/NodeWithIndex.h:
2960         (WebCore::NodeWithIndex::NodeWithIndex):
2961         * dom/Range.h:
2962         * dom/RangeException.h:
2963         (WebCore::RangeException::RangeException):
2964         * dom/RawDataDocumentParser.h:
2965         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
2966         * dom/ScriptRunner.h:
2967         (ScriptRunner):
2968         * dom/SelectorQuery.h:
2969         (SelectorQuery):
2970         * dom/ShadowRoot.h:
2971         (ShadowRoot):
2972         * dom/SpaceSplitString.h:
2973         (SpaceSplitStringData):
2974         * dom/StaticHashSetNodeList.h:
2975         (StaticHashSetNodeList):
2976         * dom/StaticNodeList.h:
2977         (WebCore::StaticNodeList::StaticNodeList):
2978         * dom/TransformSource.h:
2979         (TransformSource):
2980         * dom/TreeScope.h:
2981         (TreeScope):
2982         * dom/WebKitNamedFlowCollection.h:
2983         (WebKitNamedFlowCollection):
2984         * page/EventHandler.h:
2985         (EventHandler):
2986         * page/FocusController.h:
2987         (FocusController):
2988         * page/FrameView.h:
2989         (FrameView):
2990         * page/MemoryInfo.h:
2991         (MemoryInfo):
2992         * page/Page.h:
2993         (Page):
2994         * page/PageGroup.h:
2995         (PageGroup):
2996         * page/PrintContext.h:
2997         (PrintContext):
2998         * page/Settings.h:
2999         (Settings):
3000         * page/SpeechInput.h:
3001         (SpeechInput):
3002         * page/SpeechInputResultList.h:
3003         (SpeechInputResultList):
3004         * page/WebKitAnimation.h:
3005         * page/WindowFeatures.h:
3006         (WindowFeatures):
3007         * page/WorkerNavigator.h:
3008         (WorkerNavigator):
3009
3010 2012-07-24  Kent Tamura  <tkent@chromium.org>
3011
3012         Replace some callsites of shadowAncestorNode() with shadowHost()
3013         https://bugs.webkit.org/show_bug.cgi?id=92060
3014
3015         Reviewed by Hajime Morita.
3016
3017         shadowAncestorNode() is deprecated.
3018
3019         No new tests. This shouldn't change behaviors.
3020
3021         * html/shadow/MediaControlElements.cpp:
3022         (WebCore::toParentMediaElement):
3023         * html/shadow/TextControlInnerElements.h:
3024         (WebCore::SpinButtonElement::isEnabledFormControl):
3025         (WebCore::SpinButtonElement::isReadOnlyFormControl):
3026         * platform/efl/RenderThemeEfl.cpp:
3027         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
3028         (WebCore::RenderThemeEfl::paintMediaMuteButton):
3029         * platform/gtk/RenderThemeGtk.cpp:
3030         (WebCore::getMediaElementFromRenderObject):
3031         (WebCore::centerRectVerticallyInParentInputElement):
3032         * platform/qt/RenderThemeQt.cpp:
3033         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
3034         (WebCore::RenderThemeQt::paintMediaSliderThumb):
3035         Removed an ASSERT() because nullness of o->node() is already asserted.
3036         * rendering/RenderInputSpeech.cpp:
3037         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
3038         * rendering/RenderMediaControlsChromium.cpp:
3039         (WebCore::paintMediaSliderThumb):
3040         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
3041         (WebCore::paintMediaVolumeSliderThumb): ditto.
3042         * rendering/RenderThemeChromiumSkia.cpp:
3043         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
3044         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
3045         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
3046         * rendering/RenderThemeMac.mm:
3047         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3048         Remove an ASSERT(input) because input never be null unless o->node() is
3049         null. If o->node() is null, this function crashes.
3050         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
3051         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
3052         (WebCore::RenderThemeMac::paintMediaMuteButton):
3053         It's ok to ignore "node is a media element" case because this function
3054         works only if node->isMediaControlElement().
3055         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
3056         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
3057         * rendering/RenderThemeSafari.cpp:
3058         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
3059         Remove an ASSERT(input) because input never be null unless o->node() is
3060         null. If o->node() is null, this function crashes.
3061         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
3062         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
3063         * rendering/RenderThemeWinCE.cpp:
3064         (WebCore::mediaElementParent):
3065
3066 2012-07-24  Peter Beverloo  <peter@chromium.org>
3067
3068         [Chromium] Build fix for Android after r123424
3069         https://bugs.webkit.org/show_bug.cgi?id=92082
3070
3071         Unreviewed build fix.
3072
3073         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
3074         in r123424, while there still are two references left to another method and a
3075         constant. Re-add the include directive.
3076
3077         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3078
3079 2012-07-24  Kentaro Hara  <haraken@chromium.org>
3080
3081         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
3082         for static attributes in supplemental IDL files
3083         https://bugs.webkit.org/show_bug.cgi?id=91925
3084
3085         Reviewed by Adam Barth.
3086
3087         r122912 implemented static attributes in CodeGeneratorJS.pm.
3088         However, it generates wrong code for static attributes in supplemental
3089         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
3090         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
3091
3092         Test: bindings/scripts/test/TestSupplemental.idl
3093
3094         * bindings/scripts/CodeGeneratorJS.pm:
3095         (GenerateImplementation):
3096         * bindings/scripts/test/JS/JSTestInterface.cpp:
3097         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3098         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3099         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3100
3101 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3102
3103         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
3104         https://bugs.webkit.org/show_bug.cgi?id=92064
3105
3106         Reviewed by Kentaro Hara.
3107
3108         Some constructors missed to use *explicit* keyword. They need to be added
3109         *explicit* keyword to contructor which has a parameter in order to avoid
3110         implicit type conversion.
3111
3112         No new tests. Covered by existing tests.
3113
3114         * bridge/IdentifierRep.h:
3115         (WebCore::IdentifierRep::IdentifierRep):
3116         * history/BackForwardListImpl.h:
3117         (BackForwardListImpl):
3118         * history/CachedFrame.h:
3119         (CachedFrame):
3120         * history/HistoryItem.h:
3121         (HistoryItem):
3122         * loader/DocumentWriter.h:
3123         (DocumentWriter):
3124         * loader/FrameNetworkingContext.h:
3125         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
3126         * loader/HistoryController.h:
3127         * loader/ImageLoader.h:
3128         (ImageLoader):
3129         * loader/LinkLoader.h:
3130         (LinkLoader):
3131         * loader/MainResourceLoader.h:
3132         (MainResourceLoader):
3133         * loader/NavigationAction.h:
3134         (NavigationAction):
3135         * loader/NavigationScheduler.h:
3136         (NavigationScheduler):
3137         * loader/PolicyChecker.h:
3138         (PolicyChecker):
3139         * loader/SubframeLoader.h:
3140         (SubframeLoader):
3141         * loader/ThreadableLoaderClientWrapper.h:
3142         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
3143         * plugins/PluginData.h:
3144         (PluginData):
3145         * plugins/PluginViewBase.h:
3146         (WebCore::PluginViewBase::PluginViewBase):
3147
3148 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
3149
3150         [Qt] Fix conversion from GregorianDateTime to QTime
3151         https://bugs.webkit.org/show_bug.cgi?id=92068
3152
3153         Reviewed by Simon Hausmann.
3154
3155         * bridge/qt/qt_runtime.cpp:
3156         (JSC::Bindings::convertValueToQVariant):
3157         * bridge/qt/qt_runtime_qt4.cpp:
3158         (JSC::Bindings::convertValueToQVariant):
3159
3160 2012-07-24  Arko Saha  <arko@motorola.com>
3161
3162         Microdata: Implement PropertyNodeList interface.
3163         https://bugs.webkit.org/show_bug.cgi?id=80269
3164
3165         Reviewed by Ryosuke Niwa.
3166
3167         Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
3168         returns NodeList object. Made changes so that it will return PropertyNodeList object.
3169
3170         Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
3171         values are obtained from the "itemValue" DOM property of each of the elements represented by
3172         the object, in tree order.
3173
3174         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
3175
3176         Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
3177                fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
3178                fast/dom/MicroData/propertynodelist-getvalues-test.html
3179                fast/dom/MicroData/propertynodelist-test-add-remove-element.html
3180
3181         * CMakeLists.txt:
3182         * DerivedSources.cpp:
3183         * DerivedSources.make:
3184         * DerivedSources.pri:
3185         * GNUmakefile.list.am:
3186         * Target.pri:
3187         * UseJSC.cmake:
3188         * UseV8.cmake:
3189         * WebCore.gypi:
3190         * WebCore.vcproj/WebCore.vcproj:
3191         * WebCore.xcodeproj/project.pbxproj:
3192         * bindings/gobject/GNUmakefile.am:
3193         * bindings/js/JSBindingsAllInOne.cpp:
3194         * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
3195         (WebCore):
3196         (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
3197         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
3198         (WebCore):
3199         (WebCore::toV8): Added toV8 custom code.
3200         * dom/DynamicNodeList.cpp:
3201         (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
3202         (WebCore):
3203         (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
3204         specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
3205         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3206         (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
3207         NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
3208         * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
3209         is valid.
3210         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
3211         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
3212         (DynamicNodeListCacheBase):
3213         (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
3214         (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
3215         (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
3216         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
3217         attribute change.
3218         * dom/Node.cpp:
3219         (WebCore::Node::propertyNodeList):
3220         * dom/Node.h:
3221         (WebCore):
3222         (Node):
3223         * dom/PropertyNodeList.cpp: Added.
3224         (WebCore):
3225         (WebCore::PropertyNodeList::PropertyNodeList):
3226         (WebCore::PropertyNodeList::~PropertyNodeList):
3227         (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
3228         item.
3229         (WebCore::PropertyNodeList::updateRefElements):
3230         (WebCore::PropertyNodeList::nodeMatches):
3231         (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
3232         itemValue DOM property of each of the elements represented by the object, in tree order.
3233         * dom/PropertyNodeList.h: Added.
3234         (WebCore):
3235         (PropertyNodeList):
3236         (WebCore::PropertyNodeList::create):
3237         * dom/PropertyNodeList.idl: Added.
3238         * html/HTMLCollection.cpp:
3239         (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
3240         root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
3241         * html/HTMLElement.cpp:
3242         (WebCore::HTMLElement::properties):
3243         (WebCore):
3244         (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
3245         method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
3246         * html/HTMLElement.h:
3247         (HTMLElement):
3248         * html/HTMLPropertiesCollection.cpp:
3249         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
3250         (WebCore::HTMLPropertiesCollection::updateRefElements):
3251         (WebCore::HTMLPropertiesCollection::updateNameCache):
3252         (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
3253         (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
3254         name in the properties collection.
3255         * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
3256         has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
3257         hasNameCache() and setHasNameCache().
3258         (WebCore):
3259         (HTMLPropertiesCollection):
3260         (WebCore::HTMLPropertiesCollection::invalidateCache):
3261         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
3262         * html/HTMLPropertiesCollection.idl:
3263         * html/MicroDataItemValue.idl: Added.
3264         * page/DOMWindow.idl:
3265
3266 2012-07-24  Kentaro Hara  <haraken@chromium.org>
3267
3268         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
3269         implicitly assume ScriptExecutionContext for static attributes
3270         https://bugs.webkit.org/show_bug.cgi?id=91924
3271
3272         Reviewed by Adam Barth.
3273
3274         r122912 implemented static attributes in CodeGeneratorJS.pm.
3275         However, the generated code assumes that static attributes
3276         always require ScriptExecutionContext, which is wrong.
3277         If we need a ScriptExecutionContext, we should specify
3278         [CallWith=ScriptExecutionContext].
3279
3280         This patch fixes CodeGeneratorJS.pm so that static attributes
3281         do not assume ScriptExecutionContext. This fix aligns with
3282         the fix in CodeGeneratorV8.pm in r123308.
3283
3284         Test: bindings/scripts/test/TestObj.idl
3285
3286         * bindings/scripts/CodeGeneratorJS.pm:
3287         (GenerateImplementation):
3288         * bindings/scripts/test/JS/JSTestInterface.cpp:
3289         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3290         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3291         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3292         * bindings/scripts/test/JS/JSTestObj.cpp:
3293         (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
3294         (WebCore::jsTestObjConstructorStaticStringAttr):
3295         (WebCore::setJSTestObjConstructorStaticStringAttr):
3296
3297 2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3298
3299         Missing *explicit* keyword in editing.
3300         https://bugs.webkit.org/show_bug.cgi?id=92055
3301
3302         Reviewed by Ryosuke Niwa.
3303
3304         Some constructors missed to use *explicit* keyword. They need to be added
3305         *explicit* keyword to contructor which has a parameter in order to avoid
3306         implicit type conversion.
3307
3308         No new tests. Covered by existing tests.
3309
3310         * editing/AlternativeTextController.h:
3311         (WebCore::AlternativeTextController::UNLESS_ENABLED):
3312         * editing/BreakBlockquoteCommand.h:
3313         (BreakBlockquoteCommand):
3314         * editing/DeleteButton.h:
3315         (DeleteButton):
3316         * editing/DeleteButtonController.h:
3317         (DeleteButtonController):
3318         * editing/EditCommand.h:
3319         (EditCommand):
3320         (WebCore::SimpleEditCommand::SimpleEditCommand):
3321         * editing/EditingBehavior.h:
3322         (WebCore::EditingBehavior::EditingBehavior):
3323         * editing/EditingStyle.h:
3324         (EditingStyle):
3325         * editing/Editor.h:
3326         (Editor):
3327         * editing/FrameSelection.h:
3328         (FrameSelection):
3329         * editing/InsertLineBreakCommand.h:
3330         (InsertLineBreakCommand):
3331         * editing/ModifySelectionListLevel.h:
3332         (ModifySelectionListLevelCommand):
3333         (DecreaseSelectionListLevelCommand):
3334         * editing/RemoveFormatCommand.h:
3335         (RemoveFormatCommand):
3336         * editing/RemoveNodeCommand.h:
3337         (RemoveNodeCommand):
3338         * editing/RemoveNodePreservingChildrenCommand.h:
3339         (RemoveNodePreservingChildrenCommand):
3340         * editing/ReplaceNodeWithSpanCommand.h:
3341         (ReplaceNodeWithSpanCommand):
3342         * editing/TextInsertionBaseCommand.h:
3343         (TextInsertionBaseCommand):
3344         * editing/UndoManager.h:
3345         (UndoManager):
3346         * editing/UnlinkCommand.h:
3347         (UnlinkCommand):
3348         * editing/WrapContentsInDummySpanCommand.h:
3349         (WrapContentsInDummySpanCommand):
3350
3351 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
3352
3353         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
3354         https://bugs.webkit.org/show_bug.cgi?id=87899
3355
3356         Reviewed by Chris Fleizach.
3357
3358         Refactors AccessibilityRenderObject so that it inherits from a new class,
3359         AccessibilityNodeObject, that can be constructed from a Node without a
3360         renderer. Modifies AXObjectCache so that it automatically creates an
3361         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
3362         A new layout test verifies that this correctly exposes an accessibility
3363         tree with appropriate roles for elements in a canvas subtree.
3364
3365         This patch does not try to complete the implementation of
3366         AccessibilityNodeObject. Most AX methods are still unimplemented and need
3367         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
3368         in a future patch.
3369         
3370         This patch also doesn't change anything outside of WebCore/accessibility, so
3371         the rest of WebCore only calls AXObjectCache when there are changes to a
3372         RenderObject, not to a Node. Accessible notifications on nodes without
3373         renderers need to be implemented in a future patch.
3374
3375         Test: accessibility/canvas-accessibilitynodeobject.html
3376
3377         * CMakeLists.txt:
3378         * GNUmakefile.list.am:
3379         * Target.pri:
3380         * WebCore.gypi:
3381         * accessibility/AXObjectCache.cpp:
3382         (WebCore::AXObjectCache::get):
3383         (WebCore):
3384         (WebCore::createFromNode):
3385         (WebCore::AXObjectCache::getOrCreate):
3386         (WebCore::AXObjectCache::remove):
3387         * accessibility/AXObjectCache.h:
3388         (AXObjectCache):
3389         (WebCore::AXObjectCache::get):
3390         (WebCore::AXObjectCache::getOrCreate):
3391         (WebCore::AXObjectCache::remove):
3392         * accessibility/AccessibilityARIAGrid.cpp:
3393         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
3394         (WebCore):
3395         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
3396         (WebCore::AccessibilityARIAGrid::init):
3397         (WebCore::AccessibilityARIAGrid::create):
3398         * accessibility/AccessibilityARIAGrid.h:
3399         (AccessibilityARIAGrid):
3400         * accessibility/AccessibilityARIAGridCell.cpp:
3401         (WebCore::AccessibilityARIAGridCell::create):
3402         * accessibility/AccessibilityARIAGridRow.cpp:
3403         (WebCore::AccessibilityARIAGridRow::create):
3404         * accessibility/AccessibilityAllInOne.cpp:
3405         * accessibility/AccessibilityList.cpp:
3406         (WebCore::AccessibilityList::create):
3407         * accessibility/AccessibilityListBox.cpp:
3408         (WebCore::AccessibilityListBox::create):
3409         * accessibility/AccessibilityMediaControls.cpp:
3410         (WebCore::AccessibilityMediaControl::create):
3411         (WebCore::AccessibilityMediaControlsContainer::create):
3412         (WebCore::AccessibilityMediaTimeline::create):
3413         (WebCore::AccessibilityMediaTimeDisplay::create):
3414         * accessibility/AccessibilityMenuList.cpp:
3415         (WebCore::AccessibilityMenuList::create):
3416         (WebCore):
3417         * accessibility/AccessibilityMenuList.h:
3418         (AccessibilityMenuList):
3419         * accessibility/AccessibilityNodeObject.cpp: Added.
3420         (WebCore):
3421         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
3422         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
3423         (WebCore::AccessibilityNodeObject::init):
3424         (WebCore::AccessibilityNodeObject::create):
3425         (WebCore::AccessibilityNodeObject::detach):
3426         (WebCore::AccessibilityNodeObject::childrenChanged):
3427         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
3428         (WebCore::AccessibilityNodeObject::firstChild):
3429         (WebCore::AccessibilityNodeObject::lastChild):
3430         (WebCore::AccessibilityNodeObject::previousSibling):
3431         (WebCore::AccessibilityNodeObject::nextSibling):
3432         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
3433         (WebCore::AccessibilityNodeObject::parentObject):
3434         (WebCore::AccessibilityNodeObject::elementRect):
3435         (WebCore::AccessibilityNodeObject::setNode):
3436         (WebCore::AccessibilityNodeObject::document):
3437         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3438         (WebCore::AccessibilityNodeObject::addChildren):
3439         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
3440         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
3441         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
3442         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
3443         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
3444         * accessibility/AccessibilityNodeObject.h: Added.
3445         (WebCore):
3446         (AccessibilityNodeObject):
3447         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
3448         (WebCore::AccessibilityNodeObject::node):
3449         (WebCore::AccessibilityNodeObject::isDetached):
3450         (WebCore::toAccessibilityNodeObject):
3451         * accessibility/AccessibilityObject.h:
3452         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
3453         * accessibility/AccessibilityProgressIndicator.cpp:
3454         (WebCore::AccessibilityProgressIndicator::create):
3455         * accessibility/AccessibilityRenderObject.cpp:
3456         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3457         (WebCore::AccessibilityRenderObject::init):
3458         (WebCore):
3459         (WebCore::AccessibilityRenderObject::create):
3460         (WebCore::AccessibilityRenderObject::detach):
3461         (WebCore::AccessibilityRenderObject::setRenderer):
3462         (WebCore::AccessibilityRenderObject::canHaveChildren):
3463         (WebCore::AccessibilityRenderObject::addCanvasChildren):
3464         (WebCore::AccessibilityRenderObject::addChildren):
3465         * accessibility/AccessibilityRenderObject.h:
3466         (AccessibilityRenderObject):
3467         * accessibility/AccessibilitySlider.cpp:
3468         (WebCore::AccessibilitySlider::create):
3469         * accessibility/AccessibilityTable.cpp:
3470         (WebCore::AccessibilityTable::AccessibilityTable):
3471         (WebCore):
3472         (WebCore::AccessibilityTable::~AccessibilityTable):
3473         (WebCore::AccessibilityTable::init):
3474         (WebCore::AccessibilityTable::create):
3475         * accessibility/AccessibilityTable.h:
3476         (AccessibilityTable):
3477         * accessibility/AccessibilityTableCell.cpp:
3478         (WebCore::AccessibilityTableCell::create):
3479         * accessibility/AccessibilityTableRow.cpp:
3480         (WebCore::AccessibilityTableRow::create):
3481
3482 2012-07-23  David Barr  <davidbarr@chromium.org>
3483
3484         Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
3485         https://bugs.webkit.org/show_bug.cgi?id=91961
3486
3487         Reviewed by Tony Chang.
3488
3489         https://bugs.webkit.org/show_bug.cgi?id=89055
3490         A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
3491
3492         https://bugs.webkit.org/show_bug.cgi?id=90046
3493         Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
3494
3495         No new tests; build configuration fix.
3496
3497         * Configurations/FeatureDefines.xcconfig:
3498
3499 2012-07-23  Douglas Stockwell  <dstockwell@chromium.org>
3500
3501         Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
3502         https://bugs.webkit.org/show_bug.cgi?id=89148
3503
3504         Reviewed by Simon Fraser.
3505
3506         CSSGradientValue attempted to resolve colors during paint, this crashed
3507         when a derived color like -webkit-activelink was encountered because the
3508         corresponding element was no longer available in the StyleResolver.
3509         Instead, by adding a field to CSSGradientColorStop we can resolve and
3510         then cache the resolved colors at the correct time. To avoid sharing
3511         cached derived colors between elements we clone the gradient values when
3512         needed.
3513
3514         Test: fast/css/crash-on-gradient-with-derived-color.html
3515
3516         * css/CSSGradientValue.cpp:
3517         (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
3518         resolved colors, clone if colors are derived from the element.
3519         (WebCore):
3520         (WebCore::CSSGradientValue::addStops):
3521         (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
3522         StyleResolver.
3523         * css/CSSGradientValue.h:
3524         (CSSGradientColorStop): Added cache of resolved color.
3525         (CSSGradientValue):
3526         (CSSLinearGradientValue):
3527         (CSSRadialGradientValue):
3528         * css/CSSImageGeneratorValue.h:
3529         (WebCore):
3530         * css/CSSValue.h:
3531         (WebCore::CSSValue::isGradientValue):
3532         * css/StyleResolver.cpp:
3533         (WebCore::StyleResolver::collectMatchingRulesForList):
3534         * css/StyleResolver.h:
3535         (StyleResolver):
3536         * rendering/style/StyleGeneratedImage.cpp:
3537         (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
3538         is no longer necessary as the gradient colors are now resolved at a
3539         time when the style is set on StyleResolver.
3540
3541 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3542
3543         Move GregorianDateTime from JSC to WTF namespace
3544         https://bugs.webkit.org/show_bug.cgi?id=91948
3545
3546         Reviewed by Geoffrey Garen.
3547
3548         Moving GregorianDateTime into the WTF namespace allows us to us to
3549         use it in WebCore too. The new class has the same behaviour as the
3550         old struct. Only the unused timeZone member has been removed.
3551
3552         * bridge/qt/qt_runtime.cpp:
3553         (JSC::Bindings::convertValueToQVariant):
3554         (JSC::Bindings::convertQVariantToValue):
3555         * bridge/qt/qt_runtime_qt4.cpp:
3556         (JSC::Bindings::convertValueToQVariant):
3557         (JSC::Bindings::convertQVariantToValue):
3558
3559 2012-07-23  Mark Pilgrim  <pilgrim@chromium.org>
3560
3561         [Chromium] Move layoutTestMode to WebCore
3562         https://bugs.webkit.org/show_bug.cgi?id=92010
3563
3564         Reviewed by Adam Barth.
3565
3566         Part of a refactoring series. See tracking bug 82948.
3567
3568         * CMakeLists.txt:
3569         * GNUmakefile.list.am:
3570         * Target.pri:
3571         * WebCore.gypi:
3572         * WebCore.vcproj/WebCore.vcproj:
3573         * WebCore.xcodeproj/project.pbxproj:
3574         * bindings/generic/RuntimeEnabledFeatures.h:
3575         (RuntimeEnabledFeatures):
3576         * platform/LayoutTestSupport.cpp: Added.
3577         (WebCore):
3578         (WebCore::isRunningLayoutTest):
3579         (WebCore::setIsRunningLayoutTest):
3580         * platform/LayoutTestSupport.h: Added.
3581         (WebCore):
3582         * platform/chromium/PlatformSupport.h:
3583         (PlatformSupport):
3584         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3585         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3586         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3587         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3588         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3589         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
3590         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3591         (WebCore):
3592         (WebCore::LookupAltName):
3593         (WebCore::fontContainsCharacter):
3594         (WebCore::FillLogFont):
3595         (WebCore::FontCache::getFontDataForCharacters):
3596         (WebCore::FontCache::createFontPlatformData):
3597         * platform/graphics/skia/FontCustomPlatformData.cpp:
3598         (WebCore::FontCustomPlatformData::fontPlatformData):
3599         * platform/graphics/skia/FontSkia.cpp:
3600         (WebCore::Font::drawGlyphs):
3601         * rendering/RenderThemeChromiumAndroid.cpp:
3602         (WebCore::RenderThemeChromiumAndroid::systemColor):
3603         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
3604         * rendering/RenderThemeChromiumMac.mm:
3605         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
3606         * rendering/RenderThemeChromiumSkia.cpp:
3607         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
3608         * rendering/RenderThemeChromiumWin.cpp:
3609         (WebCore):
3610         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3611         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3612         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
3613         (WebCore::RenderThemeChromiumWin::systemColor):
3614         (WebCore::menuListButtonWidth):
3615         (WebCore::RenderThemeChromiumWin::determineClassicState):
3616
3617 2012-07-23  Dave Tu  <dtu@chromium.org>
3618
3619         [chromium] Add droppedFrameCount to renderingStats.
3620         https://bugs.webkit.org/show_bug.cgi?id=91694
3621
3622         Reviewed by Adrienne Walker.
3623
3624         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
3625         (WebCore):
3626         (WebCore::CCFrameRateCounter::frameInterval):
3627         (WebCore::CCFrameRateCounter::frameIndex):
3628         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
3629         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
3630         (WebCore::CCFrameRateCounter::isBadFrame):
3631         * platform/graphics/chromium/cc/CCFrameRateCounter.h:
3632         (WebCore::CCFrameRateCounter::droppedFrameCount):
3633         (CCFrameRateCounter):
3634         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3635         (WebCore::CCLayerTreeHost::renderingStats):
3636         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3637         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3638         (WebCore::CCLayerTreeHostImpl::drawLayers):
3639         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3640         (CCLayerTreeHostImpl):
3641         * platform/graphics/chromium/cc/CCRenderingStats.h:
3642         (CCRenderingStats):
3643         (WebCore::CCRenderingStats::CCRenderingStats):
3644         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3645         (WebCore::CCSingleThreadProxy::implSideRenderingStats):
3646         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3647         (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
3648
3649 2012-07-23  Dan Bernstein  <mitz@apple.com>
3650
3651         Fixed the build after r123418.
3652
3653         * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
3654
3655 2012-07-23  Mike Lawther  <mikelawther@chromium.org>
3656
3657         CSS3 calc: optimise blending expression
3658         https://bugs.webkit.org/show_bug.cgi?id=90037
3659
3660         Reviewed by Tony Chang.
3661
3662         Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
3663         this blends them together when evaluated.
3664
3665         An alternative and more general approach of being able to blend two CalcExpressionNodes was
3666         tested, but involves more memory allocations, was measurably slower, and nothing currently
3667         would make use of the generality. 
3668
3669         No functional change. Covered by existing tests.
3670
3671         * platform/CalculationValue.h:
3672         (CalcExpressionBlendLength):
3673         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3674         (WebCore::CalcExpressionBlendLength::operator==):
3675         (WebCore::CalcExpressionBlendLength::evaluate):
3676         (WebCore):
3677         * platform/Length.cpp:
3678         (WebCore::Length::blendCalculation):
3679
3680 2012-07-23  Nico Weber  <thakis@chromium.org>
3681
3682         [chromium] Show search tickmarks on css-styled scrollbars
3683         https://bugs.webkit.org/show_bug.cgi?id=91949
3684
3685         Reviewed by Adrienne Walker.
3686
3687         This is done by letting RenderScrollbarTheme::paintTickmarks()
3688         delegate to the native ScrollbarTheme. To make this possible,
3689         move paintTickmarks() from ScrollbarThemeComposite to the
3690         superclass ScrollbarTheme.
3691
3692         For testing, add internals.addTextMatchMarker() and add a pixel test.
3693
3694         * platform/ScrollbarTheme.h:
3695         (WebCore::ScrollbarTheme::paintTickmarks):
3696         Moved paintTickmarks() from ScrollbarThemeComposite to here.
3697         * platform/ScrollbarThemeComposite.h:
3698         Remove paintTickmarks().
3699         * platform/chromium/ScrollbarThemeChromium.cpp:
3700         (WebCore::ScrollbarThemeChromium::paintTickmarks):
3701         Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
3702         * platform/chromium/ScrollbarThemeChromiumMac.h:
3703         (ScrollbarThemeChromiumMac):
3704         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3705         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3706         (WebCore::ScrollbarThemeChromiumMac::paint):
3707         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3708         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3709         * rendering/RenderScrollbarTheme.cpp:
3710         (WebCore::RenderScrollbarTheme::paintTickmarks):
3711         Delegate to the native ScrollbarTheme for tickmark drawing.
3712         (WebCore):
3713         * rendering/RenderScrollbarTheme.h:
3714         (RenderScrollbarTheme):
3715         Override paintTickmarks().
3716
3717 2012-07-23  Brian Anderson  <brianderson@chromium.org>
3718
3719         [chromium] Use shallow flushes that don't glFlush
3720         https://bugs.webkit.org/show_bug.cgi?id=90325
3721
3722         Reviewed by Kenneth Russell.
3723
3724         Adds plumbing for the shallowFlushCHROMIUM extension and uses
3725         shallow flushes instead of normal flushes when uploading textures.
3726         Shallow flushes allow us to initiate command buffer flushes to
3727         the GPU thread/process without the overhead of a true glFlush.
3728
3729         CCTextureUpdaterTest updated to recognize shallow flushes.
3730
3731         * platform/chromium/support/Extensions3DChromium.cpp:
3732         (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
3733         (WebCore):
3734         * platform/graphics/chromium/Extensions3DChromium.h:
3735         (Extensions3DChromium):
3736         * platform/graphics/chromium/cc/CCGraphicsContext.h:
3737         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
3738         (WebCore::CCResourceProvider::shallowFlushIfSupported):
3739         (WebCore):
3740         (WebCore::CCResourceProvider::CCResourceProvider):
3741         (WebCore::CCResourceProvider::initialize):
3742         * platform/graphics/chromium/cc/CCResourceProvider.h:
3743         (CCResourceProvider):
3744         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3745         (WebCore::CCTextureUpdater::update):
3746
3747 2012-07-23  Hanyee Kim  <choco@company100.net>
3748
3749         When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
3750         https://bugs.webkit.org/show_bug.cgi?id=91322
3751
3752         Reviewed by Noam Rosenthal.
3753
3754         When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
3755         the property values defined in the last executing keyframe after the final iteration of animation.
3756
3757         This patch does not return right after the end of animation, but it keeps applying
3758         the property values defined in the last executing keyframe.
3759         Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
3760         last executing keyframe.
3761
3762         Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
3763
3764         Test: animations/fill-mode-forwards2.html
3765
3766         * platform/graphics/GraphicsLayerAnimation.cpp:
3767         (WebCore::normalizedAnimationValueForFillsForwards):
3768         (WebCore):
3769         (WebCore::GraphicsLayerAnimation::apply):
3770
3771 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3772
3773         Unreviewed, rolling out r123184, r123195, and r123197.
3774         http://trac.webkit.org/changeset/123184
3775         http://trac.webkit.org/changeset/123195
3776         http://trac.webkit.org/changeset/123197
3777         https://bugs.webkit.org/show_bug.cgi?id=92049
3778
3779         pagecycler regression (Requested by morrita on #webkit).
3780
3781         * WebCore.exp.in:
3782         * dom/Document.cpp:
3783         (WebCore::Document::Document):
3784         (WebCore::Document::~Document):
3785         (WebCore::Document::suggestedMIMEType):
3786         * dom/Document.h:
3787         (WebCore):
3788         (WebCore::Node::isDocumentNode):
3789         (WebCore::Node::Node):
3790         * dom/Node.cpp:
3791         (WebCore::Node::~Node):
3792         (WebCore::Node::setDocument):
3793         (WebCore):
3794         (WebCore::Node::setTreeScope):
3795         (WebCore::Node::treeScope):
3796         (WebCore::Node::isInShadowTree):
3797         (WebCore::Node::reportMemoryUsage):
3798         * dom/Node.h:
3799         (Node):
3800         (WebCore::Node::document):
3801         (WebCore::Node::inDocument):
3802         * dom/NodeRareData.h:
3803         (WebCore::NodeRareData::NodeRareData):
3804         (WebCore::NodeRareData::treeScope):
3805         (WebCore::NodeRareData::setTreeScope):
3806         (NodeRareData):
3807         * dom/ShadowRoot.cpp:
3808         (WebCore::ShadowRoot::ShadowRoot):
3809         * dom/TreeScope.cpp:
3810         (WebCore::TreeScope::TreeScope):
3811         (WebCore::TreeScope::setParentTreeScope):
3812         * dom/TreeScope.h:
3813         (WebCore):
3814         (WebCore::TreeScope::idTargetObserverRegistry):
3815         (TreeScope):
3816         * dom/TreeScopeAdopter.cpp:
3817         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3818         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3819         * editing/MoveSelectionCommand.cpp:
3820         * editing/RemoveNodeCommand.cpp:
3821         * editing/RemoveNodePreservingChildrenCommand.cpp:
3822         * inspector/PageConsoleAgent.cpp:
3823
3824 2012-07-23  Roger Fong  <roger_fong@apple.com>
3825
3826         On Windows, if select element is off screen horizontally, 
3827         menu is either inappropriately resized or positioned offscreen.
3828         https://bugs.webkit.org/show_bug.cgi?id=91913
3829         <rdar://problem/7611229>
3830
3831         Reviewed by Tim Horton.
3832
3833         If the select element is positioned off the edge of the screen to the left, 
3834         the menu is resized. It should not be resized, just shifted to remain on the screen.
3835         If the select element is positioned off the edge of the screen to the right, 
3836         the menu goes off screen instead of being shifted over to appear on screen.
3837         This problem only occurs on Windows.
3838         
3839         Test: ManualTests/win/select-menu-off-screen.html
3840
3841         * platform/win/PopupMenuWin.cpp:
3842         (WebCore::PopupMenuWin::calculatePositionAndSize):
3843         Modified final horizontal position calculation code to position
3844         popup menu on screen if it would otherwise go off.
3845         
3846 2012-07-23  David Dorwin  <ddorwin@chromium.org>
3847
3848         Fixed crash in webkitAddKey() when key parameter is null.
3849         https://bugs.webkit.org/show_bug.cgi?id=85444
3850
3851         Reviewed by Kentaro Hara.
3852
3853         Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
3854
3855         Tests: media/encrypted-media/encrypted-media-syntax.html 
3856
3857         * html/HTMLMediaElement.cpp:
3858         (WebCore::HTMLMediaElement::webkitAddKey):
3859
3860 2012-07-23  Hayato Ito  <hayato@chromium.org>
3861
3862         A FocusScope for a distributed node should not be its TreeScope.
3863         https://bugs.webkit.org/show_bug.cgi?id=91829
3864
3865         Reviewed by Dimitri Glazkov.
3866
3867         Current implementation of FocusScope::focusScopeOf(Node*) returns
3868         the given node's treeScope().  That does not apply if the node is
3869         a distributed node.  We should calculate a FocusScope for a
3870         distributed node by traversing ancestor nodes in Composed Shadow
3871         Tree.
3872
3873         Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
3874
3875         * page/FocusController.cpp:
3876         (WebCore::FocusScope::focusScopeOf):
3877
3878 2012-07-23  Douglas Stockwell  <dstockwell@google.com>
3879
3880         Null-pointer crash when parsing border-image
3881         https://bugs.webkit.org/show_bug.cgi?id=91963
3882
3883         Reviewed by Darin Adler.
3884
3885         Test: fast/css/border-image-fill-crash.html
3886
3887         * css/CSSParser.cpp:
3888         (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
3889         parseBorderImageRepeat is called when the value list is empty.
3890
3891 2012-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
3892
3893         [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
3894         https://bugs.webkit.org/show_bug.cgi?id=91761
3895
3896         Reviewed by Andreas Kling.
3897
3898         CSS exclusion shapes that are specified with negative radiuses or
3899         height/width are now considered invalid and ignored.
3900
3901         Tests added to
3902         LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
3903
3904         * css/CSSParser.cpp:
3905         (WebCore::CSSParser::parseExclusionShapeRectangle):
3906         (WebCore::CSSParser::parseExclusionShapeCircle):
3907         (WebCore::CSSParser::parseExclusionShapeEllipse):
3908
3909 2012-07-23  Tien-Ren Chen  <trchen@chromium.org>
3910
3911         [chromium] Implement scrollbar theme for Android
3912         https://bugs.webkit.org/show_bug.cgi?id=91674
3913
3914         Reviewed by Adam Barth.
3915
3916         Previously the scrollbar for Android was implemented as an extra
3917         drawing pass in the compositor. Now we switch to use the standard
3918         ScrollbarTheme mechanism.
3919
3920         No new tests. We use mock scrollbars during layout test to share
3921         pixel results with Linux.
3922
3923         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3924         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3925         (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition):
3926         (WebCore::ScrollbarThemeChromiumAndroid::thumbLength):
3927         (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect):
3928         (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect):
3929         (WebCore::ScrollbarThemeChromiumAndroid::trackRect):
3930         (WebCore):
3931         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
3932         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3933         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
3934         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
3935         (ScrollbarThemeChromiumAndroid):
3936         (WebCore::ScrollbarThemeChromiumAndroid::hasButtons):
3937         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
3938
3939 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
3940
3941         Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
3942         https://bugs.webkit.org/show_bug.cgi?id=91703
3943
3944         Reviewed by Adam Barth.
3945
3946         The current WebKit HTML5 parser implementation does not hold the original token
3947         in the stack of open elements and the active formatting elements. This is
3948         problematic because the original token is used to create an element in
3949         "reconstruct the active formatting elements" and "call the adoption agency".
3950
3951         As a workaround, WebKit uses the saved element instead of the original token
3952         to create an element. But this causes us to fail examples like this:
3953         <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
3954         reconstructTheActiveFormattingElements calls this method to open a second <b>
3955         tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
3956         should be "1".
3957
3958         Created a ref-counted container class, HTMLStackItem to hold the original token
3959         and the namespace URI as well as the element. Changed HTMLElementStack and
3960         HTMLFormattingElementList to use HTMLStackItem.
3961         Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
3962         HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
3963         instead of the saved element.
3964
3965         Updated test expectation for html5lib/runner-expected.txt
3966         because now resources/scripted/adoption01.dat passes.
3967
3968         * html/parser/HTMLConstructionSite.cpp:
3969         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3970         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3971         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3972         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3973         (WebCore::HTMLConstructionSite::insertHTMLElement):
3974         (WebCore::HTMLConstructionSite::insertFormattingElement):
3975         (WebCore::HTMLConstructionSite::insertScriptElement):
3976         (WebCore::HTMLConstructionSite::insertForeignElement):
3977         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
3978         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
3979         * html/parser/HTMLConstructionSite.h:
3980         (HTMLConstructionSite):
3981         (WebCore::HTMLConstructionSite::currentElementRecord):
3982         * html/parser/HTMLElementStack.cpp:
3983         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
3984         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
3985         (WebCore::HTMLElementStack::pushRootNode):
3986         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
3987         (WebCore::HTMLElementStack::pushRootNodeCommon):
3988         (WebCore::HTMLElementStack::pushHTMLHeadElement):
3989         (WebCore::HTMLElementStack::pushHTMLBodyElement):
3990         (WebCore::HTMLElementStack::push):
3991         (WebCore::HTMLElementStack::insertAbove):
3992         (WebCore::HTMLElementStack::pushCommon):
3993         * html/parser/HTMLElementStack.h:
3994         (WebCore::HTMLElementStack::ElementRecord::element):
3995         (WebCore::HTMLElementStack::ElementRecord::node):
3996         (WebCore::HTMLElementStack::ElementRecord::stackItem):
3997         (ElementRecord):
3998         (HTMLElementStack):
3999         * html/parser/HTMLFormattingElementList.cpp:
4000         (WebCore::HTMLFormattingElementList::swapTo):
4001         (WebCore::HTMLFormattingElementList::append):
4002         * html/parser/HTMLFormattingElementList.h:
4003         (WebCore::HTMLFormattingElementList::Entry::Entry):
4004         (WebCore::HTMLFormattingElementList::Entry::isMarker):
4005         (WebCore::HTMLFormattingElementList::Entry::stackItem):
4006         (WebCore::HTMLFormattingElementList::Entry::element):
4007         (WebCore::HTMLFormattingElementList::Entry::replaceElement):
4008         (WebCore::HTMLFormattingElementList::Entry::operator==):
4009         (WebCore::HTMLFormattingElementList::Entry::operator!=):
4010         (Entry):
4011         (HTMLFormattingElementList):
4012         * html/parser/HTMLStackItem.h: Added.
4013         (WebCore):
4014         (HTMLStackItem):
4015         (WebCore::HTMLStackItem::create):
4016         (WebCore::HTMLStackItem::element):
4017         (WebCore::HTMLStackItem::node):
4018         (WebCore::HTMLStackItem::token):
4019         (WebCore::HTMLStackItem::namespaceURI):
4020 &n