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